@forklaunch/universal-sdk 0.7.23 → 0.7.25
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/lib/index.js +4 -2
- package/lib/index.mjs +4 -2
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -436,7 +436,7 @@ var UniversalSdk = class _UniversalSdk {
|
|
|
436
436
|
*/
|
|
437
437
|
async execute(path, method, version, request) {
|
|
438
438
|
const { params, body, query, headers } = request || {};
|
|
439
|
-
let url = getSdkPath(this.host + path);
|
|
439
|
+
let url = getSdkPath(this.host + path).replace(/([^:]\/)\/+/g, "$1");
|
|
440
440
|
if (params) {
|
|
441
441
|
for (const key in params) {
|
|
442
442
|
const paramValue = encodeURIComponent(params[key]);
|
|
@@ -622,7 +622,9 @@ var UniversalSdk = class _UniversalSdk {
|
|
|
622
622
|
json
|
|
623
623
|
);
|
|
624
624
|
if (!isValidJson) {
|
|
625
|
-
throw new Error(
|
|
625
|
+
throw new Error(
|
|
626
|
+
`Response does not match OpenAPI spec: ${JSON.stringify(this.ajv.errors)}`
|
|
627
|
+
);
|
|
626
628
|
}
|
|
627
629
|
responseBody = coerceSpecialTypes(
|
|
628
630
|
json,
|
package/lib/index.mjs
CHANGED
|
@@ -404,7 +404,7 @@ var UniversalSdk = class _UniversalSdk {
|
|
|
404
404
|
*/
|
|
405
405
|
async execute(path, method, version, request) {
|
|
406
406
|
const { params, body, query, headers } = request || {};
|
|
407
|
-
let url = getSdkPath(this.host + path);
|
|
407
|
+
let url = getSdkPath(this.host + path).replace(/([^:]\/)\/+/g, "$1");
|
|
408
408
|
if (params) {
|
|
409
409
|
for (const key in params) {
|
|
410
410
|
const paramValue = encodeURIComponent(params[key]);
|
|
@@ -590,7 +590,9 @@ var UniversalSdk = class _UniversalSdk {
|
|
|
590
590
|
json
|
|
591
591
|
);
|
|
592
592
|
if (!isValidJson) {
|
|
593
|
-
throw new Error(
|
|
593
|
+
throw new Error(
|
|
594
|
+
`Response does not match OpenAPI spec: ${JSON.stringify(this.ajv.errors)}`
|
|
595
|
+
);
|
|
594
596
|
}
|
|
595
597
|
responseBody = coerceSpecialTypes(
|
|
596
598
|
json,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forklaunch/universal-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.25",
|
|
4
4
|
"description": "Cross runtime fetch library for forklaunch router sdks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fetch",
|
|
@@ -33,18 +33,18 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"ajv": "^8.17.1",
|
|
35
35
|
"ajv-formats": "^3.0.1",
|
|
36
|
-
"@forklaunch/common": "0.6.
|
|
36
|
+
"@forklaunch/common": "0.6.25"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^
|
|
40
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
39
|
+
"@types/node": "^25.0.9",
|
|
40
|
+
"@typescript/native-preview": "7.0.0-dev.20260118.1",
|
|
41
41
|
"fetch-mock": "^12.6.0",
|
|
42
42
|
"jest": "^30.2.0",
|
|
43
43
|
"openapi3-ts": "^4.5.0",
|
|
44
|
-
"prettier": "^3.
|
|
45
|
-
"ts-jest": "^29.4.
|
|
44
|
+
"prettier": "^3.8.0",
|
|
45
|
+
"ts-jest": "^29.4.6",
|
|
46
46
|
"tsup": "^8.5.1",
|
|
47
|
-
"typedoc": "^0.28.
|
|
47
|
+
"typedoc": "^0.28.16"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsgo --noEmit && tsup index.ts --format cjs,esm --no-splitting --dts --tsconfig tsconfig.json --out-dir lib --clean",
|