@es-joy/jsoe 0.24.3 → 0.25.1
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/.claude/settings.local.json +9 -0
- package/.ncurc.cjs +2 -2
- package/CHANGES.md +51 -0
- package/README.md +23 -13
- package/badges/coverage-badge.svg +1 -1
- package/dist/eslint.config.d.ts +3 -0
- package/dist/eslint.config.d.ts.map +1 -0
- package/dist/formatAndTypeChoices.d.ts +28 -30
- package/dist/formatAndTypeChoices.d.ts.map +1 -1
- package/dist/formats/indexedDBKey.d.ts.map +1 -1
- package/dist/formats/schema.d.ts +46 -3
- package/dist/formats/schema.d.ts.map +1 -1
- package/dist/formats/structuredCloning.d.ts +3 -0
- package/dist/formats/structuredCloning.d.ts.map +1 -1
- package/dist/formats.d.ts +24 -6
- package/dist/formats.d.ts.map +1 -1
- package/dist/fundamentalTypes/BooleanObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/NumberObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/StringObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayReferenceType.d.ts.map +1 -1
- package/dist/fundamentalTypes/arrayType.d.ts +7 -0
- package/dist/fundamentalTypes/arrayType.d.ts.map +1 -1
- package/dist/fundamentalTypes/bigintObjectType.d.ts.map +1 -1
- package/dist/fundamentalTypes/bigintType.d.ts +10 -0
- package/dist/fundamentalTypes/bigintType.d.ts.map +1 -1
- package/dist/fundamentalTypes/blobType.d.ts.map +1 -1
- package/dist/fundamentalTypes/booleanType.d.ts.map +1 -1
- package/dist/fundamentalTypes/catchType.d.ts +2 -2
- package/dist/fundamentalTypes/catchType.d.ts.map +1 -1
- package/dist/fundamentalTypes/dateType.d.ts.map +1 -1
- package/dist/fundamentalTypes/domexceptionType.d.ts.map +1 -1
- package/dist/fundamentalTypes/enumType.d.ts +2 -2
- package/dist/fundamentalTypes/enumType.d.ts.map +1 -1
- package/dist/fundamentalTypes/errorType.d.ts.map +1 -1
- package/dist/fundamentalTypes/fileType.d.ts +6 -0
- package/dist/fundamentalTypes/fileType.d.ts.map +1 -1
- package/dist/fundamentalTypes/functionType.d.ts.map +1 -1
- package/dist/fundamentalTypes/literalType.d.ts +3 -2
- package/dist/fundamentalTypes/literalType.d.ts.map +1 -1
- package/dist/fundamentalTypes/looseRecordType.d.ts +6 -0
- package/dist/fundamentalTypes/looseRecordType.d.ts.map +1 -0
- package/dist/fundamentalTypes/nanType.d.ts.map +1 -1
- package/dist/fundamentalTypes/neverType.d.ts +2 -2
- package/dist/fundamentalTypes/neverType.d.ts.map +1 -1
- package/dist/fundamentalTypes/noneditableType.d.ts.map +1 -1
- package/dist/fundamentalTypes/nullType.d.ts.map +1 -1
- package/dist/fundamentalTypes/numberType.d.ts.map +1 -1
- package/dist/fundamentalTypes/promiseType.d.ts.map +1 -1
- package/dist/fundamentalTypes/regexpType.d.ts.map +1 -1
- package/dist/fundamentalTypes/stringType.d.ts.map +1 -1
- package/dist/fundamentalTypes/symbolType.d.ts.map +1 -1
- package/dist/fundamentalTypes/undefinedType.d.ts.map +1 -1
- package/dist/fundamentalTypes/voidType.d.ts +2 -2
- package/dist/fundamentalTypes/voidType.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/rollup.config.d.ts +30 -0
- package/dist/rollup.config.d.ts.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/src/formatAndTypeChoices.d.ts +108 -0
- package/dist/src/formatAndTypeChoices.d.ts.map +1 -0
- package/dist/src/formats/arbitraryJS.d.ts +4 -0
- package/dist/src/formats/arbitraryJS.d.ts.map +1 -0
- package/dist/src/formats/indexedDBKey.d.ts +4 -0
- package/dist/src/formats/indexedDBKey.d.ts.map +1 -0
- package/dist/src/formats/json.d.ts +4 -0
- package/dist/src/formats/json.d.ts.map +1 -0
- package/dist/src/formats/schema.d.ts +17 -0
- package/dist/src/formats/schema.d.ts.map +1 -0
- package/dist/src/formats/structuredCloning.d.ts +19 -0
- package/dist/src/formats/structuredCloning.d.ts.map +1 -0
- package/dist/src/formats.d.ts +135 -0
- package/dist/src/formats.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts +8 -0
- package/dist/src/fundamentalTypes/BooleanObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/NumberObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/StringObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts +8 -0
- package/dist/src/fundamentalTypes/arrayReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts +29 -0
- package/dist/src/fundamentalTypes/arrayType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/bigintObjectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/bigintObjectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts +6 -0
- package/dist/src/fundamentalTypes/bigintType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/blobType.d.ts +11 -0
- package/dist/src/fundamentalTypes/blobType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/booleanType.d.ts +8 -0
- package/dist/src/fundamentalTypes/booleanType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/catchType.d.ts +6 -0
- package/dist/src/fundamentalTypes/catchType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/dateType.d.ts +26 -0
- package/dist/src/fundamentalTypes/dateType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/domexceptionType.d.ts +6 -0
- package/dist/src/fundamentalTypes/domexceptionType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/enumType.d.ts +6 -0
- package/dist/src/fundamentalTypes/enumType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/errorType.d.ts +6 -0
- package/dist/src/fundamentalTypes/errorType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/fileType.d.ts +13 -0
- package/dist/src/fundamentalTypes/fileType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/filelistType.d.ts +6 -0
- package/dist/src/fundamentalTypes/filelistType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/functionType.d.ts +7 -0
- package/dist/src/fundamentalTypes/functionType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/literalType.d.ts +6 -0
- package/dist/src/fundamentalTypes/literalType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/mapType.d.ts +6 -0
- package/dist/src/fundamentalTypes/mapType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/nanType.d.ts +6 -0
- package/dist/src/fundamentalTypes/nanType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/neverType.d.ts +6 -0
- package/dist/src/fundamentalTypes/neverType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/noneditableType.d.ts +6 -0
- package/dist/src/fundamentalTypes/noneditableType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/nullType.d.ts +6 -0
- package/dist/src/fundamentalTypes/nullType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/numberType.d.ts +6 -0
- package/dist/src/fundamentalTypes/numberType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts +8 -0
- package/dist/src/fundamentalTypes/objectReferenceType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/objectType.d.ts +6 -0
- package/dist/src/fundamentalTypes/objectType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/promiseType.d.ts +6 -0
- package/dist/src/fundamentalTypes/promiseType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/recordType.d.ts +6 -0
- package/dist/src/fundamentalTypes/recordType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts +8 -0
- package/dist/src/fundamentalTypes/regexpType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/setType.d.ts +6 -0
- package/dist/src/fundamentalTypes/setType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/sparseUndefinedType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/stringType.d.ts +6 -0
- package/dist/src/fundamentalTypes/stringType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/symbolType.d.ts +8 -0
- package/dist/src/fundamentalTypes/symbolType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/tupleType.d.ts +6 -0
- package/dist/src/fundamentalTypes/tupleType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts +6 -0
- package/dist/src/fundamentalTypes/undefinedType.d.ts.map +1 -0
- package/dist/src/fundamentalTypes/voidType.d.ts +6 -0
- package/dist/src/fundamentalTypes/voidType.d.ts.map +1 -0
- package/dist/src/index.d.ts +12 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/subTypes/blobHTMLType.d.ts +20 -0
- package/dist/src/subTypes/blobHTMLType.d.ts.map +1 -0
- package/dist/src/subTypes/falseType.d.ts +8 -0
- package/dist/src/subTypes/falseType.d.ts.map +1 -0
- package/dist/src/subTypes/trueType.d.ts +8 -0
- package/dist/src/subTypes/trueType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialNumberType.d.ts +6 -0
- package/dist/src/superTypes/SpecialNumberType.d.ts.map +1 -0
- package/dist/src/superTypes/SpecialRealNumberType.d.ts +6 -0
- package/dist/src/superTypes/SpecialRealNumberType.d.ts.map +1 -0
- package/dist/src/superTypes/buffersourceType.d.ts +8 -0
- package/dist/src/superTypes/buffersourceType.d.ts.map +1 -0
- package/dist/src/superTypes/dommatrixType.d.ts +6 -0
- package/dist/src/superTypes/dommatrixType.d.ts.map +1 -0
- package/dist/src/superTypes/dompointType.d.ts +6 -0
- package/dist/src/superTypes/dompointType.d.ts.map +1 -0
- package/dist/src/superTypes/domrectType.d.ts +6 -0
- package/dist/src/superTypes/domrectType.d.ts.map +1 -0
- package/dist/src/superTypes/errorsSpecialType.d.ts +8 -0
- package/dist/src/superTypes/errorsSpecialType.d.ts.map +1 -0
- package/dist/src/typeChoices.d.ts +140 -0
- package/dist/src/typeChoices.d.ts.map +1 -0
- package/dist/src/types.d.ts +758 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/utils/FileList.d.ts +26 -0
- package/dist/src/utils/FileList.d.ts.map +1 -0
- package/dist/src/utils/dialogs.d.ts +111 -0
- package/dist/src/utils/dialogs.d.ts.map +1 -0
- package/dist/src/utils/jsonPointer.d.ts +46 -0
- package/dist/src/utils/jsonPointer.d.ts.map +1 -0
- package/dist/src/utils/media.d.ts +18 -0
- package/dist/src/utils/media.d.ts.map +1 -0
- package/dist/src/utils/objects.d.ts +16 -0
- package/dist/src/utils/objects.d.ts.map +1 -0
- package/dist/src/utils/templateUtils.d.ts +59 -0
- package/dist/src/utils/templateUtils.d.ts.map +1 -0
- package/dist/src/utils/types.d.ts +2 -0
- package/dist/src/utils/types.d.ts.map +1 -0
- package/dist/src/vendor-imports.d.ts +4 -0
- package/dist/src/vendor-imports.d.ts.map +1 -0
- package/dist/subTypes/blobHTMLType.d.ts.map +1 -1
- package/dist/superTypes/SpecialRealNumberType.d.ts.map +1 -1
- package/dist/superTypes/buffersourceType.d.ts.map +1 -1
- package/dist/superTypes/dommatrixType.d.ts.map +1 -1
- package/dist/superTypes/dompointType.d.ts.map +1 -1
- package/dist/superTypes/domrectType.d.ts.map +1 -1
- package/dist/superTypes/errorsSpecialType.d.ts.map +1 -1
- package/dist/typeChoices.d.ts +21 -87
- package/dist/typeChoices.d.ts.map +1 -1
- package/dist/types.d.ts +90 -64
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/FileList.d.ts +4 -3
- package/dist/utils/FileList.d.ts.map +1 -1
- package/dist/utils/dialogs.d.ts +4 -4
- package/dist/utils/dialogs.d.ts.map +1 -1
- package/dist/utils/media.d.ts.map +1 -1
- package/dist/utils/schemaMeta.d.ts +92 -0
- package/dist/utils/schemaMeta.d.ts.map +1 -0
- package/dist/utils/templateUtils.d.ts +3 -3
- package/dist/utils/templateUtils.d.ts.map +1 -1
- package/dist/utils/timing.d.ts +2 -0
- package/dist/utils/timing.d.ts.map +1 -0
- package/dist/utils/types.d.ts +1 -0
- package/dist/utils/types.d.ts.map +1 -1
- package/dist/vendor-imports.d.ts +3 -1
- package/docs/proposals/schema-meta.md +233 -0
- package/eslint.config.js +51 -4
- package/licenseInfo.json +1 -1
- package/package.json +52 -42
- package/pnpm-workspace.yaml +57 -0
- package/rollup.config.js +20 -18
- package/server.js +3 -3
- package/src/deepEqual.js.map +1 -1
- package/src/formatAndTypeChoices.js +62 -58
- package/src/formats/indexedDBKey.js +3 -4
- package/src/formats/schema.js +824 -475
- package/src/formats/structuredCloning.js +189 -79
- package/src/formats.js +17 -5
- package/src/fundamentalTypes/BooleanObjectType.js +4 -5
- package/src/fundamentalTypes/NumberObjectType.js +4 -4
- package/src/fundamentalTypes/StringObjectType.js +3 -4
- package/src/fundamentalTypes/arrayReferenceType.js +0 -2
- package/src/fundamentalTypes/arrayType.js +624 -389
- package/src/fundamentalTypes/bigintObjectType.js +3 -2
- package/src/fundamentalTypes/bigintType.js +79 -17
- package/src/fundamentalTypes/blobType.js +35 -35
- package/src/fundamentalTypes/booleanType.js +16 -8
- package/src/fundamentalTypes/dateType.js +6 -8
- package/src/fundamentalTypes/domexceptionType.js +5 -4
- package/src/fundamentalTypes/errorType.js +39 -32
- package/src/fundamentalTypes/fileType.js +238 -52
- package/src/fundamentalTypes/functionType.js +61 -41
- package/src/fundamentalTypes/nanType.js +5 -4
- package/src/fundamentalTypes/noneditableType.js +4 -3
- package/src/fundamentalTypes/nullType.js +3 -2
- package/src/fundamentalTypes/numberType.js +72 -20
- package/src/fundamentalTypes/promiseType.js +16 -40
- package/src/fundamentalTypes/regexpType.js +7 -13
- package/src/fundamentalTypes/stringType.js +176 -110
- package/src/fundamentalTypes/symbolType.js +3 -2
- package/src/fundamentalTypes/undefinedType.js +3 -2
- package/src/index.js +6 -5
- package/src/jsoe.css +107 -8
- package/src/subTypes/blobHTMLType.js +23 -10
- package/src/superTypes/SpecialNumberType.js +6 -6
- package/src/superTypes/SpecialRealNumberType.js +10 -9
- package/src/superTypes/buffersourceType.js +86 -75
- package/src/superTypes/dommatrixType.js +6 -5
- package/src/superTypes/dompointType.js +6 -5
- package/src/superTypes/domrectType.js +6 -5
- package/src/superTypes/errorsSpecialType.js +54 -35
- package/src/typeChoices.js +399 -54
- package/src/types.js +157 -97
- package/src/utils/FileList.js +3 -3
- package/src/utils/dialogs.js +5 -7
- package/src/utils/jsonPointer.js +1 -1
- package/src/utils/media.js +1 -0
- package/src/utils/schemaMeta.js +257 -0
- package/src/utils/templateUtils.js +3 -3
- package/src/utils/timing.js +12 -0
- package/src/utils/types.js +19 -0
- package/src/vendor-imports.js +10 -2
- package/tsconfig.json +2 -0
- package/vendor/acorn/dist/acorn.d.mts +46 -5
- package/vendor/acorn/dist/acorn.d.ts +46 -5
- package/vendor/acorn/dist/acorn.js +394 -117
- package/vendor/acorn/dist/acorn.mjs +394 -117
- package/vendor/acorn/dist/bin.js +1 -1
- package/vendor/jamilih/dist/{jml-es.js → jml.mjs} +590 -312
- package/vendor/jamilih/package.json +1 -1
- package/vendor/mime/dist/types/other.js +719 -0
- package/vendor/mime/dist/types/standard.js +366 -0
- package/vendor/typeson-registry/dist/index.js +519 -99
- package/vendor/zod/classic/checks.d.ts +1 -0
- package/vendor/zod/classic/checks.js +1 -0
- package/vendor/zod/classic/coerce.d.ts +17 -0
- package/vendor/zod/classic/coerce.js +17 -0
- package/vendor/zod/classic/compat.d.ts +48 -0
- package/vendor/zod/classic/compat.js +31 -0
- package/vendor/zod/classic/deep-partial.d.ts +14 -0
- package/vendor/zod/classic/deep-partial.js +13 -0
- package/vendor/zod/classic/errors.d.ts +29 -0
- package/vendor/zod/classic/errors.js +57 -0
- package/vendor/zod/classic/external.d.ts +19 -0
- package/vendor/zod/classic/external.js +17 -0
- package/vendor/zod/classic/from-json-schema.d.ts +12 -0
- package/vendor/zod/classic/from-json-schema.js +660 -0
- package/vendor/zod/classic/in-out.d.ts +8 -0
- package/vendor/zod/classic/in-out.js +36 -0
- package/vendor/zod/classic/index.d.ts +3 -0
- package/vendor/zod/classic/index.js +4 -0
- package/vendor/zod/classic/iso.d.ts +7 -0
- package/vendor/zod/classic/iso.js +15 -0
- package/vendor/zod/classic/package.json +7 -0
- package/vendor/zod/classic/parse.d.ts +44 -0
- package/vendor/zod/classic/parse.js +16 -0
- package/vendor/zod/classic/schemas.d.ts +802 -0
- package/vendor/zod/classic/schemas.js +1491 -0
- package/vendor/zod/core/api.d.ts +329 -0
- package/vendor/zod/core/api.js +1104 -0
- package/vendor/zod/core/checks.d.ts +278 -0
- package/vendor/zod/core/checks.js +581 -0
- package/vendor/zod/core/compile.d.ts +51 -0
- package/vendor/zod/core/compile.js +1783 -0
- package/vendor/zod/core/core.d.ts +82 -0
- package/vendor/zod/core/core.js +141 -0
- package/vendor/zod/core/doc.d.ts +16 -0
- package/vendor/zod/core/doc.js +33 -0
- package/vendor/zod/core/errors.d.ts +225 -0
- package/vendor/zod/core/errors.js +270 -0
- package/vendor/zod/core/index.d.ts +19 -0
- package/vendor/zod/core/index.js +19 -0
- package/vendor/zod/core/json-schema-generator.d.ts +65 -0
- package/vendor/zod/core/json-schema-generator.js +99 -0
- package/vendor/zod/core/json-schema-processors.d.ts +49 -0
- package/vendor/zod/core/json-schema-processors.js +747 -0
- package/vendor/zod/core/json-schema.d.ts +89 -0
- package/vendor/zod/core/memoizer.d.ts +15 -0
- package/vendor/zod/core/memoizer.js +265 -0
- package/vendor/zod/core/package.json +7 -0
- package/vendor/zod/core/parse.d.ts +52 -0
- package/vendor/zod/core/parse.js +154 -0
- package/vendor/zod/core/regexes.d.ts +87 -0
- package/vendor/zod/core/regexes.js +150 -0
- package/vendor/zod/core/registries.d.ts +35 -0
- package/vendor/zod/core/registries.js +51 -0
- package/vendor/zod/core/schemas.d.ts +1253 -0
- package/vendor/zod/core/schemas.js +2440 -0
- package/vendor/zod/core/standard-schema.d.ts +126 -0
- package/vendor/zod/core/to-json-schema.d.ts +153 -0
- package/vendor/zod/core/to-json-schema.js +650 -0
- package/vendor/zod/core/util.d.ts +257 -0
- package/vendor/zod/core/util.js +846 -0
- package/vendor/zod/core/versions.d.ts +5 -0
- package/vendor/zod/core/versions.js +5 -0
- package/vendor/zod/core/visit.d.ts +30 -0
- package/vendor/zod/core/visit.js +169 -0
- package/vendor/zod/index.d.ts +3 -0
- package/vendor/zod/index.js +4 -0
- package/vendor/zod/locales/ar.d.ts +4 -0
- package/vendor/zod/locales/ar.js +109 -0
- package/vendor/zod/locales/az.d.ts +4 -0
- package/vendor/zod/locales/az.js +108 -0
- package/vendor/zod/locales/be.d.ts +4 -0
- package/vendor/zod/locales/be.js +166 -0
- package/vendor/zod/locales/bg.d.ts +4 -0
- package/vendor/zod/locales/bg.js +123 -0
- package/vendor/zod/locales/bn.d.ts +4 -0
- package/vendor/zod/locales/bn.js +111 -0
- package/vendor/zod/locales/ca.d.ts +4 -0
- package/vendor/zod/locales/ca.js +110 -0
- package/vendor/zod/locales/ckb.d.ts +4 -0
- package/vendor/zod/locales/ckb.js +131 -0
- package/vendor/zod/locales/cs.d.ts +4 -0
- package/vendor/zod/locales/cs.js +114 -0
- package/vendor/zod/locales/da.d.ts +4 -0
- package/vendor/zod/locales/da.js +118 -0
- package/vendor/zod/locales/de.d.ts +4 -0
- package/vendor/zod/locales/de.js +111 -0
- package/vendor/zod/locales/el.d.ts +4 -0
- package/vendor/zod/locales/el.js +110 -0
- package/vendor/zod/locales/en.d.ts +4 -0
- package/vendor/zod/locales/en.js +123 -0
- package/vendor/zod/locales/eo.d.ts +4 -0
- package/vendor/zod/locales/eo.js +112 -0
- package/vendor/zod/locales/es.d.ts +4 -0
- package/vendor/zod/locales/es.js +134 -0
- package/vendor/zod/locales/fa.d.ts +4 -0
- package/vendor/zod/locales/fa.js +117 -0
- package/vendor/zod/locales/fi.d.ts +4 -0
- package/vendor/zod/locales/fi.js +115 -0
- package/vendor/zod/locales/fr-CA.d.ts +4 -0
- package/vendor/zod/locales/fr-CA.js +110 -0
- package/vendor/zod/locales/fr.d.ts +4 -0
- package/vendor/zod/locales/fr.js +127 -0
- package/vendor/zod/locales/gu.d.ts +4 -0
- package/vendor/zod/locales/gu.js +111 -0
- package/vendor/zod/locales/he.d.ts +4 -0
- package/vendor/zod/locales/he.js +219 -0
- package/vendor/zod/locales/hi.d.ts +4 -0
- package/vendor/zod/locales/hi.js +109 -0
- package/vendor/zod/locales/hr.d.ts +4 -0
- package/vendor/zod/locales/hr.js +124 -0
- package/vendor/zod/locales/hu.d.ts +4 -0
- package/vendor/zod/locales/hu.js +111 -0
- package/vendor/zod/locales/hy.d.ts +4 -0
- package/vendor/zod/locales/hy.js +156 -0
- package/vendor/zod/locales/id.d.ts +4 -0
- package/vendor/zod/locales/id.js +109 -0
- package/vendor/zod/locales/index.d.ts +62 -0
- package/vendor/zod/locales/index.js +62 -0
- package/vendor/zod/locales/is.d.ts +4 -0
- package/vendor/zod/locales/is.js +112 -0
- package/vendor/zod/locales/it.d.ts +4 -0
- package/vendor/zod/locales/it.js +111 -0
- package/vendor/zod/locales/ja.d.ts +4 -0
- package/vendor/zod/locales/ja.js +110 -0
- package/vendor/zod/locales/ka.d.ts +4 -0
- package/vendor/zod/locales/ka.js +115 -0
- package/vendor/zod/locales/kh.d.ts +5 -0
- package/vendor/zod/locales/kh.js +5 -0
- package/vendor/zod/locales/km.d.ts +4 -0
- package/vendor/zod/locales/km.js +113 -0
- package/vendor/zod/locales/kn.d.ts +4 -0
- package/vendor/zod/locales/kn.js +114 -0
- package/vendor/zod/locales/ko.d.ts +4 -0
- package/vendor/zod/locales/ko.js +114 -0
- package/vendor/zod/locales/lt.d.ts +4 -0
- package/vendor/zod/locales/lt.js +205 -0
- package/vendor/zod/locales/mk.d.ts +4 -0
- package/vendor/zod/locales/mk.js +112 -0
- package/vendor/zod/locales/ms.d.ts +4 -0
- package/vendor/zod/locales/ms.js +110 -0
- package/vendor/zod/locales/ne.d.ts +4 -0
- package/vendor/zod/locales/ne.js +109 -0
- package/vendor/zod/locales/nl.d.ts +4 -0
- package/vendor/zod/locales/nl.js +113 -0
- package/vendor/zod/locales/nn.d.ts +4 -0
- package/vendor/zod/locales/nn.js +111 -0
- package/vendor/zod/locales/no.d.ts +4 -0
- package/vendor/zod/locales/no.js +111 -0
- package/vendor/zod/locales/ota.d.ts +4 -0
- package/vendor/zod/locales/ota.js +112 -0
- package/vendor/zod/locales/package.json +7 -0
- package/vendor/zod/locales/pl.d.ts +4 -0
- package/vendor/zod/locales/pl.js +112 -0
- package/vendor/zod/locales/ps.d.ts +4 -0
- package/vendor/zod/locales/ps.js +117 -0
- package/vendor/zod/locales/pt-BR.d.ts +4 -0
- package/vendor/zod/locales/pt-BR.js +141 -0
- package/vendor/zod/locales/pt.d.ts +4 -0
- package/vendor/zod/locales/pt.js +140 -0
- package/vendor/zod/locales/ro.d.ts +4 -0
- package/vendor/zod/locales/ro.js +120 -0
- package/vendor/zod/locales/ru.d.ts +4 -0
- package/vendor/zod/locales/ru.js +166 -0
- package/vendor/zod/locales/sk.d.ts +4 -0
- package/vendor/zod/locales/sk.js +114 -0
- package/vendor/zod/locales/sl.d.ts +4 -0
- package/vendor/zod/locales/sl.js +112 -0
- package/vendor/zod/locales/sv.d.ts +4 -0
- package/vendor/zod/locales/sv.js +113 -0
- package/vendor/zod/locales/ta.d.ts +4 -0
- package/vendor/zod/locales/ta.js +113 -0
- package/vendor/zod/locales/th.d.ts +4 -0
- package/vendor/zod/locales/th.js +113 -0
- package/vendor/zod/locales/tk.d.ts +4 -0
- package/vendor/zod/locales/tk.js +105 -0
- package/vendor/zod/locales/tr.d.ts +4 -0
- package/vendor/zod/locales/tr.js +108 -0
- package/vendor/zod/locales/ua.d.ts +5 -0
- package/vendor/zod/locales/ua.js +5 -0
- package/vendor/zod/locales/uk.d.ts +4 -0
- package/vendor/zod/locales/uk.js +111 -0
- package/vendor/zod/locales/ur.d.ts +4 -0
- package/vendor/zod/locales/ur.js +113 -0
- package/vendor/zod/locales/uz.d.ts +4 -0
- package/vendor/zod/locales/uz.js +111 -0
- package/vendor/zod/locales/vi.d.ts +4 -0
- package/vendor/zod/locales/vi.js +111 -0
- package/vendor/zod/locales/yo.d.ts +4 -0
- package/vendor/zod/locales/yo.js +110 -0
- package/vendor/zod/locales/zh-CN.d.ts +4 -0
- package/vendor/zod/locales/zh-CN.js +112 -0
- package/vendor/zod/locales/zh-TW.d.ts +4 -0
- package/vendor/zod/locales/zh-TW.js +110 -0
- package/vendor/zod/mini/checks.d.ts +1 -0
- package/vendor/zod/mini/checks.js +1 -0
- package/vendor/zod/mini/coerce.d.ts +7 -0
- package/vendor/zod/mini/coerce.js +22 -0
- package/vendor/zod/mini/deep-partial.d.ts +14 -0
- package/vendor/zod/mini/deep-partial.js +13 -0
- package/vendor/zod/mini/external.d.ts +16 -0
- package/vendor/zod/mini/external.js +16 -0
- package/vendor/zod/mini/in-out.d.ts +8 -0
- package/vendor/zod/mini/in-out.js +36 -0
- package/vendor/zod/mini/index.d.ts +3 -0
- package/vendor/zod/mini/index.js +3 -0
- package/vendor/zod/mini/iso.d.ts +22 -0
- package/vendor/zod/mini/iso.js +34 -0
- package/vendor/zod/mini/package.json +7 -0
- package/vendor/zod/mini/parse.d.ts +1 -0
- package/vendor/zod/mini/parse.js +1 -0
- package/vendor/zod/mini/schemas.d.ts +475 -0
- package/vendor/zod/mini/schemas.js +987 -0
- package/vendor/zod/package.json +7 -0
- package/vendor/zodexy/dist/esm/index.js +1274 -0
- package/vendor/zodexy/dist/index.js +1088 -0
- package/vendor/zodexy/dist/schema.zodexy.json +1036 -0
- package/dist/fundamentalTypes/nativeEnumType.d.ts +0 -6
- package/dist/fundamentalTypes/nativeEnumType.d.ts.map +0 -1
- package/src/fundamentalTypes/catchType.js +0 -140
- package/src/fundamentalTypes/enumType.js +0 -52
- package/src/fundamentalTypes/literalType.js +0 -81
- package/src/fundamentalTypes/nativeEnumType.js +0 -157
- package/src/fundamentalTypes/neverType.js +0 -49
- package/src/fundamentalTypes/recordType.js +0 -42
- package/src/fundamentalTypes/tupleType.js +0 -39
- package/src/fundamentalTypes/voidType.js +0 -48
- package/vendor/zod/lib/index.mjs +0 -4236
- package/vendor/zodex/dist/esm/dezerialize.d.ts +0 -26
- package/vendor/zodex/dist/esm/dezerialize.js +0 -393
- package/vendor/zodex/dist/esm/index.d.ts +0 -9
- package/vendor/zodex/dist/esm/index.js +0 -4
- package/vendor/zodex/dist/esm/infer.d.ts +0 -29
- package/vendor/zodex/dist/esm/package.json +0 -1
- package/vendor/zodex/dist/esm/types.d.ts +0 -201
- package/vendor/zodex/dist/esm/types.js +0 -13
- package/vendor/zodex/dist/esm/ui.d.ts +0 -23
- package/vendor/zodex/dist/esm/ui.js +0 -10
- package/vendor/zodex/dist/esm/zerialize.d.ts +0 -50
- package/vendor/zodex/dist/esm/zerialize.js +0 -417
- package/vendor/zodex/dist/esm/zod-types.d.ts +0 -11
- /package/vendor/{zodex/dist/esm/infer.js → zod/core/json-schema.js} +0 -0
- /package/vendor/{zodex/dist/esm/zod-types.js → zod/core/standard-schema.js} +0 -0
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
# Proposal: surfacing schema `meta` in viewUI / editUI
|
|
2
|
+
|
|
3
|
+
Status: draft / accepted for implementation
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Reveal the Zodexy `meta` bag carried on serialized schemas (`meta.title`,
|
|
8
|
+
`meta.description`, `meta.id`, `meta.deprecated`, and custom keys) in both
|
|
9
|
+
viewUI and editUI, move the primary "label" role from the schema's top-level
|
|
10
|
+
`description` to `meta.title`, and reserve `meta.description` for longer
|
|
11
|
+
explanatory prose shown only on hover.
|
|
12
|
+
|
|
13
|
+
The schema driving a given editUI session, and its metadata, are
|
|
14
|
+
developer-supplied inputs. The end user edits **data** that conforms to that
|
|
15
|
+
driving schema. (That data may itself be a schema — e.g. when jsoe is driven by
|
|
16
|
+
`vendor/zodexy/dist/schema.zodexy.json` to author a Zodexy schema — but the
|
|
17
|
+
schema *guiding* the session is still not user-editable.) Nothing in this
|
|
18
|
+
proposal makes the driving schema or its metadata editable in that session;
|
|
19
|
+
the metadata affordance renders in edit mode too, but strictly read-only, so
|
|
20
|
+
the person entering a value can see field guidance.
|
|
21
|
+
|
|
22
|
+
## 1. What the serialized schema gives us
|
|
23
|
+
|
|
24
|
+
Zodexy's `zerialize` emits metadata in two places on each `SzType`:
|
|
25
|
+
|
|
26
|
+
| Author writes | Serialized output | Notes |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| `.describe('x')` / `.meta({description:'x'})` (nothing else) | top-level `description: 'x'` **only** | `meta` is suppressed when it is exactly `{description}` |
|
|
29
|
+
| `.meta({title, description, id, deprecated, …custom})` | `meta: {…}` (plus a top-level `description` mirror if `description` is among the keys) | the full bag survives round-trip via `dezerializeRefs` |
|
|
30
|
+
|
|
31
|
+
Consequence that drives the design: **a bare `description` is ambiguous** —
|
|
32
|
+
jsoe cannot tell whether the author meant a short label or long prose. The
|
|
33
|
+
distinction only becomes real once `meta.title` (or another `meta` key) is
|
|
34
|
+
present, which is what forces `meta` to be serialized in full. Therefore:
|
|
35
|
+
|
|
36
|
+
- `meta.title` present → it is the visible label; `meta.description` is now
|
|
37
|
+
free to be long-form / tooltip-only.
|
|
38
|
+
- only top-level `description` → keep treating it as the visible label
|
|
39
|
+
(today's behavior, unchanged).
|
|
40
|
+
|
|
41
|
+
Today jsoe reads `schemaObject.description` in ~40 places
|
|
42
|
+
(`src/fundamentalTypes/arrayType.js`, the `title=` attributes in every leaf
|
|
43
|
+
type's `viewUI`/`editUI`, and the type pull-down label in
|
|
44
|
+
`src/types.js` `getOptionForType`). There is **no** `meta` handling anywhere.
|
|
45
|
+
|
|
46
|
+
### Canonical example: `schema.zodexy.json`
|
|
47
|
+
|
|
48
|
+
Zodexy's own meta-schema (`vendor/zodexy/dist/schema.zodexy.json`, which drives
|
|
49
|
+
schema-editing sessions) has already migrated: ~51 nodes now carry
|
|
50
|
+
`meta: {title: …}` instead of a bare `description`. It also models the `meta`
|
|
51
|
+
bag itself as `{id?, title?, description?, deprecated?} & record<string,
|
|
52
|
+
unknown>` — i.e. exactly the reserved keys below plus arbitrary custom keys, so
|
|
53
|
+
`RESERVED` in the resolver matches Zodexy's own definition. This file is the
|
|
54
|
+
natural integration fixture: exercising the schema demo already drives the new
|
|
55
|
+
label path.
|
|
56
|
+
|
|
57
|
+
One carry-over: Zodexy uses the sentinel string `"Modifiers"` (previously a
|
|
58
|
+
`description`, now `meta.title`) that `formats/schema.js` `mergeSchema` already
|
|
59
|
+
filters out of intersection merges — see §5.
|
|
60
|
+
|
|
61
|
+
## 2. One resolver, one render point
|
|
62
|
+
|
|
63
|
+
### `src/utils/schemaMeta.js`
|
|
64
|
+
|
|
65
|
+
Normalize the metadata bag and centralize precedence:
|
|
66
|
+
|
|
67
|
+
```js
|
|
68
|
+
const RESERVED = new Set(['title', 'description', 'id', 'deprecated']);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @param {import('../formats/schema.js').ZodexSchema} [s]
|
|
72
|
+
* @returns {{
|
|
73
|
+
* label: string|undefined, // short, visible
|
|
74
|
+
* longText: string|undefined, // prose for the tooltip only
|
|
75
|
+
* id: string|undefined,
|
|
76
|
+
* deprecated: boolean|string|undefined,
|
|
77
|
+
* custom: [string, unknown][], // everything else in meta
|
|
78
|
+
* jsoe: object|undefined, // meta.jsoe directive bag (see §7)
|
|
79
|
+
* rows: [string, string][], // key→value for the popover table
|
|
80
|
+
* hasAny: boolean
|
|
81
|
+
* }}
|
|
82
|
+
*/
|
|
83
|
+
export function resolveSchemaMeta (s) { /* … */ }
|
|
84
|
+
|
|
85
|
+
/** Terse call-site sugar used by arrayType.js child labels. */
|
|
86
|
+
export const schemaLabel = (s, fallback) =>
|
|
87
|
+
resolveSchemaMeta(s).label ?? fallback;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Precedence:
|
|
91
|
+
|
|
92
|
+
- `label` = `meta.title` ?? `meta.description` ?? top-level `description`
|
|
93
|
+
(drop the last term once `.description` on the schema is finally removed).
|
|
94
|
+
- `longText` = `meta.description` **only when** `meta.title` exists (otherwise
|
|
95
|
+
`meta.description` is already serving as the label; don't repeat it).
|
|
96
|
+
- `id`, `deprecated`, `custom` never become visible labels — tooltip table only.
|
|
97
|
+
- `custom` = `Object.entries(meta)` minus `RESERVED` minus `jsoe`.
|
|
98
|
+
|
|
99
|
+
### Render point
|
|
100
|
+
|
|
101
|
+
`src/types.js` `getUIForModeAndType` wraps every type root for both modes and
|
|
102
|
+
already does `this.schemasForRoots.set(root, specificSchemaObject)`. Immediately
|
|
103
|
+
after building `root`, append a single metadata affordance when
|
|
104
|
+
`resolveSchemaMeta(specificSchemaObject).hasAny`. Universal coverage from one
|
|
105
|
+
edit — every fundamental/super/sub type, view and edit, nested or root —
|
|
106
|
+
instead of touching 40 call sites. Deprecated schemas additionally get
|
|
107
|
+
`root.classList.add('schema-deprecated')` for a CSS strikethrough on the
|
|
108
|
+
legend.
|
|
109
|
+
|
|
110
|
+
## 3. The affordance: a toggled metadata table
|
|
111
|
+
|
|
112
|
+
The `ⓘ` marker is a `span[role="button"]` (not a real `<button>`, so bare
|
|
113
|
+
`getInput` selectors such as `$e(root, 'button')` in `arrayType`/`noneditable`
|
|
114
|
+
never mistake it for the type's own control) that toggles a
|
|
115
|
+
`<table class="schema-meta-table">` of key→value rows, in the spirit of the
|
|
116
|
+
`+`/`-` show/hide toggler in `arrayType.js`.
|
|
117
|
+
|
|
118
|
+
As implemented (`src/utils/schemaMeta.js`, `appendSchemaMeta`):
|
|
119
|
+
|
|
120
|
+
- The marker glyph comes from CSS (`.schema-meta-toggle::before {content:"\24D8"}`),
|
|
121
|
+
not a text node, so an untouched affordance adds **no text** to the type root
|
|
122
|
+
— existing `.text()` / `have.text` assertions and a11y snapshots stay stable.
|
|
123
|
+
- The table is built **lazily on first activation** and appended after the
|
|
124
|
+
marker; `click` and `keydown` (Enter/Space) both toggle it, keeping
|
|
125
|
+
`aria-expanded` in sync.
|
|
126
|
+
- `metaTooltipText(rows)` fills the marker's `title=` so all rows are available
|
|
127
|
+
on hover without opening the table (same technique as
|
|
128
|
+
`src/fundamentalTypes/functionType.js`).
|
|
129
|
+
- `metaTable(rows)` builds the rows in order: Title, Description, `ID`,
|
|
130
|
+
`Deprecated`, each custom key, then `jsoe.<key>` entries.
|
|
131
|
+
- The affordance is **appended as the last child** of the type root, not
|
|
132
|
+
prepended: tests and internal code select the type's label via
|
|
133
|
+
`root > span` / `root > *:first-child`. The two `arrayType.js` helpers that
|
|
134
|
+
walk a root from its end (`$getArrayItems`, `$getAddArrayElement`) use a new
|
|
135
|
+
`lastTypeChild(el)` helper (also in `schemaMeta.js`) that skips a trailing
|
|
136
|
+
`.schema-meta`.
|
|
137
|
+
- New CSS in `src/jsoe.css`: `.schema-meta`, `.schema-meta-toggle`
|
|
138
|
+
(+`::before` glyph), `.schema-meta-table` (small, bordered,
|
|
139
|
+
`border-collapse`).
|
|
140
|
+
- **Deprecation** shows in both modes. `appendSchemaMeta` adds
|
|
141
|
+
`.schema-deprecated` to the type root and, since a type's own root is
|
|
142
|
+
usually not where its label lives, the always-present toggle carries the
|
|
143
|
+
reliable signal: a muted-red glyph plus a CSS `::after` "deprecated" tag
|
|
144
|
+
(pseudo-element, so no `.text()` pollution). The label itself is struck
|
|
145
|
+
through where the class lands on an element that *is* a label — an inline
|
|
146
|
+
leaf root (`span`/`b`/`i`) in viewUI, and in editUI the property/item
|
|
147
|
+
`<legend>`, which `arrayType.js`'s `buildLegend` marks via
|
|
148
|
+
`deprecatedClassSuffix(schema)` (from `schemaMeta.js`, alongside
|
|
149
|
+
`isDeprecated`).
|
|
150
|
+
|
|
151
|
+
This is also the seam where **constraint display** (`min`/`max`/`kind`/
|
|
152
|
+
`format` — the existing README to-do "show more schema data in viewUI") later
|
|
153
|
+
plugs in: `metaTable` gains a few rows sourced from the schema object itself
|
|
154
|
+
rather than from `meta`.
|
|
155
|
+
|
|
156
|
+
## 4. Targeted edits beyond the central one
|
|
157
|
+
|
|
158
|
+
| Location | Change |
|
|
159
|
+
|---|---|
|
|
160
|
+
| `types.js` `getOptionForType` | `schemaContent.description` → `resolveSchemaMeta(schemaContent).label`; keep the `(…)` parens |
|
|
161
|
+
| `arrayType.js` ~40 `?.description` reads (record key/value, tuple items/rest, object property names, element labels) | mechanical swap to `schemaLabel(x, propName)`; long `meta.description` for these children already shows via each child root's own `ⓘ` marker |
|
|
162
|
+
| Leaf `viewUI`/`editUI` (`stringType`, `numberType`, …) | `title: specificSchemaObject?.description ?? 'String'` → `title: schemaLabel(specificSchemaObject, 'String')`; the metadata `ⓘ` is added by the wrapper, not here |
|
|
163
|
+
|
|
164
|
+
The `arrayType.js` sweep must preserve every current visible label and tooltip
|
|
165
|
+
exactly for schemas that only carry a top-level `description`.
|
|
166
|
+
|
|
167
|
+
## 5. `formats/schema.js` plumbing so `meta` survives composition
|
|
168
|
+
|
|
169
|
+
- **`addModifiers`** — add a `meta` branch next to the existing `description`
|
|
170
|
+
one: shallow-merge the wrapper's `meta` into each option; concatenate
|
|
171
|
+
`meta.title` / `meta.description` with `" and "` exactly as `description` is
|
|
172
|
+
concatenated today. Without this, `z.union([...]).meta({...})` drops its
|
|
173
|
+
metadata.
|
|
174
|
+
- **`mergeSchema`** (intersection) — explicit key-wise `meta` merge: union of
|
|
175
|
+
custom keys, `title`/`description` concatenated with `" and "` like
|
|
176
|
+
`description` already is. Extend the existing `val !== 'Modifiers'` guard
|
|
177
|
+
(currently only on `description`) to `meta.title` as well, since Zodexy moved
|
|
178
|
+
that sentinel from `description` to `meta.title`.
|
|
179
|
+
- `splitConstrainedSchema` — `...schema` spread already carries `meta`; no
|
|
180
|
+
change.
|
|
181
|
+
- `dezerialize` / `getValidationSchema` — no change; Zodexy already strips and
|
|
182
|
+
re-applies `meta` cleanly, and `parseValue` is unaffected.
|
|
183
|
+
|
|
184
|
+
## 6. `meta.description` → `meta.title` migration
|
|
185
|
+
|
|
186
|
+
- `vendor/zodexy/dist/schema.zodexy.json` is already migrated (§1) — no work,
|
|
187
|
+
and it becomes the reference for the pattern.
|
|
188
|
+
- Fixtures in `demo/*.js`: where `description` is a short noun (`'Emoji'`,
|
|
189
|
+
`'Container'`, `'A number'`) → `meta: {title: …}`; where it is genuine prose
|
|
190
|
+
→ `meta: {description: …}`.
|
|
191
|
+
- Because the resolver falls back `title ?? description ?? description`, every
|
|
192
|
+
existing schema keeps rendering identically until it is migrated.
|
|
193
|
+
- `CHANGES.md` + `README.md` schema section: announce `meta` support, the `ⓘ`
|
|
194
|
+
affordance, and the deprecation of `.description` directly on the schema
|
|
195
|
+
(prefer `meta.description`).
|
|
196
|
+
|
|
197
|
+
## 7. Reserved namespace: `meta.jsoe`
|
|
198
|
+
|
|
199
|
+
Custom `meta` keys are shown in the tooltip table as-is. The single key
|
|
200
|
+
`meta.jsoe` is **reserved** for jsoe's own layout/UI directives, so user
|
|
201
|
+
metadata never collides with them.
|
|
202
|
+
|
|
203
|
+
Implemented now: `meta.jsoe.*` entries are surfaced in the metadata table
|
|
204
|
+
(prefixed `jsoe.<key>`) so a schema author can see them round-trip. Acting on
|
|
205
|
+
them is a follow-up — e.g. `meta.jsoe.tableView` to flatten an
|
|
206
|
+
array-of-arrays into a table (currently the normal Array controls still
|
|
207
|
+
render).
|
|
208
|
+
|
|
209
|
+
## 8. Out of scope
|
|
210
|
+
|
|
211
|
+
- Editing the schema that drives the current editUI session, or its `meta` —
|
|
212
|
+
jsoe edits data conforming to that schema (which may itself be a schema), not
|
|
213
|
+
the schema guiding the session.
|
|
214
|
+
- Folding constraint display (`min`/`max`/`kind`/`format`) into the metadata
|
|
215
|
+
table — a follow-up once the table ships (see §3).
|
|
216
|
+
- Acting on `meta.jsoe` directives (e.g. `tableView`) — surfaced but not yet
|
|
217
|
+
wired to rendering (see §7).
|
|
218
|
+
|
|
219
|
+
## 9. Tests
|
|
220
|
+
|
|
221
|
+
- Extend `cypress/e2e/fundamentalTypes/array.cy.js` and siblings: assert the
|
|
222
|
+
visible label comes from `meta.title`, the `ⓘ` marker's `title` contains
|
|
223
|
+
`id` / `deprecated` / custom rows, and a `deprecated` schema adds
|
|
224
|
+
`.schema-deprecated`.
|
|
225
|
+
- Keep `schemaMeta.js` free of stray `console.log(obj)` lines — several specs
|
|
226
|
+
stub `window.console.log`.
|
|
227
|
+
|
|
228
|
+
## Summary of the change surface
|
|
229
|
+
|
|
230
|
+
One new util (`src/utils/schemaMeta.js`), one insertion in
|
|
231
|
+
`getUIForModeAndType`, one label-precedence change in `getOptionForType`, a
|
|
232
|
+
mechanical `schemaLabel()` sweep through `arrayType.js`, and `meta` merge logic
|
|
233
|
+
in `formats/schema.js`. Existing schemas are unaffected until migrated.
|
package/eslint.config.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import ashNazg from 'eslint-config-ash-nazg';
|
|
2
|
+
// import {
|
|
3
|
+
// parser as typescriptEslintParser
|
|
4
|
+
// } from 'typescript-eslint';
|
|
2
5
|
|
|
3
6
|
export default [
|
|
4
7
|
{
|
|
@@ -10,9 +13,25 @@ export default [
|
|
|
10
13
|
'src/deepEqual.js',
|
|
11
14
|
'vendor',
|
|
12
15
|
'typings/**',
|
|
13
|
-
'dist'
|
|
16
|
+
'dist',
|
|
17
|
+
'docs'
|
|
14
18
|
]
|
|
15
19
|
},
|
|
20
|
+
// {
|
|
21
|
+
// languageOptions: {
|
|
22
|
+
// parser: typescriptEslintParser,
|
|
23
|
+
// parserOptions: {
|
|
24
|
+
// projectService: {
|
|
25
|
+
// // eslint-disable-next-line camelcase -- API
|
|
26
|
+
// maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING: 500,
|
|
27
|
+
// allowDefaultProject: [
|
|
28
|
+
// '*.js', '.ncurc.cjs', 'demo/*.js'
|
|
29
|
+
// ]
|
|
30
|
+
// },
|
|
31
|
+
// tsconfigRootDir: import.meta.dirname
|
|
32
|
+
// }
|
|
33
|
+
// }
|
|
34
|
+
// },
|
|
16
35
|
...ashNazg(['sauron', 'browser']),
|
|
17
36
|
{
|
|
18
37
|
name: 'JSOE/Coverage',
|
|
@@ -31,7 +50,13 @@ export default [
|
|
|
31
50
|
name: 'JSOE/Cypress',
|
|
32
51
|
files: ['cypress/**'],
|
|
33
52
|
rules: {
|
|
34
|
-
'unicorn/no-empty-file': 'off'
|
|
53
|
+
'unicorn/no-empty-file': 'off',
|
|
54
|
+
// Cypress auto-handles
|
|
55
|
+
'mocha/no-async-in-sync-tests': 0,
|
|
56
|
+
// Redundant
|
|
57
|
+
'sonarjs/no-fixed-wait-in-tests': 0,
|
|
58
|
+
'sonarjs/assertions-in-tests': 0,
|
|
59
|
+
'sonarjs/no-empty-test-file': 0 // Bug
|
|
35
60
|
}
|
|
36
61
|
},
|
|
37
62
|
{
|
|
@@ -40,8 +65,17 @@ export default [
|
|
|
40
65
|
'no-console': 0,
|
|
41
66
|
'no-shadow': 0,
|
|
42
67
|
|
|
68
|
+
// For now
|
|
69
|
+
'jsdoc/reject-any-type': 0,
|
|
70
|
+
'jsdoc/reject-function-type': 0,
|
|
71
|
+
'unicorn/no-this-outside-of-class': 0,
|
|
72
|
+
'sonarjs/prefer-regexp-exec': 0,
|
|
73
|
+
|
|
74
|
+
// Too cumbersome with @type casts
|
|
75
|
+
'@stylistic/max-len': 0,
|
|
76
|
+
|
|
43
77
|
'@stylistic/quotes': ['error', 'single', {
|
|
44
|
-
avoidEscape: true, allowTemplateLiterals:
|
|
78
|
+
avoidEscape: true, allowTemplateLiterals: 'always'
|
|
45
79
|
}],
|
|
46
80
|
|
|
47
81
|
'jsdoc/require-jsdoc': ['warn', {
|
|
@@ -68,7 +102,20 @@ export default [
|
|
|
68
102
|
'prefer-named-capture-group': 0,
|
|
69
103
|
// Disable; waiting on https://github.com/mysticatea/eslint-plugin-node/issues/162
|
|
70
104
|
'n/no-unpublished-import': 0,
|
|
71
|
-
'unicorn/no-this-assignment': 0
|
|
105
|
+
'unicorn/no-this-assignment': 0,
|
|
106
|
+
|
|
107
|
+
// Disable in ash-nazg?
|
|
108
|
+
'unicorn/no-top-level-assignment-in-function': 0,
|
|
109
|
+
'unicorn/no-top-level-side-effects': 0
|
|
110
|
+
|
|
111
|
+
// Good but slow
|
|
112
|
+
// 'jsdoc/no-unnecessary-type-assertion': ['error', {
|
|
113
|
+
// checkLiteralConstAssertions: false,
|
|
114
|
+
// treatAnyAsRedundant: false,
|
|
115
|
+
// typesToIgnore: [
|
|
116
|
+
// `import('../types.js').SuperTypeObject`
|
|
117
|
+
// ]
|
|
118
|
+
// }]
|
|
72
119
|
}
|
|
73
120
|
}
|
|
74
121
|
];
|
package/licenseInfo.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@es-joy/jsoe",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./src/index.js",
|
|
@@ -10,9 +10,15 @@
|
|
|
10
10
|
"import": "./src/index.js"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
|
+
"imports": {
|
|
14
|
+
"#jsoe/*": {
|
|
15
|
+
"types": "./src/*",
|
|
16
|
+
"default": "./instrumented/*"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
13
19
|
"description": "Editing of arbitrary JavaScript objects",
|
|
14
20
|
"browserslist": [
|
|
15
|
-
"
|
|
21
|
+
"baseline widely available, not op_mini all"
|
|
16
22
|
],
|
|
17
23
|
"nyc": {
|
|
18
24
|
"excludeAfterRemap": true,
|
|
@@ -22,46 +28,48 @@
|
|
|
22
28
|
]
|
|
23
29
|
},
|
|
24
30
|
"dependencies": {
|
|
25
|
-
"@
|
|
26
|
-
"acorn": "^8.
|
|
27
|
-
"jamilih": "0.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
31
|
+
"@node-static/node-static": "^0.9.1",
|
|
32
|
+
"acorn": "^8.18.0",
|
|
33
|
+
"jamilih": "0.69.0",
|
|
34
|
+
"mime": "^4.1.0",
|
|
35
|
+
"sceditor": "3.2.1",
|
|
36
|
+
"typeson-registry": "14.5.0",
|
|
37
|
+
"zod": "^4.5.4",
|
|
38
|
+
"zodexy": "^0.30.1"
|
|
32
39
|
},
|
|
33
40
|
"devDependencies": {
|
|
34
|
-
"@babel/core": "^
|
|
35
|
-
"@babel/plugin-transform-modules-commonjs": "^
|
|
36
|
-
"@babel/preset-env": "^
|
|
37
|
-
"@babel/register": "^
|
|
38
|
-
"@cypress/code-coverage": "^
|
|
39
|
-
"@rollup/plugin-babel": "^
|
|
40
|
-
"@rollup/plugin-commonjs": "^
|
|
41
|
-
"@rollup/plugin-
|
|
42
|
-
"@rollup/plugin-
|
|
43
|
-
"@
|
|
44
|
-
"@types/
|
|
45
|
-
"
|
|
41
|
+
"@babel/core": "^8.0.1",
|
|
42
|
+
"@babel/plugin-transform-modules-commonjs": "^8.0.1",
|
|
43
|
+
"@babel/preset-env": "^8.0.2",
|
|
44
|
+
"@babel/register": "^8.0.1",
|
|
45
|
+
"@cypress/code-coverage": "^4.0.3",
|
|
46
|
+
"@rollup/plugin-babel": "^7.1.0",
|
|
47
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
48
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
49
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
50
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
51
|
+
"@types/jsdom": "^30.0.0",
|
|
52
|
+
"@types/node": "^26.4.1",
|
|
53
|
+
"axe-core": "^4.13.0",
|
|
46
54
|
"coveradge": "^0.8.2",
|
|
47
|
-
"cypress": "^
|
|
48
|
-
"cypress-axe": "^1.
|
|
49
|
-
"cypress-terminal-report": "^7.
|
|
50
|
-
"eslint": "^9.
|
|
51
|
-
"eslint-config-ash-nazg": "^
|
|
55
|
+
"cypress": "^16.0.0",
|
|
56
|
+
"cypress-axe": "^1.7.0",
|
|
57
|
+
"cypress-terminal-report": "^7.3.3",
|
|
58
|
+
"eslint": "^10.9.1",
|
|
59
|
+
"eslint-config-ash-nazg": "^43.1.6",
|
|
52
60
|
"fast-deep-equal": "^3.1.3",
|
|
53
|
-
"jsdom": "^
|
|
54
|
-
"license-badger": "^0.
|
|
61
|
+
"jsdom": "^30.0.1",
|
|
62
|
+
"license-badger": "^0.23.0",
|
|
55
63
|
"npm-run-all": "^4.1.5",
|
|
56
|
-
"nyc": "^
|
|
57
|
-
"open-cli": "^
|
|
58
|
-
"rimraf": "^6.
|
|
59
|
-
"rollup": "4.
|
|
64
|
+
"nyc": "^18.0.0",
|
|
65
|
+
"open-cli": "^9.0.0",
|
|
66
|
+
"rimraf": "^6.1.3",
|
|
67
|
+
"rollup": "4.63.1",
|
|
60
68
|
"rollup-plugin-istanbul": "^5.0.0",
|
|
61
|
-
"rollup-plugin-no-op": "^1.0.2",
|
|
62
69
|
"rollup-plugin-node-builtins": "^2.1.2",
|
|
63
|
-
"typescript": "^
|
|
64
|
-
"
|
|
70
|
+
"typescript": "^6.0.3",
|
|
71
|
+
"typescript-eslint": "^8.69.0",
|
|
72
|
+
"typeson": "^10.3.0",
|
|
65
73
|
"webappfind-demos-samples": "^0.7.0"
|
|
66
74
|
},
|
|
67
75
|
"repository": {
|
|
@@ -76,13 +84,14 @@
|
|
|
76
84
|
"author": "Brett Zamir",
|
|
77
85
|
"contributors": [],
|
|
78
86
|
"engines": {
|
|
79
|
-
"node": ">=
|
|
87
|
+
"node": "^20.11.0 || >= 22.0.0"
|
|
80
88
|
},
|
|
81
89
|
"bugs": "https://github.com/es-joy/jsoe/issues",
|
|
82
90
|
"license": "MIT",
|
|
83
91
|
"homepage": "https://github.com/es-joy/jsoe#readme",
|
|
84
92
|
"scripts": {
|
|
85
93
|
"tsc": "tsc",
|
|
94
|
+
"tsc:ts7": "npx -y -p typescript@^7 -c \"tsc\"",
|
|
86
95
|
"tsc-cypress": "tsc -p cypress/tsconfig.json",
|
|
87
96
|
"license-badge": "license-badger --corrections --uncategorizedLicenseTemplate \"\\${license} (\\${name} (\\${version}))\" --filteredTypes=nonempty --textTemplate \"License types\n(project, deps, and bundled devDeps)\" --packageJson --production badges/licenses-badge.svg",
|
|
88
97
|
"eslint": "eslint .",
|
|
@@ -99,13 +108,14 @@
|
|
|
99
108
|
"instrument-remove": "run-p -c instrument-remove-cache instrument-remove-instrumented",
|
|
100
109
|
"copy-pages": "cp node_modules/sceditor/minified/themes/default.min.css vendor/sceditor/minified/themes/default.min.css && cp node_modules/sceditor/minified/sceditor.min.js vendor/sceditor/minified/sceditor.min.js && cp node_modules/sceditor/minified/formats/bbcode.js vendor/sceditor/minified/formats/bbcode.js && cp node_modules/sceditor/minified/formats/xhtml.js vendor/sceditor/minified/formats/xhtml.js",
|
|
101
110
|
"copy-index": "echo \"Copy our index.html file too? \"",
|
|
102
|
-
"copy-jamilih": "cp node_modules/jamilih/dist/jml
|
|
111
|
+
"copy-jamilih": "cp node_modules/jamilih/dist/jml.mjs vendor/jamilih/dist/jml.mjs",
|
|
103
112
|
"copy-typeson-registry": "cp node_modules/typeson-registry/dist/index.js vendor/typeson-registry/dist/index.js",
|
|
104
|
-
"copy-zod": "cp node_modules/zod/
|
|
105
|
-
"copy-
|
|
106
|
-
"copy-acorn": "cp -R node_modules/acorn/dist vendor/acorn
|
|
107
|
-
"copy": "
|
|
108
|
-
"
|
|
113
|
+
"copy-zod": "rimraf vendor/zod && cp -R node_modules/zod/v4 vendor/zod && rimraf -g vendor/zod/**/*.cjs && rimraf -g vendor/zod/**/*.cts && rimraf -g vendor/zod/*.cjs && rimraf -g vendor/zod/*.cts",
|
|
114
|
+
"copy-zodexy": "cp -R node_modules/zodexy/dist/esm vendor/zodexy/dist && cp node_modules/zodexy/dist/schema.zodexy.json vendor/zodexy/dist/schema.zodexy.json",
|
|
115
|
+
"copy-acorn": "cp -R node_modules/acorn/dist vendor/acorn",
|
|
116
|
+
"copy-mime": "mkdir -p vendor/mime/dist/types && cp node_modules/mime/dist/types/standard.js vendor/mime/dist/types/standard.js && cp node_modules/mime/dist/types/other.js vendor/mime/dist/types/other.js",
|
|
117
|
+
"copy": "run-p copy-jamilih copy-typeson-registry copy-zod copy-zodexy copy-acorn copy-mime",
|
|
118
|
+
"instrument": "NODE_OPTIONS=--max-old-space-size=8192 run-s -c instrument-remove instrument-add copy-index rollup",
|
|
109
119
|
"coveradge": "coveradge badges/coverage-badge.svg",
|
|
110
120
|
"cypress:log": "ELECTRON_ENABLE_LOGGING=1 cypress run; npm run report",
|
|
111
121
|
"cypress": "cypress run --spec cypress/e2e/all.cy.js; npm run report && npm run coveradge",
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
allowBuilds:
|
|
2
|
+
core-js-bundle: true
|
|
3
|
+
cypress: true
|
|
4
|
+
es5-ext: true
|
|
5
|
+
is-hidden-file: true
|
|
6
|
+
unrs-resolver: true
|
|
7
|
+
|
|
8
|
+
minimumReleaseAgeExclude:
|
|
9
|
+
- jamilih@0.68.0 || 0.68.1 || 0.69.0
|
|
10
|
+
- cypress@15.20.1 || 15.21.0 || 16.0.0
|
|
11
|
+
- '@es-joy/jsdoccomment@0.95.0 || 0.95.1'
|
|
12
|
+
- '@typescript-eslint/types@8.67.0 || 8.69.0'
|
|
13
|
+
- eslint-config-ash-nazg@42.3.0 || 42.5.0 || 43.0.1 || 43.1.0 || 43.1.2 || 43.1.5 || 43.1.6
|
|
14
|
+
- eslint-plugin-jsdoc@64.1.0 || 64.2.1 || 64.3.0 || 64.3.2 || 64.3.3
|
|
15
|
+
- jsdoc-type-pratt-parser@9.1.1 || 9.1.2
|
|
16
|
+
- zodexy@0.21.1 || 0.21.2 || 0.22.0 || 0.23.0 || 0.24.0 || 0.24.1 || 0.25.0 || 0.26.0 || 0.26.1 || 0.27.0 || 0.30.0 || 0.30.1
|
|
17
|
+
- typeson-registry@13.0.1 || 13.1.0 || 14.4.0 || 14.5.0
|
|
18
|
+
- typeson@10.1.1 || 10.2.0 || 10.3.0
|
|
19
|
+
- '@rollup/rollup-android-arm-eabi@4.63.1'
|
|
20
|
+
- '@rollup/rollup-android-arm64@4.63.1'
|
|
21
|
+
- '@rollup/rollup-darwin-arm64@4.63.1'
|
|
22
|
+
- '@rollup/rollup-darwin-x64@4.63.1'
|
|
23
|
+
- '@rollup/rollup-freebsd-arm64@4.63.1'
|
|
24
|
+
- '@rollup/rollup-freebsd-x64@4.63.1'
|
|
25
|
+
- '@rollup/rollup-linux-arm-gnueabihf@4.63.1'
|
|
26
|
+
- '@rollup/rollup-linux-arm-musleabihf@4.63.1'
|
|
27
|
+
- '@rollup/rollup-linux-arm64-gnu@4.63.1'
|
|
28
|
+
- '@rollup/rollup-linux-arm64-musl@4.63.1'
|
|
29
|
+
- '@rollup/rollup-linux-loong64-gnu@4.63.1'
|
|
30
|
+
- '@rollup/rollup-linux-loong64-musl@4.63.1'
|
|
31
|
+
- '@rollup/rollup-linux-ppc64-gnu@4.63.1'
|
|
32
|
+
- '@rollup/rollup-linux-ppc64-musl@4.63.1'
|
|
33
|
+
- '@rollup/rollup-linux-riscv64-gnu@4.63.1'
|
|
34
|
+
- '@rollup/rollup-linux-riscv64-musl@4.63.1'
|
|
35
|
+
- '@rollup/rollup-linux-s390x-gnu@4.63.1'
|
|
36
|
+
- '@rollup/rollup-linux-x64-gnu@4.63.1'
|
|
37
|
+
- '@rollup/rollup-linux-x64-musl@4.63.1'
|
|
38
|
+
- '@rollup/rollup-openbsd-x64@4.63.1'
|
|
39
|
+
- '@rollup/rollup-openharmony-arm64@4.63.1'
|
|
40
|
+
- '@rollup/rollup-win32-arm64-msvc@4.63.1'
|
|
41
|
+
- '@rollup/rollup-win32-ia32-msvc@4.63.1'
|
|
42
|
+
- '@rollup/rollup-win32-x64-gnu@4.63.1'
|
|
43
|
+
- '@rollup/rollup-win32-x64-msvc@4.63.1'
|
|
44
|
+
- eslint-plugin-escompat@3.11.6 || 3.12.0
|
|
45
|
+
- rollup@4.63.1
|
|
46
|
+
- zod@4.5.2 || 4.5.4
|
|
47
|
+
- '@typescript-eslint/eslint-plugin@8.69.0'
|
|
48
|
+
- '@typescript-eslint/parser@8.69.0'
|
|
49
|
+
- '@typescript-eslint/project-service@8.69.0'
|
|
50
|
+
- '@typescript-eslint/scope-manager@8.69.0'
|
|
51
|
+
- '@typescript-eslint/tsconfig-utils@8.69.0'
|
|
52
|
+
- '@typescript-eslint/type-utils@8.69.0'
|
|
53
|
+
- '@typescript-eslint/typescript-estree@8.69.0'
|
|
54
|
+
- '@typescript-eslint/utils@8.69.0'
|
|
55
|
+
- '@typescript-eslint/visitor-keys@8.69.0'
|
|
56
|
+
- typescript-eslint@8.69.0
|
|
57
|
+
- '@types/node@26.4.1'
|
package/rollup.config.js
CHANGED
|
@@ -3,18 +3,19 @@ import {nodeResolve} from '@rollup/plugin-node-resolve';
|
|
|
3
3
|
import commonjs from '@rollup/plugin-commonjs';
|
|
4
4
|
// import babel from 'rollup-plugin-babel';
|
|
5
5
|
import terser from '@rollup/plugin-terser';
|
|
6
|
+
import json from '@rollup/plugin-json';
|
|
6
7
|
import istanbul from 'rollup-plugin-istanbul';
|
|
7
|
-
import noOp from 'rollup-plugin-no-op';
|
|
8
8
|
|
|
9
9
|
export default [{
|
|
10
10
|
input: 'src/index.js',
|
|
11
|
-
external: ['react'], // Todo: remove when removed from Zodex
|
|
12
11
|
output: {
|
|
13
12
|
sourcemap: true,
|
|
14
13
|
file: 'dist/index.js',
|
|
15
14
|
format: 'es'
|
|
16
15
|
},
|
|
17
16
|
plugins: [
|
|
17
|
+
builtins(),
|
|
18
|
+
json(),
|
|
18
19
|
terser({
|
|
19
20
|
/* eslint-disable camelcase -- API */
|
|
20
21
|
// Needed for Typeson's `Undefined` and other constructor detection
|
|
@@ -22,7 +23,7 @@ export default [{
|
|
|
22
23
|
keep_classnames: true // Keep in case implementing above as classes
|
|
23
24
|
/* eslint-enable camelcase -- API */
|
|
24
25
|
}),
|
|
25
|
-
nodeResolve(),
|
|
26
|
+
nodeResolve({browser: true}),
|
|
26
27
|
commonjs()
|
|
27
28
|
]
|
|
28
29
|
}, {
|
|
@@ -32,9 +33,10 @@ export default [{
|
|
|
32
33
|
format: 'es'
|
|
33
34
|
},
|
|
34
35
|
plugins: [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
builtins(),
|
|
37
|
+
json(),
|
|
38
|
+
istanbul({exclude: ['node_modules/**']}),
|
|
39
|
+
nodeResolve({browser: true}),
|
|
38
40
|
commonjs()
|
|
39
41
|
]
|
|
40
42
|
}, {
|
|
@@ -44,9 +46,9 @@ export default [{
|
|
|
44
46
|
format: 'es'
|
|
45
47
|
},
|
|
46
48
|
plugins: [
|
|
47
|
-
|
|
48
|
-
istanbul(),
|
|
49
|
-
nodeResolve(),
|
|
49
|
+
builtins(),
|
|
50
|
+
istanbul({exclude: ['node_modules/**']}),
|
|
51
|
+
nodeResolve({browser: true}),
|
|
50
52
|
commonjs()
|
|
51
53
|
]
|
|
52
54
|
}, {
|
|
@@ -56,9 +58,9 @@ export default [{
|
|
|
56
58
|
format: 'es'
|
|
57
59
|
},
|
|
58
60
|
plugins: [
|
|
59
|
-
|
|
60
|
-
istanbul(),
|
|
61
|
-
nodeResolve(),
|
|
61
|
+
builtins(),
|
|
62
|
+
istanbul({exclude: ['node_modules/**']}),
|
|
63
|
+
nodeResolve({browser: true}),
|
|
62
64
|
commonjs()
|
|
63
65
|
]
|
|
64
66
|
}, {
|
|
@@ -68,9 +70,9 @@ export default [{
|
|
|
68
70
|
format: 'es'
|
|
69
71
|
},
|
|
70
72
|
plugins: [
|
|
71
|
-
|
|
72
|
-
istanbul(),
|
|
73
|
-
nodeResolve(),
|
|
73
|
+
builtins(),
|
|
74
|
+
istanbul({exclude: ['node_modules/**']}),
|
|
75
|
+
nodeResolve({browser: true}),
|
|
74
76
|
commonjs()
|
|
75
77
|
]
|
|
76
78
|
}, {
|
|
@@ -80,9 +82,9 @@ export default [{
|
|
|
80
82
|
format: 'es'
|
|
81
83
|
},
|
|
82
84
|
plugins: [
|
|
83
|
-
|
|
84
|
-
istanbul(),
|
|
85
|
-
nodeResolve(),
|
|
85
|
+
builtins(),
|
|
86
|
+
istanbul({exclude: ['node_modules/**']}),
|
|
87
|
+
nodeResolve({browser: true}),
|
|
86
88
|
commonjs()
|
|
87
89
|
]
|
|
88
90
|
}, {
|
package/server.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import http from 'http';
|
|
2
|
-
import
|
|
1
|
+
import http from 'node:http';
|
|
2
|
+
import {Server} from '@node-static/node-static';
|
|
3
3
|
|
|
4
4
|
const port = process.argv[2];
|
|
5
5
|
|
|
6
6
|
const instrumented = process.argv[3];
|
|
7
7
|
|
|
8
|
-
const fileServer = new
|
|
8
|
+
const fileServer = new Server();
|
|
9
9
|
|
|
10
10
|
http.createServer(function (request, response) {
|
|
11
11
|
request.addListener('end', function () {
|