@stryke/json 0.11.0 → 0.13.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 +25 -0
- package/dist/canonical-3PQxSh5G.d.cts +17 -0
- package/dist/canonical-3PQxSh5G.d.cts.map +1 -0
- package/dist/canonical-CVbmCnGM.mjs +28 -0
- package/dist/canonical-CVbmCnGM.mjs.map +1 -0
- package/dist/canonical-DZDrZ9dv.d.mts +17 -0
- package/dist/canonical-DZDrZ9dv.d.mts.map +1 -0
- package/dist/canonical-hMXtzPIV.cjs +33 -0
- package/dist/canonical.cjs +3 -0
- package/dist/canonical.d.cts +2 -0
- package/dist/canonical.d.mts +2 -0
- package/dist/canonical.mjs +3 -0
- package/dist/{code-frames-BUtrssZ5.d.cts → code-frames-BOS_tt9F.d.mts} +1 -1
- package/dist/{code-frames-CrTAYYSE.d.mts.map → code-frames-BOS_tt9F.d.mts.map} +1 -1
- package/dist/{code-frames-DuBfTMu4.mjs → code-frames-C8DEdLmV.mjs} +1 -1
- package/dist/{code-frames-DuBfTMu4.mjs.map → code-frames-C8DEdLmV.mjs.map} +1 -1
- package/dist/{code-frames-CrTAYYSE.d.mts → code-frames-ClyQ9O1l.d.cts} +1 -1
- package/dist/{code-frames-BUtrssZ5.d.cts.map → code-frames-ClyQ9O1l.d.cts.map} +1 -1
- package/dist/{find-reference-B8xshNXL.d.mts → find-reference-BuuNqqOh.d.cts} +1 -1
- package/dist/{find-reference-B8xshNXL.d.mts.map → find-reference-BuuNqqOh.d.cts.map} +1 -1
- package/dist/{find-reference-De5vBQV2.cjs → find-reference-Ct8UDBo2.cjs} +2 -2
- package/dist/{find-reference-C-YleCds.d.cts → find-reference-MHRH7HJ_.d.mts} +1 -1
- package/dist/{find-reference-C-YleCds.d.cts.map → find-reference-MHRH7HJ_.d.mts.map} +1 -1
- package/dist/{find-reference-DMSYEaaI.mjs → find-reference-kPgdulJ1.mjs} +3 -3
- package/dist/{find-reference-DMSYEaaI.mjs.map → find-reference-kPgdulJ1.mjs.map} +1 -1
- package/dist/index.cjs +17 -11
- package/dist/index.d.cts +12 -11
- package/dist/index.d.mts +13 -12
- package/dist/index.mjs +13 -12
- package/dist/{is-number-BIwzZzyi.mjs → is-number-BMxmACAS.mjs} +1 -1
- package/dist/{is-number-BIwzZzyi.mjs.map → is-number-BMxmACAS.mjs.map} +1 -1
- package/dist/{is-object-BpfmzHWa.mjs → is-object-BYxzKTYU.mjs} +2 -2
- package/dist/{is-object-BpfmzHWa.mjs.map → is-object-BYxzKTYU.mjs.map} +1 -1
- package/dist/{is-object-umGh91v1.cjs → is-object-BbRMEXAo.cjs} +1 -1
- package/dist/{is-set-object-BmHip9em.cjs → is-set-object-5lZPw_Pq.cjs} +3 -3
- package/dist/{is-set-object-C1Qnj1Q8.mjs → is-set-object-yxjp5vg-.mjs} +4 -4
- package/dist/{is-set-object-C1Qnj1Q8.mjs.map → is-set-object-yxjp5vg-.mjs.map} +1 -1
- package/dist/{is-string-CLiBUSKV.mjs → is-string--ny35huw.mjs} +1 -1
- package/dist/{is-string-CLiBUSKV.mjs.map → is-string--ny35huw.mjs.map} +1 -1
- package/dist/{is-undefined-CmyJWYGD.mjs → is-undefined-CqNzBssC.mjs} +1 -1
- package/dist/{is-undefined-CmyJWYGD.mjs.map → is-undefined-CqNzBssC.mjs.map} +1 -1
- package/dist/{parse-vw_qRD3F.mjs → parse-B3NfTO06.mjs} +3 -3
- package/dist/{parse-vw_qRD3F.mjs.map → parse-B3NfTO06.mjs.map} +1 -1
- package/dist/{parse-Bp6kkcQ4.cjs → parse-BSmqrTy_.cjs} +2 -2
- package/dist/{parse-Dn43ZK9y.mjs → parse-BrChHTWb.mjs} +2 -2
- package/dist/{parse-Dn43ZK9y.mjs.map → parse-BrChHTWb.mjs.map} +1 -1
- package/dist/{parse-ByDxRup5.cjs → parse-CX9jPskm.cjs} +1 -1
- package/dist/{parse-DZfi3d96.d.cts → parse-DCHSu_0u.d.cts} +1 -1
- package/dist/{parse-Cj-YfhrI.d.mts.map → parse-DCHSu_0u.d.cts.map} +1 -1
- package/dist/{parse-Cj-YfhrI.d.mts → parse-DaiwKCLz.d.mts} +1 -1
- package/dist/{parse-DZfi3d96.d.cts.map → parse-DaiwKCLz.d.mts.map} +1 -1
- package/dist/{parse-BGlhbY16.d.cts → parse-XXQfTfNE.d.mts} +1 -1
- package/dist/{parse-BGlhbY16.d.cts.map → parse-XXQfTfNE.d.mts.map} +1 -1
- package/dist/{parse-error-DpEv3vo_.d.mts → parse-error-CDt01Gvc.d.mts} +1 -1
- package/dist/parse-error-CDt01Gvc.d.mts.map +1 -0
- package/dist/{parse-error-7K8s4vWf.d.cts → parse-error-CGKcBkMJ.d.cts} +1 -1
- package/dist/parse-error-CGKcBkMJ.d.cts.map +1 -0
- package/dist/{parse-error-N7UE-HMh.cjs → parse-error-CUOf-YBA.cjs} +2 -2
- package/dist/{parse-error-Af4zHUQ_.mjs → parse-error-Cu6mjBS7.mjs} +2 -2
- package/dist/{parse-error-Af4zHUQ_.mjs.map → parse-error-Cu6mjBS7.mjs.map} +1 -1
- package/dist/{parse-fXy5pbmE.d.mts → parse-ygKFNauQ.d.cts} +1 -1
- package/dist/{parse-fXy5pbmE.d.mts.map → parse-ygKFNauQ.d.cts.map} +1 -1
- package/dist/pointer/find-reference.cjs +1 -1
- package/dist/pointer/find-reference.d.cts +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.cts +2 -2
- 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.cts +1 -1
- package/dist/pointer/parse.d.mts +1 -1
- package/dist/pointer/parse.mjs +1 -1
- package/dist/{schema-DGmzxHja.mjs → schema-CMt54x11.mjs} +39 -3
- package/dist/schema-CMt54x11.mjs.map +1 -0
- package/dist/{schema-BO1HCrxv.d.cts → schema-CuBX00tF.d.cts} +33 -5
- package/dist/schema-CuBX00tF.d.cts.map +1 -0
- package/dist/{schema-Dl018Aq4.cjs → schema-CwyRhvHe.cjs} +61 -1
- package/dist/{schema-CmH1V_uI.d.mts → schema-D5wPTiM4.d.mts} +33 -5
- package/dist/schema-D5wPTiM4.d.mts.map +1 -0
- package/dist/schema.cjs +5 -1
- package/dist/schema.d.cts +2 -2
- package/dist/schema.d.mts +3 -3
- package/dist/schema.mjs +2 -2
- package/dist/{storm-json-BD6WFbrI.cjs → storm-json-BDPXNC_u.cjs} +5 -5
- package/dist/{storm-json-nkhJgTz4.mjs → storm-json-BmO91crX.mjs} +6 -6
- package/dist/{storm-json-nkhJgTz4.mjs.map → storm-json-BmO91crX.mjs.map} +1 -1
- package/dist/{storm-json-8F9CKpXu.d.mts → storm-json-DJwb3Ou-.d.mts} +2 -2
- package/dist/{storm-json-8F9CKpXu.d.mts.map → storm-json-DJwb3Ou-.d.mts.map} +1 -1
- package/dist/{storm-json-DvIEWMEH.d.cts → storm-json-DiBg5b6r.d.cts} +2 -2
- package/dist/{storm-json-DvIEWMEH.d.cts.map → storm-json-DiBg5b6r.d.cts.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-CYHjAvWm.mjs → stringify-CfeAVjh8.mjs} +3 -3
- package/dist/{stringify-CYHjAvWm.mjs.map → stringify-CfeAVjh8.mjs.map} +1 -1
- package/dist/{stringify-BehjrfhS.cjs → stringify-DQOBApRO.cjs} +2 -2
- package/dist/{stringify-Bc8OkhIr.d.cts → stringify-DtMcg2Wy.d.mts} +1 -1
- package/dist/stringify-DtMcg2Wy.d.mts.map +1 -0
- package/dist/{stringify-CFT1K1LE.d.mts → stringify-mAxwby9q.d.cts} +1 -1
- package/dist/stringify-mAxwby9q.d.cts.map +1 -0
- package/dist/{strip-comments-BA8MS_Fs.d.mts → strip-comments-AOXnoydB.d.cts} +1 -1
- package/dist/{strip-comments-BA8MS_Fs.d.mts.map → strip-comments-AOXnoydB.d.cts.map} +1 -1
- package/dist/{strip-comments-Cz_Wc25t.d.cts → strip-comments-BNN6Uf4e.d.mts} +1 -1
- package/dist/{strip-comments-Cz_Wc25t.d.cts.map → strip-comments-BNN6Uf4e.d.mts.map} +1 -1
- package/dist/{strip-comments-Dq00N_Sg.mjs → strip-comments-DNTu6CWM.mjs} +1 -1
- package/dist/{strip-comments-Dq00N_Sg.mjs.map → strip-comments-DNTu6CWM.mjs.map} +1 -1
- package/dist/{types-CPQlxauZ.d.mts → types-BAtAPir9.d.mts} +1 -1
- package/dist/{types-Bn8rC098.d.cts.map → types-BAtAPir9.d.mts.map} +1 -1
- package/dist/{types-Bn8rC098.d.cts → types-BzNIRhpI.d.cts} +1 -1
- package/dist/{types-CPQlxauZ.d.mts.map → types-BzNIRhpI.d.cts.map} +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/utils/code-frames.cjs +1 -1
- package/dist/utils/code-frames.d.cts +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.cts +5 -5
- 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.cts +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.cts +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.cts +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.cts +1 -1
- package/dist/utils/strip-comments.d.mts +1 -1
- package/dist/utils/strip-comments.mjs +1 -1
- package/package.json +6 -2
- package/dist/parse-error-7K8s4vWf.d.cts.map +0 -1
- package/dist/parse-error-DpEv3vo_.d.mts.map +0 -1
- package/dist/schema-BO1HCrxv.d.cts.map +0 -1
- package/dist/schema-CmH1V_uI.d.mts.map +0 -1
- package/dist/schema-DGmzxHja.mjs.map +0 -1
- package/dist/stringify-Bc8OkhIr.d.cts.map +0 -1
- package/dist/stringify-CFT1K1LE.d.mts.map +0 -1
- /package/dist/{code-frames-BmUvlJ0w.cjs → code-frames-ChE4PPdh.cjs} +0 -0
- /package/dist/{index-B_e8BwCm.d.cts → index-CsuikFeJ.d.mts} +0 -0
- /package/dist/{index-CCt0lwyI.d.mts → index-Dh6J9gb5.d.cts} +0 -0
- /package/dist/{index-CDAfh8Ew.d.cts → index-VmEFGBxN.d.cts} +0 -0
- /package/dist/{index-DvuJXuAN.d.mts → index-e6k85DKM.d.mts} +0 -0
- /package/dist/{is-number-c5xguIbS.cjs → is-number-CV8PbAUX.cjs} +0 -0
- /package/dist/{is-string-C2RK4Gjs.cjs → is-string-yY-B30hL.cjs} +0 -0
- /package/dist/{is-undefined-CnI0qe-z.cjs → is-undefined-DyZkA263.cjs} +0 -0
- /package/dist/{pointer-B3W_Sme3.cjs → pointer-Cvmor4sN.cjs} +0 -0
- /package/dist/{pointer-Dn__XOdY.mjs → pointer-DScQSL_a.mjs} +0 -0
- /package/dist/{strip-comments-CmEG_smS.cjs → strip-comments-CPoO4Wj2.cjs} +0 -0
- /package/dist/{utils-jN2UkvqB.cjs → utils-DrK7G5cq.cjs} +0 -0
- /package/dist/{utils-mEkKIcgl.mjs → utils-mO6p60ai.mjs} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-set-object-
|
|
1
|
+
{"version":3,"file":"is-set-object-yxjp5vg-.mjs","names":[],"sources":["../../type-checks/src/is-function.ts","../../type-checks/src/is-null.ts","../../type-checks/src/is-empty.ts","../../type-checks/src/is-set.ts","../../type-checks/src/is-non-null-object.ts","../../type-checks/src/is-set-object.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 { AnyFunction } from \"@stryke/types/base\";\nimport { getObjectTag } from \"./get-object-tag\";\n\nexport function isSyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object Function]\";\n}\n\nexport function isAsyncFunction(value?: any): value is AnyFunction {\n return getObjectTag(value) === \"[object AsyncFunction]\";\n}\n\n/**\n * Check if the provided value's type is `Function`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Function`\n */\nexport const isFunction = (value: unknown): value is AnyFunction => {\n try {\n return (\n value instanceof Function ||\n typeof value === \"function\" ||\n Boolean(\n value?.constructor && (value as any)?.call && (value as any)?.apply\n ) ||\n isSyncFunction(value) ||\n isAsyncFunction(value)\n );\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\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\nexport const isNull = (value: unknown): value is null => {\n try {\n return value === null;\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\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 { isDate } from \"./is-date\";\nimport { isFunction } from \"./is-function\";\nimport { isNull } from \"./is-null\";\nimport { isNumber } from \"./is-number\";\nimport { isSymbol } from \"./is-symbol\";\nimport { isUndefined } from \"./is-undefined\";\n\n/**\n * Check if the provided value's type is `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `null` or `undefined`\n */\nexport const isEmpty = (value: unknown) => {\n try {\n return isUndefined(value) || isNull(value);\n } catch {\n return false;\n }\n};\n\nexport const isEmptyAnything = (value: any) => {\n if (value === true || value === false) return true;\n if (value === null || value === undefined) return true;\n if (isNumber(value)) return value === 0;\n if (isDate(value)) return Number.isNaN(value.getTime());\n if (isFunction(value)) return false;\n if (isSymbol(value)) return false;\n const { length } = value;\n if (isNumber(length)) return length === 0;\n const { size } = value;\n if (isNumber(size)) return size === 0;\n const keys = Object.keys(value).length;\n\n return keys === 0;\n};\n","/* -------------------------------------------------------------------\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 { isEmpty } from \"./is-empty\";\n\n/**\n * The inverse of the `isEmpty` function\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is **NOT** of type `null` or `undefined`\n */\nexport const isSet = (value: unknown): value is NonNullable<unknown> => {\n try {\n return !isEmpty(value);\n } catch {\n return false;\n }\n};\n","/* -------------------------------------------------------------------\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 { isObject } from \"./is-object\";\nimport { isSet } from \"./is-set\";\n\n/**\n * Check if the provided value's type is `Object` and is not `null` or `undefined`\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is of type `Object` and is not `null` or `undefined`\n */\nexport const isNonNullObject = (value: any): value is NonNullable<object> => {\n return isSet(value) && isObject(value);\n};\n","/* -------------------------------------------------------------------\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 { isNonNullObject } from \"./is-non-null-object\";\n\n/**\n * Check if the provided value's type is an object with some fields set\n *\n * @param value - The value to type check\n * @returns An indicator specifying if the value provided is an object with some fields se\n */\nexport const isSetObject = (value: unknown): value is NonNullable<object> => {\n try {\n return isNonNullObject(value) && Object.keys(value).length > 0;\n } catch {\n return false;\n }\n};\n"],"mappings":";;;;;AAqBA,SAAgB,eAAe,OAAmC;AAChE,QAAO,aAAa,MAAM,KAAK;;AAGjC,SAAgB,gBAAgB,OAAmC;AACjE,QAAO,aAAa,MAAM,KAAK;;;;;;;;AASjC,MAAa,cAAc,UAAyC;AAClE,KAAI;AACF,SACE,iBAAiB,YACjB,OAAO,UAAU,cACjB,QACE,OAAO,eAAgB,OAAe,QAAS,OAAe,MAC/D,IACD,eAAe,MAAM,IACrB,gBAAgB,MAAM;SAElB;AACN,SAAO;;;;;;AC7BX,MAAa,UAAU,UAAkC;AACvD,KAAI;AACF,SAAO,UAAU;SACX;AACN,SAAO;;;;;;;;;;;;ACSX,MAAa,WAAW,UAAmB;AACzC,KAAI;AACF,SAAO,YAAY,MAAM,IAAI,OAAO,MAAM;SACpC;AACN,SAAO;;;;;;;;;;;;ACTX,MAAa,SAAS,UAAkD;AACtE,KAAI;AACF,SAAO,CAAC,QAAQ,MAAM;SAChB;AACN,SAAO;;;;;;;;;;;;ACHX,MAAa,mBAAmB,UAA6C;AAC3E,QAAO,MAAM,MAAM,IAAI,SAAS,MAAM;;;;;;;;;;;ACFxC,MAAa,eAAe,UAAiD;AAC3E,KAAI;AACF,SAAO,gBAAgB,MAAM,IAAI,OAAO,KAAK,MAAM,CAAC,SAAS;SACvD;AACN,SAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-string
|
|
1
|
+
{"version":3,"file":"is-string--ny35huw.mjs","names":[],"sources":["../../type-checks/src/is-string.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\nexport const isString = (value: unknown): value is string => {\n try {\n return typeof value === \"string\";\n } catch {\n return false;\n }\n};\n"],"mappings":";AAkBA,MAAa,YAAY,UAAoC;AAC3D,KAAI;AACF,SAAO,OAAO,UAAU;SAClB;AACN,SAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"is-undefined-
|
|
1
|
+
{"version":3,"file":"is-undefined-CqNzBssC.mjs","names":[],"sources":["../../type-checks/src/is-undefined.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\nexport const isUndefined = (value: unknown): value is undefined => {\n return value === undefined;\n};\n"],"mappings":";AAkBA,MAAa,eAAe,UAAuC;AACjE,QAAO,UAAU"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as isNumber } from "./is-number-
|
|
2
|
-
import { t as isString } from "./is-string
|
|
1
|
+
import { t as isNumber } from "./is-number-BMxmACAS.mjs";
|
|
2
|
+
import { t as isString } from "./is-string--ny35huw.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/pointer/parse.ts
|
|
5
5
|
const TILDE_ONE = /~1/g;
|
|
@@ -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-B3NfTO06.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-B3NfTO06.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,5 +1,5 @@
|
|
|
1
|
-
const require_is_number = require('./is-number-
|
|
2
|
-
const require_is_string = require('./is-string-
|
|
1
|
+
const require_is_number = require('./is-number-CV8PbAUX.cjs');
|
|
2
|
+
const require_is_string = require('./is-string-yY-B30hL.cjs');
|
|
3
3
|
|
|
4
4
|
//#region src/pointer/parse.ts
|
|
5
5
|
const TILDE_ONE = /~1/g;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as stripComments } from "./strip-comments-
|
|
1
|
+
import { t as stripComments } from "./strip-comments-DNTu6CWM.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-BrChHTWb.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-BrChHTWb.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
|
-
const require_strip_comments = require('./strip-comments-
|
|
1
|
+
const require_strip_comments = require('./strip-comments-CPoO4Wj2.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-DCHSu_0u.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-DCHSu_0u.d.cts","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"}
|
|
@@ -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-DaiwKCLz.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-DaiwKCLz.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"}
|
|
@@ -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-XXQfTfNE.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-XXQfTfNE.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"}
|
|
@@ -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-CDt01Gvc.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-error-CDt01Gvc.d.mts","names":[],"sources":["../src/utils/parse-error.ts"],"sourcesContent":[],"mappings":";;;;;;AA8BA;;;;;iBAAgB,gBAAA,4BAA4C"}
|
|
@@ -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-CGKcBkMJ.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-error-CGKcBkMJ.d.cts","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-BDPXNC_u.cjs');
|
|
2
|
+
const require_code_frames = require('./code-frames-ChE4PPdh.cjs');
|
|
3
3
|
let jsonc_parser = require("jsonc-parser");
|
|
4
4
|
let lines_and_columns = require("lines-and-columns");
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as codeFrameColumns } from "./code-frames-
|
|
1
|
+
import { t as codeFrameColumns } from "./code-frames-C8DEdLmV.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-Cu6mjBS7.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-error-
|
|
1
|
+
{"version":3,"file":"parse-error-Cu6mjBS7.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"}
|
|
@@ -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-ygKFNauQ.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parse-
|
|
1
|
+
{"version":3,"file":"parse-ygKFNauQ.d.cts","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"}
|
|
@@ -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-BuuNqqOh.cjs";
|
|
2
2
|
export { ArrayReference, ObjectReference, Reference, find, isArrayEnd, isArrayReference, isObjectReference };
|
|
@@ -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-MHRH7HJ_.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-kPgdulJ1.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-Ct8UDBo2.cjs');
|
|
2
|
+
const require_parse = require('../parse-BSmqrTy_.cjs');
|
|
3
|
+
require('../pointer-Cvmor4sN.cjs');
|
|
4
4
|
|
|
5
5
|
exports.escapePointerSegment = require_parse.escapePointerSegment;
|
|
6
6
|
exports.find = require_find_reference.find;
|
package/dist/pointer/index.d.cts
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-BuuNqqOh.cjs";
|
|
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-DCHSu_0u.cjs";
|
|
3
3
|
export { ArrayReference, ObjectReference, Reference, escapePointerSegment, find, formatJsonPointer, isArrayEnd, isArrayReference, isInteger, isObjectReference, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
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-MHRH7HJ_.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-DaiwKCLz.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-kPgdulJ1.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-B3NfTO06.mjs";
|
|
3
|
+
import "../pointer-DScQSL_a.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.cts
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-DCHSu_0u.cjs";
|
|
2
2
|
export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
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-DaiwKCLz.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-B3NfTO06.mjs";
|
|
2
2
|
|
|
3
3
|
export { escapePointerSegment, formatJsonPointer, isInteger, isRoot, isValidIndex, parent, parseJsonPointer, unescapePointerSegment };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as isFunction, t as isSetObject } from "./is-set-object-
|
|
1
|
+
import { n as isFunction, t as isSetObject } from "./is-set-object-yxjp5vg-.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/schema.ts
|
|
4
4
|
/**
|
|
@@ -22,6 +22,33 @@ function isJsonSchema7ObjectType(schema) {
|
|
|
22
22
|
return "properties" in schema;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
+
* Type guard for {@link JsonSchema7StringType}
|
|
26
|
+
*
|
|
27
|
+
* @param schema - The schema to check
|
|
28
|
+
* @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise
|
|
29
|
+
*/
|
|
30
|
+
function isJsonSchema7StringType(schema) {
|
|
31
|
+
return "type" in schema && schema.type === "string";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Type guard for {@link JsonSchema7NumberType}
|
|
35
|
+
*
|
|
36
|
+
* @param schema - The schema to check
|
|
37
|
+
* @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise
|
|
38
|
+
*/
|
|
39
|
+
function isJsonSchema7NumberType(schema) {
|
|
40
|
+
return "type" in schema && (schema.type === "number" || schema.type === "integer");
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Type guard for {@link JsonSchema7BooleanType}
|
|
44
|
+
*
|
|
45
|
+
* @param schema - The schema to check
|
|
46
|
+
* @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise
|
|
47
|
+
*/
|
|
48
|
+
function isJsonSchema7BooleanType(schema) {
|
|
49
|
+
return "type" in schema && schema.type === "boolean";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
25
52
|
* Type guard for {@link JsonSchema7ArrayType}
|
|
26
53
|
*
|
|
27
54
|
* @param schema - The schema to check
|
|
@@ -31,6 +58,15 @@ function isJsonSchema7ArrayType(schema) {
|
|
|
31
58
|
return "type" in schema && schema.type === "array" && "items" in schema;
|
|
32
59
|
}
|
|
33
60
|
/**
|
|
61
|
+
* Type guard for {@link JsonSchema7TupleType}
|
|
62
|
+
*
|
|
63
|
+
* @param schema - The schema to check
|
|
64
|
+
* @returns True if the schema is a {@link JsonSchema7TupleType}, false otherwise
|
|
65
|
+
*/
|
|
66
|
+
function isJsonSchema7TupleType(schema) {
|
|
67
|
+
return "type" in schema && schema.type === "array" && "items" in schema && Array.isArray(schema.items);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
34
70
|
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
35
71
|
*
|
|
36
72
|
* @param schema - The schema to check
|
|
@@ -68,5 +104,5 @@ function isStandardJsonSchema(value) {
|
|
|
68
104
|
}
|
|
69
105
|
|
|
70
106
|
//#endregion
|
|
71
|
-
export {
|
|
72
|
-
//# sourceMappingURL=schema-
|
|
107
|
+
export { isJsonSchema7NumberType as a, isJsonSchema7StringType as c, isJsonSchema7LiteralType as i, isJsonSchema7TupleType as l, isJsonSchema7ArrayType as n, isJsonSchema7ObjectType as o, isJsonSchema7BooleanType as r, isJsonSchema7PrimitiveLiteralType as s, isJsonSchema7AllOfType as t, isStandardJsonSchema as u };
|
|
108
|
+
//# sourceMappingURL=schema-CMt54x11.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-CMt54x11.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 JsonSchema7BooleanType,\n JsonSchema7LiteralType,\n JsonSchema7NumberType,\n JsonSchema7ObjectType,\n JsonSchema7PrimitiveLiteralType,\n JsonSchema7StringType,\n JsonSchema7TupleType,\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\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\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 JsonSchema7StringType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise\n */\nexport function isJsonSchema7StringType(\n schema: JsonSchema7Type\n): schema is JsonSchema7StringType {\n return \"type\" in schema && schema.type === \"string\";\n}\n\n/**\n * Type guard for {@link JsonSchema7NumberType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise\n */\nexport function isJsonSchema7NumberType(\n schema: JsonSchema7Type\n): schema is JsonSchema7NumberType {\n return (\n \"type\" in schema && (schema.type === \"number\" || schema.type === \"integer\")\n );\n}\n\n/**\n * Type guard for {@link JsonSchema7BooleanType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise\n */\nexport function isJsonSchema7BooleanType(\n schema: JsonSchema7Type\n): schema is JsonSchema7BooleanType {\n return \"type\" in schema && schema.type === \"boolean\";\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 JsonSchema7TupleType}\n *\n * @param schema - The schema to check\n * @returns True if the schema is a {@link JsonSchema7TupleType}, false otherwise\n */\nexport function isJsonSchema7TupleType(\n schema: JsonSchema7Type\n): schema is JsonSchema7TupleType {\n return (\n \"type\" in schema &&\n schema.type === \"array\" &&\n \"items\" in schema &&\n Array.isArray(schema.items)\n );\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":";;;;;;;;;AAwCA,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,wBACd,QACiC;AACjC,QAAO,UAAU,UAAU,OAAO,SAAS;;;;;;;;AAS7C,SAAgB,wBACd,QACiC;AACjC,QACE,UAAU,WAAW,OAAO,SAAS,YAAY,OAAO,SAAS;;;;;;;;AAUrE,SAAgB,yBACd,QACkC;AAClC,QAAO,UAAU,UAAU,OAAO,SAAS;;;;;;;;AAS7C,SAAgB,uBACd,QACgC;AAChC,QAAO,UAAU,UAAU,OAAO,SAAS,WAAW,WAAW;;;;;;;;AASnE,SAAgB,uBACd,QACgC;AAChC,QACE,UAAU,UACV,OAAO,SAAS,WAChB,WAAW,UACX,MAAM,QAAQ,OAAO,MAAM;;;;;;;;AAU/B,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
1
|
+
import { A as JsonSchema7PrimitiveLiteralType, D as JsonSchema7NumberType, I as JsonSchema7StringType, L as JsonSchema7TupleType, O as JsonSchema7ObjectType, R as JsonSchema7Type, _ as JsonSchema7BooleanType, b as JsonSchema7LiteralType, f as JsonSchema7AllOfType, h as JsonSchema7ArrayType } from "./types-BzNIRhpI.cjs";
|
|
2
2
|
import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
3
3
|
|
|
4
4
|
//#region src/schema.d.ts
|
|
@@ -9,14 +9,35 @@ import { StandardJSONSchemaV1 } from "@standard-schema/spec";
|
|
|
9
9
|
* @param schema - The schema to check
|
|
10
10
|
* @returns True if the schema is a {@link JsonSchema7AllOfType}, false otherwise
|
|
11
11
|
*/
|
|
12
|
-
declare function isJsonSchema7AllOfType(schema: JsonSchema7Type
|
|
12
|
+
declare function isJsonSchema7AllOfType(schema: JsonSchema7Type): schema is JsonSchema7AllOfType;
|
|
13
13
|
/**
|
|
14
14
|
* Type guard for {@link JsonSchema7ObjectType}
|
|
15
15
|
*
|
|
16
16
|
* @param schema - The schema to check
|
|
17
17
|
* @returns True if the schema is a {@link JsonSchema7ObjectType}, false otherwise
|
|
18
18
|
*/
|
|
19
|
-
declare function isJsonSchema7ObjectType(schema: JsonSchema7Type
|
|
19
|
+
declare function isJsonSchema7ObjectType(schema: JsonSchema7Type): schema is JsonSchema7ObjectType;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard for {@link JsonSchema7StringType}
|
|
22
|
+
*
|
|
23
|
+
* @param schema - The schema to check
|
|
24
|
+
* @returns True if the schema is a {@link JsonSchema7StringType}, false otherwise
|
|
25
|
+
*/
|
|
26
|
+
declare function isJsonSchema7StringType(schema: JsonSchema7Type): schema is JsonSchema7StringType;
|
|
27
|
+
/**
|
|
28
|
+
* Type guard for {@link JsonSchema7NumberType}
|
|
29
|
+
*
|
|
30
|
+
* @param schema - The schema to check
|
|
31
|
+
* @returns True if the schema is a {@link JsonSchema7NumberType}, false otherwise
|
|
32
|
+
*/
|
|
33
|
+
declare function isJsonSchema7NumberType(schema: JsonSchema7Type): schema is JsonSchema7NumberType;
|
|
34
|
+
/**
|
|
35
|
+
* Type guard for {@link JsonSchema7BooleanType}
|
|
36
|
+
*
|
|
37
|
+
* @param schema - The schema to check
|
|
38
|
+
* @returns True if the schema is a {@link JsonSchema7BooleanType}, false otherwise
|
|
39
|
+
*/
|
|
40
|
+
declare function isJsonSchema7BooleanType(schema: JsonSchema7Type): schema is JsonSchema7BooleanType;
|
|
20
41
|
/**
|
|
21
42
|
* Type guard for {@link JsonSchema7ArrayType}
|
|
22
43
|
*
|
|
@@ -24,6 +45,13 @@ declare function isJsonSchema7ObjectType(schema: JsonSchema7Type | JsonSchema7St
|
|
|
24
45
|
* @returns True if the schema is a {@link JsonSchema7ArrayType}, false otherwise
|
|
25
46
|
*/
|
|
26
47
|
declare function isJsonSchema7ArrayType(schema: JsonSchema7Type): schema is JsonSchema7ArrayType;
|
|
48
|
+
/**
|
|
49
|
+
* Type guard for {@link JsonSchema7TupleType}
|
|
50
|
+
*
|
|
51
|
+
* @param schema - The schema to check
|
|
52
|
+
* @returns True if the schema is a {@link JsonSchema7TupleType}, false otherwise
|
|
53
|
+
*/
|
|
54
|
+
declare function isJsonSchema7TupleType(schema: JsonSchema7Type): schema is JsonSchema7TupleType;
|
|
27
55
|
/**
|
|
28
56
|
* Type guard for {@link JsonSchema7PrimitiveLiteralType}
|
|
29
57
|
*
|
|
@@ -51,5 +79,5 @@ declare function isJsonSchema7LiteralType(schema: JsonSchema7Type): schema is Js
|
|
|
51
79
|
*/
|
|
52
80
|
declare function isStandardJsonSchema<Input = unknown, Output = Input>(value: any): value is StandardJSONSchemaV1<Input, Output>;
|
|
53
81
|
//#endregion
|
|
54
|
-
export {
|
|
55
|
-
//# sourceMappingURL=schema-
|
|
82
|
+
export { isJsonSchema7NumberType as a, isJsonSchema7StringType as c, isJsonSchema7LiteralType as i, isJsonSchema7TupleType as l, isJsonSchema7ArrayType as n, isJsonSchema7ObjectType as o, isJsonSchema7BooleanType as r, isJsonSchema7PrimitiveLiteralType as s, isJsonSchema7AllOfType as t, isStandardJsonSchema as u };
|
|
83
|
+
//# sourceMappingURL=schema-CuBX00tF.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-CuBX00tF.d.cts","names":[],"sources":["../src/schema.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwCA;AAgBA;AAgBA;AAYA;AAcgB,iBA1DA,sBAAA,CA2DN,MAAA,EA1DA,eA2DG,CAAA,EAAA,MAAA,IA1DA,oBA0DsB;AAUnC;AAYA;AAiBA;AAwBA;AAyBA;;AAEiC,iBAtIjB,uBAAA,CAsIiB,MAAA,EArIvB,eAqIuB,CAAA,EAAA,MAAA,IApIpB,qBAoIoB;;;;;;;iBAtHjB,uBAAA,SACN,4BACG;;;;;;;iBAUG,uBAAA,SACN,4BACG;;;;;;;iBAYG,wBAAA,SACN,4BACG;;;;;;;iBAUG,sBAAA,SACN,4BACG;;;;;;;iBAUG,sBAAA,SACN,4BACG;;;;;;;iBAeG,iCAAA,SACN,4BACG;;;;;;;iBAsBG,wBAAA,SACN,4BACG;;;;;;;;;;;;iBAuBG,+CAA+C,6BAEnD,qBAAqB,OAAO"}
|