@hasna/connectors 1.3.5 → 1.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/index.js +31 -17
- package/bin/mcp.js +25 -79
- package/bin/serve.js +5 -23
- package/connectors/connect-github/src/api/client.ts +0 -11
- package/connectors/connect-github/src/api/index.ts +0 -12
- package/connectors/connect-github/src/api/repos.ts +38 -0
- package/connectors/connect-github/src/cli/index.ts +102 -0
- package/connectors/connect-github/src/types/index.ts +0 -190
- package/connectors/connect-github/src/utils/config.ts +2 -2
- package/connectors/{connect-namecheap → connect-yousign}/bun.lock +3 -3
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/bun/README.md +1 -1
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/bun/package.json +3 -3
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/bun.d.ts +8 -239
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/executables.mdx +10 -10
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/fullstack.mdx +13 -13
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/bun-apis.mdx +1 -2
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/bunfig.mdx +0 -11
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/hashing.mdx +1 -1
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/server.mdx +7 -34
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/json5.mdx +1 -1
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/markdown.mdx +16 -53
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/yaml.mdx +2 -3
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/configuration.mdx +0 -54
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/package.json +1 -1
- package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/s3.d.ts +0 -19
- package/dashboard/dist/assets/index-CSlS3oNV.css +1 -0
- package/dashboard/dist/assets/index-sSIkMXYs.js +284 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +0 -7
- package/package.json +1 -1
- package/connectors/connect-brandsight/bun.lock +0 -32
- package/connectors/connect-namecheap/bin/index.js +0 -3119
- package/connectors/connect-namecheap/dist/index.js +0 -431
- package/connectors/connect-namecheap/node_modules/bun-types/docs/guides/http/sse.mdx +0 -91
- package/connectors/connect-namecheap/node_modules/bun-types/docs/runtime/cron.mdx +0 -358
- package/connectors/connect-namecheap/node_modules/bun-types/docs/runtime/csrf.mdx +0 -171
- package/connectors/connect-namecheap/node_modules/bun-types/docs/runtime/toml.mdx +0 -238
- package/dashboard/dist/assets/index-DmR_QNtT.css +0 -1
- package/dashboard/dist/assets/index-Dp-apHbC.js +0 -284
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/bun/LICENSE +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/bun/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/LICENSE +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/README.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/assert/strict.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/assert.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/async_hooks.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/buffer.buffer.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/buffer.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/child_process.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/cluster.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/compatibility/iterators.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/console.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/constants.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/crypto.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/dgram.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/diagnostics_channel.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/dns/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/dns.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/domain.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/events.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/fs/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/fs.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/globals.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/globals.typedarray.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/http.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/http2.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/https.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/inspector/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/inspector.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/inspector.generated.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/module.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/net.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/os.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/package.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/path/posix.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/path/win32.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/path.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/perf_hooks.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/process.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/punycode.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/querystring.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/quic.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/readline/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/readline.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/repl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/sea.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/sqlite.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/stream/consumers.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/stream/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/stream/web.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/stream.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/string_decoder.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/test/reporters.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/test.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/timers/promises.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/timers.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/tls.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/trace_events.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.6/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/ts5.7/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/tty.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/url.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/util/types.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/util.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/v8.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/vm.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/wasi.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/blob.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/console.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/crypto.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/domexception.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/encoding.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/events.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/fetch.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/importmeta.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/messaging.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/navigator.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/performance.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/storage.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/streams.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/timers.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/web-globals/url.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/worker_threads.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/@types/node/zlib.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/CLAUDE.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/README.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/bun.ns.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/bundle.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/deprecated.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/devserver.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/README.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/bytecode.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/css.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/esbuild.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/hot-reloading.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/html-static.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/index.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/loaders.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/macros.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/minifier.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/plugins.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/bundler/standalone-html.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/feedback.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/railway.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/render.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/deployment/vercel.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/express.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/react.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/cluster.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/fetch.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/file-uploads.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/hot.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/proxy.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/server.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/simple.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-file.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/http/tls.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/index.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add-dev.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add-git.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add-optional.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add-peer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add-tarball.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/add.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/cicd.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/custom-registry.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/npm-alias.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/registry-scope.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/trusted.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/workspaces.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/install/yarnlock.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/argv.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/ipc.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/os-signals.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/process/stdin.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/buffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/exists.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/json.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/mime.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/stream.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/read-file/watch.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/cicd.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-html.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-json.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/read-env.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/set-env.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/shell.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/timezone.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/typescript.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-array.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-json.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-string.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/bail.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/coverage.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/happy-dom.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/mock-clock.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/mock-functions.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/rerun-each.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/run-tests.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/skip-tests.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/snapshot.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/spy-on.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/svelte-test.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/testing-library.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/timeout.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/todo-tests.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/test/watch-mode.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/base64.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/deep-equals.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/deflate.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/detect-bun.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/entrypoint.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/escape-html.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/gzip.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/main.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/sleep.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/upgrade.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/version.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/websocket/compression.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/websocket/context.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/websocket/simple.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/append.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/basic.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/blob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/cat.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/filesink.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/response.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/stdout.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/stream.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/guides/write-file/unlink.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/index.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/installation.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/bunx.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/catalogs.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/add.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/audit.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/info.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/install.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/link.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/outdated.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/patch.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/pm.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/publish.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/remove.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/update.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/cli/why.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/filter.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/global-cache.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/isolated-installs.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/lifecycle.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/lockfile.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/npmrc.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/overrides.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/scopes-registries.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/security-scanner-api.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/pm/workspaces.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/benchmarking.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/bindgen.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/building-windows.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/contributing.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/feedback.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/license.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/project/roadmap.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/quickstart.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/archive.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/auto-install.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/binary-data.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/c-compiler.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/child-process.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/color.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/console.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/cookies.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/debugger.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/environment-variables.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/ffi.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/file-io.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/file-system-router.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/file-types.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/glob.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/globals.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/html-rewriter.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/cookies.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/error-handling.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/metrics.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/routing.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/tls.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/http/websockets.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/index.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/jsonl.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/jsx.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/module-resolution.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/networking/dns.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/networking/fetch.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/networking/tcp.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/networking/udp.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/node-api.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/plugins.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/redis.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/repl.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/s3.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/secrets.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/semver.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/shell.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/sql.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/sqlite.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/streams.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/templating/create.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/templating/init.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/transpiler.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/typescript.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/utils.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/watch-mode.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/web-apis.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/runtime/workers.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/add.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/build.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/bunx.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/feedback.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/init.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/install.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/link.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/outdated.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/patch.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/publish.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/remove.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/run.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/test.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/snippets/cli/update.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/code-coverage.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/dates-times.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/discovery.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/dom.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/index.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/lifecycle.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/mocks.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/reporters.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/runtime-behavior.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/snapshots.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/test/writing-tests.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/docs/typescript.mdx +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/extensions.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/fetch.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/ffi.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/globals.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/html-rewriter.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/jsc.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/jsx.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/overrides.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/redis.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/security.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/serve.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/shell.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/sql.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/sqlite.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/test-globals.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/test.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/vendor/expect-type/branding.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/vendor/expect-type/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/vendor/expect-type/messages.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/vendor/expect-type/overloads.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/vendor/expect-type/utils.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/bun-types/wasm.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/license +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/package.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/readme.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/index.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/utilities.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/supports-color/browser.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/chalk/source/vendor/supports-color/index.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/LICENSE +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/Readme.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/esm.mjs +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/index.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/argument.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/command.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/error.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/help.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/option.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/lib/suggestSimilar.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/package-support.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/package.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/typings/esm.d.mts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/commander/typings/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/LICENSE.txt +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/README.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/SECURITY.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/ThirdPartyNoticeText.txt +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/bin/tsc +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/bin/tsserver +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/_tsc.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/_tsserver.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/_typingsInstaller.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.decorators.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.dom.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2016.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2023.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es5.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.es6.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.scripthost.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.webworker.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/tsc.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/tsserver.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/tsserverlibrary.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/typesMap.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/typescript.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/typescript.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/typingsInstaller.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/watchGuard.js +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/typescript/package.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/LICENSE +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/README.md +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/api.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/balanced-pool.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/cache-interceptor.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/cache.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/client-stats.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/client.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/connector.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/content-type.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/cookies.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/diagnostics-channel.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/dispatcher.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/errors.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/eventsource.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/fetch.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/formdata.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/global-dispatcher.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/global-origin.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/h2c-client.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/handlers.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/header.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/index.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/interceptors.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-call-history.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-client.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-errors.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-interceptor.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/mock-pool.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/package.json +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/patch.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/pool-stats.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/pool.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/proxy-agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/readable.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/retry-agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/retry-handler.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/round-robin-pool.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/snapshot-agent.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/util.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/utility.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/webidl.d.ts +0 -0
- /package/connectors/{connect-namecheap → connect-yousign}/node_modules/undici-types/websocket.d.ts +0 -0
|
@@ -1,3119 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
// @bun
|
|
3
|
-
var __create = Object.create;
|
|
4
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
9
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
10
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
11
|
-
for (let key of __getOwnPropNames(mod))
|
|
12
|
-
if (!__hasOwnProp.call(to, key))
|
|
13
|
-
__defProp(to, key, {
|
|
14
|
-
get: () => mod[key],
|
|
15
|
-
enumerable: true
|
|
16
|
-
});
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
20
|
-
var __require = import.meta.require;
|
|
21
|
-
|
|
22
|
-
// node_modules/commander/lib/error.js
|
|
23
|
-
var require_error = __commonJS((exports) => {
|
|
24
|
-
class CommanderError extends Error {
|
|
25
|
-
constructor(exitCode, code, message) {
|
|
26
|
-
super(message);
|
|
27
|
-
Error.captureStackTrace(this, this.constructor);
|
|
28
|
-
this.name = this.constructor.name;
|
|
29
|
-
this.code = code;
|
|
30
|
-
this.exitCode = exitCode;
|
|
31
|
-
this.nestedError = undefined;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
class InvalidArgumentError extends CommanderError {
|
|
36
|
-
constructor(message) {
|
|
37
|
-
super(1, "commander.invalidArgument", message);
|
|
38
|
-
Error.captureStackTrace(this, this.constructor);
|
|
39
|
-
this.name = this.constructor.name;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
exports.CommanderError = CommanderError;
|
|
43
|
-
exports.InvalidArgumentError = InvalidArgumentError;
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// node_modules/commander/lib/argument.js
|
|
47
|
-
var require_argument = __commonJS((exports) => {
|
|
48
|
-
var { InvalidArgumentError } = require_error();
|
|
49
|
-
|
|
50
|
-
class Argument {
|
|
51
|
-
constructor(name, description) {
|
|
52
|
-
this.description = description || "";
|
|
53
|
-
this.variadic = false;
|
|
54
|
-
this.parseArg = undefined;
|
|
55
|
-
this.defaultValue = undefined;
|
|
56
|
-
this.defaultValueDescription = undefined;
|
|
57
|
-
this.argChoices = undefined;
|
|
58
|
-
switch (name[0]) {
|
|
59
|
-
case "<":
|
|
60
|
-
this.required = true;
|
|
61
|
-
this._name = name.slice(1, -1);
|
|
62
|
-
break;
|
|
63
|
-
case "[":
|
|
64
|
-
this.required = false;
|
|
65
|
-
this._name = name.slice(1, -1);
|
|
66
|
-
break;
|
|
67
|
-
default:
|
|
68
|
-
this.required = true;
|
|
69
|
-
this._name = name;
|
|
70
|
-
break;
|
|
71
|
-
}
|
|
72
|
-
if (this._name.length > 3 && this._name.slice(-3) === "...") {
|
|
73
|
-
this.variadic = true;
|
|
74
|
-
this._name = this._name.slice(0, -3);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
name() {
|
|
78
|
-
return this._name;
|
|
79
|
-
}
|
|
80
|
-
_concatValue(value, previous) {
|
|
81
|
-
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
82
|
-
return [value];
|
|
83
|
-
}
|
|
84
|
-
return previous.concat(value);
|
|
85
|
-
}
|
|
86
|
-
default(value, description) {
|
|
87
|
-
this.defaultValue = value;
|
|
88
|
-
this.defaultValueDescription = description;
|
|
89
|
-
return this;
|
|
90
|
-
}
|
|
91
|
-
argParser(fn) {
|
|
92
|
-
this.parseArg = fn;
|
|
93
|
-
return this;
|
|
94
|
-
}
|
|
95
|
-
choices(values) {
|
|
96
|
-
this.argChoices = values.slice();
|
|
97
|
-
this.parseArg = (arg, previous) => {
|
|
98
|
-
if (!this.argChoices.includes(arg)) {
|
|
99
|
-
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
100
|
-
}
|
|
101
|
-
if (this.variadic) {
|
|
102
|
-
return this._concatValue(arg, previous);
|
|
103
|
-
}
|
|
104
|
-
return arg;
|
|
105
|
-
};
|
|
106
|
-
return this;
|
|
107
|
-
}
|
|
108
|
-
argRequired() {
|
|
109
|
-
this.required = true;
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
argOptional() {
|
|
113
|
-
this.required = false;
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
function humanReadableArgName(arg) {
|
|
118
|
-
const nameOutput = arg.name() + (arg.variadic === true ? "..." : "");
|
|
119
|
-
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
120
|
-
}
|
|
121
|
-
exports.Argument = Argument;
|
|
122
|
-
exports.humanReadableArgName = humanReadableArgName;
|
|
123
|
-
});
|
|
124
|
-
|
|
125
|
-
// node_modules/commander/lib/help.js
|
|
126
|
-
var require_help = __commonJS((exports) => {
|
|
127
|
-
var { humanReadableArgName } = require_argument();
|
|
128
|
-
|
|
129
|
-
class Help {
|
|
130
|
-
constructor() {
|
|
131
|
-
this.helpWidth = undefined;
|
|
132
|
-
this.sortSubcommands = false;
|
|
133
|
-
this.sortOptions = false;
|
|
134
|
-
this.showGlobalOptions = false;
|
|
135
|
-
}
|
|
136
|
-
visibleCommands(cmd) {
|
|
137
|
-
const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden);
|
|
138
|
-
const helpCommand = cmd._getHelpCommand();
|
|
139
|
-
if (helpCommand && !helpCommand._hidden) {
|
|
140
|
-
visibleCommands.push(helpCommand);
|
|
141
|
-
}
|
|
142
|
-
if (this.sortSubcommands) {
|
|
143
|
-
visibleCommands.sort((a, b) => {
|
|
144
|
-
return a.name().localeCompare(b.name());
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
return visibleCommands;
|
|
148
|
-
}
|
|
149
|
-
compareOptions(a, b) {
|
|
150
|
-
const getSortKey = (option) => {
|
|
151
|
-
return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, "");
|
|
152
|
-
};
|
|
153
|
-
return getSortKey(a).localeCompare(getSortKey(b));
|
|
154
|
-
}
|
|
155
|
-
visibleOptions(cmd) {
|
|
156
|
-
const visibleOptions = cmd.options.filter((option) => !option.hidden);
|
|
157
|
-
const helpOption = cmd._getHelpOption();
|
|
158
|
-
if (helpOption && !helpOption.hidden) {
|
|
159
|
-
const removeShort = helpOption.short && cmd._findOption(helpOption.short);
|
|
160
|
-
const removeLong = helpOption.long && cmd._findOption(helpOption.long);
|
|
161
|
-
if (!removeShort && !removeLong) {
|
|
162
|
-
visibleOptions.push(helpOption);
|
|
163
|
-
} else if (helpOption.long && !removeLong) {
|
|
164
|
-
visibleOptions.push(cmd.createOption(helpOption.long, helpOption.description));
|
|
165
|
-
} else if (helpOption.short && !removeShort) {
|
|
166
|
-
visibleOptions.push(cmd.createOption(helpOption.short, helpOption.description));
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
if (this.sortOptions) {
|
|
170
|
-
visibleOptions.sort(this.compareOptions);
|
|
171
|
-
}
|
|
172
|
-
return visibleOptions;
|
|
173
|
-
}
|
|
174
|
-
visibleGlobalOptions(cmd) {
|
|
175
|
-
if (!this.showGlobalOptions)
|
|
176
|
-
return [];
|
|
177
|
-
const globalOptions = [];
|
|
178
|
-
for (let ancestorCmd = cmd.parent;ancestorCmd; ancestorCmd = ancestorCmd.parent) {
|
|
179
|
-
const visibleOptions = ancestorCmd.options.filter((option) => !option.hidden);
|
|
180
|
-
globalOptions.push(...visibleOptions);
|
|
181
|
-
}
|
|
182
|
-
if (this.sortOptions) {
|
|
183
|
-
globalOptions.sort(this.compareOptions);
|
|
184
|
-
}
|
|
185
|
-
return globalOptions;
|
|
186
|
-
}
|
|
187
|
-
visibleArguments(cmd) {
|
|
188
|
-
if (cmd._argsDescription) {
|
|
189
|
-
cmd.registeredArguments.forEach((argument) => {
|
|
190
|
-
argument.description = argument.description || cmd._argsDescription[argument.name()] || "";
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (cmd.registeredArguments.find((argument) => argument.description)) {
|
|
194
|
-
return cmd.registeredArguments;
|
|
195
|
-
}
|
|
196
|
-
return [];
|
|
197
|
-
}
|
|
198
|
-
subcommandTerm(cmd) {
|
|
199
|
-
const args = cmd.registeredArguments.map((arg) => humanReadableArgName(arg)).join(" ");
|
|
200
|
-
return cmd._name + (cmd._aliases[0] ? "|" + cmd._aliases[0] : "") + (cmd.options.length ? " [options]" : "") + (args ? " " + args : "");
|
|
201
|
-
}
|
|
202
|
-
optionTerm(option) {
|
|
203
|
-
return option.flags;
|
|
204
|
-
}
|
|
205
|
-
argumentTerm(argument) {
|
|
206
|
-
return argument.name();
|
|
207
|
-
}
|
|
208
|
-
longestSubcommandTermLength(cmd, helper) {
|
|
209
|
-
return helper.visibleCommands(cmd).reduce((max, command) => {
|
|
210
|
-
return Math.max(max, helper.subcommandTerm(command).length);
|
|
211
|
-
}, 0);
|
|
212
|
-
}
|
|
213
|
-
longestOptionTermLength(cmd, helper) {
|
|
214
|
-
return helper.visibleOptions(cmd).reduce((max, option) => {
|
|
215
|
-
return Math.max(max, helper.optionTerm(option).length);
|
|
216
|
-
}, 0);
|
|
217
|
-
}
|
|
218
|
-
longestGlobalOptionTermLength(cmd, helper) {
|
|
219
|
-
return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
|
|
220
|
-
return Math.max(max, helper.optionTerm(option).length);
|
|
221
|
-
}, 0);
|
|
222
|
-
}
|
|
223
|
-
longestArgumentTermLength(cmd, helper) {
|
|
224
|
-
return helper.visibleArguments(cmd).reduce((max, argument) => {
|
|
225
|
-
return Math.max(max, helper.argumentTerm(argument).length);
|
|
226
|
-
}, 0);
|
|
227
|
-
}
|
|
228
|
-
commandUsage(cmd) {
|
|
229
|
-
let cmdName = cmd._name;
|
|
230
|
-
if (cmd._aliases[0]) {
|
|
231
|
-
cmdName = cmdName + "|" + cmd._aliases[0];
|
|
232
|
-
}
|
|
233
|
-
let ancestorCmdNames = "";
|
|
234
|
-
for (let ancestorCmd = cmd.parent;ancestorCmd; ancestorCmd = ancestorCmd.parent) {
|
|
235
|
-
ancestorCmdNames = ancestorCmd.name() + " " + ancestorCmdNames;
|
|
236
|
-
}
|
|
237
|
-
return ancestorCmdNames + cmdName + " " + cmd.usage();
|
|
238
|
-
}
|
|
239
|
-
commandDescription(cmd) {
|
|
240
|
-
return cmd.description();
|
|
241
|
-
}
|
|
242
|
-
subcommandDescription(cmd) {
|
|
243
|
-
return cmd.summary() || cmd.description();
|
|
244
|
-
}
|
|
245
|
-
optionDescription(option) {
|
|
246
|
-
const extraInfo = [];
|
|
247
|
-
if (option.argChoices) {
|
|
248
|
-
extraInfo.push(`choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}`);
|
|
249
|
-
}
|
|
250
|
-
if (option.defaultValue !== undefined) {
|
|
251
|
-
const showDefault = option.required || option.optional || option.isBoolean() && typeof option.defaultValue === "boolean";
|
|
252
|
-
if (showDefault) {
|
|
253
|
-
extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
if (option.presetArg !== undefined && option.optional) {
|
|
257
|
-
extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);
|
|
258
|
-
}
|
|
259
|
-
if (option.envVar !== undefined) {
|
|
260
|
-
extraInfo.push(`env: ${option.envVar}`);
|
|
261
|
-
}
|
|
262
|
-
if (extraInfo.length > 0) {
|
|
263
|
-
return `${option.description} (${extraInfo.join(", ")})`;
|
|
264
|
-
}
|
|
265
|
-
return option.description;
|
|
266
|
-
}
|
|
267
|
-
argumentDescription(argument) {
|
|
268
|
-
const extraInfo = [];
|
|
269
|
-
if (argument.argChoices) {
|
|
270
|
-
extraInfo.push(`choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}`);
|
|
271
|
-
}
|
|
272
|
-
if (argument.defaultValue !== undefined) {
|
|
273
|
-
extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);
|
|
274
|
-
}
|
|
275
|
-
if (extraInfo.length > 0) {
|
|
276
|
-
const extraDescripton = `(${extraInfo.join(", ")})`;
|
|
277
|
-
if (argument.description) {
|
|
278
|
-
return `${argument.description} ${extraDescripton}`;
|
|
279
|
-
}
|
|
280
|
-
return extraDescripton;
|
|
281
|
-
}
|
|
282
|
-
return argument.description;
|
|
283
|
-
}
|
|
284
|
-
formatHelp(cmd, helper) {
|
|
285
|
-
const termWidth = helper.padWidth(cmd, helper);
|
|
286
|
-
const helpWidth = helper.helpWidth || 80;
|
|
287
|
-
const itemIndentWidth = 2;
|
|
288
|
-
const itemSeparatorWidth = 2;
|
|
289
|
-
function formatItem(term, description) {
|
|
290
|
-
if (description) {
|
|
291
|
-
const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
|
|
292
|
-
return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);
|
|
293
|
-
}
|
|
294
|
-
return term;
|
|
295
|
-
}
|
|
296
|
-
function formatList(textArray) {
|
|
297
|
-
return textArray.join(`
|
|
298
|
-
`).replace(/^/gm, " ".repeat(itemIndentWidth));
|
|
299
|
-
}
|
|
300
|
-
let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
|
|
301
|
-
const commandDescription = helper.commandDescription(cmd);
|
|
302
|
-
if (commandDescription.length > 0) {
|
|
303
|
-
output = output.concat([
|
|
304
|
-
helper.wrap(commandDescription, helpWidth, 0),
|
|
305
|
-
""
|
|
306
|
-
]);
|
|
307
|
-
}
|
|
308
|
-
const argumentList = helper.visibleArguments(cmd).map((argument) => {
|
|
309
|
-
return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));
|
|
310
|
-
});
|
|
311
|
-
if (argumentList.length > 0) {
|
|
312
|
-
output = output.concat(["Arguments:", formatList(argumentList), ""]);
|
|
313
|
-
}
|
|
314
|
-
const optionList = helper.visibleOptions(cmd).map((option) => {
|
|
315
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
316
|
-
});
|
|
317
|
-
if (optionList.length > 0) {
|
|
318
|
-
output = output.concat(["Options:", formatList(optionList), ""]);
|
|
319
|
-
}
|
|
320
|
-
if (this.showGlobalOptions) {
|
|
321
|
-
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
322
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
323
|
-
});
|
|
324
|
-
if (globalOptionList.length > 0) {
|
|
325
|
-
output = output.concat([
|
|
326
|
-
"Global Options:",
|
|
327
|
-
formatList(globalOptionList),
|
|
328
|
-
""
|
|
329
|
-
]);
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
const commandList = helper.visibleCommands(cmd).map((cmd2) => {
|
|
333
|
-
return formatItem(helper.subcommandTerm(cmd2), helper.subcommandDescription(cmd2));
|
|
334
|
-
});
|
|
335
|
-
if (commandList.length > 0) {
|
|
336
|
-
output = output.concat(["Commands:", formatList(commandList), ""]);
|
|
337
|
-
}
|
|
338
|
-
return output.join(`
|
|
339
|
-
`);
|
|
340
|
-
}
|
|
341
|
-
padWidth(cmd, helper) {
|
|
342
|
-
return Math.max(helper.longestOptionTermLength(cmd, helper), helper.longestGlobalOptionTermLength(cmd, helper), helper.longestSubcommandTermLength(cmd, helper), helper.longestArgumentTermLength(cmd, helper));
|
|
343
|
-
}
|
|
344
|
-
wrap(str, width, indent, minColumnWidth = 40) {
|
|
345
|
-
const indents = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF";
|
|
346
|
-
const manualIndent = new RegExp(`[\\n][${indents}]+`);
|
|
347
|
-
if (str.match(manualIndent))
|
|
348
|
-
return str;
|
|
349
|
-
const columnWidth = width - indent;
|
|
350
|
-
if (columnWidth < minColumnWidth)
|
|
351
|
-
return str;
|
|
352
|
-
const leadingStr = str.slice(0, indent);
|
|
353
|
-
const columnText = str.slice(indent).replace(`\r
|
|
354
|
-
`, `
|
|
355
|
-
`);
|
|
356
|
-
const indentString = " ".repeat(indent);
|
|
357
|
-
const zeroWidthSpace = "\u200B";
|
|
358
|
-
const breaks = `\\s${zeroWidthSpace}`;
|
|
359
|
-
const regex = new RegExp(`
|
|
360
|
-
|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, "g");
|
|
361
|
-
const lines = columnText.match(regex) || [];
|
|
362
|
-
return leadingStr + lines.map((line, i) => {
|
|
363
|
-
if (line === `
|
|
364
|
-
`)
|
|
365
|
-
return "";
|
|
366
|
-
return (i > 0 ? indentString : "") + line.trimEnd();
|
|
367
|
-
}).join(`
|
|
368
|
-
`);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
exports.Help = Help;
|
|
372
|
-
});
|
|
373
|
-
|
|
374
|
-
// node_modules/commander/lib/option.js
|
|
375
|
-
var require_option = __commonJS((exports) => {
|
|
376
|
-
var { InvalidArgumentError } = require_error();
|
|
377
|
-
|
|
378
|
-
class Option {
|
|
379
|
-
constructor(flags, description) {
|
|
380
|
-
this.flags = flags;
|
|
381
|
-
this.description = description || "";
|
|
382
|
-
this.required = flags.includes("<");
|
|
383
|
-
this.optional = flags.includes("[");
|
|
384
|
-
this.variadic = /\w\.\.\.[>\]]$/.test(flags);
|
|
385
|
-
this.mandatory = false;
|
|
386
|
-
const optionFlags = splitOptionFlags(flags);
|
|
387
|
-
this.short = optionFlags.shortFlag;
|
|
388
|
-
this.long = optionFlags.longFlag;
|
|
389
|
-
this.negate = false;
|
|
390
|
-
if (this.long) {
|
|
391
|
-
this.negate = this.long.startsWith("--no-");
|
|
392
|
-
}
|
|
393
|
-
this.defaultValue = undefined;
|
|
394
|
-
this.defaultValueDescription = undefined;
|
|
395
|
-
this.presetArg = undefined;
|
|
396
|
-
this.envVar = undefined;
|
|
397
|
-
this.parseArg = undefined;
|
|
398
|
-
this.hidden = false;
|
|
399
|
-
this.argChoices = undefined;
|
|
400
|
-
this.conflictsWith = [];
|
|
401
|
-
this.implied = undefined;
|
|
402
|
-
}
|
|
403
|
-
default(value, description) {
|
|
404
|
-
this.defaultValue = value;
|
|
405
|
-
this.defaultValueDescription = description;
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
preset(arg) {
|
|
409
|
-
this.presetArg = arg;
|
|
410
|
-
return this;
|
|
411
|
-
}
|
|
412
|
-
conflicts(names) {
|
|
413
|
-
this.conflictsWith = this.conflictsWith.concat(names);
|
|
414
|
-
return this;
|
|
415
|
-
}
|
|
416
|
-
implies(impliedOptionValues) {
|
|
417
|
-
let newImplied = impliedOptionValues;
|
|
418
|
-
if (typeof impliedOptionValues === "string") {
|
|
419
|
-
newImplied = { [impliedOptionValues]: true };
|
|
420
|
-
}
|
|
421
|
-
this.implied = Object.assign(this.implied || {}, newImplied);
|
|
422
|
-
return this;
|
|
423
|
-
}
|
|
424
|
-
env(name) {
|
|
425
|
-
this.envVar = name;
|
|
426
|
-
return this;
|
|
427
|
-
}
|
|
428
|
-
argParser(fn) {
|
|
429
|
-
this.parseArg = fn;
|
|
430
|
-
return this;
|
|
431
|
-
}
|
|
432
|
-
makeOptionMandatory(mandatory = true) {
|
|
433
|
-
this.mandatory = !!mandatory;
|
|
434
|
-
return this;
|
|
435
|
-
}
|
|
436
|
-
hideHelp(hide = true) {
|
|
437
|
-
this.hidden = !!hide;
|
|
438
|
-
return this;
|
|
439
|
-
}
|
|
440
|
-
_concatValue(value, previous) {
|
|
441
|
-
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
442
|
-
return [value];
|
|
443
|
-
}
|
|
444
|
-
return previous.concat(value);
|
|
445
|
-
}
|
|
446
|
-
choices(values) {
|
|
447
|
-
this.argChoices = values.slice();
|
|
448
|
-
this.parseArg = (arg, previous) => {
|
|
449
|
-
if (!this.argChoices.includes(arg)) {
|
|
450
|
-
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
451
|
-
}
|
|
452
|
-
if (this.variadic) {
|
|
453
|
-
return this._concatValue(arg, previous);
|
|
454
|
-
}
|
|
455
|
-
return arg;
|
|
456
|
-
};
|
|
457
|
-
return this;
|
|
458
|
-
}
|
|
459
|
-
name() {
|
|
460
|
-
if (this.long) {
|
|
461
|
-
return this.long.replace(/^--/, "");
|
|
462
|
-
}
|
|
463
|
-
return this.short.replace(/^-/, "");
|
|
464
|
-
}
|
|
465
|
-
attributeName() {
|
|
466
|
-
return camelcase(this.name().replace(/^no-/, ""));
|
|
467
|
-
}
|
|
468
|
-
is(arg) {
|
|
469
|
-
return this.short === arg || this.long === arg;
|
|
470
|
-
}
|
|
471
|
-
isBoolean() {
|
|
472
|
-
return !this.required && !this.optional && !this.negate;
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
class DualOptions {
|
|
477
|
-
constructor(options) {
|
|
478
|
-
this.positiveOptions = new Map;
|
|
479
|
-
this.negativeOptions = new Map;
|
|
480
|
-
this.dualOptions = new Set;
|
|
481
|
-
options.forEach((option) => {
|
|
482
|
-
if (option.negate) {
|
|
483
|
-
this.negativeOptions.set(option.attributeName(), option);
|
|
484
|
-
} else {
|
|
485
|
-
this.positiveOptions.set(option.attributeName(), option);
|
|
486
|
-
}
|
|
487
|
-
});
|
|
488
|
-
this.negativeOptions.forEach((value, key) => {
|
|
489
|
-
if (this.positiveOptions.has(key)) {
|
|
490
|
-
this.dualOptions.add(key);
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
valueFromOption(value, option) {
|
|
495
|
-
const optionKey = option.attributeName();
|
|
496
|
-
if (!this.dualOptions.has(optionKey))
|
|
497
|
-
return true;
|
|
498
|
-
const preset = this.negativeOptions.get(optionKey).presetArg;
|
|
499
|
-
const negativeValue = preset !== undefined ? preset : false;
|
|
500
|
-
return option.negate === (negativeValue === value);
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
function camelcase(str) {
|
|
504
|
-
return str.split("-").reduce((str2, word) => {
|
|
505
|
-
return str2 + word[0].toUpperCase() + word.slice(1);
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
function splitOptionFlags(flags) {
|
|
509
|
-
let shortFlag;
|
|
510
|
-
let longFlag;
|
|
511
|
-
const flagParts = flags.split(/[ |,]+/);
|
|
512
|
-
if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
|
|
513
|
-
shortFlag = flagParts.shift();
|
|
514
|
-
longFlag = flagParts.shift();
|
|
515
|
-
if (!shortFlag && /^-[^-]$/.test(longFlag)) {
|
|
516
|
-
shortFlag = longFlag;
|
|
517
|
-
longFlag = undefined;
|
|
518
|
-
}
|
|
519
|
-
return { shortFlag, longFlag };
|
|
520
|
-
}
|
|
521
|
-
exports.Option = Option;
|
|
522
|
-
exports.DualOptions = DualOptions;
|
|
523
|
-
});
|
|
524
|
-
|
|
525
|
-
// node_modules/commander/lib/suggestSimilar.js
|
|
526
|
-
var require_suggestSimilar = __commonJS((exports) => {
|
|
527
|
-
var maxDistance = 3;
|
|
528
|
-
function editDistance(a, b) {
|
|
529
|
-
if (Math.abs(a.length - b.length) > maxDistance)
|
|
530
|
-
return Math.max(a.length, b.length);
|
|
531
|
-
const d = [];
|
|
532
|
-
for (let i = 0;i <= a.length; i++) {
|
|
533
|
-
d[i] = [i];
|
|
534
|
-
}
|
|
535
|
-
for (let j = 0;j <= b.length; j++) {
|
|
536
|
-
d[0][j] = j;
|
|
537
|
-
}
|
|
538
|
-
for (let j = 1;j <= b.length; j++) {
|
|
539
|
-
for (let i = 1;i <= a.length; i++) {
|
|
540
|
-
let cost = 1;
|
|
541
|
-
if (a[i - 1] === b[j - 1]) {
|
|
542
|
-
cost = 0;
|
|
543
|
-
} else {
|
|
544
|
-
cost = 1;
|
|
545
|
-
}
|
|
546
|
-
d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
|
|
547
|
-
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
|
|
548
|
-
d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);
|
|
549
|
-
}
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
return d[a.length][b.length];
|
|
553
|
-
}
|
|
554
|
-
function suggestSimilar(word, candidates) {
|
|
555
|
-
if (!candidates || candidates.length === 0)
|
|
556
|
-
return "";
|
|
557
|
-
candidates = Array.from(new Set(candidates));
|
|
558
|
-
const searchingOptions = word.startsWith("--");
|
|
559
|
-
if (searchingOptions) {
|
|
560
|
-
word = word.slice(2);
|
|
561
|
-
candidates = candidates.map((candidate) => candidate.slice(2));
|
|
562
|
-
}
|
|
563
|
-
let similar = [];
|
|
564
|
-
let bestDistance = maxDistance;
|
|
565
|
-
const minSimilarity = 0.4;
|
|
566
|
-
candidates.forEach((candidate) => {
|
|
567
|
-
if (candidate.length <= 1)
|
|
568
|
-
return;
|
|
569
|
-
const distance = editDistance(word, candidate);
|
|
570
|
-
const length = Math.max(word.length, candidate.length);
|
|
571
|
-
const similarity = (length - distance) / length;
|
|
572
|
-
if (similarity > minSimilarity) {
|
|
573
|
-
if (distance < bestDistance) {
|
|
574
|
-
bestDistance = distance;
|
|
575
|
-
similar = [candidate];
|
|
576
|
-
} else if (distance === bestDistance) {
|
|
577
|
-
similar.push(candidate);
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
});
|
|
581
|
-
similar.sort((a, b) => a.localeCompare(b));
|
|
582
|
-
if (searchingOptions) {
|
|
583
|
-
similar = similar.map((candidate) => `--${candidate}`);
|
|
584
|
-
}
|
|
585
|
-
if (similar.length > 1) {
|
|
586
|
-
return `
|
|
587
|
-
(Did you mean one of ${similar.join(", ")}?)`;
|
|
588
|
-
}
|
|
589
|
-
if (similar.length === 1) {
|
|
590
|
-
return `
|
|
591
|
-
(Did you mean ${similar[0]}?)`;
|
|
592
|
-
}
|
|
593
|
-
return "";
|
|
594
|
-
}
|
|
595
|
-
exports.suggestSimilar = suggestSimilar;
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
// node_modules/commander/lib/command.js
|
|
599
|
-
var require_command = __commonJS((exports) => {
|
|
600
|
-
var EventEmitter = __require("events").EventEmitter;
|
|
601
|
-
var childProcess = __require("child_process");
|
|
602
|
-
var path = __require("path");
|
|
603
|
-
var fs = __require("fs");
|
|
604
|
-
var process2 = __require("process");
|
|
605
|
-
var { Argument, humanReadableArgName } = require_argument();
|
|
606
|
-
var { CommanderError } = require_error();
|
|
607
|
-
var { Help } = require_help();
|
|
608
|
-
var { Option, DualOptions } = require_option();
|
|
609
|
-
var { suggestSimilar } = require_suggestSimilar();
|
|
610
|
-
|
|
611
|
-
class Command extends EventEmitter {
|
|
612
|
-
constructor(name) {
|
|
613
|
-
super();
|
|
614
|
-
this.commands = [];
|
|
615
|
-
this.options = [];
|
|
616
|
-
this.parent = null;
|
|
617
|
-
this._allowUnknownOption = false;
|
|
618
|
-
this._allowExcessArguments = true;
|
|
619
|
-
this.registeredArguments = [];
|
|
620
|
-
this._args = this.registeredArguments;
|
|
621
|
-
this.args = [];
|
|
622
|
-
this.rawArgs = [];
|
|
623
|
-
this.processedArgs = [];
|
|
624
|
-
this._scriptPath = null;
|
|
625
|
-
this._name = name || "";
|
|
626
|
-
this._optionValues = {};
|
|
627
|
-
this._optionValueSources = {};
|
|
628
|
-
this._storeOptionsAsProperties = false;
|
|
629
|
-
this._actionHandler = null;
|
|
630
|
-
this._executableHandler = false;
|
|
631
|
-
this._executableFile = null;
|
|
632
|
-
this._executableDir = null;
|
|
633
|
-
this._defaultCommandName = null;
|
|
634
|
-
this._exitCallback = null;
|
|
635
|
-
this._aliases = [];
|
|
636
|
-
this._combineFlagAndOptionalValue = true;
|
|
637
|
-
this._description = "";
|
|
638
|
-
this._summary = "";
|
|
639
|
-
this._argsDescription = undefined;
|
|
640
|
-
this._enablePositionalOptions = false;
|
|
641
|
-
this._passThroughOptions = false;
|
|
642
|
-
this._lifeCycleHooks = {};
|
|
643
|
-
this._showHelpAfterError = false;
|
|
644
|
-
this._showSuggestionAfterError = true;
|
|
645
|
-
this._outputConfiguration = {
|
|
646
|
-
writeOut: (str) => process2.stdout.write(str),
|
|
647
|
-
writeErr: (str) => process2.stderr.write(str),
|
|
648
|
-
getOutHelpWidth: () => process2.stdout.isTTY ? process2.stdout.columns : undefined,
|
|
649
|
-
getErrHelpWidth: () => process2.stderr.isTTY ? process2.stderr.columns : undefined,
|
|
650
|
-
outputError: (str, write) => write(str)
|
|
651
|
-
};
|
|
652
|
-
this._hidden = false;
|
|
653
|
-
this._helpOption = undefined;
|
|
654
|
-
this._addImplicitHelpCommand = undefined;
|
|
655
|
-
this._helpCommand = undefined;
|
|
656
|
-
this._helpConfiguration = {};
|
|
657
|
-
}
|
|
658
|
-
copyInheritedSettings(sourceCommand) {
|
|
659
|
-
this._outputConfiguration = sourceCommand._outputConfiguration;
|
|
660
|
-
this._helpOption = sourceCommand._helpOption;
|
|
661
|
-
this._helpCommand = sourceCommand._helpCommand;
|
|
662
|
-
this._helpConfiguration = sourceCommand._helpConfiguration;
|
|
663
|
-
this._exitCallback = sourceCommand._exitCallback;
|
|
664
|
-
this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;
|
|
665
|
-
this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;
|
|
666
|
-
this._allowExcessArguments = sourceCommand._allowExcessArguments;
|
|
667
|
-
this._enablePositionalOptions = sourceCommand._enablePositionalOptions;
|
|
668
|
-
this._showHelpAfterError = sourceCommand._showHelpAfterError;
|
|
669
|
-
this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;
|
|
670
|
-
return this;
|
|
671
|
-
}
|
|
672
|
-
_getCommandAndAncestors() {
|
|
673
|
-
const result = [];
|
|
674
|
-
for (let command = this;command; command = command.parent) {
|
|
675
|
-
result.push(command);
|
|
676
|
-
}
|
|
677
|
-
return result;
|
|
678
|
-
}
|
|
679
|
-
command(nameAndArgs, actionOptsOrExecDesc, execOpts) {
|
|
680
|
-
let desc = actionOptsOrExecDesc;
|
|
681
|
-
let opts = execOpts;
|
|
682
|
-
if (typeof desc === "object" && desc !== null) {
|
|
683
|
-
opts = desc;
|
|
684
|
-
desc = null;
|
|
685
|
-
}
|
|
686
|
-
opts = opts || {};
|
|
687
|
-
const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);
|
|
688
|
-
const cmd = this.createCommand(name);
|
|
689
|
-
if (desc) {
|
|
690
|
-
cmd.description(desc);
|
|
691
|
-
cmd._executableHandler = true;
|
|
692
|
-
}
|
|
693
|
-
if (opts.isDefault)
|
|
694
|
-
this._defaultCommandName = cmd._name;
|
|
695
|
-
cmd._hidden = !!(opts.noHelp || opts.hidden);
|
|
696
|
-
cmd._executableFile = opts.executableFile || null;
|
|
697
|
-
if (args)
|
|
698
|
-
cmd.arguments(args);
|
|
699
|
-
this._registerCommand(cmd);
|
|
700
|
-
cmd.parent = this;
|
|
701
|
-
cmd.copyInheritedSettings(this);
|
|
702
|
-
if (desc)
|
|
703
|
-
return this;
|
|
704
|
-
return cmd;
|
|
705
|
-
}
|
|
706
|
-
createCommand(name) {
|
|
707
|
-
return new Command(name);
|
|
708
|
-
}
|
|
709
|
-
createHelp() {
|
|
710
|
-
return Object.assign(new Help, this.configureHelp());
|
|
711
|
-
}
|
|
712
|
-
configureHelp(configuration) {
|
|
713
|
-
if (configuration === undefined)
|
|
714
|
-
return this._helpConfiguration;
|
|
715
|
-
this._helpConfiguration = configuration;
|
|
716
|
-
return this;
|
|
717
|
-
}
|
|
718
|
-
configureOutput(configuration) {
|
|
719
|
-
if (configuration === undefined)
|
|
720
|
-
return this._outputConfiguration;
|
|
721
|
-
Object.assign(this._outputConfiguration, configuration);
|
|
722
|
-
return this;
|
|
723
|
-
}
|
|
724
|
-
showHelpAfterError(displayHelp = true) {
|
|
725
|
-
if (typeof displayHelp !== "string")
|
|
726
|
-
displayHelp = !!displayHelp;
|
|
727
|
-
this._showHelpAfterError = displayHelp;
|
|
728
|
-
return this;
|
|
729
|
-
}
|
|
730
|
-
showSuggestionAfterError(displaySuggestion = true) {
|
|
731
|
-
this._showSuggestionAfterError = !!displaySuggestion;
|
|
732
|
-
return this;
|
|
733
|
-
}
|
|
734
|
-
addCommand(cmd, opts) {
|
|
735
|
-
if (!cmd._name) {
|
|
736
|
-
throw new Error(`Command passed to .addCommand() must have a name
|
|
737
|
-
- specify the name in Command constructor or using .name()`);
|
|
738
|
-
}
|
|
739
|
-
opts = opts || {};
|
|
740
|
-
if (opts.isDefault)
|
|
741
|
-
this._defaultCommandName = cmd._name;
|
|
742
|
-
if (opts.noHelp || opts.hidden)
|
|
743
|
-
cmd._hidden = true;
|
|
744
|
-
this._registerCommand(cmd);
|
|
745
|
-
cmd.parent = this;
|
|
746
|
-
cmd._checkForBrokenPassThrough();
|
|
747
|
-
return this;
|
|
748
|
-
}
|
|
749
|
-
createArgument(name, description) {
|
|
750
|
-
return new Argument(name, description);
|
|
751
|
-
}
|
|
752
|
-
argument(name, description, fn, defaultValue) {
|
|
753
|
-
const argument = this.createArgument(name, description);
|
|
754
|
-
if (typeof fn === "function") {
|
|
755
|
-
argument.default(defaultValue).argParser(fn);
|
|
756
|
-
} else {
|
|
757
|
-
argument.default(fn);
|
|
758
|
-
}
|
|
759
|
-
this.addArgument(argument);
|
|
760
|
-
return this;
|
|
761
|
-
}
|
|
762
|
-
arguments(names) {
|
|
763
|
-
names.trim().split(/ +/).forEach((detail) => {
|
|
764
|
-
this.argument(detail);
|
|
765
|
-
});
|
|
766
|
-
return this;
|
|
767
|
-
}
|
|
768
|
-
addArgument(argument) {
|
|
769
|
-
const previousArgument = this.registeredArguments.slice(-1)[0];
|
|
770
|
-
if (previousArgument && previousArgument.variadic) {
|
|
771
|
-
throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
|
|
772
|
-
}
|
|
773
|
-
if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
|
|
774
|
-
throw new Error(`a default value for a required argument is never used: '${argument.name()}'`);
|
|
775
|
-
}
|
|
776
|
-
this.registeredArguments.push(argument);
|
|
777
|
-
return this;
|
|
778
|
-
}
|
|
779
|
-
helpCommand(enableOrNameAndArgs, description) {
|
|
780
|
-
if (typeof enableOrNameAndArgs === "boolean") {
|
|
781
|
-
this._addImplicitHelpCommand = enableOrNameAndArgs;
|
|
782
|
-
return this;
|
|
783
|
-
}
|
|
784
|
-
enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
|
|
785
|
-
const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
|
|
786
|
-
const helpDescription = description ?? "display help for command";
|
|
787
|
-
const helpCommand = this.createCommand(helpName);
|
|
788
|
-
helpCommand.helpOption(false);
|
|
789
|
-
if (helpArgs)
|
|
790
|
-
helpCommand.arguments(helpArgs);
|
|
791
|
-
if (helpDescription)
|
|
792
|
-
helpCommand.description(helpDescription);
|
|
793
|
-
this._addImplicitHelpCommand = true;
|
|
794
|
-
this._helpCommand = helpCommand;
|
|
795
|
-
return this;
|
|
796
|
-
}
|
|
797
|
-
addHelpCommand(helpCommand, deprecatedDescription) {
|
|
798
|
-
if (typeof helpCommand !== "object") {
|
|
799
|
-
this.helpCommand(helpCommand, deprecatedDescription);
|
|
800
|
-
return this;
|
|
801
|
-
}
|
|
802
|
-
this._addImplicitHelpCommand = true;
|
|
803
|
-
this._helpCommand = helpCommand;
|
|
804
|
-
return this;
|
|
805
|
-
}
|
|
806
|
-
_getHelpCommand() {
|
|
807
|
-
const hasImplicitHelpCommand = this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help"));
|
|
808
|
-
if (hasImplicitHelpCommand) {
|
|
809
|
-
if (this._helpCommand === undefined) {
|
|
810
|
-
this.helpCommand(undefined, undefined);
|
|
811
|
-
}
|
|
812
|
-
return this._helpCommand;
|
|
813
|
-
}
|
|
814
|
-
return null;
|
|
815
|
-
}
|
|
816
|
-
hook(event, listener) {
|
|
817
|
-
const allowedValues = ["preSubcommand", "preAction", "postAction"];
|
|
818
|
-
if (!allowedValues.includes(event)) {
|
|
819
|
-
throw new Error(`Unexpected value for event passed to hook : '${event}'.
|
|
820
|
-
Expecting one of '${allowedValues.join("', '")}'`);
|
|
821
|
-
}
|
|
822
|
-
if (this._lifeCycleHooks[event]) {
|
|
823
|
-
this._lifeCycleHooks[event].push(listener);
|
|
824
|
-
} else {
|
|
825
|
-
this._lifeCycleHooks[event] = [listener];
|
|
826
|
-
}
|
|
827
|
-
return this;
|
|
828
|
-
}
|
|
829
|
-
exitOverride(fn) {
|
|
830
|
-
if (fn) {
|
|
831
|
-
this._exitCallback = fn;
|
|
832
|
-
} else {
|
|
833
|
-
this._exitCallback = (err) => {
|
|
834
|
-
if (err.code !== "commander.executeSubCommandAsync") {
|
|
835
|
-
throw err;
|
|
836
|
-
} else {}
|
|
837
|
-
};
|
|
838
|
-
}
|
|
839
|
-
return this;
|
|
840
|
-
}
|
|
841
|
-
_exit(exitCode, code, message) {
|
|
842
|
-
if (this._exitCallback) {
|
|
843
|
-
this._exitCallback(new CommanderError(exitCode, code, message));
|
|
844
|
-
}
|
|
845
|
-
process2.exit(exitCode);
|
|
846
|
-
}
|
|
847
|
-
action(fn) {
|
|
848
|
-
const listener = (args) => {
|
|
849
|
-
const expectedArgsCount = this.registeredArguments.length;
|
|
850
|
-
const actionArgs = args.slice(0, expectedArgsCount);
|
|
851
|
-
if (this._storeOptionsAsProperties) {
|
|
852
|
-
actionArgs[expectedArgsCount] = this;
|
|
853
|
-
} else {
|
|
854
|
-
actionArgs[expectedArgsCount] = this.opts();
|
|
855
|
-
}
|
|
856
|
-
actionArgs.push(this);
|
|
857
|
-
return fn.apply(this, actionArgs);
|
|
858
|
-
};
|
|
859
|
-
this._actionHandler = listener;
|
|
860
|
-
return this;
|
|
861
|
-
}
|
|
862
|
-
createOption(flags, description) {
|
|
863
|
-
return new Option(flags, description);
|
|
864
|
-
}
|
|
865
|
-
_callParseArg(target, value, previous, invalidArgumentMessage) {
|
|
866
|
-
try {
|
|
867
|
-
return target.parseArg(value, previous);
|
|
868
|
-
} catch (err) {
|
|
869
|
-
if (err.code === "commander.invalidArgument") {
|
|
870
|
-
const message = `${invalidArgumentMessage} ${err.message}`;
|
|
871
|
-
this.error(message, { exitCode: err.exitCode, code: err.code });
|
|
872
|
-
}
|
|
873
|
-
throw err;
|
|
874
|
-
}
|
|
875
|
-
}
|
|
876
|
-
_registerOption(option) {
|
|
877
|
-
const matchingOption = option.short && this._findOption(option.short) || option.long && this._findOption(option.long);
|
|
878
|
-
if (matchingOption) {
|
|
879
|
-
const matchingFlag = option.long && this._findOption(option.long) ? option.long : option.short;
|
|
880
|
-
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
|
|
881
|
-
- already used by option '${matchingOption.flags}'`);
|
|
882
|
-
}
|
|
883
|
-
this.options.push(option);
|
|
884
|
-
}
|
|
885
|
-
_registerCommand(command) {
|
|
886
|
-
const knownBy = (cmd) => {
|
|
887
|
-
return [cmd.name()].concat(cmd.aliases());
|
|
888
|
-
};
|
|
889
|
-
const alreadyUsed = knownBy(command).find((name) => this._findCommand(name));
|
|
890
|
-
if (alreadyUsed) {
|
|
891
|
-
const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|");
|
|
892
|
-
const newCmd = knownBy(command).join("|");
|
|
893
|
-
throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
|
|
894
|
-
}
|
|
895
|
-
this.commands.push(command);
|
|
896
|
-
}
|
|
897
|
-
addOption(option) {
|
|
898
|
-
this._registerOption(option);
|
|
899
|
-
const oname = option.name();
|
|
900
|
-
const name = option.attributeName();
|
|
901
|
-
if (option.negate) {
|
|
902
|
-
const positiveLongFlag = option.long.replace(/^--no-/, "--");
|
|
903
|
-
if (!this._findOption(positiveLongFlag)) {
|
|
904
|
-
this.setOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, "default");
|
|
905
|
-
}
|
|
906
|
-
} else if (option.defaultValue !== undefined) {
|
|
907
|
-
this.setOptionValueWithSource(name, option.defaultValue, "default");
|
|
908
|
-
}
|
|
909
|
-
const handleOptionValue = (val, invalidValueMessage, valueSource) => {
|
|
910
|
-
if (val == null && option.presetArg !== undefined) {
|
|
911
|
-
val = option.presetArg;
|
|
912
|
-
}
|
|
913
|
-
const oldValue = this.getOptionValue(name);
|
|
914
|
-
if (val !== null && option.parseArg) {
|
|
915
|
-
val = this._callParseArg(option, val, oldValue, invalidValueMessage);
|
|
916
|
-
} else if (val !== null && option.variadic) {
|
|
917
|
-
val = option._concatValue(val, oldValue);
|
|
918
|
-
}
|
|
919
|
-
if (val == null) {
|
|
920
|
-
if (option.negate) {
|
|
921
|
-
val = false;
|
|
922
|
-
} else if (option.isBoolean() || option.optional) {
|
|
923
|
-
val = true;
|
|
924
|
-
} else {
|
|
925
|
-
val = "";
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
this.setOptionValueWithSource(name, val, valueSource);
|
|
929
|
-
};
|
|
930
|
-
this.on("option:" + oname, (val) => {
|
|
931
|
-
const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;
|
|
932
|
-
handleOptionValue(val, invalidValueMessage, "cli");
|
|
933
|
-
});
|
|
934
|
-
if (option.envVar) {
|
|
935
|
-
this.on("optionEnv:" + oname, (val) => {
|
|
936
|
-
const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;
|
|
937
|
-
handleOptionValue(val, invalidValueMessage, "env");
|
|
938
|
-
});
|
|
939
|
-
}
|
|
940
|
-
return this;
|
|
941
|
-
}
|
|
942
|
-
_optionEx(config, flags, description, fn, defaultValue) {
|
|
943
|
-
if (typeof flags === "object" && flags instanceof Option) {
|
|
944
|
-
throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
|
|
945
|
-
}
|
|
946
|
-
const option = this.createOption(flags, description);
|
|
947
|
-
option.makeOptionMandatory(!!config.mandatory);
|
|
948
|
-
if (typeof fn === "function") {
|
|
949
|
-
option.default(defaultValue).argParser(fn);
|
|
950
|
-
} else if (fn instanceof RegExp) {
|
|
951
|
-
const regex = fn;
|
|
952
|
-
fn = (val, def) => {
|
|
953
|
-
const m = regex.exec(val);
|
|
954
|
-
return m ? m[0] : def;
|
|
955
|
-
};
|
|
956
|
-
option.default(defaultValue).argParser(fn);
|
|
957
|
-
} else {
|
|
958
|
-
option.default(fn);
|
|
959
|
-
}
|
|
960
|
-
return this.addOption(option);
|
|
961
|
-
}
|
|
962
|
-
option(flags, description, parseArg, defaultValue) {
|
|
963
|
-
return this._optionEx({}, flags, description, parseArg, defaultValue);
|
|
964
|
-
}
|
|
965
|
-
requiredOption(flags, description, parseArg, defaultValue) {
|
|
966
|
-
return this._optionEx({ mandatory: true }, flags, description, parseArg, defaultValue);
|
|
967
|
-
}
|
|
968
|
-
combineFlagAndOptionalValue(combine = true) {
|
|
969
|
-
this._combineFlagAndOptionalValue = !!combine;
|
|
970
|
-
return this;
|
|
971
|
-
}
|
|
972
|
-
allowUnknownOption(allowUnknown = true) {
|
|
973
|
-
this._allowUnknownOption = !!allowUnknown;
|
|
974
|
-
return this;
|
|
975
|
-
}
|
|
976
|
-
allowExcessArguments(allowExcess = true) {
|
|
977
|
-
this._allowExcessArguments = !!allowExcess;
|
|
978
|
-
return this;
|
|
979
|
-
}
|
|
980
|
-
enablePositionalOptions(positional = true) {
|
|
981
|
-
this._enablePositionalOptions = !!positional;
|
|
982
|
-
return this;
|
|
983
|
-
}
|
|
984
|
-
passThroughOptions(passThrough = true) {
|
|
985
|
-
this._passThroughOptions = !!passThrough;
|
|
986
|
-
this._checkForBrokenPassThrough();
|
|
987
|
-
return this;
|
|
988
|
-
}
|
|
989
|
-
_checkForBrokenPassThrough() {
|
|
990
|
-
if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {
|
|
991
|
-
throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);
|
|
992
|
-
}
|
|
993
|
-
}
|
|
994
|
-
storeOptionsAsProperties(storeAsProperties = true) {
|
|
995
|
-
if (this.options.length) {
|
|
996
|
-
throw new Error("call .storeOptionsAsProperties() before adding options");
|
|
997
|
-
}
|
|
998
|
-
if (Object.keys(this._optionValues).length) {
|
|
999
|
-
throw new Error("call .storeOptionsAsProperties() before setting option values");
|
|
1000
|
-
}
|
|
1001
|
-
this._storeOptionsAsProperties = !!storeAsProperties;
|
|
1002
|
-
return this;
|
|
1003
|
-
}
|
|
1004
|
-
getOptionValue(key) {
|
|
1005
|
-
if (this._storeOptionsAsProperties) {
|
|
1006
|
-
return this[key];
|
|
1007
|
-
}
|
|
1008
|
-
return this._optionValues[key];
|
|
1009
|
-
}
|
|
1010
|
-
setOptionValue(key, value) {
|
|
1011
|
-
return this.setOptionValueWithSource(key, value, undefined);
|
|
1012
|
-
}
|
|
1013
|
-
setOptionValueWithSource(key, value, source) {
|
|
1014
|
-
if (this._storeOptionsAsProperties) {
|
|
1015
|
-
this[key] = value;
|
|
1016
|
-
} else {
|
|
1017
|
-
this._optionValues[key] = value;
|
|
1018
|
-
}
|
|
1019
|
-
this._optionValueSources[key] = source;
|
|
1020
|
-
return this;
|
|
1021
|
-
}
|
|
1022
|
-
getOptionValueSource(key) {
|
|
1023
|
-
return this._optionValueSources[key];
|
|
1024
|
-
}
|
|
1025
|
-
getOptionValueSourceWithGlobals(key) {
|
|
1026
|
-
let source;
|
|
1027
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1028
|
-
if (cmd.getOptionValueSource(key) !== undefined) {
|
|
1029
|
-
source = cmd.getOptionValueSource(key);
|
|
1030
|
-
}
|
|
1031
|
-
});
|
|
1032
|
-
return source;
|
|
1033
|
-
}
|
|
1034
|
-
_prepareUserArgs(argv, parseOptions) {
|
|
1035
|
-
if (argv !== undefined && !Array.isArray(argv)) {
|
|
1036
|
-
throw new Error("first parameter to parse must be array or undefined");
|
|
1037
|
-
}
|
|
1038
|
-
parseOptions = parseOptions || {};
|
|
1039
|
-
if (argv === undefined && parseOptions.from === undefined) {
|
|
1040
|
-
if (process2.versions?.electron) {
|
|
1041
|
-
parseOptions.from = "electron";
|
|
1042
|
-
}
|
|
1043
|
-
const execArgv = process2.execArgv ?? [];
|
|
1044
|
-
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
|
|
1045
|
-
parseOptions.from = "eval";
|
|
1046
|
-
}
|
|
1047
|
-
}
|
|
1048
|
-
if (argv === undefined) {
|
|
1049
|
-
argv = process2.argv;
|
|
1050
|
-
}
|
|
1051
|
-
this.rawArgs = argv.slice();
|
|
1052
|
-
let userArgs;
|
|
1053
|
-
switch (parseOptions.from) {
|
|
1054
|
-
case undefined:
|
|
1055
|
-
case "node":
|
|
1056
|
-
this._scriptPath = argv[1];
|
|
1057
|
-
userArgs = argv.slice(2);
|
|
1058
|
-
break;
|
|
1059
|
-
case "electron":
|
|
1060
|
-
if (process2.defaultApp) {
|
|
1061
|
-
this._scriptPath = argv[1];
|
|
1062
|
-
userArgs = argv.slice(2);
|
|
1063
|
-
} else {
|
|
1064
|
-
userArgs = argv.slice(1);
|
|
1065
|
-
}
|
|
1066
|
-
break;
|
|
1067
|
-
case "user":
|
|
1068
|
-
userArgs = argv.slice(0);
|
|
1069
|
-
break;
|
|
1070
|
-
case "eval":
|
|
1071
|
-
userArgs = argv.slice(1);
|
|
1072
|
-
break;
|
|
1073
|
-
default:
|
|
1074
|
-
throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
|
|
1075
|
-
}
|
|
1076
|
-
if (!this._name && this._scriptPath)
|
|
1077
|
-
this.nameFromFilename(this._scriptPath);
|
|
1078
|
-
this._name = this._name || "program";
|
|
1079
|
-
return userArgs;
|
|
1080
|
-
}
|
|
1081
|
-
parse(argv, parseOptions) {
|
|
1082
|
-
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1083
|
-
this._parseCommand([], userArgs);
|
|
1084
|
-
return this;
|
|
1085
|
-
}
|
|
1086
|
-
async parseAsync(argv, parseOptions) {
|
|
1087
|
-
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1088
|
-
await this._parseCommand([], userArgs);
|
|
1089
|
-
return this;
|
|
1090
|
-
}
|
|
1091
|
-
_executeSubCommand(subcommand, args) {
|
|
1092
|
-
args = args.slice();
|
|
1093
|
-
let launchWithNode = false;
|
|
1094
|
-
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1095
|
-
function findFile(baseDir, baseName) {
|
|
1096
|
-
const localBin = path.resolve(baseDir, baseName);
|
|
1097
|
-
if (fs.existsSync(localBin))
|
|
1098
|
-
return localBin;
|
|
1099
|
-
if (sourceExt.includes(path.extname(baseName)))
|
|
1100
|
-
return;
|
|
1101
|
-
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
1102
|
-
if (foundExt)
|
|
1103
|
-
return `${localBin}${foundExt}`;
|
|
1104
|
-
return;
|
|
1105
|
-
}
|
|
1106
|
-
this._checkForMissingMandatoryOptions();
|
|
1107
|
-
this._checkForConflictingOptions();
|
|
1108
|
-
let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`;
|
|
1109
|
-
let executableDir = this._executableDir || "";
|
|
1110
|
-
if (this._scriptPath) {
|
|
1111
|
-
let resolvedScriptPath;
|
|
1112
|
-
try {
|
|
1113
|
-
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1114
|
-
} catch (err) {
|
|
1115
|
-
resolvedScriptPath = this._scriptPath;
|
|
1116
|
-
}
|
|
1117
|
-
executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
|
|
1118
|
-
}
|
|
1119
|
-
if (executableDir) {
|
|
1120
|
-
let localFile = findFile(executableDir, executableFile);
|
|
1121
|
-
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1122
|
-
const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));
|
|
1123
|
-
if (legacyName !== this._name) {
|
|
1124
|
-
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
executableFile = localFile || executableFile;
|
|
1128
|
-
}
|
|
1129
|
-
launchWithNode = sourceExt.includes(path.extname(executableFile));
|
|
1130
|
-
let proc;
|
|
1131
|
-
if (process2.platform !== "win32") {
|
|
1132
|
-
if (launchWithNode) {
|
|
1133
|
-
args.unshift(executableFile);
|
|
1134
|
-
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
1135
|
-
proc = childProcess.spawn(process2.argv[0], args, { stdio: "inherit" });
|
|
1136
|
-
} else {
|
|
1137
|
-
proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
1138
|
-
}
|
|
1139
|
-
} else {
|
|
1140
|
-
args.unshift(executableFile);
|
|
1141
|
-
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
1142
|
-
proc = childProcess.spawn(process2.execPath, args, { stdio: "inherit" });
|
|
1143
|
-
}
|
|
1144
|
-
if (!proc.killed) {
|
|
1145
|
-
const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
1146
|
-
signals.forEach((signal) => {
|
|
1147
|
-
process2.on(signal, () => {
|
|
1148
|
-
if (proc.killed === false && proc.exitCode === null) {
|
|
1149
|
-
proc.kill(signal);
|
|
1150
|
-
}
|
|
1151
|
-
});
|
|
1152
|
-
});
|
|
1153
|
-
}
|
|
1154
|
-
const exitCallback = this._exitCallback;
|
|
1155
|
-
proc.on("close", (code) => {
|
|
1156
|
-
code = code ?? 1;
|
|
1157
|
-
if (!exitCallback) {
|
|
1158
|
-
process2.exit(code);
|
|
1159
|
-
} else {
|
|
1160
|
-
exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
1161
|
-
}
|
|
1162
|
-
});
|
|
1163
|
-
proc.on("error", (err) => {
|
|
1164
|
-
if (err.code === "ENOENT") {
|
|
1165
|
-
const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
|
|
1166
|
-
const executableMissing = `'${executableFile}' does not exist
|
|
1167
|
-
- if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
1168
|
-
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
1169
|
-
- ${executableDirMessage}`;
|
|
1170
|
-
throw new Error(executableMissing);
|
|
1171
|
-
} else if (err.code === "EACCES") {
|
|
1172
|
-
throw new Error(`'${executableFile}' not executable`);
|
|
1173
|
-
}
|
|
1174
|
-
if (!exitCallback) {
|
|
1175
|
-
process2.exit(1);
|
|
1176
|
-
} else {
|
|
1177
|
-
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1178
|
-
wrappedError.nestedError = err;
|
|
1179
|
-
exitCallback(wrappedError);
|
|
1180
|
-
}
|
|
1181
|
-
});
|
|
1182
|
-
this.runningCommand = proc;
|
|
1183
|
-
}
|
|
1184
|
-
_dispatchSubcommand(commandName, operands, unknown) {
|
|
1185
|
-
const subCommand = this._findCommand(commandName);
|
|
1186
|
-
if (!subCommand)
|
|
1187
|
-
this.help({ error: true });
|
|
1188
|
-
let promiseChain;
|
|
1189
|
-
promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, "preSubcommand");
|
|
1190
|
-
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1191
|
-
if (subCommand._executableHandler) {
|
|
1192
|
-
this._executeSubCommand(subCommand, operands.concat(unknown));
|
|
1193
|
-
} else {
|
|
1194
|
-
return subCommand._parseCommand(operands, unknown);
|
|
1195
|
-
}
|
|
1196
|
-
});
|
|
1197
|
-
return promiseChain;
|
|
1198
|
-
}
|
|
1199
|
-
_dispatchHelpCommand(subcommandName) {
|
|
1200
|
-
if (!subcommandName) {
|
|
1201
|
-
this.help();
|
|
1202
|
-
}
|
|
1203
|
-
const subCommand = this._findCommand(subcommandName);
|
|
1204
|
-
if (subCommand && !subCommand._executableHandler) {
|
|
1205
|
-
subCommand.help();
|
|
1206
|
-
}
|
|
1207
|
-
return this._dispatchSubcommand(subcommandName, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
|
|
1208
|
-
}
|
|
1209
|
-
_checkNumberOfArguments() {
|
|
1210
|
-
this.registeredArguments.forEach((arg, i) => {
|
|
1211
|
-
if (arg.required && this.args[i] == null) {
|
|
1212
|
-
this.missingArgument(arg.name());
|
|
1213
|
-
}
|
|
1214
|
-
});
|
|
1215
|
-
if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) {
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
if (this.args.length > this.registeredArguments.length) {
|
|
1219
|
-
this._excessArguments(this.args);
|
|
1220
|
-
}
|
|
1221
|
-
}
|
|
1222
|
-
_processArguments() {
|
|
1223
|
-
const myParseArg = (argument, value, previous) => {
|
|
1224
|
-
let parsedValue = value;
|
|
1225
|
-
if (value !== null && argument.parseArg) {
|
|
1226
|
-
const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;
|
|
1227
|
-
parsedValue = this._callParseArg(argument, value, previous, invalidValueMessage);
|
|
1228
|
-
}
|
|
1229
|
-
return parsedValue;
|
|
1230
|
-
};
|
|
1231
|
-
this._checkNumberOfArguments();
|
|
1232
|
-
const processedArgs = [];
|
|
1233
|
-
this.registeredArguments.forEach((declaredArg, index) => {
|
|
1234
|
-
let value = declaredArg.defaultValue;
|
|
1235
|
-
if (declaredArg.variadic) {
|
|
1236
|
-
if (index < this.args.length) {
|
|
1237
|
-
value = this.args.slice(index);
|
|
1238
|
-
if (declaredArg.parseArg) {
|
|
1239
|
-
value = value.reduce((processed, v) => {
|
|
1240
|
-
return myParseArg(declaredArg, v, processed);
|
|
1241
|
-
}, declaredArg.defaultValue);
|
|
1242
|
-
}
|
|
1243
|
-
} else if (value === undefined) {
|
|
1244
|
-
value = [];
|
|
1245
|
-
}
|
|
1246
|
-
} else if (index < this.args.length) {
|
|
1247
|
-
value = this.args[index];
|
|
1248
|
-
if (declaredArg.parseArg) {
|
|
1249
|
-
value = myParseArg(declaredArg, value, declaredArg.defaultValue);
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
processedArgs[index] = value;
|
|
1253
|
-
});
|
|
1254
|
-
this.processedArgs = processedArgs;
|
|
1255
|
-
}
|
|
1256
|
-
_chainOrCall(promise, fn) {
|
|
1257
|
-
if (promise && promise.then && typeof promise.then === "function") {
|
|
1258
|
-
return promise.then(() => fn());
|
|
1259
|
-
}
|
|
1260
|
-
return fn();
|
|
1261
|
-
}
|
|
1262
|
-
_chainOrCallHooks(promise, event) {
|
|
1263
|
-
let result = promise;
|
|
1264
|
-
const hooks = [];
|
|
1265
|
-
this._getCommandAndAncestors().reverse().filter((cmd) => cmd._lifeCycleHooks[event] !== undefined).forEach((hookedCommand) => {
|
|
1266
|
-
hookedCommand._lifeCycleHooks[event].forEach((callback) => {
|
|
1267
|
-
hooks.push({ hookedCommand, callback });
|
|
1268
|
-
});
|
|
1269
|
-
});
|
|
1270
|
-
if (event === "postAction") {
|
|
1271
|
-
hooks.reverse();
|
|
1272
|
-
}
|
|
1273
|
-
hooks.forEach((hookDetail) => {
|
|
1274
|
-
result = this._chainOrCall(result, () => {
|
|
1275
|
-
return hookDetail.callback(hookDetail.hookedCommand, this);
|
|
1276
|
-
});
|
|
1277
|
-
});
|
|
1278
|
-
return result;
|
|
1279
|
-
}
|
|
1280
|
-
_chainOrCallSubCommandHook(promise, subCommand, event) {
|
|
1281
|
-
let result = promise;
|
|
1282
|
-
if (this._lifeCycleHooks[event] !== undefined) {
|
|
1283
|
-
this._lifeCycleHooks[event].forEach((hook) => {
|
|
1284
|
-
result = this._chainOrCall(result, () => {
|
|
1285
|
-
return hook(this, subCommand);
|
|
1286
|
-
});
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
return result;
|
|
1290
|
-
}
|
|
1291
|
-
_parseCommand(operands, unknown) {
|
|
1292
|
-
const parsed = this.parseOptions(unknown);
|
|
1293
|
-
this._parseOptionsEnv();
|
|
1294
|
-
this._parseOptionsImplied();
|
|
1295
|
-
operands = operands.concat(parsed.operands);
|
|
1296
|
-
unknown = parsed.unknown;
|
|
1297
|
-
this.args = operands.concat(unknown);
|
|
1298
|
-
if (operands && this._findCommand(operands[0])) {
|
|
1299
|
-
return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
|
|
1300
|
-
}
|
|
1301
|
-
if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {
|
|
1302
|
-
return this._dispatchHelpCommand(operands[1]);
|
|
1303
|
-
}
|
|
1304
|
-
if (this._defaultCommandName) {
|
|
1305
|
-
this._outputHelpIfRequested(unknown);
|
|
1306
|
-
return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);
|
|
1307
|
-
}
|
|
1308
|
-
if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
|
|
1309
|
-
this.help({ error: true });
|
|
1310
|
-
}
|
|
1311
|
-
this._outputHelpIfRequested(parsed.unknown);
|
|
1312
|
-
this._checkForMissingMandatoryOptions();
|
|
1313
|
-
this._checkForConflictingOptions();
|
|
1314
|
-
const checkForUnknownOptions = () => {
|
|
1315
|
-
if (parsed.unknown.length > 0) {
|
|
1316
|
-
this.unknownOption(parsed.unknown[0]);
|
|
1317
|
-
}
|
|
1318
|
-
};
|
|
1319
|
-
const commandEvent = `command:${this.name()}`;
|
|
1320
|
-
if (this._actionHandler) {
|
|
1321
|
-
checkForUnknownOptions();
|
|
1322
|
-
this._processArguments();
|
|
1323
|
-
let promiseChain;
|
|
1324
|
-
promiseChain = this._chainOrCallHooks(promiseChain, "preAction");
|
|
1325
|
-
promiseChain = this._chainOrCall(promiseChain, () => this._actionHandler(this.processedArgs));
|
|
1326
|
-
if (this.parent) {
|
|
1327
|
-
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1328
|
-
this.parent.emit(commandEvent, operands, unknown);
|
|
1329
|
-
});
|
|
1330
|
-
}
|
|
1331
|
-
promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
|
|
1332
|
-
return promiseChain;
|
|
1333
|
-
}
|
|
1334
|
-
if (this.parent && this.parent.listenerCount(commandEvent)) {
|
|
1335
|
-
checkForUnknownOptions();
|
|
1336
|
-
this._processArguments();
|
|
1337
|
-
this.parent.emit(commandEvent, operands, unknown);
|
|
1338
|
-
} else if (operands.length) {
|
|
1339
|
-
if (this._findCommand("*")) {
|
|
1340
|
-
return this._dispatchSubcommand("*", operands, unknown);
|
|
1341
|
-
}
|
|
1342
|
-
if (this.listenerCount("command:*")) {
|
|
1343
|
-
this.emit("command:*", operands, unknown);
|
|
1344
|
-
} else if (this.commands.length) {
|
|
1345
|
-
this.unknownCommand();
|
|
1346
|
-
} else {
|
|
1347
|
-
checkForUnknownOptions();
|
|
1348
|
-
this._processArguments();
|
|
1349
|
-
}
|
|
1350
|
-
} else if (this.commands.length) {
|
|
1351
|
-
checkForUnknownOptions();
|
|
1352
|
-
this.help({ error: true });
|
|
1353
|
-
} else {
|
|
1354
|
-
checkForUnknownOptions();
|
|
1355
|
-
this._processArguments();
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
_findCommand(name) {
|
|
1359
|
-
if (!name)
|
|
1360
|
-
return;
|
|
1361
|
-
return this.commands.find((cmd) => cmd._name === name || cmd._aliases.includes(name));
|
|
1362
|
-
}
|
|
1363
|
-
_findOption(arg) {
|
|
1364
|
-
return this.options.find((option) => option.is(arg));
|
|
1365
|
-
}
|
|
1366
|
-
_checkForMissingMandatoryOptions() {
|
|
1367
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1368
|
-
cmd.options.forEach((anOption) => {
|
|
1369
|
-
if (anOption.mandatory && cmd.getOptionValue(anOption.attributeName()) === undefined) {
|
|
1370
|
-
cmd.missingMandatoryOptionValue(anOption);
|
|
1371
|
-
}
|
|
1372
|
-
});
|
|
1373
|
-
});
|
|
1374
|
-
}
|
|
1375
|
-
_checkForConflictingLocalOptions() {
|
|
1376
|
-
const definedNonDefaultOptions = this.options.filter((option) => {
|
|
1377
|
-
const optionKey = option.attributeName();
|
|
1378
|
-
if (this.getOptionValue(optionKey) === undefined) {
|
|
1379
|
-
return false;
|
|
1380
|
-
}
|
|
1381
|
-
return this.getOptionValueSource(optionKey) !== "default";
|
|
1382
|
-
});
|
|
1383
|
-
const optionsWithConflicting = definedNonDefaultOptions.filter((option) => option.conflictsWith.length > 0);
|
|
1384
|
-
optionsWithConflicting.forEach((option) => {
|
|
1385
|
-
const conflictingAndDefined = definedNonDefaultOptions.find((defined) => option.conflictsWith.includes(defined.attributeName()));
|
|
1386
|
-
if (conflictingAndDefined) {
|
|
1387
|
-
this._conflictingOption(option, conflictingAndDefined);
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
}
|
|
1391
|
-
_checkForConflictingOptions() {
|
|
1392
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1393
|
-
cmd._checkForConflictingLocalOptions();
|
|
1394
|
-
});
|
|
1395
|
-
}
|
|
1396
|
-
parseOptions(argv) {
|
|
1397
|
-
const operands = [];
|
|
1398
|
-
const unknown = [];
|
|
1399
|
-
let dest = operands;
|
|
1400
|
-
const args = argv.slice();
|
|
1401
|
-
function maybeOption(arg) {
|
|
1402
|
-
return arg.length > 1 && arg[0] === "-";
|
|
1403
|
-
}
|
|
1404
|
-
let activeVariadicOption = null;
|
|
1405
|
-
while (args.length) {
|
|
1406
|
-
const arg = args.shift();
|
|
1407
|
-
if (arg === "--") {
|
|
1408
|
-
if (dest === unknown)
|
|
1409
|
-
dest.push(arg);
|
|
1410
|
-
dest.push(...args);
|
|
1411
|
-
break;
|
|
1412
|
-
}
|
|
1413
|
-
if (activeVariadicOption && !maybeOption(arg)) {
|
|
1414
|
-
this.emit(`option:${activeVariadicOption.name()}`, arg);
|
|
1415
|
-
continue;
|
|
1416
|
-
}
|
|
1417
|
-
activeVariadicOption = null;
|
|
1418
|
-
if (maybeOption(arg)) {
|
|
1419
|
-
const option = this._findOption(arg);
|
|
1420
|
-
if (option) {
|
|
1421
|
-
if (option.required) {
|
|
1422
|
-
const value = args.shift();
|
|
1423
|
-
if (value === undefined)
|
|
1424
|
-
this.optionMissingArgument(option);
|
|
1425
|
-
this.emit(`option:${option.name()}`, value);
|
|
1426
|
-
} else if (option.optional) {
|
|
1427
|
-
let value = null;
|
|
1428
|
-
if (args.length > 0 && !maybeOption(args[0])) {
|
|
1429
|
-
value = args.shift();
|
|
1430
|
-
}
|
|
1431
|
-
this.emit(`option:${option.name()}`, value);
|
|
1432
|
-
} else {
|
|
1433
|
-
this.emit(`option:${option.name()}`);
|
|
1434
|
-
}
|
|
1435
|
-
activeVariadicOption = option.variadic ? option : null;
|
|
1436
|
-
continue;
|
|
1437
|
-
}
|
|
1438
|
-
}
|
|
1439
|
-
if (arg.length > 2 && arg[0] === "-" && arg[1] !== "-") {
|
|
1440
|
-
const option = this._findOption(`-${arg[1]}`);
|
|
1441
|
-
if (option) {
|
|
1442
|
-
if (option.required || option.optional && this._combineFlagAndOptionalValue) {
|
|
1443
|
-
this.emit(`option:${option.name()}`, arg.slice(2));
|
|
1444
|
-
} else {
|
|
1445
|
-
this.emit(`option:${option.name()}`);
|
|
1446
|
-
args.unshift(`-${arg.slice(2)}`);
|
|
1447
|
-
}
|
|
1448
|
-
continue;
|
|
1449
|
-
}
|
|
1450
|
-
}
|
|
1451
|
-
if (/^--[^=]+=/.test(arg)) {
|
|
1452
|
-
const index = arg.indexOf("=");
|
|
1453
|
-
const option = this._findOption(arg.slice(0, index));
|
|
1454
|
-
if (option && (option.required || option.optional)) {
|
|
1455
|
-
this.emit(`option:${option.name()}`, arg.slice(index + 1));
|
|
1456
|
-
continue;
|
|
1457
|
-
}
|
|
1458
|
-
}
|
|
1459
|
-
if (maybeOption(arg)) {
|
|
1460
|
-
dest = unknown;
|
|
1461
|
-
}
|
|
1462
|
-
if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
|
|
1463
|
-
if (this._findCommand(arg)) {
|
|
1464
|
-
operands.push(arg);
|
|
1465
|
-
if (args.length > 0)
|
|
1466
|
-
unknown.push(...args);
|
|
1467
|
-
break;
|
|
1468
|
-
} else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
|
|
1469
|
-
operands.push(arg);
|
|
1470
|
-
if (args.length > 0)
|
|
1471
|
-
operands.push(...args);
|
|
1472
|
-
break;
|
|
1473
|
-
} else if (this._defaultCommandName) {
|
|
1474
|
-
unknown.push(arg);
|
|
1475
|
-
if (args.length > 0)
|
|
1476
|
-
unknown.push(...args);
|
|
1477
|
-
break;
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
if (this._passThroughOptions) {
|
|
1481
|
-
dest.push(arg);
|
|
1482
|
-
if (args.length > 0)
|
|
1483
|
-
dest.push(...args);
|
|
1484
|
-
break;
|
|
1485
|
-
}
|
|
1486
|
-
dest.push(arg);
|
|
1487
|
-
}
|
|
1488
|
-
return { operands, unknown };
|
|
1489
|
-
}
|
|
1490
|
-
opts() {
|
|
1491
|
-
if (this._storeOptionsAsProperties) {
|
|
1492
|
-
const result = {};
|
|
1493
|
-
const len = this.options.length;
|
|
1494
|
-
for (let i = 0;i < len; i++) {
|
|
1495
|
-
const key = this.options[i].attributeName();
|
|
1496
|
-
result[key] = key === this._versionOptionName ? this._version : this[key];
|
|
1497
|
-
}
|
|
1498
|
-
return result;
|
|
1499
|
-
}
|
|
1500
|
-
return this._optionValues;
|
|
1501
|
-
}
|
|
1502
|
-
optsWithGlobals() {
|
|
1503
|
-
return this._getCommandAndAncestors().reduce((combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()), {});
|
|
1504
|
-
}
|
|
1505
|
-
error(message, errorOptions) {
|
|
1506
|
-
this._outputConfiguration.outputError(`${message}
|
|
1507
|
-
`, this._outputConfiguration.writeErr);
|
|
1508
|
-
if (typeof this._showHelpAfterError === "string") {
|
|
1509
|
-
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
1510
|
-
`);
|
|
1511
|
-
} else if (this._showHelpAfterError) {
|
|
1512
|
-
this._outputConfiguration.writeErr(`
|
|
1513
|
-
`);
|
|
1514
|
-
this.outputHelp({ error: true });
|
|
1515
|
-
}
|
|
1516
|
-
const config = errorOptions || {};
|
|
1517
|
-
const exitCode = config.exitCode || 1;
|
|
1518
|
-
const code = config.code || "commander.error";
|
|
1519
|
-
this._exit(exitCode, code, message);
|
|
1520
|
-
}
|
|
1521
|
-
_parseOptionsEnv() {
|
|
1522
|
-
this.options.forEach((option) => {
|
|
1523
|
-
if (option.envVar && option.envVar in process2.env) {
|
|
1524
|
-
const optionKey = option.attributeName();
|
|
1525
|
-
if (this.getOptionValue(optionKey) === undefined || ["default", "config", "env"].includes(this.getOptionValueSource(optionKey))) {
|
|
1526
|
-
if (option.required || option.optional) {
|
|
1527
|
-
this.emit(`optionEnv:${option.name()}`, process2.env[option.envVar]);
|
|
1528
|
-
} else {
|
|
1529
|
-
this.emit(`optionEnv:${option.name()}`);
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
}
|
|
1533
|
-
});
|
|
1534
|
-
}
|
|
1535
|
-
_parseOptionsImplied() {
|
|
1536
|
-
const dualHelper = new DualOptions(this.options);
|
|
1537
|
-
const hasCustomOptionValue = (optionKey) => {
|
|
1538
|
-
return this.getOptionValue(optionKey) !== undefined && !["default", "implied"].includes(this.getOptionValueSource(optionKey));
|
|
1539
|
-
};
|
|
1540
|
-
this.options.filter((option) => option.implied !== undefined && hasCustomOptionValue(option.attributeName()) && dualHelper.valueFromOption(this.getOptionValue(option.attributeName()), option)).forEach((option) => {
|
|
1541
|
-
Object.keys(option.implied).filter((impliedKey) => !hasCustomOptionValue(impliedKey)).forEach((impliedKey) => {
|
|
1542
|
-
this.setOptionValueWithSource(impliedKey, option.implied[impliedKey], "implied");
|
|
1543
|
-
});
|
|
1544
|
-
});
|
|
1545
|
-
}
|
|
1546
|
-
missingArgument(name) {
|
|
1547
|
-
const message = `error: missing required argument '${name}'`;
|
|
1548
|
-
this.error(message, { code: "commander.missingArgument" });
|
|
1549
|
-
}
|
|
1550
|
-
optionMissingArgument(option) {
|
|
1551
|
-
const message = `error: option '${option.flags}' argument missing`;
|
|
1552
|
-
this.error(message, { code: "commander.optionMissingArgument" });
|
|
1553
|
-
}
|
|
1554
|
-
missingMandatoryOptionValue(option) {
|
|
1555
|
-
const message = `error: required option '${option.flags}' not specified`;
|
|
1556
|
-
this.error(message, { code: "commander.missingMandatoryOptionValue" });
|
|
1557
|
-
}
|
|
1558
|
-
_conflictingOption(option, conflictingOption) {
|
|
1559
|
-
const findBestOptionFromValue = (option2) => {
|
|
1560
|
-
const optionKey = option2.attributeName();
|
|
1561
|
-
const optionValue = this.getOptionValue(optionKey);
|
|
1562
|
-
const negativeOption = this.options.find((target) => target.negate && optionKey === target.attributeName());
|
|
1563
|
-
const positiveOption = this.options.find((target) => !target.negate && optionKey === target.attributeName());
|
|
1564
|
-
if (negativeOption && (negativeOption.presetArg === undefined && optionValue === false || negativeOption.presetArg !== undefined && optionValue === negativeOption.presetArg)) {
|
|
1565
|
-
return negativeOption;
|
|
1566
|
-
}
|
|
1567
|
-
return positiveOption || option2;
|
|
1568
|
-
};
|
|
1569
|
-
const getErrorMessage = (option2) => {
|
|
1570
|
-
const bestOption = findBestOptionFromValue(option2);
|
|
1571
|
-
const optionKey = bestOption.attributeName();
|
|
1572
|
-
const source = this.getOptionValueSource(optionKey);
|
|
1573
|
-
if (source === "env") {
|
|
1574
|
-
return `environment variable '${bestOption.envVar}'`;
|
|
1575
|
-
}
|
|
1576
|
-
return `option '${bestOption.flags}'`;
|
|
1577
|
-
};
|
|
1578
|
-
const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;
|
|
1579
|
-
this.error(message, { code: "commander.conflictingOption" });
|
|
1580
|
-
}
|
|
1581
|
-
unknownOption(flag) {
|
|
1582
|
-
if (this._allowUnknownOption)
|
|
1583
|
-
return;
|
|
1584
|
-
let suggestion = "";
|
|
1585
|
-
if (flag.startsWith("--") && this._showSuggestionAfterError) {
|
|
1586
|
-
let candidateFlags = [];
|
|
1587
|
-
let command = this;
|
|
1588
|
-
do {
|
|
1589
|
-
const moreFlags = command.createHelp().visibleOptions(command).filter((option) => option.long).map((option) => option.long);
|
|
1590
|
-
candidateFlags = candidateFlags.concat(moreFlags);
|
|
1591
|
-
command = command.parent;
|
|
1592
|
-
} while (command && !command._enablePositionalOptions);
|
|
1593
|
-
suggestion = suggestSimilar(flag, candidateFlags);
|
|
1594
|
-
}
|
|
1595
|
-
const message = `error: unknown option '${flag}'${suggestion}`;
|
|
1596
|
-
this.error(message, { code: "commander.unknownOption" });
|
|
1597
|
-
}
|
|
1598
|
-
_excessArguments(receivedArgs) {
|
|
1599
|
-
if (this._allowExcessArguments)
|
|
1600
|
-
return;
|
|
1601
|
-
const expected = this.registeredArguments.length;
|
|
1602
|
-
const s = expected === 1 ? "" : "s";
|
|
1603
|
-
const forSubcommand = this.parent ? ` for '${this.name()}'` : "";
|
|
1604
|
-
const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;
|
|
1605
|
-
this.error(message, { code: "commander.excessArguments" });
|
|
1606
|
-
}
|
|
1607
|
-
unknownCommand() {
|
|
1608
|
-
const unknownName = this.args[0];
|
|
1609
|
-
let suggestion = "";
|
|
1610
|
-
if (this._showSuggestionAfterError) {
|
|
1611
|
-
const candidateNames = [];
|
|
1612
|
-
this.createHelp().visibleCommands(this).forEach((command) => {
|
|
1613
|
-
candidateNames.push(command.name());
|
|
1614
|
-
if (command.alias())
|
|
1615
|
-
candidateNames.push(command.alias());
|
|
1616
|
-
});
|
|
1617
|
-
suggestion = suggestSimilar(unknownName, candidateNames);
|
|
1618
|
-
}
|
|
1619
|
-
const message = `error: unknown command '${unknownName}'${suggestion}`;
|
|
1620
|
-
this.error(message, { code: "commander.unknownCommand" });
|
|
1621
|
-
}
|
|
1622
|
-
version(str, flags, description) {
|
|
1623
|
-
if (str === undefined)
|
|
1624
|
-
return this._version;
|
|
1625
|
-
this._version = str;
|
|
1626
|
-
flags = flags || "-V, --version";
|
|
1627
|
-
description = description || "output the version number";
|
|
1628
|
-
const versionOption = this.createOption(flags, description);
|
|
1629
|
-
this._versionOptionName = versionOption.attributeName();
|
|
1630
|
-
this._registerOption(versionOption);
|
|
1631
|
-
this.on("option:" + versionOption.name(), () => {
|
|
1632
|
-
this._outputConfiguration.writeOut(`${str}
|
|
1633
|
-
`);
|
|
1634
|
-
this._exit(0, "commander.version", str);
|
|
1635
|
-
});
|
|
1636
|
-
return this;
|
|
1637
|
-
}
|
|
1638
|
-
description(str, argsDescription) {
|
|
1639
|
-
if (str === undefined && argsDescription === undefined)
|
|
1640
|
-
return this._description;
|
|
1641
|
-
this._description = str;
|
|
1642
|
-
if (argsDescription) {
|
|
1643
|
-
this._argsDescription = argsDescription;
|
|
1644
|
-
}
|
|
1645
|
-
return this;
|
|
1646
|
-
}
|
|
1647
|
-
summary(str) {
|
|
1648
|
-
if (str === undefined)
|
|
1649
|
-
return this._summary;
|
|
1650
|
-
this._summary = str;
|
|
1651
|
-
return this;
|
|
1652
|
-
}
|
|
1653
|
-
alias(alias) {
|
|
1654
|
-
if (alias === undefined)
|
|
1655
|
-
return this._aliases[0];
|
|
1656
|
-
let command = this;
|
|
1657
|
-
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
1658
|
-
command = this.commands[this.commands.length - 1];
|
|
1659
|
-
}
|
|
1660
|
-
if (alias === command._name)
|
|
1661
|
-
throw new Error("Command alias can't be the same as its name");
|
|
1662
|
-
const matchingCommand = this.parent?._findCommand(alias);
|
|
1663
|
-
if (matchingCommand) {
|
|
1664
|
-
const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
|
|
1665
|
-
throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
|
|
1666
|
-
}
|
|
1667
|
-
command._aliases.push(alias);
|
|
1668
|
-
return this;
|
|
1669
|
-
}
|
|
1670
|
-
aliases(aliases) {
|
|
1671
|
-
if (aliases === undefined)
|
|
1672
|
-
return this._aliases;
|
|
1673
|
-
aliases.forEach((alias) => this.alias(alias));
|
|
1674
|
-
return this;
|
|
1675
|
-
}
|
|
1676
|
-
usage(str) {
|
|
1677
|
-
if (str === undefined) {
|
|
1678
|
-
if (this._usage)
|
|
1679
|
-
return this._usage;
|
|
1680
|
-
const args = this.registeredArguments.map((arg) => {
|
|
1681
|
-
return humanReadableArgName(arg);
|
|
1682
|
-
});
|
|
1683
|
-
return [].concat(this.options.length || this._helpOption !== null ? "[options]" : [], this.commands.length ? "[command]" : [], this.registeredArguments.length ? args : []).join(" ");
|
|
1684
|
-
}
|
|
1685
|
-
this._usage = str;
|
|
1686
|
-
return this;
|
|
1687
|
-
}
|
|
1688
|
-
name(str) {
|
|
1689
|
-
if (str === undefined)
|
|
1690
|
-
return this._name;
|
|
1691
|
-
this._name = str;
|
|
1692
|
-
return this;
|
|
1693
|
-
}
|
|
1694
|
-
nameFromFilename(filename) {
|
|
1695
|
-
this._name = path.basename(filename, path.extname(filename));
|
|
1696
|
-
return this;
|
|
1697
|
-
}
|
|
1698
|
-
executableDir(path2) {
|
|
1699
|
-
if (path2 === undefined)
|
|
1700
|
-
return this._executableDir;
|
|
1701
|
-
this._executableDir = path2;
|
|
1702
|
-
return this;
|
|
1703
|
-
}
|
|
1704
|
-
helpInformation(contextOptions) {
|
|
1705
|
-
const helper = this.createHelp();
|
|
1706
|
-
if (helper.helpWidth === undefined) {
|
|
1707
|
-
helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
|
|
1708
|
-
}
|
|
1709
|
-
return helper.formatHelp(this, helper);
|
|
1710
|
-
}
|
|
1711
|
-
_getHelpContext(contextOptions) {
|
|
1712
|
-
contextOptions = contextOptions || {};
|
|
1713
|
-
const context = { error: !!contextOptions.error };
|
|
1714
|
-
let write;
|
|
1715
|
-
if (context.error) {
|
|
1716
|
-
write = (arg) => this._outputConfiguration.writeErr(arg);
|
|
1717
|
-
} else {
|
|
1718
|
-
write = (arg) => this._outputConfiguration.writeOut(arg);
|
|
1719
|
-
}
|
|
1720
|
-
context.write = contextOptions.write || write;
|
|
1721
|
-
context.command = this;
|
|
1722
|
-
return context;
|
|
1723
|
-
}
|
|
1724
|
-
outputHelp(contextOptions) {
|
|
1725
|
-
let deprecatedCallback;
|
|
1726
|
-
if (typeof contextOptions === "function") {
|
|
1727
|
-
deprecatedCallback = contextOptions;
|
|
1728
|
-
contextOptions = undefined;
|
|
1729
|
-
}
|
|
1730
|
-
const context = this._getHelpContext(contextOptions);
|
|
1731
|
-
this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context));
|
|
1732
|
-
this.emit("beforeHelp", context);
|
|
1733
|
-
let helpInformation = this.helpInformation(context);
|
|
1734
|
-
if (deprecatedCallback) {
|
|
1735
|
-
helpInformation = deprecatedCallback(helpInformation);
|
|
1736
|
-
if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) {
|
|
1737
|
-
throw new Error("outputHelp callback must return a string or a Buffer");
|
|
1738
|
-
}
|
|
1739
|
-
}
|
|
1740
|
-
context.write(helpInformation);
|
|
1741
|
-
if (this._getHelpOption()?.long) {
|
|
1742
|
-
this.emit(this._getHelpOption().long);
|
|
1743
|
-
}
|
|
1744
|
-
this.emit("afterHelp", context);
|
|
1745
|
-
this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", context));
|
|
1746
|
-
}
|
|
1747
|
-
helpOption(flags, description) {
|
|
1748
|
-
if (typeof flags === "boolean") {
|
|
1749
|
-
if (flags) {
|
|
1750
|
-
this._helpOption = this._helpOption ?? undefined;
|
|
1751
|
-
} else {
|
|
1752
|
-
this._helpOption = null;
|
|
1753
|
-
}
|
|
1754
|
-
return this;
|
|
1755
|
-
}
|
|
1756
|
-
flags = flags ?? "-h, --help";
|
|
1757
|
-
description = description ?? "display help for command";
|
|
1758
|
-
this._helpOption = this.createOption(flags, description);
|
|
1759
|
-
return this;
|
|
1760
|
-
}
|
|
1761
|
-
_getHelpOption() {
|
|
1762
|
-
if (this._helpOption === undefined) {
|
|
1763
|
-
this.helpOption(undefined, undefined);
|
|
1764
|
-
}
|
|
1765
|
-
return this._helpOption;
|
|
1766
|
-
}
|
|
1767
|
-
addHelpOption(option) {
|
|
1768
|
-
this._helpOption = option;
|
|
1769
|
-
return this;
|
|
1770
|
-
}
|
|
1771
|
-
help(contextOptions) {
|
|
1772
|
-
this.outputHelp(contextOptions);
|
|
1773
|
-
let exitCode = process2.exitCode || 0;
|
|
1774
|
-
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
|
|
1775
|
-
exitCode = 1;
|
|
1776
|
-
}
|
|
1777
|
-
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
1778
|
-
}
|
|
1779
|
-
addHelpText(position, text) {
|
|
1780
|
-
const allowedValues = ["beforeAll", "before", "after", "afterAll"];
|
|
1781
|
-
if (!allowedValues.includes(position)) {
|
|
1782
|
-
throw new Error(`Unexpected value for position to addHelpText.
|
|
1783
|
-
Expecting one of '${allowedValues.join("', '")}'`);
|
|
1784
|
-
}
|
|
1785
|
-
const helpEvent = `${position}Help`;
|
|
1786
|
-
this.on(helpEvent, (context) => {
|
|
1787
|
-
let helpStr;
|
|
1788
|
-
if (typeof text === "function") {
|
|
1789
|
-
helpStr = text({ error: context.error, command: context.command });
|
|
1790
|
-
} else {
|
|
1791
|
-
helpStr = text;
|
|
1792
|
-
}
|
|
1793
|
-
if (helpStr) {
|
|
1794
|
-
context.write(`${helpStr}
|
|
1795
|
-
`);
|
|
1796
|
-
}
|
|
1797
|
-
});
|
|
1798
|
-
return this;
|
|
1799
|
-
}
|
|
1800
|
-
_outputHelpIfRequested(args) {
|
|
1801
|
-
const helpOption = this._getHelpOption();
|
|
1802
|
-
const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));
|
|
1803
|
-
if (helpRequested) {
|
|
1804
|
-
this.outputHelp();
|
|
1805
|
-
this._exit(0, "commander.helpDisplayed", "(outputHelp)");
|
|
1806
|
-
}
|
|
1807
|
-
}
|
|
1808
|
-
}
|
|
1809
|
-
function incrementNodeInspectorPort(args) {
|
|
1810
|
-
return args.map((arg) => {
|
|
1811
|
-
if (!arg.startsWith("--inspect")) {
|
|
1812
|
-
return arg;
|
|
1813
|
-
}
|
|
1814
|
-
let debugOption;
|
|
1815
|
-
let debugHost = "127.0.0.1";
|
|
1816
|
-
let debugPort = "9229";
|
|
1817
|
-
let match;
|
|
1818
|
-
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
1819
|
-
debugOption = match[1];
|
|
1820
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
1821
|
-
debugOption = match[1];
|
|
1822
|
-
if (/^\d+$/.test(match[3])) {
|
|
1823
|
-
debugPort = match[3];
|
|
1824
|
-
} else {
|
|
1825
|
-
debugHost = match[3];
|
|
1826
|
-
}
|
|
1827
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
1828
|
-
debugOption = match[1];
|
|
1829
|
-
debugHost = match[3];
|
|
1830
|
-
debugPort = match[4];
|
|
1831
|
-
}
|
|
1832
|
-
if (debugOption && debugPort !== "0") {
|
|
1833
|
-
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
1834
|
-
}
|
|
1835
|
-
return arg;
|
|
1836
|
-
});
|
|
1837
|
-
}
|
|
1838
|
-
exports.Command = Command;
|
|
1839
|
-
});
|
|
1840
|
-
|
|
1841
|
-
// node_modules/commander/index.js
|
|
1842
|
-
var require_commander = __commonJS((exports) => {
|
|
1843
|
-
var { Argument } = require_argument();
|
|
1844
|
-
var { Command } = require_command();
|
|
1845
|
-
var { CommanderError, InvalidArgumentError } = require_error();
|
|
1846
|
-
var { Help } = require_help();
|
|
1847
|
-
var { Option } = require_option();
|
|
1848
|
-
exports.program = new Command;
|
|
1849
|
-
exports.createCommand = (name) => new Command(name);
|
|
1850
|
-
exports.createOption = (flags, description) => new Option(flags, description);
|
|
1851
|
-
exports.createArgument = (name, description) => new Argument(name, description);
|
|
1852
|
-
exports.Command = Command;
|
|
1853
|
-
exports.Option = Option;
|
|
1854
|
-
exports.Argument = Argument;
|
|
1855
|
-
exports.Help = Help;
|
|
1856
|
-
exports.CommanderError = CommanderError;
|
|
1857
|
-
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1858
|
-
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
1859
|
-
});
|
|
1860
|
-
|
|
1861
|
-
// node_modules/commander/esm.mjs
|
|
1862
|
-
var import__ = __toESM(require_commander(), 1);
|
|
1863
|
-
var {
|
|
1864
|
-
program,
|
|
1865
|
-
createCommand,
|
|
1866
|
-
createArgument,
|
|
1867
|
-
createOption,
|
|
1868
|
-
CommanderError,
|
|
1869
|
-
InvalidArgumentError,
|
|
1870
|
-
InvalidOptionArgumentError,
|
|
1871
|
-
Command,
|
|
1872
|
-
Argument,
|
|
1873
|
-
Option,
|
|
1874
|
-
Help
|
|
1875
|
-
} = import__.default;
|
|
1876
|
-
|
|
1877
|
-
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1878
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
1879
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
1880
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
1881
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1882
|
-
var styles = {
|
|
1883
|
-
modifier: {
|
|
1884
|
-
reset: [0, 0],
|
|
1885
|
-
bold: [1, 22],
|
|
1886
|
-
dim: [2, 22],
|
|
1887
|
-
italic: [3, 23],
|
|
1888
|
-
underline: [4, 24],
|
|
1889
|
-
overline: [53, 55],
|
|
1890
|
-
inverse: [7, 27],
|
|
1891
|
-
hidden: [8, 28],
|
|
1892
|
-
strikethrough: [9, 29]
|
|
1893
|
-
},
|
|
1894
|
-
color: {
|
|
1895
|
-
black: [30, 39],
|
|
1896
|
-
red: [31, 39],
|
|
1897
|
-
green: [32, 39],
|
|
1898
|
-
yellow: [33, 39],
|
|
1899
|
-
blue: [34, 39],
|
|
1900
|
-
magenta: [35, 39],
|
|
1901
|
-
cyan: [36, 39],
|
|
1902
|
-
white: [37, 39],
|
|
1903
|
-
blackBright: [90, 39],
|
|
1904
|
-
gray: [90, 39],
|
|
1905
|
-
grey: [90, 39],
|
|
1906
|
-
redBright: [91, 39],
|
|
1907
|
-
greenBright: [92, 39],
|
|
1908
|
-
yellowBright: [93, 39],
|
|
1909
|
-
blueBright: [94, 39],
|
|
1910
|
-
magentaBright: [95, 39],
|
|
1911
|
-
cyanBright: [96, 39],
|
|
1912
|
-
whiteBright: [97, 39]
|
|
1913
|
-
},
|
|
1914
|
-
bgColor: {
|
|
1915
|
-
bgBlack: [40, 49],
|
|
1916
|
-
bgRed: [41, 49],
|
|
1917
|
-
bgGreen: [42, 49],
|
|
1918
|
-
bgYellow: [43, 49],
|
|
1919
|
-
bgBlue: [44, 49],
|
|
1920
|
-
bgMagenta: [45, 49],
|
|
1921
|
-
bgCyan: [46, 49],
|
|
1922
|
-
bgWhite: [47, 49],
|
|
1923
|
-
bgBlackBright: [100, 49],
|
|
1924
|
-
bgGray: [100, 49],
|
|
1925
|
-
bgGrey: [100, 49],
|
|
1926
|
-
bgRedBright: [101, 49],
|
|
1927
|
-
bgGreenBright: [102, 49],
|
|
1928
|
-
bgYellowBright: [103, 49],
|
|
1929
|
-
bgBlueBright: [104, 49],
|
|
1930
|
-
bgMagentaBright: [105, 49],
|
|
1931
|
-
bgCyanBright: [106, 49],
|
|
1932
|
-
bgWhiteBright: [107, 49]
|
|
1933
|
-
}
|
|
1934
|
-
};
|
|
1935
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
1936
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
1937
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
1938
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1939
|
-
function assembleStyles() {
|
|
1940
|
-
const codes = new Map;
|
|
1941
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
1942
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
1943
|
-
styles[styleName] = {
|
|
1944
|
-
open: `\x1B[${style[0]}m`,
|
|
1945
|
-
close: `\x1B[${style[1]}m`
|
|
1946
|
-
};
|
|
1947
|
-
group[styleName] = styles[styleName];
|
|
1948
|
-
codes.set(style[0], style[1]);
|
|
1949
|
-
}
|
|
1950
|
-
Object.defineProperty(styles, groupName, {
|
|
1951
|
-
value: group,
|
|
1952
|
-
enumerable: false
|
|
1953
|
-
});
|
|
1954
|
-
}
|
|
1955
|
-
Object.defineProperty(styles, "codes", {
|
|
1956
|
-
value: codes,
|
|
1957
|
-
enumerable: false
|
|
1958
|
-
});
|
|
1959
|
-
styles.color.close = "\x1B[39m";
|
|
1960
|
-
styles.bgColor.close = "\x1B[49m";
|
|
1961
|
-
styles.color.ansi = wrapAnsi16();
|
|
1962
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
1963
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
1964
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1965
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1966
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1967
|
-
Object.defineProperties(styles, {
|
|
1968
|
-
rgbToAnsi256: {
|
|
1969
|
-
value(red, green, blue) {
|
|
1970
|
-
if (red === green && green === blue) {
|
|
1971
|
-
if (red < 8) {
|
|
1972
|
-
return 16;
|
|
1973
|
-
}
|
|
1974
|
-
if (red > 248) {
|
|
1975
|
-
return 231;
|
|
1976
|
-
}
|
|
1977
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
1978
|
-
}
|
|
1979
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
1980
|
-
},
|
|
1981
|
-
enumerable: false
|
|
1982
|
-
},
|
|
1983
|
-
hexToRgb: {
|
|
1984
|
-
value(hex) {
|
|
1985
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
1986
|
-
if (!matches) {
|
|
1987
|
-
return [0, 0, 0];
|
|
1988
|
-
}
|
|
1989
|
-
let [colorString] = matches;
|
|
1990
|
-
if (colorString.length === 3) {
|
|
1991
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
1992
|
-
}
|
|
1993
|
-
const integer = Number.parseInt(colorString, 16);
|
|
1994
|
-
return [
|
|
1995
|
-
integer >> 16 & 255,
|
|
1996
|
-
integer >> 8 & 255,
|
|
1997
|
-
integer & 255
|
|
1998
|
-
];
|
|
1999
|
-
},
|
|
2000
|
-
enumerable: false
|
|
2001
|
-
},
|
|
2002
|
-
hexToAnsi256: {
|
|
2003
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
2004
|
-
enumerable: false
|
|
2005
|
-
},
|
|
2006
|
-
ansi256ToAnsi: {
|
|
2007
|
-
value(code) {
|
|
2008
|
-
if (code < 8) {
|
|
2009
|
-
return 30 + code;
|
|
2010
|
-
}
|
|
2011
|
-
if (code < 16) {
|
|
2012
|
-
return 90 + (code - 8);
|
|
2013
|
-
}
|
|
2014
|
-
let red;
|
|
2015
|
-
let green;
|
|
2016
|
-
let blue;
|
|
2017
|
-
if (code >= 232) {
|
|
2018
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
2019
|
-
green = red;
|
|
2020
|
-
blue = red;
|
|
2021
|
-
} else {
|
|
2022
|
-
code -= 16;
|
|
2023
|
-
const remainder = code % 36;
|
|
2024
|
-
red = Math.floor(code / 36) / 5;
|
|
2025
|
-
green = Math.floor(remainder / 6) / 5;
|
|
2026
|
-
blue = remainder % 6 / 5;
|
|
2027
|
-
}
|
|
2028
|
-
const value = Math.max(red, green, blue) * 2;
|
|
2029
|
-
if (value === 0) {
|
|
2030
|
-
return 30;
|
|
2031
|
-
}
|
|
2032
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
2033
|
-
if (value === 2) {
|
|
2034
|
-
result += 60;
|
|
2035
|
-
}
|
|
2036
|
-
return result;
|
|
2037
|
-
},
|
|
2038
|
-
enumerable: false
|
|
2039
|
-
},
|
|
2040
|
-
rgbToAnsi: {
|
|
2041
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
2042
|
-
enumerable: false
|
|
2043
|
-
},
|
|
2044
|
-
hexToAnsi: {
|
|
2045
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
2046
|
-
enumerable: false
|
|
2047
|
-
}
|
|
2048
|
-
});
|
|
2049
|
-
return styles;
|
|
2050
|
-
}
|
|
2051
|
-
var ansiStyles = assembleStyles();
|
|
2052
|
-
var ansi_styles_default = ansiStyles;
|
|
2053
|
-
|
|
2054
|
-
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
2055
|
-
import process2 from "process";
|
|
2056
|
-
import os from "os";
|
|
2057
|
-
import tty from "tty";
|
|
2058
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
2059
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2060
|
-
const position = argv.indexOf(prefix + flag);
|
|
2061
|
-
const terminatorPosition = argv.indexOf("--");
|
|
2062
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
2063
|
-
}
|
|
2064
|
-
var { env } = process2;
|
|
2065
|
-
var flagForceColor;
|
|
2066
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
2067
|
-
flagForceColor = 0;
|
|
2068
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2069
|
-
flagForceColor = 1;
|
|
2070
|
-
}
|
|
2071
|
-
function envForceColor() {
|
|
2072
|
-
if ("FORCE_COLOR" in env) {
|
|
2073
|
-
if (env.FORCE_COLOR === "true") {
|
|
2074
|
-
return 1;
|
|
2075
|
-
}
|
|
2076
|
-
if (env.FORCE_COLOR === "false") {
|
|
2077
|
-
return 0;
|
|
2078
|
-
}
|
|
2079
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
2080
|
-
}
|
|
2081
|
-
}
|
|
2082
|
-
function translateLevel(level) {
|
|
2083
|
-
if (level === 0) {
|
|
2084
|
-
return false;
|
|
2085
|
-
}
|
|
2086
|
-
return {
|
|
2087
|
-
level,
|
|
2088
|
-
hasBasic: true,
|
|
2089
|
-
has256: level >= 2,
|
|
2090
|
-
has16m: level >= 3
|
|
2091
|
-
};
|
|
2092
|
-
}
|
|
2093
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
2094
|
-
const noFlagForceColor = envForceColor();
|
|
2095
|
-
if (noFlagForceColor !== undefined) {
|
|
2096
|
-
flagForceColor = noFlagForceColor;
|
|
2097
|
-
}
|
|
2098
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
2099
|
-
if (forceColor === 0) {
|
|
2100
|
-
return 0;
|
|
2101
|
-
}
|
|
2102
|
-
if (sniffFlags) {
|
|
2103
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
2104
|
-
return 3;
|
|
2105
|
-
}
|
|
2106
|
-
if (hasFlag("color=256")) {
|
|
2107
|
-
return 2;
|
|
2108
|
-
}
|
|
2109
|
-
}
|
|
2110
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
2111
|
-
return 1;
|
|
2112
|
-
}
|
|
2113
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
2114
|
-
return 0;
|
|
2115
|
-
}
|
|
2116
|
-
const min = forceColor || 0;
|
|
2117
|
-
if (env.TERM === "dumb") {
|
|
2118
|
-
return min;
|
|
2119
|
-
}
|
|
2120
|
-
if (process2.platform === "win32") {
|
|
2121
|
-
const osRelease = os.release().split(".");
|
|
2122
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2123
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2124
|
-
}
|
|
2125
|
-
return 1;
|
|
2126
|
-
}
|
|
2127
|
-
if ("CI" in env) {
|
|
2128
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
2129
|
-
return 3;
|
|
2130
|
-
}
|
|
2131
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
2132
|
-
return 1;
|
|
2133
|
-
}
|
|
2134
|
-
return min;
|
|
2135
|
-
}
|
|
2136
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
2137
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2138
|
-
}
|
|
2139
|
-
if (env.COLORTERM === "truecolor") {
|
|
2140
|
-
return 3;
|
|
2141
|
-
}
|
|
2142
|
-
if (env.TERM === "xterm-kitty") {
|
|
2143
|
-
return 3;
|
|
2144
|
-
}
|
|
2145
|
-
if (env.TERM === "xterm-ghostty") {
|
|
2146
|
-
return 3;
|
|
2147
|
-
}
|
|
2148
|
-
if (env.TERM === "wezterm") {
|
|
2149
|
-
return 3;
|
|
2150
|
-
}
|
|
2151
|
-
if ("TERM_PROGRAM" in env) {
|
|
2152
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
2153
|
-
switch (env.TERM_PROGRAM) {
|
|
2154
|
-
case "iTerm.app": {
|
|
2155
|
-
return version >= 3 ? 3 : 2;
|
|
2156
|
-
}
|
|
2157
|
-
case "Apple_Terminal": {
|
|
2158
|
-
return 2;
|
|
2159
|
-
}
|
|
2160
|
-
}
|
|
2161
|
-
}
|
|
2162
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
2163
|
-
return 2;
|
|
2164
|
-
}
|
|
2165
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
2166
|
-
return 1;
|
|
2167
|
-
}
|
|
2168
|
-
if ("COLORTERM" in env) {
|
|
2169
|
-
return 1;
|
|
2170
|
-
}
|
|
2171
|
-
return min;
|
|
2172
|
-
}
|
|
2173
|
-
function createSupportsColor(stream, options = {}) {
|
|
2174
|
-
const level = _supportsColor(stream, {
|
|
2175
|
-
streamIsTTY: stream && stream.isTTY,
|
|
2176
|
-
...options
|
|
2177
|
-
});
|
|
2178
|
-
return translateLevel(level);
|
|
2179
|
-
}
|
|
2180
|
-
var supportsColor = {
|
|
2181
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
2182
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
2183
|
-
};
|
|
2184
|
-
var supports_color_default = supportsColor;
|
|
2185
|
-
|
|
2186
|
-
// node_modules/chalk/source/utilities.js
|
|
2187
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
2188
|
-
let index = string.indexOf(substring);
|
|
2189
|
-
if (index === -1) {
|
|
2190
|
-
return string;
|
|
2191
|
-
}
|
|
2192
|
-
const substringLength = substring.length;
|
|
2193
|
-
let endIndex = 0;
|
|
2194
|
-
let returnValue = "";
|
|
2195
|
-
do {
|
|
2196
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
2197
|
-
endIndex = index + substringLength;
|
|
2198
|
-
index = string.indexOf(substring, endIndex);
|
|
2199
|
-
} while (index !== -1);
|
|
2200
|
-
returnValue += string.slice(endIndex);
|
|
2201
|
-
return returnValue;
|
|
2202
|
-
}
|
|
2203
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
2204
|
-
let endIndex = 0;
|
|
2205
|
-
let returnValue = "";
|
|
2206
|
-
do {
|
|
2207
|
-
const gotCR = string[index - 1] === "\r";
|
|
2208
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
2209
|
-
` : `
|
|
2210
|
-
`) + postfix;
|
|
2211
|
-
endIndex = index + 1;
|
|
2212
|
-
index = string.indexOf(`
|
|
2213
|
-
`, endIndex);
|
|
2214
|
-
} while (index !== -1);
|
|
2215
|
-
returnValue += string.slice(endIndex);
|
|
2216
|
-
return returnValue;
|
|
2217
|
-
}
|
|
2218
|
-
|
|
2219
|
-
// node_modules/chalk/source/index.js
|
|
2220
|
-
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
2221
|
-
var GENERATOR = Symbol("GENERATOR");
|
|
2222
|
-
var STYLER = Symbol("STYLER");
|
|
2223
|
-
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
2224
|
-
var levelMapping = [
|
|
2225
|
-
"ansi",
|
|
2226
|
-
"ansi",
|
|
2227
|
-
"ansi256",
|
|
2228
|
-
"ansi16m"
|
|
2229
|
-
];
|
|
2230
|
-
var styles2 = Object.create(null);
|
|
2231
|
-
var applyOptions = (object, options = {}) => {
|
|
2232
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
2233
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
2234
|
-
}
|
|
2235
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
2236
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
2237
|
-
};
|
|
2238
|
-
var chalkFactory = (options) => {
|
|
2239
|
-
const chalk = (...strings) => strings.join(" ");
|
|
2240
|
-
applyOptions(chalk, options);
|
|
2241
|
-
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
2242
|
-
return chalk;
|
|
2243
|
-
};
|
|
2244
|
-
function createChalk(options) {
|
|
2245
|
-
return chalkFactory(options);
|
|
2246
|
-
}
|
|
2247
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
2248
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
2249
|
-
styles2[styleName] = {
|
|
2250
|
-
get() {
|
|
2251
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
2252
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
2253
|
-
return builder;
|
|
2254
|
-
}
|
|
2255
|
-
};
|
|
2256
|
-
}
|
|
2257
|
-
styles2.visible = {
|
|
2258
|
-
get() {
|
|
2259
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
2260
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
2261
|
-
return builder;
|
|
2262
|
-
}
|
|
2263
|
-
};
|
|
2264
|
-
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
2265
|
-
if (model === "rgb") {
|
|
2266
|
-
if (level === "ansi16m") {
|
|
2267
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
2268
|
-
}
|
|
2269
|
-
if (level === "ansi256") {
|
|
2270
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
2271
|
-
}
|
|
2272
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
2273
|
-
}
|
|
2274
|
-
if (model === "hex") {
|
|
2275
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
2276
|
-
}
|
|
2277
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
2278
|
-
};
|
|
2279
|
-
var usedModels = ["rgb", "hex", "ansi256"];
|
|
2280
|
-
for (const model of usedModels) {
|
|
2281
|
-
styles2[model] = {
|
|
2282
|
-
get() {
|
|
2283
|
-
const { level } = this;
|
|
2284
|
-
return function(...arguments_) {
|
|
2285
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
2286
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2287
|
-
};
|
|
2288
|
-
}
|
|
2289
|
-
};
|
|
2290
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
2291
|
-
styles2[bgModel] = {
|
|
2292
|
-
get() {
|
|
2293
|
-
const { level } = this;
|
|
2294
|
-
return function(...arguments_) {
|
|
2295
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
2296
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2297
|
-
};
|
|
2298
|
-
}
|
|
2299
|
-
};
|
|
2300
|
-
}
|
|
2301
|
-
var proto = Object.defineProperties(() => {}, {
|
|
2302
|
-
...styles2,
|
|
2303
|
-
level: {
|
|
2304
|
-
enumerable: true,
|
|
2305
|
-
get() {
|
|
2306
|
-
return this[GENERATOR].level;
|
|
2307
|
-
},
|
|
2308
|
-
set(level) {
|
|
2309
|
-
this[GENERATOR].level = level;
|
|
2310
|
-
}
|
|
2311
|
-
}
|
|
2312
|
-
});
|
|
2313
|
-
var createStyler = (open, close, parent) => {
|
|
2314
|
-
let openAll;
|
|
2315
|
-
let closeAll;
|
|
2316
|
-
if (parent === undefined) {
|
|
2317
|
-
openAll = open;
|
|
2318
|
-
closeAll = close;
|
|
2319
|
-
} else {
|
|
2320
|
-
openAll = parent.openAll + open;
|
|
2321
|
-
closeAll = close + parent.closeAll;
|
|
2322
|
-
}
|
|
2323
|
-
return {
|
|
2324
|
-
open,
|
|
2325
|
-
close,
|
|
2326
|
-
openAll,
|
|
2327
|
-
closeAll,
|
|
2328
|
-
parent
|
|
2329
|
-
};
|
|
2330
|
-
};
|
|
2331
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
2332
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
2333
|
-
Object.setPrototypeOf(builder, proto);
|
|
2334
|
-
builder[GENERATOR] = self;
|
|
2335
|
-
builder[STYLER] = _styler;
|
|
2336
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
2337
|
-
return builder;
|
|
2338
|
-
};
|
|
2339
|
-
var applyStyle = (self, string) => {
|
|
2340
|
-
if (self.level <= 0 || !string) {
|
|
2341
|
-
return self[IS_EMPTY] ? "" : string;
|
|
2342
|
-
}
|
|
2343
|
-
let styler = self[STYLER];
|
|
2344
|
-
if (styler === undefined) {
|
|
2345
|
-
return string;
|
|
2346
|
-
}
|
|
2347
|
-
const { openAll, closeAll } = styler;
|
|
2348
|
-
if (string.includes("\x1B")) {
|
|
2349
|
-
while (styler !== undefined) {
|
|
2350
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
2351
|
-
styler = styler.parent;
|
|
2352
|
-
}
|
|
2353
|
-
}
|
|
2354
|
-
const lfIndex = string.indexOf(`
|
|
2355
|
-
`);
|
|
2356
|
-
if (lfIndex !== -1) {
|
|
2357
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
2358
|
-
}
|
|
2359
|
-
return openAll + string + closeAll;
|
|
2360
|
-
};
|
|
2361
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
2362
|
-
var chalk = createChalk();
|
|
2363
|
-
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2364
|
-
var source_default = chalk;
|
|
2365
|
-
|
|
2366
|
-
// src/types/index.ts
|
|
2367
|
-
class ConnectorApiError extends Error {
|
|
2368
|
-
statusCode;
|
|
2369
|
-
errorNumber;
|
|
2370
|
-
constructor(message, statusCode, errorNumber) {
|
|
2371
|
-
super(message);
|
|
2372
|
-
this.name = "ConnectorApiError";
|
|
2373
|
-
this.statusCode = statusCode;
|
|
2374
|
-
this.errorNumber = errorNumber;
|
|
2375
|
-
}
|
|
2376
|
-
}
|
|
2377
|
-
|
|
2378
|
-
// src/utils/xml.ts
|
|
2379
|
-
function extractTag(xml, tag) {
|
|
2380
|
-
const regex = new RegExp(`<${tag}[^>]*>([^<]*)</${tag}>`, "i");
|
|
2381
|
-
const match = xml.match(regex);
|
|
2382
|
-
return match ? match[1].trim() : null;
|
|
2383
|
-
}
|
|
2384
|
-
function extractAttribute(xml, tag, attr) {
|
|
2385
|
-
const regex = new RegExp(`<${tag}\\s[^>]*${attr}="([^"]*)"`, "i");
|
|
2386
|
-
const match = xml.match(regex);
|
|
2387
|
-
return match ? match[1] : null;
|
|
2388
|
-
}
|
|
2389
|
-
function extractAllTags(xml, tag) {
|
|
2390
|
-
const regex = new RegExp(`<${tag}(?:\\s[^>]*)?\\/?>(?:([^<]*)<\\/${tag}>)?`, "gi");
|
|
2391
|
-
const results = [];
|
|
2392
|
-
let match;
|
|
2393
|
-
while ((match = regex.exec(xml)) !== null) {
|
|
2394
|
-
const fullMatch = match[0];
|
|
2395
|
-
const tagNameCheck = new RegExp(`^<${tag}(?:\\s|\\/>|>)`, "i");
|
|
2396
|
-
if (tagNameCheck.test(fullMatch)) {
|
|
2397
|
-
results.push(fullMatch);
|
|
2398
|
-
}
|
|
2399
|
-
}
|
|
2400
|
-
return results;
|
|
2401
|
-
}
|
|
2402
|
-
function extractAttributeFromElement(element, attr) {
|
|
2403
|
-
const regex = new RegExp(`${attr}="([^"]*)"`, "i");
|
|
2404
|
-
const match = element.match(regex);
|
|
2405
|
-
return match ? match[1] : null;
|
|
2406
|
-
}
|
|
2407
|
-
function checkApiError(xml) {
|
|
2408
|
-
const status = extractAttribute(xml, "ApiResponse", "Status");
|
|
2409
|
-
if (status === "ERROR") {
|
|
2410
|
-
const errorMsg = extractTag(xml, "Message") || extractTag(xml, "Err") || "Unknown Namecheap API error";
|
|
2411
|
-
const errorNumber = extractAttribute(xml, "Error", "Number") || extractAttribute(xml, "Err", "Number");
|
|
2412
|
-
throw new Error(`Namecheap API error${errorNumber ? ` (${errorNumber})` : ""}: ${errorMsg}`);
|
|
2413
|
-
}
|
|
2414
|
-
}
|
|
2415
|
-
function splitDomain(domain) {
|
|
2416
|
-
const parts = domain.split(".");
|
|
2417
|
-
if (parts.length < 2) {
|
|
2418
|
-
throw new Error(`Invalid domain: ${domain}`);
|
|
2419
|
-
}
|
|
2420
|
-
if (parts.length >= 3 && ["co", "com", "org", "net", "ac", "gov"].includes(parts[parts.length - 2])) {
|
|
2421
|
-
return {
|
|
2422
|
-
sld: parts.slice(0, -2).join("."),
|
|
2423
|
-
tld: parts.slice(-2).join(".")
|
|
2424
|
-
};
|
|
2425
|
-
}
|
|
2426
|
-
return {
|
|
2427
|
-
sld: parts.slice(0, -1).join("."),
|
|
2428
|
-
tld: parts[parts.length - 1]
|
|
2429
|
-
};
|
|
2430
|
-
}
|
|
2431
|
-
|
|
2432
|
-
// src/api/client.ts
|
|
2433
|
-
var API_BASE = "https://api.namecheap.com/xml.response";
|
|
2434
|
-
var SANDBOX_BASE = "https://api.sandbox.namecheap.com/xml.response";
|
|
2435
|
-
|
|
2436
|
-
class ConnectorClient {
|
|
2437
|
-
apiKey;
|
|
2438
|
-
username;
|
|
2439
|
-
clientIp;
|
|
2440
|
-
baseUrl;
|
|
2441
|
-
constructor(config) {
|
|
2442
|
-
if (!config.apiKey) {
|
|
2443
|
-
throw new Error("API key is required");
|
|
2444
|
-
}
|
|
2445
|
-
if (!config.username) {
|
|
2446
|
-
throw new Error("Username is required");
|
|
2447
|
-
}
|
|
2448
|
-
if (!config.clientIp) {
|
|
2449
|
-
throw new Error("Client IP is required");
|
|
2450
|
-
}
|
|
2451
|
-
this.apiKey = config.apiKey;
|
|
2452
|
-
this.username = config.username;
|
|
2453
|
-
this.clientIp = config.clientIp;
|
|
2454
|
-
this.baseUrl = config.sandbox ? SANDBOX_BASE : API_BASE;
|
|
2455
|
-
}
|
|
2456
|
-
buildUrl(command, extraParams) {
|
|
2457
|
-
const params = new URLSearchParams({
|
|
2458
|
-
ApiUser: this.username,
|
|
2459
|
-
ApiKey: this.apiKey,
|
|
2460
|
-
UserName: this.username,
|
|
2461
|
-
ClientIp: this.clientIp,
|
|
2462
|
-
Command: command,
|
|
2463
|
-
...extraParams
|
|
2464
|
-
});
|
|
2465
|
-
return `${this.baseUrl}?${params.toString()}`;
|
|
2466
|
-
}
|
|
2467
|
-
async request(command, extraParams) {
|
|
2468
|
-
const url = this.buildUrl(command, extraParams);
|
|
2469
|
-
const response = await fetch(url, {
|
|
2470
|
-
signal: AbortSignal.timeout(30000),
|
|
2471
|
-
headers: { "User-Agent": "connect-namecheap/0.1.0" }
|
|
2472
|
-
});
|
|
2473
|
-
if (!response.ok) {
|
|
2474
|
-
throw new ConnectorApiError(`Namecheap API HTTP error: ${response.status} ${response.statusText}`, response.status);
|
|
2475
|
-
}
|
|
2476
|
-
const xml = await response.text();
|
|
2477
|
-
checkApiError(xml);
|
|
2478
|
-
return xml;
|
|
2479
|
-
}
|
|
2480
|
-
getApiKeyPreview() {
|
|
2481
|
-
if (this.apiKey.length > 10) {
|
|
2482
|
-
return `${this.apiKey.substring(0, 6)}...${this.apiKey.substring(this.apiKey.length - 4)}`;
|
|
2483
|
-
}
|
|
2484
|
-
return "***";
|
|
2485
|
-
}
|
|
2486
|
-
}
|
|
2487
|
-
|
|
2488
|
-
// src/api/domains.ts
|
|
2489
|
-
class DomainsApi {
|
|
2490
|
-
client;
|
|
2491
|
-
constructor(client) {
|
|
2492
|
-
this.client = client;
|
|
2493
|
-
}
|
|
2494
|
-
async list(options) {
|
|
2495
|
-
const xml = await this.client.request("namecheap.domains.getList", {
|
|
2496
|
-
PageSize: String(options?.pageSize ?? 100),
|
|
2497
|
-
Page: String(options?.page ?? 1)
|
|
2498
|
-
});
|
|
2499
|
-
const domainElements = extractAllTags(xml, "Domain");
|
|
2500
|
-
const domains = [];
|
|
2501
|
-
for (const el of domainElements) {
|
|
2502
|
-
const name = extractAttributeFromElement(el, "Name");
|
|
2503
|
-
const expires = extractAttributeFromElement(el, "Expires");
|
|
2504
|
-
const autoRenew = extractAttributeFromElement(el, "AutoRenew");
|
|
2505
|
-
const isLocked = extractAttributeFromElement(el, "IsLocked");
|
|
2506
|
-
if (name) {
|
|
2507
|
-
domains.push({
|
|
2508
|
-
domain: name,
|
|
2509
|
-
expiry: expires || "",
|
|
2510
|
-
autoRenew: autoRenew === "true",
|
|
2511
|
-
isLocked: isLocked === "true"
|
|
2512
|
-
});
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
return domains;
|
|
2516
|
-
}
|
|
2517
|
-
async getInfo(domain) {
|
|
2518
|
-
const xml = await this.client.request("namecheap.domains.getInfo", {
|
|
2519
|
-
DomainName: domain
|
|
2520
|
-
});
|
|
2521
|
-
const createdDate = extractTag(xml, "CreatedDate") || extractAttribute(xml, "DomainGetInfoResult", "CreatedDate") || "";
|
|
2522
|
-
const expiresDate = extractTag(xml, "ExpiredDate") || extractAttribute(xml, "DomainGetInfoResult", "ExpiredDate") || "";
|
|
2523
|
-
const nsSection = xml.match(/<DnsDetails[^>]*>([\s\S]*?)<\/DnsDetails>/i);
|
|
2524
|
-
const nameservers = [];
|
|
2525
|
-
if (nsSection) {
|
|
2526
|
-
const nsElements = nsSection[1].matchAll(/<Nameserver[^>]*>([^<]*)<\/Nameserver>/gi);
|
|
2527
|
-
for (const m of nsElements) {
|
|
2528
|
-
if (m[1])
|
|
2529
|
-
nameservers.push(m[1].trim().toLowerCase());
|
|
2530
|
-
}
|
|
2531
|
-
}
|
|
2532
|
-
return {
|
|
2533
|
-
domain,
|
|
2534
|
-
registrar: "Namecheap",
|
|
2535
|
-
created: createdDate,
|
|
2536
|
-
expires: expiresDate,
|
|
2537
|
-
nameservers
|
|
2538
|
-
};
|
|
2539
|
-
}
|
|
2540
|
-
async renew(domain, years = 1) {
|
|
2541
|
-
const xml = await this.client.request("namecheap.domains.renew", {
|
|
2542
|
-
DomainName: domain,
|
|
2543
|
-
Years: String(years)
|
|
2544
|
-
});
|
|
2545
|
-
const transactionId = extractAttribute(xml, "DomainRenewResult", "TransactionID") || undefined;
|
|
2546
|
-
const chargedAmount = extractAttribute(xml, "DomainRenewResult", "ChargedAmount") || undefined;
|
|
2547
|
-
const orderId = extractAttribute(xml, "DomainRenewResult", "OrderID") || undefined;
|
|
2548
|
-
return {
|
|
2549
|
-
domain,
|
|
2550
|
-
success: true,
|
|
2551
|
-
transactionId,
|
|
2552
|
-
chargedAmount,
|
|
2553
|
-
orderId
|
|
2554
|
-
};
|
|
2555
|
-
}
|
|
2556
|
-
async check(domain) {
|
|
2557
|
-
const xml = await this.client.request("namecheap.domains.check", {
|
|
2558
|
-
DomainList: domain
|
|
2559
|
-
});
|
|
2560
|
-
const available = extractAttribute(xml, "DomainCheckResult", "Available");
|
|
2561
|
-
return {
|
|
2562
|
-
domain,
|
|
2563
|
-
available: available === "true"
|
|
2564
|
-
};
|
|
2565
|
-
}
|
|
2566
|
-
}
|
|
2567
|
-
|
|
2568
|
-
// src/api/dns.ts
|
|
2569
|
-
class DnsApi {
|
|
2570
|
-
client;
|
|
2571
|
-
constructor(client) {
|
|
2572
|
-
this.client = client;
|
|
2573
|
-
}
|
|
2574
|
-
async getHosts(sld, tld) {
|
|
2575
|
-
const xml = await this.client.request("namecheap.domains.dns.getHosts", {
|
|
2576
|
-
SLD: sld,
|
|
2577
|
-
TLD: tld
|
|
2578
|
-
});
|
|
2579
|
-
const hostElements = extractAllTags(xml, "host");
|
|
2580
|
-
const records = [];
|
|
2581
|
-
for (const el of hostElements) {
|
|
2582
|
-
const type = extractAttributeFromElement(el, "Type");
|
|
2583
|
-
const name = extractAttributeFromElement(el, "Name");
|
|
2584
|
-
const address = extractAttributeFromElement(el, "Address");
|
|
2585
|
-
const hostId = extractAttributeFromElement(el, "HostId");
|
|
2586
|
-
const mxPref = extractAttributeFromElement(el, "MXPref");
|
|
2587
|
-
const ttl = extractAttributeFromElement(el, "TTL");
|
|
2588
|
-
if (type && name && address) {
|
|
2589
|
-
records.push({
|
|
2590
|
-
hostId: hostId || undefined,
|
|
2591
|
-
type,
|
|
2592
|
-
name,
|
|
2593
|
-
address,
|
|
2594
|
-
mxPref: mxPref ? parseInt(mxPref) : undefined,
|
|
2595
|
-
ttl: ttl ? parseInt(ttl) : 1800
|
|
2596
|
-
});
|
|
2597
|
-
}
|
|
2598
|
-
}
|
|
2599
|
-
return records;
|
|
2600
|
-
}
|
|
2601
|
-
async setHosts(sld, tld, records) {
|
|
2602
|
-
const params = {
|
|
2603
|
-
SLD: sld,
|
|
2604
|
-
TLD: tld
|
|
2605
|
-
};
|
|
2606
|
-
for (let i = 0;i < records.length; i++) {
|
|
2607
|
-
const r = records[i];
|
|
2608
|
-
const idx = i + 1;
|
|
2609
|
-
params[`HostName${idx}`] = r.name;
|
|
2610
|
-
params[`RecordType${idx}`] = r.type;
|
|
2611
|
-
params[`Address${idx}`] = r.address;
|
|
2612
|
-
params[`TTL${idx}`] = String(r.ttl);
|
|
2613
|
-
if (r.mxPref !== undefined) {
|
|
2614
|
-
params[`MXPref${idx}`] = String(r.mxPref);
|
|
2615
|
-
}
|
|
2616
|
-
}
|
|
2617
|
-
await this.client.request("namecheap.domains.dns.setHosts", params);
|
|
2618
|
-
return true;
|
|
2619
|
-
}
|
|
2620
|
-
}
|
|
2621
|
-
|
|
2622
|
-
// src/api/index.ts
|
|
2623
|
-
class Connector {
|
|
2624
|
-
client;
|
|
2625
|
-
domains;
|
|
2626
|
-
dns;
|
|
2627
|
-
constructor(config) {
|
|
2628
|
-
this.client = new ConnectorClient(config);
|
|
2629
|
-
this.domains = new DomainsApi(this.client);
|
|
2630
|
-
this.dns = new DnsApi(this.client);
|
|
2631
|
-
}
|
|
2632
|
-
static fromEnv() {
|
|
2633
|
-
const apiKey = process.env.NAMECHEAP_API_KEY;
|
|
2634
|
-
const username = process.env.NAMECHEAP_USERNAME;
|
|
2635
|
-
const clientIp = process.env.NAMECHEAP_CLIENT_IP;
|
|
2636
|
-
if (!apiKey) {
|
|
2637
|
-
throw new Error("NAMECHEAP_API_KEY environment variable is required");
|
|
2638
|
-
}
|
|
2639
|
-
if (!username) {
|
|
2640
|
-
throw new Error("NAMECHEAP_USERNAME environment variable is required");
|
|
2641
|
-
}
|
|
2642
|
-
if (!clientIp) {
|
|
2643
|
-
throw new Error("NAMECHEAP_CLIENT_IP environment variable is required");
|
|
2644
|
-
}
|
|
2645
|
-
return new Connector({
|
|
2646
|
-
apiKey,
|
|
2647
|
-
username,
|
|
2648
|
-
clientIp,
|
|
2649
|
-
sandbox: process.env.NAMECHEAP_SANDBOX === "true"
|
|
2650
|
-
});
|
|
2651
|
-
}
|
|
2652
|
-
getApiKeyPreview() {
|
|
2653
|
-
return this.client.getApiKeyPreview();
|
|
2654
|
-
}
|
|
2655
|
-
getClient() {
|
|
2656
|
-
return this.client;
|
|
2657
|
-
}
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
// src/utils/config.ts
|
|
2661
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync } from "fs";
|
|
2662
|
-
import { homedir } from "os";
|
|
2663
|
-
import { join } from "path";
|
|
2664
|
-
var CONNECTOR_NAME = "connect-namecheap";
|
|
2665
|
-
var DEFAULT_PROFILE = "default";
|
|
2666
|
-
var profileOverride;
|
|
2667
|
-
var CONFIG_DIR = join(homedir(), ".connectors", CONNECTOR_NAME);
|
|
2668
|
-
var PROFILES_DIR = join(CONFIG_DIR, "profiles");
|
|
2669
|
-
var CURRENT_PROFILE_FILE = join(CONFIG_DIR, "current_profile");
|
|
2670
|
-
function setProfileOverride(profile) {
|
|
2671
|
-
profileOverride = profile;
|
|
2672
|
-
}
|
|
2673
|
-
function ensureConfigDir() {
|
|
2674
|
-
if (!existsSync(CONFIG_DIR)) {
|
|
2675
|
-
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
2676
|
-
}
|
|
2677
|
-
if (!existsSync(PROFILES_DIR)) {
|
|
2678
|
-
mkdirSync(PROFILES_DIR, { recursive: true });
|
|
2679
|
-
}
|
|
2680
|
-
}
|
|
2681
|
-
function getProfilePath(profile) {
|
|
2682
|
-
return join(PROFILES_DIR, `${profile}.json`);
|
|
2683
|
-
}
|
|
2684
|
-
function getCurrentProfile() {
|
|
2685
|
-
if (profileOverride) {
|
|
2686
|
-
return profileOverride;
|
|
2687
|
-
}
|
|
2688
|
-
ensureConfigDir();
|
|
2689
|
-
if (existsSync(CURRENT_PROFILE_FILE)) {
|
|
2690
|
-
try {
|
|
2691
|
-
const profile = readFileSync(CURRENT_PROFILE_FILE, "utf-8").trim();
|
|
2692
|
-
if (profile && profileExists(profile)) {
|
|
2693
|
-
return profile;
|
|
2694
|
-
}
|
|
2695
|
-
} catch {}
|
|
2696
|
-
}
|
|
2697
|
-
return DEFAULT_PROFILE;
|
|
2698
|
-
}
|
|
2699
|
-
function setCurrentProfile(profile) {
|
|
2700
|
-
ensureConfigDir();
|
|
2701
|
-
if (!profileExists(profile) && profile !== DEFAULT_PROFILE) {
|
|
2702
|
-
throw new Error(`Profile "${profile}" does not exist`);
|
|
2703
|
-
}
|
|
2704
|
-
writeFileSync(CURRENT_PROFILE_FILE, profile);
|
|
2705
|
-
}
|
|
2706
|
-
function profileExists(profile) {
|
|
2707
|
-
return existsSync(getProfilePath(profile));
|
|
2708
|
-
}
|
|
2709
|
-
function listProfiles() {
|
|
2710
|
-
ensureConfigDir();
|
|
2711
|
-
if (!existsSync(PROFILES_DIR)) {
|
|
2712
|
-
return [];
|
|
2713
|
-
}
|
|
2714
|
-
return readdirSync(PROFILES_DIR).filter((f) => f.endsWith(".json")).map((f) => f.replace(".json", "")).sort();
|
|
2715
|
-
}
|
|
2716
|
-
function createProfile(profile, config = {}) {
|
|
2717
|
-
ensureConfigDir();
|
|
2718
|
-
if (profileExists(profile)) {
|
|
2719
|
-
return false;
|
|
2720
|
-
}
|
|
2721
|
-
if (!/^[a-zA-Z0-9_-]+$/.test(profile)) {
|
|
2722
|
-
throw new Error("Profile name can only contain letters, numbers, hyphens, and underscores");
|
|
2723
|
-
}
|
|
2724
|
-
writeFileSync(getProfilePath(profile), JSON.stringify(config, null, 2));
|
|
2725
|
-
return true;
|
|
2726
|
-
}
|
|
2727
|
-
function deleteProfile(profile) {
|
|
2728
|
-
if (profile === DEFAULT_PROFILE) {
|
|
2729
|
-
return false;
|
|
2730
|
-
}
|
|
2731
|
-
if (!profileExists(profile)) {
|
|
2732
|
-
return false;
|
|
2733
|
-
}
|
|
2734
|
-
if (getCurrentProfile() === profile) {
|
|
2735
|
-
setCurrentProfile(DEFAULT_PROFILE);
|
|
2736
|
-
}
|
|
2737
|
-
rmSync(getProfilePath(profile));
|
|
2738
|
-
return true;
|
|
2739
|
-
}
|
|
2740
|
-
function loadProfile(profile) {
|
|
2741
|
-
ensureConfigDir();
|
|
2742
|
-
const profileName = profile || getCurrentProfile();
|
|
2743
|
-
const profilePath = getProfilePath(profileName);
|
|
2744
|
-
if (!existsSync(profilePath)) {
|
|
2745
|
-
return {};
|
|
2746
|
-
}
|
|
2747
|
-
try {
|
|
2748
|
-
return JSON.parse(readFileSync(profilePath, "utf-8"));
|
|
2749
|
-
} catch {
|
|
2750
|
-
return {};
|
|
2751
|
-
}
|
|
2752
|
-
}
|
|
2753
|
-
function saveProfile(config, profile) {
|
|
2754
|
-
ensureConfigDir();
|
|
2755
|
-
const profileName = profile || getCurrentProfile();
|
|
2756
|
-
writeFileSync(getProfilePath(profileName), JSON.stringify(config, null, 2));
|
|
2757
|
-
}
|
|
2758
|
-
function getApiKey() {
|
|
2759
|
-
return process.env.NAMECHEAP_API_KEY || loadProfile().apiKey;
|
|
2760
|
-
}
|
|
2761
|
-
function setApiKey(apiKey) {
|
|
2762
|
-
const config = loadProfile();
|
|
2763
|
-
config.apiKey = apiKey;
|
|
2764
|
-
saveProfile(config);
|
|
2765
|
-
}
|
|
2766
|
-
function getUsername() {
|
|
2767
|
-
return process.env.NAMECHEAP_USERNAME || loadProfile().username;
|
|
2768
|
-
}
|
|
2769
|
-
function setUsername(username) {
|
|
2770
|
-
const config = loadProfile();
|
|
2771
|
-
config.username = username;
|
|
2772
|
-
saveProfile(config);
|
|
2773
|
-
}
|
|
2774
|
-
function getClientIp() {
|
|
2775
|
-
return process.env.NAMECHEAP_CLIENT_IP || loadProfile().clientIp;
|
|
2776
|
-
}
|
|
2777
|
-
function setClientIp(clientIp) {
|
|
2778
|
-
const config = loadProfile();
|
|
2779
|
-
config.clientIp = clientIp;
|
|
2780
|
-
saveProfile(config);
|
|
2781
|
-
}
|
|
2782
|
-
function getSandbox() {
|
|
2783
|
-
return process.env.NAMECHEAP_SANDBOX === "true" || loadProfile().sandbox === true;
|
|
2784
|
-
}
|
|
2785
|
-
function setSandbox(sandbox) {
|
|
2786
|
-
const config = loadProfile();
|
|
2787
|
-
config.sandbox = sandbox;
|
|
2788
|
-
saveProfile(config);
|
|
2789
|
-
}
|
|
2790
|
-
function clearConfig() {
|
|
2791
|
-
saveProfile({});
|
|
2792
|
-
}
|
|
2793
|
-
function getConfigDir() {
|
|
2794
|
-
return CONFIG_DIR;
|
|
2795
|
-
}
|
|
2796
|
-
|
|
2797
|
-
// src/utils/output.ts
|
|
2798
|
-
function formatOutput(data, format = "pretty") {
|
|
2799
|
-
switch (format) {
|
|
2800
|
-
case "json":
|
|
2801
|
-
return JSON.stringify(data, null, 2);
|
|
2802
|
-
case "table":
|
|
2803
|
-
return formatAsTable(data);
|
|
2804
|
-
case "pretty":
|
|
2805
|
-
default:
|
|
2806
|
-
return formatPretty(data);
|
|
2807
|
-
}
|
|
2808
|
-
}
|
|
2809
|
-
function formatAsTable(data) {
|
|
2810
|
-
if (!Array.isArray(data)) {
|
|
2811
|
-
data = [data];
|
|
2812
|
-
}
|
|
2813
|
-
const items = data;
|
|
2814
|
-
if (items.length === 0) {
|
|
2815
|
-
return "No data";
|
|
2816
|
-
}
|
|
2817
|
-
const firstItem = items[0];
|
|
2818
|
-
if (!firstItem || typeof firstItem !== "object") {
|
|
2819
|
-
return "No data";
|
|
2820
|
-
}
|
|
2821
|
-
const keys = Object.keys(firstItem);
|
|
2822
|
-
const colWidths = keys.map((key) => {
|
|
2823
|
-
const maxValue = Math.max(key.length, ...items.map((item) => String(item[key] ?? "").length));
|
|
2824
|
-
return Math.min(maxValue, 40);
|
|
2825
|
-
});
|
|
2826
|
-
const header = keys.map((key, i) => key.padEnd(colWidths[i] ?? 10)).join(" | ");
|
|
2827
|
-
const separator = colWidths.map((w) => "-".repeat(w)).join("-+-");
|
|
2828
|
-
const rows = items.map((item) => keys.map((key, i) => {
|
|
2829
|
-
const value = String(item[key] ?? "");
|
|
2830
|
-
const width = colWidths[i] ?? 10;
|
|
2831
|
-
return value.length > width ? value.substring(0, width - 3) + "..." : value.padEnd(width);
|
|
2832
|
-
}).join(" | "));
|
|
2833
|
-
return [header, separator, ...rows].join(`
|
|
2834
|
-
`);
|
|
2835
|
-
}
|
|
2836
|
-
function formatPretty(data) {
|
|
2837
|
-
if (Array.isArray(data)) {
|
|
2838
|
-
return data.map((item, i) => `${source_default.cyan(`[${i + 1}]`)} ${formatPrettyItem(item)}`).join(`
|
|
2839
|
-
|
|
2840
|
-
`);
|
|
2841
|
-
}
|
|
2842
|
-
return formatPrettyItem(data);
|
|
2843
|
-
}
|
|
2844
|
-
function formatPrettyItem(item, indent = 0) {
|
|
2845
|
-
if (item === null || item === undefined) {
|
|
2846
|
-
return source_default.gray("null");
|
|
2847
|
-
}
|
|
2848
|
-
if (typeof item !== "object") {
|
|
2849
|
-
return String(item);
|
|
2850
|
-
}
|
|
2851
|
-
const spaces = " ".repeat(indent);
|
|
2852
|
-
const entries = Object.entries(item);
|
|
2853
|
-
return entries.map(([key, value]) => {
|
|
2854
|
-
if (Array.isArray(value)) {
|
|
2855
|
-
if (value.length === 0) {
|
|
2856
|
-
return `${spaces}${source_default.blue(key)}: ${source_default.gray("[]")}`;
|
|
2857
|
-
}
|
|
2858
|
-
if (typeof value[0] === "object") {
|
|
2859
|
-
return `${spaces}${source_default.blue(key)}:
|
|
2860
|
-
${value.map((v) => formatPrettyItem(v, indent + 1)).join(`
|
|
2861
|
-
`)}`;
|
|
2862
|
-
}
|
|
2863
|
-
return `${spaces}${source_default.blue(key)}: ${value.join(", ")}`;
|
|
2864
|
-
}
|
|
2865
|
-
if (typeof value === "object" && value !== null) {
|
|
2866
|
-
return `${spaces}${source_default.blue(key)}:
|
|
2867
|
-
${formatPrettyItem(value, indent + 1)}`;
|
|
2868
|
-
}
|
|
2869
|
-
return `${spaces}${source_default.blue(key)}: ${source_default.white(String(value))}`;
|
|
2870
|
-
}).join(`
|
|
2871
|
-
`);
|
|
2872
|
-
}
|
|
2873
|
-
function success(message) {
|
|
2874
|
-
console.log(source_default.green("\u2713"), message);
|
|
2875
|
-
}
|
|
2876
|
-
function error(message) {
|
|
2877
|
-
console.error(source_default.red("\u2717"), message);
|
|
2878
|
-
}
|
|
2879
|
-
function warn(message) {
|
|
2880
|
-
console.warn(source_default.yellow("\u26A0"), message);
|
|
2881
|
-
}
|
|
2882
|
-
function info(message) {
|
|
2883
|
-
console.log(source_default.blue("\u2139"), message);
|
|
2884
|
-
}
|
|
2885
|
-
function print(data, format = "pretty") {
|
|
2886
|
-
console.log(formatOutput(data, format));
|
|
2887
|
-
}
|
|
2888
|
-
|
|
2889
|
-
// src/cli/index.ts
|
|
2890
|
-
var CONNECTOR_NAME2 = "connect-namecheap";
|
|
2891
|
-
var VERSION = "0.1.0";
|
|
2892
|
-
var program2 = new Command;
|
|
2893
|
-
program2.name(CONNECTOR_NAME2).description("Namecheap API connector CLI \u2014 manage domains and DNS").version(VERSION).option("-k, --api-key <key>", "API key (overrides config)").option("-u, --username <username>", "Username (overrides config)").option("--client-ip <ip>", "Client IP (overrides config)").option("--sandbox", "Use sandbox API").option("-f, --format <format>", "Output format (json, pretty)", "pretty").option("-p, --profile <profile>", "Use a specific profile").hook("preAction", (thisCommand) => {
|
|
2894
|
-
const opts = thisCommand.opts();
|
|
2895
|
-
if (opts.profile) {
|
|
2896
|
-
if (!profileExists(opts.profile)) {
|
|
2897
|
-
error(`Profile "${opts.profile}" does not exist. Create it with "${CONNECTOR_NAME2} profile create ${opts.profile}"`);
|
|
2898
|
-
process.exit(1);
|
|
2899
|
-
}
|
|
2900
|
-
setProfileOverride(opts.profile);
|
|
2901
|
-
}
|
|
2902
|
-
if (opts.apiKey) {
|
|
2903
|
-
process.env.NAMECHEAP_API_KEY = opts.apiKey;
|
|
2904
|
-
}
|
|
2905
|
-
if (opts.username) {
|
|
2906
|
-
process.env.NAMECHEAP_USERNAME = opts.username;
|
|
2907
|
-
}
|
|
2908
|
-
if (opts.clientIp) {
|
|
2909
|
-
process.env.NAMECHEAP_CLIENT_IP = opts.clientIp;
|
|
2910
|
-
}
|
|
2911
|
-
if (opts.sandbox) {
|
|
2912
|
-
process.env.NAMECHEAP_SANDBOX = "true";
|
|
2913
|
-
}
|
|
2914
|
-
});
|
|
2915
|
-
function getFormat(cmd) {
|
|
2916
|
-
const parent = cmd.parent;
|
|
2917
|
-
return parent?.opts().format || "pretty";
|
|
2918
|
-
}
|
|
2919
|
-
function getClient() {
|
|
2920
|
-
const apiKey = getApiKey();
|
|
2921
|
-
const username = getUsername();
|
|
2922
|
-
const clientIp = getClientIp();
|
|
2923
|
-
const sandbox = getSandbox();
|
|
2924
|
-
if (!apiKey) {
|
|
2925
|
-
error(`No API key configured. Run "${CONNECTOR_NAME2} config set-key <key>" or set NAMECHEAP_API_KEY environment variable.`);
|
|
2926
|
-
process.exit(1);
|
|
2927
|
-
}
|
|
2928
|
-
if (!username) {
|
|
2929
|
-
error(`No username configured. Run "${CONNECTOR_NAME2} config set-username <username>" or set NAMECHEAP_USERNAME environment variable.`);
|
|
2930
|
-
process.exit(1);
|
|
2931
|
-
}
|
|
2932
|
-
if (!clientIp) {
|
|
2933
|
-
error(`No client IP configured. Run "${CONNECTOR_NAME2} config set-client-ip <ip>" or set NAMECHEAP_CLIENT_IP environment variable.`);
|
|
2934
|
-
process.exit(1);
|
|
2935
|
-
}
|
|
2936
|
-
return new Connector({ apiKey, username, clientIp, sandbox });
|
|
2937
|
-
}
|
|
2938
|
-
var profileCmd = program2.command("profile").description("Manage configuration profiles");
|
|
2939
|
-
profileCmd.command("list").description("List all profiles").action(() => {
|
|
2940
|
-
const profiles = listProfiles();
|
|
2941
|
-
const current = getCurrentProfile();
|
|
2942
|
-
if (profiles.length === 0) {
|
|
2943
|
-
info('No profiles found. Use "profile create <name>" to create one.');
|
|
2944
|
-
return;
|
|
2945
|
-
}
|
|
2946
|
-
success("Profiles:");
|
|
2947
|
-
profiles.forEach((p) => {
|
|
2948
|
-
const isActive = p === current ? source_default.green(" (active)") : "";
|
|
2949
|
-
console.log(` ${p}${isActive}`);
|
|
2950
|
-
});
|
|
2951
|
-
});
|
|
2952
|
-
profileCmd.command("use <name>").description("Switch to a profile").action((name) => {
|
|
2953
|
-
if (!profileExists(name)) {
|
|
2954
|
-
error(`Profile "${name}" does not exist. Create it with "profile create ${name}"`);
|
|
2955
|
-
process.exit(1);
|
|
2956
|
-
}
|
|
2957
|
-
setCurrentProfile(name);
|
|
2958
|
-
success(`Switched to profile: ${name}`);
|
|
2959
|
-
});
|
|
2960
|
-
profileCmd.command("create <name>").description("Create a new profile").option("--api-key <key>", "API key").option("--username <username>", "Username").option("--client-ip <ip>", "Client IP").option("--sandbox", "Use sandbox API").option("--use", "Switch to this profile after creation").action((name, opts) => {
|
|
2961
|
-
if (profileExists(name)) {
|
|
2962
|
-
error(`Profile "${name}" already exists`);
|
|
2963
|
-
process.exit(1);
|
|
2964
|
-
}
|
|
2965
|
-
createProfile(name, {
|
|
2966
|
-
apiKey: opts.apiKey,
|
|
2967
|
-
username: opts.username,
|
|
2968
|
-
clientIp: opts.clientIp,
|
|
2969
|
-
sandbox: opts.sandbox
|
|
2970
|
-
});
|
|
2971
|
-
success(`Profile "${name}" created`);
|
|
2972
|
-
if (opts.use) {
|
|
2973
|
-
setCurrentProfile(name);
|
|
2974
|
-
info(`Switched to profile: ${name}`);
|
|
2975
|
-
}
|
|
2976
|
-
});
|
|
2977
|
-
profileCmd.command("delete <name>").description("Delete a profile").action((name) => {
|
|
2978
|
-
if (name === "default") {
|
|
2979
|
-
error("Cannot delete the default profile");
|
|
2980
|
-
process.exit(1);
|
|
2981
|
-
}
|
|
2982
|
-
if (deleteProfile(name)) {
|
|
2983
|
-
success(`Profile "${name}" deleted`);
|
|
2984
|
-
} else {
|
|
2985
|
-
error(`Profile "${name}" not found`);
|
|
2986
|
-
process.exit(1);
|
|
2987
|
-
}
|
|
2988
|
-
});
|
|
2989
|
-
profileCmd.command("show [name]").description("Show profile configuration").action((name) => {
|
|
2990
|
-
const profileName = name || getCurrentProfile();
|
|
2991
|
-
const config = loadProfile(profileName);
|
|
2992
|
-
const active = getCurrentProfile();
|
|
2993
|
-
console.log(source_default.bold(`Profile: ${profileName}${profileName === active ? source_default.green(" (active)") : ""}`));
|
|
2994
|
-
info(`API Key: ${config.apiKey ? `${config.apiKey.substring(0, 8)}...` : source_default.gray("not set")}`);
|
|
2995
|
-
info(`Username: ${config.username || source_default.gray("not set")}`);
|
|
2996
|
-
info(`Client IP: ${config.clientIp || source_default.gray("not set")}`);
|
|
2997
|
-
info(`Sandbox: ${config.sandbox ? "yes" : "no"}`);
|
|
2998
|
-
});
|
|
2999
|
-
var configCmd = program2.command("config").description("Manage CLI configuration (for active profile)");
|
|
3000
|
-
configCmd.command("set-key <apiKey>").description("Set API key").action((apiKey) => {
|
|
3001
|
-
setApiKey(apiKey);
|
|
3002
|
-
success(`API key saved to profile: ${getCurrentProfile()}`);
|
|
3003
|
-
});
|
|
3004
|
-
configCmd.command("set-username <username>").description("Set username").action((username) => {
|
|
3005
|
-
setUsername(username);
|
|
3006
|
-
success(`Username saved to profile: ${getCurrentProfile()}`);
|
|
3007
|
-
});
|
|
3008
|
-
configCmd.command("set-client-ip <ip>").description("Set whitelisted client IP").action((ip) => {
|
|
3009
|
-
setClientIp(ip);
|
|
3010
|
-
success(`Client IP saved to profile: ${getCurrentProfile()}`);
|
|
3011
|
-
});
|
|
3012
|
-
configCmd.command("set-sandbox <enabled>").description("Enable or disable sandbox mode (true/false)").action((enabled) => {
|
|
3013
|
-
setSandbox(enabled === "true");
|
|
3014
|
-
success(`Sandbox ${enabled === "true" ? "enabled" : "disabled"} for profile: ${getCurrentProfile()}`);
|
|
3015
|
-
});
|
|
3016
|
-
configCmd.command("show").description("Show current configuration").action(() => {
|
|
3017
|
-
const profileName = getCurrentProfile();
|
|
3018
|
-
const apiKey = getApiKey();
|
|
3019
|
-
const username = getUsername();
|
|
3020
|
-
const clientIp = getClientIp();
|
|
3021
|
-
const sandbox = getSandbox();
|
|
3022
|
-
console.log(source_default.bold(`Active Profile: ${profileName}`));
|
|
3023
|
-
info(`Config directory: ${getConfigDir()}`);
|
|
3024
|
-
info(`API Key: ${apiKey ? `${apiKey.substring(0, 8)}...` : source_default.gray("not set")}`);
|
|
3025
|
-
info(`Username: ${username || source_default.gray("not set")}`);
|
|
3026
|
-
info(`Client IP: ${clientIp || source_default.gray("not set")}`);
|
|
3027
|
-
info(`Sandbox: ${sandbox ? "yes" : "no"}`);
|
|
3028
|
-
});
|
|
3029
|
-
configCmd.command("clear").description("Clear configuration for active profile").action(() => {
|
|
3030
|
-
clearConfig();
|
|
3031
|
-
success(`Configuration cleared for profile: ${getCurrentProfile()}`);
|
|
3032
|
-
});
|
|
3033
|
-
var domainCmd = program2.command("domain").description("Manage domains");
|
|
3034
|
-
domainCmd.command("list").description("List all domains").option("-l, --limit <number>", "Page size", "100").option("--page <number>", "Page number", "1").action(async function(opts) {
|
|
3035
|
-
try {
|
|
3036
|
-
const client = getClient();
|
|
3037
|
-
const result = await client.domains.list({
|
|
3038
|
-
pageSize: parseInt(opts.limit),
|
|
3039
|
-
page: parseInt(opts.page)
|
|
3040
|
-
});
|
|
3041
|
-
print(result, getFormat(this));
|
|
3042
|
-
} catch (err) {
|
|
3043
|
-
error(String(err));
|
|
3044
|
-
process.exit(1);
|
|
3045
|
-
}
|
|
3046
|
-
});
|
|
3047
|
-
domainCmd.command("info <domain>").description("Get detailed info for a domain").action(async function(domain) {
|
|
3048
|
-
try {
|
|
3049
|
-
const client = getClient();
|
|
3050
|
-
const result = await client.domains.getInfo(domain);
|
|
3051
|
-
print(result, getFormat(this));
|
|
3052
|
-
} catch (err) {
|
|
3053
|
-
error(String(err));
|
|
3054
|
-
process.exit(1);
|
|
3055
|
-
}
|
|
3056
|
-
});
|
|
3057
|
-
domainCmd.command("renew <domain>").description("Renew a domain").option("-y, --years <number>", "Number of years to renew", "1").action(async function(domain, opts) {
|
|
3058
|
-
try {
|
|
3059
|
-
const client = getClient();
|
|
3060
|
-
const result = await client.domains.renew(domain, parseInt(opts.years));
|
|
3061
|
-
success(`Domain ${domain} renewed for ${opts.years} year(s)`);
|
|
3062
|
-
print(result, getFormat(this));
|
|
3063
|
-
} catch (err) {
|
|
3064
|
-
error(String(err));
|
|
3065
|
-
process.exit(1);
|
|
3066
|
-
}
|
|
3067
|
-
});
|
|
3068
|
-
domainCmd.command("check <domain>").description("Check domain availability").action(async function(domain) {
|
|
3069
|
-
try {
|
|
3070
|
-
const client = getClient();
|
|
3071
|
-
const result = await client.domains.check(domain);
|
|
3072
|
-
if (result.available) {
|
|
3073
|
-
success(`${domain} is available!`);
|
|
3074
|
-
} else {
|
|
3075
|
-
warn(`${domain} is not available`);
|
|
3076
|
-
}
|
|
3077
|
-
print(result, getFormat(this));
|
|
3078
|
-
} catch (err) {
|
|
3079
|
-
error(String(err));
|
|
3080
|
-
process.exit(1);
|
|
3081
|
-
}
|
|
3082
|
-
});
|
|
3083
|
-
var dnsCmd = program2.command("dns").description("Manage DNS records");
|
|
3084
|
-
dnsCmd.command("get <domain>").description("Get DNS records for a domain").action(async function(domain) {
|
|
3085
|
-
try {
|
|
3086
|
-
const client = getClient();
|
|
3087
|
-
const { sld, tld } = splitDomain(domain);
|
|
3088
|
-
const result = await client.dns.getHosts(sld, tld);
|
|
3089
|
-
print(result, getFormat(this));
|
|
3090
|
-
} catch (err) {
|
|
3091
|
-
error(String(err));
|
|
3092
|
-
process.exit(1);
|
|
3093
|
-
}
|
|
3094
|
-
});
|
|
3095
|
-
dnsCmd.command("set <domain>").description("Set DNS records for a domain (replaces ALL records)").requiredOption("--records <json>", "JSON array of DNS records [{type, name, address, ttl, mxPref?}]").action(async function(domain, opts) {
|
|
3096
|
-
try {
|
|
3097
|
-
const client = getClient();
|
|
3098
|
-
const { sld, tld } = splitDomain(domain);
|
|
3099
|
-
const records = JSON.parse(opts.records);
|
|
3100
|
-
if (!Array.isArray(records)) {
|
|
3101
|
-
error("Records must be a JSON array");
|
|
3102
|
-
process.exit(1);
|
|
3103
|
-
}
|
|
3104
|
-
for (const r of records) {
|
|
3105
|
-
if (!r.type || !r.name || !r.address) {
|
|
3106
|
-
error("Each record must have type, name, and address fields");
|
|
3107
|
-
process.exit(1);
|
|
3108
|
-
}
|
|
3109
|
-
if (!r.ttl)
|
|
3110
|
-
r.ttl = 1800;
|
|
3111
|
-
}
|
|
3112
|
-
await client.dns.setHosts(sld, tld, records);
|
|
3113
|
-
success(`DNS records set for ${domain} (${records.length} records)`);
|
|
3114
|
-
} catch (err) {
|
|
3115
|
-
error(String(err));
|
|
3116
|
-
process.exit(1);
|
|
3117
|
-
}
|
|
3118
|
-
});
|
|
3119
|
-
program2.parse();
|