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,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "esbuild",
|
|
3
|
+
"version": "0.27.2",
|
|
4
|
+
"description": "An extremely fast JavaScript and CSS bundler and minifier.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/evanw/esbuild.git"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"postinstall": "node install.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "lib/main.js",
|
|
13
|
+
"types": "lib/main.d.ts",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"esbuild": "bin/esbuild"
|
|
19
|
+
},
|
|
20
|
+
"optionalDependencies": {
|
|
21
|
+
"@esbuild/aix-ppc64": "0.27.2",
|
|
22
|
+
"@esbuild/android-arm": "0.27.2",
|
|
23
|
+
"@esbuild/android-arm64": "0.27.2",
|
|
24
|
+
"@esbuild/android-x64": "0.27.2",
|
|
25
|
+
"@esbuild/darwin-arm64": "0.27.2",
|
|
26
|
+
"@esbuild/darwin-x64": "0.27.2",
|
|
27
|
+
"@esbuild/freebsd-arm64": "0.27.2",
|
|
28
|
+
"@esbuild/freebsd-x64": "0.27.2",
|
|
29
|
+
"@esbuild/linux-arm": "0.27.2",
|
|
30
|
+
"@esbuild/linux-arm64": "0.27.2",
|
|
31
|
+
"@esbuild/linux-ia32": "0.27.2",
|
|
32
|
+
"@esbuild/linux-loong64": "0.27.2",
|
|
33
|
+
"@esbuild/linux-mips64el": "0.27.2",
|
|
34
|
+
"@esbuild/linux-ppc64": "0.27.2",
|
|
35
|
+
"@esbuild/linux-riscv64": "0.27.2",
|
|
36
|
+
"@esbuild/linux-s390x": "0.27.2",
|
|
37
|
+
"@esbuild/linux-x64": "0.27.2",
|
|
38
|
+
"@esbuild/netbsd-arm64": "0.27.2",
|
|
39
|
+
"@esbuild/netbsd-x64": "0.27.2",
|
|
40
|
+
"@esbuild/openbsd-arm64": "0.27.2",
|
|
41
|
+
"@esbuild/openbsd-x64": "0.27.2",
|
|
42
|
+
"@esbuild/openharmony-arm64": "0.27.2",
|
|
43
|
+
"@esbuild/sunos-x64": "0.27.2",
|
|
44
|
+
"@esbuild/win32-arm64": "0.27.2",
|
|
45
|
+
"@esbuild/win32-ia32": "0.27.2",
|
|
46
|
+
"@esbuild/win32-x64": "0.27.2"
|
|
47
|
+
},
|
|
48
|
+
"license": "MIT"
|
|
49
|
+
}
|
|
@@ -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,235 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img width="160" src=".github/logo.webp">
|
|
3
|
+
</p>
|
|
4
|
+
<h1 align="center">
|
|
5
|
+
<sup>get-tsconfig</sup>
|
|
6
|
+
<br>
|
|
7
|
+
<a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/v/get-tsconfig"></a> <a href="https://npm.im/get-tsconfig"><img src="https://badgen.net/npm/dm/get-tsconfig"></a>
|
|
8
|
+
</h1>
|
|
9
|
+
|
|
10
|
+
Find and parse `tsconfig.json` files.
|
|
11
|
+
|
|
12
|
+
### Features
|
|
13
|
+
- Zero dependency (not even TypeScript)
|
|
14
|
+
- Tested against TypeScript for correctness
|
|
15
|
+
- Supports comments & dangling commas in `tsconfig.json`
|
|
16
|
+
- Resolves [`extends`](https://www.typescriptlang.org/tsconfig/#extends)
|
|
17
|
+
- Fully typed `tsconfig.json`
|
|
18
|
+
- Validates and throws parsing errors
|
|
19
|
+
- Tiny! `7 kB` Minified + Gzipped
|
|
20
|
+
|
|
21
|
+
<br>
|
|
22
|
+
|
|
23
|
+
<p align="center">
|
|
24
|
+
<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>
|
|
25
|
+
<a href="https://github.com/sponsors/privatenumber/sponsorships?tier_id=397608"><img width="412" src="https://raw.githubusercontent.com/privatenumber/sponsors/master/banners/assets/sponsor.webp"></a>
|
|
26
|
+
</p>
|
|
27
|
+
<p align="center"><sup><i>Already a sponsor?</i> Join the discussion in the <a href="https://github.com/pvtnbr/get-tsconfig">Development repo</a>!</sup></p>
|
|
28
|
+
|
|
29
|
+
## Install
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
npm install get-tsconfig
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Why?
|
|
36
|
+
For TypeScript related tooling to correctly parse `tsconfig.json` file without depending on TypeScript.
|
|
37
|
+
|
|
38
|
+
## API
|
|
39
|
+
|
|
40
|
+
### getTsconfig(searchPath?, configName?, cache?)
|
|
41
|
+
|
|
42
|
+
Searches for a tsconfig file (defaults to `tsconfig.json`) in the `searchPath` and parses it. (If you already know the tsconfig path, use [`parseTsconfig`](#parsetsconfigtsconfigpath-cache) instead). Returns `null` if a config file cannot be found, or an object containing the path and parsed TSConfig object if found.
|
|
43
|
+
|
|
44
|
+
Returns:
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
type TsconfigResult = {
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The path to the tsconfig.json file
|
|
51
|
+
*/
|
|
52
|
+
path: string
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The resolved tsconfig.json file
|
|
56
|
+
*/
|
|
57
|
+
config: TsConfigJsonResolved
|
|
58
|
+
}
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
#### searchPath
|
|
62
|
+
Type: `string`
|
|
63
|
+
|
|
64
|
+
Default: `process.cwd()`
|
|
65
|
+
|
|
66
|
+
Accepts a path to a file or directory to search up for a `tsconfig.json` file.
|
|
67
|
+
|
|
68
|
+
#### configName
|
|
69
|
+
Type: `string`
|
|
70
|
+
|
|
71
|
+
Default: `tsconfig.json`
|
|
72
|
+
|
|
73
|
+
The file name of the TypeScript config file.
|
|
74
|
+
|
|
75
|
+
#### cache
|
|
76
|
+
Type: `Map<string, any>`
|
|
77
|
+
|
|
78
|
+
Default: `new Map()`
|
|
79
|
+
|
|
80
|
+
Optional cache for fs operations.
|
|
81
|
+
|
|
82
|
+
#### Example
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import { getTsconfig } from 'get-tsconfig'
|
|
86
|
+
|
|
87
|
+
// Searches for tsconfig.json starting in the current directory
|
|
88
|
+
console.log(getTsconfig())
|
|
89
|
+
|
|
90
|
+
// Find tsconfig.json from a TypeScript file path
|
|
91
|
+
console.log(getTsconfig('./path/to/index.ts'))
|
|
92
|
+
|
|
93
|
+
// Find tsconfig.json from a directory file path
|
|
94
|
+
console.log(getTsconfig('./path/to/directory'))
|
|
95
|
+
|
|
96
|
+
// Explicitly pass in tsconfig.json path
|
|
97
|
+
console.log(getTsconfig('./path/to/tsconfig.json'))
|
|
98
|
+
|
|
99
|
+
// Search for jsconfig.json - https://code.visualstudio.com/docs/languages/jsconfig
|
|
100
|
+
console.log(getTsconfig('.', 'jsconfig.json'))
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
### parseTsconfig(tsconfigPath, cache?)
|
|
106
|
+
|
|
107
|
+
Parse the tsconfig file provided. Used internally by `getTsconfig`. Returns the parsed tsconfig as `TsConfigJsonResolved`.
|
|
108
|
+
|
|
109
|
+
#### tsconfigPath
|
|
110
|
+
Type: `string`
|
|
111
|
+
|
|
112
|
+
Required path to the tsconfig file.
|
|
113
|
+
|
|
114
|
+
#### cache
|
|
115
|
+
Type: `Map<string, any>`
|
|
116
|
+
|
|
117
|
+
Default: `new Map()`
|
|
118
|
+
|
|
119
|
+
Optional cache for fs operations.
|
|
120
|
+
|
|
121
|
+
#### Example
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { parseTsconfig } from 'get-tsconfig'
|
|
125
|
+
|
|
126
|
+
// Must pass in a path to an existing tsconfig.json file
|
|
127
|
+
console.log(parseTsconfig('./path/to/tsconfig.custom.json'))
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### createFileMatcher(tsconfig: TsconfigResult, caseSensitivePaths?: boolean)
|
|
133
|
+
|
|
134
|
+
Given a `tsconfig.json` file, it returns a file-matcher function that determines whether it should apply to a file path.
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
type FileMatcher = (filePath: string) => TsconfigResult['config'] | undefined
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
#### tsconfig
|
|
141
|
+
Type: `TsconfigResult`
|
|
142
|
+
|
|
143
|
+
Pass in the return value from `getTsconfig`, or a `TsconfigResult` object.
|
|
144
|
+
|
|
145
|
+
#### caseSensitivePaths
|
|
146
|
+
Type: `boolean`
|
|
147
|
+
|
|
148
|
+
By default, it uses [`is-fs-case-sensitive`](https://github.com/privatenumber/is-fs-case-sensitive) to detect whether the file-system is case-sensitive.
|
|
149
|
+
|
|
150
|
+
Pass in `true` to make it case-sensitive.
|
|
151
|
+
|
|
152
|
+
#### Example
|
|
153
|
+
|
|
154
|
+
For example, if it's called with a `tsconfig.json` file that has `include`/`exclude`/`files` defined, the file-matcher will return the config for files that match `include`/`files`, and return `undefined` for files that don't match or match `exclude`.
|
|
155
|
+
|
|
156
|
+
```ts
|
|
157
|
+
const tsconfig = getTsconfig()
|
|
158
|
+
const fileMatcher = tsconfig && createFileMatcher(tsconfig)
|
|
159
|
+
|
|
160
|
+
/*
|
|
161
|
+
* Returns tsconfig.json if it matches the file,
|
|
162
|
+
* undefined if not
|
|
163
|
+
*/
|
|
164
|
+
const configForFile = fileMatcher?.('/path/to/file.ts')
|
|
165
|
+
const distCode = compileTypescript({
|
|
166
|
+
code: sourceCode,
|
|
167
|
+
tsconfig: configForFile
|
|
168
|
+
})
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### createPathsMatcher(tsconfig: TsconfigResult)
|
|
174
|
+
|
|
175
|
+
Given a tsconfig with [`compilerOptions.paths`](https://www.typescriptlang.org/tsconfig#paths) defined, it returns a matcher function.
|
|
176
|
+
|
|
177
|
+
The matcher function accepts an [import specifier (the path to resolve)](https://nodejs.org/api/esm.html#terminology), checks it against `compilerOptions.paths`, and returns an array of possible paths to check:
|
|
178
|
+
```ts
|
|
179
|
+
function pathsMatcher(specifier: string): string[]
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
This function only returns possible paths and doesn't actually do any resolution. This helps increase compatibility wtih file/build systems which usually have their own resolvers.
|
|
183
|
+
|
|
184
|
+
#### Example
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import { getTsconfig, createPathsMatcher } from 'get-tsconfig'
|
|
188
|
+
|
|
189
|
+
const tsconfig = getTsconfig()
|
|
190
|
+
const pathsMatcher = createPathsMatcher(tsconfig)
|
|
191
|
+
|
|
192
|
+
const exampleResolver = (request: string) => {
|
|
193
|
+
if (pathsMatcher) {
|
|
194
|
+
const tryPaths = pathsMatcher(request)
|
|
195
|
+
|
|
196
|
+
// Check if paths in `tryPaths` exist
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## FAQ
|
|
202
|
+
|
|
203
|
+
### How can I use TypeScript to parse `tsconfig.json`?
|
|
204
|
+
This package is a re-implementation of TypeScript's `tsconfig.json` parser.
|
|
205
|
+
|
|
206
|
+
However, if you already have TypeScript as a dependency, you can simply use it's API:
|
|
207
|
+
|
|
208
|
+
```ts
|
|
209
|
+
import {
|
|
210
|
+
sys as tsSys,
|
|
211
|
+
findConfigFile,
|
|
212
|
+
readConfigFile,
|
|
213
|
+
parseJsonConfigFileContent
|
|
214
|
+
} from 'typescript'
|
|
215
|
+
|
|
216
|
+
// Find tsconfig.json file
|
|
217
|
+
const tsconfigPath = findConfigFile(process.cwd(), tsSys.fileExists, 'tsconfig.json')
|
|
218
|
+
|
|
219
|
+
// Read tsconfig.json file
|
|
220
|
+
const tsconfigFile = readConfigFile(tsconfigPath, tsSys.readFile)
|
|
221
|
+
|
|
222
|
+
// Resolve extends
|
|
223
|
+
const parsedTsconfig = parseJsonConfigFileContent(
|
|
224
|
+
tsconfigFile.config,
|
|
225
|
+
tsSys,
|
|
226
|
+
path.dirname(tsconfigPath)
|
|
227
|
+
)
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Sponsors
|
|
231
|
+
<p align="center">
|
|
232
|
+
<a href="https://github.com/sponsors/privatenumber">
|
|
233
|
+
<img src="https://cdn.jsdelivr.net/gh/privatenumber/sponsors/sponsorkit/sponsors.svg">
|
|
234
|
+
</a>
|
|
235
|
+
</p>
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";var je=Object.defineProperty;var o=(e,t)=>je(e,"name",{value:t,configurable:!0});var m=require("node:path"),ie=require("node:fs"),Fe=require("node:module"),De=require("resolve-pkg-maps"),he=require("fs"),Ee=require("os"),Ie=require("path");function E(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}o(E,"slash");const q=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=q("existsSync"),Be=q("readFileSync"),R=q("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"),G=/^\.{1,2}(\/.*)?$/,Q=o(e=>{const t=E(e);return G.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(H(c)){do n++,l+=String.fromCharCode(c),c=e.charCodeAt(n);while(H(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&&h(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 h(c){if(H(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(h,"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 H(e){return e===32||e===9}o(H,"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 U=200;new Array(U).fill(0).map((e,t)=>`
|
|
4
|
+
`+" ".repeat(t)),new Array(U).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(U).fill(0).map((e,t)=>`\r
|
|
5
|
+
`+" ".repeat(t)),new Array(U).fill(0).map((e,t)=>`
|
|
6
|
+
`+" ".repeat(t)),new Array(U).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(U).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"),Ue(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 Ue(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),h=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 x(k){const F=n.getTokenValue();return k?A(F):(y(F),l.push(F)),T(),!0}o(x,"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):(x(!1),n.getToken()===6?(h(":"),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,[],[]),h(","),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,[],[]),h(","),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 x(!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(Ue,"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 xe=$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)=>xe(Be(t,e,"utf8")),"readJsonc"),X=Symbol("implicitBaseUrl"),L="${configDir}",Se=o(()=>{const{findPnpApi:e}=Fe;return e&&e(process.cwd())},"getPnpApi"),Y=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.resolveExports(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"),Z="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,Z),t);if(j){const d=Y(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,Z);if(I(s,w)){const v=Y(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,Z);if(I(s,v)){const d=Y(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)=>Q(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 E(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 E(`${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[X]=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=Q(u)),i[f]=u)}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(E),n.files&&delete n.files):n.files&&(n.files=n.files.map(i=>i.startsWith(L)?i:Q(i))),n.watchOptions){const{watchOptions:i}=n;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(r=>E(m.resolve(l,r))))}return n},"_parseTsconfig"),M=o((e,t)=>{if(e.startsWith(L))return E(m.join(t,e.slice(L.length)))},"interpolateConfigDir"),Me=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],Ve=o(e=>{var t,s,n,l,i,r,f,u,g,w,b,y,v,j,d,A,h,B,c,_,D,T,p,x;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),(h=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&&((x=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 Me){const u=i[f];if(u){const g=M(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=M(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=M(u,l))!=null?g:u});Ve(i)}for(const r of ge){const f=n[r];f&&(n[r]=f.map(u=>{var g;return(g=M(u,l))!=null?g:u}))}return n},"parseTsconfig"),Je=o((e=process.cwd(),t="tsconfig.json",s=new Map)=>{const n=oe(E(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"),qe=o(({prefix:e,suffix:t},s)=>s.startsWith(e)&&s.endsWith(t),"isPatternMatch"),Ge=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&&!G.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"),Qe=o(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:s,paths:n}=t;if(!s&&!n)return null;const l=X in t&&t[X],i=m.resolve(m.dirname(e.path),s||l||"."),r=n?Ge(n,s,i):[];return f=>{if(G.test(f))return[];const u=[];for(const y of r){if(y.pattern===f)return y.substitutions.map(E);typeof y.pattern!="string"&&u.push(y)}let g,w=-1;for(const y of u)qe(y.pattern,f)&&y.pattern.prefix.length>w&&(w=y.pattern.prefix.length,g=y);if(!g)return s?[E(m.join(i,f))]:[];const b=f.slice(g.pattern.prefix.length,f.length-g.pattern.suffix.length);return g.substitutions.map(y=>E(y.replace("*",b)))}},"createPathsMatcher");var He=Object.defineProperty,V=o((e,t)=>He(e,"name",{value:t,configurable:!0}),"s");const be=V(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=V((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"),Xe=V((e,t,s)=>{try{return ve(e,s)}catch(n){if(t===void 0)return ve(Ee.tmpdir(),s);throw n}},"checkDirectoryCaseWithFallback"),Ye=V((e,t=he,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=Xe(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"]},Ze=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=Ye())=>{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=E(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=Ze(f),w=s?"":"i",y=(r||Ke(f)).map(d=>{const A=J(n,d),h=de(A).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${O}*`).replaceAll(String.raw`\?`,O);return new RegExp(`^${h}($|/)`,w)}),v=l||i?i:[Te],j=v?v.map(d=>{let A=J(n,d);en.test(A)&&(A=J(A,Te));const h=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(`^${h}$`,w)}):void 0;return d=>{if(!m.isAbsolute(d))throw new Error("filePath must be absolute");if(Ae&&(d=E(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");exports.createFilesMatcher=nn,exports.createPathsMatcher=Qe,exports.getTsconfig=Je,exports.parseTsconfig=ke;
|