Skip to content

Commit 77e7812

Browse files
authoredApr 4, 2025
Merge pull request #139 from contentstack/feat/MKT-11337-error-hosting-support
Feat/mkt 11337 error hosting support
2 parents 1922233 + f3ab178 commit 77e7812

18 files changed

+202
-16495
lines changed
 

‎.eslintrc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212
"plugin:@typescript-eslint/eslint-recommended",
1313
"plugin:@typescript-eslint/recommended"
1414
],
15-
"env": {
16-
"browser": true,
17-
"node": true
18-
},
19-
2015
"rules": {
2116
"@typescript-eslint/no-explicit-any": 0,
2217
"@typescript-eslint/prefer-const": 0,

‎.github/workflows/node.js.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [12.x]
19+
node-version: [18.x]
2020
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2121

2222
steps:

‎.github/workflows/npm-publish-github-packages.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v3
1515
- uses: actions/setup-node@v3
1616
with:
17-
node-version: 14
17+
node-version: 18
1818
- run: npm ci
1919
- run: npm test
2020

@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v3
2929
- uses: actions/setup-node@v3
3030
with:
31-
node-version: 14
31+
node-version: 18
3232
registry-url: https://npm.pkg.github.com/
3333
- run: npm ci
3434
- run: npm publish

‎.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v2
1616
with:
17-
node-version: 16
17+
node-version: 18
1818
- run: npm ci
1919
- run: npm test
2020

@@ -25,7 +25,7 @@ jobs:
2525
- uses: actions/checkout@v2
2626
- uses: actions/setup-node@v2
2727
with:
28-
node-version: 16
28+
node-version: 18
2929
registry-url: https://registry.npmjs.org/
3030
- run: npm ci
3131
- run: npm publish

‎.github/workflows/unit-test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
node-version: [14.x]
19+
node-version: [18.x]
2020

2121
steps:
2222
- name: Checkout repository
2323
uses: actions/checkout@v2
2424
with:
25-
node-version: '14.x'
25+
node-version: '18.x'
2626

2727
- name: Use Node.js
2828
uses: actions/setup-node@v2
2929
with:
30-
node-version: '14.x'
30+
node-version: '18.x'
3131

3232
- name: Install deps
3333
run: npm ci

‎__test__/assetSidebarWidget.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ describe("AssetSidebarWidget", () => {
2525
user: {} as any,
2626
currentBranch: "mock_branch",
2727
region: "region",
28+
endpoints: { CMA: "", APP: "",DEVELOPER_HUB:"" },
2829
};
2930

3031
let connection: { sendToParent: (...props: any[]) => any };

‎__test__/fieldModifierLocation/entry.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ describe("FieldModifierLocationEntry", () => {
4747
extension_uid: "extension_uid",
4848
installation_uid: "installation_uid",
4949
region: "NA",
50+
endpoints: { CMA: "", APP: "",DEVELOPER_HUB:"" },
5051
stack: {
5152
api_key: "api_key",
5253
created_at: "created_at",

‎__test__/organizationFullPage.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const mockData: IOrgFullPageLocationInitData = {
77
installation_uid: "installation_uid",
88
extension_uid: "extension_uid",
99
region: "NA",
10+
endpoints:{CMA:"",APP:"",DEVELOPER_HUB:""},
1011
stack: {} as any,
1112
user: {} as any,
1213
currentBranch: "currentBranch",

‎__test__/uiLocation.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const initData: IAppConfigInitData = {
6060
installation_uid: "installation_uid",
6161
extension_uid: "extension_uid",
6262
region: "NA",
63+
endpoints: { CMA: "https://api.contentstack.io", APP: "https://app.contentstack.app",DEVELOPER_HUB:"" },
6364
stack: mockStackData,
6465
user: {} as any,
6566
currentBranch: "currentBranch",

‎__test__/utils.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ describe("formatAppRegion", () => {
2323
});
2424

2525
it("should return unknown for any invalid region", () => {
26-
expect(formatAppRegion("invalid")).toBe(Region.UNKNOWN);
26+
expect(formatAppRegion("invalid")).toBe("invalid");
2727
});
2828
});

0 commit comments

Comments
 (0)