@remkoj/optimizely-cms-api 3.2.1 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/config.js +3 -2
- package/package.json +3 -3
package/dist/config.js
CHANGED
|
@@ -12,12 +12,13 @@ function getCmsIntegrationApiConfigFromEnvironment() {
|
|
|
12
12
|
const cmsVersion = getSelection('OPTIMIZELY_CMS_SCHEMA', [types_1.OptiCmsVersion.CMS12, types_1.OptiCmsVersion.CMS13], types_1.OptiCmsVersion.CMS13);
|
|
13
13
|
let baseUrl;
|
|
14
14
|
try {
|
|
15
|
-
|
|
15
|
+
const cmsUrlAdjusted = cmsUrl.includes("://") ? cmsUrl : 'https://' + cmsUrl;
|
|
16
|
+
baseUrl = new URL(OpenAPI_1.OpenAPI.BASE, cmsUrlAdjusted);
|
|
16
17
|
if (cmsVersion == types_1.OptiCmsVersion.CMS12)
|
|
17
18
|
baseUrl.pathname = baseUrl.pathname.replace('preview2', 'preview1');
|
|
18
19
|
}
|
|
19
20
|
catch (e) {
|
|
20
|
-
throw new Error("Invalid URL provided");
|
|
21
|
+
throw new Error("Invalid Optimizely CMS URL provided");
|
|
21
22
|
}
|
|
22
23
|
if (debug)
|
|
23
24
|
console.log(`[Optimizely CMS API] Connecting to ${baseUrl} as ${clientId}`);
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@remkoj/optimizely-cms-api",
|
|
3
3
|
"displayName": "Optimizely CMS - Integration API Client",
|
|
4
4
|
"description": "A Javascript client for the Integration API provided by the Optimizely CMS.",
|
|
5
|
-
"version": "3.2.
|
|
5
|
+
"version": "3.2.3",
|
|
6
6
|
"packageManager": "yarn@4.3.0",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"license": "Apache-2.0",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"./dist"
|
|
13
13
|
],
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@types/node": "^22.10.
|
|
16
|
-
"dotenv": "^16.4.
|
|
15
|
+
"@types/node": "^22.10.1",
|
|
16
|
+
"dotenv": "^16.4.7",
|
|
17
17
|
"glob": "^11.0.0",
|
|
18
18
|
"openapi-typescript-codegen": "^0.29.0",
|
|
19
19
|
"tslib": "^2.8.1",
|