@ykdz/template 0.0.42 → 0.1.0-experimental.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/dist/application.d.ts +38 -4
- package/dist/application.js +199 -138
- package/dist/cli.js +0 -5
- package/dist/input-schemas.d.ts +14 -0
- package/dist/input-schemas.js +27 -8
- package/dist/input-validation.d.ts +43 -0
- package/dist/input-validation.js +129 -0
- package/dist/main.js +157 -6
- package/dist/preset-catalog.d.ts +36 -0
- package/dist/preset-catalog.js +41 -0
- package/dist/result-schemas.d.ts +63 -34
- package/dist/result-schemas.js +5 -4
- package/dist/standard-schema.d.ts +1 -1
- package/dist/standard-schema.js +1 -9
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +7 -4
- package/node_modules/@typescript/typescript-linux-x64/LICENSE +55 -0
- package/node_modules/@typescript/typescript-linux-x64/NOTICE.txt +436 -0
- package/node_modules/@typescript/typescript-linux-x64/README.md +3 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.d.ts +382 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.decorators.legacy.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.d.ts +45125 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.dom.iterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.collection.d.ts +159 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.core.d.ts +595 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.generator.d.ts +75 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.iterable.d.ts +603 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.promise.d.ts +79 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.proxy.d.ts +126 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.reflect.d.ts +142 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.d.ts +44 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2015.symbol.wellknown.d.ts +324 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.array.include.d.ts +114 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.full.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2016.intl.d.ts +29 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.arraybuffer.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.date.d.ts +29 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.full.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.intl.d.ts +42 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.object.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.sharedmemory.d.ts +133 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.string.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2017.typedarrays.d.ts +51 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asyncgenerator.d.ts +75 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.asynciterable.d.ts +51 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.intl.d.ts +81 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.promise.d.ts +28 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2018.regexp.d.ts +35 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.array.d.ts +77 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.intl.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.object.d.ts +31 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.string.d.ts +35 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2019.symbol.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.bigint.d.ts +763 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.d.ts +25 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.date.d.ts +40 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.intl.d.ts +472 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.number.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.promise.d.ts +45 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.sharedmemory.d.ts +97 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.string.d.ts +42 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2020.symbol.wellknown.d.ts +39 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.intl.d.ts +164 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.promise.d.ts +46 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.string.d.ts +31 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2021.weakref.d.ts +76 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.array.d.ts +119 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.error.d.ts +73 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.intl.d.ts +143 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.object.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.regexp.d.ts +37 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2022.string.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.array.d.ts +922 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.collection.d.ts +19 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.d.ts +20 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2023.intl.d.ts +62 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.arraybuffer.d.ts +63 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.collection.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.d.ts +24 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.object.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.promise.d.ts +33 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.regexp.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.sharedmemory.d.ts +66 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2024.string.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.collection.d.ts +94 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.float16.d.ts +443 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.intl.d.ts +200 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.iterator.d.ts +146 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.promise.d.ts +32 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es2025.regexp.d.ts +30 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es5.d.ts +4599 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.es6.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.array.d.ts +33 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.collection.d.ts +47 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.d.ts +27 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.date.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.decorators.d.ts +26 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.disposable.d.ts +191 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.error.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.full.d.ts +22 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.intl.d.ts +107 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.sharedmemory.d.ts +23 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.temporal.d.ts +485 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.esnext.typedarrays.d.ts +90 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.scripthost.d.ts +320 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.asynciterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.d.ts +15606 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.importscripts.d.ts +21 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/lib.webworker.iterable.d.ts +18 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/tsc +0 -0
- package/node_modules/@typescript/typescript-linux-x64/lib/tsc.sig +11 -0
- package/node_modules/@typescript/typescript-linux-x64/package.json +45 -0
- package/node_modules/@ykdz/cli-contract/dist/cli-contract.d.ts +689 -184
- package/node_modules/@ykdz/cli-contract/dist/cli-contract.js +816 -243
- package/node_modules/@ykdz/cli-contract/dist/cli-execution.d.ts +11 -7
- package/node_modules/@ykdz/cli-contract/dist/cli-execution.js +69 -22
- package/node_modules/@ykdz/cli-contract/dist/cli-invocation.d.ts +80 -31
- package/node_modules/@ykdz/cli-contract/dist/cli-invocation.js +84 -26
- package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.d.ts +40 -7
- package/node_modules/@ykdz/cli-contract/dist/contract-definition-error.js +28 -6
- package/node_modules/@ykdz/cli-contract/dist/contract-schema-compiler.js +17 -3
- package/node_modules/@ykdz/cli-contract/dist/contract-schema.d.ts +4 -0
- package/node_modules/@ykdz/cli-contract/dist/field-identity.d.ts +2 -0
- package/node_modules/@ykdz/cli-contract/dist/field-identity.js +16 -0
- package/node_modules/@ykdz/cli-contract/dist/index.d.ts +4 -3
- package/node_modules/@ykdz/cli-contract/dist/index.js +2 -2
- package/node_modules/@ykdz/cli-contract/dist/node.d.ts +1 -1
- package/node_modules/@ykdz/cli-contract/dist/node.js +1 -1
- package/node_modules/@ykdz/cli-contract/dist/outcome-fact.d.ts +42 -9
- package/node_modules/@ykdz/cli-contract/dist/outcome-fact.js +98 -24
- package/node_modules/@ykdz/cli-contract/dist/outcome-wire.d.ts +5 -5
- package/node_modules/@ykdz/cli-contract/dist/outcome-wire.js +75 -15
- package/node_modules/@ykdz/cli-contract/package.json +6 -5
- package/node_modules/@ykdz/preset-rust-bin/native/package.json +46 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts +43 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-rust-bin/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-rust-bin/package.json +20 -0
- package/node_modules/@ykdz/preset-ts-cli/native/package.json +48 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-ts-cli/native/template-dist/definition.js +23 -0
- package/node_modules/@ykdz/preset-ts-cli/package.json +20 -0
- package/node_modules/@ykdz/preset-ts-lib/native/package.json +45 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-ts-lib/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-ts-lib/package.json +20 -0
- package/node_modules/@ykdz/preset-vike-app/native/package.json +55 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/Dockerfile +76 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/container.dockerignore +11 -0
- package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → preset-vike-app/native/resources/deployment}/scripts/container-entrypoint.sh +0 -0
- package/node_modules/@ykdz/preset-vike-app/native/resources/deployment/setup-buildx-step.yml +3 -0
- package/node_modules/@ykdz/preset-vike-app/native/scripts/check-standalone-deployment.ts +570 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts +35 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/definition.js +61 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts +20 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vike-app/native/template-dist/deployment.js +277 -0
- package/node_modules/@ykdz/preset-vike-app/package.json +24 -0
- package/node_modules/@ykdz/preset-vue-app/native/package.json +44 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts +23 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vue-app/native/template-dist/definition.js +21 -0
- package/node_modules/@ykdz/preset-vue-app/package.json +20 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/package.json +50 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/resources/joint-e2e/playwright.config.ts +35 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/resources/joint-e2e/test/e2e/app.spec.ts +10 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts +33 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/preset-vue-hono-app/native/template-dist/definition.js +129 -0
- package/node_modules/@ykdz/preset-vue-hono-app/package.json +21 -0
- package/node_modules/@ykdz/reference-hono-api/native/package.json +55 -0
- package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-hono-api/native/template-dist/definition.js +33 -0
- package/node_modules/@ykdz/reference-hono-api/native/tsconfig.build.json +11 -0
- package/node_modules/@ykdz/reference-hono-api/native/tsconfig.json +15 -0
- package/node_modules/@ykdz/reference-hono-api/native/turbo.json +67 -0
- package/node_modules/@ykdz/reference-hono-api/package.json +19 -0
- package/node_modules/@ykdz/reference-npm-publication/native/.changeset/config.json +4 -0
- package/node_modules/@ykdz/reference-npm-publication/native/README.md +11 -0
- package/node_modules/@ykdz/reference-npm-publication/native/package.json +38 -0
- package/node_modules/@ykdz/reference-npm-publication/native/resources/gitignore +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/resources/release.yml +70 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts +5 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts +13 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/target.js +30 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts +11 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-npm-publication/native/template-dist/workspace.js +51 -0
- package/node_modules/@ykdz/reference-npm-publication/package.json +19 -0
- package/node_modules/@ykdz/reference-rust-bin/native/Cargo.lock +16 -0
- package/node_modules/@ykdz/reference-rust-bin/native/Cargo.toml +27 -0
- package/node_modules/@ykdz/reference-rust-bin/native/package.json +38 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template/rust-toolchain.toml +3 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts +15 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-rust-bin/native/template-dist/definition.js +145 -0
- package/node_modules/@ykdz/reference-rust-bin/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-rust-bin/native/turbo.json +63 -0
- package/node_modules/@ykdz/reference-rust-bin/package.json +20 -0
- package/node_modules/@ykdz/reference-tooling-config/native/node.json +13 -0
- package/node_modules/@ykdz/reference-tooling-config/native/oxlint.config.ts +8 -0
- package/node_modules/@ykdz/reference-tooling-config/native/package.json +37 -0
- package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.d.ts +27 -0
- package/node_modules/@ykdz/reference-tooling-config/native/template-dist/definition.js +27 -0
- package/node_modules/@ykdz/reference-tooling-config/native/tsconfig.json +9 -0
- package/node_modules/@ykdz/reference-tooling-config/native/turbo.json +51 -0
- package/node_modules/@ykdz/reference-tooling-config/package.json +16 -0
- package/node_modules/@ykdz/reference-ts-cli/native/package.json +56 -0
- package/node_modules/@ykdz/reference-ts-cli/native/src/cli.ts +17 -0
- package/node_modules/@ykdz/reference-ts-cli/native/src/main.ts +162 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts +8 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.d.ts.map +1 -0
- package/node_modules/@ykdz/reference-ts-cli/native/template-dist/definition.js +80 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/journey.ts +31 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/journeys/lookup.journey.ts +76 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/run-journeys.ts +240 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/e2e/source-journeys.test.ts +9 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/integration/command.test.ts +147 -0
- package/node_modules/@ykdz/reference-ts-cli/native/test/unit/cli-command-identity.test.ts +76 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.build.json +12 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-ts-cli/native/tsconfig.node.json +7 -0
- package/node_modules/@ykdz/reference-ts-cli/native/turbo.json +75 -0
- package/node_modules/@ykdz/reference-ts-cli/package.json +20 -0
- package/node_modules/@ykdz/reference-ts-lib/native/package.json +57 -0
- package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-ts-lib/native/template-dist/definition.js +43 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.build.json +9 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.json +8 -0
- package/node_modules/@ykdz/reference-ts-lib/native/tsconfig.node.json +8 -0
- package/node_modules/@ykdz/reference-ts-lib/native/turbo.json +63 -0
- package/node_modules/@ykdz/reference-ts-lib/package.json +20 -0
- package/node_modules/@ykdz/reference-vike-db/native/package.json +83 -0
- package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-db/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.build.json +12 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.node.json +19 -0
- package/node_modules/@ykdz/reference-vike-db/native/tsconfig.scripts.json +13 -0
- package/node_modules/@ykdz/reference-vike-db/native/turbo.json +67 -0
- package/node_modules/@ykdz/reference-vike-db/package.json +19 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/drizzle.config.ts +22 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/package.json +51 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/template-dist/definition.js +39 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/tsconfig.json +15 -0
- package/node_modules/@ykdz/reference-vike-migrations/native/turbo.json +76 -0
- package/node_modules/@ykdz/reference-vike-migrations/package.json +19 -0
- package/node_modules/@ykdz/reference-vike-web/native/package.json +84 -0
- package/node_modules/@ykdz/reference-vike-web/native/pages/index/+Page.telefunc.ts +12 -0
- package/node_modules/@ykdz/reference-vike-web/native/pages/index/+Page.vue +89 -0
- package/node_modules/@ykdz/reference-vike-web/native/server/app.ts +36 -0
- package/node_modules/@ykdz/reference-vike-web/native/server/database.ts +2 -0
- package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vike-web/native/template-dist/definition.js +59 -0
- package/node_modules/@ykdz/reference-vike-web/native/test/e2e/app.spec.ts +16 -0
- package/node_modules/@ykdz/reference-vike-web/native/test/todos.browser.test.ts +37 -0
- package/node_modules/@ykdz/reference-vike-web/native/tooling/vite.ts +5 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.app.json +27 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vike-web/native/tsconfig.node.json +33 -0
- package/node_modules/@ykdz/reference-vike-web/native/turbo.json +92 -0
- package/node_modules/@ykdz/reference-vike-web/native/types/global.d.ts +9 -0
- package/node_modules/@ykdz/reference-vike-web/native/vite.config.ts +16 -0
- package/node_modules/@ykdz/reference-vike-web/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vike-web/package.json +20 -0
- package/node_modules/@ykdz/reference-vue-app/native/TESTING.md +7 -0
- package/node_modules/@ykdz/reference-vue-app/native/package.json +70 -0
- package/node_modules/@ykdz/reference-vue-app/native/src/components/CounterButton.vue +18 -0
- package/node_modules/@ykdz/reference-vue-app/native/src/style.css +2 -0
- package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vue-app/native/template-dist/definition.js +53 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/app.browser.test.ts +13 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/counter.node.test.ts +15 -0
- package/node_modules/@ykdz/reference-vue-app/native/test/e2e/app.spec.ts +15 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.app.json +18 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vue-app/native/tsconfig.node.json +25 -0
- package/node_modules/@ykdz/reference-vue-app/native/turbo.json +84 -0
- package/node_modules/@ykdz/reference-vue-app/native/vite.config.ts +8 -0
- package/node_modules/@ykdz/reference-vue-app/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vue-app/package.json +20 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/TESTING.md +7 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/package.json +66 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/App.vue +49 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/main.ts +7 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/src/style.css +2 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.d.ts +1 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/template-dist/definition.js +49 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/test/app.browser.test.ts +13 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.app.json +18 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.json +11 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/tsconfig.node.json +25 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/turbo.json +74 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/vite.config.ts +28 -0
- package/node_modules/@ykdz/reference-vue-hono-web/native/vitest.config.ts +37 -0
- package/node_modules/@ykdz/reference-vue-hono-web/package.json +20 -0
- package/node_modules/@ykdz/template-content/dist/index.d.ts +14 -0
- package/node_modules/@ykdz/template-content/dist/index.js +9 -0
- package/node_modules/@ykdz/template-content/dist/template-members.d.ts +9 -0
- package/node_modules/@ykdz/template-content/dist/template-members.js +16 -0
- package/node_modules/@ykdz/template-content/package.json +18 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.d.ts +45 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/dist/index.js +30 -0
- package/node_modules/@ykdz/template-content-provider-51cfac9642dc43a4/package.json +35 -0
- package/node_modules/@ykdz/template-core/dist/content-identity.d.ts +42 -0
- package/node_modules/@ykdz/template-core/dist/content-identity.js +117 -0
- package/node_modules/@ykdz/template-core/dist/generation-record.d.ts +28 -0
- package/node_modules/@ykdz/template-core/dist/generation-record.js +45 -0
- package/node_modules/@ykdz/template-core/dist/package-contribution.d.ts +3 -81
- package/node_modules/@ykdz/template-core/dist/package-contribution.js +19 -64
- package/node_modules/@ykdz/template-core/dist/preset-definition.d.ts +73 -97
- package/node_modules/@ykdz/template-core/dist/preset-definition.js +107 -15
- package/node_modules/@ykdz/template-core/dist/project-blueprint.d.ts +3 -11
- package/node_modules/@ykdz/template-core/dist/project-blueprint.js +23 -71
- package/node_modules/@ykdz/template-core/dist/project-projection.js +4 -17
- package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.d.ts +1 -0
- package/node_modules/@ykdz/template-core/dist/renderer-policy-snapshot.js +2 -0
- package/node_modules/@ykdz/template-core/dist/renderer.d.ts +7 -25
- package/node_modules/@ykdz/template-core/dist/renderer.js +14 -252
- package/node_modules/@ykdz/template-core/dist/toml.d.ts +6 -0
- package/node_modules/@ykdz/template-core/dist/toml.js +31 -0
- package/node_modules/@ykdz/template-core/dist/workspace-strategy.d.ts +188 -0
- package/node_modules/@ykdz/template-core/dist/workspace-strategy.js +1 -0
- package/node_modules/@ykdz/template-core/package.json +24 -20
- package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.d.ts +65 -0
- package/node_modules/@ykdz/template-environment/dist/development-container-tool-layer.js +414 -0
- package/node_modules/@ykdz/template-environment/package.json +36 -0
- package/node_modules/@ykdz/template-generator/dist/content-source.d.ts +13 -0
- package/node_modules/@ykdz/template-generator/dist/content-source.js +181 -0
- package/node_modules/@ykdz/template-generator/dist/index.d.ts +82 -0
- package/node_modules/@ykdz/template-generator/dist/index.js +1147 -0
- package/node_modules/@ykdz/template-generator/package.json +41 -0
- package/node_modules/@ykdz/template-workspace/assets/environment/devcontainer/workspace-template.json +16 -0
- package/node_modules/@ykdz/template-workspace/assets/github/check.yml +83 -0
- package/node_modules/@ykdz/template-workspace/assets/github/dependabot.yml +49 -0
- package/node_modules/@ykdz/template-workspace/assets/next-steps.md +3 -0
- package/node_modules/@ykdz/template-workspace/assets/tsconfig.config.json +6 -0
- package/node_modules/@ykdz/template-workspace/assets/turbo.json +64 -0
- package/node_modules/@ykdz/template-workspace/dist/application-requirements.d.ts +14 -0
- package/node_modules/@ykdz/template-workspace/dist/application-requirements.js +42 -0
- package/node_modules/@ykdz/template-workspace/dist/ci-diagnostic-artifact.d.ts +17 -0
- package/node_modules/@ykdz/template-workspace/dist/ci-diagnostic-artifact.js +74 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.d.ts +5 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment-sources.js +8 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment.d.ts +9 -0
- package/node_modules/@ykdz/template-workspace/dist/default-environment.js +5 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-identity.d.ts +19 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-identity.js +128 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-role.d.ts +4 -0
- package/node_modules/@ykdz/template-workspace/dist/default-package-role.js +9 -0
- package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.d.ts +89 -0
- package/node_modules/@ykdz/template-workspace/dist/default-workspace-strategy.js +967 -0
- package/node_modules/@ykdz/template-workspace/dist/dependency-catalog.d.ts +25 -0
- package/node_modules/@ykdz/template-workspace/dist/dependency-catalog.js +159 -0
- package/node_modules/@ykdz/template-workspace/dist/development-container.d.ts +3 -0
- package/node_modules/@ykdz/template-workspace/dist/development-container.js +36 -0
- package/node_modules/@ykdz/template-workspace/dist/development-environment.d.ts +36 -0
- package/node_modules/@ykdz/template-workspace/dist/development-environment.js +241 -0
- package/node_modules/@ykdz/template-workspace/dist/editor-customization.d.ts +18 -0
- package/node_modules/@ykdz/template-workspace/dist/editor-customization.js +83 -0
- package/node_modules/@ykdz/template-workspace/dist/environment-needs.d.ts +51 -0
- package/node_modules/@ykdz/template-workspace/dist/environment-needs.js +167 -0
- package/node_modules/@ykdz/template-workspace/dist/generation-context.d.ts +14 -0
- package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.d.ts +21 -0
- package/node_modules/@ykdz/template-workspace/dist/package-addition-facts.js +90 -0
- package/node_modules/@ykdz/template-workspace/dist/package-contribution.d.ts +64 -0
- package/node_modules/@ykdz/template-workspace/dist/package-contribution.js +65 -0
- package/node_modules/@ykdz/template-workspace/dist/project-github.d.ts +24 -0
- package/node_modules/@ykdz/template-workspace/dist/project-github.js +98 -0
- package/node_modules/@ykdz/template-workspace/dist/project-linking.d.ts +48 -0
- package/node_modules/@ykdz/template-workspace/dist/project-linking.js +218 -0
- package/node_modules/@ykdz/template-workspace/dist/project-requirements.d.ts +17 -0
- package/node_modules/@ykdz/template-workspace/dist/reference-package.d.ts +146 -0
- package/node_modules/@ykdz/template-workspace/dist/reference-package.js +521 -0
- package/node_modules/@ykdz/template-workspace/dist/release-toolchain-snapshot.d.ts +6 -0
- package/node_modules/@ykdz/template-workspace/dist/release-toolchain-snapshot.js +6 -0
- package/node_modules/@ykdz/template-workspace/dist/root-projection.d.ts +29 -0
- package/node_modules/@ykdz/template-workspace/dist/root-projection.js +144 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.d.ts +35 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-target-projection.js +74 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.d.ts +22 -0
- package/node_modules/@ykdz/template-workspace/dist/rust-toolchain-facts.js +64 -0
- package/node_modules/@ykdz/template-workspace/dist/shared-root-files.d.ts +99 -0
- package/node_modules/@ykdz/template-workspace/dist/shared-root-files.js +159 -0
- package/node_modules/@ykdz/template-workspace/dist/vue-policy.d.ts +5 -0
- package/node_modules/@ykdz/template-workspace/dist/vue-policy.js +5 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.d.ts +20 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-policy-snapshot.js +86 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-resources.d.ts +23 -0
- package/node_modules/@ykdz/template-workspace/dist/workspace-resources.js +83 -0
- package/node_modules/@ykdz/template-workspace/package.json +135 -0
- package/node_modules/@ykdz/template-workspace/resources/oxfmt.config.ts +1 -0
- package/node_modules/@ykdz/template-workspace/resources/oxlint.config.ts +4 -0
- package/node_modules/@ykdz/template-workspace/scripts/sync-snapshot.ts +27 -0
- package/node_modules/@ykdz/template-workspace/scripts/task-gates.ts +631 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.d.ts +57 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/content-artifact.js +168 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/package-name-projection.d.ts +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/package-name-projection.js +22 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/resource-ignore-snapshot.d.ts +1 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/resource-ignore-snapshot.js +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/typescript-module-specifiers.d.ts +2 -0
- package/node_modules/@ykdz/template-workspace-authoring/dist/typescript-module-specifiers.js +36 -0
- package/node_modules/@ykdz/template-workspace-authoring/package.json +55 -0
- package/node_modules/eslint-visitor-keys/LICENSE +201 -0
- package/node_modules/eslint-visitor-keys/README.md +123 -0
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.cjs +187 -0
- package/node_modules/eslint-visitor-keys/dist/eslint-visitor-keys.d.cts +28 -0
- package/node_modules/eslint-visitor-keys/dist/index.d.ts +16 -0
- package/node_modules/eslint-visitor-keys/dist/visitor-keys.d.ts +12 -0
- package/node_modules/eslint-visitor-keys/lib/index.js +67 -0
- package/node_modules/eslint-visitor-keys/lib/visitor-keys.js +118 -0
- package/node_modules/eslint-visitor-keys/package.json +57 -0
- package/node_modules/ignore/LICENSE-MIT +21 -0
- package/node_modules/ignore/README.md +501 -0
- package/node_modules/ignore/index.d.ts +81 -0
- package/node_modules/ignore/index.js +1566 -0
- package/node_modules/ignore/legacy.js +1346 -0
- package/node_modules/ignore/package.json +93 -0
- package/node_modules/smol-toml/dist/extract.js +5 -1
- package/node_modules/smol-toml/dist/index.cjs +2 -1
- package/node_modules/smol-toml/package.json +6 -6
- package/node_modules/toml-eslint-parser/LICENSE +21 -0
- package/node_modules/toml-eslint-parser/README.md +192 -0
- package/node_modules/toml-eslint-parser/lib/chunk-15K8U1wQ.mjs +18 -0
- package/node_modules/toml-eslint-parser/lib/index.d.mts +284 -0
- package/node_modules/toml-eslint-parser/lib/index.mjs +2219 -0
- package/node_modules/toml-eslint-parser/package.json +102 -0
- package/node_modules/typescript-7/LICENSE +55 -0
- package/node_modules/typescript-7/NOTICE.txt +436 -0
- package/node_modules/typescript-7/README.md +49 -0
- package/node_modules/typescript-7/bin/tsc +2 -0
- package/node_modules/typescript-7/dist/api/async/api.d.ts +529 -0
- package/node_modules/typescript-7/dist/api/async/api.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/api.js +1657 -0
- package/node_modules/typescript-7/dist/api/async/api.js.map +1 -0
- package/node_modules/typescript-7/dist/api/async/client.d.ts +39 -0
- package/node_modules/typescript-7/dist/api/async/client.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/client.js +211 -0
- package/node_modules/typescript-7/dist/api/async/client.js.map +1 -0
- package/node_modules/typescript-7/dist/api/async/types.d.ts +310 -0
- package/node_modules/typescript-7/dist/api/async/types.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/async/types.js +2 -0
- package/node_modules/typescript-7/dist/api/async/types.js.map +1 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.d.ts +109 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.js +2 -0
- package/node_modules/typescript-7/dist/api/compilerOptions.js.map +1 -0
- package/node_modules/typescript-7/dist/api/fs.d.ts +23 -0
- package/node_modules/typescript-7/dist/api/fs.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/fs.js +109 -0
- package/node_modules/typescript-7/dist/api/fs.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.d.ts +15 -0
- package/node_modules/typescript-7/dist/api/node/encoder.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts +5 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.js +74 -0
- package/node_modules/typescript-7/dist/api/node/encoder.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/encoder.js +287 -0
- package/node_modules/typescript-7/dist/api/node/encoder.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.d.ts +32 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.js +213 -0
- package/node_modules/typescript-7/dist/api/node/msgpack.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.d.ts +76 -0
- package/node_modules/typescript-7/dist/api/node/node.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.d.ts +182 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.js +835 -0
- package/node_modules/typescript-7/dist/api/node/node.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts +62 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.js +122 -0
- package/node_modules/typescript-7/dist/api/node/node.infrastructure.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/node.js +298 -0
- package/node_modules/typescript-7/dist/api/node/node.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.d.ts +29 -0
- package/node_modules/typescript-7/dist/api/node/protocol.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts +4 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.js +241 -0
- package/node_modules/typescript-7/dist/api/node/protocol.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/protocol.js +30 -0
- package/node_modules/typescript-7/dist/api/node/protocol.js.map +1 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.d.ts +6 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.js +61 -0
- package/node_modules/typescript-7/dist/api/node/wtf8.js.map +1 -0
- package/node_modules/typescript-7/dist/api/options.d.ts +32 -0
- package/node_modules/typescript-7/dist/api/options.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/options.js +11 -0
- package/node_modules/typescript-7/dist/api/options.js.map +1 -0
- package/node_modules/typescript-7/dist/api/path.d.ts +110 -0
- package/node_modules/typescript-7/dist/api/path.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/path.js +508 -0
- package/node_modules/typescript-7/dist/api/path.js.map +1 -0
- package/node_modules/typescript-7/dist/api/proto.d.ts +239 -0
- package/node_modules/typescript-7/dist/api/proto.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/proto.js +37 -0
- package/node_modules/typescript-7/dist/api/proto.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts +79 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.js +169 -0
- package/node_modules/typescript-7/dist/api/sourceFileCache.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/api.d.ts +529 -0
- package/node_modules/typescript-7/dist/api/sync/api.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/api.js +1665 -0
- package/node_modules/typescript-7/dist/api/sync/api.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/client.d.ts +30 -0
- package/node_modules/typescript-7/dist/api/sync/client.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/client.js +124 -0
- package/node_modules/typescript-7/dist/api/sync/client.js.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/types.d.ts +310 -0
- package/node_modules/typescript-7/dist/api/sync/types.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/sync/types.js +2 -0
- package/node_modules/typescript-7/dist/api/sync/types.js.map +1 -0
- package/node_modules/typescript-7/dist/api/syncChannel.d.ts +114 -0
- package/node_modules/typescript-7/dist/api/syncChannel.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/syncChannel.js +508 -0
- package/node_modules/typescript-7/dist/api/syncChannel.js.map +1 -0
- package/node_modules/typescript-7/dist/api/timing.d.ts +175 -0
- package/node_modules/typescript-7/dist/api/timing.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/api/timing.js +149 -0
- package/node_modules/typescript-7/dist/api/timing.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.d.ts +100 -0
- package/node_modules/typescript-7/dist/ast/ast.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.d.ts +1161 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.js +4 -0
- package/node_modules/typescript-7/dist/ast/ast.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/ast.js +7 -0
- package/node_modules/typescript-7/dist/ast/ast.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/astnav.d.ts +19 -0
- package/node_modules/typescript-7/dist/ast/astnav.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/astnav.js +596 -0
- package/node_modules/typescript-7/dist/ast/astnav.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/clone.d.ts +16 -0
- package/node_modules/typescript-7/dist/ast/clone.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/clone.js +104 -0
- package/node_modules/typescript-7/dist/ast/clone.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.d.ts +520 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.js +3057 -0
- package/node_modules/typescript-7/dist/ast/factory.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/index.d.ts +20 -0
- package/node_modules/typescript-7/dist/ast/index.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/index.js +20 -0
- package/node_modules/typescript-7/dist/ast/index.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.d.ts +35 -0
- package/node_modules/typescript-7/dist/ast/is.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.generated.d.ts +329 -0
- package/node_modules/typescript-7/dist/ast/is.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.generated.js +1103 -0
- package/node_modules/typescript-7/dist/ast/is.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/is.js +233 -0
- package/node_modules/typescript-7/dist/ast/is.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.d.ts +11 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.js +202 -0
- package/node_modules/typescript-7/dist/ast/jsdoc.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/scanner.d.ts +97 -0
- package/node_modules/typescript-7/dist/ast/scanner.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/scanner.js +2230 -0
- package/node_modules/typescript-7/dist/ast/scanner.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/utils.d.ts +17 -0
- package/node_modules/typescript-7/dist/ast/utils.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/utils.js +67 -0
- package/node_modules/typescript-7/dist/ast/utils.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.d.ts +14 -0
- package/node_modules/typescript-7/dist/ast/visitor.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts +50 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.js +978 -0
- package/node_modules/typescript-7/dist/ast/visitor.generated.js.map +1 -0
- package/node_modules/typescript-7/dist/ast/visitor.js +47 -0
- package/node_modules/typescript-7/dist/ast/visitor.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts +129 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.js +132 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.js +130 -0
- package/node_modules/typescript-7/dist/enums/characterCodes.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js +6 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.js +6 -0
- package/node_modules/typescript-7/dist/enums/commentDirectiveType.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts +28 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js +30 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.js +30 -0
- package/node_modules/typescript-7/dist/enums/completionItemKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.js +9 -0
- package/node_modules/typescript-7/dist/enums/diagnosticCategory.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts +12 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.js +14 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.js +14 -0
- package/node_modules/typescript-7/dist/enums/elementFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts +23 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js +25 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.js +25 -0
- package/node_modules/typescript-7/dist/enums/internalSymbolName.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts +9 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js +11 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.js +11 -0
- package/node_modules/typescript-7/dist/enums/jsxEmit.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.js +6 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.js +6 -0
- package/node_modules/typescript-7/dist/enums/languageVariant.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts +42 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js +44 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.js +44 -0
- package/node_modules/typescript-7/dist/enums/modifierFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js +9 -0
- package/node_modules/typescript-7/dist/enums/moduleDetectionKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts +17 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.js +19 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.js +19 -0
- package/node_modules/typescript-7/dist/enums/moduleKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts +9 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js +11 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js +11 -0
- package/node_modules/typescript-7/dist/enums/moduleResolutionKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts +6 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.js +8 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.js +8 -0
- package/node_modules/typescript-7/dist/enums/newLineKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts +36 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js +38 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js +38 -0
- package/node_modules/typescript-7/dist/enums/nodeBuilderFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts +44 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js +46 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.js +46 -0
- package/node_modules/typescript-7/dist/enums/nodeFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts +50 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.js +52 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.js +52 -0
- package/node_modules/typescript-7/dist/enums/objectFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts +16 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js +18 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js +18 -0
- package/node_modules/typescript-7/dist/enums/outerExpressionKinds.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts +13 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js +14 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js +14 -0
- package/node_modules/typescript-7/dist/enums/regularExpressionFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts +11 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.js +12 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.js +12 -0
- package/node_modules/typescript-7/dist/enums/scriptKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts +17 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js +18 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.js +18 -0
- package/node_modules/typescript-7/dist/enums/scriptTarget.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts +15 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js +17 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.js +17 -0
- package/node_modules/typescript-7/dist/enums/signatureFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts +5 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.js +7 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.js +7 -0
- package/node_modules/typescript-7/dist/enums/signatureKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts +71 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js +73 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.js +73 -0
- package/node_modules/typescript-7/dist/enums/symbolFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts +389 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js +391 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.js +391 -0
- package/node_modules/typescript-7/dist/enums/syntaxKind.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts +30 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js +32 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.js +32 -0
- package/node_modules/typescript-7/dist/enums/tokenFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts +76 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.js +78 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.js +78 -0
- package/node_modules/typescript-7/dist/enums/typeFlags.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts +2 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts +7 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js +9 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.enum.js.map +1 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.js +9 -0
- package/node_modules/typescript-7/dist/enums/typePredicateKind.js.map +1 -0
- package/node_modules/typescript-7/dist/internal/utils.d.ts +23 -0
- package/node_modules/typescript-7/dist/internal/utils.d.ts.map +1 -0
- package/node_modules/typescript-7/dist/internal/utils.js +25 -0
- package/node_modules/typescript-7/dist/internal/utils.js.map +1 -0
- package/node_modules/typescript-7/lib/getExePath.d.ts +2 -0
- package/node_modules/typescript-7/lib/getExePath.js +70 -0
- package/node_modules/typescript-7/lib/tsc.js +28 -0
- package/node_modules/typescript-7/lib/version.cjs +3 -0
- package/node_modules/typescript-7/lib/version.d.cts +2 -0
- package/node_modules/typescript-7/package.json +87 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/License.txt +11 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/README.md +54 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.d.ts +17 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/main.js +83 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.d.ts +22 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/browser/ril.js +210 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.d.ts +14 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/api.js +87 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.d.ts +32 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/cancellation.js +132 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.d.ts +367 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/connection.js +1271 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.d.ts +9 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/disposable.js +16 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.d.ts +52 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/encoding.js +70 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.d.ts +39 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/events.js +135 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.d.ts +7 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/is.js +34 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.d.ts +55 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/linkedMap.js +412 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.d.ts +18 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageBuffer.js +155 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.d.ts +77 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageReader.js +246 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.d.ts +60 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messageWriter.js +157 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.d.ts +369 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/messages.js +436 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.d.ts +74 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/ral.js +23 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.d.ts +10 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/semaphore.js +74 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.d.ts +15 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/common/sharedArrayCancellation.js +77 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.d.ts +58 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/main.js +289 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.d.ts +12 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/lib/node/ril.js +163 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/package.json +54 -0
- package/node_modules/typescript-7/vendor/vscode-jsonrpc/typings/thenable.d.ts +5 -0
- package/package.json +110 -34
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.d.ts +0 -243
- package/node_modules/@ykdz/template-builtin-presets/dist/src/foundation.js +0 -3567
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.d.ts +0 -58
- package/node_modules/@ykdz/template-builtin-presets/dist/src/generation-record.js +0 -178
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.d.ts +0 -4
- package/node_modules/@ykdz/template-builtin-presets/dist/src/index.js +0 -3
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/rust-bin/definition.js +0 -193
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.d.ts +0 -3
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/development-container.js +0 -52
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.d.ts +0 -16
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/typescript.js +0 -74
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.d.ts +0 -36
- package/node_modules/@ykdz/template-builtin-presets/dist/src/shared/vue.js +0 -117
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.d.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/dist/src/template-sources.js +0 -27
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-cli/definition.js +0 -253
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.d.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/dist/src/ts-lib/definition.js +0 -155
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.d.ts +0 -48
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vike-app/definition.js +0 -541
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.d.ts +0 -26
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-app/definition.js +0 -113
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.d.ts +0 -22
- package/node_modules/@ykdz/template-builtin-presets/dist/src/vue-hono-app/definition.js +0 -204
- package/node_modules/@ykdz/template-builtin-presets/package.json +0 -107
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot-rust.yml +0 -41
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.dynamic.template +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment-diagnostics.yml +0 -82
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-deployment.yml +0 -42
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check-diagnostics.yml +0 -80
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.github/workflows/check.yml +0 -40
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/.pnpmfile.mjs +0 -19
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/TODO.md.template +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/devcontainer.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.dynamic.txt +0 -24
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/pnpm-workspace.yaml +0 -35
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/check-toolchain-versions.ts +0 -556
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/node-test-count-reporter.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-rust-tests.ts +0 -100
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/run-turbo-boundaries.ts +0 -74
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/scripts/task-gates.ts +0 -589
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/tsconfig.packing-hook.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-boundary-tags/app.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-boundary-tags/library.json +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/database-preparation.json +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/deployment.json +0 -13
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/rust-toolchain.json +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo-projections/vue-hono-joint-e2e.json +0 -13
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/turbo.json +0 -20
- package/node_modules/@ykdz/template-builtin-presets/templates/foundation/typescript-config/turbo.json +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.github/dependabot.yml +0 -41
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/extensions.json +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/.vscode/settings.json +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.lock +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/Cargo.toml +0 -27
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/rust-toolchain.toml +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/tsconfig.scripts.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/rust-bin/turbo.json +0 -37
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/node/oxlint.config.ts +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/oxc/tsconfig.config.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/src/components/CounterButton.vue +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/src/style.css +0 -1
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/test/counter.browser.test.ts +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/test/counter.node.test.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.app.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.node.json +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/tsconfig.test.json +0 -10
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/typescript/run-vue-tsc.ts +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/shared/vue/vitest.config.ts +0 -50
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/CHANGELOG.md.template +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/RELEASING.md +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/artifact.ts +0 -1340
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/changelog.ts +0 -283
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-artifact.ts +0 -110
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/check-readiness.ts +0 -66
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/cli-command-identity.ts +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/handoff.ts +0 -522
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/publish.ts +0 -483
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/readiness.ts +0 -1150
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.ts +0 -819
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/release.yml +0 -122
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/root-tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/tsconfig.json +0 -4
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication/turbo.json +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/README.md +0 -48
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/CHANGELOG.md.template +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-APACHE-2.0.txt +0 -202
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/LICENSE-MIT.txt +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/assets/README.md.template +0 -5
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/bridge.ts +0 -3336
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/publication-setup/setup.sh +0 -221
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/cli.ts +0 -17
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/main.ts +0 -162
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/src/standard-schema.ts +0 -37
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journey.ts +0 -31
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/journeys/lookup.journey.ts +0 -71
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/run-journeys.test.ts +0 -11
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/e2e/run-journeys.ts +0 -255
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/integration/command.test.ts +0 -146
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/test/unit/cli-command-identity.test.ts +0 -76
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.build.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-cli/turbo.json +0 -64
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.build.json +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/ts-lib/turbo.json +0 -47
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/scripts/reset.ts +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.build.json +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/tsconfig.json +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db/turbo.json +0 -46
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/drizzle.config.ts +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/tsconfig.json +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/db-migrations/turbo.json +0 -53
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile +0 -81
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/Dockerfile.dockerignore +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/components/CounterButton.vue +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/pages/index/+Page.telefunc.ts +0 -12
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/pages/index/+Page.vue +0 -93
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/scripts/check-standalone-deployment.ts +0 -553
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/server/app.ts +0 -36
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/test/counter.browser.test.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/test/e2e/app.spec.ts +0 -18
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.app.json +0 -26
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.json +0 -8
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.node.json +0 -21
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/tsconfig.test.json +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/turbo.json +0 -69
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/types/global.d.ts +0 -9
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/vite.config.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vike-app/web/vitest.config.ts +0 -35
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/.github/dependabot.yml +0 -33
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/test/e2e/app.spec.ts +0 -14
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/turbo.json +0 -71
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-app/vite.config.ts +0 -7
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.build.json +0 -10
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/tsconfig.json +0 -16
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/api/turbo.json +0 -54
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/playwright.config.ts +0 -34
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/test/e2e/app.spec.ts +0 -15
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/root/tsconfig.json +0 -3
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/src/App.vue +0 -51
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/turbo.json +0 -65
- package/node_modules/@ykdz/template-builtin-presets/templates/vue-hono-app/web/vite.config.ts +0 -27
- package/node_modules/@ykdz/template-core/dist/Cargo.lock +0 -16
- package/node_modules/@ykdz/template-core/dist/Cargo.toml +0 -12
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.d.ts +0 -19
- package/node_modules/@ykdz/template-core/dist/ci-diagnostic-artifact.js +0 -76
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.d.ts +0 -33
- package/node_modules/@ykdz/template-core/dist/dependency-catalog.js +0 -238
- package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.d.ts +0 -56
- package/node_modules/@ykdz/template-core/dist/development-container-tool-layer.js +0 -361
- package/node_modules/@ykdz/template-core/dist/editor-customization.d.ts +0 -17
- package/node_modules/@ykdz/template-core/dist/editor-customization.js +0 -73
- package/node_modules/@ykdz/template-core/dist/module-graph.d.ts +0 -53
- package/node_modules/@ykdz/template-core/dist/module-graph.js +0 -167
- package/node_modules/@ykdz/template-core/dist/pnpm-workspace.yaml +0 -75
- package/node_modules/@ykdz/template-core/dist/project-github.d.ts +0 -25
- package/node_modules/@ykdz/template-core/dist/project-github.js +0 -88
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.d.ts +0 -31
- package/node_modules/@ykdz/template-core/dist/project-linking-v2.js +0 -143
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.d.ts +0 -10
- package/node_modules/@ykdz/template-core/dist/release-toolchain-snapshot.js +0 -9
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.d.ts +0 -58
- package/node_modules/@ykdz/template-core/dist/template-boundary-check.js +0 -839
- package/node_modules/@ykdz/template-core/node_modules/valibot/LICENSE.md +0 -9
- package/node_modules/@ykdz/template-core/node_modules/valibot/README.md +0 -94
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.cjs +0 -7897
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.cts +0 -16579
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.d.mts +0 -16579
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.cjs +0 -2
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.min.mjs +0 -2
- package/node_modules/@ykdz/template-core/node_modules/valibot/dist/index.mjs +0 -7577
- package/node_modules/@ykdz/template-core/node_modules/valibot/package.json +0 -84
- package/node_modules/npm-package-arg/node_modules/semver/LICENSE +0 -15
- package/node_modules/npm-package-arg/node_modules/semver/README.md +0 -680
- package/node_modules/npm-package-arg/node_modules/semver/bin/semver.js +0 -195
- package/node_modules/npm-package-arg/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/npm-package-arg/node_modules/semver/classes/index.js +0 -7
- package/node_modules/npm-package-arg/node_modules/semver/classes/range.js +0 -577
- package/node_modules/npm-package-arg/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/npm-package-arg/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/npm-package-arg/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/npm-package-arg/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/npm-package-arg/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/npm-package-arg/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/major.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/npm-package-arg/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/npm-package-arg/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/npm-package-arg/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/npm-package-arg/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/npm-package-arg/node_modules/semver/index.js +0 -93
- package/node_modules/npm-package-arg/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/npm-package-arg/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/npm-package-arg/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/npm-package-arg/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/npm-package-arg/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/npm-package-arg/node_modules/semver/internal/re.js +0 -223
- package/node_modules/npm-package-arg/node_modules/semver/package.json +0 -78
- package/node_modules/npm-package-arg/node_modules/semver/preload.js +0 -4
- package/node_modules/npm-package-arg/node_modules/semver/range.bnf +0 -17
- package/node_modules/npm-package-arg/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/npm-package-arg/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/npm-package-arg/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/npm-package-arg/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/npm-package-arg/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/npm-package-arg/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/npm-package-arg/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/npm-package-arg/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/npm-package-arg/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/npm-package-arg/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/unbash/LICENSE +0 -15
- package/node_modules/unbash/README.md +0 -289
- package/node_modules/unbash/dist/ansi-c.d.ts +0 -5
- package/node_modules/unbash/dist/ansi-c.js +0 -130
- package/node_modules/unbash/dist/arithmetic.d.ts +0 -11
- package/node_modules/unbash/dist/arithmetic.js +0 -530
- package/node_modules/unbash/dist/assignment.d.ts +0 -15
- package/node_modules/unbash/dist/assignment.js +0 -118
- package/node_modules/unbash/dist/chars.d.ts +0 -41
- package/node_modules/unbash/dist/chars.js +0 -41
- package/node_modules/unbash/dist/command.d.ts +0 -14
- package/node_modules/unbash/dist/command.js +0 -41
- package/node_modules/unbash/dist/heredoc.d.ts +0 -18
- package/node_modules/unbash/dist/heredoc.js +0 -25
- package/node_modules/unbash/dist/internal-types.d.ts +0 -87
- package/node_modules/unbash/dist/lexer.d.ts +0 -202
- package/node_modules/unbash/dist/lexer.js +0 -3930
- package/node_modules/unbash/dist/parser.d.ts +0 -4
- package/node_modules/unbash/dist/parser.js +0 -1295
- package/node_modules/unbash/dist/parts.d.ts +0 -17
- package/node_modules/unbash/dist/parts.js +0 -82
- package/node_modules/unbash/dist/printer.d.ts +0 -2
- package/node_modules/unbash/dist/printer.js +0 -536
- package/node_modules/unbash/dist/types.d.ts +0 -494
- package/node_modules/unbash/dist/word.d.ts +0 -22
- package/node_modules/unbash/dist/word.js +0 -102
- package/node_modules/unbash/package.json +0 -80
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/root → preset-vue-hono-app/native/resources/joint-e2e}/test/e2e/fixtures.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/runtime.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/src/server.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/api → reference-hono-api/native}/test/app.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → reference-rust-bin/native}/rustfmt.toml +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → reference-rust-bin/native}/src/main.rs +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/typescript-config → reference-tooling-config/native}/base.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/oxc → reference-tooling-config/native}/oxfmt.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-cli/src → reference-ts-cli/native/src/publication}/cli-command-identity.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/src/name-schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/ts-lib → reference-ts-lib/native}/test/greet.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/scripts/seed-example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/db.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/index.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/queries/todos.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/readiness.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/schema.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/seed/example.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/storage.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/src/types.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db → reference-vike-db/native}/test/todos.test.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/drizzle/migrations/20260709120325_old_captain_flint/migration.sql +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/drizzle/migrations/20260709120325_old_captain_flint/snapshot.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/db-migrations → reference-vike-migrations/native}/tsconfig.build.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/+server.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/.env.example +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vike-web/native}/TESTING.md +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/assets/logo.svg +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/components/PageShell.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+Head.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+Layout.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/+config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/pages/tailwind.css +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/server/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/test/playwright-teardown.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app/web → reference-vike-web/native}/types/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/playwright.config.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-app → reference-vue-app/native}/src/App.vue +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vue-app/native}/src/main.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared/vue → reference-vue-app/native}/src/stores/counter.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/env.d.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/index.html +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vue-hono-app/web → reference-vue-hono-web/native}/src/api.ts +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/AGENTS.md.template → template-workspace/assets/agent-instructions.md} +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation/devcontainer → template-workspace/assets/environment}/base.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/devcontainer/browser-test.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/devcontainer/github-cli.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/rust-bin → template-workspace/assets/environment}/devcontainer/rust.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/vike-app → template-workspace/assets/environment}/devcontainer/shellcheck.Dockerfile +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/shared → template-workspace/assets/environment}/editor-customization/capabilities.json +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation → template-workspace/assets}/gitignore +0 -0
- /package/node_modules/@ykdz/{template-builtin-presets/templates/foundation → template-workspace/assets}/tsconfig.json +0 -0
- /package/node_modules/{unbash/dist/internal-types.js → @ykdz/template-workspace/dist/generation-context.js} +0 -0
- /package/node_modules/{unbash/dist/types.js → @ykdz/template-workspace/dist/project-requirements.js} +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/LICENSE +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/README.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/bin/semver.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/comparator.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/index.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/range.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/classes/semver.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/clean.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/cmp.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/coerce.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare-build.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare-loose.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/compare.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/diff.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/eq.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/gt.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/gte.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/inc.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/lt.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/lte.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/major.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/minor.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/neq.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/parse.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/patch.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/prerelease.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/rcompare.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/rsort.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/satisfies.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/sort.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/truncate.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/functions/valid.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/index.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/constants.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/debug.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/identifiers.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/lrucache.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/parse-options.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/internal/re.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/package.json +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/preload.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/range.bnf +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/gtr.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/intersects.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/ltr.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/max-satisfying.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/min-satisfying.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/min-version.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/outside.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/simplify.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/subset.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/to-comparators.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/semver → semver}/ranges/valid.js +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/LICENSE.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/README.md +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.cjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.d.cts +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.d.mts +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.min.cjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.min.mjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/dist/index.mjs +0 -0
- /package/node_modules/{@ykdz/template-builtin-presets/node_modules/valibot → valibot}/package.json +0 -0
|
@@ -0,0 +1,2219 @@
|
|
|
1
|
+
import { t as __exportAll } from "./chunk-15K8U1wQ.mjs";
|
|
2
|
+
import { unionWith } from "eslint-visitor-keys";
|
|
3
|
+
|
|
4
|
+
//#region src/internal-utils/index.ts
|
|
5
|
+
/**
|
|
6
|
+
* Get the last element from given array
|
|
7
|
+
*/
|
|
8
|
+
function last(arr) {
|
|
9
|
+
return arr[arr.length - 1] ?? null;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Node to key name
|
|
13
|
+
*/
|
|
14
|
+
function toKeyName(node) {
|
|
15
|
+
return node.type === "TOMLBare" ? node.name : node.value;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
//#region src/parser-options.ts
|
|
20
|
+
var TOMLVerImpl = class {
|
|
21
|
+
constructor(major, minor) {
|
|
22
|
+
this.major = major;
|
|
23
|
+
this.minor = minor;
|
|
24
|
+
}
|
|
25
|
+
lt(major, minor) {
|
|
26
|
+
return this.major < major || this.major === major && this.minor < minor;
|
|
27
|
+
}
|
|
28
|
+
gte(major, minor) {
|
|
29
|
+
return this.major > major || this.major === major && this.minor >= minor;
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
const TOML_VERSION_1_0 = new TOMLVerImpl(1, 0);
|
|
33
|
+
const TOML_VERSION_1_1 = new TOMLVerImpl(1, 1);
|
|
34
|
+
const DEFAULT_TOML_VERSION = TOML_VERSION_1_1;
|
|
35
|
+
const SUPPORTED_TOML_VERSIONS = {
|
|
36
|
+
"1.0": TOML_VERSION_1_0,
|
|
37
|
+
"1.0.0": TOML_VERSION_1_0,
|
|
38
|
+
"1.1": TOML_VERSION_1_1,
|
|
39
|
+
"1.1.0": TOML_VERSION_1_1,
|
|
40
|
+
latest: TOML_VERSION_1_1,
|
|
41
|
+
next: TOML_VERSION_1_1
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Get TOML version object from given TOML version string.
|
|
45
|
+
*/
|
|
46
|
+
function getTOMLVer(v) {
|
|
47
|
+
return v && SUPPORTED_TOML_VERSIONS[v] || DEFAULT_TOML_VERSION;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/errors.ts
|
|
52
|
+
const MESSAGES = {
|
|
53
|
+
"unterminated-string": "Unterminated string constant",
|
|
54
|
+
"unterminated-table-key": "Unterminated table-key",
|
|
55
|
+
"unterminated-array": "Unterminated array",
|
|
56
|
+
"unterminated-inline-table": "Unterminated inline table",
|
|
57
|
+
"missing-key": "Empty bare keys are not allowed",
|
|
58
|
+
"missing-newline": "Must be a newline",
|
|
59
|
+
"missing-equals-sign": "Expected equal (=) token",
|
|
60
|
+
"missing-value": "Unspecified values are invalid",
|
|
61
|
+
"missing-comma": "Expected comma (,) token",
|
|
62
|
+
"dupe-keys": "Defining a key multiple times is invalid",
|
|
63
|
+
"unexpected-char": "Unexpected character",
|
|
64
|
+
"unexpected-token": "Unexpected token",
|
|
65
|
+
"invalid-control-character": "Control characters (codes < 0x1f and 0x7f) are not allowed",
|
|
66
|
+
"invalid-comment-character": "Invalid code point {{cp}} within comments",
|
|
67
|
+
"invalid-key-value-newline": "The key, equals sign, and value must be on the same line",
|
|
68
|
+
"invalid-inline-table-newline": "No newlines are allowed between the curly braces unless they are valid within a value",
|
|
69
|
+
"invalid-underscore": "Underscores are allowed between digits",
|
|
70
|
+
"invalid-space": "Unexpected spaces",
|
|
71
|
+
"invalid-three-quotes": "Three or more quotes are not permitted",
|
|
72
|
+
"invalid-date": "Unexpected invalid date",
|
|
73
|
+
"invalid-time": "Unexpected invalid time",
|
|
74
|
+
"invalid-leading-zero": "Leading zeros are not allowed",
|
|
75
|
+
"invalid-trailing-comma-in-inline-table": "Trailing comma is not permitted in an inline table",
|
|
76
|
+
"invalid-char-in-escape-sequence": "Invalid character in escape sequence",
|
|
77
|
+
"invalid-consecutive-dots-in-key": "Consecutive dots are not permitted in keys",
|
|
78
|
+
"invalid-code-point": "Invalid code point {{cp}}",
|
|
79
|
+
"invalid-trailing-dot-in-key": "Keys cannot end with a dot",
|
|
80
|
+
"invalid-leading-dot-in-key": "Keys cannot start with a dot"
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Get message from error code
|
|
84
|
+
*/
|
|
85
|
+
function getMessage(code, data) {
|
|
86
|
+
if (data) return MESSAGES[code].replace(/\{\{(.*?)\}\}/gu, (_, name$2) => {
|
|
87
|
+
if (name$2 in data) return data[name$2];
|
|
88
|
+
return `{{${name$2}}}`;
|
|
89
|
+
});
|
|
90
|
+
return MESSAGES[code];
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* TOML parse errors.
|
|
94
|
+
*/
|
|
95
|
+
var ParseError = class extends SyntaxError {
|
|
96
|
+
/**
|
|
97
|
+
* Initialize this ParseError instance.
|
|
98
|
+
*
|
|
99
|
+
*/
|
|
100
|
+
constructor(code, offset, line, column, data) {
|
|
101
|
+
super(getMessage(code, data));
|
|
102
|
+
this.index = offset;
|
|
103
|
+
this.lineNumber = line;
|
|
104
|
+
this.column = column;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/tokenizer/code-point.ts
|
|
110
|
+
const CodePoint = {
|
|
111
|
+
EOF: -1,
|
|
112
|
+
NULL: 0,
|
|
113
|
+
SOH: 1,
|
|
114
|
+
BACKSPACE: 8,
|
|
115
|
+
TABULATION: 9,
|
|
116
|
+
LINE_FEED: 10,
|
|
117
|
+
FORM_FEED: 12,
|
|
118
|
+
CARRIAGE_RETURN: 13,
|
|
119
|
+
ESCAPE: 27,
|
|
120
|
+
SO: 14,
|
|
121
|
+
US: 31,
|
|
122
|
+
SPACE: 32,
|
|
123
|
+
QUOTATION_MARK: 34,
|
|
124
|
+
HASH: 35,
|
|
125
|
+
SINGLE_QUOTE: 39,
|
|
126
|
+
PLUS_SIGN: 43,
|
|
127
|
+
COMMA: 44,
|
|
128
|
+
DASH: 45,
|
|
129
|
+
DOT: 46,
|
|
130
|
+
DIGIT_0: 48,
|
|
131
|
+
DIGIT_1: 49,
|
|
132
|
+
DIGIT_2: 50,
|
|
133
|
+
DIGIT_3: 51,
|
|
134
|
+
DIGIT_7: 55,
|
|
135
|
+
DIGIT_9: 57,
|
|
136
|
+
COLON: 58,
|
|
137
|
+
EQUALS_SIGN: 61,
|
|
138
|
+
LATIN_CAPITAL_A: 65,
|
|
139
|
+
LATIN_CAPITAL_E: 69,
|
|
140
|
+
LATIN_CAPITAL_F: 70,
|
|
141
|
+
LATIN_CAPITAL_T: 84,
|
|
142
|
+
LATIN_CAPITAL_U: 85,
|
|
143
|
+
LATIN_CAPITAL_Z: 90,
|
|
144
|
+
LEFT_BRACKET: 91,
|
|
145
|
+
BACKSLASH: 92,
|
|
146
|
+
RIGHT_BRACKET: 93,
|
|
147
|
+
UNDERSCORE: 95,
|
|
148
|
+
LATIN_SMALL_A: 97,
|
|
149
|
+
LATIN_SMALL_B: 98,
|
|
150
|
+
LATIN_SMALL_E: 101,
|
|
151
|
+
LATIN_SMALL_F: 102,
|
|
152
|
+
LATIN_SMALL_I: 105,
|
|
153
|
+
LATIN_SMALL_L: 108,
|
|
154
|
+
LATIN_SMALL_N: 110,
|
|
155
|
+
LATIN_SMALL_O: 111,
|
|
156
|
+
LATIN_SMALL_R: 114,
|
|
157
|
+
LATIN_SMALL_S: 115,
|
|
158
|
+
LATIN_SMALL_T: 116,
|
|
159
|
+
LATIN_SMALL_U: 117,
|
|
160
|
+
LATIN_SMALL_X: 120,
|
|
161
|
+
LATIN_SMALL_Z: 122,
|
|
162
|
+
LEFT_BRACE: 123,
|
|
163
|
+
RIGHT_BRACE: 125,
|
|
164
|
+
TILDE: 126,
|
|
165
|
+
DELETE: 127,
|
|
166
|
+
PAD: 128,
|
|
167
|
+
SUPERSCRIPT_TWO: 178,
|
|
168
|
+
SUPERSCRIPT_THREE: 179,
|
|
169
|
+
SUPERSCRIPT_ONE: 185,
|
|
170
|
+
VULGAR_FRACTION_ONE_QUARTER: 188,
|
|
171
|
+
VULGAR_FRACTION_THREE_QUARTERS: 190,
|
|
172
|
+
LATIN_CAPITAL_LETTER_A_WITH_GRAVE: 192,
|
|
173
|
+
LATIN_CAPITAL_LETTER_O_WITH_DIAERESIS: 214,
|
|
174
|
+
LATIN_CAPITAL_LETTER_O_WITH_STROKE: 216,
|
|
175
|
+
LATIN_SMALL_LETTER_O_WITH_DIAERESIS: 246,
|
|
176
|
+
LATIN_SMALL_LETTER_O_WITH_STROKE: 248,
|
|
177
|
+
GREEK_SMALL_REVERSED_DOTTED_LUNATE_SIGMA_SYMBOL: 891,
|
|
178
|
+
GREEK_CAPITAL_LETTER_YOT: 895,
|
|
179
|
+
CP_1FFF: 8191,
|
|
180
|
+
ZERO_WIDTH_NON_JOINER: 8204,
|
|
181
|
+
ZERO_WIDTH_JOINER: 8205,
|
|
182
|
+
UNDERTIE: 8255,
|
|
183
|
+
CHARACTER_TIE: 8256,
|
|
184
|
+
SUPERSCRIPT_ZERO: 8304,
|
|
185
|
+
CP_218F: 8591,
|
|
186
|
+
CIRCLED_DIGIT_ONE: 9312,
|
|
187
|
+
NEGATIVE_CIRCLED_DIGIT_ZERO: 9471,
|
|
188
|
+
GLAGOLITIC_CAPITAL_LETTER_AZU: 11264,
|
|
189
|
+
CP_2FEF: 12271,
|
|
190
|
+
IDEOGRAPHIC_COMMA: 12289,
|
|
191
|
+
CP_D7FF: 55295,
|
|
192
|
+
CP_E000: 57344,
|
|
193
|
+
CJK_COMPATIBILITY_IDEOGRAPH_F900: 63744,
|
|
194
|
+
ARABIC_LIGATURE_SALAAMUHU_ALAYNAA: 64975,
|
|
195
|
+
ARABIC_LIGATURE_SALLA_USED_AS_KORANIC_STOP_SIGN_ISOLATED_FORM: 65008,
|
|
196
|
+
REPLACEMENT_CHARACTER: 65533,
|
|
197
|
+
LINEAR_B_SYLLABLE_B008_A: 65536,
|
|
198
|
+
CP_EFFFF: 983039,
|
|
199
|
+
CP_10FFFF: 1114111
|
|
200
|
+
};
|
|
201
|
+
/**
|
|
202
|
+
* Check whether the code point is a control character.
|
|
203
|
+
*/
|
|
204
|
+
function isControl(cp) {
|
|
205
|
+
return cp >= CodePoint.NULL && cp <= CodePoint.US;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Check whether the code point is a whitespace.
|
|
209
|
+
*/
|
|
210
|
+
function isWhitespace(cp) {
|
|
211
|
+
return cp === CodePoint.TABULATION || cp === CodePoint.SPACE;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Check whether the code point is a end of line.
|
|
215
|
+
*/
|
|
216
|
+
function isEOL(cp) {
|
|
217
|
+
return cp === CodePoint.LINE_FEED || cp === CodePoint.CARRIAGE_RETURN;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Check whether the code point is an uppercase letter character.
|
|
221
|
+
*/
|
|
222
|
+
function isUpperLetter(cp) {
|
|
223
|
+
return cp >= CodePoint.LATIN_CAPITAL_A && cp <= CodePoint.LATIN_CAPITAL_Z;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Check whether the code point is a lowercase letter character.
|
|
227
|
+
*/
|
|
228
|
+
function isLowerLetter(cp) {
|
|
229
|
+
return cp >= CodePoint.LATIN_SMALL_A && cp <= CodePoint.LATIN_SMALL_Z;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Check whether the code point is a letter character.
|
|
233
|
+
*/
|
|
234
|
+
function isLetter(cp) {
|
|
235
|
+
return isLowerLetter(cp) || isUpperLetter(cp);
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Check whether the code point is a digit character.
|
|
239
|
+
*/
|
|
240
|
+
function isDigit(cp) {
|
|
241
|
+
return cp >= CodePoint.DIGIT_0 && cp <= CodePoint.DIGIT_9;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Check whether the code point is a hex digit character.
|
|
245
|
+
*/
|
|
246
|
+
function isHexDig(cp) {
|
|
247
|
+
return isDigit(cp) || cp >= CodePoint.LATIN_SMALL_A && cp <= CodePoint.LATIN_SMALL_F || cp >= CodePoint.LATIN_CAPITAL_A && cp <= CodePoint.LATIN_CAPITAL_F;
|
|
248
|
+
}
|
|
249
|
+
/**
|
|
250
|
+
* Check whether the code point is a octal digit character.
|
|
251
|
+
*/
|
|
252
|
+
function isOctalDig(cp) {
|
|
253
|
+
return cp >= CodePoint.DIGIT_0 && cp <= CodePoint.DIGIT_7;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Check whether the code point is valid code point.
|
|
257
|
+
*
|
|
258
|
+
* see
|
|
259
|
+
* - https://unicode.org/glossary/#unicode_scalar_value
|
|
260
|
+
* - https://toml.io/en/v1.0.0#string
|
|
261
|
+
*/
|
|
262
|
+
function isUnicodeScalarValue(cp) {
|
|
263
|
+
return cp >= 0 && cp <= 55295 || cp >= 57344 && cp <= 1114111;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/tokenizer/locs.ts
|
|
268
|
+
/**
|
|
269
|
+
* Find the last index of the array that is less than or equal to the value.
|
|
270
|
+
*/
|
|
271
|
+
function sortedLastIndex(array, value) {
|
|
272
|
+
let low = 0;
|
|
273
|
+
let high = array.length;
|
|
274
|
+
while (low < high) {
|
|
275
|
+
const mid = low + high >>> 1;
|
|
276
|
+
const val = array[mid];
|
|
277
|
+
if (val === value) return mid + 1;
|
|
278
|
+
if (val < value) low = mid + 1;
|
|
279
|
+
else high = mid;
|
|
280
|
+
}
|
|
281
|
+
return low;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* A class for getting lines and columns location.
|
|
285
|
+
*/
|
|
286
|
+
var Locations = class {
|
|
287
|
+
constructor() {
|
|
288
|
+
this.offsets = [];
|
|
289
|
+
}
|
|
290
|
+
addOffset(offset) {
|
|
291
|
+
for (let i = this.offsets.length - 1; i >= 0; i--) {
|
|
292
|
+
const element = this.offsets[i];
|
|
293
|
+
if (element === offset) return;
|
|
294
|
+
if (element < offset) break;
|
|
295
|
+
}
|
|
296
|
+
this.offsets.push(offset);
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Calculate the location of the given index.
|
|
300
|
+
* @param index The index to calculate their location.
|
|
301
|
+
* @returns The location of the index.
|
|
302
|
+
*/
|
|
303
|
+
getLocFromIndex(offset) {
|
|
304
|
+
const line = sortedLastIndex(this.offsets, offset) + 1;
|
|
305
|
+
return {
|
|
306
|
+
line,
|
|
307
|
+
column: offset - (line === 1 ? 0 : this.offsets[line - 2])
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/tokenizer/code-point-iterator.ts
|
|
314
|
+
var CodePointIterator = class {
|
|
315
|
+
/**
|
|
316
|
+
* Initialize this char iterator.
|
|
317
|
+
*/
|
|
318
|
+
constructor(text) {
|
|
319
|
+
this.locs = new Locations();
|
|
320
|
+
this.lastCodePoint = CodePoint.NULL;
|
|
321
|
+
this.start = -1;
|
|
322
|
+
this.end = 0;
|
|
323
|
+
this.text = text;
|
|
324
|
+
}
|
|
325
|
+
next() {
|
|
326
|
+
if (this.lastCodePoint === CodePoint.EOF) return CodePoint.EOF;
|
|
327
|
+
return this.lastCodePoint = this.moveAt(this.end);
|
|
328
|
+
}
|
|
329
|
+
getLocFromIndex(index) {
|
|
330
|
+
return this.locs.getLocFromIndex(index);
|
|
331
|
+
}
|
|
332
|
+
eat(cp) {
|
|
333
|
+
if (this.text.codePointAt(this.end) === cp) {
|
|
334
|
+
this.next();
|
|
335
|
+
return true;
|
|
336
|
+
}
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
moveAt(offset) {
|
|
340
|
+
this.start = this.end = offset;
|
|
341
|
+
const cp = this.text.codePointAt(this.start) ?? CodePoint.EOF;
|
|
342
|
+
if (cp === CodePoint.EOF) {
|
|
343
|
+
this.end = this.start;
|
|
344
|
+
return cp;
|
|
345
|
+
}
|
|
346
|
+
this.end += cp >= 65536 ? 2 : 1;
|
|
347
|
+
if (cp === CodePoint.LINE_FEED) this.locs.addOffset(this.end);
|
|
348
|
+
else if (cp === CodePoint.CARRIAGE_RETURN) {
|
|
349
|
+
if (this.text.codePointAt(this.end) === CodePoint.LINE_FEED) {
|
|
350
|
+
this.end++;
|
|
351
|
+
this.locs.addOffset(this.end);
|
|
352
|
+
}
|
|
353
|
+
return CodePoint.LINE_FEED;
|
|
354
|
+
}
|
|
355
|
+
return cp;
|
|
356
|
+
}
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
//#endregion
|
|
360
|
+
//#region src/tokenizer/tokenizer.ts
|
|
361
|
+
const HAS_BIGINT = typeof BigInt !== "undefined";
|
|
362
|
+
const RADIX_PREFIXES = {
|
|
363
|
+
16: "0x",
|
|
364
|
+
10: "",
|
|
365
|
+
8: "0o",
|
|
366
|
+
2: "0b"
|
|
367
|
+
};
|
|
368
|
+
const ESCAPES_1_0 = {
|
|
369
|
+
[CodePoint.QUOTATION_MARK]: CodePoint.QUOTATION_MARK,
|
|
370
|
+
[CodePoint.BACKSLASH]: CodePoint.BACKSLASH,
|
|
371
|
+
[CodePoint.LATIN_SMALL_B]: CodePoint.BACKSPACE,
|
|
372
|
+
[CodePoint.LATIN_SMALL_F]: CodePoint.FORM_FEED,
|
|
373
|
+
[CodePoint.LATIN_SMALL_N]: CodePoint.LINE_FEED,
|
|
374
|
+
[CodePoint.LATIN_SMALL_R]: CodePoint.CARRIAGE_RETURN,
|
|
375
|
+
[CodePoint.LATIN_SMALL_T]: CodePoint.TABULATION
|
|
376
|
+
};
|
|
377
|
+
const ESCAPES_LATEST = {
|
|
378
|
+
...ESCAPES_1_0,
|
|
379
|
+
[CodePoint.LATIN_SMALL_E]: CodePoint.ESCAPE
|
|
380
|
+
};
|
|
381
|
+
/**
|
|
382
|
+
* Tokenizer for TOML.
|
|
383
|
+
*/
|
|
384
|
+
var Tokenizer = class {
|
|
385
|
+
/**
|
|
386
|
+
* Initialize this tokenizer.
|
|
387
|
+
*/
|
|
388
|
+
constructor(text, parserOptions) {
|
|
389
|
+
this.backCode = false;
|
|
390
|
+
this.lastCodePoint = CodePoint.NULL;
|
|
391
|
+
this.state = "DATA";
|
|
392
|
+
this.token = null;
|
|
393
|
+
this.tokenStart = -1;
|
|
394
|
+
this.valuesEnabled = false;
|
|
395
|
+
this.text = text;
|
|
396
|
+
this.parserOptions = parserOptions || {};
|
|
397
|
+
this.codePointIterator = new CodePointIterator(text);
|
|
398
|
+
this.tomlVersion = getTOMLVer(this.parserOptions.tomlVersion);
|
|
399
|
+
this.ESCAPES = this.tomlVersion.gte(1, 1) ? ESCAPES_LATEST : ESCAPES_1_0;
|
|
400
|
+
}
|
|
401
|
+
get start() {
|
|
402
|
+
return this.codePointIterator.start;
|
|
403
|
+
}
|
|
404
|
+
get end() {
|
|
405
|
+
return this.codePointIterator.end;
|
|
406
|
+
}
|
|
407
|
+
getLocFromIndex(index) {
|
|
408
|
+
return this.codePointIterator.getLocFromIndex(index);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* Report an invalid character error.
|
|
412
|
+
*/
|
|
413
|
+
reportParseError(code, data) {
|
|
414
|
+
const offset = this.codePointIterator.start;
|
|
415
|
+
const loc = this.codePointIterator.getLocFromIndex(offset);
|
|
416
|
+
throw new ParseError(code, offset, loc.line, loc.column, data);
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Get the next token.
|
|
420
|
+
*/
|
|
421
|
+
nextToken() {
|
|
422
|
+
let token = this.token;
|
|
423
|
+
if (token != null) {
|
|
424
|
+
this.token = null;
|
|
425
|
+
return token;
|
|
426
|
+
}
|
|
427
|
+
let cp = this.lastCodePoint;
|
|
428
|
+
while (cp !== CodePoint.EOF && !this.token) {
|
|
429
|
+
cp = this.nextCode();
|
|
430
|
+
const nextState = this[this.state](cp);
|
|
431
|
+
if (!nextState) throw new Error(`Unknown error: pre state=${this.state}`);
|
|
432
|
+
this.state = nextState;
|
|
433
|
+
}
|
|
434
|
+
token = this.token;
|
|
435
|
+
this.token = null;
|
|
436
|
+
return token;
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Get the next code point.
|
|
440
|
+
*/
|
|
441
|
+
nextCode() {
|
|
442
|
+
if (this.lastCodePoint === CodePoint.EOF) return CodePoint.EOF;
|
|
443
|
+
if (this.backCode) {
|
|
444
|
+
this.backCode = false;
|
|
445
|
+
return this.lastCodePoint;
|
|
446
|
+
}
|
|
447
|
+
return this.lastCodePoint = this.codePointIterator.next();
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Eat the next code point.
|
|
451
|
+
*/
|
|
452
|
+
eatCode(cp) {
|
|
453
|
+
if (this.lastCodePoint === CodePoint.EOF) return false;
|
|
454
|
+
if (this.backCode) {
|
|
455
|
+
if (this.lastCodePoint === cp) {
|
|
456
|
+
this.backCode = false;
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
return false;
|
|
460
|
+
}
|
|
461
|
+
return this.codePointIterator.eat(cp);
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* Moves the character position to the given position.
|
|
465
|
+
*/
|
|
466
|
+
moveAt(loc) {
|
|
467
|
+
if (this.backCode) this.backCode = false;
|
|
468
|
+
this.lastCodePoint = this.codePointIterator.moveAt(loc);
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* Back the current code point as the given state.
|
|
472
|
+
*/
|
|
473
|
+
back(state) {
|
|
474
|
+
this.backCode = true;
|
|
475
|
+
return state;
|
|
476
|
+
}
|
|
477
|
+
punctuatorToken() {
|
|
478
|
+
this.startToken();
|
|
479
|
+
this.endToken("Punctuator", "end");
|
|
480
|
+
}
|
|
481
|
+
startToken() {
|
|
482
|
+
this.tokenStart = this.codePointIterator.start;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* Commit the current token.
|
|
486
|
+
*/
|
|
487
|
+
endToken(type, pos, option1, option2) {
|
|
488
|
+
const { tokenStart } = this;
|
|
489
|
+
const end = this.codePointIterator[pos];
|
|
490
|
+
const range = [tokenStart, end];
|
|
491
|
+
const loc = {
|
|
492
|
+
start: this.codePointIterator.getLocFromIndex(tokenStart),
|
|
493
|
+
end: this.codePointIterator.getLocFromIndex(end)
|
|
494
|
+
};
|
|
495
|
+
if (type === "Block") this.token = {
|
|
496
|
+
type,
|
|
497
|
+
value: this.text.slice(tokenStart + 1, end),
|
|
498
|
+
range,
|
|
499
|
+
loc
|
|
500
|
+
};
|
|
501
|
+
else {
|
|
502
|
+
let token;
|
|
503
|
+
const value = this.text.slice(tokenStart, end);
|
|
504
|
+
if (type === "BasicString" || type === "LiteralString" || type === "MultiLineBasicString" || type === "MultiLineLiteralString") token = {
|
|
505
|
+
type,
|
|
506
|
+
value,
|
|
507
|
+
string: option1,
|
|
508
|
+
range,
|
|
509
|
+
loc
|
|
510
|
+
};
|
|
511
|
+
else if (type === "Integer") {
|
|
512
|
+
const text = option1;
|
|
513
|
+
token = {
|
|
514
|
+
type,
|
|
515
|
+
value,
|
|
516
|
+
number: parseInt(text, option2),
|
|
517
|
+
bigint: HAS_BIGINT ? BigInt(RADIX_PREFIXES[option2] + text) : null,
|
|
518
|
+
range,
|
|
519
|
+
loc
|
|
520
|
+
};
|
|
521
|
+
} else if (type === "Float") token = {
|
|
522
|
+
type,
|
|
523
|
+
value,
|
|
524
|
+
number: option1,
|
|
525
|
+
range,
|
|
526
|
+
loc
|
|
527
|
+
};
|
|
528
|
+
else if (type === "Boolean") token = {
|
|
529
|
+
type,
|
|
530
|
+
value,
|
|
531
|
+
boolean: option1,
|
|
532
|
+
range,
|
|
533
|
+
loc
|
|
534
|
+
};
|
|
535
|
+
else if (type === "LocalDate" || type === "LocalTime" || type === "LocalDateTime" || type === "OffsetDateTime") token = {
|
|
536
|
+
type,
|
|
537
|
+
value,
|
|
538
|
+
date: option1,
|
|
539
|
+
range,
|
|
540
|
+
loc
|
|
541
|
+
};
|
|
542
|
+
else token = {
|
|
543
|
+
type,
|
|
544
|
+
value,
|
|
545
|
+
range,
|
|
546
|
+
loc
|
|
547
|
+
};
|
|
548
|
+
this.token = token;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
DATA(cp) {
|
|
552
|
+
while (isWhitespace(cp) || isEOL(cp)) cp = this.nextCode();
|
|
553
|
+
if (cp === CodePoint.HASH) {
|
|
554
|
+
this.startToken();
|
|
555
|
+
return "COMMENT";
|
|
556
|
+
}
|
|
557
|
+
if (cp === CodePoint.QUOTATION_MARK) {
|
|
558
|
+
this.startToken();
|
|
559
|
+
return "BASIC_STRING";
|
|
560
|
+
}
|
|
561
|
+
if (cp === CodePoint.SINGLE_QUOTE) {
|
|
562
|
+
this.startToken();
|
|
563
|
+
return "LITERAL_STRING";
|
|
564
|
+
}
|
|
565
|
+
if (cp === CodePoint.DOT || cp === CodePoint.EQUALS_SIGN || cp === CodePoint.LEFT_BRACKET || cp === CodePoint.RIGHT_BRACKET || cp === CodePoint.LEFT_BRACE || cp === CodePoint.RIGHT_BRACE || cp === CodePoint.COMMA) {
|
|
566
|
+
this.punctuatorToken();
|
|
567
|
+
return "DATA";
|
|
568
|
+
}
|
|
569
|
+
if (this.valuesEnabled) {
|
|
570
|
+
if (cp === CodePoint.DASH || cp === CodePoint.PLUS_SIGN) {
|
|
571
|
+
this.startToken();
|
|
572
|
+
return "SIGN";
|
|
573
|
+
}
|
|
574
|
+
if (cp === CodePoint.LATIN_SMALL_N || cp === CodePoint.LATIN_SMALL_I) {
|
|
575
|
+
this.startToken();
|
|
576
|
+
return this.back("NAN_OR_INF");
|
|
577
|
+
}
|
|
578
|
+
if (isDigit(cp)) {
|
|
579
|
+
this.startToken();
|
|
580
|
+
return this.back("NUMBER");
|
|
581
|
+
}
|
|
582
|
+
if (cp === CodePoint.LATIN_SMALL_T || cp === CodePoint.LATIN_SMALL_F) {
|
|
583
|
+
this.startToken();
|
|
584
|
+
return this.back("BOOLEAN");
|
|
585
|
+
}
|
|
586
|
+
} else if (isUnquotedKeyChar(cp, this.tomlVersion)) {
|
|
587
|
+
this.startToken();
|
|
588
|
+
return "BARE";
|
|
589
|
+
}
|
|
590
|
+
if (cp === CodePoint.EOF) return "DATA";
|
|
591
|
+
return this.reportParseError("unexpected-char");
|
|
592
|
+
}
|
|
593
|
+
COMMENT(cp) {
|
|
594
|
+
const processCommentChar = this.tomlVersion.gte(1, 1) ? (c) => {
|
|
595
|
+
if (!isNonEOL(c)) this.reportParseError("invalid-comment-character", { cp: JSON.stringify(String.fromCodePoint(c)).slice(1, -1) });
|
|
596
|
+
} : (c) => {
|
|
597
|
+
if (isControlOtherThanTab(c)) this.reportParseErrorControlChar();
|
|
598
|
+
};
|
|
599
|
+
while (!isEOL(cp) && cp !== CodePoint.EOF) {
|
|
600
|
+
processCommentChar(cp);
|
|
601
|
+
cp = this.nextCode();
|
|
602
|
+
}
|
|
603
|
+
this.endToken("Block", "start");
|
|
604
|
+
return "DATA";
|
|
605
|
+
}
|
|
606
|
+
BARE(cp) {
|
|
607
|
+
while (isUnquotedKeyChar(cp, this.tomlVersion)) cp = this.nextCode();
|
|
608
|
+
this.endToken("Bare", "start");
|
|
609
|
+
return this.back("DATA");
|
|
610
|
+
}
|
|
611
|
+
BASIC_STRING(cp) {
|
|
612
|
+
if (cp === CodePoint.QUOTATION_MARK) {
|
|
613
|
+
cp = this.nextCode();
|
|
614
|
+
if (cp === CodePoint.QUOTATION_MARK) return "MULTI_LINE_BASIC_STRING";
|
|
615
|
+
this.endToken("BasicString", "start", "");
|
|
616
|
+
return this.back("DATA");
|
|
617
|
+
}
|
|
618
|
+
const out = [];
|
|
619
|
+
while (cp !== CodePoint.QUOTATION_MARK && cp !== CodePoint.EOF && cp !== CodePoint.LINE_FEED) {
|
|
620
|
+
if (isControlOtherThanTab(cp)) return this.reportParseErrorControlChar();
|
|
621
|
+
if (cp === CodePoint.BACKSLASH) {
|
|
622
|
+
cp = this.nextCode();
|
|
623
|
+
const ecp = this.ESCAPES[cp];
|
|
624
|
+
if (ecp) {
|
|
625
|
+
out.push(ecp);
|
|
626
|
+
cp = this.nextCode();
|
|
627
|
+
continue;
|
|
628
|
+
} else if (cp === CodePoint.LATIN_SMALL_U) {
|
|
629
|
+
const code = this.parseUnicode(4);
|
|
630
|
+
out.push(code);
|
|
631
|
+
cp = this.nextCode();
|
|
632
|
+
continue;
|
|
633
|
+
} else if (cp === CodePoint.LATIN_CAPITAL_U) {
|
|
634
|
+
const code = this.parseUnicode(8);
|
|
635
|
+
out.push(code);
|
|
636
|
+
cp = this.nextCode();
|
|
637
|
+
continue;
|
|
638
|
+
} else if (cp === CodePoint.LATIN_SMALL_X && this.tomlVersion.gte(1, 1)) {
|
|
639
|
+
const code = this.parseUnicode(2);
|
|
640
|
+
out.push(code);
|
|
641
|
+
cp = this.nextCode();
|
|
642
|
+
continue;
|
|
643
|
+
}
|
|
644
|
+
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
645
|
+
}
|
|
646
|
+
out.push(cp);
|
|
647
|
+
cp = this.nextCode();
|
|
648
|
+
}
|
|
649
|
+
if (cp !== CodePoint.QUOTATION_MARK) return this.reportParseError("unterminated-string");
|
|
650
|
+
this.endToken("BasicString", "end", String.fromCodePoint(...out));
|
|
651
|
+
return "DATA";
|
|
652
|
+
}
|
|
653
|
+
MULTI_LINE_BASIC_STRING(cp) {
|
|
654
|
+
const out = [];
|
|
655
|
+
if (cp === CodePoint.LINE_FEED) cp = this.nextCode();
|
|
656
|
+
while (cp !== CodePoint.EOF) {
|
|
657
|
+
if (cp !== CodePoint.LINE_FEED && isControlOtherThanTab(cp)) return this.reportParseErrorControlChar();
|
|
658
|
+
if (cp === CodePoint.QUOTATION_MARK) {
|
|
659
|
+
const startPos = this.codePointIterator.start;
|
|
660
|
+
if (this.eatCode(CodePoint.QUOTATION_MARK) && this.eatCode(CodePoint.QUOTATION_MARK)) {
|
|
661
|
+
if (this.eatCode(CodePoint.QUOTATION_MARK)) {
|
|
662
|
+
out.push(CodePoint.QUOTATION_MARK);
|
|
663
|
+
if (this.eatCode(CodePoint.QUOTATION_MARK)) {
|
|
664
|
+
out.push(CodePoint.QUOTATION_MARK);
|
|
665
|
+
if (this.eatCode(CodePoint.QUOTATION_MARK)) {
|
|
666
|
+
this.moveAt(startPos);
|
|
667
|
+
return this.reportParseError("invalid-three-quotes");
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
this.endToken("MultiLineBasicString", "end", String.fromCodePoint(...out));
|
|
672
|
+
return "DATA";
|
|
673
|
+
}
|
|
674
|
+
this.moveAt(startPos);
|
|
675
|
+
}
|
|
676
|
+
if (cp === CodePoint.BACKSLASH) {
|
|
677
|
+
cp = this.nextCode();
|
|
678
|
+
const ecp = this.ESCAPES[cp];
|
|
679
|
+
if (ecp) {
|
|
680
|
+
out.push(ecp);
|
|
681
|
+
cp = this.nextCode();
|
|
682
|
+
continue;
|
|
683
|
+
} else if (cp === CodePoint.LATIN_SMALL_U) {
|
|
684
|
+
const code = this.parseUnicode(4);
|
|
685
|
+
out.push(code);
|
|
686
|
+
cp = this.nextCode();
|
|
687
|
+
continue;
|
|
688
|
+
} else if (cp === CodePoint.LATIN_CAPITAL_U) {
|
|
689
|
+
const code = this.parseUnicode(8);
|
|
690
|
+
out.push(code);
|
|
691
|
+
cp = this.nextCode();
|
|
692
|
+
continue;
|
|
693
|
+
} else if (cp === CodePoint.LATIN_SMALL_X && this.tomlVersion.gte(1, 1)) {
|
|
694
|
+
const code = this.parseUnicode(2);
|
|
695
|
+
out.push(code);
|
|
696
|
+
cp = this.nextCode();
|
|
697
|
+
continue;
|
|
698
|
+
} else if (cp === CodePoint.LINE_FEED) {
|
|
699
|
+
cp = this.nextCode();
|
|
700
|
+
while (isWhitespace(cp) || cp === CodePoint.LINE_FEED) cp = this.nextCode();
|
|
701
|
+
continue;
|
|
702
|
+
} else if (isWhitespace(cp)) {
|
|
703
|
+
let valid = true;
|
|
704
|
+
const startPos = this.codePointIterator.start;
|
|
705
|
+
let nextCp;
|
|
706
|
+
while ((nextCp = this.nextCode()) !== CodePoint.EOF) {
|
|
707
|
+
if (nextCp === CodePoint.LINE_FEED) break;
|
|
708
|
+
if (!isWhitespace(nextCp)) {
|
|
709
|
+
this.moveAt(startPos);
|
|
710
|
+
valid = false;
|
|
711
|
+
break;
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
if (valid) {
|
|
715
|
+
cp = this.nextCode();
|
|
716
|
+
while (isWhitespace(cp) || cp === CodePoint.LINE_FEED) cp = this.nextCode();
|
|
717
|
+
continue;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
721
|
+
}
|
|
722
|
+
out.push(cp);
|
|
723
|
+
cp = this.nextCode();
|
|
724
|
+
}
|
|
725
|
+
return this.reportParseError("unterminated-string");
|
|
726
|
+
}
|
|
727
|
+
LITERAL_STRING(cp) {
|
|
728
|
+
if (cp === CodePoint.SINGLE_QUOTE) {
|
|
729
|
+
cp = this.nextCode();
|
|
730
|
+
if (cp === CodePoint.SINGLE_QUOTE) return "MULTI_LINE_LITERAL_STRING";
|
|
731
|
+
this.endToken("LiteralString", "start", "");
|
|
732
|
+
return this.back("DATA");
|
|
733
|
+
}
|
|
734
|
+
const out = [];
|
|
735
|
+
while (cp !== CodePoint.SINGLE_QUOTE && cp !== CodePoint.EOF && cp !== CodePoint.LINE_FEED) {
|
|
736
|
+
if (isControlOtherThanTab(cp)) return this.reportParseErrorControlChar();
|
|
737
|
+
out.push(cp);
|
|
738
|
+
cp = this.nextCode();
|
|
739
|
+
}
|
|
740
|
+
if (cp !== CodePoint.SINGLE_QUOTE) return this.reportParseError("unterminated-string");
|
|
741
|
+
this.endToken("LiteralString", "end", String.fromCodePoint(...out));
|
|
742
|
+
return "DATA";
|
|
743
|
+
}
|
|
744
|
+
MULTI_LINE_LITERAL_STRING(cp) {
|
|
745
|
+
const out = [];
|
|
746
|
+
if (cp === CodePoint.LINE_FEED) cp = this.nextCode();
|
|
747
|
+
while (cp !== CodePoint.EOF) {
|
|
748
|
+
if (cp !== CodePoint.LINE_FEED && isControlOtherThanTab(cp)) return this.reportParseErrorControlChar();
|
|
749
|
+
if (cp === CodePoint.SINGLE_QUOTE) {
|
|
750
|
+
const startPos = this.codePointIterator.start;
|
|
751
|
+
if (this.eatCode(CodePoint.SINGLE_QUOTE) && this.eatCode(CodePoint.SINGLE_QUOTE)) {
|
|
752
|
+
if (this.eatCode(CodePoint.SINGLE_QUOTE)) {
|
|
753
|
+
out.push(CodePoint.SINGLE_QUOTE);
|
|
754
|
+
if (this.eatCode(CodePoint.SINGLE_QUOTE)) {
|
|
755
|
+
out.push(CodePoint.SINGLE_QUOTE);
|
|
756
|
+
if (this.eatCode(CodePoint.SINGLE_QUOTE)) {
|
|
757
|
+
this.moveAt(startPos);
|
|
758
|
+
return this.reportParseError("invalid-three-quotes");
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
this.endToken("MultiLineLiteralString", "end", String.fromCodePoint(...out));
|
|
763
|
+
return "DATA";
|
|
764
|
+
}
|
|
765
|
+
this.moveAt(startPos);
|
|
766
|
+
}
|
|
767
|
+
out.push(cp);
|
|
768
|
+
cp = this.nextCode();
|
|
769
|
+
}
|
|
770
|
+
return this.reportParseError("unterminated-string");
|
|
771
|
+
}
|
|
772
|
+
SIGN(cp) {
|
|
773
|
+
if (cp === CodePoint.LATIN_SMALL_N || cp === CodePoint.LATIN_SMALL_I) return this.back("NAN_OR_INF");
|
|
774
|
+
if (isDigit(cp)) return this.back("NUMBER");
|
|
775
|
+
return this.reportParseError("unexpected-char");
|
|
776
|
+
}
|
|
777
|
+
NAN_OR_INF(cp) {
|
|
778
|
+
if (cp === CodePoint.LATIN_SMALL_N) {
|
|
779
|
+
const startPos = this.codePointIterator.start;
|
|
780
|
+
if (this.eatCode(CodePoint.LATIN_SMALL_A) && this.eatCode(CodePoint.LATIN_SMALL_N)) {
|
|
781
|
+
this.endToken("Float", "end", NaN);
|
|
782
|
+
return "DATA";
|
|
783
|
+
}
|
|
784
|
+
this.moveAt(startPos);
|
|
785
|
+
} else if (cp === CodePoint.LATIN_SMALL_I) {
|
|
786
|
+
const startPos = this.codePointIterator.start;
|
|
787
|
+
if (this.eatCode(CodePoint.LATIN_SMALL_N) && this.eatCode(CodePoint.LATIN_SMALL_F)) {
|
|
788
|
+
this.endToken("Float", "end", this.text[this.tokenStart] === "-" ? -Infinity : Infinity);
|
|
789
|
+
return "DATA";
|
|
790
|
+
}
|
|
791
|
+
this.moveAt(startPos);
|
|
792
|
+
}
|
|
793
|
+
return this.reportParseError("unexpected-char");
|
|
794
|
+
}
|
|
795
|
+
NUMBER(cp) {
|
|
796
|
+
const start = this.text[this.tokenStart];
|
|
797
|
+
const sign = start === "+" ? CodePoint.PLUS_SIGN : start === "-" ? CodePoint.DASH : CodePoint.NULL;
|
|
798
|
+
if (cp === CodePoint.DIGIT_0) {
|
|
799
|
+
if (sign === CodePoint.NULL) {
|
|
800
|
+
const startPos = this.codePointIterator.start;
|
|
801
|
+
const nextCp$1 = this.nextCode();
|
|
802
|
+
if (isDigit(nextCp$1)) {
|
|
803
|
+
const nextNextCp = this.nextCode();
|
|
804
|
+
if (nextNextCp === CodePoint.COLON) {
|
|
805
|
+
this.data = {
|
|
806
|
+
hasDate: false,
|
|
807
|
+
year: 0,
|
|
808
|
+
month: 0,
|
|
809
|
+
day: 0,
|
|
810
|
+
hour: Number(String.fromCodePoint(CodePoint.DIGIT_0, nextCp$1)),
|
|
811
|
+
minute: 0,
|
|
812
|
+
second: 0
|
|
813
|
+
};
|
|
814
|
+
return "TIME_MINUTE";
|
|
815
|
+
}
|
|
816
|
+
if (isDigit(nextNextCp)) {
|
|
817
|
+
const nextNextNextCp = this.nextCode();
|
|
818
|
+
if (isDigit(nextNextNextCp) && this.eatCode(CodePoint.DASH)) {
|
|
819
|
+
this.data = {
|
|
820
|
+
hasDate: true,
|
|
821
|
+
year: Number(String.fromCodePoint(CodePoint.DIGIT_0, nextCp$1, nextNextCp, nextNextNextCp)),
|
|
822
|
+
month: 0,
|
|
823
|
+
day: 0,
|
|
824
|
+
hour: 0,
|
|
825
|
+
minute: 0,
|
|
826
|
+
second: 0
|
|
827
|
+
};
|
|
828
|
+
return "DATE_MONTH";
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
this.moveAt(startPos);
|
|
832
|
+
return this.reportParseError("invalid-leading-zero");
|
|
833
|
+
}
|
|
834
|
+
this.moveAt(startPos);
|
|
835
|
+
}
|
|
836
|
+
cp = this.nextCode();
|
|
837
|
+
if (cp === CodePoint.LATIN_SMALL_X || cp === CodePoint.LATIN_SMALL_O || cp === CodePoint.LATIN_SMALL_B) {
|
|
838
|
+
if (sign !== CodePoint.NULL) return this.reportParseError("unexpected-char");
|
|
839
|
+
return cp === CodePoint.LATIN_SMALL_X ? "HEX" : cp === CodePoint.LATIN_SMALL_O ? "OCTAL" : "BINARY";
|
|
840
|
+
}
|
|
841
|
+
if (cp === CodePoint.LATIN_SMALL_E || cp === CodePoint.LATIN_CAPITAL_E) {
|
|
842
|
+
this.data = {
|
|
843
|
+
minus: sign === CodePoint.DASH,
|
|
844
|
+
left: [CodePoint.DIGIT_0]
|
|
845
|
+
};
|
|
846
|
+
return "EXPONENT_RIGHT";
|
|
847
|
+
}
|
|
848
|
+
if (cp === CodePoint.DOT) {
|
|
849
|
+
this.data = {
|
|
850
|
+
minus: sign === CodePoint.DASH,
|
|
851
|
+
absInt: [CodePoint.DIGIT_0]
|
|
852
|
+
};
|
|
853
|
+
return "FRACTIONAL_RIGHT";
|
|
854
|
+
}
|
|
855
|
+
this.endToken("Integer", "start", "0", 10);
|
|
856
|
+
return this.back("DATA");
|
|
857
|
+
}
|
|
858
|
+
const { out, nextCp, hasUnderscore } = this.parseDigits(cp, isDigit);
|
|
859
|
+
if (nextCp === CodePoint.DASH && sign === CodePoint.NULL && !hasUnderscore && out.length === 4) {
|
|
860
|
+
this.data = {
|
|
861
|
+
hasDate: true,
|
|
862
|
+
year: Number(String.fromCodePoint(...out)),
|
|
863
|
+
month: 0,
|
|
864
|
+
day: 0,
|
|
865
|
+
hour: 0,
|
|
866
|
+
minute: 0,
|
|
867
|
+
second: 0
|
|
868
|
+
};
|
|
869
|
+
return "DATE_MONTH";
|
|
870
|
+
}
|
|
871
|
+
if (nextCp === CodePoint.COLON && sign === CodePoint.NULL && !hasUnderscore && out.length === 2) {
|
|
872
|
+
this.data = {
|
|
873
|
+
hasDate: false,
|
|
874
|
+
year: 0,
|
|
875
|
+
month: 0,
|
|
876
|
+
day: 0,
|
|
877
|
+
hour: Number(String.fromCodePoint(...out)),
|
|
878
|
+
minute: 0,
|
|
879
|
+
second: 0
|
|
880
|
+
};
|
|
881
|
+
return "TIME_MINUTE";
|
|
882
|
+
}
|
|
883
|
+
if (nextCp === CodePoint.LATIN_SMALL_E || nextCp === CodePoint.LATIN_CAPITAL_E) {
|
|
884
|
+
this.data = {
|
|
885
|
+
minus: sign === CodePoint.DASH,
|
|
886
|
+
left: out
|
|
887
|
+
};
|
|
888
|
+
return "EXPONENT_RIGHT";
|
|
889
|
+
}
|
|
890
|
+
if (nextCp === CodePoint.DOT) {
|
|
891
|
+
this.data = {
|
|
892
|
+
minus: sign === CodePoint.DASH,
|
|
893
|
+
absInt: out
|
|
894
|
+
};
|
|
895
|
+
return "FRACTIONAL_RIGHT";
|
|
896
|
+
}
|
|
897
|
+
this.endToken("Integer", "start", sign === CodePoint.DASH ? String.fromCodePoint(CodePoint.DASH, ...out) : String.fromCodePoint(...out), 10);
|
|
898
|
+
return this.back("DATA");
|
|
899
|
+
}
|
|
900
|
+
HEX(cp) {
|
|
901
|
+
const { out } = this.parseDigits(cp, isHexDig);
|
|
902
|
+
this.endToken("Integer", "start", String.fromCodePoint(...out), 16);
|
|
903
|
+
return this.back("DATA");
|
|
904
|
+
}
|
|
905
|
+
OCTAL(cp) {
|
|
906
|
+
const { out } = this.parseDigits(cp, isOctalDig);
|
|
907
|
+
this.endToken("Integer", "start", String.fromCodePoint(...out), 8);
|
|
908
|
+
return this.back("DATA");
|
|
909
|
+
}
|
|
910
|
+
BINARY(cp) {
|
|
911
|
+
const { out } = this.parseDigits(cp, (c) => c === CodePoint.DIGIT_0 || c === CodePoint.DIGIT_1);
|
|
912
|
+
this.endToken("Integer", "start", String.fromCodePoint(...out), 2);
|
|
913
|
+
return this.back("DATA");
|
|
914
|
+
}
|
|
915
|
+
FRACTIONAL_RIGHT(cp) {
|
|
916
|
+
const { minus, absInt } = this.data;
|
|
917
|
+
const { out, nextCp } = this.parseDigits(cp, isDigit);
|
|
918
|
+
const absNum = [
|
|
919
|
+
...absInt,
|
|
920
|
+
CodePoint.DOT,
|
|
921
|
+
...out
|
|
922
|
+
];
|
|
923
|
+
if (nextCp === CodePoint.LATIN_SMALL_E || nextCp === CodePoint.LATIN_CAPITAL_E) {
|
|
924
|
+
this.data = {
|
|
925
|
+
minus,
|
|
926
|
+
left: absNum
|
|
927
|
+
};
|
|
928
|
+
return "EXPONENT_RIGHT";
|
|
929
|
+
}
|
|
930
|
+
const value = Number(minus ? String.fromCodePoint(CodePoint.DASH, ...absNum) : String.fromCodePoint(...absNum));
|
|
931
|
+
this.endToken("Float", "start", value);
|
|
932
|
+
return this.back("DATA");
|
|
933
|
+
}
|
|
934
|
+
EXPONENT_RIGHT(cp) {
|
|
935
|
+
const { left, minus: leftMinus } = this.data;
|
|
936
|
+
let minus = false;
|
|
937
|
+
if (cp === CodePoint.DASH || cp === CodePoint.PLUS_SIGN) {
|
|
938
|
+
minus = cp === CodePoint.DASH;
|
|
939
|
+
cp = this.nextCode();
|
|
940
|
+
}
|
|
941
|
+
const { out } = this.parseDigits(cp, isDigit);
|
|
942
|
+
const right = out;
|
|
943
|
+
if (minus) right.unshift(CodePoint.DASH);
|
|
944
|
+
const value = Number(leftMinus ? String.fromCodePoint(CodePoint.DASH, ...left, CodePoint.LATIN_SMALL_E, ...right) : String.fromCodePoint(...left, CodePoint.LATIN_SMALL_E, ...right));
|
|
945
|
+
this.endToken("Float", "start", value);
|
|
946
|
+
return this.back("DATA");
|
|
947
|
+
}
|
|
948
|
+
BOOLEAN(cp) {
|
|
949
|
+
if (cp === CodePoint.LATIN_SMALL_T) {
|
|
950
|
+
const startPos = this.codePointIterator.start;
|
|
951
|
+
if (this.eatCode(CodePoint.LATIN_SMALL_R) && this.eatCode(CodePoint.LATIN_SMALL_U) && this.eatCode(CodePoint.LATIN_SMALL_E)) {
|
|
952
|
+
this.endToken("Boolean", "end", true);
|
|
953
|
+
return "DATA";
|
|
954
|
+
}
|
|
955
|
+
this.moveAt(startPos);
|
|
956
|
+
} else if (cp === CodePoint.LATIN_SMALL_F) {
|
|
957
|
+
const startPos = this.codePointIterator.start;
|
|
958
|
+
if (this.eatCode(CodePoint.LATIN_SMALL_A) && this.eatCode(CodePoint.LATIN_SMALL_L) && this.eatCode(CodePoint.LATIN_SMALL_S) && this.eatCode(CodePoint.LATIN_SMALL_E)) {
|
|
959
|
+
this.endToken("Boolean", "end", false);
|
|
960
|
+
return "DATA";
|
|
961
|
+
}
|
|
962
|
+
this.moveAt(startPos);
|
|
963
|
+
}
|
|
964
|
+
return this.reportParseError("unexpected-char");
|
|
965
|
+
}
|
|
966
|
+
DATE_MONTH(cp) {
|
|
967
|
+
const start = this.codePointIterator.start;
|
|
968
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
969
|
+
cp = this.nextCode();
|
|
970
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
971
|
+
cp = this.nextCode();
|
|
972
|
+
if (cp !== CodePoint.DASH) return this.reportParseError("unexpected-char");
|
|
973
|
+
const end = this.codePointIterator.start;
|
|
974
|
+
const data = this.data;
|
|
975
|
+
data.month = Number(this.text.slice(start, end));
|
|
976
|
+
return "DATE_DAY";
|
|
977
|
+
}
|
|
978
|
+
DATE_DAY(cp) {
|
|
979
|
+
const start = this.codePointIterator.start;
|
|
980
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
981
|
+
cp = this.nextCode();
|
|
982
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
983
|
+
const end = this.codePointIterator.end;
|
|
984
|
+
const data = this.data;
|
|
985
|
+
data.day = Number(this.text.slice(start, end));
|
|
986
|
+
if (!isValidDate(data.year, data.month, data.day)) return this.reportParseError("invalid-date");
|
|
987
|
+
cp = this.nextCode();
|
|
988
|
+
if (cp === CodePoint.LATIN_CAPITAL_T || cp === CodePoint.LATIN_SMALL_T) return "TIME_HOUR";
|
|
989
|
+
if (cp === CodePoint.SPACE) {
|
|
990
|
+
const startPos = this.codePointIterator.start;
|
|
991
|
+
if (isDigit(this.nextCode()) && isDigit(this.nextCode())) {
|
|
992
|
+
this.moveAt(startPos);
|
|
993
|
+
return "TIME_HOUR";
|
|
994
|
+
}
|
|
995
|
+
this.moveAt(startPos);
|
|
996
|
+
}
|
|
997
|
+
const dateValue = getDateFromDateTimeData(data, "");
|
|
998
|
+
this.endToken("LocalDate", "start", dateValue);
|
|
999
|
+
return this.back("DATA");
|
|
1000
|
+
}
|
|
1001
|
+
TIME_HOUR(cp) {
|
|
1002
|
+
const start = this.codePointIterator.start;
|
|
1003
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1004
|
+
cp = this.nextCode();
|
|
1005
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1006
|
+
cp = this.nextCode();
|
|
1007
|
+
if (cp !== CodePoint.COLON) return this.reportParseError("unexpected-char");
|
|
1008
|
+
const end = this.codePointIterator.start;
|
|
1009
|
+
const data = this.data;
|
|
1010
|
+
data.hour = Number(this.text.slice(start, end));
|
|
1011
|
+
return "TIME_MINUTE";
|
|
1012
|
+
}
|
|
1013
|
+
TIME_MINUTE(cp) {
|
|
1014
|
+
const start = this.codePointIterator.start;
|
|
1015
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1016
|
+
cp = this.nextCode();
|
|
1017
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1018
|
+
const end = this.codePointIterator.end;
|
|
1019
|
+
const data = this.data;
|
|
1020
|
+
data.minute = Number(this.text.slice(start, end));
|
|
1021
|
+
cp = this.nextCode();
|
|
1022
|
+
if (cp === CodePoint.COLON) return "TIME_SECOND";
|
|
1023
|
+
if (this.tomlVersion.lt(1, 1)) return this.reportParseError("unexpected-char");
|
|
1024
|
+
if (!isValidTime(data.hour, data.minute, data.second)) return this.reportParseError("invalid-time");
|
|
1025
|
+
return this.processTimeEnd(cp, data);
|
|
1026
|
+
}
|
|
1027
|
+
TIME_SECOND(cp) {
|
|
1028
|
+
const start = this.codePointIterator.start;
|
|
1029
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1030
|
+
cp = this.nextCode();
|
|
1031
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1032
|
+
const end = this.codePointIterator.end;
|
|
1033
|
+
const data = this.data;
|
|
1034
|
+
data.second = Number(this.text.slice(start, end));
|
|
1035
|
+
if (!isValidTime(data.hour, data.minute, data.second)) return this.reportParseError("invalid-time");
|
|
1036
|
+
cp = this.nextCode();
|
|
1037
|
+
if (cp === CodePoint.DOT) return "TIME_SEC_FRAC";
|
|
1038
|
+
return this.processTimeEnd(cp, data);
|
|
1039
|
+
}
|
|
1040
|
+
TIME_SEC_FRAC(cp) {
|
|
1041
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1042
|
+
const start = this.codePointIterator.start;
|
|
1043
|
+
while (isDigit(cp)) cp = this.nextCode();
|
|
1044
|
+
const end = this.codePointIterator.start;
|
|
1045
|
+
const data = this.data;
|
|
1046
|
+
data.frac = this.text.slice(start, end);
|
|
1047
|
+
return this.processTimeEnd(cp, data);
|
|
1048
|
+
}
|
|
1049
|
+
processTimeEnd(cp, data) {
|
|
1050
|
+
if (data.hasDate) {
|
|
1051
|
+
if (cp === CodePoint.DASH || cp === CodePoint.PLUS_SIGN) {
|
|
1052
|
+
data.offsetSign = cp;
|
|
1053
|
+
return "TIME_OFFSET";
|
|
1054
|
+
}
|
|
1055
|
+
if (cp === CodePoint.LATIN_CAPITAL_Z || cp === CodePoint.LATIN_SMALL_Z) {
|
|
1056
|
+
const dateValue$2 = getDateFromDateTimeData(data, "Z");
|
|
1057
|
+
this.endToken("OffsetDateTime", "end", dateValue$2);
|
|
1058
|
+
return "DATA";
|
|
1059
|
+
}
|
|
1060
|
+
const dateValue$1 = getDateFromDateTimeData(data, "");
|
|
1061
|
+
this.endToken("LocalDateTime", "start", dateValue$1);
|
|
1062
|
+
return this.back("DATA");
|
|
1063
|
+
}
|
|
1064
|
+
const dateValue = getDateFromDateTimeData(data, "");
|
|
1065
|
+
this.endToken("LocalTime", "start", dateValue);
|
|
1066
|
+
return this.back("DATA");
|
|
1067
|
+
}
|
|
1068
|
+
TIME_OFFSET(cp) {
|
|
1069
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1070
|
+
const hourStart = this.codePointIterator.start;
|
|
1071
|
+
cp = this.nextCode();
|
|
1072
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1073
|
+
cp = this.nextCode();
|
|
1074
|
+
if (cp !== CodePoint.COLON) return this.reportParseError("unexpected-char");
|
|
1075
|
+
const hourEnd = this.codePointIterator.start;
|
|
1076
|
+
cp = this.nextCode();
|
|
1077
|
+
const minuteStart = this.codePointIterator.start;
|
|
1078
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1079
|
+
cp = this.nextCode();
|
|
1080
|
+
if (!isDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1081
|
+
const minuteEnd = this.codePointIterator.end;
|
|
1082
|
+
const hour = Number(this.text.slice(hourStart, hourEnd));
|
|
1083
|
+
const minute = Number(this.text.slice(minuteStart, minuteEnd));
|
|
1084
|
+
if (!isValidTime(hour, minute, 0)) return this.reportParseError("invalid-time");
|
|
1085
|
+
const data = this.data;
|
|
1086
|
+
const dateValue = getDateFromDateTimeData(data, `${String.fromCodePoint(data.offsetSign)}${padStart(hour, 2)}:${padStart(minute, 2)}`);
|
|
1087
|
+
this.endToken("OffsetDateTime", "end", dateValue);
|
|
1088
|
+
return "DATA";
|
|
1089
|
+
}
|
|
1090
|
+
parseDigits(cp, checkDigit) {
|
|
1091
|
+
if (cp === CodePoint.UNDERSCORE) return this.reportParseError("invalid-underscore");
|
|
1092
|
+
if (!checkDigit(cp)) return this.reportParseError("unexpected-char");
|
|
1093
|
+
const out = [];
|
|
1094
|
+
let before = CodePoint.NULL;
|
|
1095
|
+
let hasUnderscore = false;
|
|
1096
|
+
while (checkDigit(cp) || cp === CodePoint.UNDERSCORE) {
|
|
1097
|
+
if (cp === CodePoint.UNDERSCORE) {
|
|
1098
|
+
hasUnderscore = true;
|
|
1099
|
+
if (before === CodePoint.UNDERSCORE) return this.reportParseError("invalid-underscore");
|
|
1100
|
+
} else out.push(cp);
|
|
1101
|
+
before = cp;
|
|
1102
|
+
cp = this.nextCode();
|
|
1103
|
+
}
|
|
1104
|
+
if (before === CodePoint.UNDERSCORE) return this.reportParseError("invalid-underscore");
|
|
1105
|
+
return {
|
|
1106
|
+
out,
|
|
1107
|
+
nextCp: cp,
|
|
1108
|
+
hasUnderscore
|
|
1109
|
+
};
|
|
1110
|
+
}
|
|
1111
|
+
parseUnicode(count) {
|
|
1112
|
+
const startLoc = this.codePointIterator.start;
|
|
1113
|
+
const start = this.codePointIterator.end;
|
|
1114
|
+
let charCount = 0;
|
|
1115
|
+
let cp;
|
|
1116
|
+
while ((cp = this.nextCode()) !== CodePoint.EOF) {
|
|
1117
|
+
if (!isHexDig(cp)) {
|
|
1118
|
+
this.moveAt(startLoc);
|
|
1119
|
+
return this.reportParseError("invalid-char-in-escape-sequence");
|
|
1120
|
+
}
|
|
1121
|
+
charCount++;
|
|
1122
|
+
if (charCount >= count) break;
|
|
1123
|
+
}
|
|
1124
|
+
const end = this.codePointIterator.end;
|
|
1125
|
+
const code = this.text.slice(start, end);
|
|
1126
|
+
const codePoint = parseInt(code, 16);
|
|
1127
|
+
if (!isUnicodeScalarValue(codePoint)) return this.reportParseError("invalid-code-point", { cp: code });
|
|
1128
|
+
return codePoint;
|
|
1129
|
+
}
|
|
1130
|
+
reportParseErrorControlChar() {
|
|
1131
|
+
return this.reportParseError("invalid-control-character");
|
|
1132
|
+
}
|
|
1133
|
+
};
|
|
1134
|
+
/**
|
|
1135
|
+
* Check whether the code point is unquoted-key-char
|
|
1136
|
+
*/
|
|
1137
|
+
function isUnquotedKeyChar(cp, tomlVersion) {
|
|
1138
|
+
if (isLetter(cp) || isDigit(cp) || cp === CodePoint.UNDERSCORE || cp === CodePoint.DASH) return true;
|
|
1139
|
+
if (tomlVersion.lt(1, 1)) return false;
|
|
1140
|
+
return false;
|
|
1141
|
+
}
|
|
1142
|
+
/**
|
|
1143
|
+
* Check whether the code point is control character other than tab
|
|
1144
|
+
*/
|
|
1145
|
+
function isControlOtherThanTab(cp) {
|
|
1146
|
+
return isControl(cp) && cp !== CodePoint.TABULATION || cp === CodePoint.DELETE;
|
|
1147
|
+
}
|
|
1148
|
+
/**
|
|
1149
|
+
* Check whether the code point is non-eol for TOML 1.1
|
|
1150
|
+
*/
|
|
1151
|
+
function isNonEOL(cp) {
|
|
1152
|
+
return cp === CodePoint.TABULATION || CodePoint.SPACE <= cp && cp <= CodePoint.TILDE || isNonAscii(cp);
|
|
1153
|
+
}
|
|
1154
|
+
/**
|
|
1155
|
+
* Check whether the code point is a non-ascii character.
|
|
1156
|
+
*/
|
|
1157
|
+
function isNonAscii(cp) {
|
|
1158
|
+
return CodePoint.PAD <= cp && cp <= CodePoint.CP_D7FF || CodePoint.CP_E000 <= cp && cp <= CodePoint.CP_10FFFF;
|
|
1159
|
+
}
|
|
1160
|
+
/**
|
|
1161
|
+
* Check whether the given values is valid date
|
|
1162
|
+
*/
|
|
1163
|
+
function isValidDate(y, m, d) {
|
|
1164
|
+
if (y >= 0 && m <= 12 && m >= 1 && d >= 1) return d <= (m === 2 ? y & 3 || !(y % 25) && y & 15 ? 28 : 29 : 30 + (m + (m >> 3) & 1));
|
|
1165
|
+
return false;
|
|
1166
|
+
}
|
|
1167
|
+
/**
|
|
1168
|
+
* Check whether the given values is valid time
|
|
1169
|
+
*/
|
|
1170
|
+
function isValidTime(h, m, s) {
|
|
1171
|
+
if (h >= 24 || h < 0 || m > 59 || m < 0 || s > 60 || s < 0) return false;
|
|
1172
|
+
return true;
|
|
1173
|
+
}
|
|
1174
|
+
/**
|
|
1175
|
+
* Get date from DateTimeData
|
|
1176
|
+
*/
|
|
1177
|
+
function getDateFromDateTimeData(data, timeZone) {
|
|
1178
|
+
const year = padStart(data.year, 4);
|
|
1179
|
+
const month = data.month ? padStart(data.month, 2) : "01";
|
|
1180
|
+
const day = data.day ? padStart(data.day, 2) : "01";
|
|
1181
|
+
const hour = padStart(data.hour, 2);
|
|
1182
|
+
const minute = padStart(data.minute, 2);
|
|
1183
|
+
const second = padStart(data.second, 2);
|
|
1184
|
+
const textDate = `${year}-${month}-${day}`;
|
|
1185
|
+
const frac = data.frac ? `.${data.frac}` : "";
|
|
1186
|
+
const dateValue = /* @__PURE__ */ new Date(`${textDate}T${hour}:${minute}:${second}${frac}${timeZone}`);
|
|
1187
|
+
if (!isNaN(dateValue.getTime()) || data.second !== 60) return dateValue;
|
|
1188
|
+
return /* @__PURE__ */ new Date(`${textDate}T${hour}:${minute}:59${frac}${timeZone}`);
|
|
1189
|
+
}
|
|
1190
|
+
/**
|
|
1191
|
+
* Pad with zeros.
|
|
1192
|
+
*/
|
|
1193
|
+
function padStart(num, maxLength) {
|
|
1194
|
+
return String(num).padStart(maxLength, "0");
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
//#endregion
|
|
1198
|
+
//#region src/toml-parser/keys-resolver.ts
|
|
1199
|
+
const VALUE_KIND_VALUE = Symbol("VALUE_KIND_VALUE");
|
|
1200
|
+
const VALUE_KIND_INTERMEDIATE = Symbol("VALUE_KIND_INTERMEDIATE");
|
|
1201
|
+
var KeysResolver = class {
|
|
1202
|
+
constructor(ctx) {
|
|
1203
|
+
this.rootKeys = /* @__PURE__ */ new Map();
|
|
1204
|
+
this.tables = [];
|
|
1205
|
+
this.ctx = ctx;
|
|
1206
|
+
}
|
|
1207
|
+
applyResolveKeyForTable(node) {
|
|
1208
|
+
let keys = this.rootKeys;
|
|
1209
|
+
const peekKeyIndex = node.key.keys.length - 1;
|
|
1210
|
+
for (let index = 0; index < peekKeyIndex; index++) {
|
|
1211
|
+
const keyNode = node.key.keys[index];
|
|
1212
|
+
const keyName = toKeyName(keyNode);
|
|
1213
|
+
node.resolvedKey.push(keyName);
|
|
1214
|
+
let keyStore = keys.get(keyName);
|
|
1215
|
+
if (!keyStore) {
|
|
1216
|
+
keyStore = {
|
|
1217
|
+
node: keyNode,
|
|
1218
|
+
keys: /* @__PURE__ */ new Map()
|
|
1219
|
+
};
|
|
1220
|
+
keys.set(keyName, keyStore);
|
|
1221
|
+
} else if (keyStore.table === "array") {
|
|
1222
|
+
const peekIndex = keyStore.peekIndex;
|
|
1223
|
+
node.resolvedKey.push(peekIndex);
|
|
1224
|
+
keyStore = keyStore.keys.get(peekIndex);
|
|
1225
|
+
}
|
|
1226
|
+
keys = keyStore.keys;
|
|
1227
|
+
}
|
|
1228
|
+
const lastKeyNode = node.key.keys[peekKeyIndex];
|
|
1229
|
+
const lastKeyName = toKeyName(lastKeyNode);
|
|
1230
|
+
node.resolvedKey.push(lastKeyName);
|
|
1231
|
+
const lastKeyStore = keys.get(lastKeyName);
|
|
1232
|
+
if (!lastKeyStore) if (node.kind === "array") {
|
|
1233
|
+
node.resolvedKey.push(0);
|
|
1234
|
+
const newKeyStore = {
|
|
1235
|
+
node: lastKeyNode,
|
|
1236
|
+
keys: /* @__PURE__ */ new Map()
|
|
1237
|
+
};
|
|
1238
|
+
keys.set(lastKeyName, {
|
|
1239
|
+
table: node.kind,
|
|
1240
|
+
node: lastKeyNode,
|
|
1241
|
+
keys: new Map([[0, newKeyStore]]),
|
|
1242
|
+
peekIndex: 0
|
|
1243
|
+
});
|
|
1244
|
+
this.tables.push({
|
|
1245
|
+
node,
|
|
1246
|
+
keys: newKeyStore.keys
|
|
1247
|
+
});
|
|
1248
|
+
} else {
|
|
1249
|
+
const newKeyStore = {
|
|
1250
|
+
table: node.kind,
|
|
1251
|
+
node: lastKeyNode,
|
|
1252
|
+
keys: /* @__PURE__ */ new Map()
|
|
1253
|
+
};
|
|
1254
|
+
keys.set(lastKeyName, newKeyStore);
|
|
1255
|
+
this.tables.push({
|
|
1256
|
+
node,
|
|
1257
|
+
keys: newKeyStore.keys
|
|
1258
|
+
});
|
|
1259
|
+
}
|
|
1260
|
+
else if (!lastKeyStore.table) if (node.kind === "array") this.ctx.reportParseError("dupe-keys", lastKeyNode);
|
|
1261
|
+
else {
|
|
1262
|
+
const transformKey = {
|
|
1263
|
+
table: node.kind,
|
|
1264
|
+
node: lastKeyNode,
|
|
1265
|
+
keys: lastKeyStore.keys
|
|
1266
|
+
};
|
|
1267
|
+
keys.set(lastKeyName, transformKey);
|
|
1268
|
+
this.tables.push({
|
|
1269
|
+
node,
|
|
1270
|
+
keys: transformKey.keys
|
|
1271
|
+
});
|
|
1272
|
+
}
|
|
1273
|
+
else if (lastKeyStore.table === "array") if (node.kind === "array") {
|
|
1274
|
+
const newKeyStore = {
|
|
1275
|
+
node: lastKeyNode,
|
|
1276
|
+
keys: /* @__PURE__ */ new Map()
|
|
1277
|
+
};
|
|
1278
|
+
const newIndex = lastKeyStore.peekIndex + 1;
|
|
1279
|
+
node.resolvedKey.push(newIndex);
|
|
1280
|
+
lastKeyStore.keys.set(newIndex, newKeyStore);
|
|
1281
|
+
lastKeyStore.peekIndex = newIndex;
|
|
1282
|
+
this.tables.push({
|
|
1283
|
+
node,
|
|
1284
|
+
keys: newKeyStore.keys
|
|
1285
|
+
});
|
|
1286
|
+
} else this.ctx.reportParseError("dupe-keys", lastKeyNode);
|
|
1287
|
+
else this.ctx.reportParseError("dupe-keys", lastKeyNode);
|
|
1288
|
+
}
|
|
1289
|
+
verifyDuplicateKeys(node) {
|
|
1290
|
+
for (const body of node.body) if (body.type === "TOMLKeyValue") verifyDuplicateKeysForKeyValue(this.ctx, this.rootKeys, body);
|
|
1291
|
+
for (const { node: tableNode, keys } of this.tables) for (const body of tableNode.body) verifyDuplicateKeysForKeyValue(this.ctx, keys, body);
|
|
1292
|
+
}
|
|
1293
|
+
};
|
|
1294
|
+
/**
|
|
1295
|
+
* Verify duplicate keys from TOMLKeyValue
|
|
1296
|
+
*/
|
|
1297
|
+
function verifyDuplicateKeysForKeyValue(ctx, defineKeys, node) {
|
|
1298
|
+
let keys = defineKeys;
|
|
1299
|
+
const lastKey = last(node.key.keys);
|
|
1300
|
+
for (const keyNode of node.key.keys) {
|
|
1301
|
+
const key = toKeyName(keyNode);
|
|
1302
|
+
let defineKey = keys.get(key);
|
|
1303
|
+
if (defineKey) {
|
|
1304
|
+
if (defineKey.value === VALUE_KIND_VALUE) ctx.reportParseError("dupe-keys", getAfterNode(keyNode, defineKey.node));
|
|
1305
|
+
else if (lastKey === keyNode) ctx.reportParseError("dupe-keys", getAfterNode(keyNode, defineKey.node));
|
|
1306
|
+
else if (defineKey.table) ctx.reportParseError("dupe-keys", getAfterNode(keyNode, defineKey.node));
|
|
1307
|
+
defineKey.value = VALUE_KIND_INTERMEDIATE;
|
|
1308
|
+
} else {
|
|
1309
|
+
if (lastKey === keyNode) defineKey = {
|
|
1310
|
+
value: VALUE_KIND_VALUE,
|
|
1311
|
+
node: keyNode,
|
|
1312
|
+
keys: /* @__PURE__ */ new Map()
|
|
1313
|
+
};
|
|
1314
|
+
else defineKey = {
|
|
1315
|
+
value: VALUE_KIND_INTERMEDIATE,
|
|
1316
|
+
node: keyNode,
|
|
1317
|
+
keys: /* @__PURE__ */ new Map()
|
|
1318
|
+
};
|
|
1319
|
+
keys.set(key, defineKey);
|
|
1320
|
+
}
|
|
1321
|
+
keys = defineKey.keys;
|
|
1322
|
+
}
|
|
1323
|
+
if (node.value.type === "TOMLInlineTable") verifyDuplicateKeysForInlineTable(ctx, keys, node.value);
|
|
1324
|
+
else if (node.value.type === "TOMLArray") verifyDuplicateKeysForArray(ctx, keys, node.value);
|
|
1325
|
+
}
|
|
1326
|
+
/**
|
|
1327
|
+
* Verify duplicate keys from TOMLInlineTable
|
|
1328
|
+
*/
|
|
1329
|
+
function verifyDuplicateKeysForInlineTable(ctx, defineKeys, node) {
|
|
1330
|
+
for (const body of node.body) verifyDuplicateKeysForKeyValue(ctx, defineKeys, body);
|
|
1331
|
+
}
|
|
1332
|
+
/**
|
|
1333
|
+
* Verify duplicate keys from TOMLArray
|
|
1334
|
+
*/
|
|
1335
|
+
function verifyDuplicateKeysForArray(ctx, defineKeys, node) {
|
|
1336
|
+
const keys = defineKeys;
|
|
1337
|
+
for (let index = 0; index < node.elements.length; index++) {
|
|
1338
|
+
const element = node.elements[index];
|
|
1339
|
+
let defineKey = keys.get(index);
|
|
1340
|
+
if (defineKey) ctx.reportParseError("dupe-keys", getAfterNode(element, defineKey.node));
|
|
1341
|
+
else {
|
|
1342
|
+
defineKey = {
|
|
1343
|
+
value: VALUE_KIND_VALUE,
|
|
1344
|
+
node: element,
|
|
1345
|
+
keys: /* @__PURE__ */ new Map()
|
|
1346
|
+
};
|
|
1347
|
+
defineKeys.set(index, defineKey);
|
|
1348
|
+
if (element.type === "TOMLInlineTable") verifyDuplicateKeysForInlineTable(ctx, defineKey.keys, element);
|
|
1349
|
+
else if (element.type === "TOMLArray") verifyDuplicateKeysForArray(ctx, defineKey.keys, element);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
/**
|
|
1354
|
+
* Get the after node
|
|
1355
|
+
*/
|
|
1356
|
+
function getAfterNode(a, b) {
|
|
1357
|
+
return a.range[0] <= b.range[0] ? b : a;
|
|
1358
|
+
}
|
|
1359
|
+
|
|
1360
|
+
//#endregion
|
|
1361
|
+
//#region src/toml-parser/context.ts
|
|
1362
|
+
var Context = class {
|
|
1363
|
+
constructor(data) {
|
|
1364
|
+
this.tokens = [];
|
|
1365
|
+
this.comments = [];
|
|
1366
|
+
this.back = null;
|
|
1367
|
+
this.stateStack = [];
|
|
1368
|
+
this.needNewLine = false;
|
|
1369
|
+
this.needSameLine = false;
|
|
1370
|
+
this.currToken = null;
|
|
1371
|
+
this.prevToken = null;
|
|
1372
|
+
this.valueContainerStack = [];
|
|
1373
|
+
this.tokenizer = new Tokenizer(data.text, data.parserOptions);
|
|
1374
|
+
this.topLevelTable = data.topLevelTable;
|
|
1375
|
+
this.table = data.topLevelTable;
|
|
1376
|
+
this.keysResolver = new KeysResolver(this);
|
|
1377
|
+
}
|
|
1378
|
+
/**
|
|
1379
|
+
* Get the next token.
|
|
1380
|
+
*/
|
|
1381
|
+
nextToken(option) {
|
|
1382
|
+
this.prevToken = this.currToken;
|
|
1383
|
+
if (this.back) {
|
|
1384
|
+
this.currToken = this.back;
|
|
1385
|
+
this.back = null;
|
|
1386
|
+
} else this.currToken = this._nextTokenFromTokenizer(option);
|
|
1387
|
+
if ((this.needNewLine || this.needSameLine || option?.needSameLine) && this.prevToken && this.currToken) if (this.prevToken.loc.end.line === this.currToken.loc.start.line) {
|
|
1388
|
+
if (this.needNewLine) return this.reportParseError("missing-newline", this.currToken);
|
|
1389
|
+
} else {
|
|
1390
|
+
const needSameLine = this.needSameLine || option?.needSameLine;
|
|
1391
|
+
if (needSameLine) return this.reportParseError(needSameLine, this.currToken);
|
|
1392
|
+
}
|
|
1393
|
+
this.needNewLine = false;
|
|
1394
|
+
this.needSameLine = false;
|
|
1395
|
+
return this.currToken;
|
|
1396
|
+
}
|
|
1397
|
+
_nextTokenFromTokenizer(option) {
|
|
1398
|
+
const valuesEnabled = this.tokenizer.valuesEnabled;
|
|
1399
|
+
if (option?.valuesEnabled) this.tokenizer.valuesEnabled = option.valuesEnabled;
|
|
1400
|
+
let token = this.tokenizer.nextToken();
|
|
1401
|
+
while (token && token.type === "Block") {
|
|
1402
|
+
this.comments.push(token);
|
|
1403
|
+
token = this.tokenizer.nextToken();
|
|
1404
|
+
}
|
|
1405
|
+
if (token) this.tokens.push(token);
|
|
1406
|
+
this.tokenizer.valuesEnabled = valuesEnabled;
|
|
1407
|
+
return token;
|
|
1408
|
+
}
|
|
1409
|
+
backToken() {
|
|
1410
|
+
if (this.back) throw new Error("Illegal state");
|
|
1411
|
+
this.back = this.currToken;
|
|
1412
|
+
this.currToken = this.prevToken;
|
|
1413
|
+
}
|
|
1414
|
+
addValueContainer(valueContainer) {
|
|
1415
|
+
this.valueContainerStack.push(valueContainer);
|
|
1416
|
+
this.tokenizer.valuesEnabled = true;
|
|
1417
|
+
}
|
|
1418
|
+
consumeValueContainer() {
|
|
1419
|
+
const valueContainer = this.valueContainerStack.pop();
|
|
1420
|
+
this.tokenizer.valuesEnabled = this.valueContainerStack.length > 0;
|
|
1421
|
+
return valueContainer;
|
|
1422
|
+
}
|
|
1423
|
+
applyResolveKeyForTable(node) {
|
|
1424
|
+
this.keysResolver.applyResolveKeyForTable(node);
|
|
1425
|
+
}
|
|
1426
|
+
verifyDuplicateKeys() {
|
|
1427
|
+
this.keysResolver.verifyDuplicateKeys(this.topLevelTable);
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* Report an invalid token error.
|
|
1431
|
+
*/
|
|
1432
|
+
reportParseError(code, token) {
|
|
1433
|
+
let offset, line, column;
|
|
1434
|
+
if (token) {
|
|
1435
|
+
offset = token.range[0];
|
|
1436
|
+
line = token.loc.start.line;
|
|
1437
|
+
column = token.loc.start.column;
|
|
1438
|
+
} else {
|
|
1439
|
+
offset = this.tokenizer.start;
|
|
1440
|
+
const startPos = this.tokenizer.getLocFromIndex(offset);
|
|
1441
|
+
line = startPos.line;
|
|
1442
|
+
column = startPos.column;
|
|
1443
|
+
}
|
|
1444
|
+
throw new ParseError(code, offset, line, column);
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
//#endregion
|
|
1449
|
+
//#region src/toml-parser/index.ts
|
|
1450
|
+
const STATE_FOR_ERROR = { VALUE: "missing-value" };
|
|
1451
|
+
const STRING_VALUE_STYLE_MAP = {
|
|
1452
|
+
BasicString: "basic",
|
|
1453
|
+
MultiLineBasicString: "basic",
|
|
1454
|
+
LiteralString: "literal",
|
|
1455
|
+
MultiLineLiteralString: "literal"
|
|
1456
|
+
};
|
|
1457
|
+
const STRING_KEY_STYLE_MAP = {
|
|
1458
|
+
BasicString: "basic",
|
|
1459
|
+
LiteralString: "literal"
|
|
1460
|
+
};
|
|
1461
|
+
const DATETIME_VALUE_KIND_MAP = {
|
|
1462
|
+
OffsetDateTime: "offset-date-time",
|
|
1463
|
+
LocalDateTime: "local-date-time",
|
|
1464
|
+
LocalDate: "local-date",
|
|
1465
|
+
LocalTime: "local-time"
|
|
1466
|
+
};
|
|
1467
|
+
var TOMLParser = class {
|
|
1468
|
+
/**
|
|
1469
|
+
* Initialize this parser.
|
|
1470
|
+
*/
|
|
1471
|
+
constructor(text, parserOptions) {
|
|
1472
|
+
this.text = text;
|
|
1473
|
+
this.parserOptions = parserOptions || {};
|
|
1474
|
+
this.tomlVersion = getTOMLVer(this.parserOptions.tomlVersion);
|
|
1475
|
+
}
|
|
1476
|
+
/**
|
|
1477
|
+
* Parse TOML
|
|
1478
|
+
*/
|
|
1479
|
+
parse() {
|
|
1480
|
+
const ast = {
|
|
1481
|
+
type: "Program",
|
|
1482
|
+
body: [],
|
|
1483
|
+
sourceType: "module",
|
|
1484
|
+
tokens: [],
|
|
1485
|
+
comments: [],
|
|
1486
|
+
parent: null,
|
|
1487
|
+
range: [0, 0],
|
|
1488
|
+
loc: {
|
|
1489
|
+
start: {
|
|
1490
|
+
line: 1,
|
|
1491
|
+
column: 0
|
|
1492
|
+
},
|
|
1493
|
+
end: {
|
|
1494
|
+
line: 1,
|
|
1495
|
+
column: 0
|
|
1496
|
+
}
|
|
1497
|
+
}
|
|
1498
|
+
};
|
|
1499
|
+
const node = {
|
|
1500
|
+
type: "TOMLTopLevelTable",
|
|
1501
|
+
body: [],
|
|
1502
|
+
parent: ast,
|
|
1503
|
+
range: cloneRange(ast.range),
|
|
1504
|
+
loc: cloneLoc(ast.loc)
|
|
1505
|
+
};
|
|
1506
|
+
ast.body = [node];
|
|
1507
|
+
const ctx = new Context({
|
|
1508
|
+
text: this.text,
|
|
1509
|
+
parserOptions: this.parserOptions,
|
|
1510
|
+
topLevelTable: node
|
|
1511
|
+
});
|
|
1512
|
+
let token = ctx.nextToken();
|
|
1513
|
+
if (token) {
|
|
1514
|
+
node.range[0] = token.range[0];
|
|
1515
|
+
node.loc.start = clonePos(token.loc.start);
|
|
1516
|
+
while (token) {
|
|
1517
|
+
const state$1 = ctx.stateStack.pop() || "TABLE";
|
|
1518
|
+
ctx.stateStack.push(...this[state$1](token, ctx));
|
|
1519
|
+
token = ctx.nextToken();
|
|
1520
|
+
}
|
|
1521
|
+
const state = ctx.stateStack.pop() || "TABLE";
|
|
1522
|
+
if (state in STATE_FOR_ERROR) return ctx.reportParseError(STATE_FOR_ERROR[state], null);
|
|
1523
|
+
if (ctx.table.type === "TOMLTable") applyEndLoc(ctx.table, last(ctx.table.body));
|
|
1524
|
+
applyEndLoc(node, last(node.body));
|
|
1525
|
+
}
|
|
1526
|
+
ctx.verifyDuplicateKeys();
|
|
1527
|
+
ast.tokens = ctx.tokens;
|
|
1528
|
+
ast.comments = ctx.comments;
|
|
1529
|
+
const endOffset = ctx.tokenizer.end;
|
|
1530
|
+
const endPos = ctx.tokenizer.getLocFromIndex(endOffset);
|
|
1531
|
+
ast.range[1] = endOffset;
|
|
1532
|
+
ast.loc.end = {
|
|
1533
|
+
line: endPos.line,
|
|
1534
|
+
column: endPos.column
|
|
1535
|
+
};
|
|
1536
|
+
return ast;
|
|
1537
|
+
}
|
|
1538
|
+
TABLE(token, ctx) {
|
|
1539
|
+
if (isBare(token) || isString(token)) return this.processKeyValue(token, ctx.table, ctx);
|
|
1540
|
+
if (isLeftBracket(token)) return this.processTable(token, ctx.topLevelTable, ctx);
|
|
1541
|
+
return ctx.reportParseError("unexpected-token", token);
|
|
1542
|
+
}
|
|
1543
|
+
VALUE(token, ctx) {
|
|
1544
|
+
if (isString(token) || isMultiLineString(token)) return this.processStringValue(token, ctx);
|
|
1545
|
+
if (isNumber(token)) return this.processNumberValue(token, ctx);
|
|
1546
|
+
if (isBoolean(token)) return this.processBooleanValue(token, ctx);
|
|
1547
|
+
if (isDateTime(token)) return this.processDateTimeValue(token, ctx);
|
|
1548
|
+
if (isLeftBracket(token)) return this.processArray(token, ctx);
|
|
1549
|
+
if (isLeftBrace(token)) return this.processInlineTable(token, ctx);
|
|
1550
|
+
return ctx.reportParseError("unexpected-token", token);
|
|
1551
|
+
}
|
|
1552
|
+
processTable(token, topLevelTableNode, ctx) {
|
|
1553
|
+
const tableNode = {
|
|
1554
|
+
type: "TOMLTable",
|
|
1555
|
+
kind: "standard",
|
|
1556
|
+
key: null,
|
|
1557
|
+
resolvedKey: [],
|
|
1558
|
+
body: [],
|
|
1559
|
+
parent: topLevelTableNode,
|
|
1560
|
+
range: cloneRange(token.range),
|
|
1561
|
+
loc: cloneLoc(token.loc)
|
|
1562
|
+
};
|
|
1563
|
+
if (ctx.table.type === "TOMLTable") applyEndLoc(ctx.table, last(ctx.table.body));
|
|
1564
|
+
topLevelTableNode.body.push(tableNode);
|
|
1565
|
+
ctx.table = tableNode;
|
|
1566
|
+
let targetToken = ctx.nextToken({ needSameLine: "invalid-key-value-newline" });
|
|
1567
|
+
if (isLeftBracket(targetToken)) {
|
|
1568
|
+
if (token.range[1] < targetToken.range[0]) return ctx.reportParseError("invalid-space", targetToken);
|
|
1569
|
+
tableNode.kind = "array";
|
|
1570
|
+
targetToken = ctx.nextToken({ needSameLine: "invalid-key-value-newline" });
|
|
1571
|
+
}
|
|
1572
|
+
if (isRightBracket(targetToken)) return ctx.reportParseError("missing-key", targetToken);
|
|
1573
|
+
if (!targetToken) return ctx.reportParseError("unterminated-table-key", null);
|
|
1574
|
+
targetToken = this.processKeyNode(targetToken, tableNode, ctx).nextToken;
|
|
1575
|
+
if (!isRightBracket(targetToken)) return ctx.reportParseError("unterminated-table-key", targetToken);
|
|
1576
|
+
if (tableNode.kind === "array") {
|
|
1577
|
+
const rightBracket = targetToken;
|
|
1578
|
+
targetToken = ctx.nextToken({ needSameLine: "invalid-key-value-newline" });
|
|
1579
|
+
if (!isRightBracket(targetToken)) return ctx.reportParseError("unterminated-table-key", targetToken);
|
|
1580
|
+
if (rightBracket.range[1] < targetToken.range[0]) return ctx.reportParseError("invalid-space", targetToken);
|
|
1581
|
+
}
|
|
1582
|
+
applyEndLoc(tableNode, targetToken);
|
|
1583
|
+
ctx.applyResolveKeyForTable(tableNode);
|
|
1584
|
+
ctx.needNewLine = true;
|
|
1585
|
+
return [];
|
|
1586
|
+
}
|
|
1587
|
+
processKeyValue(token, tableNode, ctx) {
|
|
1588
|
+
const keyValueNode = {
|
|
1589
|
+
type: "TOMLKeyValue",
|
|
1590
|
+
key: null,
|
|
1591
|
+
value: null,
|
|
1592
|
+
parent: tableNode,
|
|
1593
|
+
range: cloneRange(token.range),
|
|
1594
|
+
loc: cloneLoc(token.loc)
|
|
1595
|
+
};
|
|
1596
|
+
tableNode.body.push(keyValueNode);
|
|
1597
|
+
const { nextToken: targetToken } = this.processKeyNode(token, keyValueNode, ctx);
|
|
1598
|
+
if (!isEq(targetToken)) return ctx.reportParseError("missing-equals-sign", targetToken);
|
|
1599
|
+
ctx.addValueContainer({
|
|
1600
|
+
parent: keyValueNode,
|
|
1601
|
+
set: (valNode) => {
|
|
1602
|
+
keyValueNode.value = valNode;
|
|
1603
|
+
applyEndLoc(keyValueNode, valNode);
|
|
1604
|
+
ctx.needNewLine = true;
|
|
1605
|
+
return [];
|
|
1606
|
+
}
|
|
1607
|
+
});
|
|
1608
|
+
ctx.needSameLine = "invalid-key-value-newline";
|
|
1609
|
+
return ["VALUE"];
|
|
1610
|
+
}
|
|
1611
|
+
processKeyNode(token, parent, ctx) {
|
|
1612
|
+
if (isDot(token)) ctx.reportParseError("invalid-leading-dot-in-key", token);
|
|
1613
|
+
const keyNode = {
|
|
1614
|
+
type: "TOMLKey",
|
|
1615
|
+
keys: [],
|
|
1616
|
+
parent,
|
|
1617
|
+
range: cloneRange(token.range),
|
|
1618
|
+
loc: cloneLoc(token.loc)
|
|
1619
|
+
};
|
|
1620
|
+
parent.key = keyNode;
|
|
1621
|
+
let targetToken = token;
|
|
1622
|
+
let dotToken = null;
|
|
1623
|
+
do {
|
|
1624
|
+
if (isBare(targetToken)) this.processBareKey(targetToken, keyNode);
|
|
1625
|
+
else if (isString(targetToken)) this.processStringKey(targetToken, keyNode);
|
|
1626
|
+
else break;
|
|
1627
|
+
dotToken = null;
|
|
1628
|
+
targetToken = ctx.nextToken({ needSameLine: "invalid-key-value-newline" });
|
|
1629
|
+
if (!isDot(targetToken)) break;
|
|
1630
|
+
dotToken = targetToken;
|
|
1631
|
+
targetToken = ctx.nextToken({ needSameLine: "invalid-key-value-newline" });
|
|
1632
|
+
} while (targetToken);
|
|
1633
|
+
if (dotToken) ctx.reportParseError(isDot(targetToken) ? "invalid-consecutive-dots-in-key" : "invalid-trailing-dot-in-key", dotToken);
|
|
1634
|
+
applyEndLoc(keyNode, last(keyNode.keys));
|
|
1635
|
+
return {
|
|
1636
|
+
keyNode,
|
|
1637
|
+
nextToken: targetToken
|
|
1638
|
+
};
|
|
1639
|
+
}
|
|
1640
|
+
processBareKey(token, keyNode) {
|
|
1641
|
+
const node = {
|
|
1642
|
+
type: "TOMLBare",
|
|
1643
|
+
name: token.value,
|
|
1644
|
+
parent: keyNode,
|
|
1645
|
+
range: cloneRange(token.range),
|
|
1646
|
+
loc: cloneLoc(token.loc)
|
|
1647
|
+
};
|
|
1648
|
+
keyNode.keys.push(node);
|
|
1649
|
+
}
|
|
1650
|
+
processStringKey(token, keyNode) {
|
|
1651
|
+
const node = {
|
|
1652
|
+
type: "TOMLQuoted",
|
|
1653
|
+
kind: "string",
|
|
1654
|
+
value: token.string,
|
|
1655
|
+
style: STRING_KEY_STYLE_MAP[token.type],
|
|
1656
|
+
multiline: false,
|
|
1657
|
+
parent: keyNode,
|
|
1658
|
+
range: cloneRange(token.range),
|
|
1659
|
+
loc: cloneLoc(token.loc)
|
|
1660
|
+
};
|
|
1661
|
+
keyNode.keys.push(node);
|
|
1662
|
+
}
|
|
1663
|
+
processStringValue(token, ctx) {
|
|
1664
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1665
|
+
const node = {
|
|
1666
|
+
type: "TOMLValue",
|
|
1667
|
+
kind: "string",
|
|
1668
|
+
value: token.string,
|
|
1669
|
+
style: STRING_VALUE_STYLE_MAP[token.type],
|
|
1670
|
+
multiline: isMultiLineString(token),
|
|
1671
|
+
parent: valueContainer.parent,
|
|
1672
|
+
range: cloneRange(token.range),
|
|
1673
|
+
loc: cloneLoc(token.loc)
|
|
1674
|
+
};
|
|
1675
|
+
return valueContainer.set(node);
|
|
1676
|
+
}
|
|
1677
|
+
processNumberValue(token, ctx) {
|
|
1678
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1679
|
+
const text = this.text;
|
|
1680
|
+
const [startRange, endRange] = token.range;
|
|
1681
|
+
let numberString = null;
|
|
1682
|
+
/**
|
|
1683
|
+
* Get the text of number
|
|
1684
|
+
*/
|
|
1685
|
+
const getNumberText = () => {
|
|
1686
|
+
return numberString ?? (numberString = text.slice(startRange, endRange).replace(/_/g, ""));
|
|
1687
|
+
};
|
|
1688
|
+
let node;
|
|
1689
|
+
if (token.type === "Integer") node = {
|
|
1690
|
+
type: "TOMLValue",
|
|
1691
|
+
kind: "integer",
|
|
1692
|
+
value: token.number,
|
|
1693
|
+
bigint: token.bigint,
|
|
1694
|
+
get number() {
|
|
1695
|
+
return getNumberText();
|
|
1696
|
+
},
|
|
1697
|
+
parent: valueContainer.parent,
|
|
1698
|
+
range: cloneRange(token.range),
|
|
1699
|
+
loc: cloneLoc(token.loc)
|
|
1700
|
+
};
|
|
1701
|
+
else node = {
|
|
1702
|
+
type: "TOMLValue",
|
|
1703
|
+
kind: "float",
|
|
1704
|
+
value: token.number,
|
|
1705
|
+
get number() {
|
|
1706
|
+
return getNumberText();
|
|
1707
|
+
},
|
|
1708
|
+
parent: valueContainer.parent,
|
|
1709
|
+
range: cloneRange(token.range),
|
|
1710
|
+
loc: cloneLoc(token.loc)
|
|
1711
|
+
};
|
|
1712
|
+
return valueContainer.set(node);
|
|
1713
|
+
}
|
|
1714
|
+
processBooleanValue(token, ctx) {
|
|
1715
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1716
|
+
const node = {
|
|
1717
|
+
type: "TOMLValue",
|
|
1718
|
+
kind: "boolean",
|
|
1719
|
+
value: token.boolean,
|
|
1720
|
+
parent: valueContainer.parent,
|
|
1721
|
+
range: cloneRange(token.range),
|
|
1722
|
+
loc: cloneLoc(token.loc)
|
|
1723
|
+
};
|
|
1724
|
+
return valueContainer.set(node);
|
|
1725
|
+
}
|
|
1726
|
+
processDateTimeValue(token, ctx) {
|
|
1727
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1728
|
+
const node = {
|
|
1729
|
+
type: "TOMLValue",
|
|
1730
|
+
kind: DATETIME_VALUE_KIND_MAP[token.type],
|
|
1731
|
+
value: token.date,
|
|
1732
|
+
datetime: token.value,
|
|
1733
|
+
parent: valueContainer.parent,
|
|
1734
|
+
range: cloneRange(token.range),
|
|
1735
|
+
loc: cloneLoc(token.loc)
|
|
1736
|
+
};
|
|
1737
|
+
return valueContainer.set(node);
|
|
1738
|
+
}
|
|
1739
|
+
processArray(token, ctx) {
|
|
1740
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1741
|
+
const node = {
|
|
1742
|
+
type: "TOMLArray",
|
|
1743
|
+
elements: [],
|
|
1744
|
+
parent: valueContainer.parent,
|
|
1745
|
+
range: cloneRange(token.range),
|
|
1746
|
+
loc: cloneLoc(token.loc)
|
|
1747
|
+
};
|
|
1748
|
+
const nextToken = ctx.nextToken({ valuesEnabled: true });
|
|
1749
|
+
if (isRightBracket(nextToken)) {
|
|
1750
|
+
applyEndLoc(node, nextToken);
|
|
1751
|
+
return valueContainer.set(node);
|
|
1752
|
+
}
|
|
1753
|
+
ctx.backToken();
|
|
1754
|
+
return this.processArrayValue(node, valueContainer, ctx);
|
|
1755
|
+
}
|
|
1756
|
+
processArrayValue(node, valueContainer, ctx) {
|
|
1757
|
+
ctx.addValueContainer({
|
|
1758
|
+
parent: node,
|
|
1759
|
+
set: (valNode) => {
|
|
1760
|
+
node.elements.push(valNode);
|
|
1761
|
+
let nextToken = ctx.nextToken({ valuesEnabled: true });
|
|
1762
|
+
const hasComma = isComma(nextToken);
|
|
1763
|
+
if (hasComma) nextToken = ctx.nextToken({ valuesEnabled: true });
|
|
1764
|
+
if (isRightBracket(nextToken)) {
|
|
1765
|
+
applyEndLoc(node, nextToken);
|
|
1766
|
+
return valueContainer.set(node);
|
|
1767
|
+
}
|
|
1768
|
+
if (hasComma) {
|
|
1769
|
+
ctx.backToken();
|
|
1770
|
+
return this.processArrayValue(node, valueContainer, ctx);
|
|
1771
|
+
}
|
|
1772
|
+
return ctx.reportParseError(nextToken ? "missing-comma" : "unterminated-array", nextToken);
|
|
1773
|
+
}
|
|
1774
|
+
});
|
|
1775
|
+
return ["VALUE"];
|
|
1776
|
+
}
|
|
1777
|
+
processInlineTable(token, ctx) {
|
|
1778
|
+
const valueContainer = ctx.consumeValueContainer();
|
|
1779
|
+
const node = {
|
|
1780
|
+
type: "TOMLInlineTable",
|
|
1781
|
+
body: [],
|
|
1782
|
+
parent: valueContainer.parent,
|
|
1783
|
+
range: cloneRange(token.range),
|
|
1784
|
+
loc: cloneLoc(token.loc)
|
|
1785
|
+
};
|
|
1786
|
+
const needSameLine = this.tomlVersion.gte(1, 1) ? void 0 : "invalid-inline-table-newline";
|
|
1787
|
+
const nextToken = ctx.nextToken({ needSameLine });
|
|
1788
|
+
if (nextToken) {
|
|
1789
|
+
if (isBare(nextToken) || isString(nextToken)) return this.processInlineTableKeyValue(nextToken, node, valueContainer, ctx);
|
|
1790
|
+
if (isRightBrace(nextToken)) {
|
|
1791
|
+
applyEndLoc(node, nextToken);
|
|
1792
|
+
return valueContainer.set(node);
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1795
|
+
return ctx.reportParseError("unexpected-token", nextToken);
|
|
1796
|
+
}
|
|
1797
|
+
processInlineTableKeyValue(token, inlineTableNode, valueContainer, ctx) {
|
|
1798
|
+
const keyValueNode = {
|
|
1799
|
+
type: "TOMLKeyValue",
|
|
1800
|
+
key: null,
|
|
1801
|
+
value: null,
|
|
1802
|
+
parent: inlineTableNode,
|
|
1803
|
+
range: cloneRange(token.range),
|
|
1804
|
+
loc: cloneLoc(token.loc)
|
|
1805
|
+
};
|
|
1806
|
+
inlineTableNode.body.push(keyValueNode);
|
|
1807
|
+
const { nextToken: targetToken } = this.processKeyNode(token, keyValueNode, ctx);
|
|
1808
|
+
if (!isEq(targetToken)) return ctx.reportParseError("missing-equals-sign", targetToken);
|
|
1809
|
+
const needSameLine = this.tomlVersion.gte(1, 1) ? void 0 : "invalid-inline-table-newline";
|
|
1810
|
+
ctx.addValueContainer({
|
|
1811
|
+
parent: keyValueNode,
|
|
1812
|
+
set: (valNode) => {
|
|
1813
|
+
keyValueNode.value = valNode;
|
|
1814
|
+
applyEndLoc(keyValueNode, valNode);
|
|
1815
|
+
let nextToken = ctx.nextToken({ needSameLine });
|
|
1816
|
+
if (isComma(nextToken)) {
|
|
1817
|
+
nextToken = ctx.nextToken({ needSameLine });
|
|
1818
|
+
if (nextToken && (isBare(nextToken) || isString(nextToken))) return this.processInlineTableKeyValue(nextToken, inlineTableNode, valueContainer, ctx);
|
|
1819
|
+
if (isRightBrace(nextToken)) {
|
|
1820
|
+
if (this.tomlVersion.lt(1, 1)) return ctx.reportParseError("invalid-trailing-comma-in-inline-table", nextToken);
|
|
1821
|
+
} else return ctx.reportParseError(nextToken ? "unexpected-token" : "unterminated-inline-table", nextToken);
|
|
1822
|
+
}
|
|
1823
|
+
if (isRightBrace(nextToken)) {
|
|
1824
|
+
applyEndLoc(inlineTableNode, nextToken);
|
|
1825
|
+
return valueContainer.set(inlineTableNode);
|
|
1826
|
+
}
|
|
1827
|
+
return ctx.reportParseError(nextToken ? "missing-comma" : "unterminated-inline-table", nextToken);
|
|
1828
|
+
}
|
|
1829
|
+
});
|
|
1830
|
+
ctx.needSameLine = "invalid-key-value-newline";
|
|
1831
|
+
return ["VALUE"];
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
/**
|
|
1835
|
+
* Check whether the given token is a dot.
|
|
1836
|
+
*/
|
|
1837
|
+
function isDot(token) {
|
|
1838
|
+
return isPunctuator(token) && token.value === ".";
|
|
1839
|
+
}
|
|
1840
|
+
/**
|
|
1841
|
+
* Check whether the given token is an equal sign.
|
|
1842
|
+
*/
|
|
1843
|
+
function isEq(token) {
|
|
1844
|
+
return isPunctuator(token) && token.value === "=";
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* Check whether the given token is a left bracket.
|
|
1848
|
+
*/
|
|
1849
|
+
function isLeftBracket(token) {
|
|
1850
|
+
return isPunctuator(token) && token.value === "[";
|
|
1851
|
+
}
|
|
1852
|
+
/**
|
|
1853
|
+
* Check whether the given token is a right bracket.
|
|
1854
|
+
*/
|
|
1855
|
+
function isRightBracket(token) {
|
|
1856
|
+
return isPunctuator(token) && token.value === "]";
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Check whether the given token is a left brace.
|
|
1860
|
+
*/
|
|
1861
|
+
function isLeftBrace(token) {
|
|
1862
|
+
return isPunctuator(token) && token.value === "{";
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* Check whether the given token is a right brace.
|
|
1866
|
+
*/
|
|
1867
|
+
function isRightBrace(token) {
|
|
1868
|
+
return isPunctuator(token) && token.value === "}";
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* Check whether the given token is a comma.
|
|
1872
|
+
*/
|
|
1873
|
+
function isComma(token) {
|
|
1874
|
+
return isPunctuator(token) && token.value === ",";
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Check whether the given token is a punctuator.
|
|
1878
|
+
*/
|
|
1879
|
+
function isPunctuator(token) {
|
|
1880
|
+
return Boolean(token && token.type === "Punctuator");
|
|
1881
|
+
}
|
|
1882
|
+
/**
|
|
1883
|
+
* Check whether the given token is a bare token.
|
|
1884
|
+
*/
|
|
1885
|
+
function isBare(token) {
|
|
1886
|
+
return token.type === "Bare";
|
|
1887
|
+
}
|
|
1888
|
+
/**
|
|
1889
|
+
* Check whether the given token is a string.
|
|
1890
|
+
*/
|
|
1891
|
+
function isString(token) {
|
|
1892
|
+
return token.type === "BasicString" || token.type === "LiteralString";
|
|
1893
|
+
}
|
|
1894
|
+
/**
|
|
1895
|
+
* Check whether the given token is a multi-line string.
|
|
1896
|
+
*/
|
|
1897
|
+
function isMultiLineString(token) {
|
|
1898
|
+
return token.type === "MultiLineBasicString" || token.type === "MultiLineLiteralString";
|
|
1899
|
+
}
|
|
1900
|
+
/**
|
|
1901
|
+
* Check whether the given token is a number.
|
|
1902
|
+
*/
|
|
1903
|
+
function isNumber(token) {
|
|
1904
|
+
return token.type === "Integer" || token.type === "Float";
|
|
1905
|
+
}
|
|
1906
|
+
/**
|
|
1907
|
+
* Check whether the given token is a boolean.
|
|
1908
|
+
*/
|
|
1909
|
+
function isBoolean(token) {
|
|
1910
|
+
return token.type === "Boolean";
|
|
1911
|
+
}
|
|
1912
|
+
/**
|
|
1913
|
+
* Check whether the given token is a date time.
|
|
1914
|
+
*/
|
|
1915
|
+
function isDateTime(token) {
|
|
1916
|
+
return token.type === "OffsetDateTime" || token.type === "LocalDateTime" || token.type === "LocalDate" || token.type === "LocalTime";
|
|
1917
|
+
}
|
|
1918
|
+
/**
|
|
1919
|
+
* Apply end locations
|
|
1920
|
+
*/
|
|
1921
|
+
function applyEndLoc(node, child) {
|
|
1922
|
+
if (child) {
|
|
1923
|
+
node.range[1] = child.range[1];
|
|
1924
|
+
node.loc.end = clonePos(child.loc.end);
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* clone the location.
|
|
1929
|
+
*/
|
|
1930
|
+
function cloneRange(range) {
|
|
1931
|
+
return [range[0], range[1]];
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* clone the location.
|
|
1935
|
+
*/
|
|
1936
|
+
function cloneLoc(loc) {
|
|
1937
|
+
return {
|
|
1938
|
+
start: clonePos(loc.start),
|
|
1939
|
+
end: clonePos(loc.end)
|
|
1940
|
+
};
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* clone the location.
|
|
1944
|
+
*/
|
|
1945
|
+
function clonePos(pos) {
|
|
1946
|
+
return {
|
|
1947
|
+
line: pos.line,
|
|
1948
|
+
column: pos.column
|
|
1949
|
+
};
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
//#endregion
|
|
1953
|
+
//#region src/visitor-keys.ts
|
|
1954
|
+
const tomlKeys = {
|
|
1955
|
+
Program: ["body"],
|
|
1956
|
+
TOMLTopLevelTable: ["body"],
|
|
1957
|
+
TOMLTable: ["key", "body"],
|
|
1958
|
+
TOMLKeyValue: ["key", "value"],
|
|
1959
|
+
TOMLKey: ["keys"],
|
|
1960
|
+
TOMLArray: ["elements"],
|
|
1961
|
+
TOMLInlineTable: ["body"],
|
|
1962
|
+
TOMLBare: [],
|
|
1963
|
+
TOMLQuoted: [],
|
|
1964
|
+
TOMLValue: []
|
|
1965
|
+
};
|
|
1966
|
+
const KEYS = unionWith(tomlKeys);
|
|
1967
|
+
|
|
1968
|
+
//#endregion
|
|
1969
|
+
//#region src/parser.ts
|
|
1970
|
+
/**
|
|
1971
|
+
* Parse source code
|
|
1972
|
+
*/
|
|
1973
|
+
function parseForESLint(code, options) {
|
|
1974
|
+
return {
|
|
1975
|
+
ast: new TOMLParser(code, options).parse(),
|
|
1976
|
+
visitorKeys: KEYS,
|
|
1977
|
+
services: { isTOML: true }
|
|
1978
|
+
};
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
//#endregion
|
|
1982
|
+
//#region src/traverse.ts
|
|
1983
|
+
/**
|
|
1984
|
+
* Check that the given key should be traversed or not.
|
|
1985
|
+
* @this {Traversable}
|
|
1986
|
+
* @param key The key to check.
|
|
1987
|
+
* @returns `true` if the key should be traversed.
|
|
1988
|
+
*/
|
|
1989
|
+
function fallbackKeysFilter(key) {
|
|
1990
|
+
let value = null;
|
|
1991
|
+
return key !== "comments" && key !== "leadingComments" && key !== "loc" && key !== "parent" && key !== "range" && key !== "tokens" && key !== "trailingComments" && (value = this[key]) !== null && typeof value === "object" && (typeof value.type === "string" || Array.isArray(value));
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* Get the keys of the given node to traverse it.
|
|
1995
|
+
* @param node The node to get.
|
|
1996
|
+
* @returns The keys to traverse.
|
|
1997
|
+
*/
|
|
1998
|
+
function getFallbackKeys(node) {
|
|
1999
|
+
return Object.keys(node).filter(fallbackKeysFilter, node);
|
|
2000
|
+
}
|
|
2001
|
+
/**
|
|
2002
|
+
* Get the keys of the given node to traverse it.
|
|
2003
|
+
* @param node The node to get.
|
|
2004
|
+
* @returns The keys to traverse.
|
|
2005
|
+
*/
|
|
2006
|
+
function getKeys(node, visitorKeys) {
|
|
2007
|
+
return ((visitorKeys || KEYS)[node.type] || getFallbackKeys(node)).filter((key) => !getNodes(node, key).next().done);
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* Get the nodes of the given node.
|
|
2011
|
+
* @param node The node to get.
|
|
2012
|
+
*/
|
|
2013
|
+
function* getNodes(node, key) {
|
|
2014
|
+
const child = node[key];
|
|
2015
|
+
if (Array.isArray(child)) {
|
|
2016
|
+
for (const c of child) if (isNode(c)) yield c;
|
|
2017
|
+
} else if (isNode(child)) yield child;
|
|
2018
|
+
}
|
|
2019
|
+
/**
|
|
2020
|
+
* Check whether a given value is a node.
|
|
2021
|
+
* @param x The value to check.
|
|
2022
|
+
* @returns `true` if the value is a node.
|
|
2023
|
+
*/
|
|
2024
|
+
function isNode(x) {
|
|
2025
|
+
return x !== null && typeof x === "object" && typeof x.type === "string";
|
|
2026
|
+
}
|
|
2027
|
+
/**
|
|
2028
|
+
* Traverse the given node.
|
|
2029
|
+
* @param node The node to traverse.
|
|
2030
|
+
* @param parent The parent node.
|
|
2031
|
+
* @param visitor The node visitor.
|
|
2032
|
+
*/
|
|
2033
|
+
function traverse(node, parent, visitor) {
|
|
2034
|
+
visitor.enterNode(node, parent);
|
|
2035
|
+
const keys = getKeys(node, visitor.visitorKeys);
|
|
2036
|
+
for (const key of keys) for (const child of getNodes(node, key)) traverse(child, node, visitor);
|
|
2037
|
+
visitor.leaveNode(node, parent);
|
|
2038
|
+
}
|
|
2039
|
+
/**
|
|
2040
|
+
* Traverse the given AST tree.
|
|
2041
|
+
* @param node Root node to traverse.
|
|
2042
|
+
* @param visitor Visitor.
|
|
2043
|
+
*/
|
|
2044
|
+
function traverseNodes(node, visitor) {
|
|
2045
|
+
traverse(node, null, visitor);
|
|
2046
|
+
}
|
|
2047
|
+
|
|
2048
|
+
//#endregion
|
|
2049
|
+
//#region src/utils.ts
|
|
2050
|
+
/**
|
|
2051
|
+
* Gets the static value for the given node.
|
|
2052
|
+
*/
|
|
2053
|
+
const getStaticTOMLValue = generateConvertTOMLValue((node) => node.value);
|
|
2054
|
+
/** Generates a converter to convert from a node. */
|
|
2055
|
+
function generateConvertTOMLValue(convertValue) {
|
|
2056
|
+
/**
|
|
2057
|
+
* Resolve TOML value
|
|
2058
|
+
*/
|
|
2059
|
+
function resolveValue(node, baseTable) {
|
|
2060
|
+
return resolver[node.type](node, baseTable);
|
|
2061
|
+
}
|
|
2062
|
+
const resolver = {
|
|
2063
|
+
Program(node, baseTable = {}) {
|
|
2064
|
+
return resolveValue(node.body[0], baseTable);
|
|
2065
|
+
},
|
|
2066
|
+
TOMLTopLevelTable(node, baseTable = {}) {
|
|
2067
|
+
for (const body of node.body) resolveValue(body, baseTable);
|
|
2068
|
+
return baseTable;
|
|
2069
|
+
},
|
|
2070
|
+
TOMLKeyValue(node, baseTable = {}) {
|
|
2071
|
+
const value = resolveValue(node.value);
|
|
2072
|
+
set(baseTable, resolveValue(node.key), value);
|
|
2073
|
+
return baseTable;
|
|
2074
|
+
},
|
|
2075
|
+
TOMLTable(node, baseTable = {}) {
|
|
2076
|
+
const table = getTable(baseTable, resolveValue(node.key), node.kind === "array");
|
|
2077
|
+
for (const body of node.body) resolveValue(body, table);
|
|
2078
|
+
return baseTable;
|
|
2079
|
+
},
|
|
2080
|
+
TOMLArray(node) {
|
|
2081
|
+
return node.elements.map((e) => resolveValue(e));
|
|
2082
|
+
},
|
|
2083
|
+
TOMLInlineTable(node) {
|
|
2084
|
+
const table = {};
|
|
2085
|
+
for (const body of node.body) resolveValue(body, table);
|
|
2086
|
+
return table;
|
|
2087
|
+
},
|
|
2088
|
+
TOMLKey(node) {
|
|
2089
|
+
return node.keys.map((key) => resolveValue(key));
|
|
2090
|
+
},
|
|
2091
|
+
TOMLBare(node) {
|
|
2092
|
+
return node.name;
|
|
2093
|
+
},
|
|
2094
|
+
TOMLQuoted(node) {
|
|
2095
|
+
return node.value;
|
|
2096
|
+
},
|
|
2097
|
+
TOMLValue(node) {
|
|
2098
|
+
return convertValue(node);
|
|
2099
|
+
}
|
|
2100
|
+
};
|
|
2101
|
+
return (node) => resolveValue(node);
|
|
2102
|
+
}
|
|
2103
|
+
/**
|
|
2104
|
+
* Get the table from the table.
|
|
2105
|
+
*/
|
|
2106
|
+
function getTable(baseTable, keys, array) {
|
|
2107
|
+
let target = baseTable;
|
|
2108
|
+
for (let index = 0; index < keys.length - 1; index++) {
|
|
2109
|
+
const key = keys[index];
|
|
2110
|
+
target = getNextTargetFromKey(target, key);
|
|
2111
|
+
}
|
|
2112
|
+
const lastKey = last(keys);
|
|
2113
|
+
const lastTarget = target[lastKey];
|
|
2114
|
+
if (lastTarget == null) {
|
|
2115
|
+
const tableValue$1 = {};
|
|
2116
|
+
target[lastKey] = array ? [tableValue$1] : tableValue$1;
|
|
2117
|
+
return tableValue$1;
|
|
2118
|
+
}
|
|
2119
|
+
if (isValue(lastTarget)) {
|
|
2120
|
+
const tableValue$1 = {};
|
|
2121
|
+
target[lastKey] = array ? [tableValue$1] : tableValue$1;
|
|
2122
|
+
return tableValue$1;
|
|
2123
|
+
}
|
|
2124
|
+
if (!array) {
|
|
2125
|
+
if (Array.isArray(lastTarget)) {
|
|
2126
|
+
const tableValue$1 = {};
|
|
2127
|
+
target[lastKey] = tableValue$1;
|
|
2128
|
+
return tableValue$1;
|
|
2129
|
+
}
|
|
2130
|
+
return lastTarget;
|
|
2131
|
+
}
|
|
2132
|
+
if (Array.isArray(lastTarget)) {
|
|
2133
|
+
const tableValue$1 = {};
|
|
2134
|
+
lastTarget.push(tableValue$1);
|
|
2135
|
+
return tableValue$1;
|
|
2136
|
+
}
|
|
2137
|
+
const tableValue = {};
|
|
2138
|
+
target[lastKey] = [tableValue];
|
|
2139
|
+
return tableValue;
|
|
2140
|
+
/** Get next target from key */
|
|
2141
|
+
function getNextTargetFromKey(currTarget, key) {
|
|
2142
|
+
const nextTarget = currTarget[key];
|
|
2143
|
+
if (nextTarget == null) {
|
|
2144
|
+
const val = {};
|
|
2145
|
+
currTarget[key] = val;
|
|
2146
|
+
return val;
|
|
2147
|
+
}
|
|
2148
|
+
if (isValue(nextTarget)) {
|
|
2149
|
+
const val = {};
|
|
2150
|
+
currTarget[key] = val;
|
|
2151
|
+
return val;
|
|
2152
|
+
}
|
|
2153
|
+
let resultTarget = nextTarget;
|
|
2154
|
+
while (Array.isArray(resultTarget)) {
|
|
2155
|
+
const lastIndex = resultTarget.length - 1;
|
|
2156
|
+
const nextElement = resultTarget[lastIndex];
|
|
2157
|
+
if (isValue(nextElement)) {
|
|
2158
|
+
const val = {};
|
|
2159
|
+
resultTarget[lastIndex] = val;
|
|
2160
|
+
return val;
|
|
2161
|
+
}
|
|
2162
|
+
resultTarget = nextElement;
|
|
2163
|
+
}
|
|
2164
|
+
return resultTarget;
|
|
2165
|
+
}
|
|
2166
|
+
}
|
|
2167
|
+
/**
|
|
2168
|
+
* Set the value to the table.
|
|
2169
|
+
*/
|
|
2170
|
+
function set(baseTable, keys, value) {
|
|
2171
|
+
let target = baseTable;
|
|
2172
|
+
for (let index = 0; index < keys.length - 1; index++) {
|
|
2173
|
+
const key = keys[index];
|
|
2174
|
+
const nextTarget = target[key];
|
|
2175
|
+
if (nextTarget == null) {
|
|
2176
|
+
const val = {};
|
|
2177
|
+
target[key] = val;
|
|
2178
|
+
target = val;
|
|
2179
|
+
} else if (isValue(nextTarget) || Array.isArray(nextTarget)) {
|
|
2180
|
+
const val = {};
|
|
2181
|
+
target[key] = val;
|
|
2182
|
+
target = val;
|
|
2183
|
+
} else target = nextTarget;
|
|
2184
|
+
}
|
|
2185
|
+
target[last(keys)] = value;
|
|
2186
|
+
}
|
|
2187
|
+
/**
|
|
2188
|
+
* Check whether the given value is a value.
|
|
2189
|
+
*/
|
|
2190
|
+
function isValue(value) {
|
|
2191
|
+
return typeof value !== "object" || value instanceof Date;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
//#endregion
|
|
2195
|
+
//#region package.json
|
|
2196
|
+
var name$1 = "toml-eslint-parser";
|
|
2197
|
+
var version$1 = "1.0.3";
|
|
2198
|
+
|
|
2199
|
+
//#endregion
|
|
2200
|
+
//#region src/meta.ts
|
|
2201
|
+
var meta_exports = /* @__PURE__ */ __exportAll({
|
|
2202
|
+
name: () => name,
|
|
2203
|
+
version: () => version
|
|
2204
|
+
});
|
|
2205
|
+
const name = name$1;
|
|
2206
|
+
const version = version$1;
|
|
2207
|
+
|
|
2208
|
+
//#endregion
|
|
2209
|
+
//#region src/index.ts
|
|
2210
|
+
const VisitorKeys = KEYS;
|
|
2211
|
+
/**
|
|
2212
|
+
* Parse TOML source code
|
|
2213
|
+
*/
|
|
2214
|
+
function parseTOML(code, options) {
|
|
2215
|
+
return parseForESLint(code, options).ast;
|
|
2216
|
+
}
|
|
2217
|
+
|
|
2218
|
+
//#endregion
|
|
2219
|
+
export { ParseError, VisitorKeys, getStaticTOMLValue, meta_exports as meta, name, parseForESLint, parseTOML, traverseNodes };
|