language-operator 0.1.81 → 0.1.82
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.
- checksums.yaml +4 -4
- data/.claude/agents/README.md +16 -0
- data/.claude/agents/changelog-writer.md +181 -0
- data/.claude/hooks/README.md +43 -0
- data/.claude/hooks/node_modules/.bin/esbuild +1 -0
- data/.claude/hooks/node_modules/.bin/tsc +1 -0
- data/.claude/hooks/node_modules/.bin/tsserver +1 -0
- data/.claude/hooks/node_modules/.bin/tsx +1 -0
- data/.claude/hooks/node_modules/.package-lock.json +136 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/README.md +3 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- data/.claude/hooks/node_modules/@esbuild/linux-x64/package.json +20 -0
- data/.claude/hooks/node_modules/@types/node/LICENSE +21 -0
- data/.claude/hooks/node_modules/@types/node/README.md +15 -0
- data/.claude/hooks/node_modules/@types/node/assert/strict.d.ts +105 -0
- data/.claude/hooks/node_modules/@types/node/assert.d.ts +955 -0
- data/.claude/hooks/node_modules/@types/node/async_hooks.d.ts +623 -0
- data/.claude/hooks/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- data/.claude/hooks/node_modules/@types/node/buffer.d.ts +1810 -0
- data/.claude/hooks/node_modules/@types/node/child_process.d.ts +1428 -0
- data/.claude/hooks/node_modules/@types/node/cluster.d.ts +486 -0
- data/.claude/hooks/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- data/.claude/hooks/node_modules/@types/node/console.d.ts +151 -0
- data/.claude/hooks/node_modules/@types/node/constants.d.ts +20 -0
- data/.claude/hooks/node_modules/@types/node/crypto.d.ts +4065 -0
- data/.claude/hooks/node_modules/@types/node/dgram.d.ts +564 -0
- data/.claude/hooks/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- data/.claude/hooks/node_modules/@types/node/dns/promises.d.ts +503 -0
- data/.claude/hooks/node_modules/@types/node/dns.d.ts +922 -0
- data/.claude/hooks/node_modules/@types/node/domain.d.ts +166 -0
- data/.claude/hooks/node_modules/@types/node/events.d.ts +1054 -0
- data/.claude/hooks/node_modules/@types/node/fs/promises.d.ts +1316 -0
- data/.claude/hooks/node_modules/@types/node/fs.d.ts +4676 -0
- data/.claude/hooks/node_modules/@types/node/globals.d.ts +150 -0
- data/.claude/hooks/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- data/.claude/hooks/node_modules/@types/node/http.d.ts +2143 -0
- data/.claude/hooks/node_modules/@types/node/http2.d.ts +2480 -0
- data/.claude/hooks/node_modules/@types/node/https.d.ts +399 -0
- data/.claude/hooks/node_modules/@types/node/index.d.ts +115 -0
- data/.claude/hooks/node_modules/@types/node/inspector/promises.d.ts +41 -0
- data/.claude/hooks/node_modules/@types/node/inspector.d.ts +224 -0
- data/.claude/hooks/node_modules/@types/node/inspector.generated.d.ts +4226 -0
- data/.claude/hooks/node_modules/@types/node/module.d.ts +819 -0
- data/.claude/hooks/node_modules/@types/node/net.d.ts +933 -0
- data/.claude/hooks/node_modules/@types/node/os.d.ts +507 -0
- data/.claude/hooks/node_modules/@types/node/package.json +155 -0
- data/.claude/hooks/node_modules/@types/node/path/posix.d.ts +8 -0
- data/.claude/hooks/node_modules/@types/node/path/win32.d.ts +8 -0
- data/.claude/hooks/node_modules/@types/node/path.d.ts +187 -0
- data/.claude/hooks/node_modules/@types/node/perf_hooks.d.ts +621 -0
- data/.claude/hooks/node_modules/@types/node/process.d.ts +2097 -0
- data/.claude/hooks/node_modules/@types/node/punycode.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/querystring.d.ts +152 -0
- data/.claude/hooks/node_modules/@types/node/quic.d.ts +910 -0
- data/.claude/hooks/node_modules/@types/node/readline/promises.d.ts +161 -0
- data/.claude/hooks/node_modules/@types/node/readline.d.ts +541 -0
- data/.claude/hooks/node_modules/@types/node/repl.d.ts +415 -0
- data/.claude/hooks/node_modules/@types/node/sea.d.ts +162 -0
- data/.claude/hooks/node_modules/@types/node/sqlite.d.ts +937 -0
- data/.claude/hooks/node_modules/@types/node/stream/consumers.d.ts +38 -0
- data/.claude/hooks/node_modules/@types/node/stream/promises.d.ts +211 -0
- data/.claude/hooks/node_modules/@types/node/stream/web.d.ts +296 -0
- data/.claude/hooks/node_modules/@types/node/stream.d.ts +1760 -0
- data/.claude/hooks/node_modules/@types/node/string_decoder.d.ts +67 -0
- data/.claude/hooks/node_modules/@types/node/test/reporters.d.ts +96 -0
- data/.claude/hooks/node_modules/@types/node/test.d.ts +2239 -0
- data/.claude/hooks/node_modules/@types/node/timers/promises.d.ts +108 -0
- data/.claude/hooks/node_modules/@types/node/timers.d.ts +159 -0
- data/.claude/hooks/node_modules/@types/node/tls.d.ts +1194 -0
- data/.claude/hooks/node_modules/@types/node/trace_events.d.ts +197 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- data/.claude/hooks/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- data/.claude/hooks/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- data/.claude/hooks/node_modules/@types/node/tty.d.ts +250 -0
- data/.claude/hooks/node_modules/@types/node/url.d.ts +519 -0
- data/.claude/hooks/node_modules/@types/node/util/types.d.ts +558 -0
- data/.claude/hooks/node_modules/@types/node/util.d.ts +1653 -0
- data/.claude/hooks/node_modules/@types/node/v8.d.ts +979 -0
- data/.claude/hooks/node_modules/@types/node/vm.d.ts +1180 -0
- data/.claude/hooks/node_modules/@types/node/wasi.d.ts +202 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/console.d.ts +9 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/events.d.ts +106 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/fetch.d.ts +54 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- data/.claude/hooks/node_modules/@types/node/web-globals/url.d.ts +24 -0
- data/.claude/hooks/node_modules/@types/node/worker_threads.d.ts +714 -0
- data/.claude/hooks/node_modules/@types/node/zlib.d.ts +618 -0
- data/.claude/hooks/node_modules/esbuild/LICENSE.md +21 -0
- data/.claude/hooks/node_modules/esbuild/README.md +3 -0
- data/.claude/hooks/node_modules/esbuild/bin/esbuild +0 -0
- data/.claude/hooks/node_modules/esbuild/install.js +289 -0
- data/.claude/hooks/node_modules/esbuild/lib/main.d.ts +716 -0
- data/.claude/hooks/node_modules/esbuild/lib/main.js +2242 -0
- data/.claude/hooks/node_modules/esbuild/package.json +49 -0
- data/.claude/hooks/node_modules/get-tsconfig/LICENSE +21 -0
- data/.claude/hooks/node_modules/get-tsconfig/README.md +235 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.cjs +7 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.d.cts +2088 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.d.mts +2088 -0
- data/.claude/hooks/node_modules/get-tsconfig/dist/index.mjs +7 -0
- data/.claude/hooks/node_modules/get-tsconfig/package.json +46 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/LICENSE +21 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/README.md +216 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.cjs +1 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.d.cts +11 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.d.mts +11 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/dist/index.mjs +1 -0
- data/.claude/hooks/node_modules/resolve-pkg-maps/package.json +42 -0
- data/.claude/hooks/node_modules/tsx/LICENSE +21 -0
- data/.claude/hooks/node_modules/tsx/README.md +32 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.d.cts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.d.mts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/api/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cjs/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/cli.cjs +54 -0
- data/.claude/hooks/node_modules/tsx/dist/cli.mjs +55 -0
- data/.claude/hooks/node_modules/tsx/dist/client-BQVF1NaW.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/client-D6NvIMSC.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.d.cts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.d.mts +35 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/api/index.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/index.cjs +2 -0
- data/.claude/hooks/node_modules/tsx/dist/esm/index.mjs +2 -0
- data/.claude/hooks/node_modules/tsx/dist/get-pipe-path-BHW2eJdv.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/get-pipe-path-BoR10qr8.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-7AaEi15b.mjs +14 -0
- data/.claude/hooks/node_modules/tsx/dist/index-BWFBUo6r.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-gbaejti9.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/index-gckBtVBf.cjs +14 -0
- data/.claude/hooks/node_modules/tsx/dist/lexer-DQCqS3nf.mjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/lexer-DgIbo0BU.cjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/loader.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/loader.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/node-features-_8ZFwP_x.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/node-features-roYmp9jK.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/package-CeBgXWuR.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/package-Dxt5kIHw.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/patch-repl.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/patch-repl.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/preflight.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/preflight.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-2sWVXuRQ.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-B7jrtLTO.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/register-CFH5oNdT.mjs +4 -0
- data/.claude/hooks/node_modules/tsx/dist/register-D46fvsV_.cjs +4 -0
- data/.claude/hooks/node_modules/tsx/dist/repl.cjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/repl.mjs +3 -0
- data/.claude/hooks/node_modules/tsx/dist/require-D4F1Lv60.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/require-DQxpCAr4.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/suppress-warnings.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/suppress-warnings.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/temporary-directory-CwHp0_NW.mjs +1 -0
- data/.claude/hooks/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +5 -0
- data/.claude/hooks/node_modules/tsx/package.json +68 -0
- data/.claude/hooks/node_modules/typescript/LICENSE.txt +55 -0
- data/.claude/hooks/node_modules/typescript/README.md +50 -0
- data/.claude/hooks/node_modules/typescript/SECURITY.md +41 -0
- data/.claude/hooks/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- data/.claude/hooks/node_modules/typescript/bin/tsc +2 -0
- data/.claude/hooks/node_modules/typescript/bin/tsserver +2 -0
- data/.claude/hooks/node_modules/typescript/lib/_tsc.js +133818 -0
- data/.claude/hooks/node_modules/typescript/lib/_tsserver.js +659 -0
- data/.claude/hooks/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- data/.claude/hooks/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- data/.claude/hooks/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- data/.claude/hooks/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/tsc.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserver.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- data/.claude/hooks/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- data/.claude/hooks/node_modules/typescript/lib/typesMap.json +497 -0
- data/.claude/hooks/node_modules/typescript/lib/typescript.d.ts +11437 -0
- data/.claude/hooks/node_modules/typescript/lib/typescript.js +200276 -0
- data/.claude/hooks/node_modules/typescript/lib/typingsInstaller.js +8 -0
- data/.claude/hooks/node_modules/typescript/lib/watchGuard.js +53 -0
- data/.claude/hooks/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- data/.claude/hooks/node_modules/typescript/package.json +120 -0
- data/.claude/hooks/node_modules/undici-types/LICENSE +21 -0
- data/.claude/hooks/node_modules/undici-types/README.md +6 -0
- data/.claude/hooks/node_modules/undici-types/agent.d.ts +32 -0
- data/.claude/hooks/node_modules/undici-types/api.d.ts +43 -0
- data/.claude/hooks/node_modules/undici-types/balanced-pool.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/cache-interceptor.d.ts +172 -0
- data/.claude/hooks/node_modules/undici-types/cache.d.ts +36 -0
- data/.claude/hooks/node_modules/undici-types/client-stats.d.ts +15 -0
- data/.claude/hooks/node_modules/undici-types/client.d.ts +108 -0
- data/.claude/hooks/node_modules/undici-types/connector.d.ts +34 -0
- data/.claude/hooks/node_modules/undici-types/content-type.d.ts +21 -0
- data/.claude/hooks/node_modules/undici-types/cookies.d.ts +30 -0
- data/.claude/hooks/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- data/.claude/hooks/node_modules/undici-types/dispatcher.d.ts +276 -0
- data/.claude/hooks/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- data/.claude/hooks/node_modules/undici-types/errors.d.ts +161 -0
- data/.claude/hooks/node_modules/undici-types/eventsource.d.ts +66 -0
- data/.claude/hooks/node_modules/undici-types/fetch.d.ts +211 -0
- data/.claude/hooks/node_modules/undici-types/formdata.d.ts +108 -0
- data/.claude/hooks/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- data/.claude/hooks/node_modules/undici-types/global-origin.d.ts +7 -0
- data/.claude/hooks/node_modules/undici-types/h2c-client.d.ts +73 -0
- data/.claude/hooks/node_modules/undici-types/handlers.d.ts +15 -0
- data/.claude/hooks/node_modules/undici-types/header.d.ts +160 -0
- data/.claude/hooks/node_modules/undici-types/index.d.ts +80 -0
- data/.claude/hooks/node_modules/undici-types/interceptors.d.ts +39 -0
- data/.claude/hooks/node_modules/undici-types/mock-agent.d.ts +68 -0
- data/.claude/hooks/node_modules/undici-types/mock-call-history.d.ts +111 -0
- data/.claude/hooks/node_modules/undici-types/mock-client.d.ts +27 -0
- data/.claude/hooks/node_modules/undici-types/mock-errors.d.ts +12 -0
- data/.claude/hooks/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- data/.claude/hooks/node_modules/undici-types/mock-pool.d.ts +27 -0
- data/.claude/hooks/node_modules/undici-types/package.json +55 -0
- data/.claude/hooks/node_modules/undici-types/patch.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/pool-stats.d.ts +19 -0
- data/.claude/hooks/node_modules/undici-types/pool.d.ts +41 -0
- data/.claude/hooks/node_modules/undici-types/proxy-agent.d.ts +29 -0
- data/.claude/hooks/node_modules/undici-types/readable.d.ts +68 -0
- data/.claude/hooks/node_modules/undici-types/retry-agent.d.ts +8 -0
- data/.claude/hooks/node_modules/undici-types/retry-handler.d.ts +125 -0
- data/.claude/hooks/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- data/.claude/hooks/node_modules/undici-types/util.d.ts +18 -0
- data/.claude/hooks/node_modules/undici-types/utility.d.ts +7 -0
- data/.claude/hooks/node_modules/undici-types/webidl.d.ts +341 -0
- data/.claude/hooks/node_modules/undici-types/websocket.d.ts +186 -0
- data/.claude/hooks/package-lock.json +562 -0
- data/.claude/hooks/package.json +19 -0
- data/.claude/hooks/skill-activation-prompt.sh +11 -0
- data/.claude/hooks/skill-activation-prompt.ts +185 -0
- data/.claude/hooks/tsconfig.json +12 -0
- data/.claude/settings.json +33 -0
- data/.claude/skills/README.md +29 -0
- data/.claude/skills/ruby-gem-development/SKILL.md +293 -0
- data/.claude/skills/skill-rules.json +117 -0
- data/.claude/skills/thor-cli-development/SKILL.md +431 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +3 -1
- data/completions/{_aictl → _langop} +37 -37
- data/completions/{aictl.bash → langop.bash} +16 -16
- data/completions/langop.fish +114 -0
- data/components/agent/Gemfile +1 -1
- data/components/tool/Gemfile +1 -1
- data/docs/README.md +10 -10
- data/docs/agent-internals.md +1 -1
- data/docs/cheat-sheet.md +76 -76
- data/docs/cli-reference.md +71 -71
- data/docs/how-agents-work.md +1 -1
- data/docs/installation.md +30 -30
- data/docs/quickstart.md +30 -30
- data/docs/using-tools.md +11 -11
- data/docs/webhooks.md +6 -6
- data/examples/ux_helpers_demo.rb +4 -4
- data/lib/language_operator/agent/task_executor.rb +0 -37
- data/lib/language_operator/agent/web_server.rb +311 -323
- data/lib/language_operator/cli/commands/agent/base.rb +16 -15
- data/lib/language_operator/cli/commands/agent/code_operations.rb +6 -6
- data/lib/language_operator/cli/commands/agent/helpers/synthesis_watcher.rb +1 -1
- data/lib/language_operator/cli/commands/agent/lifecycle.rb +2 -2
- data/lib/language_operator/cli/commands/agent/logs.rb +2 -2
- data/lib/language_operator/cli/commands/agent/workspace.rb +8 -8
- data/lib/language_operator/cli/commands/cluster.rb +172 -158
- data/lib/language_operator/cli/commands/install.rb +878 -81
- data/lib/language_operator/cli/commands/model/base.rb +7 -6
- data/lib/language_operator/cli/commands/organization.rb +61 -0
- data/lib/language_operator/cli/commands/persona.rb +10 -8
- data/lib/language_operator/cli/commands/status.rb +83 -13
- data/lib/language_operator/cli/commands/system/exec.rb +10 -10
- data/lib/language_operator/cli/commands/system/schema.rb +6 -6
- data/lib/language_operator/cli/commands/system/synthesis_template.rb +6 -6
- data/lib/language_operator/cli/commands/system/synthesize.rb +14 -14
- data/lib/language_operator/cli/commands/system/validate_template.rb +4 -4
- data/lib/language_operator/cli/commands/tool/base.rb +1 -1
- data/lib/language_operator/cli/commands/tool/install.rb +2 -2
- data/lib/language_operator/cli/commands/tool/search.rb +3 -3
- data/lib/language_operator/cli/commands/ui.rb +173 -0
- data/lib/language_operator/cli/commands/use.rb +80 -9
- data/lib/language_operator/cli/errors/suggestions.rb +21 -21
- data/lib/language_operator/cli/formatters/progress_formatter.rb +2 -1
- data/lib/language_operator/cli/formatters/table_formatter.rb +21 -1
- data/lib/language_operator/cli/helpers/cluster_validator.rb +2 -2
- data/lib/language_operator/cli/helpers/health_checker.rb +263 -0
- data/lib/language_operator/cli/helpers/kubeconfig_validator.rb +3 -3
- data/lib/language_operator/cli/helpers/ux_helper.rb +4 -3
- data/lib/language_operator/cli/main.rb +30 -21
- data/lib/language_operator/cli/wizards/model_wizard.rb +7 -5
- data/lib/language_operator/config/cluster_config.rb +3 -3
- data/lib/language_operator/constants/kubernetes_labels.rb +1 -1
- data/lib/language_operator/kubernetes/client.rb +53 -109
- data/lib/language_operator/kubernetes/resource_builder.rb +46 -14
- data/lib/language_operator/templates/schema/agent_dsl_openapi.yaml +1 -1
- data/lib/language_operator/templates/schema/agent_dsl_schema.json +1 -1
- data/lib/language_operator/utils/org_context.rb +100 -0
- data/lib/language_operator/version.rb +1 -1
- data/synth/001/Makefile +1 -1
- data/synth/002/Makefile +1 -1
- data/synth/003/Makefile +1 -1
- data/synth/004/Makefile +1 -1
- metadata +384 -11
- data/completions/aictl.fish +0 -114
- data/lib/language_operator/agent/event_config.rb +0 -172
- data/lib/language_operator/cli/commands/quickstart.rb +0 -22
- data/lib/language_operator/cli/wizards/quickstart_wizard.rb +0 -561
- /data/bin/{aictl → langop} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
var je=Object.defineProperty;var o=(e,t)=>je(e,"name",{value:t,configurable:!0});import m from"node:path";import ie from"node:fs";import Fe from"node:module";import{resolveExports as De}from"resolve-pkg-maps";import Ee from"fs";import he from"os";import Ie from"path";function h(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}o(h,"slash");const G=o(e=>{const t=ie[e];return(s,...n)=>{const l=`${e}:${n.join(":")}`;let i=s==null?void 0:s.get(l);return i===void 0&&(i=Reflect.apply(t,ie,n),s==null||s.set(l,i)),i}},"cacheFs"),I=G("existsSync"),Be=G("readFileSync"),R=G("statSync"),oe=o((e,t,s)=>{for(;;){const n=m.posix.join(e,t);if(I(s,n))return n;const l=m.dirname(e);if(l===e)return;e=l}},"findUp"),Q=/^\.{1,2}(\/.*)?$/,H=o(e=>{const t=h(e);return Q.test(t)?t:`./${t}`},"normalizeRelativePath");function Le(e,t=!1){const s=e.length;let n=0,l="",i=0,r=16,f=0,u=0,g=0,w=0,b=0;function y(c,_){let D=0,T=0;for(;D<c;){let p=e.charCodeAt(n);if(p>=48&&p<=57)T=T*16+p-48;else if(p>=65&&p<=70)T=T*16+p-65+10;else if(p>=97&&p<=102)T=T*16+p-97+10;else break;n++,D++}return D<c&&(T=-1),T}o(y,"scanHexDigits");function v(c){n=c,l="",i=0,r=16,b=0}o(v,"setPosition");function j(){let c=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&$(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&$(e.charCodeAt(n)))for(n++;n<e.length&&$(e.charCodeAt(n));)n++;else return b=3,e.substring(c,n);let _=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&$(e.charCodeAt(n))){for(n++;n<e.length&&$(e.charCodeAt(n));)n++;_=n}else b=3;return e.substring(c,_)}o(j,"scanNumber");function d(){let c="",_=n;for(;;){if(n>=s){c+=e.substring(_,n),b=2;break}const D=e.charCodeAt(n);if(D===34){c+=e.substring(_,n),n++;break}if(D===92){if(c+=e.substring(_,n),n++,n>=s){b=2;break}switch(e.charCodeAt(n++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
|
|
2
|
+
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const p=y(4);p>=0?c+=String.fromCharCode(p):b=4;break;default:b=5}_=n;continue}if(D>=0&&D<=31)if(S(D)){c+=e.substring(_,n),b=2;break}else b=6;n++}return c}o(d,"scanString");function A(){if(l="",b=0,i=n,u=f,w=g,n>=s)return i=s,r=17;let c=e.charCodeAt(n);if(X(c)){do n++,l+=String.fromCharCode(c),c=e.charCodeAt(n);while(X(c));return r=15}if(S(c))return n++,l+=String.fromCharCode(c),c===13&&e.charCodeAt(n)===10&&(n++,l+=`
|
|
3
|
+
`),f++,g=n,r=14;switch(c){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,l=d(),r=10;case 47:const _=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<s&&!S(e.charCodeAt(n));)n++;return l=e.substring(_,n),r=12}if(e.charCodeAt(n+1)===42){n+=2;const D=s-1;let T=!1;for(;n<D;){const p=e.charCodeAt(n);if(p===42&&e.charCodeAt(n+1)===47){n+=2,T=!0;break}n++,S(p)&&(p===13&&e.charCodeAt(n)===10&&n++,f++,g=n)}return T||(n++,b=1),l=e.substring(_,n),r=13}return l+=String.fromCharCode(c),n++,r=16;case 45:if(l+=String.fromCharCode(c),n++,n===s||!$(e.charCodeAt(n)))return r=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return l+=j(),r=11;default:for(;n<s&&E(c);)n++,c=e.charCodeAt(n);if(i!==n){switch(l=e.substring(i,n),l){case"true":return r=8;case"false":return r=9;case"null":return r=7}return r=16}return l+=String.fromCharCode(c),n++,r=16}}o(A,"scanNext");function E(c){if(X(c)||S(c))return!1;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}o(E,"isUnknownContentCharacter");function B(){let c;do c=A();while(c>=12&&c<=15);return c}return o(B,"scanNextNonTrivia"),{setPosition:v,getPosition:o(()=>n,"getPosition"),scan:t?B:A,getToken:o(()=>r,"getToken"),getTokenValue:o(()=>l,"getTokenValue"),getTokenOffset:o(()=>i,"getTokenOffset"),getTokenLength:o(()=>n-i,"getTokenLength"),getTokenStartLine:o(()=>u,"getTokenStartLine"),getTokenStartCharacter:o(()=>i-w,"getTokenStartCharacter"),getTokenError:o(()=>b,"getTokenError")}}o(Le,"createScanner");function X(e){return e===32||e===9}o(X,"isWhiteSpace");function S(e){return e===10||e===13}o(S,"isLineBreak");function $(e){return e>=48&&e<=57}o($,"isDigit");var re;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"})(re||(re={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const x=200;new Array(x).fill(0).map((e,t)=>`
|
|
4
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`\r
|
|
5
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`
|
|
6
|
+
`+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(x).fill(0).map((e,t)=>`\r
|
|
7
|
+
`+" ".repeat(t));var W;(function(e){e.DEFAULT={allowTrailingComma:!1}})(W||(W={}));function $e(e,t=[],s=W.DEFAULT){let n=null,l=[];const i=[];function r(u){Array.isArray(l)?l.push(u):n!==null&&(l[n]=u)}return o(r,"onValue"),xe(e,{onObjectBegin:o(()=>{const u={};r(u),i.push(l),l=u,n=null},"onObjectBegin"),onObjectProperty:o(u=>{n=u},"onObjectProperty"),onObjectEnd:o(()=>{l=i.pop()},"onObjectEnd"),onArrayBegin:o(()=>{const u=[];r(u),i.push(l),l=u,n=null},"onArrayBegin"),onArrayEnd:o(()=>{l=i.pop()},"onArrayEnd"),onLiteralValue:r,onError:o((u,g,w)=>{t.push({error:u,offset:g,length:w})},"onError")},s),l[0]}o($e,"parse$1");function xe(e,t,s=W.DEFAULT){const n=Le(e,!1),l=[];let i=0;function r(k){return k?()=>i===0&&k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}o(r,"toNoArgVisit");function f(k){return k?F=>i===0&&k(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}o(f,"toOneArgVisit");function u(k){return k?F=>i===0&&k(F,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice()):()=>!0}o(u,"toOneArgVisitWithPath");function g(k){return k?()=>{i>0?i++:k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice())===!1&&(i=1)}:()=>!0}o(g,"toBeginVisit");function w(k){return k?()=>{i>0&&i--,i===0&&k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:()=>!0}o(w,"toEndVisit");const b=g(t.onObjectBegin),y=u(t.onObjectProperty),v=w(t.onObjectEnd),j=g(t.onArrayBegin),d=w(t.onArrayEnd),A=u(t.onLiteralValue),E=f(t.onSeparator),B=r(t.onComment),c=f(t.onError),_=s&&s.disallowComments,D=s&&s.allowTrailingComma;function T(){for(;;){const k=n.scan();switch(n.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:_||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(k){case 12:case 13:_?p(10):B();break;case 16:p(1);break;case 15:case 14:break;default:return k}}}o(T,"scanNext");function p(k,F=[],le=[]){if(c(k),F.length+le.length>0){let P=n.getToken();for(;P!==17;){if(F.indexOf(P)!==-1){T();break}else if(le.indexOf(P)!==-1)break;P=T()}}}o(p,"handleError");function U(k){const F=n.getTokenValue();return k?A(F):(y(F),l.push(F)),T(),!0}o(U,"parseString");function a(){switch(n.getToken()){case 11:const k=n.getTokenValue();let F=Number(k);isNaN(F)&&(p(2),F=0),A(F);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return!1}return T(),!0}o(a,"parseLiteral");function N(){return n.getToken()!==10?(p(3,[],[2,5]),!1):(U(!1),n.getToken()===6?(E(":"),T(),z()||p(4,[],[2,5])):p(5,[],[2,5]),l.pop(),!0)}o(N,"parseProperty");function _e(){b(),T();let k=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(k||p(4,[],[]),E(","),T(),n.getToken()===2&&D)break}else k&&p(6,[],[]);N()||p(4,[],[2,5]),k=!0}return v(),n.getToken()!==2?p(7,[2],[]):T(),!0}o(_e,"parseObject");function ye(){j(),T();let k=!0,F=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(F||p(4,[],[]),E(","),T(),n.getToken()===4&&D)break}else F&&p(6,[],[]);k?(l.push(0),k=!1):l[l.length-1]++,z()||p(4,[],[4,5]),F=!0}return d(),k||l.pop(),n.getToken()!==4?p(8,[4],[]):T(),!0}o(ye,"parseArray");function z(){switch(n.getToken()){case 3:return ye();case 1:return _e();case 10:return U(!0);default:return a()}}return o(z,"parseValue"),T(),n.getToken()===17?s.allowEmptyContent?!0:(p(4,[],[]),!1):z()?(n.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}o(xe,"visit");var ue;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"})(ue||(ue={}));var fe;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"})(fe||(fe={}));const Ue=$e;var ce;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"})(ce||(ce={}));const ae=o((e,t)=>Ue(Be(t,e,"utf8")),"readJsonc"),Y=Symbol("implicitBaseUrl"),L="${configDir}",Se=o(()=>{const{findPnpApi:e}=Fe;return e&&e(process.cwd())},"getPnpApi"),Z=o((e,t,s,n)=>{const l=`resolveFromPackageJsonPath:${e}:${t}:${s}`;if(n!=null&&n.has(l))return n.get(l);const i=ae(e,n);if(!i)return;let r=t||"tsconfig.json";if(!s&&i.exports)try{const[f]=De(i.exports,t,["require","types"]);r=f}catch{return!1}else!t&&i.tsconfig&&(r=i.tsconfig);return r=m.join(e,"..",r),n==null||n.set(l,r),r},"resolveFromPackageJsonPath"),q="package.json",K="tsconfig.json",Ne=o((e,t,s)=>{let n=e;if(e===".."&&(n=m.join(n,K)),e[0]==="."&&(n=m.resolve(t,n)),m.isAbsolute(n)){if(I(s,n)){if(R(s,n).isFile())return n}else if(!n.endsWith(".json")){const v=`${n}.json`;if(I(s,v))return v}return}const[l,...i]=e.split("/"),r=l[0]==="@"?`${l}/${i.shift()}`:l,f=i.join("/"),u=Se();if(u){const{resolveRequest:v}=u;try{if(r===e){const j=v(m.join(r,q),t);if(j){const d=Z(j,f,!1,s);if(d&&I(s,d))return d}}else{let j;try{j=v(e,t,{extensions:[".json"]})}catch{j=v(m.join(e,K),t)}if(j)return j}}catch{}}const g=oe(m.resolve(t),m.join("node_modules",r),s);if(!g||!R(s,g).isDirectory())return;const w=m.join(g,q);if(I(s,w)){const v=Z(w,f,!1,s);if(v===!1)return;if(v&&I(s,v)&&R(s,v).isFile())return v}const b=m.join(g,f),y=b.endsWith(".json");if(!y){const v=`${b}.json`;if(I(s,v))return v}if(I(s,b)){if(R(s,b).isDirectory()){const v=m.join(b,q);if(I(s,v)){const d=Z(v,"",!0,s);if(d&&I(s,d))return d}const j=m.join(b,K);if(I(s,j))return j}else if(y)return b}},"resolveExtendsPath"),C=o((e,t)=>H(m.relative(e,t)),"pathRelative"),ge=["files","include","exclude"],pe=o((e,t,s)=>{const n=m.join(t,s),l=m.relative(e,n);return h(l)||"./"},"resolveAndRelativize"),Pe=o((e,t,s)=>{const n=m.relative(e,t);if(!n)return s;const l=s.startsWith("./")?s.slice(2):s;return h(`${n}/${l}`)},"prefixPattern"),Re=o((e,t,s,n)=>{const l=Ne(e,t,n);if(!l)throw new Error(`File '${e}' not found.`);if(s.has(l))throw new Error(`Circularity detected while resolving configuration: ${l}`);s.add(l);const i=m.dirname(l),r=me(l,n,s);delete r.references;const{compilerOptions:f}=r;if(f){const{baseUrl:u}=f;u&&!u.startsWith(L)&&(f.baseUrl=pe(t,i,u));const{outDir:g}=f;g&&!g.startsWith(L)&&(f.outDir=pe(t,i,g))}for(const u of ge){const g=r[u];g&&(r[u]=g.map(w=>w.startsWith(L)?w:Pe(t,i,w)))}return r},"resolveExtends"),We=["outDir","declarationDir"],me=o((e,t,s=new Set)=>{let n;try{n=ae(e,t)||{}}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const l=m.dirname(e);if(n.compilerOptions){const{compilerOptions:i}=n;i.paths&&!i.baseUrl&&(i[Y]=l)}if(n.extends){const i=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const r of i.reverse()){const f=Re(r,l,new Set(s),t),u={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(u.watchOptions={...f.watchOptions,...n.watchOptions}),n=u}}if(n.compilerOptions){const{compilerOptions:i}=n,r=["baseUrl","rootDir"];for(const f of r){const u=i[f];if(u&&!u.startsWith(L)){const g=m.resolve(l,u),w=C(l,g);i[f]=w}}for(const f of We){let u=i[f];u&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(u)||n.exclude.push(u),u.startsWith(L)||(u=H(u)),i[f]=u)}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(h),n.files&&delete n.files):n.files&&(n.files=n.files.map(i=>i.startsWith(L)?i:H(i))),n.watchOptions){const{watchOptions:i}=n;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(r=>h(m.resolve(l,r))))}return n},"_parseTsconfig"),V=o((e,t)=>{if(e.startsWith(L))return h(m.join(t,e.slice(L.length)))},"interpolateConfigDir"),Ve=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Me=o(e=>{var t,s,n,l,i,r,f,u,g,w,b,y,v,j,d,A,E,B,c,_,D,T,p,U;if(e.strict){const a=["noImplicitAny","noImplicitThis","strictNullChecks","strictFunctionTypes","strictBindCallApply","strictPropertyInitialization","strictBuiltinIteratorReturn","alwaysStrict","useUnknownInCatchVariables"];for(const N of a)e[N]===void 0&&(e[N]=!0)}if(e.target){let a=e.target.toLowerCase();a==="es2015"&&(a="es6"),e.target=a,a==="esnext"&&((t=e.module)!=null||(e.module="es6"),(s=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0)),(a==="es6"||a==="es2016"||a==="es2017"||a==="es2018"||a==="es2019"||a==="es2020"||a==="es2021"||a==="es2022"||a==="es2023"||a==="es2024")&&((n=e.module)!=null||(e.module="es6")),(a==="es2022"||a==="es2023"||a==="es2024")&&((l=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0))}if(e.module){let a=e.module.toLowerCase();a==="es2015"&&(a="es6"),e.module=a,(a==="es6"||a==="es2020"||a==="es2022"||a==="esnext"||a==="none"||a==="system"||a==="umd"||a==="amd")&&((i=e.moduleResolution)!=null||(e.moduleResolution="classic")),a==="system"&&((r=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),(a==="node16"||a==="nodenext"||a==="preserve")&&((f=e.esModuleInterop)!=null||(e.esModuleInterop=!0),(u=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),(a==="node16"||a==="nodenext")&&((g=e.moduleDetection)!=null||(e.moduleDetection="force"),(w=e.useDefineForClassFields)!=null||(e.useDefineForClassFields=!0)),a==="node16"&&((b=e.target)!=null||(e.target="es2022"),(y=e.moduleResolution)!=null||(e.moduleResolution="node16")),a==="nodenext"&&((v=e.target)!=null||(e.target="esnext"),(j=e.moduleResolution)!=null||(e.moduleResolution="nodenext")),a==="preserve"&&((d=e.moduleResolution)!=null||(e.moduleResolution="bundler"))}if(e.moduleResolution){let a=e.moduleResolution.toLowerCase();a==="node"&&(a="node10"),e.moduleResolution=a,(a==="node16"||a==="nodenext"||a==="bundler")&&((A=e.resolvePackageJsonExports)!=null||(e.resolvePackageJsonExports=!0),(E=e.resolvePackageJsonImports)!=null||(e.resolvePackageJsonImports=!0)),a==="bundler"&&((B=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0),(c=e.resolveJsonModule)!=null||(e.resolveJsonModule=!0))}e.esModuleInterop&&((_=e.allowSyntheticDefaultImports)!=null||(e.allowSyntheticDefaultImports=!0)),e.verbatimModuleSyntax&&((D=e.isolatedModules)!=null||(e.isolatedModules=!0),(T=e.preserveConstEnums)!=null||(e.preserveConstEnums=!0)),e.isolatedModules&&((p=e.preserveConstEnums)!=null||(e.preserveConstEnums=!0)),e.rewriteRelativeImportExtensions&&((U=e.allowImportingTsExtensions)!=null||(e.allowImportingTsExtensions=!0))},"normalizeCompilerOptions"),ke=o((e,t=new Map)=>{const s=m.resolve(e),n=me(s,t),l=m.dirname(s),{compilerOptions:i}=n;if(i){for(const f of Ve){const u=i[f];if(u){const g=V(u,l);i[f]=g?C(l,g):u}}for(const f of["rootDirs","typeRoots"]){const u=i[f];u&&(i[f]=u.map(g=>{const w=V(g,l);return w?C(l,w):g}))}const{paths:r}=i;if(r)for(const f of Object.keys(r))r[f]=r[f].map(u=>{var g;return(g=V(u,l))!=null?g:u});Me(i)}for(const r of ge){const f=n[r];f&&(n[r]=f.map(u=>{var g;return(g=V(u,l))!=null?g:u}))}return n},"parseTsconfig"),Je=o((e=process.cwd(),t="tsconfig.json",s=new Map)=>{const n=oe(h(e),t,s);if(!n)return null;const l=ke(n,s);return{path:n,config:l}},"getTsconfig"),Oe=/\*/g,we=o((e,t)=>{const s=e.match(Oe);if(s&&s.length>1)throw new Error(t)},"assertStarCount"),ze=o(e=>{if(e.includes("*")){const[t,s]=e.split("*");return{prefix:t,suffix:s}}return e},"parsePattern"),Ge=o(({prefix:e,suffix:t},s)=>s.startsWith(e)&&s.endsWith(t),"isPatternMatch"),Qe=o((e,t,s)=>Object.entries(e).map(([n,l])=>(we(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:ze(n),substitutions:l.map(i=>{if(we(i,`Substitution '${i}' in pattern '${n}' can have at most one '*' character.`),!t&&!Q.test(i))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return m.resolve(s,i)})})),"parsePaths"),He=o(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:s,paths:n}=t;if(!s&&!n)return null;const l=Y in t&&t[Y],i=m.resolve(m.dirname(e.path),s||l||"."),r=n?Qe(n,s,i):[];return f=>{if(Q.test(f))return[];const u=[];for(const y of r){if(y.pattern===f)return y.substitutions.map(h);typeof y.pattern!="string"&&u.push(y)}let g,w=-1;for(const y of u)Ge(y.pattern,f)&&y.pattern.prefix.length>w&&(w=y.pattern.prefix.length,g=y);if(!g)return s?[h(m.join(i,f))]:[];const b=f.slice(g.pattern.prefix.length,f.length-g.pattern.suffix.length);return g.substitutions.map(y=>h(y.replace("*",b)))}},"createPathsMatcher");var Xe=Object.defineProperty,M=o((e,t)=>Xe(e,"name",{value:t,configurable:!0}),"s");const be=M(e=>{let t="";for(let s=0;s<e.length;s+=1){const n=e[s],l=n.toUpperCase();t+=n===l?n.toLowerCase():l}return t},"invertCase"),ee=new Map,ve=M((e,t)=>{const s=Ie.join(e,`.is-fs-case-sensitive-test-${process.pid}`);try{return t.writeFileSync(s,""),!t.existsSync(be(s))}finally{try{t.unlinkSync(s)}catch{}}},"checkDirectoryCaseWithWrite"),Ye=M((e,t,s)=>{try{return ve(e,s)}catch(n){if(t===void 0)return ve(he.tmpdir(),s);throw n}},"checkDirectoryCaseWithFallback"),Ze=M((e,t=Ee,s=!0)=>{const n=e!=null?e:process.cwd();if(s&&ee.has(n))return ee.get(n);let l;const i=be(n);return i!==n&&t.existsSync(n)?l=!t.existsSync(i):l=Ye(n,e,t),s&&ee.set(n,l),l},"isFsCaseSensitive"),{join:J}=m.posix,ne={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},qe=o(e=>{const t=[...ne.ts],s=[...ne.cts],n=[...ne.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),s.push(".cjs"),n.push(".mjs")),[...t,...s,...n]},"getSupportedExtensions"),Ke=o(e=>{const t=[];if(!e)return t;const{outDir:s,declarationDir:n}=e;return s&&t.push(s),n&&t.push(n),t},"getDefaultExcludeSpec"),de=o(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),Ce=["node_modules","bower_components","jspm_packages"],te=`(?!(${Ce.join("|")})(/|$))`,en=/(?:^|\/)[^.*?]+$/,Te="**/*",O="[^/]",se="[^./]",Ae=process.platform==="win32",nn=o(({config:e,path:t},s=Ze())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!m.isAbsolute(t))throw new Error("The tsconfig path must be absolute");Ae&&(t=h(t));const n=m.dirname(t),{files:l,include:i,exclude:r,compilerOptions:f}=e,u=l==null?void 0:l.map(d=>J(n,d)),g=qe(f),w=s?"":"i",y=(r||Ke(f)).map(d=>{const A=J(n,d),E=de(A).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${O}*`).replaceAll(String.raw`\?`,O);return new RegExp(`^${E}($|/)`,w)}),v=l||i?i:[Te],j=v?v.map(d=>{let A=J(n,d);en.test(A)&&(A=J(A,Te));const E=de(A).replaceAll(String.raw`/\*\*`,`(/${te}${se}${O}*)*?`).replaceAll(/(\/)?\\\*/g,(B,c)=>{const _=`(${se}|(\\.(?!min\\.js$))?)*`;return c?`/${te}${se}${_}`:_}).replaceAll(/(\/)?\\\?/g,(B,c)=>{const _=O;return c?`/${te}${_}`:_});return new RegExp(`^${E}$`,w)}):void 0;return d=>{if(!m.isAbsolute(d))throw new Error("filePath must be absolute");if(Ae&&(d=h(d)),u!=null&&u.includes(d))return e;if(!(!g.some(A=>d.endsWith(A))||y.some(A=>A.test(d)))&&j&&j.some(A=>A.test(d)))return e}},"createFilesMatcher");export{nn as createFilesMatcher,He as createPathsMatcher,Je as getTsconfig,ke as parseTsconfig};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "get-tsconfig",
|
|
3
|
+
"version": "4.13.0",
|
|
4
|
+
"description": "Find and parse the tsconfig.json file from a directory path",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"get-tsconfig",
|
|
7
|
+
"get",
|
|
8
|
+
"typescript",
|
|
9
|
+
"tsconfig",
|
|
10
|
+
"tsconfig.json"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"repository": "privatenumber/get-tsconfig",
|
|
14
|
+
"funding": "https://github.com/privatenumber/get-tsconfig?sponsor=1",
|
|
15
|
+
"author": {
|
|
16
|
+
"name": "Hiroki Osame",
|
|
17
|
+
"email": "hiroki.osame@gmail.com"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"type": "module",
|
|
23
|
+
"main": "./dist/index.cjs",
|
|
24
|
+
"module": "./dist/index.mjs",
|
|
25
|
+
"types": "./dist/index.d.cts",
|
|
26
|
+
"exports": {
|
|
27
|
+
"require": {
|
|
28
|
+
"types": "./dist/index.d.cts",
|
|
29
|
+
"default": "./dist/index.cjs"
|
|
30
|
+
},
|
|
31
|
+
"import": {
|
|
32
|
+
"types": "./dist/index.d.mts",
|
|
33
|
+
"default": "./dist/index.mjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"imports": {
|
|
37
|
+
"#get-tsconfig": {
|
|
38
|
+
"types": "./src/index.ts",
|
|
39
|
+
"development": "./src/index.ts",
|
|
40
|
+
"default": "./dist/index.mjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"resolve-pkg-maps": "^1.0.0"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# resolve-pkg-maps
|
|
2
|
+
|
|
3
|
+
Utils to resolve `package.json` subpath & conditional [`exports`](https://nodejs.org/api/packages.html#exports)/[`imports`](https://nodejs.org/api/packages.html#imports) in resolvers.
|
|
4
|
+
|
|
5
|
+
Implements the [ESM resolution algorithm](https://nodejs.org/api/esm.html#resolver-algorithm-specification). Tested [against Node.js](/tests/) for accuracy.
|
|
6
|
+
|
|
7
|
+
<sub>Support this project by ⭐️ starring and sharing it. [Follow me](https://github.com/privatenumber) to see what other cool projects I'm working on! ❤️</sub>
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
### Resolving `exports`
|
|
12
|
+
|
|
13
|
+
_utils/package.json_
|
|
14
|
+
```json5
|
|
15
|
+
{
|
|
16
|
+
// ...
|
|
17
|
+
"exports": {
|
|
18
|
+
"./reverse": {
|
|
19
|
+
"require": "./file.cjs",
|
|
20
|
+
"default": "./file.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
// ...
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import { resolveExports } from 'resolve-pkg-maps'
|
|
29
|
+
|
|
30
|
+
const [packageName, packageSubpath] = parseRequest('utils/reverse')
|
|
31
|
+
|
|
32
|
+
const resolvedPaths: string[] = resolveExports(
|
|
33
|
+
getPackageJson(packageName).exports,
|
|
34
|
+
packageSubpath,
|
|
35
|
+
['import', ...otherConditions]
|
|
36
|
+
)
|
|
37
|
+
// => ['./file.mjs']
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Resolving `imports`
|
|
41
|
+
|
|
42
|
+
_package.json_
|
|
43
|
+
```json5
|
|
44
|
+
{
|
|
45
|
+
// ...
|
|
46
|
+
"imports": {
|
|
47
|
+
"#supports-color": {
|
|
48
|
+
"node": "./index.js",
|
|
49
|
+
"default": "./browser.js"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
// ...
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
```ts
|
|
57
|
+
import { resolveImports } from 'resolve-pkg-maps'
|
|
58
|
+
|
|
59
|
+
const resolvedPaths: string[] = resolveImports(
|
|
60
|
+
getPackageJson('.').imports,
|
|
61
|
+
'#supports-color',
|
|
62
|
+
['node', ...otherConditions]
|
|
63
|
+
)
|
|
64
|
+
// => ['./index.js']
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## API
|
|
68
|
+
|
|
69
|
+
### resolveExports(exports, request, conditions)
|
|
70
|
+
|
|
71
|
+
Returns: `string[]`
|
|
72
|
+
|
|
73
|
+
Resolves the `request` based on `exports` and `conditions`. Returns an array of paths (e.g. in case a fallback array is matched).
|
|
74
|
+
|
|
75
|
+
#### exports
|
|
76
|
+
|
|
77
|
+
Type:
|
|
78
|
+
```ts
|
|
79
|
+
type Exports = PathOrMap | readonly PathOrMap[]
|
|
80
|
+
|
|
81
|
+
type PathOrMap = string | PathConditionsMap
|
|
82
|
+
|
|
83
|
+
type PathConditionsMap = {
|
|
84
|
+
[condition: string]: PathConditions | null
|
|
85
|
+
}
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
The [`exports` property](https://nodejs.org/api/packages.html#exports) value in `package.json`.
|
|
89
|
+
|
|
90
|
+
#### request
|
|
91
|
+
|
|
92
|
+
Type: `string`
|
|
93
|
+
|
|
94
|
+
The package subpath to resolve. Assumes a normalized path is passed in (eg. [repeating slashes `//`](https://github.com/nodejs/node/issues/44316)).
|
|
95
|
+
|
|
96
|
+
It _should not_ start with `/` or `./`.
|
|
97
|
+
|
|
98
|
+
Example: if the full import path is `some-package/subpath/file`, the request is `subpath/file`.
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
#### conditions
|
|
102
|
+
|
|
103
|
+
Type: `readonly string[]`
|
|
104
|
+
|
|
105
|
+
An array of conditions to use when resolving the request. For reference, Node.js's default conditions are [`['node', 'import']`](https://nodejs.org/api/esm.html#:~:text=defaultConditions%20is%20the%20conditional%20environment%20name%20array%2C%20%5B%22node%22%2C%20%22import%22%5D.).
|
|
106
|
+
|
|
107
|
+
The order of this array does not matter; the order of condition keys in the export map is what matters instead.
|
|
108
|
+
|
|
109
|
+
Not all conditions in the array need to be met to resolve the request. It just needs enough to resolve to a path.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### resolveImports(imports, request, conditions)
|
|
114
|
+
|
|
115
|
+
Returns: `string[]`
|
|
116
|
+
|
|
117
|
+
Resolves the `request` based on `imports` and `conditions`. Returns an array of paths (e.g. in case a fallback array is matched).
|
|
118
|
+
|
|
119
|
+
#### imports
|
|
120
|
+
|
|
121
|
+
Type:
|
|
122
|
+
```ts
|
|
123
|
+
type Imports = {
|
|
124
|
+
[condition: string]: PathOrMap | readonly PathOrMap[] | null
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
type PathOrMap = string | Imports
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
The [`imports` property](https://nodejs.org/api/packages.html#imports) value in `package.json`.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
#### request
|
|
134
|
+
|
|
135
|
+
Type: `string`
|
|
136
|
+
|
|
137
|
+
The request resolve. Assumes a normalized path is passed in (eg. [repeating slashes `//`](https://github.com/nodejs/node/issues/44316)).
|
|
138
|
+
|
|
139
|
+
> **Note:** In Node.js, imports resolutions are limited to requests prefixed with `#`. However, this package does not enforce that requirement in case you want to add custom support for non-prefixed entries.
|
|
140
|
+
|
|
141
|
+
#### conditions
|
|
142
|
+
|
|
143
|
+
Type: `readonly string[]`
|
|
144
|
+
|
|
145
|
+
An array of conditions to use when resolving the request. For reference, Node.js's default conditions are [`['node', 'import']`](https://nodejs.org/api/esm.html#:~:text=defaultConditions%20is%20the%20conditional%20environment%20name%20array%2C%20%5B%22node%22%2C%20%22import%22%5D.).
|
|
146
|
+
|
|
147
|
+
The order of this array does not matter; the order of condition keys in the import map is what matters instead.
|
|
148
|
+
|
|
149
|
+
Not all conditions in the array need to be met to resolve the request. It just needs enough to resolve to a path.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Errors
|
|
154
|
+
|
|
155
|
+
#### `ERR_PACKAGE_PATH_NOT_EXPORTED`
|
|
156
|
+
- If the request is not exported by the export map
|
|
157
|
+
|
|
158
|
+
#### `ERR_PACKAGE_IMPORT_NOT_DEFINED`
|
|
159
|
+
- If the request is not defined by the import map
|
|
160
|
+
|
|
161
|
+
#### `ERR_INVALID_PACKAGE_CONFIG`
|
|
162
|
+
|
|
163
|
+
- If an object contains properties that are both paths and conditions (e.g. start with and without `.`)
|
|
164
|
+
- If an object contains numeric properties
|
|
165
|
+
|
|
166
|
+
#### `ERR_INVALID_PACKAGE_TARGET`
|
|
167
|
+
- If a resolved exports path is not a valid path (e.g. not relative or has protocol)
|
|
168
|
+
- If a resolved path includes `..` or `node_modules`
|
|
169
|
+
- If a resolved path is a type that cannot be parsed
|
|
170
|
+
|
|
171
|
+
## FAQ
|
|
172
|
+
|
|
173
|
+
### Why do the APIs return an array of paths?
|
|
174
|
+
|
|
175
|
+
`exports`/`imports` supports passing in a [fallback array](https://github.com/jkrems/proposal-pkg-exports/#:~:text=Whenever%20there%20is,to%20new%20cases.) to provide fallback paths if the previous one is invalid:
|
|
176
|
+
|
|
177
|
+
```json5
|
|
178
|
+
{
|
|
179
|
+
"exports": {
|
|
180
|
+
"./feature": [
|
|
181
|
+
"./file.js",
|
|
182
|
+
"./fallback.js"
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Node.js's implementation [picks the first valid path (without attempting to resolve it)](https://github.com/nodejs/node/issues/44282#issuecomment-1220151715) and throws an error if it can't be resolved. Node.js's fallback array is designed for [forward compatibility with features](https://github.com/jkrems/proposal-pkg-exports/#:~:text=providing%20forwards%20compatiblitiy%20for%20new%20features) (e.g. protocols) that can be immediately/inexpensively validated:
|
|
189
|
+
|
|
190
|
+
```json5
|
|
191
|
+
{
|
|
192
|
+
"exports": {
|
|
193
|
+
"./core-polyfill": ["std:core-module", "./core-polyfill.js"]
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
However, [Webpack](https://webpack.js.org/guides/package-exports/#alternatives) and [TypeScript](https://github.com/microsoft/TypeScript/blob/71e852922888337ef51a0e48416034a94a6c34d9/src/compiler/moduleSpecifiers.ts#L695) have deviated from this behavior and attempts to resolve the next path if a path cannot be resolved.
|
|
199
|
+
|
|
200
|
+
By returning an array of matched paths instead of just the first one, the user can decide which behavior to adopt.
|
|
201
|
+
|
|
202
|
+
### How is it different from [`resolve.exports`](https://github.com/lukeed/resolve.exports)?
|
|
203
|
+
|
|
204
|
+
`resolve.exports` only resolves `exports`, whereas this package resolves both `exports` & `imports`. This comparison will only cover resolving `exports`.
|
|
205
|
+
|
|
206
|
+
- Despite it's name, `resolve.exports` handles more than just `exports`. It takes in the entire `package.json` object to handle resolving `.` and [self-references](https://nodejs.org/api/packages.html#self-referencing-a-package-using-its-name). This package only accepts `exports`/`imports` maps from `package.json` and is scoped to only resolving what's defined in the maps.
|
|
207
|
+
|
|
208
|
+
- `resolve.exports` accepts the full request (e.g. `foo/bar`), whereas this package only accepts the requested subpath (e.g. `bar`).
|
|
209
|
+
|
|
210
|
+
- `resolve.exports` only returns the first result in a fallback array. This package returns an array of results for the user to decide how to handle it.
|
|
211
|
+
|
|
212
|
+
- `resolve.exports` supports [subpath folder mapping](https://nodejs.org/docs/latest-v16.x/api/packages.html#subpath-folder-mappings) (deprecated in Node.js v16 & removed in v17) but seems to [have a bug](https://github.com/lukeed/resolve.exports/issues/7). This package does not support subpath folder mapping because Node.js has removed it in favor of using subpath patterns.
|
|
213
|
+
|
|
214
|
+
- Neither resolvers rely on a file-system
|
|
215
|
+
|
|
216
|
+
This package also addresses many of the bugs in `resolve.exports`, demonstrated in [this test](/tests/exports/compare-resolve.exports.ts).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const d=r=>r!==null&&typeof r=="object",s=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),g="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",P="ERR_PACKAGE_IMPORT_NOT_DEFINED",R=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,u=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,n,o,c)=>{if(t==null)return[];if(typeof t=="string"){const[e,...i]=t.split(u);if(e===".."||i.some(l=>O.test(l)))throw s(E,`Invalid "${r}" target "${t}" defined in the package config`);return[c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(e=>f(r,e,n,o,c));if(d(t)){for(const e of Object.keys(t)){if(R.test(e))throw s(g,"Cannot contain numeric property keys");if(e==="default"||o.includes(e))return f(r,t[e],n,o,c)}return[]}throw s(E,`Invalid "${r}" target "${t}"`)},a="*",v=(r,t)=>{const n=r.indexOf(a),o=t.indexOf(a);return n===o?t.length>r.length:o>n};function A(r,t){if(!t.includes(a)&&r.hasOwnProperty(t))return[t];let n,o;for(const c of Object.keys(r))if(c.includes(a)){const[e,i,l]=c.split(a);if(l===void 0&&t.startsWith(e)&&t.endsWith(i)){const _=t.slice(e.length,-i.length||void 0);_&&(!n||v(n,c))&&(n=c,o=_)}}return[n,o]}const p=r=>Object.keys(r).reduce((t,n)=>{const o=n===""||n[0]!==".";if(t===void 0||t===o)return o;throw s(g,'"exports" cannot contain some keys starting with "." and some not')},void 0),w=/^\w+:/,m=(r,t,n)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||d(r)&&p(r))&&(r={".":r});const[o,c]=A(r,t),e=f(h.Export,r[o],t,n,c);if(e.length===0)throw s(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of e)if(!i.startsWith("./")&&!w.test(i))throw s(E,`Invalid "exports" target "${i}" defined in the package config`);return e},T=(r,t,n)=>{if(!r)throw new Error('"imports" is required');const[o,c]=A(r,t),e=f(h.Import,r[o],t,n,c);if(e.length===0)throw s(P,`Package import specifier "${t}" is not defined in package`);return e};exports.resolveExports=m,exports.resolveImports=T;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type PathConditionsMap = {
|
|
2
|
+
[condition: string]: PathConditions | null;
|
|
3
|
+
};
|
|
4
|
+
type PathOrMap = string | PathConditionsMap;
|
|
5
|
+
type PathConditions = PathOrMap | readonly PathOrMap[];
|
|
6
|
+
|
|
7
|
+
declare const resolveExports: (exports: PathConditions, request: string, conditions: readonly string[]) => string[];
|
|
8
|
+
|
|
9
|
+
declare const resolveImports: (imports: PathConditionsMap, request: string, conditions: readonly string[]) => string[];
|
|
10
|
+
|
|
11
|
+
export { PathConditions, PathConditionsMap, resolveExports, resolveImports };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type PathConditionsMap = {
|
|
2
|
+
[condition: string]: PathConditions | null;
|
|
3
|
+
};
|
|
4
|
+
type PathOrMap = string | PathConditionsMap;
|
|
5
|
+
type PathConditions = PathOrMap | readonly PathOrMap[];
|
|
6
|
+
|
|
7
|
+
declare const resolveExports: (exports: PathConditions, request: string, conditions: readonly string[]) => string[];
|
|
8
|
+
|
|
9
|
+
declare const resolveImports: (imports: PathConditionsMap, request: string, conditions: readonly string[]) => string[];
|
|
10
|
+
|
|
11
|
+
export { PathConditions, PathConditionsMap, resolveExports, resolveImports };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",P="ERR_PACKAGE_IMPORT_NOT_DEFINED",R=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,w=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,e,o,c)=>{if(t==null)return[];if(typeof t=="string"){const[n,...i]=t.split(w);if(n===".."||i.some(l=>O.test(l)))throw a(E,`Invalid "${r}" target "${t}" defined in the package config`);return[c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(n=>f(r,n,e,o,c));if(A(t)){for(const n of Object.keys(t)){if(R.test(n))throw a(_,"Cannot contain numeric property keys");if(n==="default"||o.includes(n))return f(r,t[n],e,o,c)}return[]}throw a(E,`Invalid "${r}" target "${t}"`)},s="*",m=(r,t)=>{const e=r.indexOf(s),o=t.indexOf(s);return e===o?t.length>r.length:o>e};function d(r,t){if(!t.includes(s)&&r.hasOwnProperty(t))return[t];let e,o;for(const c of Object.keys(r))if(c.includes(s)){const[n,i,l]=c.split(s);if(l===void 0&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||void 0);g&&(!e||m(e,c))&&(e=c,o=g)}}return[e,o]}const p=r=>Object.keys(r).reduce((t,e)=>{const o=e===""||e[0]!==".";if(t===void 0||t===o)return o;throw a(_,'"exports" cannot contain some keys starting with "." and some not')},void 0),u=/^\w+:/,v=(r,t,e)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||A(r)&&p(r))&&(r={".":r});const[o,c]=d(r,t),n=f(h.Export,r[o],t,e,c);if(n.length===0)throw a(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u.test(i))throw a(E,`Invalid "exports" target "${i}" defined in the package config`);return n},T=(r,t,e)=>{if(!r)throw new Error('"imports" is required');const[o,c]=d(r,t),n=f(h.Import,r[o],t,e,c);if(n.length===0)throw a(P,`Package import specifier "${t}" is not defined in package`);return n};export{v as resolveExports,T as resolveImports};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "resolve-pkg-maps",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Resolve package.json exports & imports maps",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"node.js",
|
|
7
|
+
"package.json",
|
|
8
|
+
"exports",
|
|
9
|
+
"imports"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"repository": "privatenumber/resolve-pkg-maps",
|
|
13
|
+
"funding": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1",
|
|
14
|
+
"author": {
|
|
15
|
+
"name": "Hiroki Osame",
|
|
16
|
+
"email": "hiroki.osame@gmail.com"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist"
|
|
21
|
+
],
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"module": "./dist/index.mjs",
|
|
24
|
+
"types": "./dist/index.d.cts",
|
|
25
|
+
"exports": {
|
|
26
|
+
"require": {
|
|
27
|
+
"types": "./dist/index.d.cts",
|
|
28
|
+
"default": "./dist/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/index.d.mts",
|
|
32
|
+
"default": "./dist/index.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"imports": {
|
|
36
|
+
"#resolve-pkg-maps": {
|
|
37
|
+
"types": "./src/index.ts",
|
|
38
|
+
"development": "./src/index.ts",
|
|
39
|
+
"default": "./dist/index.mjs"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<br>
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
|
|
5
|
+
<img width="160" alt="tsx" src=".github/logo-light.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
<br><br>
|
|
8
|
+
<a href="https://npm.im/tsx"><img src="https://badgen.net/npm/v/tsx"></a> <a href="https://npm.im/tsx"><img src="https://badgen.net/npm/dm/tsx"></a>
|
|
9
|
+
</h1>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
TypeScript Execute (tsx): The easiest way to run TypeScript in Node.js
|
|
13
|
+
<br><br>
|
|
14
|
+
<a href="https://tsx.is">Documentation</a> | <a href="https://tsx.is/getting-started">Getting started →</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<br>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=398771"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/donate.webp"></a>
|
|
21
|
+
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=416984"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
|
|
22
|
+
</p>
|
|
23
|
+
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/tsx">Development repo</a>!</sup></p>
|
|
24
|
+
|
|
25
|
+
## Sponsors
|
|
26
|
+
|
|
27
|
+
<p align="center">
|
|
28
|
+
<a href="https://github.com/sponsors/privatenumber">
|
|
29
|
+
<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
|
|
30
|
+
</a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";require("../../get-pipe-path-BoR10qr8.cjs");var r=require("../../register-D46fvsV_.cjs"),e=require("../../require-D4F1Lv60.cjs");require("module"),require("node:path"),require("../../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("../../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../../index-BWFBUo6r.cjs"),exports.register=r.register,exports.require=e.tsxRequire;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
|
|
2
|
+
|
|
3
|
+
type RegisterOptions = {
|
|
4
|
+
namespace?: string;
|
|
5
|
+
};
|
|
6
|
+
type Unregister = () => void;
|
|
7
|
+
type ScopedRequire = (id: string, fromFile: string | URL) => any;
|
|
8
|
+
type ScopedResolve = (id: string, fromFile: string | URL, resolveOptions?: {
|
|
9
|
+
paths?: string[] | undefined;
|
|
10
|
+
}) => string;
|
|
11
|
+
type NamespacedUnregister = Unregister & {
|
|
12
|
+
require: ScopedRequire;
|
|
13
|
+
resolve: ScopedResolve;
|
|
14
|
+
unregister: Unregister;
|
|
15
|
+
};
|
|
16
|
+
type Register = {
|
|
17
|
+
(options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
|
|
18
|
+
(options?: RegisterOptions): Unregister;
|
|
19
|
+
};
|
|
20
|
+
declare const register: Register;
|
|
21
|
+
|
|
22
|
+
declare const tsxRequire: {
|
|
23
|
+
(id: string, fromFile: string | URL): any;
|
|
24
|
+
resolve: {
|
|
25
|
+
(id: string, fromFile: string | URL, options?: {
|
|
26
|
+
paths?: string[] | undefined;
|
|
27
|
+
}): string;
|
|
28
|
+
paths: (request: string) => string[] | null;
|
|
29
|
+
};
|
|
30
|
+
main: NodeJS.Module | undefined;
|
|
31
|
+
extensions: NodeJS.RequireExtensions;
|
|
32
|
+
cache: NodeJS.Dict<NodeJS.Module>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { register, tsxRequire as require };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
|
|
2
|
+
|
|
3
|
+
type RegisterOptions = {
|
|
4
|
+
namespace?: string;
|
|
5
|
+
};
|
|
6
|
+
type Unregister = () => void;
|
|
7
|
+
type ScopedRequire = (id: string, fromFile: string | URL) => any;
|
|
8
|
+
type ScopedResolve = (id: string, fromFile: string | URL, resolveOptions?: {
|
|
9
|
+
paths?: string[] | undefined;
|
|
10
|
+
}) => string;
|
|
11
|
+
type NamespacedUnregister = Unregister & {
|
|
12
|
+
require: ScopedRequire;
|
|
13
|
+
resolve: ScopedResolve;
|
|
14
|
+
unregister: Unregister;
|
|
15
|
+
};
|
|
16
|
+
type Register = {
|
|
17
|
+
(options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
|
|
18
|
+
(options?: RegisterOptions): Unregister;
|
|
19
|
+
};
|
|
20
|
+
declare const register: Register;
|
|
21
|
+
|
|
22
|
+
declare const tsxRequire: {
|
|
23
|
+
(id: string, fromFile: string | URL): any;
|
|
24
|
+
resolve: {
|
|
25
|
+
(id: string, fromFile: string | URL, options?: {
|
|
26
|
+
paths?: string[] | undefined;
|
|
27
|
+
}): string;
|
|
28
|
+
paths: (request: string) => string[] | null;
|
|
29
|
+
};
|
|
30
|
+
main: NodeJS.Module | undefined;
|
|
31
|
+
extensions: NodeJS.RequireExtensions;
|
|
32
|
+
cache: NodeJS.Dict<NodeJS.Module>;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export { register, tsxRequire as require };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"../../get-pipe-path-BHW2eJdv.mjs";import{r as j}from"../../register-CFH5oNdT.mjs";import{t as l}from"../../require-DQxpCAr4.mjs";import"module";import"node:path";import"../../temporary-directory-CwHp0_NW.mjs";import"node:os";import"node:module";import"node:url";import"get-tsconfig";import"node:fs";import"../../index-7AaEi15b.mjs";import"esbuild";import"node:crypto";import"../../client-BQVF1NaW.mjs";import"node:net";import"node:util";import"../../index-gbaejti9.mjs";export{j as register,l as require};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var r=require("../register-D46fvsV_.cjs");require("../get-pipe-path-BoR10qr8.cjs"),require("module"),require("node:path"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("get-tsconfig"),require("node:fs"),require("../index-gckBtVBf.cjs"),require("esbuild"),require("node:crypto"),require("../client-D6NvIMSC.cjs"),require("node:net"),require("node:util"),require("../index-BWFBUo6r.cjs"),r.register();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r}from"../register-CFH5oNdT.mjs";import"../get-pipe-path-BHW2eJdv.mjs";import"module";import"node:path";import"../temporary-directory-CwHp0_NW.mjs";import"node:os";import"node:module";import"node:url";import"get-tsconfig";import"node:fs";import"../index-7AaEi15b.mjs";import"esbuild";import"node:crypto";import"../client-BQVF1NaW.mjs";import"node:net";import"node:util";import"../index-gbaejti9.mjs";r();
|