@stonecrop/graphql-client 0.4.35 → 0.4.37
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.9.3"}
|
package/dist/index.js
CHANGED
|
@@ -16,14 +16,14 @@ const metaParser = (obj) => {
|
|
|
16
16
|
return JSON.parse(obj, (key, value) => {
|
|
17
17
|
if (typeof value === 'string') {
|
|
18
18
|
try {
|
|
19
|
-
return JSON.parse(value, (
|
|
19
|
+
return JSON.parse(value, (_key, value) => {
|
|
20
20
|
if (typeof value === 'string' && !isNaN(Number(value))) {
|
|
21
21
|
return new Decimal(value);
|
|
22
22
|
}
|
|
23
23
|
return value;
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
catch
|
|
26
|
+
catch {
|
|
27
27
|
// if the value is not a stringified JSON, return as it is
|
|
28
28
|
return value;
|
|
29
29
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stonecrop/graphql-client",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.37",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|
|
@@ -37,31 +37,31 @@
|
|
|
37
37
|
"decimal.js": "^10.4.3",
|
|
38
38
|
"graphql": "~16.6.0",
|
|
39
39
|
"graphql-request": "~6.0.0",
|
|
40
|
-
"@stonecrop/stonecrop": "0.4.
|
|
40
|
+
"@stonecrop/stonecrop": "0.4.37"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@
|
|
43
|
+
"@eslint/js": "^9.38.0",
|
|
44
|
+
"@microsoft/api-documenter": "^7.27.3",
|
|
44
45
|
"@miragejs/graphql": "^0.1.13",
|
|
45
|
-
"@rushstack/heft": "^
|
|
46
|
-
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
47
|
-
"@typescript-eslint/parser": "^7.18.0",
|
|
46
|
+
"@rushstack/heft": "^1.1.3",
|
|
48
47
|
"@vitejs/plugin-vue": "^6.0.1",
|
|
49
|
-
"
|
|
50
|
-
"eslint": "^
|
|
51
|
-
"eslint-
|
|
52
|
-
"
|
|
48
|
+
"eslint": "^9.38.0",
|
|
49
|
+
"eslint-config-prettier": "^10.1.8",
|
|
50
|
+
"eslint-plugin-vue": "^10.5.1",
|
|
51
|
+
"globals": "^16.4.0",
|
|
53
52
|
"miragejs": "^0.1.48",
|
|
54
|
-
"typescript": "^5.
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"vue
|
|
53
|
+
"typescript": "^5.9.3",
|
|
54
|
+
"typescript-eslint": "^8.46.2",
|
|
55
|
+
"vite": "^7.1.1",
|
|
56
|
+
"vue": "^3.5.22",
|
|
57
|
+
"vue-router": "^4.6.3",
|
|
58
58
|
"stonecrop-rig": "0.2.22"
|
|
59
59
|
},
|
|
60
60
|
"publishConfig": {
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"engines": {
|
|
64
|
-
"node": ">=
|
|
64
|
+
"node": ">=22.5.0"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"_phase:build": "heft build && vite build && rushx docs",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"build": "heft build && vite build && rushx docs",
|
|
70
70
|
"dev": "vite",
|
|
71
71
|
"docs": "cd ../common/autoinstallers/doc-tools && node generate-docs.mjs graphql_client",
|
|
72
|
-
"lint": "eslint .
|
|
72
|
+
"lint": "eslint .",
|
|
73
73
|
"preview": "vite preview"
|
|
74
74
|
}
|
|
75
75
|
}
|
package/src/index.ts
CHANGED
|
@@ -19,19 +19,19 @@ const metaParser = (obj: string): MetaParser => {
|
|
|
19
19
|
return JSON.parse(obj, (key, value) => {
|
|
20
20
|
if (typeof value === 'string') {
|
|
21
21
|
try {
|
|
22
|
-
return JSON.parse(value, (
|
|
22
|
+
return JSON.parse(value, (_key, value) => {
|
|
23
23
|
if (typeof value === 'string' && !isNaN(Number(value))) {
|
|
24
24
|
return new Decimal(value)
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
return value
|
|
28
28
|
})
|
|
29
|
-
} catch
|
|
29
|
+
} catch {
|
|
30
30
|
// if the value is not a stringified JSON, return as it is
|
|
31
31
|
return value
|
|
32
32
|
}
|
|
33
33
|
} else if (!isNaN(Number(value))) {
|
|
34
|
-
return new Decimal(value)
|
|
34
|
+
return new Decimal(value as string | number)
|
|
35
35
|
}
|
|
36
36
|
return value
|
|
37
37
|
})
|