@scalar/api-client 0.7.23 → 0.7.24
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/CHANGELOG.md +6 -0
- package/dist/components/ApiClient/Response/Response.vue.d.ts.map +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/helpers/index.d.ts.map +1 -1
- package/dist/helpers/isJsonString.d.ts +5 -0
- package/dist/helpers/isJsonString.d.ts.map +1 -0
- package/dist/index.js +12 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Response.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Response/Response.vue.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Response.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/ApiClient/Response/Response.vue.ts"],"names":[],"mappings":";AA8QA,wBAAkD"}
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,oBAAoB,CAAA;AAClC,cAAc,eAAe,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isJsonString.d.ts","sourceRoot":"","sources":["../../src/helpers/isJsonString.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,YAAY,WAAY,GAAG,YAYvC,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -4015,6 +4015,17 @@ const concatenateUrlAndPath = (url, path) => {
|
|
|
4015
4015
|
const pathWithoutSlash = path.startsWith("/") ? path.slice(1) : path;
|
|
4016
4016
|
return [urlWithSlash, pathWithoutSlash].join("");
|
|
4017
4017
|
};
|
|
4018
|
+
const isJsonString = (value) => {
|
|
4019
|
+
if (typeof value !== "string") {
|
|
4020
|
+
return false;
|
|
4021
|
+
}
|
|
4022
|
+
try {
|
|
4023
|
+
JSON.parse(value);
|
|
4024
|
+
} catch {
|
|
4025
|
+
return false;
|
|
4026
|
+
}
|
|
4027
|
+
return true;
|
|
4028
|
+
};
|
|
4018
4029
|
function mapFromArray(arr, key, valueKey) {
|
|
4019
4030
|
const obj = {};
|
|
4020
4031
|
arr.forEach((entry) => {
|
|
@@ -8756,17 +8767,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8756
8767
|
const cookies2 = (_a = activeResponse2.value) == null ? void 0 : _a.cookies;
|
|
8757
8768
|
return cookies2 ? Object.keys(cookies2).map((key) => ({ name: key, value: cookies2[key] })) : [];
|
|
8758
8769
|
});
|
|
8759
|
-
const isJsonString = (value) => {
|
|
8760
|
-
if (typeof value !== "string") {
|
|
8761
|
-
return false;
|
|
8762
|
-
}
|
|
8763
|
-
try {
|
|
8764
|
-
JSON.parse(value);
|
|
8765
|
-
} catch {
|
|
8766
|
-
return false;
|
|
8767
|
-
}
|
|
8768
|
-
return true;
|
|
8769
|
-
};
|
|
8770
8770
|
const responseData = computed(() => {
|
|
8771
8771
|
var _a;
|
|
8772
8772
|
const value = (_a = activeResponse2.value) == null ? void 0 : _a.data;
|
|
@@ -8926,6 +8926,7 @@ export {
|
|
|
8926
8926
|
createPlaceholderRequest,
|
|
8927
8927
|
httpHeaders,
|
|
8928
8928
|
httpStatusCodes,
|
|
8929
|
+
isJsonString,
|
|
8929
8930
|
mapFromArray,
|
|
8930
8931
|
normalizePath,
|
|
8931
8932
|
normalizeRequestMethod,
|
package/package.json
CHANGED