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,289 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
|
|
25
|
+
// lib/npm/node-platform.ts
|
|
26
|
+
var fs = require("fs");
|
|
27
|
+
var os = require("os");
|
|
28
|
+
var path = require("path");
|
|
29
|
+
var ESBUILD_BINARY_PATH = process.env.ESBUILD_BINARY_PATH || ESBUILD_BINARY_PATH;
|
|
30
|
+
var isValidBinaryPath = (x) => !!x && x !== "/usr/bin/esbuild";
|
|
31
|
+
var knownWindowsPackages = {
|
|
32
|
+
"win32 arm64 LE": "@esbuild/win32-arm64",
|
|
33
|
+
"win32 ia32 LE": "@esbuild/win32-ia32",
|
|
34
|
+
"win32 x64 LE": "@esbuild/win32-x64"
|
|
35
|
+
};
|
|
36
|
+
var knownUnixlikePackages = {
|
|
37
|
+
"aix ppc64 BE": "@esbuild/aix-ppc64",
|
|
38
|
+
"android arm64 LE": "@esbuild/android-arm64",
|
|
39
|
+
"darwin arm64 LE": "@esbuild/darwin-arm64",
|
|
40
|
+
"darwin x64 LE": "@esbuild/darwin-x64",
|
|
41
|
+
"freebsd arm64 LE": "@esbuild/freebsd-arm64",
|
|
42
|
+
"freebsd x64 LE": "@esbuild/freebsd-x64",
|
|
43
|
+
"linux arm LE": "@esbuild/linux-arm",
|
|
44
|
+
"linux arm64 LE": "@esbuild/linux-arm64",
|
|
45
|
+
"linux ia32 LE": "@esbuild/linux-ia32",
|
|
46
|
+
"linux mips64el LE": "@esbuild/linux-mips64el",
|
|
47
|
+
"linux ppc64 LE": "@esbuild/linux-ppc64",
|
|
48
|
+
"linux riscv64 LE": "@esbuild/linux-riscv64",
|
|
49
|
+
"linux s390x BE": "@esbuild/linux-s390x",
|
|
50
|
+
"linux x64 LE": "@esbuild/linux-x64",
|
|
51
|
+
"linux loong64 LE": "@esbuild/linux-loong64",
|
|
52
|
+
"netbsd arm64 LE": "@esbuild/netbsd-arm64",
|
|
53
|
+
"netbsd x64 LE": "@esbuild/netbsd-x64",
|
|
54
|
+
"openbsd arm64 LE": "@esbuild/openbsd-arm64",
|
|
55
|
+
"openbsd x64 LE": "@esbuild/openbsd-x64",
|
|
56
|
+
"sunos x64 LE": "@esbuild/sunos-x64"
|
|
57
|
+
};
|
|
58
|
+
var knownWebAssemblyFallbackPackages = {
|
|
59
|
+
"android arm LE": "@esbuild/android-arm",
|
|
60
|
+
"android x64 LE": "@esbuild/android-x64",
|
|
61
|
+
"openharmony arm64 LE": "@esbuild/openharmony-arm64"
|
|
62
|
+
};
|
|
63
|
+
function pkgAndSubpathForCurrentPlatform() {
|
|
64
|
+
let pkg;
|
|
65
|
+
let subpath;
|
|
66
|
+
let isWASM = false;
|
|
67
|
+
let platformKey = `${process.platform} ${os.arch()} ${os.endianness()}`;
|
|
68
|
+
if (platformKey in knownWindowsPackages) {
|
|
69
|
+
pkg = knownWindowsPackages[platformKey];
|
|
70
|
+
subpath = "esbuild.exe";
|
|
71
|
+
} else if (platformKey in knownUnixlikePackages) {
|
|
72
|
+
pkg = knownUnixlikePackages[platformKey];
|
|
73
|
+
subpath = "bin/esbuild";
|
|
74
|
+
} else if (platformKey in knownWebAssemblyFallbackPackages) {
|
|
75
|
+
pkg = knownWebAssemblyFallbackPackages[platformKey];
|
|
76
|
+
subpath = "bin/esbuild";
|
|
77
|
+
isWASM = true;
|
|
78
|
+
} else {
|
|
79
|
+
throw new Error(`Unsupported platform: ${platformKey}`);
|
|
80
|
+
}
|
|
81
|
+
return { pkg, subpath, isWASM };
|
|
82
|
+
}
|
|
83
|
+
function downloadedBinPath(pkg, subpath) {
|
|
84
|
+
const esbuildLibDir = path.dirname(require.resolve("esbuild"));
|
|
85
|
+
return path.join(esbuildLibDir, `downloaded-${pkg.replace("/", "-")}-${path.basename(subpath)}`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// lib/npm/node-install.ts
|
|
89
|
+
var fs2 = require("fs");
|
|
90
|
+
var os2 = require("os");
|
|
91
|
+
var path2 = require("path");
|
|
92
|
+
var zlib = require("zlib");
|
|
93
|
+
var https = require("https");
|
|
94
|
+
var child_process = require("child_process");
|
|
95
|
+
var versionFromPackageJSON = require(path2.join(__dirname, "package.json")).version;
|
|
96
|
+
var toPath = path2.join(__dirname, "bin", "esbuild");
|
|
97
|
+
var isToPathJS = true;
|
|
98
|
+
function validateBinaryVersion(...command) {
|
|
99
|
+
command.push("--version");
|
|
100
|
+
let stdout;
|
|
101
|
+
try {
|
|
102
|
+
stdout = child_process.execFileSync(command.shift(), command, {
|
|
103
|
+
// Without this, this install script strangely crashes with the error
|
|
104
|
+
// "EACCES: permission denied, write" but only on Ubuntu Linux when node is
|
|
105
|
+
// installed from the Snap Store. This is not a problem when you download
|
|
106
|
+
// the official version of node. The problem appears to be that stderr
|
|
107
|
+
// (i.e. file descriptor 2) isn't writable?
|
|
108
|
+
//
|
|
109
|
+
// More info:
|
|
110
|
+
// - https://snapcraft.io/ (what the Snap Store is)
|
|
111
|
+
// - https://nodejs.org/dist/ (download the official version of node)
|
|
112
|
+
// - https://github.com/evanw/esbuild/issues/1711#issuecomment-1027554035
|
|
113
|
+
//
|
|
114
|
+
stdio: "pipe"
|
|
115
|
+
}).toString().trim();
|
|
116
|
+
} catch (err) {
|
|
117
|
+
if (os2.platform() === "darwin" && /_SecTrustEvaluateWithError/.test(err + "")) {
|
|
118
|
+
let os3 = "this version of macOS";
|
|
119
|
+
try {
|
|
120
|
+
os3 = "macOS " + child_process.execFileSync("sw_vers", ["-productVersion"]).toString().trim();
|
|
121
|
+
} catch {
|
|
122
|
+
}
|
|
123
|
+
throw new Error(`The "esbuild" package cannot be installed because ${os3} is too outdated.
|
|
124
|
+
|
|
125
|
+
The Go compiler (which esbuild relies on) no longer supports ${os3},
|
|
126
|
+
which means the "esbuild" binary executable can't be run. You can either:
|
|
127
|
+
|
|
128
|
+
* Update your version of macOS to one that the Go compiler supports
|
|
129
|
+
* Use the "esbuild-wasm" package instead of the "esbuild" package
|
|
130
|
+
* Build esbuild yourself using an older version of the Go compiler
|
|
131
|
+
`);
|
|
132
|
+
}
|
|
133
|
+
throw err;
|
|
134
|
+
}
|
|
135
|
+
if (stdout !== versionFromPackageJSON) {
|
|
136
|
+
throw new Error(`Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
function isYarn() {
|
|
140
|
+
const { npm_config_user_agent } = process.env;
|
|
141
|
+
if (npm_config_user_agent) {
|
|
142
|
+
return /\byarn\//.test(npm_config_user_agent);
|
|
143
|
+
}
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
function fetch(url) {
|
|
147
|
+
return new Promise((resolve, reject) => {
|
|
148
|
+
https.get(url, (res) => {
|
|
149
|
+
if ((res.statusCode === 301 || res.statusCode === 302) && res.headers.location)
|
|
150
|
+
return fetch(res.headers.location).then(resolve, reject);
|
|
151
|
+
if (res.statusCode !== 200)
|
|
152
|
+
return reject(new Error(`Server responded with ${res.statusCode}`));
|
|
153
|
+
let chunks = [];
|
|
154
|
+
res.on("data", (chunk) => chunks.push(chunk));
|
|
155
|
+
res.on("end", () => resolve(Buffer.concat(chunks)));
|
|
156
|
+
}).on("error", reject);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
function extractFileFromTarGzip(buffer, subpath) {
|
|
160
|
+
try {
|
|
161
|
+
buffer = zlib.unzipSync(buffer);
|
|
162
|
+
} catch (err) {
|
|
163
|
+
throw new Error(`Invalid gzip data in archive: ${err && err.message || err}`);
|
|
164
|
+
}
|
|
165
|
+
let str = (i, n) => String.fromCharCode(...buffer.subarray(i, i + n)).replace(/\0.*$/, "");
|
|
166
|
+
let offset = 0;
|
|
167
|
+
subpath = `package/${subpath}`;
|
|
168
|
+
while (offset < buffer.length) {
|
|
169
|
+
let name = str(offset, 100);
|
|
170
|
+
let size = parseInt(str(offset + 124, 12), 8);
|
|
171
|
+
offset += 512;
|
|
172
|
+
if (!isNaN(size)) {
|
|
173
|
+
if (name === subpath) return buffer.subarray(offset, offset + size);
|
|
174
|
+
offset += size + 511 & ~511;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
throw new Error(`Could not find ${JSON.stringify(subpath)} in archive`);
|
|
178
|
+
}
|
|
179
|
+
function installUsingNPM(pkg, subpath, binPath) {
|
|
180
|
+
const env = { ...process.env, npm_config_global: void 0 };
|
|
181
|
+
const esbuildLibDir = path2.dirname(require.resolve("esbuild"));
|
|
182
|
+
const installDir = path2.join(esbuildLibDir, "npm-install");
|
|
183
|
+
fs2.mkdirSync(installDir);
|
|
184
|
+
try {
|
|
185
|
+
fs2.writeFileSync(path2.join(installDir, "package.json"), "{}");
|
|
186
|
+
child_process.execSync(
|
|
187
|
+
`npm install --loglevel=error --prefer-offline --no-audit --progress=false ${pkg}@${versionFromPackageJSON}`,
|
|
188
|
+
{ cwd: installDir, stdio: "pipe", env }
|
|
189
|
+
);
|
|
190
|
+
const installedBinPath = path2.join(installDir, "node_modules", pkg, subpath);
|
|
191
|
+
fs2.renameSync(installedBinPath, binPath);
|
|
192
|
+
} finally {
|
|
193
|
+
try {
|
|
194
|
+
removeRecursive(installDir);
|
|
195
|
+
} catch {
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function removeRecursive(dir) {
|
|
200
|
+
for (const entry of fs2.readdirSync(dir)) {
|
|
201
|
+
const entryPath = path2.join(dir, entry);
|
|
202
|
+
let stats;
|
|
203
|
+
try {
|
|
204
|
+
stats = fs2.lstatSync(entryPath);
|
|
205
|
+
} catch {
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if (stats.isDirectory()) removeRecursive(entryPath);
|
|
209
|
+
else fs2.unlinkSync(entryPath);
|
|
210
|
+
}
|
|
211
|
+
fs2.rmdirSync(dir);
|
|
212
|
+
}
|
|
213
|
+
function applyManualBinaryPathOverride(overridePath) {
|
|
214
|
+
const pathString = JSON.stringify(overridePath);
|
|
215
|
+
fs2.writeFileSync(toPath, `#!/usr/bin/env node
|
|
216
|
+
require('child_process').execFileSync(${pathString}, process.argv.slice(2), { stdio: 'inherit' });
|
|
217
|
+
`);
|
|
218
|
+
const libMain = path2.join(__dirname, "lib", "main.js");
|
|
219
|
+
const code = fs2.readFileSync(libMain, "utf8");
|
|
220
|
+
fs2.writeFileSync(libMain, `var ESBUILD_BINARY_PATH = ${pathString};
|
|
221
|
+
${code}`);
|
|
222
|
+
}
|
|
223
|
+
function maybeOptimizePackage(binPath) {
|
|
224
|
+
const { isWASM } = pkgAndSubpathForCurrentPlatform();
|
|
225
|
+
if (os2.platform() !== "win32" && !isYarn() && !isWASM) {
|
|
226
|
+
const tempPath = path2.join(__dirname, "bin-esbuild");
|
|
227
|
+
try {
|
|
228
|
+
fs2.linkSync(binPath, tempPath);
|
|
229
|
+
fs2.renameSync(tempPath, toPath);
|
|
230
|
+
isToPathJS = false;
|
|
231
|
+
fs2.unlinkSync(tempPath);
|
|
232
|
+
} catch {
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
async function downloadDirectlyFromNPM(pkg, subpath, binPath) {
|
|
237
|
+
const url = `https://registry.npmjs.org/${pkg}/-/${pkg.replace("@esbuild/", "")}-${versionFromPackageJSON}.tgz`;
|
|
238
|
+
console.error(`[esbuild] Trying to download ${JSON.stringify(url)}`);
|
|
239
|
+
try {
|
|
240
|
+
fs2.writeFileSync(binPath, extractFileFromTarGzip(await fetch(url), subpath));
|
|
241
|
+
fs2.chmodSync(binPath, 493);
|
|
242
|
+
} catch (e) {
|
|
243
|
+
console.error(`[esbuild] Failed to download ${JSON.stringify(url)}: ${e && e.message || e}`);
|
|
244
|
+
throw e;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
async function checkAndPreparePackage() {
|
|
248
|
+
if (isValidBinaryPath(ESBUILD_BINARY_PATH)) {
|
|
249
|
+
if (!fs2.existsSync(ESBUILD_BINARY_PATH)) {
|
|
250
|
+
console.warn(`[esbuild] Ignoring bad configuration: ESBUILD_BINARY_PATH=${ESBUILD_BINARY_PATH}`);
|
|
251
|
+
} else {
|
|
252
|
+
applyManualBinaryPathOverride(ESBUILD_BINARY_PATH);
|
|
253
|
+
return;
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
|
|
257
|
+
let binPath;
|
|
258
|
+
try {
|
|
259
|
+
binPath = require.resolve(`${pkg}/${subpath}`);
|
|
260
|
+
} catch (e) {
|
|
261
|
+
console.error(`[esbuild] Failed to find package "${pkg}" on the file system
|
|
262
|
+
|
|
263
|
+
This can happen if you use the "--no-optional" flag. The "optionalDependencies"
|
|
264
|
+
package.json feature is used by esbuild to install the correct binary executable
|
|
265
|
+
for your current platform. This install script will now attempt to work around
|
|
266
|
+
this. If that fails, you need to remove the "--no-optional" flag to use esbuild.
|
|
267
|
+
`);
|
|
268
|
+
binPath = downloadedBinPath(pkg, subpath);
|
|
269
|
+
try {
|
|
270
|
+
console.error(`[esbuild] Trying to install package "${pkg}" using npm`);
|
|
271
|
+
installUsingNPM(pkg, subpath, binPath);
|
|
272
|
+
} catch (e2) {
|
|
273
|
+
console.error(`[esbuild] Failed to install package "${pkg}" using npm: ${e2 && e2.message || e2}`);
|
|
274
|
+
try {
|
|
275
|
+
await downloadDirectlyFromNPM(pkg, subpath, binPath);
|
|
276
|
+
} catch (e3) {
|
|
277
|
+
throw new Error(`Failed to install package "${pkg}"`);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
maybeOptimizePackage(binPath);
|
|
282
|
+
}
|
|
283
|
+
checkAndPreparePackage().then(() => {
|
|
284
|
+
if (isToPathJS) {
|
|
285
|
+
validateBinaryVersion(process.execPath, toPath);
|
|
286
|
+
} else {
|
|
287
|
+
validateBinaryVersion(toPath);
|
|
288
|
+
}
|
|
289
|
+
});
|