@stryke/json 0.10.0 → 0.11.0
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 +15 -0
- package/dist/{code-frames-BMkA9i6j.d.mts → code-frames-CrTAYYSE.d.mts} +1 -1
- package/dist/{code-frames-BMkA9i6j.d.mts.map → code-frames-CrTAYYSE.d.mts.map} +1 -1
- package/dist/{code-frames-DISWdYL6.mjs → code-frames-DuBfTMu4.mjs} +1 -1
- package/dist/{code-frames-DISWdYL6.mjs.map → code-frames-DuBfTMu4.mjs.map} +1 -1
- package/dist/{find-reference-b7rRdLFx.d.mts → find-reference-B8xshNXL.d.mts} +1 -1
- package/dist/{find-reference-b7rRdLFx.d.mts.map → find-reference-B8xshNXL.d.mts.map} +1 -1
- package/dist/{find-reference-woYMiWzN.mjs → find-reference-DMSYEaaI.mjs} +2 -73
- package/dist/find-reference-DMSYEaaI.mjs.map +1 -0
- package/dist/{find-reference-BCg3dQx1.cjs → find-reference-De5vBQV2.cjs} +2 -73
- package/dist/index.cjs +16 -11
- package/dist/index.d.cts +4 -4
- package/dist/index.d.mts +12 -12
- package/dist/index.mjs +12 -12
- package/dist/is-set-object-BmHip9em.cjs +108 -0
- package/dist/is-set-object-C1Qnj1Q8.mjs +98 -0
- package/dist/is-set-object-C1Qnj1Q8.mjs.map +1 -0
- package/dist/{parse-wxSDzBPf.cjs → parse-ByDxRup5.cjs} +1 -1
- package/dist/{parse-ZRTh45ZI.d.mts → parse-Cj-YfhrI.d.mts} +1 -1
- package/dist/{parse-ZRTh45ZI.d.mts.map → parse-Cj-YfhrI.d.mts.map} +1 -1
- package/dist/{parse-obdkJfj5.mjs → parse-Dn43ZK9y.mjs} +2 -2
- package/dist/{parse-obdkJfj5.mjs.map → parse-Dn43ZK9y.mjs.map} +1 -1
- package/dist/{parse-error-C3Qmubee.mjs → parse-error-Af4zHUQ_.mjs} +2 -2
- package/dist/{parse-error-C3Qmubee.mjs.map → parse-error-Af4zHUQ_.mjs.map} +1 -1
- package/dist/{parse-error-DY_MelEh.d.mts → parse-error-DpEv3vo_.d.mts} +1 -1
- package/dist/parse-error-DpEv3vo_.d.mts.map +1 -0
- package/dist/{parse-error-Dzwg4sdE.cjs → parse-error-N7UE-HMh.cjs} +2 -2
- package/dist/{parse-DgYW5BBj.d.mts → parse-fXy5pbmE.d.mts} +1 -1
- package/dist/{parse-DgYW5BBj.d.mts.map → parse-fXy5pbmE.d.mts.map} +1 -1
- package/dist/{parse-Crgv3Nl1.mjs → parse-vw_qRD3F.mjs} +1 -1
- package/dist/{parse-Crgv3Nl1.mjs.map → parse-vw_qRD3F.mjs.map} +1 -1
- package/dist/pointer/find-reference.cjs +1 -1
- package/dist/pointer/find-reference.d.mts +1 -1
- package/dist/pointer/find-reference.mjs +1 -1
- package/dist/pointer/index.cjs +3 -3
- package/dist/pointer/index.d.mts +2 -2
- package/dist/pointer/index.mjs +3 -3
- package/dist/pointer/parse.cjs +1 -1
- package/dist/pointer/parse.d.mts +1 -1
- package/dist/pointer/parse.mjs +1 -1
- package/dist/schema-BO1HCrxv.d.cts +55 -0
- package/dist/schema-BO1HCrxv.d.cts.map +1 -0
- package/dist/schema-CmH1V_uI.d.mts +55 -0
- package/dist/schema-CmH1V_uI.d.mts.map +1 -0
- package/dist/schema-DGmzxHja.mjs +72 -0
- package/dist/schema-DGmzxHja.mjs.map +1 -0
- package/dist/schema-Dl018Aq4.cjs +106 -0
- package/dist/schema.cjs +7 -2
- package/dist/schema.d.cts +2 -2
- package/dist/schema.d.mts +3 -3
- package/dist/schema.mjs +2 -2
- package/dist/{storm-json-AaFeOao2.d.cts → storm-json-8F9CKpXu.d.mts} +2 -2
- package/dist/{storm-json-AaFeOao2.d.cts.map → storm-json-8F9CKpXu.d.mts.map} +1 -1
- package/dist/{storm-json-6WpS7qnH.cjs → storm-json-BD6WFbrI.cjs} +3 -3
- package/dist/{storm-json-BvRkzAlR.d.mts → storm-json-DvIEWMEH.d.cts} +2 -2
- package/dist/{storm-json-BvRkzAlR.d.mts.map → storm-json-DvIEWMEH.d.cts.map} +1 -1
- package/dist/{storm-json-Cy3PuAhj.mjs → storm-json-nkhJgTz4.mjs} +4 -4
- package/dist/{storm-json-Cy3PuAhj.mjs.map → storm-json-nkhJgTz4.mjs.map} +1 -1
- package/dist/storm-json.cjs +2 -2
- package/dist/storm-json.d.cts +1 -1
- package/dist/storm-json.d.mts +2 -2
- package/dist/storm-json.mjs +2 -2
- package/dist/{stringify-B6iAeg0u.d.mts → stringify-CFT1K1LE.d.mts} +1 -1
- package/dist/stringify-CFT1K1LE.d.mts.map +1 -0
- package/dist/{stringify-D5baUfEe.mjs → stringify-CYHjAvWm.mjs} +1 -1
- package/dist/{stringify-D5baUfEe.mjs.map → stringify-CYHjAvWm.mjs.map} +1 -1
- package/dist/{strip-comments-Bg3R_Y4S.d.mts → strip-comments-BA8MS_Fs.d.mts} +1 -1
- package/dist/{strip-comments-Bg3R_Y4S.d.mts.map → strip-comments-BA8MS_Fs.d.mts.map} +1 -1
- package/dist/{strip-comments-CMaAgTqz.mjs → strip-comments-Dq00N_Sg.mjs} +1 -1
- package/dist/{strip-comments-CMaAgTqz.mjs.map → strip-comments-Dq00N_Sg.mjs.map} +1 -1
- package/dist/{types-C_KlcCNw.d.mts → types-Bn8rC098.d.cts} +5 -5
- package/dist/{types-BUeTTE_U.d.cts.map → types-Bn8rC098.d.cts.map} +1 -1
- package/dist/{types-BUeTTE_U.d.cts → types-CPQlxauZ.d.mts} +5 -5
- package/dist/{types-C_KlcCNw.d.mts.map → types-CPQlxauZ.d.mts.map} +1 -1
- package/dist/types.d.cts +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/utils/code-frames.cjs +1 -1
- package/dist/utils/code-frames.d.mts +1 -1
- package/dist/utils/code-frames.mjs +1 -1
- package/dist/utils/index.cjs +6 -6
- package/dist/utils/index.d.mts +6 -6
- package/dist/utils/index.mjs +6 -6
- package/dist/utils/parse-error.cjs +1 -1
- package/dist/utils/parse-error.d.mts +1 -1
- package/dist/utils/parse-error.mjs +1 -1
- package/dist/utils/parse.cjs +1 -1
- package/dist/utils/parse.d.mts +1 -1
- package/dist/utils/parse.mjs +1 -1
- package/dist/utils/stringify.cjs +1 -1
- package/dist/utils/stringify.d.mts +1 -1
- package/dist/utils/stringify.mjs +1 -1
- package/dist/utils/strip-comments.cjs +1 -1
- package/dist/utils/strip-comments.d.mts +1 -1
- package/dist/utils/strip-comments.mjs +1 -1
- package/package.json +7 -3
- package/dist/find-reference-woYMiWzN.mjs.map +0 -1
- package/dist/parse-error-DY_MelEh.d.mts.map +0 -1
- package/dist/schema-B1RVJHzJ.d.cts +0 -7
- package/dist/schema-B1RVJHzJ.d.cts.map +0 -1
- package/dist/schema-CfhPLy30.mjs +0 -9
- package/dist/schema-CfhPLy30.mjs.map +0 -1
- package/dist/schema-D5Aqvh2i.cjs +0 -14
- package/dist/schema-ai_NU-JC.d.mts +0 -7
- package/dist/schema-ai_NU-JC.d.mts.map +0 -1
- package/dist/stringify-B6iAeg0u.d.mts.map +0 -1
- /package/dist/{code-frames-Cv8r5tSN.cjs → code-frames-BmUvlJ0w.cjs} +0 -0
- /package/dist/{index-DwO9IdNa.d.mts → index-CCt0lwyI.d.mts} +0 -0
- /package/dist/{index-VWno75SQ.d.mts → index-DvuJXuAN.d.mts} +0 -0
- /package/dist/{parse-KiRakdIR.cjs → parse-Bp6kkcQ4.cjs} +0 -0
- /package/dist/{pointer-Cc7IR0Bj.cjs → pointer-B3W_Sme3.cjs} +0 -0
- /package/dist/{pointer-CiTXvh1G.mjs → pointer-Dn__XOdY.mjs} +0 -0
- /package/dist/{stringify-DEw3S4_Z.cjs → stringify-BehjrfhS.cjs} +0 -0
- /package/dist/{strip-comments-CtFoX0xG.cjs → strip-comments-CmEG_smS.cjs} +0 -0
- /package/dist/{utils-CVcIdLuL.mjs → utils-jN2UkvqB.cjs} +0 -0
- /package/dist/{utils-Cz3OCwUK.cjs → utils-mEkKIcgl.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_strip_comments = require('./strip-comments-
|
|
1
|
+
const require_strip_comments = require('./strip-comments-CmEG_smS.cjs');
|
|
2
2
|
|
|
3
3
|
//#region src/utils/parse.ts
|
|
4
4
|
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
@@ -48,4 +48,4 @@ declare function isValidIndex(index: string | number): boolean;
|
|
|
48
48
|
declare const isInteger: (str: string) => boolean;
|
|
49
49
|
//#endregion
|
|
50
50
|
export { isValidIndex as a, unescapePointerSegment as c, isRoot as i, formatJsonPointer as n, parent as o, isInteger as r, parseJsonPointer as s, escapePointerSegment as t };
|
|
51
|
-
//# sourceMappingURL=parse-
|
|
51
|
+
//# sourceMappingURL=parse-Cj-YfhrI.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-Cj-YfhrI.d.mts","names":[],"sources":["../../types/src/json.ts","../src/pointer/parse.ts"],"sourcesContent":[],"mappings":";;;;;;;;KA6CY,eAAA;;;AAAZ;;;;ACZA;AAcA;AAYgB,iBA1BA,oBAAA,CA0BmC,OAAe,EAAA,MAAA,CAAA,EAAA,MAAA;AAalE;AAYA;AAUA;AAWA;AAUA;;iBApEgB,sBAAA;;;;;iBAYA,gBAAA,mBAAmC;;;;;iBAanC,iBAAA,OAAwB;;;;cAY3B,iCAAkC;;;;iBAU/B,MAAA,OAAa,kBAAkB;;;;iBAW/B,YAAA;cAUH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as stripComments } from "./strip-comments-
|
|
1
|
+
import { t as stripComments } from "./strip-comments-Dq00N_Sg.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/parse.ts
|
|
4
4
|
const suspectProtoRx = /"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/;
|
|
@@ -49,4 +49,4 @@ function safeParse(value, options = {}) {
|
|
|
49
49
|
|
|
50
50
|
//#endregion
|
|
51
51
|
export { safeParse as n, parse as t };
|
|
52
|
-
//# sourceMappingURL=parse-
|
|
52
|
+
//# sourceMappingURL=parse-Dn43ZK9y.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-Dn43ZK9y.mjs","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { stripComments } from \"./strip-comments\";\n\n// https://github.com/fastify/secure-json-parse\n// https://github.com/hapijs/bourne\nconst suspectProtoRx =\n /\"(?:_|\\\\u0{2}5[Ff]){2}(?:p|\\\\u0{2}70)(?:r|\\\\u0{2}72)(?:o|\\\\u0{2}6[Ff])(?:t|\\\\u0{2}74)(?:o|\\\\u0{2}6[Ff])(?:_|\\\\u0{2}5[Ff]){2}\"\\s*:/;\nconst suspectConstructorRx =\n /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\n\nconst JsonSigRx = /^\\s*[\"[{]|^\\s*-?\\d{1,16}(?:\\.\\d{1,17})?(?:E[+-]?\\d+)?\\s*$/i;\n\nfunction jsonParseTransform(key: string, value: any): any {\n if (\n key === \"__proto__\" ||\n (key === \"constructor\" &&\n value &&\n typeof value === \"object\" &&\n \"prototype\" in value)\n ) {\n // eslint-disable-next-line no-console\n console.warn(`Dropping \"${key}\" key to prevent prototype pollution.`);\n return;\n }\n return value;\n}\n\nexport interface Options {\n strict?: boolean;\n}\n\nexport function parse<T = unknown>(value: any, options: Options = {}): T {\n if (typeof value !== \"string\") {\n return value;\n }\n\n let stripped = stripComments(value);\n\n if (\n stripped[0] === '\"' &&\n stripped[stripped.length - 1] === '\"' &&\n !stripped.includes(\"\\\\\")\n ) {\n return stripped.slice(1, -1) as T;\n }\n\n stripped = stripped.trim();\n\n if (stripped.length <= 9) {\n switch (stripped.toLowerCase()) {\n case \"true\": {\n return true as T;\n }\n case \"false\": {\n return false as T;\n }\n case \"undefined\": {\n return undefined as T;\n }\n case \"null\": {\n return null as T;\n }\n case \"nan\": {\n return Number.NaN as T;\n }\n case \"infinity\": {\n return Number.POSITIVE_INFINITY as T;\n }\n case \"-infinity\": {\n return Number.NEGATIVE_INFINITY as T;\n }\n }\n }\n\n if (!JsonSigRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Invalid JSON\");\n }\n return stripped as T;\n }\n\n try {\n if (suspectProtoRx.test(stripped) || suspectConstructorRx.test(stripped)) {\n if (options.strict) {\n throw new Error(\"Possible prototype pollution\");\n }\n return JSON.parse(stripped, jsonParseTransform);\n }\n\n return JSON.parse(stripped);\n } catch (error) {\n if (options.strict) {\n throw error;\n }\n return value as T;\n }\n}\n\nexport function safeParse<T = unknown>(value: any, options: Options = {}): T {\n return parse<T>(value, { ...options, strict: true });\n}\n"],"mappings":";;;AAsBA,MAAM,iBACJ;AACF,MAAM,uBACJ;AAEF,MAAM,YAAY;AAElB,SAAS,mBAAmB,KAAa,OAAiB;AACxD,KACE,QAAQ,eACP,QAAQ,iBACP,SACA,OAAO,UAAU,YACjB,eAAe,OACjB;AAEA,UAAQ,KAAK,aAAa,IAAI,uCAAuC;AACrE;;AAEF,QAAO;;AAOT,SAAgB,MAAmB,OAAY,UAAmB,EAAE,EAAK;AACvE,KAAI,OAAO,UAAU,SACnB,QAAO;CAGT,IAAI,WAAW,cAAc,MAAM;AAEnC,KACE,SAAS,OAAO,QAChB,SAAS,SAAS,SAAS,OAAO,QAClC,CAAC,SAAS,SAAS,KAAK,CAExB,QAAO,SAAS,MAAM,GAAG,GAAG;AAG9B,YAAW,SAAS,MAAM;AAE1B,KAAI,SAAS,UAAU,EACrB,SAAQ,SAAS,aAAa,EAA9B;EACE,KAAK,OACH,QAAO;EAET,KAAK,QACH,QAAO;EAET,KAAK,YACH;EAEF,KAAK,OACH,QAAO;EAET,KAAK,MACH,QAAO;EAET,KAAK,WACH,QAAO,OAAO;EAEhB,KAAK,YACH,QAAO,OAAO;;AAKpB,KAAI,CAAC,UAAU,KAAK,SAAS,EAAE;AAC7B,MAAI,QAAQ,OACV,OAAM,IAAI,MAAM,eAAe;AAEjC,SAAO;;AAGT,KAAI;AACF,MAAI,eAAe,KAAK,SAAS,IAAI,qBAAqB,KAAK,SAAS,EAAE;AACxE,OAAI,QAAQ,OACV,OAAM,IAAI,MAAM,+BAA+B;AAEjD,UAAO,KAAK,MAAM,UAAU,mBAAmB;;AAGjD,SAAO,KAAK,MAAM,SAAS;UACpB,OAAO;AACd,MAAI,QAAQ,OACV,OAAM;AAER,SAAO;;;AAIX,SAAgB,UAAuB,OAAY,UAAmB,EAAE,EAAK;AAC3E,QAAO,MAAS,OAAO;EAAE,GAAG;EAAS,QAAQ;EAAM,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as codeFrameColumns } from "./code-frames-
|
|
1
|
+
import { t as codeFrameColumns } from "./code-frames-DuBfTMu4.mjs";
|
|
2
2
|
import { printParseErrorCode } from "jsonc-parser";
|
|
3
3
|
import { LinesAndColumns } from "lines-and-columns";
|
|
4
4
|
|
|
@@ -31,4 +31,4 @@ function formatParseError(input, parseError) {
|
|
|
31
31
|
|
|
32
32
|
//#endregion
|
|
33
33
|
export { formatParseError as t };
|
|
34
|
-
//# sourceMappingURL=parse-error-
|
|
34
|
+
//# sourceMappingURL=parse-error-Af4zHUQ_.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-error-
|
|
1
|
+
{"version":3,"file":"parse-error-Af4zHUQ_.mjs","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { ParseError } from \"jsonc-parser\";\nimport { printParseErrorCode } from \"jsonc-parser\";\nimport { LinesAndColumns } from \"lines-and-columns\";\nimport { codeFrameColumns } from \"./code-frames\";\n\n/**\n * Nicely formats a JSON error with context\n *\n * @param input - JSON content as string\n * @param parseError - jsonc ParseError\n * @returns Formatted error message with context\n */\nexport function formatParseError(input: string, parseError: ParseError) {\n const { error, offset, length } = parseError;\n const result = new LinesAndColumns(input).locationForIndex(offset);\n let line = result?.line ?? 0;\n let column = result?.column ?? 0;\n\n line++;\n column++;\n\n return `${printParseErrorCode(error)} in JSON at ${line}:${column}\\n${codeFrameColumns(\n input,\n {\n start: {\n line,\n column\n },\n end: {\n line,\n column: column + length\n }\n }\n )}\\n`;\n}\n"],"mappings":";;;;;;;;;;;;AA8BA,SAAgB,iBAAiB,OAAe,YAAwB;CACtE,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,SAAS,IAAI,gBAAgB,MAAM,CAAC,iBAAiB,OAAO;CAClE,IAAI,OAAO,QAAQ,QAAQ;CAC3B,IAAI,SAAS,QAAQ,UAAU;AAE/B;AACA;AAEA,QAAO,GAAG,oBAAoB,MAAM,CAAC,cAAc,KAAK,GAAG,OAAO,IAAI,iBACpE,OACA;EACE,OAAO;GACL;GACA;GACD;EACD,KAAK;GACH;GACA,QAAQ,SAAS;GAClB;EACF,CACF,CAAC"}
|
|
@@ -12,4 +12,4 @@ import { ParseError } from "jsonc-parser";
|
|
|
12
12
|
declare function formatParseError(input: string, parseError: ParseError): string;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { formatParseError as t };
|
|
15
|
-
//# sourceMappingURL=parse-error-
|
|
15
|
+
//# sourceMappingURL=parse-error-DpEv3vo_.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-error-DpEv3vo_.d.mts","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;iBAAgB,gBAAA,4BAA4C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const require_storm_json = require('./storm-json-
|
|
2
|
-
const require_code_frames = require('./code-frames-
|
|
1
|
+
const require_storm_json = require('./storm-json-BD6WFbrI.cjs');
|
|
2
|
+
const require_code_frames = require('./code-frames-BmUvlJ0w.cjs');
|
|
3
3
|
let jsonc_parser = require("jsonc-parser");
|
|
4
4
|
let lines_and_columns = require("lines-and-columns");
|
|
5
5
|
|
|
@@ -6,4 +6,4 @@ declare function parse<T = unknown>(value: any, options?: Options): T;
|
|
|
6
6
|
declare function safeParse<T = unknown>(value: any, options?: Options): T;
|
|
7
7
|
//#endregion
|
|
8
8
|
export { parse as n, safeParse as r, Options as t };
|
|
9
|
-
//# sourceMappingURL=parse-
|
|
9
|
+
//# sourceMappingURL=parse-fXy5pbmE.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-fXy5pbmE.d.mts","names":[],"sources":["../src/utils/parse.ts"],"sourcesContent":[],"mappings":";UA4CiB,OAAA;EAAA,MAAA,CAAA,EAAA,OAAO;AAIxB;AAmEgB,iBAnEA,KAmE4C,CAAA,IAAA,OAAgB,CAAA,CAAA,KAAA,EAAA,GAAA,EAAA,OAAA,CAAA,EAnEpB,OAmEoB,CAAA,EAnEL,CAmEK;iBAA5D,6CAA4C,UAAe"}
|
|
@@ -78,4 +78,4 @@ const isInteger = (str) => {
|
|
|
78
78
|
|
|
79
79
|
//#endregion
|
|
80
80
|
export { isValidIndex as a, unescapePointerSegment as c, isRoot as i, formatJsonPointer as n, parent as o, isInteger as r, parseJsonPointer as s, escapePointerSegment as t };
|
|
81
|
-
//# sourceMappingURL=parse-
|
|
81
|
+
//# sourceMappingURL=parse-vw_qRD3F.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-vw_qRD3F.mjs","names":["charCode: any"],"sources":["../src/pointer/parse.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { isNumber } from \"@stryke/type-checks/is-number\";\nimport { isString } from \"@stryke/type-checks/is-string\";\nimport type { JsonPointerPath } from \"@stryke/types/json\";\n\nconst TILDE_ONE = /~1/g;\nconst TILDE_ZERO = /~0/g;\nconst TILDE = /~/g;\nconst FORWARD_SLASH = /\\//g;\n\n/**\n * Escapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Escaped JSON pointer path segment.\n */\nexport function escapePointerSegment(segment: string): string {\n if (!segment.includes(\"/\") && !segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE, \"~0\").replace(FORWARD_SLASH, \"~1\");\n}\n\n/**\n * Unescapes a JSON pointer path segment.\n *\n * @param segment - JSON pointer path segment.\n * @returns Unescaped JSON pointer path segment.\n */\nexport function unescapePointerSegment(segment: string): string {\n if (!segment.includes(\"~\")) {\n return segment;\n }\n\n return segment.replace(TILDE_ONE, \"/\").replace(TILDE_ZERO, \"~\");\n}\n\n/**\n * Convert JSON pointer like \"/foo/bar\" to array like [\"\", \"foo\", \"bar\"], while\n * also un-escaping reserved characters.\n */\nexport function parseJsonPointer(pointer: string): JsonPointerPath {\n if (!pointer) return [];\n // TODO: Performance of this line can be improved: (1) don't use .split(); (2) don't use .map().\n return pointer\n .slice(1)\n .split(\"/\")\n .map(segment => unescapePointerSegment(segment));\n}\n\n/**\n * Escape and format a path array like [\"\", \"foo\", \"bar\"] to JSON pointer\n * like \"/foo/bar\".\n */\nexport function formatJsonPointer(path: JsonPointerPath): string {\n // eslint-disable-next-line ts/no-use-before-define\n if (isRoot(path)) {\n return \"\";\n }\n\n return `/${path.map(segment => escapePointerSegment(String(segment))).join(\"/\")}`;\n}\n\n/**\n * Returns true if JSON Pointer points to root value, false otherwise.\n */\nexport const isRoot = (path: string | number | JsonPointerPath): boolean =>\n isString(path)\n ? path === \"\"\n : isNumber(path)\n ? path === 0\n : Array.isArray(path) && path.length === 0;\n\n/**\n * Returns parent path, e.g. for ['foo', 'bar', 'baz'] returns ['foo', 'bar'].\n */\nexport function parent(path: JsonPointerPath): JsonPointerPath {\n if (path.length === 0) {\n throw new Error(\"NO_PARENT\");\n }\n\n return path.slice(0, -1);\n}\n\n/**\n * Check if path component can be a valid array index.\n */\nexport function isValidIndex(index: string | number): boolean {\n if (isNumber(index)) {\n return true;\n }\n\n const n = Number.parseInt(index, 10);\n\n return String(n) === index && n >= 0;\n}\n\nexport const isInteger = (str: string): boolean => {\n const len = str.length;\n let i = 0;\n let charCode: any;\n while (i < len) {\n charCode = str.codePointAt(i);\n if (charCode >= 48 && charCode <= 57) {\n i++;\n continue;\n }\n return false;\n }\n return true;\n};\n"],"mappings":";;;;AAsBA,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,QAAQ;AACd,MAAM,gBAAgB;;;;;;;AAQtB,SAAgB,qBAAqB,SAAyB;AAC5D,KAAI,CAAC,QAAQ,SAAS,IAAI,IAAI,CAAC,QAAQ,SAAS,IAAI,CAClD,QAAO;AAGT,QAAO,QAAQ,QAAQ,OAAO,KAAK,CAAC,QAAQ,eAAe,KAAK;;;;;;;;AASlE,SAAgB,uBAAuB,SAAyB;AAC9D,KAAI,CAAC,QAAQ,SAAS,IAAI,CACxB,QAAO;AAGT,QAAO,QAAQ,QAAQ,WAAW,IAAI,CAAC,QAAQ,YAAY,IAAI;;;;;;AAOjE,SAAgB,iBAAiB,SAAkC;AACjE,KAAI,CAAC,QAAS,QAAO,EAAE;AAEvB,QAAO,QACJ,MAAM,EAAE,CACR,MAAM,IAAI,CACV,KAAI,YAAW,uBAAuB,QAAQ,CAAC;;;;;;AAOpD,SAAgB,kBAAkB,MAA+B;AAE/D,KAAI,OAAO,KAAK,CACd,QAAO;AAGT,QAAO,IAAI,KAAK,KAAI,YAAW,qBAAqB,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI;;;;;AAMjF,MAAa,UAAU,SACrB,SAAS,KAAK,GACV,SAAS,KACT,SAAS,KAAK,GACZ,SAAS,IACT,MAAM,QAAQ,KAAK,IAAI,KAAK,WAAW;;;;AAK/C,SAAgB,OAAO,MAAwC;AAC7D,KAAI,KAAK,WAAW,EAClB,OAAM,IAAI,MAAM,YAAY;AAG9B,QAAO,KAAK,MAAM,GAAG,GAAG;;;;;AAM1B,SAAgB,aAAa,OAAiC;AAC5D,KAAI,SAAS,MAAM,CACjB,QAAO;CAGT,MAAM,IAAI,OAAO,SAAS,OAAO,GAAG;AAEpC,QAAO,OAAO,EAAE,KAAK,SAAS,KAAK;;AAGrC,MAAa,aAAa,QAAyB;CACjD,MAAM,MAAM,IAAI;CAChB,IAAI,IAAI;CACR,IAAIA;AACJ,QAAO,IAAI,KAAK;AACd,aAAW,IAAI,YAAY,EAAE;AAC7B,MAAI,YAAY,MAAM,YAAY,IAAI;AACpC;AACA;;AAEF,SAAO;;AAET,QAAO"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-
|
|
1
|
+
import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-B8xshNXL.mjs";
|
|
2
2
|
export { ArrayReference, ObjectReference, Reference, find, isArrayEnd, isArrayReference, isObjectReference };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-
|
|
1
|
+
import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-DMSYEaaI.mjs";
|
|
2
2
|
|
|
3
3
|
export { find, isArrayEnd, isArrayReference, isObjectReference };
|
package/dist/pointer/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_find_reference = require('../find-reference-
|
|
2
|
-
const require_parse = require('../parse-
|
|
3
|
-
require('../pointer-
|
|
1
|
+
const require_find_reference = require('../find-reference-De5vBQV2.cjs');
|
|
2
|
+
const require_parse = require('../parse-Bp6kkcQ4.cjs');
|
|
3
|
+
require('../pointer-B3W_Sme3.cjs');
|
|
4
4
|
|
|
5
5
|
exports.escapePointerSegment = require_parse.escapePointerSegment;
|
|
6
6
|
exports.find = require_find_reference.find;
|
package/dist/pointer/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-
|
|
2
|
-
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-
|
|
1
|
+
import { a as isArrayEnd, i as find, n as ObjectReference, o as isArrayReference, r as Reference, s as isObjectReference, t as ArrayReference } from "../find-reference-B8xshNXL.mjs";
|
|
2
|
+
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-Cj-YfhrI.mjs";
|
|
3
3
|
export { ArrayReference, ObjectReference, Reference, escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
package/dist/pointer/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-
|
|
2
|
-
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-
|
|
3
|
-
import "../pointer-
|
|
1
|
+
import { i as isObjectReference, n as isArrayEnd, r as isArrayReference, t as find } from "../find-reference-DMSYEaaI.mjs";
|
|
2
|
+
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-vw_qRD3F.mjs";
|
|
3
|
+
import "../pointer-Dn__XOdY.mjs";
|
|
4
4
|
|
|
5
5
|
export { escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
package/dist/pointer/parse.cjs
CHANGED
package/dist/pointer/parse.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-
|
|
1
|
+
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-Cj-YfhrI.mjs";
|
|
2
2
|
export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
package/dist/pointer/parse.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-
|
|
1
|
+
import { a as isValidIndex, c as unescapePointerSegment, i as isRoot, n as formatJsonPointer, o as parent, r as isInteger, s as parseJsonPointer, t as escapePointerSegment } from "../parse-vw_qRD3F.mjs";
|
|
2
2
|
|
|
3
3
|
export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { A as JsonSchema7PrimitiveLiteralType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-Bn8rC098.cjs";
|
|
2
|
+
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/schema.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Type guard for {@link JsonSchema7AllOfType}
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema to check
|
|
10
|
+
* @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
|
|
11
|
+
*/
|
|
12
|
+
declare function isJsonSchema7AllOfType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7AllOfType;
|
|
13
|
+
/**
|
|
14
|
+
* Type guard for {@link JsonSchema7ObjectType}
|
|
15
|
+
*
|
|
16
|
+
* @param schema - The schema to check
|
|
17
|
+
* @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
|
|
18
|
+
*/
|
|
19
|
+
declare function isJsonSchema7ObjectType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7ObjectType;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard for {@link JsonSchema7ArrayType}
|
|
22
|
+
*
|
|
23
|
+
* @param schema - The schema to check
|
|
24
|
+
* @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
declare function isJsonSchema7ArrayType(schema: JsonSchema7Type): schema is JsonSchema7ArrayType;
|
|
27
|
+
/**
|
|
28
|
+
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
29
|
+
*
|
|
30
|
+
* @param schema - The schema to check
|
|
31
|
+
* @returns True if the schema is a {@link JsonSchema7PrimitiveLiteralType}, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
declare function isJsonSchema7PrimitiveLiteralType(schema: JsonSchema7Type): schema is JsonSchema7PrimitiveLiteralType;
|
|
34
|
+
/**
|
|
35
|
+
* Type guard for {@link JsonSchema7LiteralType}
|
|
36
|
+
*
|
|
37
|
+
* @param schema - The schema to check
|
|
38
|
+
* @returns True if the schema is a {@link JsonSchema7LiteralType}, false otherwise
|
|
39
|
+
*/
|
|
40
|
+
declare function isJsonSchema7LiteralType(schema: JsonSchema7Type): schema is JsonSchema7LiteralType;
|
|
41
|
+
/**
|
|
42
|
+
* Type guard to check if a value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* This function checks if the value has the structure of a Standard JSON Schema, which includes a `~standard` property with a `jsonSchema` object that has `input` and `output` functions.
|
|
46
|
+
*
|
|
47
|
+
* @see https://standardschema.dev/json-schema
|
|
48
|
+
*
|
|
49
|
+
* @param value - The value to check.
|
|
50
|
+
* @returns True if the value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}, false otherwise.
|
|
51
|
+
*/
|
|
52
|
+
declare function isStandardJsonSchema<Input = unknown, Output = Input>(value: any): value is StandardJSONSchemaV1<Input, Output>;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { isJsonSchema7PrimitiveLiteralType as a, isJsonSchema7ObjectType as i, isJsonSchema7ArrayType as n, isStandardJsonSchema as o, isJsonSchema7LiteralType as r, isJsonSchema7AllOfType as t };
|
|
55
|
+
//# sourceMappingURL=schema-BO1HCrxv.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-BO1HCrxv.d.cts","names":[],"sources":["../src/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqCA;;;;AAEiC,iBAFjB,sBAAA,CAEiB,MAAA,EADvB,eACuB,GADL,qBACK,CAAA,EAAA,MAAA,IAApB,oBAAoB;AAcjC;;;;;AAgBA;AAYgB,iBA5BA,uBAAA,CA4BiC,MACvC,EA5BA,eA6BG,GA7Be,qBA6Bf,CAAA,EAAA,MAA+B,IA5B/B,qBA4B+B;AAsB5C;AAyBA;;;;;AAEgC,iBA/DhB,sBAAA,CA+DgB,MAAA,EA9DtB,eA8DsB,CAAA,EAAA,MAAA,IA7DnB,oBA6DmB;;;;;;;iBAnDhB,iCAAA,SACN,4BACG;;;;;;;iBAsBG,wBAAA,SACN,4BACG;;;;;;;;;;;;iBAuBG,+CAA+C,6BAEnD,qBAAqB,OAAO"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { A as JsonSchema7PrimitiveLiteralType, I as JsonSchema7StringType, O as JsonSchema7ObjectType, R as JsonSchema7Type, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-CPQlxauZ.mjs";
|
|
2
|
+
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
|
+
|
|
4
|
+
//#region src/schema.d.ts
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Type guard for {@link JsonSchema7AllOfType}
|
|
8
|
+
*
|
|
9
|
+
* @param schema - The schema to check
|
|
10
|
+
* @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
|
|
11
|
+
*/
|
|
12
|
+
declare function isJsonSchema7AllOfType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7AllOfType;
|
|
13
|
+
/**
|
|
14
|
+
* Type guard for {@link JsonSchema7ObjectType}
|
|
15
|
+
*
|
|
16
|
+
* @param schema - The schema to check
|
|
17
|
+
* @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
|
|
18
|
+
*/
|
|
19
|
+
declare function isJsonSchema7ObjectType(schema: JsonSchema7Type | JsonSchema7StringType): schema is JsonSchema7ObjectType;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard for {@link JsonSchema7ArrayType}
|
|
22
|
+
*
|
|
23
|
+
* @param schema - The schema to check
|
|
24
|
+
* @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
declare function isJsonSchema7ArrayType(schema: JsonSchema7Type): schema is JsonSchema7ArrayType;
|
|
27
|
+
/**
|
|
28
|
+
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
29
|
+
*
|
|
30
|
+
* @param schema - The schema to check
|
|
31
|
+
* @returns True if the schema is a {@link JsonSchema7PrimitiveLiteralType}, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
declare function isJsonSchema7PrimitiveLiteralType(schema: JsonSchema7Type): schema is JsonSchema7PrimitiveLiteralType;
|
|
34
|
+
/**
|
|
35
|
+
* Type guard for {@link JsonSchema7LiteralType}
|
|
36
|
+
*
|
|
37
|
+
* @param schema - The schema to check
|
|
38
|
+
* @returns True if the schema is a {@link JsonSchema7LiteralType}, false otherwise
|
|
39
|
+
*/
|
|
40
|
+
declare function isJsonSchema7LiteralType(schema: JsonSchema7Type): schema is JsonSchema7LiteralType;
|
|
41
|
+
/**
|
|
42
|
+
* Type guard to check if a value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}.
|
|
43
|
+
*
|
|
44
|
+
* @remarks
|
|
45
|
+
* This function checks if the value has the structure of a Standard JSON Schema, which includes a `~standard` property with a `jsonSchema` object that has `input` and `output` functions.
|
|
46
|
+
*
|
|
47
|
+
* @see https://standardschema.dev/json-schema
|
|
48
|
+
*
|
|
49
|
+
* @param value - The value to check.
|
|
50
|
+
* @returns True if the value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}, false otherwise.
|
|
51
|
+
*/
|
|
52
|
+
declare function isStandardJsonSchema<Input = unknown, Output = Input>(value: any): value is StandardJSONSchemaV1<Input, Output>;
|
|
53
|
+
//#endregion
|
|
54
|
+
export { isJsonSchema7PrimitiveLiteralType as a, isJsonSchema7ObjectType as i, isJsonSchema7ArrayType as n, isStandardJsonSchema as o, isJsonSchema7LiteralType as r, isJsonSchema7AllOfType as t };
|
|
55
|
+
//# sourceMappingURL=schema-CmH1V_uI.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-CmH1V_uI.d.mts","names":[],"sources":["../src/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;AAqCA;;;;AAEiC,iBAFjB,sBAAA,CAEiB,MAAA,EADvB,eACuB,GADL,qBACK,CAAA,EAAA,MAAA,IAApB,oBAAoB;AAcjC;;;;;AAgBA;AAYgB,iBA5BA,uBAAA,CA4BiC,MACvC,EA5BA,eA6BG,GA7Be,qBA6Bf,CAAA,EAAA,MAA+B,IA5B/B,qBA4B+B;AAsB5C;AAyBA;;;;;AAEgC,iBA/DhB,sBAAA,CA+DgB,MAAA,EA9DtB,eA8DsB,CAAA,EAAA,MAAA,IA7DnB,oBA6DmB;;;;;;;iBAnDhB,iCAAA,SACN,4BACG;;;;;;;iBAsBG,wBAAA,SACN,4BACG;;;;;;;;;;;;iBAuBG,+CAA+C,6BAEnD,qBAAqB,OAAO"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { n as isFunction, t as isSetObject } from "./is-set-object-C1Qnj1Q8.mjs";
|
|
2
|
+
|
|
3
|
+
//#region src/schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Type guard for {@link JsonSchema7AllOfType}
|
|
6
|
+
*
|
|
7
|
+
* @param schema - The schema to check
|
|
8
|
+
* @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
function isJsonSchema7AllOfType(schema) {
|
|
11
|
+
if ("type" in schema && schema.type === "string") return false;
|
|
12
|
+
return "allOf" in schema;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type guard for {@link JsonSchema7ObjectType}
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema to check
|
|
18
|
+
* @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
|
|
19
|
+
*/
|
|
20
|
+
function isJsonSchema7ObjectType(schema) {
|
|
21
|
+
if ("type" in schema && schema.type === "object") return false;
|
|
22
|
+
return "properties" in schema;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type guard for {@link JsonSchema7ArrayType}
|
|
26
|
+
*
|
|
27
|
+
* @param schema - The schema to check
|
|
28
|
+
* @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise
|
|
29
|
+
*/
|
|
30
|
+
function isJsonSchema7ArrayType(schema) {
|
|
31
|
+
return "type" in schema && schema.type === "array" && "items" in schema;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
35
|
+
*
|
|
36
|
+
* @param schema - The schema to check
|
|
37
|
+
* @returns True if the schema is a {@link JsonSchema7PrimitiveLiteralType}, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
function isJsonSchema7PrimitiveLiteralType(schema) {
|
|
40
|
+
if (!("type" in schema)) return false;
|
|
41
|
+
const { type } = schema;
|
|
42
|
+
return (type === "string" || type === "number" || type === "integer" || type === "boolean") && "const" in schema;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Type guard for {@link JsonSchema7LiteralType}
|
|
46
|
+
*
|
|
47
|
+
* @param schema - The schema to check
|
|
48
|
+
* @returns True if the schema is a {@link JsonSchema7LiteralType}, false otherwise
|
|
49
|
+
*/
|
|
50
|
+
function isJsonSchema7LiteralType(schema) {
|
|
51
|
+
if (isJsonSchema7PrimitiveLiteralType(schema)) return true;
|
|
52
|
+
if (!("type" in schema)) return false;
|
|
53
|
+
return schema.type === "object" || schema.type === "array";
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Type guard to check if a value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This function checks if the value has the structure of a Standard JSON Schema, which includes a `~standard` property with a `jsonSchema` object that has `input` and `output` functions.
|
|
60
|
+
*
|
|
61
|
+
* @see https://standardschema.dev/json-schema
|
|
62
|
+
*
|
|
63
|
+
* @param value - The value to check.
|
|
64
|
+
* @returns True if the value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}, false otherwise.
|
|
65
|
+
*/
|
|
66
|
+
function isStandardJsonSchema(value) {
|
|
67
|
+
return isSetObject(value) && "~standard" in value && isSetObject(value["~standard"]) && "jsonSchema" in value["~standard"] && isSetObject(value["~standard"].jsonSchema) && "input" in value["~standard"].jsonSchema && isFunction(value["~standard"].jsonSchema.input) && "output" in value["~standard"].jsonSchema && isFunction(value["~standard"].jsonSchema.output);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
export { isJsonSchema7PrimitiveLiteralType as a, isJsonSchema7ObjectType as i, isJsonSchema7ArrayType as n, isStandardJsonSchema as o, isJsonSchema7LiteralType as r, isJsonSchema7AllOfType as t };
|
|
72
|
+
//# sourceMappingURL=schema-DGmzxHja.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-DGmzxHja.mjs","names":[],"sources":["../src/schema.ts"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Stryke\n\n This code was released as part of the Stryke project. Stryke\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/stryke.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/stryke\n Documentation: https://docs.stormsoftware.com/projects/stryke\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport type { StandardJSONSchemaV1 } from \"@standard-schema/spec\";\nimport { isFunction } from \"@stryke/type-checks/is-function\";\nimport { isSetObject } from \"@stryke/type-checks/is-set-object\";\nimport type {\n JsonSchema7AllOfType,\n JsonSchema7ArrayType,\n JsonSchema7LiteralType,\n JsonSchema7ObjectType,\n JsonSchema7PrimitiveLiteralType,\n JsonSchema7StringType,\n JsonSchema7Type\n} from \"./types\";\n\n/**\n * Type guard for {@link JsonSchema7AllOfType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise\n */\nexport function isJsonSchema7AllOfType(\n schema: JsonSchema7Type | JsonSchema7StringType\n): schema is JsonSchema7AllOfType {\n if (\"type\" in schema && schema.type === \"string\") {\n return false;\n }\n\n return \"allOf\" in schema;\n}\n\n/**\n * Type guard for {@link JsonSchema7ObjectType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise\n */\nexport function isJsonSchema7ObjectType(\n schema: JsonSchema7Type | JsonSchema7StringType\n): schema is JsonSchema7ObjectType {\n if (\"type\" in schema && schema.type === \"object\") {\n return false;\n }\n\n return \"properties\" in schema;\n}\n\n/**\n * Type guard for {@link JsonSchema7ArrayType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise\n */\nexport function isJsonSchema7ArrayType(\n schema: JsonSchema7Type\n): schema is JsonSchema7ArrayType {\n return \"type\" in schema && schema.type === \"array\" && \"items\" in schema;\n}\n\n/**\n * Type guard for {@link JsonSchema7PrimitiveLiteralType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7PrimitiveLiteralType}, false otherwise\n */\nexport function isJsonSchema7PrimitiveLiteralType(\n schema: JsonSchema7Type\n): schema is JsonSchema7PrimitiveLiteralType {\n if (!(\"type\" in schema)) {\n return false;\n }\n\n const { type } = schema;\n\n return (\n (type === \"string\" ||\n type === \"number\" ||\n type === \"integer\" ||\n type === \"boolean\") &&\n \"const\" in schema\n );\n}\n\n/**\n * Type guard for {@link JsonSchema7LiteralType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7LiteralType}, false otherwise\n */\nexport function isJsonSchema7LiteralType(\n schema: JsonSchema7Type\n): schema is JsonSchema7LiteralType {\n if (isJsonSchema7PrimitiveLiteralType(schema)) {\n return true;\n }\n\n if (!(\"type\" in schema)) {\n return false;\n }\n\n return schema.type === \"object\" || schema.type === \"array\";\n}\n\n/**\n * Type guard to check if a value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}.\n *\n * @remarks\n * This function checks if the value has the structure of a Standard JSON Schema, which includes a `~standard` property with a `jsonSchema` object that has `input` and `output` functions.\n *\n * @see https://standardschema.dev/json-schema\n *\n * @param value - The value to check.\n * @returns True if the value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}, false otherwise.\n */\nexport function isStandardJsonSchema<Input = unknown, Output = Input>(\n value: any\n): value is StandardJSONSchemaV1<Input, Output> {\n return (\n isSetObject(value) &&\n \"~standard\" in value &&\n isSetObject(value[\"~standard\"]) &&\n \"jsonSchema\" in value[\"~standard\"] &&\n isSetObject(value[\"~standard\"].jsonSchema) &&\n \"input\" in value[\"~standard\"].jsonSchema &&\n isFunction(value[\"~standard\"].jsonSchema.input) &&\n \"output\" in value[\"~standard\"].jsonSchema &&\n isFunction(value[\"~standard\"].jsonSchema.output)\n );\n}\n"],"mappings":";;;;;;;;;AAqCA,SAAgB,uBACd,QACgC;AAChC,KAAI,UAAU,UAAU,OAAO,SAAS,SACtC,QAAO;AAGT,QAAO,WAAW;;;;;;;;AASpB,SAAgB,wBACd,QACiC;AACjC,KAAI,UAAU,UAAU,OAAO,SAAS,SACtC,QAAO;AAGT,QAAO,gBAAgB;;;;;;;;AASzB,SAAgB,uBACd,QACgC;AAChC,QAAO,UAAU,UAAU,OAAO,SAAS,WAAW,WAAW;;;;;;;;AASnE,SAAgB,kCACd,QAC2C;AAC3C,KAAI,EAAE,UAAU,QACd,QAAO;CAGT,MAAM,EAAE,SAAS;AAEjB,SACG,SAAS,YACR,SAAS,YACT,SAAS,aACT,SAAS,cACX,WAAW;;;;;;;;AAUf,SAAgB,yBACd,QACkC;AAClC,KAAI,kCAAkC,OAAO,CAC3C,QAAO;AAGT,KAAI,EAAE,UAAU,QACd,QAAO;AAGT,QAAO,OAAO,SAAS,YAAY,OAAO,SAAS;;;;;;;;;;;;;AAcrD,SAAgB,qBACd,OAC8C;AAC9C,QACE,YAAY,MAAM,IAClB,eAAe,SACf,YAAY,MAAM,aAAa,IAC/B,gBAAgB,MAAM,gBACtB,YAAY,MAAM,aAAa,WAAW,IAC1C,WAAW,MAAM,aAAa,cAC9B,WAAW,MAAM,aAAa,WAAW,MAAM,IAC/C,YAAY,MAAM,aAAa,cAC/B,WAAW,MAAM,aAAa,WAAW,OAAO"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
const require_is_set_object = require('./is-set-object-BmHip9em.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/schema.ts
|
|
4
|
+
/**
|
|
5
|
+
* Type guard for {@link JsonSchema7AllOfType}
|
|
6
|
+
*
|
|
7
|
+
* @param schema - The schema to check
|
|
8
|
+
* @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
function isJsonSchema7AllOfType(schema) {
|
|
11
|
+
if ("type" in schema && schema.type === "string") return false;
|
|
12
|
+
return "allOf" in schema;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type guard for {@link JsonSchema7ObjectType}
|
|
16
|
+
*
|
|
17
|
+
* @param schema - The schema to check
|
|
18
|
+
* @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
|
|
19
|
+
*/
|
|
20
|
+
function isJsonSchema7ObjectType(schema) {
|
|
21
|
+
if ("type" in schema && schema.type === "object") return false;
|
|
22
|
+
return "properties" in schema;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type guard for {@link JsonSchema7ArrayType}
|
|
26
|
+
*
|
|
27
|
+
* @param schema - The schema to check
|
|
28
|
+
* @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise
|
|
29
|
+
*/
|
|
30
|
+
function isJsonSchema7ArrayType(schema) {
|
|
31
|
+
return "type" in schema && schema.type === "array" && "items" in schema;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
35
|
+
*
|
|
36
|
+
* @param schema - The schema to check
|
|
37
|
+
* @returns True if the schema is a {@link JsonSchema7PrimitiveLiteralType}, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
function isJsonSchema7PrimitiveLiteralType(schema) {
|
|
40
|
+
if (!("type" in schema)) return false;
|
|
41
|
+
const { type } = schema;
|
|
42
|
+
return (type === "string" || type === "number" || type === "integer" || type === "boolean") && "const" in schema;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Type guard for {@link JsonSchema7LiteralType}
|
|
46
|
+
*
|
|
47
|
+
* @param schema - The schema to check
|
|
48
|
+
* @returns True if the schema is a {@link JsonSchema7LiteralType}, false otherwise
|
|
49
|
+
*/
|
|
50
|
+
function isJsonSchema7LiteralType(schema) {
|
|
51
|
+
if (isJsonSchema7PrimitiveLiteralType(schema)) return true;
|
|
52
|
+
if (!("type" in schema)) return false;
|
|
53
|
+
return schema.type === "object" || schema.type === "array";
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Type guard to check if a value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}.
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* This function checks if the value has the structure of a Standard JSON Schema, which includes a `~standard` property with a `jsonSchema` object that has `input` and `output` functions.
|
|
60
|
+
*
|
|
61
|
+
* @see https://standardschema.dev/json-schema
|
|
62
|
+
*
|
|
63
|
+
* @param value - The value to check.
|
|
64
|
+
* @returns True if the value is a {@link StandardJSONSchemaV1 | Standard JSON Schema}, false otherwise.
|
|
65
|
+
*/
|
|
66
|
+
function isStandardJsonSchema(value) {
|
|
67
|
+
return require_is_set_object.isSetObject(value) && "~standard" in value && require_is_set_object.isSetObject(value["~standard"]) && "jsonSchema" in value["~standard"] && require_is_set_object.isSetObject(value["~standard"].jsonSchema) && "input" in value["~standard"].jsonSchema && require_is_set_object.isFunction(value["~standard"].jsonSchema.input) && "output" in value["~standard"].jsonSchema && require_is_set_object.isFunction(value["~standard"].jsonSchema.output);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
//#endregion
|
|
71
|
+
Object.defineProperty(exports, 'isJsonSchema7AllOfType', {
|
|
72
|
+
enumerable: true,
|
|
73
|
+
get: function () {
|
|
74
|
+
return isJsonSchema7AllOfType;
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
Object.defineProperty(exports, 'isJsonSchema7ArrayType', {
|
|
78
|
+
enumerable: true,
|
|
79
|
+
get: function () {
|
|
80
|
+
return isJsonSchema7ArrayType;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
Object.defineProperty(exports, 'isJsonSchema7LiteralType', {
|
|
84
|
+
enumerable: true,
|
|
85
|
+
get: function () {
|
|
86
|
+
return isJsonSchema7LiteralType;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
Object.defineProperty(exports, 'isJsonSchema7ObjectType', {
|
|
90
|
+
enumerable: true,
|
|
91
|
+
get: function () {
|
|
92
|
+
return isJsonSchema7ObjectType;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
Object.defineProperty(exports, 'isJsonSchema7PrimitiveLiteralType', {
|
|
96
|
+
enumerable: true,
|
|
97
|
+
get: function () {
|
|
98
|
+
return isJsonSchema7PrimitiveLiteralType;
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
Object.defineProperty(exports, 'isStandardJsonSchema', {
|
|
102
|
+
enumerable: true,
|
|
103
|
+
get: function () {
|
|
104
|
+
return isStandardJsonSchema;
|
|
105
|
+
}
|
|
106
|
+
});
|
package/dist/schema.cjs
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
const require_schema = require('./schema-
|
|
1
|
+
const require_schema = require('./schema-Dl018Aq4.cjs');
|
|
2
2
|
|
|
3
|
-
exports.isJsonSchema7AllOfType = require_schema.isJsonSchema7AllOfType;
|
|
3
|
+
exports.isJsonSchema7AllOfType = require_schema.isJsonSchema7AllOfType;
|
|
4
|
+
exports.isJsonSchema7ArrayType = require_schema.isJsonSchema7ArrayType;
|
|
5
|
+
exports.isJsonSchema7LiteralType = require_schema.isJsonSchema7LiteralType;
|
|
6
|
+
exports.isJsonSchema7ObjectType = require_schema.isJsonSchema7ObjectType;
|
|
7
|
+
exports.isJsonSchema7PrimitiveLiteralType = require_schema.isJsonSchema7PrimitiveLiteralType;
|
|
8
|
+
exports.isStandardJsonSchema = require_schema.isStandardJsonSchema;
|
package/dist/schema.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as isJsonSchema7AllOfType } from "./schema-
|
|
2
|
-
export { isJsonSchema7AllOfType };
|
|
1
|
+
import { a as isJsonSchema7PrimitiveLiteralType, i as isJsonSchema7ObjectType, n as isJsonSchema7ArrayType, o as isStandardJsonSchema, r as isJsonSchema7LiteralType, t as isJsonSchema7AllOfType } from "./schema-BO1HCrxv.cjs";
|
|
2
|
+
export { isJsonSchema7AllOfType, isJsonSchema7ArrayType, isJsonSchema7LiteralType, isJsonSchema7ObjectType, isJsonSchema7PrimitiveLiteralType, isStandardJsonSchema };
|
package/dist/schema.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "./types-
|
|
2
|
-
import { t as isJsonSchema7AllOfType } from "./schema-
|
|
3
|
-
export { isJsonSchema7AllOfType };
|
|
1
|
+
import "./types-CPQlxauZ.mjs";
|
|
2
|
+
import { a as isJsonSchema7PrimitiveLiteralType, i as isJsonSchema7ObjectType, n as isJsonSchema7ArrayType, o as isStandardJsonSchema, r as isJsonSchema7LiteralType, t as isJsonSchema7AllOfType } from "./schema-CmH1V_uI.mjs";
|
|
3
|
+
export { isJsonSchema7AllOfType, isJsonSchema7ArrayType, isJsonSchema7LiteralType, isJsonSchema7ObjectType, isJsonSchema7PrimitiveLiteralType, isStandardJsonSchema };
|
package/dist/schema.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as isJsonSchema7AllOfType } from "./schema-
|
|
1
|
+
import { a as isJsonSchema7PrimitiveLiteralType, i as isJsonSchema7ObjectType, n as isJsonSchema7ArrayType, o as isStandardJsonSchema, r as isJsonSchema7LiteralType, t as isJsonSchema7AllOfType } from "./schema-DGmzxHja.mjs";
|
|
2
2
|
|
|
3
|
-
export { isJsonSchema7AllOfType };
|
|
3
|
+
export { isJsonSchema7AllOfType, isJsonSchema7ArrayType, isJsonSchema7LiteralType, isJsonSchema7ObjectType, isJsonSchema7PrimitiveLiteralType, isStandardJsonSchema };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { U as JsonSerializeOptions, W as JsonValue, d as JsonParserResult, l as JsonParseOptions, t as Class } from "./types-CPQlxauZ.mjs";
|
|
2
2
|
import SuperJSON from "superjson";
|
|
3
3
|
|
|
4
4
|
//#region src/storm-json.d.ts
|
|
@@ -67,4 +67,4 @@ declare class StormJSON extends SuperJSON {
|
|
|
67
67
|
}
|
|
68
68
|
//#endregion
|
|
69
69
|
export { StormJSON as t };
|
|
70
|
-
//# sourceMappingURL=storm-json-
|
|
70
|
+
//# sourceMappingURL=storm-json-8F9CKpXu.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storm-json-
|
|
1
|
+
{"version":3,"file":"storm-json-8F9CKpXu.d.mts","names":[],"sources":["../src/storm-json.ts"],"sourcesContent":[],"mappings":";;;;;;;AA0CA;;;;AAuB2C,cAvB9B,SAAA,SAAkB,SAAA,CAuBY;EAAY,CAAA,OAAA;EAUS,WAAA,QAAA,CAAA,CAAA,EA9BhC,SA8BgC;EAarD;;;EAyBN,OAAA,WAAA,CAAA,QAAA,OAAA,CAAA,CAAA,OAAA,EAxDQ,gBAwDR,CAAA,EAvDA,KAuDA;EAiCmB;;;EAGQ,OAAA,SAAA,CAAA,MAAA,EApFW,SAoFX,CAAA,EApFuB,gBAoFvB;EACR;;;;;;gDA3EwC;;;;;;;;;6BAarD,aACG;;;;;;;;;+DAuBA,mBACT;;;;;;;;;mDAiCmB,YAAY,2CAGd,UAAU,iCACR,gBAAgB,4CACC;;;;;;yCAkBnB"}
|
|
@@ -27,9 +27,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
//#endregion
|
|
28
28
|
const require_is_object = require('./is-object-umGh91v1.cjs');
|
|
29
29
|
const require_is_string = require('./is-string-C2RK4Gjs.cjs');
|
|
30
|
-
const require_parse = require('./parse-
|
|
31
|
-
const require_parse_error = require('./parse-error-
|
|
32
|
-
const require_stringify = require('./stringify-
|
|
30
|
+
const require_parse = require('./parse-ByDxRup5.cjs');
|
|
31
|
+
const require_parse_error = require('./parse-error-N7UE-HMh.cjs');
|
|
32
|
+
const require_stringify = require('./stringify-BehjrfhS.cjs');
|
|
33
33
|
let jsonc_parser = require("jsonc-parser");
|
|
34
34
|
let node_buffer = require("node:buffer");
|
|
35
35
|
let superjson = require("superjson");
|