@hasna/connectors 1.3.31 → 1.3.33
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 +27 -119
- package/bin/mcp.js +33 -121
- package/bin/serve.js +23 -111
- package/connectors/{connect-googledocs → connect-github}/bin/index.js +729 -811
- package/connectors/connect-github/dist/index.js +520 -0
- package/connectors/{connect-cloudflare → connect-yousign}/bun.lock +3 -3
- package/connectors/{connect-imessage → connect-yousign}/node_modules/@types/bun/README.md +1 -1
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/bun/package.json +3 -3
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/bun.d.ts +8 -239
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/executables.mdx +10 -10
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/fullstack.mdx +13 -13
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/bun-apis.mdx +1 -2
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/bunfig.mdx +0 -11
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/hashing.mdx +1 -1
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/server.mdx +7 -34
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/json5.mdx +1 -1
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/markdown.mdx +16 -53
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/yaml.mdx +2 -3
- package/connectors/{connect-imessage → connect-yousign}/node_modules/bun-types/docs/test/configuration.mdx +0 -54
- package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/package.json +1 -1
- package/connectors/{connect-cloudflare → 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-NCasN7x4.js +284 -0
- package/dashboard/dist/index.html +2 -2
- package/dist/index.js +1 -1
- package/dist/mcp/http.d.ts +2 -1
- package/package.json +1 -1
- package/connectors/connect-cloudflare/dist/index.js +0 -2195
- package/connectors/connect-cloudflare/node_modules/@types/bun/README.md +0 -20
- package/connectors/connect-cloudflare/node_modules/bun-types/docs/guides/http/sse.mdx +0 -91
- package/connectors/connect-cloudflare/node_modules/bun-types/docs/runtime/cron.mdx +0 -358
- package/connectors/connect-cloudflare/node_modules/bun-types/docs/runtime/csrf.mdx +0 -171
- package/connectors/connect-cloudflare/node_modules/bun-types/docs/runtime/toml.mdx +0 -238
- package/connectors/connect-cloudflare/node_modules/bun-types/docs/test/configuration.mdx +0 -574
- package/connectors/connect-gmail/bin/index.js +0 -7027
- package/connectors/connect-gmail/dist/cli/index.js +0 -7035
- package/connectors/connect-gmail/dist/index.js +0 -2174
- package/connectors/connect-googleads/.secrets/developer-token.json +0 -1
- package/connectors/connect-googlecontacts/bin/index.js +0 -3964
- package/connectors/connect-googlecontacts/dist/index.js +0 -913
- package/connectors/connect-googledocs/dist/index.js +0 -754
- package/connectors/connect-googledrive/bin/index.js +0 -5689
- package/connectors/connect-googledrive/dist/index.js +0 -1301
- package/connectors/connect-googlephotos/bin/index.js +0 -4911
- package/connectors/connect-googlephotos/dist/index.js +0 -1137
- package/connectors/connect-googletasks/bin/index.js +0 -3607
- package/connectors/connect-googletasks/dist/index.js +0 -650
- package/connectors/connect-imessage/bin/.gitkeep +0 -2
- package/connectors/connect-imessage/bin/index.js +0 -3016
- package/connectors/connect-imessage/bun.lock +0 -32
- package/connectors/connect-imessage/dist/index.js +0 -409
- package/connectors/connect-imessage/node_modules/@types/bun/LICENSE +0 -21
- package/connectors/connect-imessage/node_modules/@types/bun/index.d.ts +0 -1
- package/connectors/connect-imessage/node_modules/@types/bun/package.json +0 -53
- package/connectors/connect-imessage/node_modules/@types/node/LICENSE +0 -21
- package/connectors/connect-imessage/node_modules/@types/node/README.md +0 -15
- package/connectors/connect-imessage/node_modules/@types/node/assert/strict.d.ts +0 -59
- package/connectors/connect-imessage/node_modules/@types/node/assert.d.ts +0 -950
- package/connectors/connect-imessage/node_modules/@types/node/async_hooks.d.ts +0 -603
- package/connectors/connect-imessage/node_modules/@types/node/buffer.buffer.d.ts +0 -466
- package/connectors/connect-imessage/node_modules/@types/node/buffer.d.ts +0 -1765
- package/connectors/connect-imessage/node_modules/@types/node/child_process.d.ts +0 -1366
- package/connectors/connect-imessage/node_modules/@types/node/cluster.d.ts +0 -432
- package/connectors/connect-imessage/node_modules/@types/node/compatibility/iterators.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/@types/node/console.d.ts +0 -93
- package/connectors/connect-imessage/node_modules/@types/node/constants.d.ts +0 -14
- package/connectors/connect-imessage/node_modules/@types/node/crypto.d.ts +0 -4047
- package/connectors/connect-imessage/node_modules/@types/node/dgram.d.ts +0 -537
- package/connectors/connect-imessage/node_modules/@types/node/diagnostics_channel.d.ts +0 -552
- package/connectors/connect-imessage/node_modules/@types/node/dns/promises.d.ts +0 -497
- package/connectors/connect-imessage/node_modules/@types/node/dns.d.ts +0 -876
- package/connectors/connect-imessage/node_modules/@types/node/domain.d.ts +0 -150
- package/connectors/connect-imessage/node_modules/@types/node/events.d.ts +0 -1011
- package/connectors/connect-imessage/node_modules/@types/node/fs/promises.d.ts +0 -1319
- package/connectors/connect-imessage/node_modules/@types/node/fs.d.ts +0 -4658
- package/connectors/connect-imessage/node_modules/@types/node/globals.d.ts +0 -150
- package/connectors/connect-imessage/node_modules/@types/node/globals.typedarray.d.ts +0 -101
- package/connectors/connect-imessage/node_modules/@types/node/http.d.ts +0 -2147
- package/connectors/connect-imessage/node_modules/@types/node/http2.d.ts +0 -2470
- package/connectors/connect-imessage/node_modules/@types/node/https.d.ts +0 -400
- package/connectors/connect-imessage/node_modules/@types/node/index.d.ts +0 -115
- package/connectors/connect-imessage/node_modules/@types/node/inspector/promises.d.ts +0 -35
- package/connectors/connect-imessage/node_modules/@types/node/inspector.d.ts +0 -264
- package/connectors/connect-imessage/node_modules/@types/node/inspector.generated.d.ts +0 -4401
- package/connectors/connect-imessage/node_modules/@types/node/module.d.ts +0 -754
- package/connectors/connect-imessage/node_modules/@types/node/net.d.ts +0 -970
- package/connectors/connect-imessage/node_modules/@types/node/os.d.ts +0 -498
- package/connectors/connect-imessage/node_modules/@types/node/package.json +0 -155
- package/connectors/connect-imessage/node_modules/@types/node/path/posix.d.ts +0 -8
- package/connectors/connect-imessage/node_modules/@types/node/path/win32.d.ts +0 -8
- package/connectors/connect-imessage/node_modules/@types/node/path.d.ts +0 -178
- package/connectors/connect-imessage/node_modules/@types/node/perf_hooks.d.ts +0 -612
- package/connectors/connect-imessage/node_modules/@types/node/process.d.ts +0 -2175
- package/connectors/connect-imessage/node_modules/@types/node/punycode.d.ts +0 -89
- package/connectors/connect-imessage/node_modules/@types/node/querystring.d.ts +0 -139
- package/connectors/connect-imessage/node_modules/@types/node/quic.d.ts +0 -897
- package/connectors/connect-imessage/node_modules/@types/node/readline/promises.d.ts +0 -158
- package/connectors/connect-imessage/node_modules/@types/node/readline.d.ts +0 -507
- package/connectors/connect-imessage/node_modules/@types/node/repl.d.ts +0 -405
- package/connectors/connect-imessage/node_modules/@types/node/sea.d.ts +0 -47
- package/connectors/connect-imessage/node_modules/@types/node/sqlite.d.ts +0 -1021
- package/connectors/connect-imessage/node_modules/@types/node/stream/consumers.d.ts +0 -114
- package/connectors/connect-imessage/node_modules/@types/node/stream/promises.d.ts +0 -211
- package/connectors/connect-imessage/node_modules/@types/node/stream/web.d.ts +0 -296
- package/connectors/connect-imessage/node_modules/@types/node/stream.d.ts +0 -1774
- package/connectors/connect-imessage/node_modules/@types/node/string_decoder.d.ts +0 -27
- package/connectors/connect-imessage/node_modules/@types/node/test/reporters.d.ts +0 -58
- package/connectors/connect-imessage/node_modules/@types/node/test.d.ts +0 -2202
- package/connectors/connect-imessage/node_modules/@types/node/timers/promises.d.ts +0 -93
- package/connectors/connect-imessage/node_modules/@types/node/timers.d.ts +0 -149
- package/connectors/connect-imessage/node_modules/@types/node/tls.d.ts +0 -1193
- package/connectors/connect-imessage/node_modules/@types/node/trace_events.d.ts +0 -103
- package/connectors/connect-imessage/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -462
- package/connectors/connect-imessage/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/connectors/connect-imessage/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -36
- package/connectors/connect-imessage/node_modules/@types/node/ts5.6/index.d.ts +0 -117
- package/connectors/connect-imessage/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/connectors/connect-imessage/node_modules/@types/node/ts5.7/index.d.ts +0 -117
- package/connectors/connect-imessage/node_modules/@types/node/tty.d.ts +0 -225
- package/connectors/connect-imessage/node_modules/@types/node/url.d.ts +0 -532
- package/connectors/connect-imessage/node_modules/@types/node/util/types.d.ts +0 -558
- package/connectors/connect-imessage/node_modules/@types/node/util.d.ts +0 -1677
- package/connectors/connect-imessage/node_modules/@types/node/v8.d.ts +0 -980
- package/connectors/connect-imessage/node_modules/@types/node/vm.d.ts +0 -1170
- package/connectors/connect-imessage/node_modules/@types/node/wasi.d.ts +0 -131
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -59
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/domexception.d.ts +0 -68
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/events.d.ts +0 -106
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/fetch.d.ts +0 -69
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/navigator.d.ts +0 -25
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/storage.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/connectors/connect-imessage/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/@types/node/worker_threads.d.ts +0 -671
- package/connectors/connect-imessage/node_modules/@types/node/zlib.d.ts +0 -589
- package/connectors/connect-imessage/node_modules/bun-types/CLAUDE.md +0 -105
- package/connectors/connect-imessage/node_modules/bun-types/README.md +0 -33
- package/connectors/connect-imessage/node_modules/bun-types/bun.d.ts +0 -9483
- package/connectors/connect-imessage/node_modules/bun-types/bun.ns.d.ts +0 -5
- package/connectors/connect-imessage/node_modules/bun-types/bundle.d.ts +0 -74
- package/connectors/connect-imessage/node_modules/bun-types/deprecated.d.ts +0 -184
- package/connectors/connect-imessage/node_modules/bun-types/devserver.d.ts +0 -187
- package/connectors/connect-imessage/node_modules/bun-types/docs/README.md +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/bytecode.mdx +0 -447
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/css.mdx +0 -1024
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/esbuild.mdx +0 -304
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/executables.mdx +0 -1318
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/fullstack.mdx +0 -1086
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/hot-reloading.mdx +0 -229
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/html-static.mdx +0 -498
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/index.mdx +0 -1840
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/loaders.mdx +0 -451
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/macros.mdx +0 -328
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/minifier.mdx +0 -1286
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/plugins.mdx +0 -477
- package/connectors/connect-imessage/node_modules/bun-types/docs/bundler/standalone-html.mdx +0 -314
- package/connectors/connect-imessage/node_modules/bun-types/docs/feedback.mdx +0 -75
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +0 -29
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +0 -26
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +0 -27
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +0 -41
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +0 -27
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +0 -27
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +0 -204
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +0 -161
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +0 -193
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/railway.mdx +0 -145
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/render.mdx +0 -82
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/deployment/vercel.mdx +0 -97
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +0 -82
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +0 -80
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +0 -151
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +0 -195
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +0 -31
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/express.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +0 -261
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +0 -47
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +0 -92
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +0 -234
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +0 -60
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +0 -103
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +0 -96
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +0 -55
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +0 -169
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +0 -164
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +0 -114
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/react.mdx +0 -52
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +0 -97
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +0 -54
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +0 -62
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +0 -54
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +0 -138
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +0 -114
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +0 -791
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +0 -87
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +0 -77
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +0 -71
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +0 -97
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/cluster.mdx +0 -69
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +0 -35
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/fetch.mdx +0 -26
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/file-uploads.mdx +0 -97
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/hot.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/proxy.mdx +0 -50
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/server.mdx +0 -48
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/simple.mdx +0 -20
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/sse.mdx +0 -91
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/stream-file.mdx +0 -50
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +0 -22
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/http/tls.mdx +0 -32
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/index.mdx +0 -10
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add-dev.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add-git.mdx +0 -40
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add-optional.mdx +0 -27
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add-peer.mdx +0 -45
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add-tarball.mdx +0 -35
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/add.mdx +0 -44
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +0 -76
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/cicd.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/custom-registry.mdx +0 -32
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +0 -230
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +0 -48
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/npm-alias.mdx +0 -25
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/registry-scope.mdx +0 -40
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/trusted.mdx +0 -52
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/workspaces.mdx +0 -70
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/install/yarnlock.mdx +0 -51
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/argv.mdx +0 -66
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/ipc.mdx +0 -69
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +0 -15
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/os-signals.mdx +0 -31
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +0 -34
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/spawn.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/process/stdin.mdx +0 -62
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +0 -30
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/buffer.mdx +0 -21
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/exists.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/json.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/mime.mdx +0 -22
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/stream.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/string.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +0 -23
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/read-file/watch.mdx +0 -66
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +0 -295
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/cicd.mdx +0 -45
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +0 -61
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +0 -149
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +0 -39
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +0 -21
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/import-html.mdx +0 -15
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/import-json.mdx +0 -46
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +0 -74
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +0 -32
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +0 -104
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/read-env.mdx +0 -37
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/set-env.mdx +0 -51
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/shell.mdx +0 -42
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/timezone.mdx +0 -38
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +0 -31
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/typescript.mdx +0 -56
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +0 -47
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +0 -103
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +0 -13
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +0 -13
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +0 -14
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +0 -14
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +0 -13
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-array.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-blob.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-json.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-string.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/bail.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +0 -146
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +0 -67
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/coverage.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/happy-dom.mdx +0 -73
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +0 -125
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/mock-clock.mdx +0 -50
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/mock-functions.mdx +0 -70
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/rerun-each.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/run-tests.mdx +0 -116
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/skip-tests.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/snapshot.mdx +0 -102
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/spy-on.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/svelte-test.mdx +0 -113
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/testing-library.mdx +0 -93
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/timeout.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/todo-tests.mdx +0 -74
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/test/watch-mode.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/base64.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/deep-equals.mdx +0 -41
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/deflate.mdx +0 -20
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/detect-bun.mdx +0 -28
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/entrypoint.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/escape-html.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/gzip.mdx +0 -20
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +0 -56
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +0 -15
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +0 -15
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +0 -15
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +0 -25
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/main.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/sleep.mdx +0 -24
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/upgrade.mdx +0 -93
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/version.mdx +0 -23
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/websocket/compression.mdx +0 -33
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/websocket/context.mdx +0 -79
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +0 -43
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/websocket/simple.mdx +0 -38
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/append.mdx +0 -54
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/basic.mdx +0 -46
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/blob.mdx +0 -30
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/cat.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/filesink.mdx +0 -54
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/response.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/stdout.mdx +0 -23
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/stream.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/guides/write-file/unlink.mdx +0 -18
- package/connectors/connect-imessage/node_modules/bun-types/docs/index.mdx +0 -133
- package/connectors/connect-imessage/node_modules/bun-types/docs/installation.mdx +0 -372
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/bunx.mdx +0 -91
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/catalogs.mdx +0 -292
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/add.mdx +0 -179
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/audit.mdx +0 -60
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/info.mdx +0 -70
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/install.mdx +0 -591
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/link.mdx +0 -61
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/outdated.mdx +0 -197
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/patch.mdx +0 -69
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/pm.mdx +0 -323
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/publish.mdx +0 -131
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/remove.mdx +0 -16
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/update.mdx +0 -140
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/cli/why.mdx +0 -84
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/filter.mdx +0 -127
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/global-cache.mdx +0 -72
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/isolated-installs.mdx +0 -220
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/lifecycle.mdx +0 -64
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/lockfile.mdx +0 -64
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/npmrc.mdx +0 -245
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/overrides.mdx +0 -83
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/scopes-registries.mdx +0 -35
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/security-scanner-api.mdx +0 -95
- package/connectors/connect-imessage/node_modules/bun-types/docs/pm/workspaces.mdx +0 -115
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/benchmarking.mdx +0 -296
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/bindgen.mdx +0 -223
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/building-windows.mdx +0 -143
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/contributing.mdx +0 -380
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/feedback.mdx +0 -20
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/license.mdx +0 -78
- package/connectors/connect-imessage/node_modules/bun-types/docs/project/roadmap.mdx +0 -8
- package/connectors/connect-imessage/node_modules/bun-types/docs/quickstart.mdx +0 -251
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/archive.mdx +0 -452
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/auto-install.mdx +0 -97
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/binary-data.mdx +0 -846
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/bun-apis.mdx +0 -60
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/bunfig.mdx +0 -765
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/c-compiler.mdx +0 -204
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/child-process.mdx +0 -659
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/color.mdx +0 -267
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/console.mdx +0 -67
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/cookies.mdx +0 -454
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/cron.mdx +0 -447
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/csrf.mdx +0 -171
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/debugger.mdx +0 -335
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/environment-variables.mdx +0 -231
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/ffi.mdx +0 -567
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/file-io.mdx +0 -306
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/file-system-router.mdx +0 -118
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/file-types.mdx +0 -482
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/glob.mdx +0 -181
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/globals.mdx +0 -72
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/hashing.mdx +0 -315
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/html-rewriter.mdx +0 -333
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/cookies.mdx +0 -79
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/error-handling.mdx +0 -40
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/metrics.mdx +0 -36
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/routing.mdx +0 -289
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/server.mdx +0 -672
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/tls.mdx +0 -101
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/http/websockets.mdx +0 -414
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/index.mdx +0 -223
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/json5.mdx +0 -271
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/jsonl.mdx +0 -188
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/jsx.mdx +0 -115
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/markdown.mdx +0 -381
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/module-resolution.mdx +0 -374
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/networking/dns.mdx +0 -111
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/networking/fetch.mdx +0 -484
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/networking/tcp.mdx +0 -239
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/networking/udp.mdx +0 -180
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/node-api.mdx +0 -19
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +0 -468
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/plugins.mdx +0 -419
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/redis.mdx +0 -583
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/repl.mdx +0 -176
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/s3.mdx +0 -881
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/secrets.mdx +0 -340
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/semver.mdx +0 -57
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/shell.mdx +0 -637
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/sql.mdx +0 -1404
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/sqlite.mdx +0 -746
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/streams.mdx +0 -232
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/templating/create.mdx +0 -268
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/templating/init.mdx +0 -58
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/toml.mdx +0 -238
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/transpiler.mdx +0 -288
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/typescript.mdx +0 -59
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/utils.mdx +0 -1010
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/watch-mode.mdx +0 -161
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/web-apis.mdx +0 -29
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/workers.mdx +0 -314
- package/connectors/connect-imessage/node_modules/bun-types/docs/runtime/yaml.mdx +0 -470
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/add.mdx +0 -166
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/build.mdx +0 -197
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/bunx.mdx +0 -49
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/feedback.mdx +0 -17
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/init.mdx +0 -84
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/install.mdx +0 -173
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/link.mdx +0 -163
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/outdated.mdx +0 -140
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/patch.mdx +0 -171
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/publish.mdx +0 -198
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/remove.mdx +0 -146
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/run.mdx +0 -305
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/test.mdx +0 -105
- package/connectors/connect-imessage/node_modules/bun-types/docs/snippets/cli/update.mdx +0 -144
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/code-coverage.mdx +0 -409
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/dates-times.mdx +0 -129
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/discovery.mdx +0 -90
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/dom.mdx +0 -226
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/index.mdx +0 -409
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/lifecycle.mdx +0 -366
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/mocks.mdx +0 -637
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/reporters.mdx +0 -126
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/runtime-behavior.mdx +0 -342
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/snapshots.mdx +0 -434
- package/connectors/connect-imessage/node_modules/bun-types/docs/test/writing-tests.mdx +0 -672
- package/connectors/connect-imessage/node_modules/bun-types/docs/typescript-6.mdx +0 -79
- package/connectors/connect-imessage/node_modules/bun-types/docs/typescript.mdx +0 -59
- package/connectors/connect-imessage/node_modules/bun-types/extensions.d.ts +0 -40
- package/connectors/connect-imessage/node_modules/bun-types/fetch.d.ts +0 -79
- package/connectors/connect-imessage/node_modules/bun-types/ffi.d.ts +0 -1154
- package/connectors/connect-imessage/node_modules/bun-types/globals.d.ts +0 -2067
- package/connectors/connect-imessage/node_modules/bun-types/html-rewriter.d.ts +0 -186
- package/connectors/connect-imessage/node_modules/bun-types/index.d.ts +0 -32
- package/connectors/connect-imessage/node_modules/bun-types/jsc.d.ts +0 -233
- package/connectors/connect-imessage/node_modules/bun-types/jsx.d.ts +0 -11
- package/connectors/connect-imessage/node_modules/bun-types/overrides.d.ts +0 -376
- package/connectors/connect-imessage/node_modules/bun-types/package.json +0 -37
- package/connectors/connect-imessage/node_modules/bun-types/redis.d.ts +0 -3352
- package/connectors/connect-imessage/node_modules/bun-types/s3.d.ts +0 -1354
- package/connectors/connect-imessage/node_modules/bun-types/security.d.ts +0 -101
- package/connectors/connect-imessage/node_modules/bun-types/serve.d.ts +0 -1296
- package/connectors/connect-imessage/node_modules/bun-types/shell.d.ts +0 -380
- package/connectors/connect-imessage/node_modules/bun-types/sql.d.ts +0 -887
- package/connectors/connect-imessage/node_modules/bun-types/sqlite.d.ts +0 -1322
- package/connectors/connect-imessage/node_modules/bun-types/test-globals.d.ts +0 -22
- package/connectors/connect-imessage/node_modules/bun-types/test.d.ts +0 -2392
- package/connectors/connect-imessage/node_modules/bun-types/vendor/expect-type/branding.d.ts +0 -283
- package/connectors/connect-imessage/node_modules/bun-types/vendor/expect-type/index.d.ts +0 -1207
- package/connectors/connect-imessage/node_modules/bun-types/vendor/expect-type/messages.d.ts +0 -395
- package/connectors/connect-imessage/node_modules/bun-types/vendor/expect-type/overloads.d.ts +0 -669
- package/connectors/connect-imessage/node_modules/bun-types/vendor/expect-type/utils.d.ts +0 -431
- package/connectors/connect-imessage/node_modules/bun-types/wasm.d.ts +0 -198
- package/connectors/connect-imessage/node_modules/chalk/license +0 -9
- package/connectors/connect-imessage/node_modules/chalk/package.json +0 -83
- package/connectors/connect-imessage/node_modules/chalk/readme.md +0 -297
- package/connectors/connect-imessage/node_modules/chalk/source/index.d.ts +0 -325
- package/connectors/connect-imessage/node_modules/chalk/source/index.js +0 -225
- package/connectors/connect-imessage/node_modules/chalk/source/utilities.js +0 -33
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -236
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -223
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -1
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/supports-color/browser.js +0 -34
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -55
- package/connectors/connect-imessage/node_modules/chalk/source/vendor/supports-color/index.js +0 -190
- package/connectors/connect-imessage/node_modules/commander/LICENSE +0 -22
- package/connectors/connect-imessage/node_modules/commander/Readme.md +0 -1157
- package/connectors/connect-imessage/node_modules/commander/esm.mjs +0 -16
- package/connectors/connect-imessage/node_modules/commander/index.js +0 -24
- package/connectors/connect-imessage/node_modules/commander/lib/argument.js +0 -149
- package/connectors/connect-imessage/node_modules/commander/lib/command.js +0 -2509
- package/connectors/connect-imessage/node_modules/commander/lib/error.js +0 -39
- package/connectors/connect-imessage/node_modules/commander/lib/help.js +0 -520
- package/connectors/connect-imessage/node_modules/commander/lib/option.js +0 -330
- package/connectors/connect-imessage/node_modules/commander/lib/suggestSimilar.js +0 -101
- package/connectors/connect-imessage/node_modules/commander/package-support.json +0 -16
- package/connectors/connect-imessage/node_modules/commander/package.json +0 -84
- package/connectors/connect-imessage/node_modules/commander/typings/esm.d.mts +0 -3
- package/connectors/connect-imessage/node_modules/commander/typings/index.d.ts +0 -969
- package/connectors/connect-imessage/node_modules/typescript/LICENSE.txt +0 -55
- package/connectors/connect-imessage/node_modules/typescript/README.md +0 -50
- package/connectors/connect-imessage/node_modules/typescript/SECURITY.md +0 -41
- package/connectors/connect-imessage/node_modules/typescript/ThirdPartyNoticeText.txt +0 -193
- package/connectors/connect-imessage/node_modules/typescript/bin/tsc +0 -2
- package/connectors/connect-imessage/node_modules/typescript/bin/tsserver +0 -2
- package/connectors/connect-imessage/node_modules/typescript/lib/_tsc.js +0 -133818
- package/connectors/connect-imessage/node_modules/typescript/lib/_tsserver.js +0 -659
- package/connectors/connect-imessage/node_modules/typescript/lib/_typingsInstaller.js +0 -222
- package/connectors/connect-imessage/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.d.ts +0 -22
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.decorators.d.ts +0 -384
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -22
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -41
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.dom.d.ts +0 -39429
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -571
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -147
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -597
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.d.ts +0 -28
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -77
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -605
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -81
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -128
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -144
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -46
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -326
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -116
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2016.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -31
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.d.ts +0 -26
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -31
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -44
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -49
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -135
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -45
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -53
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -77
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -53
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -83
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -30
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -37
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -79
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -33
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -37
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -765
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.d.ts +0 -27
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -42
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -474
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -28
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -47
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -99
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -44
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -41
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -166
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -48
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -33
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -78
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -121
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.d.ts +0 -25
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -75
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -145
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -26
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -39
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -25
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -924
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2023.d.ts +0 -22
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -56
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -65
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.d.ts +0 -26
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -35
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -25
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -68
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es5.d.ts +0 -4601
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.es6.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -35
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -96
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -28
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -193
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -445
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -24
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -148
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -34
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -25
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.scripthost.d.ts +0 -322
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -41
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.webworker.d.ts +0 -13150
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -23
- package/connectors/connect-imessage/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -340
- package/connectors/connect-imessage/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/tsc.js +0 -8
- package/connectors/connect-imessage/node_modules/typescript/lib/tsserver.js +0 -8
- package/connectors/connect-imessage/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -17
- package/connectors/connect-imessage/node_modules/typescript/lib/tsserverlibrary.js +0 -21
- package/connectors/connect-imessage/node_modules/typescript/lib/typesMap.json +0 -497
- package/connectors/connect-imessage/node_modules/typescript/lib/typescript.d.ts +0 -11437
- package/connectors/connect-imessage/node_modules/typescript/lib/typescript.js +0 -200276
- package/connectors/connect-imessage/node_modules/typescript/lib/typingsInstaller.js +0 -8
- package/connectors/connect-imessage/node_modules/typescript/lib/watchGuard.js +0 -53
- package/connectors/connect-imessage/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -2122
- package/connectors/connect-imessage/node_modules/typescript/package.json +0 -120
- package/connectors/connect-imessage/node_modules/undici-types/LICENSE +0 -21
- package/connectors/connect-imessage/node_modules/undici-types/README.md +0 -6
- package/connectors/connect-imessage/node_modules/undici-types/agent.d.ts +0 -32
- package/connectors/connect-imessage/node_modules/undici-types/api.d.ts +0 -43
- package/connectors/connect-imessage/node_modules/undici-types/balanced-pool.d.ts +0 -30
- package/connectors/connect-imessage/node_modules/undici-types/cache-interceptor.d.ts +0 -179
- package/connectors/connect-imessage/node_modules/undici-types/cache.d.ts +0 -36
- package/connectors/connect-imessage/node_modules/undici-types/client-stats.d.ts +0 -15
- package/connectors/connect-imessage/node_modules/undici-types/client.d.ts +0 -118
- package/connectors/connect-imessage/node_modules/undici-types/connector.d.ts +0 -34
- package/connectors/connect-imessage/node_modules/undici-types/content-type.d.ts +0 -21
- package/connectors/connect-imessage/node_modules/undici-types/cookies.d.ts +0 -30
- package/connectors/connect-imessage/node_modules/undici-types/diagnostics-channel.d.ts +0 -74
- package/connectors/connect-imessage/node_modules/undici-types/dispatcher.d.ts +0 -276
- package/connectors/connect-imessage/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -22
- package/connectors/connect-imessage/node_modules/undici-types/errors.d.ts +0 -161
- package/connectors/connect-imessage/node_modules/undici-types/eventsource.d.ts +0 -66
- package/connectors/connect-imessage/node_modules/undici-types/fetch.d.ts +0 -211
- package/connectors/connect-imessage/node_modules/undici-types/formdata.d.ts +0 -108
- package/connectors/connect-imessage/node_modules/undici-types/global-dispatcher.d.ts +0 -9
- package/connectors/connect-imessage/node_modules/undici-types/global-origin.d.ts +0 -7
- package/connectors/connect-imessage/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/connectors/connect-imessage/node_modules/undici-types/handlers.d.ts +0 -15
- package/connectors/connect-imessage/node_modules/undici-types/header.d.ts +0 -160
- package/connectors/connect-imessage/node_modules/undici-types/index.d.ts +0 -88
- package/connectors/connect-imessage/node_modules/undici-types/interceptors.d.ts +0 -73
- package/connectors/connect-imessage/node_modules/undici-types/mock-agent.d.ts +0 -68
- package/connectors/connect-imessage/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/connectors/connect-imessage/node_modules/undici-types/mock-client.d.ts +0 -27
- package/connectors/connect-imessage/node_modules/undici-types/mock-errors.d.ts +0 -12
- package/connectors/connect-imessage/node_modules/undici-types/mock-interceptor.d.ts +0 -94
- package/connectors/connect-imessage/node_modules/undici-types/mock-pool.d.ts +0 -27
- package/connectors/connect-imessage/node_modules/undici-types/package.json +0 -55
- package/connectors/connect-imessage/node_modules/undici-types/patch.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/undici-types/pool-stats.d.ts +0 -19
- package/connectors/connect-imessage/node_modules/undici-types/pool.d.ts +0 -41
- package/connectors/connect-imessage/node_modules/undici-types/proxy-agent.d.ts +0 -29
- package/connectors/connect-imessage/node_modules/undici-types/readable.d.ts +0 -68
- package/connectors/connect-imessage/node_modules/undici-types/retry-agent.d.ts +0 -8
- package/connectors/connect-imessage/node_modules/undici-types/retry-handler.d.ts +0 -125
- package/connectors/connect-imessage/node_modules/undici-types/round-robin-pool.d.ts +0 -41
- package/connectors/connect-imessage/node_modules/undici-types/snapshot-agent.d.ts +0 -109
- package/connectors/connect-imessage/node_modules/undici-types/util.d.ts +0 -18
- package/connectors/connect-imessage/node_modules/undici-types/utility.d.ts +0 -7
- package/connectors/connect-imessage/node_modules/undici-types/webidl.d.ts +0 -341
- package/connectors/connect-imessage/node_modules/undici-types/websocket.d.ts +0 -186
- package/connectors/connect-stripe/bin/index.js +0 -4526
- package/connectors/connect-stripe/dist/index.js +0 -815
- package/dashboard/dist/assets/index-ClBXkNbL.css +0 -1
- package/dashboard/dist/assets/index-DvfmyAO4.js +0 -284
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/bun/LICENSE +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/bun/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/LICENSE +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/README.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/assert/strict.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/assert.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/async_hooks.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/buffer.buffer.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/buffer.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/child_process.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/cluster.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/compatibility/iterators.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/console.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/constants.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/crypto.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/dgram.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/diagnostics_channel.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/dns/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/dns.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/domain.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/events.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/fs/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/fs.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/globals.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/globals.typedarray.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/http.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/http2.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/https.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/inspector/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/inspector.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/inspector.generated.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/module.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/net.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/os.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/package.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/path/posix.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/path/win32.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/path.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/perf_hooks.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/process.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/punycode.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/querystring.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/quic.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/readline/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/readline.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/repl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/sea.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/sqlite.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/stream/consumers.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/stream/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/stream/web.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/stream.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/string_decoder.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/test/reporters.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/test.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/timers/promises.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/timers.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/tls.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/trace_events.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.6/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/ts5.7/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/tty.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/url.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/util/types.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/util.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/v8.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/vm.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/wasi.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/abortcontroller.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/blob.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/console.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/crypto.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/domexception.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/encoding.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/events.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/fetch.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/importmeta.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/messaging.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/navigator.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/performance.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/storage.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/streams.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/timers.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/web-globals/url.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/worker_threads.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/@types/node/zlib.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/CLAUDE.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/README.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/bun.ns.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/bundle.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/deprecated.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/devserver.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/README.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/bytecode.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/css.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/esbuild.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/hot-reloading.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/html-static.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/index.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/loaders.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/macros.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/minifier.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/plugins.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/bundler/standalone-html.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/feedback.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/railway.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/render.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/deployment/vercel.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/express.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/react.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/cluster.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/fetch.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/file-uploads.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/hot.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/proxy.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/server.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/simple.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-file.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/http/tls.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/index.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add-dev.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add-git.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add-optional.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add-peer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add-tarball.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/add.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/cicd.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/custom-registry.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/npm-alias.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/registry-scope.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/trusted.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/workspaces.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/install/yarnlock.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/argv.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/ipc.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/os-signals.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/spawn.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/process/stdin.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/buffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/exists.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/json.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/mime.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/stream.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/read-file/watch.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/cicd.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-html.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-json.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/read-env.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/set-env.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/shell.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/timezone.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/typescript.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-array.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-json.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-string.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/bail.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/coverage.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/happy-dom.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/mock-clock.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/mock-functions.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/rerun-each.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/run-tests.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/skip-tests.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/snapshot.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/spy-on.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/svelte-test.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/testing-library.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/timeout.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/todo-tests.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/test/watch-mode.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/base64.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/deep-equals.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/deflate.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/detect-bun.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/entrypoint.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/escape-html.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/gzip.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/main.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/sleep.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/upgrade.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/version.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/websocket/compression.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/websocket/context.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/websocket/simple.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/append.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/basic.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/blob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/cat.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/filesink.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/response.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/stdout.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/stream.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/guides/write-file/unlink.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/index.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/installation.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/bunx.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/catalogs.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/add.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/audit.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/info.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/install.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/link.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/outdated.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/patch.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/pm.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/publish.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/remove.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/update.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/cli/why.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/filter.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/global-cache.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/isolated-installs.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/lifecycle.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/lockfile.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/npmrc.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/overrides.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/scopes-registries.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/security-scanner-api.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/pm/workspaces.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/benchmarking.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/bindgen.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/building-windows.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/contributing.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/feedback.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/license.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/project/roadmap.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/quickstart.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/archive.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/auto-install.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/binary-data.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/c-compiler.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/child-process.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/color.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/console.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/cookies.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/debugger.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/environment-variables.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/ffi.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/file-io.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/file-system-router.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/file-types.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/glob.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/globals.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/html-rewriter.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/cookies.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/error-handling.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/metrics.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/routing.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/tls.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/http/websockets.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/index.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/jsonl.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/jsx.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/module-resolution.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/networking/dns.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/networking/fetch.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/networking/tcp.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/networking/udp.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/node-api.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/plugins.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/redis.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/repl.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/s3.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/secrets.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/semver.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/shell.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/sql.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/sqlite.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/streams.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/templating/create.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/templating/init.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/transpiler.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/typescript.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/utils.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/watch-mode.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/web-apis.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/runtime/workers.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/add.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/build.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/bunx.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/feedback.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/init.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/install.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/link.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/outdated.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/patch.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/publish.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/remove.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/run.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/test.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/snippets/cli/update.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/code-coverage.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/dates-times.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/discovery.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/dom.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/index.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/lifecycle.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/mocks.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/reporters.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/runtime-behavior.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/snapshots.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/test/writing-tests.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/docs/typescript.mdx +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/extensions.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/fetch.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/ffi.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/globals.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/html-rewriter.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/jsc.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/jsx.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/overrides.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/redis.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/security.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/serve.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/shell.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/sql.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/sqlite.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/test-globals.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/test.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/vendor/expect-type/branding.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/vendor/expect-type/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/vendor/expect-type/messages.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/vendor/expect-type/overloads.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/vendor/expect-type/utils.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/bun-types/wasm.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/license +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/package.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/readme.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/index.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/utilities.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/ansi-styles/index.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/supports-color/browser.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/supports-color/browser.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/supports-color/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/chalk/source/vendor/supports-color/index.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/LICENSE +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/Readme.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/esm.mjs +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/index.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/argument.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/command.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/error.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/help.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/option.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/lib/suggestSimilar.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/package-support.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/package.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/typings/esm.d.mts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/commander/typings/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/LICENSE.txt +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/README.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/SECURITY.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/ThirdPartyNoticeText.txt +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/bin/tsc +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/bin/tsserver +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/_tsc.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/_tsserver.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/_typingsInstaller.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/de/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/es/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/it/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.decorators.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.decorators.legacy.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.dom.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.dom.iterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.collection.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.core.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.generator.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.iterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.proxy.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.reflect.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.symbol.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2016.array.include.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2016.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2016.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2016.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.date.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.object.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2018.regexp.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.object.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2019.symbol.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.bigint.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.date.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.number.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2021.weakref.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.error.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.object.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.regexp.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2022.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2023.array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2023.collection.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2023.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2023.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2023.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.collection.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.object.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.regexp.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es2024.string.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es5.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.es6.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.array.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.collection.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.decorators.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.disposable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.error.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.float16.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.full.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.intl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.iterator.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.promise.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.scripthost.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.webworker.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/lib.webworker.iterable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/tsc.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/tsserver.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/tsserverlibrary.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/tsserverlibrary.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/typesMap.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/typescript.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/typescript.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/typingsInstaller.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/watchGuard.js +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/typescript/package.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/LICENSE +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/README.md +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/api.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/balanced-pool.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/cache-interceptor.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/cache.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/client-stats.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/client.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/connector.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/content-type.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/cookies.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/diagnostics-channel.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/dispatcher.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/errors.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/eventsource.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/fetch.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/formdata.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/global-dispatcher.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/global-origin.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/h2c-client.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/handlers.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/header.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/index.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/interceptors.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-call-history.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-client.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-errors.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-interceptor.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/mock-pool.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/package.json +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/patch.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/pool-stats.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/pool.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/proxy-agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/readable.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/retry-agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/retry-handler.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/round-robin-pool.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/snapshot-agent.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/util.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/utility.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/webidl.d.ts +0 -0
- /package/connectors/{connect-cloudflare → connect-yousign}/node_modules/undici-types/websocket.d.ts +0 -0
|
@@ -1,4911 +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
|
-
function __accessProp(key) {
|
|
9
|
-
return this[key];
|
|
10
|
-
}
|
|
11
|
-
var __toESMCache_node;
|
|
12
|
-
var __toESMCache_esm;
|
|
13
|
-
var __toESM = (mod, isNodeMode, target) => {
|
|
14
|
-
var canCache = mod != null && typeof mod === "object";
|
|
15
|
-
if (canCache) {
|
|
16
|
-
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
17
|
-
var cached = cache.get(mod);
|
|
18
|
-
if (cached)
|
|
19
|
-
return cached;
|
|
20
|
-
}
|
|
21
|
-
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
22
|
-
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
23
|
-
for (let key of __getOwnPropNames(mod))
|
|
24
|
-
if (!__hasOwnProp.call(to, key))
|
|
25
|
-
__defProp(to, key, {
|
|
26
|
-
get: __accessProp.bind(mod, key),
|
|
27
|
-
enumerable: true
|
|
28
|
-
});
|
|
29
|
-
if (canCache)
|
|
30
|
-
cache.set(mod, to);
|
|
31
|
-
return to;
|
|
32
|
-
};
|
|
33
|
-
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
|
-
var __require = import.meta.require;
|
|
35
|
-
|
|
36
|
-
// ../../node_modules/commander/lib/error.js
|
|
37
|
-
var require_error = __commonJS((exports) => {
|
|
38
|
-
class CommanderError extends Error {
|
|
39
|
-
constructor(exitCode, code, message) {
|
|
40
|
-
super(message);
|
|
41
|
-
Error.captureStackTrace(this, this.constructor);
|
|
42
|
-
this.name = this.constructor.name;
|
|
43
|
-
this.code = code;
|
|
44
|
-
this.exitCode = exitCode;
|
|
45
|
-
this.nestedError = undefined;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
class InvalidArgumentError extends CommanderError {
|
|
50
|
-
constructor(message) {
|
|
51
|
-
super(1, "commander.invalidArgument", message);
|
|
52
|
-
Error.captureStackTrace(this, this.constructor);
|
|
53
|
-
this.name = this.constructor.name;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.CommanderError = CommanderError;
|
|
57
|
-
exports.InvalidArgumentError = InvalidArgumentError;
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
// ../../node_modules/commander/lib/argument.js
|
|
61
|
-
var require_argument = __commonJS((exports) => {
|
|
62
|
-
var { InvalidArgumentError } = require_error();
|
|
63
|
-
|
|
64
|
-
class Argument {
|
|
65
|
-
constructor(name, description) {
|
|
66
|
-
this.description = description || "";
|
|
67
|
-
this.variadic = false;
|
|
68
|
-
this.parseArg = undefined;
|
|
69
|
-
this.defaultValue = undefined;
|
|
70
|
-
this.defaultValueDescription = undefined;
|
|
71
|
-
this.argChoices = undefined;
|
|
72
|
-
switch (name[0]) {
|
|
73
|
-
case "<":
|
|
74
|
-
this.required = true;
|
|
75
|
-
this._name = name.slice(1, -1);
|
|
76
|
-
break;
|
|
77
|
-
case "[":
|
|
78
|
-
this.required = false;
|
|
79
|
-
this._name = name.slice(1, -1);
|
|
80
|
-
break;
|
|
81
|
-
default:
|
|
82
|
-
this.required = true;
|
|
83
|
-
this._name = name;
|
|
84
|
-
break;
|
|
85
|
-
}
|
|
86
|
-
if (this._name.length > 3 && this._name.slice(-3) === "...") {
|
|
87
|
-
this.variadic = true;
|
|
88
|
-
this._name = this._name.slice(0, -3);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
name() {
|
|
92
|
-
return this._name;
|
|
93
|
-
}
|
|
94
|
-
_concatValue(value, previous) {
|
|
95
|
-
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
96
|
-
return [value];
|
|
97
|
-
}
|
|
98
|
-
return previous.concat(value);
|
|
99
|
-
}
|
|
100
|
-
default(value, description) {
|
|
101
|
-
this.defaultValue = value;
|
|
102
|
-
this.defaultValueDescription = description;
|
|
103
|
-
return this;
|
|
104
|
-
}
|
|
105
|
-
argParser(fn) {
|
|
106
|
-
this.parseArg = fn;
|
|
107
|
-
return this;
|
|
108
|
-
}
|
|
109
|
-
choices(values) {
|
|
110
|
-
this.argChoices = values.slice();
|
|
111
|
-
this.parseArg = (arg, previous) => {
|
|
112
|
-
if (!this.argChoices.includes(arg)) {
|
|
113
|
-
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
114
|
-
}
|
|
115
|
-
if (this.variadic) {
|
|
116
|
-
return this._concatValue(arg, previous);
|
|
117
|
-
}
|
|
118
|
-
return arg;
|
|
119
|
-
};
|
|
120
|
-
return this;
|
|
121
|
-
}
|
|
122
|
-
argRequired() {
|
|
123
|
-
this.required = true;
|
|
124
|
-
return this;
|
|
125
|
-
}
|
|
126
|
-
argOptional() {
|
|
127
|
-
this.required = false;
|
|
128
|
-
return this;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
function humanReadableArgName(arg) {
|
|
132
|
-
const nameOutput = arg.name() + (arg.variadic === true ? "..." : "");
|
|
133
|
-
return arg.required ? "<" + nameOutput + ">" : "[" + nameOutput + "]";
|
|
134
|
-
}
|
|
135
|
-
exports.Argument = Argument;
|
|
136
|
-
exports.humanReadableArgName = humanReadableArgName;
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
// ../../node_modules/commander/lib/help.js
|
|
140
|
-
var require_help = __commonJS((exports) => {
|
|
141
|
-
var { humanReadableArgName } = require_argument();
|
|
142
|
-
|
|
143
|
-
class Help {
|
|
144
|
-
constructor() {
|
|
145
|
-
this.helpWidth = undefined;
|
|
146
|
-
this.sortSubcommands = false;
|
|
147
|
-
this.sortOptions = false;
|
|
148
|
-
this.showGlobalOptions = false;
|
|
149
|
-
}
|
|
150
|
-
visibleCommands(cmd) {
|
|
151
|
-
const visibleCommands = cmd.commands.filter((cmd2) => !cmd2._hidden);
|
|
152
|
-
const helpCommand = cmd._getHelpCommand();
|
|
153
|
-
if (helpCommand && !helpCommand._hidden) {
|
|
154
|
-
visibleCommands.push(helpCommand);
|
|
155
|
-
}
|
|
156
|
-
if (this.sortSubcommands) {
|
|
157
|
-
visibleCommands.sort((a, b) => {
|
|
158
|
-
return a.name().localeCompare(b.name());
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
return visibleCommands;
|
|
162
|
-
}
|
|
163
|
-
compareOptions(a, b) {
|
|
164
|
-
const getSortKey = (option) => {
|
|
165
|
-
return option.short ? option.short.replace(/^-/, "") : option.long.replace(/^--/, "");
|
|
166
|
-
};
|
|
167
|
-
return getSortKey(a).localeCompare(getSortKey(b));
|
|
168
|
-
}
|
|
169
|
-
visibleOptions(cmd) {
|
|
170
|
-
const visibleOptions = cmd.options.filter((option) => !option.hidden);
|
|
171
|
-
const helpOption = cmd._getHelpOption();
|
|
172
|
-
if (helpOption && !helpOption.hidden) {
|
|
173
|
-
const removeShort = helpOption.short && cmd._findOption(helpOption.short);
|
|
174
|
-
const removeLong = helpOption.long && cmd._findOption(helpOption.long);
|
|
175
|
-
if (!removeShort && !removeLong) {
|
|
176
|
-
visibleOptions.push(helpOption);
|
|
177
|
-
} else if (helpOption.long && !removeLong) {
|
|
178
|
-
visibleOptions.push(cmd.createOption(helpOption.long, helpOption.description));
|
|
179
|
-
} else if (helpOption.short && !removeShort) {
|
|
180
|
-
visibleOptions.push(cmd.createOption(helpOption.short, helpOption.description));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
if (this.sortOptions) {
|
|
184
|
-
visibleOptions.sort(this.compareOptions);
|
|
185
|
-
}
|
|
186
|
-
return visibleOptions;
|
|
187
|
-
}
|
|
188
|
-
visibleGlobalOptions(cmd) {
|
|
189
|
-
if (!this.showGlobalOptions)
|
|
190
|
-
return [];
|
|
191
|
-
const globalOptions = [];
|
|
192
|
-
for (let ancestorCmd = cmd.parent;ancestorCmd; ancestorCmd = ancestorCmd.parent) {
|
|
193
|
-
const visibleOptions = ancestorCmd.options.filter((option) => !option.hidden);
|
|
194
|
-
globalOptions.push(...visibleOptions);
|
|
195
|
-
}
|
|
196
|
-
if (this.sortOptions) {
|
|
197
|
-
globalOptions.sort(this.compareOptions);
|
|
198
|
-
}
|
|
199
|
-
return globalOptions;
|
|
200
|
-
}
|
|
201
|
-
visibleArguments(cmd) {
|
|
202
|
-
if (cmd._argsDescription) {
|
|
203
|
-
cmd.registeredArguments.forEach((argument) => {
|
|
204
|
-
argument.description = argument.description || cmd._argsDescription[argument.name()] || "";
|
|
205
|
-
});
|
|
206
|
-
}
|
|
207
|
-
if (cmd.registeredArguments.find((argument) => argument.description)) {
|
|
208
|
-
return cmd.registeredArguments;
|
|
209
|
-
}
|
|
210
|
-
return [];
|
|
211
|
-
}
|
|
212
|
-
subcommandTerm(cmd) {
|
|
213
|
-
const args = cmd.registeredArguments.map((arg) => humanReadableArgName(arg)).join(" ");
|
|
214
|
-
return cmd._name + (cmd._aliases[0] ? "|" + cmd._aliases[0] : "") + (cmd.options.length ? " [options]" : "") + (args ? " " + args : "");
|
|
215
|
-
}
|
|
216
|
-
optionTerm(option) {
|
|
217
|
-
return option.flags;
|
|
218
|
-
}
|
|
219
|
-
argumentTerm(argument) {
|
|
220
|
-
return argument.name();
|
|
221
|
-
}
|
|
222
|
-
longestSubcommandTermLength(cmd, helper) {
|
|
223
|
-
return helper.visibleCommands(cmd).reduce((max, command) => {
|
|
224
|
-
return Math.max(max, helper.subcommandTerm(command).length);
|
|
225
|
-
}, 0);
|
|
226
|
-
}
|
|
227
|
-
longestOptionTermLength(cmd, helper) {
|
|
228
|
-
return helper.visibleOptions(cmd).reduce((max, option) => {
|
|
229
|
-
return Math.max(max, helper.optionTerm(option).length);
|
|
230
|
-
}, 0);
|
|
231
|
-
}
|
|
232
|
-
longestGlobalOptionTermLength(cmd, helper) {
|
|
233
|
-
return helper.visibleGlobalOptions(cmd).reduce((max, option) => {
|
|
234
|
-
return Math.max(max, helper.optionTerm(option).length);
|
|
235
|
-
}, 0);
|
|
236
|
-
}
|
|
237
|
-
longestArgumentTermLength(cmd, helper) {
|
|
238
|
-
return helper.visibleArguments(cmd).reduce((max, argument) => {
|
|
239
|
-
return Math.max(max, helper.argumentTerm(argument).length);
|
|
240
|
-
}, 0);
|
|
241
|
-
}
|
|
242
|
-
commandUsage(cmd) {
|
|
243
|
-
let cmdName = cmd._name;
|
|
244
|
-
if (cmd._aliases[0]) {
|
|
245
|
-
cmdName = cmdName + "|" + cmd._aliases[0];
|
|
246
|
-
}
|
|
247
|
-
let ancestorCmdNames = "";
|
|
248
|
-
for (let ancestorCmd = cmd.parent;ancestorCmd; ancestorCmd = ancestorCmd.parent) {
|
|
249
|
-
ancestorCmdNames = ancestorCmd.name() + " " + ancestorCmdNames;
|
|
250
|
-
}
|
|
251
|
-
return ancestorCmdNames + cmdName + " " + cmd.usage();
|
|
252
|
-
}
|
|
253
|
-
commandDescription(cmd) {
|
|
254
|
-
return cmd.description();
|
|
255
|
-
}
|
|
256
|
-
subcommandDescription(cmd) {
|
|
257
|
-
return cmd.summary() || cmd.description();
|
|
258
|
-
}
|
|
259
|
-
optionDescription(option) {
|
|
260
|
-
const extraInfo = [];
|
|
261
|
-
if (option.argChoices) {
|
|
262
|
-
extraInfo.push(`choices: ${option.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}`);
|
|
263
|
-
}
|
|
264
|
-
if (option.defaultValue !== undefined) {
|
|
265
|
-
const showDefault = option.required || option.optional || option.isBoolean() && typeof option.defaultValue === "boolean";
|
|
266
|
-
if (showDefault) {
|
|
267
|
-
extraInfo.push(`default: ${option.defaultValueDescription || JSON.stringify(option.defaultValue)}`);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
if (option.presetArg !== undefined && option.optional) {
|
|
271
|
-
extraInfo.push(`preset: ${JSON.stringify(option.presetArg)}`);
|
|
272
|
-
}
|
|
273
|
-
if (option.envVar !== undefined) {
|
|
274
|
-
extraInfo.push(`env: ${option.envVar}`);
|
|
275
|
-
}
|
|
276
|
-
if (extraInfo.length > 0) {
|
|
277
|
-
return `${option.description} (${extraInfo.join(", ")})`;
|
|
278
|
-
}
|
|
279
|
-
return option.description;
|
|
280
|
-
}
|
|
281
|
-
argumentDescription(argument) {
|
|
282
|
-
const extraInfo = [];
|
|
283
|
-
if (argument.argChoices) {
|
|
284
|
-
extraInfo.push(`choices: ${argument.argChoices.map((choice) => JSON.stringify(choice)).join(", ")}`);
|
|
285
|
-
}
|
|
286
|
-
if (argument.defaultValue !== undefined) {
|
|
287
|
-
extraInfo.push(`default: ${argument.defaultValueDescription || JSON.stringify(argument.defaultValue)}`);
|
|
288
|
-
}
|
|
289
|
-
if (extraInfo.length > 0) {
|
|
290
|
-
const extraDescripton = `(${extraInfo.join(", ")})`;
|
|
291
|
-
if (argument.description) {
|
|
292
|
-
return `${argument.description} ${extraDescripton}`;
|
|
293
|
-
}
|
|
294
|
-
return extraDescripton;
|
|
295
|
-
}
|
|
296
|
-
return argument.description;
|
|
297
|
-
}
|
|
298
|
-
formatHelp(cmd, helper) {
|
|
299
|
-
const termWidth = helper.padWidth(cmd, helper);
|
|
300
|
-
const helpWidth = helper.helpWidth || 80;
|
|
301
|
-
const itemIndentWidth = 2;
|
|
302
|
-
const itemSeparatorWidth = 2;
|
|
303
|
-
function formatItem(term, description) {
|
|
304
|
-
if (description) {
|
|
305
|
-
const fullText = `${term.padEnd(termWidth + itemSeparatorWidth)}${description}`;
|
|
306
|
-
return helper.wrap(fullText, helpWidth - itemIndentWidth, termWidth + itemSeparatorWidth);
|
|
307
|
-
}
|
|
308
|
-
return term;
|
|
309
|
-
}
|
|
310
|
-
function formatList(textArray) {
|
|
311
|
-
return textArray.join(`
|
|
312
|
-
`).replace(/^/gm, " ".repeat(itemIndentWidth));
|
|
313
|
-
}
|
|
314
|
-
let output = [`Usage: ${helper.commandUsage(cmd)}`, ""];
|
|
315
|
-
const commandDescription = helper.commandDescription(cmd);
|
|
316
|
-
if (commandDescription.length > 0) {
|
|
317
|
-
output = output.concat([
|
|
318
|
-
helper.wrap(commandDescription, helpWidth, 0),
|
|
319
|
-
""
|
|
320
|
-
]);
|
|
321
|
-
}
|
|
322
|
-
const argumentList = helper.visibleArguments(cmd).map((argument) => {
|
|
323
|
-
return formatItem(helper.argumentTerm(argument), helper.argumentDescription(argument));
|
|
324
|
-
});
|
|
325
|
-
if (argumentList.length > 0) {
|
|
326
|
-
output = output.concat(["Arguments:", formatList(argumentList), ""]);
|
|
327
|
-
}
|
|
328
|
-
const optionList = helper.visibleOptions(cmd).map((option) => {
|
|
329
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
330
|
-
});
|
|
331
|
-
if (optionList.length > 0) {
|
|
332
|
-
output = output.concat(["Options:", formatList(optionList), ""]);
|
|
333
|
-
}
|
|
334
|
-
if (this.showGlobalOptions) {
|
|
335
|
-
const globalOptionList = helper.visibleGlobalOptions(cmd).map((option) => {
|
|
336
|
-
return formatItem(helper.optionTerm(option), helper.optionDescription(option));
|
|
337
|
-
});
|
|
338
|
-
if (globalOptionList.length > 0) {
|
|
339
|
-
output = output.concat([
|
|
340
|
-
"Global Options:",
|
|
341
|
-
formatList(globalOptionList),
|
|
342
|
-
""
|
|
343
|
-
]);
|
|
344
|
-
}
|
|
345
|
-
}
|
|
346
|
-
const commandList = helper.visibleCommands(cmd).map((cmd2) => {
|
|
347
|
-
return formatItem(helper.subcommandTerm(cmd2), helper.subcommandDescription(cmd2));
|
|
348
|
-
});
|
|
349
|
-
if (commandList.length > 0) {
|
|
350
|
-
output = output.concat(["Commands:", formatList(commandList), ""]);
|
|
351
|
-
}
|
|
352
|
-
return output.join(`
|
|
353
|
-
`);
|
|
354
|
-
}
|
|
355
|
-
padWidth(cmd, helper) {
|
|
356
|
-
return Math.max(helper.longestOptionTermLength(cmd, helper), helper.longestGlobalOptionTermLength(cmd, helper), helper.longestSubcommandTermLength(cmd, helper), helper.longestArgumentTermLength(cmd, helper));
|
|
357
|
-
}
|
|
358
|
-
wrap(str, width, indent, minColumnWidth = 40) {
|
|
359
|
-
const indents = " \\f\\t\\v\xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF";
|
|
360
|
-
const manualIndent = new RegExp(`[\\n][${indents}]+`);
|
|
361
|
-
if (str.match(manualIndent))
|
|
362
|
-
return str;
|
|
363
|
-
const columnWidth = width - indent;
|
|
364
|
-
if (columnWidth < minColumnWidth)
|
|
365
|
-
return str;
|
|
366
|
-
const leadingStr = str.slice(0, indent);
|
|
367
|
-
const columnText = str.slice(indent).replace(`\r
|
|
368
|
-
`, `
|
|
369
|
-
`);
|
|
370
|
-
const indentString = " ".repeat(indent);
|
|
371
|
-
const zeroWidthSpace = "\u200B";
|
|
372
|
-
const breaks = `\\s${zeroWidthSpace}`;
|
|
373
|
-
const regex = new RegExp(`
|
|
374
|
-
|.{1,${columnWidth - 1}}([${breaks}]|$)|[^${breaks}]+?([${breaks}]|$)`, "g");
|
|
375
|
-
const lines = columnText.match(regex) || [];
|
|
376
|
-
return leadingStr + lines.map((line, i) => {
|
|
377
|
-
if (line === `
|
|
378
|
-
`)
|
|
379
|
-
return "";
|
|
380
|
-
return (i > 0 ? indentString : "") + line.trimEnd();
|
|
381
|
-
}).join(`
|
|
382
|
-
`);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
exports.Help = Help;
|
|
386
|
-
});
|
|
387
|
-
|
|
388
|
-
// ../../node_modules/commander/lib/option.js
|
|
389
|
-
var require_option = __commonJS((exports) => {
|
|
390
|
-
var { InvalidArgumentError } = require_error();
|
|
391
|
-
|
|
392
|
-
class Option {
|
|
393
|
-
constructor(flags, description) {
|
|
394
|
-
this.flags = flags;
|
|
395
|
-
this.description = description || "";
|
|
396
|
-
this.required = flags.includes("<");
|
|
397
|
-
this.optional = flags.includes("[");
|
|
398
|
-
this.variadic = /\w\.\.\.[>\]]$/.test(flags);
|
|
399
|
-
this.mandatory = false;
|
|
400
|
-
const optionFlags = splitOptionFlags(flags);
|
|
401
|
-
this.short = optionFlags.shortFlag;
|
|
402
|
-
this.long = optionFlags.longFlag;
|
|
403
|
-
this.negate = false;
|
|
404
|
-
if (this.long) {
|
|
405
|
-
this.negate = this.long.startsWith("--no-");
|
|
406
|
-
}
|
|
407
|
-
this.defaultValue = undefined;
|
|
408
|
-
this.defaultValueDescription = undefined;
|
|
409
|
-
this.presetArg = undefined;
|
|
410
|
-
this.envVar = undefined;
|
|
411
|
-
this.parseArg = undefined;
|
|
412
|
-
this.hidden = false;
|
|
413
|
-
this.argChoices = undefined;
|
|
414
|
-
this.conflictsWith = [];
|
|
415
|
-
this.implied = undefined;
|
|
416
|
-
}
|
|
417
|
-
default(value, description) {
|
|
418
|
-
this.defaultValue = value;
|
|
419
|
-
this.defaultValueDescription = description;
|
|
420
|
-
return this;
|
|
421
|
-
}
|
|
422
|
-
preset(arg) {
|
|
423
|
-
this.presetArg = arg;
|
|
424
|
-
return this;
|
|
425
|
-
}
|
|
426
|
-
conflicts(names) {
|
|
427
|
-
this.conflictsWith = this.conflictsWith.concat(names);
|
|
428
|
-
return this;
|
|
429
|
-
}
|
|
430
|
-
implies(impliedOptionValues) {
|
|
431
|
-
let newImplied = impliedOptionValues;
|
|
432
|
-
if (typeof impliedOptionValues === "string") {
|
|
433
|
-
newImplied = { [impliedOptionValues]: true };
|
|
434
|
-
}
|
|
435
|
-
this.implied = Object.assign(this.implied || {}, newImplied);
|
|
436
|
-
return this;
|
|
437
|
-
}
|
|
438
|
-
env(name) {
|
|
439
|
-
this.envVar = name;
|
|
440
|
-
return this;
|
|
441
|
-
}
|
|
442
|
-
argParser(fn) {
|
|
443
|
-
this.parseArg = fn;
|
|
444
|
-
return this;
|
|
445
|
-
}
|
|
446
|
-
makeOptionMandatory(mandatory = true) {
|
|
447
|
-
this.mandatory = !!mandatory;
|
|
448
|
-
return this;
|
|
449
|
-
}
|
|
450
|
-
hideHelp(hide = true) {
|
|
451
|
-
this.hidden = !!hide;
|
|
452
|
-
return this;
|
|
453
|
-
}
|
|
454
|
-
_concatValue(value, previous) {
|
|
455
|
-
if (previous === this.defaultValue || !Array.isArray(previous)) {
|
|
456
|
-
return [value];
|
|
457
|
-
}
|
|
458
|
-
return previous.concat(value);
|
|
459
|
-
}
|
|
460
|
-
choices(values) {
|
|
461
|
-
this.argChoices = values.slice();
|
|
462
|
-
this.parseArg = (arg, previous) => {
|
|
463
|
-
if (!this.argChoices.includes(arg)) {
|
|
464
|
-
throw new InvalidArgumentError(`Allowed choices are ${this.argChoices.join(", ")}.`);
|
|
465
|
-
}
|
|
466
|
-
if (this.variadic) {
|
|
467
|
-
return this._concatValue(arg, previous);
|
|
468
|
-
}
|
|
469
|
-
return arg;
|
|
470
|
-
};
|
|
471
|
-
return this;
|
|
472
|
-
}
|
|
473
|
-
name() {
|
|
474
|
-
if (this.long) {
|
|
475
|
-
return this.long.replace(/^--/, "");
|
|
476
|
-
}
|
|
477
|
-
return this.short.replace(/^-/, "");
|
|
478
|
-
}
|
|
479
|
-
attributeName() {
|
|
480
|
-
return camelcase(this.name().replace(/^no-/, ""));
|
|
481
|
-
}
|
|
482
|
-
is(arg) {
|
|
483
|
-
return this.short === arg || this.long === arg;
|
|
484
|
-
}
|
|
485
|
-
isBoolean() {
|
|
486
|
-
return !this.required && !this.optional && !this.negate;
|
|
487
|
-
}
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
class DualOptions {
|
|
491
|
-
constructor(options) {
|
|
492
|
-
this.positiveOptions = new Map;
|
|
493
|
-
this.negativeOptions = new Map;
|
|
494
|
-
this.dualOptions = new Set;
|
|
495
|
-
options.forEach((option) => {
|
|
496
|
-
if (option.negate) {
|
|
497
|
-
this.negativeOptions.set(option.attributeName(), option);
|
|
498
|
-
} else {
|
|
499
|
-
this.positiveOptions.set(option.attributeName(), option);
|
|
500
|
-
}
|
|
501
|
-
});
|
|
502
|
-
this.negativeOptions.forEach((value, key) => {
|
|
503
|
-
if (this.positiveOptions.has(key)) {
|
|
504
|
-
this.dualOptions.add(key);
|
|
505
|
-
}
|
|
506
|
-
});
|
|
507
|
-
}
|
|
508
|
-
valueFromOption(value, option) {
|
|
509
|
-
const optionKey = option.attributeName();
|
|
510
|
-
if (!this.dualOptions.has(optionKey))
|
|
511
|
-
return true;
|
|
512
|
-
const preset = this.negativeOptions.get(optionKey).presetArg;
|
|
513
|
-
const negativeValue = preset !== undefined ? preset : false;
|
|
514
|
-
return option.negate === (negativeValue === value);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
function camelcase(str) {
|
|
518
|
-
return str.split("-").reduce((str2, word) => {
|
|
519
|
-
return str2 + word[0].toUpperCase() + word.slice(1);
|
|
520
|
-
});
|
|
521
|
-
}
|
|
522
|
-
function splitOptionFlags(flags) {
|
|
523
|
-
let shortFlag;
|
|
524
|
-
let longFlag;
|
|
525
|
-
const flagParts = flags.split(/[ |,]+/);
|
|
526
|
-
if (flagParts.length > 1 && !/^[[<]/.test(flagParts[1]))
|
|
527
|
-
shortFlag = flagParts.shift();
|
|
528
|
-
longFlag = flagParts.shift();
|
|
529
|
-
if (!shortFlag && /^-[^-]$/.test(longFlag)) {
|
|
530
|
-
shortFlag = longFlag;
|
|
531
|
-
longFlag = undefined;
|
|
532
|
-
}
|
|
533
|
-
return { shortFlag, longFlag };
|
|
534
|
-
}
|
|
535
|
-
exports.Option = Option;
|
|
536
|
-
exports.DualOptions = DualOptions;
|
|
537
|
-
});
|
|
538
|
-
|
|
539
|
-
// ../../node_modules/commander/lib/suggestSimilar.js
|
|
540
|
-
var require_suggestSimilar = __commonJS((exports) => {
|
|
541
|
-
var maxDistance = 3;
|
|
542
|
-
function editDistance(a, b) {
|
|
543
|
-
if (Math.abs(a.length - b.length) > maxDistance)
|
|
544
|
-
return Math.max(a.length, b.length);
|
|
545
|
-
const d = [];
|
|
546
|
-
for (let i = 0;i <= a.length; i++) {
|
|
547
|
-
d[i] = [i];
|
|
548
|
-
}
|
|
549
|
-
for (let j = 0;j <= b.length; j++) {
|
|
550
|
-
d[0][j] = j;
|
|
551
|
-
}
|
|
552
|
-
for (let j = 1;j <= b.length; j++) {
|
|
553
|
-
for (let i = 1;i <= a.length; i++) {
|
|
554
|
-
let cost = 1;
|
|
555
|
-
if (a[i - 1] === b[j - 1]) {
|
|
556
|
-
cost = 0;
|
|
557
|
-
} else {
|
|
558
|
-
cost = 1;
|
|
559
|
-
}
|
|
560
|
-
d[i][j] = Math.min(d[i - 1][j] + 1, d[i][j - 1] + 1, d[i - 1][j - 1] + cost);
|
|
561
|
-
if (i > 1 && j > 1 && a[i - 1] === b[j - 2] && a[i - 2] === b[j - 1]) {
|
|
562
|
-
d[i][j] = Math.min(d[i][j], d[i - 2][j - 2] + 1);
|
|
563
|
-
}
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
return d[a.length][b.length];
|
|
567
|
-
}
|
|
568
|
-
function suggestSimilar(word, candidates) {
|
|
569
|
-
if (!candidates || candidates.length === 0)
|
|
570
|
-
return "";
|
|
571
|
-
candidates = Array.from(new Set(candidates));
|
|
572
|
-
const searchingOptions = word.startsWith("--");
|
|
573
|
-
if (searchingOptions) {
|
|
574
|
-
word = word.slice(2);
|
|
575
|
-
candidates = candidates.map((candidate) => candidate.slice(2));
|
|
576
|
-
}
|
|
577
|
-
let similar = [];
|
|
578
|
-
let bestDistance = maxDistance;
|
|
579
|
-
const minSimilarity = 0.4;
|
|
580
|
-
candidates.forEach((candidate) => {
|
|
581
|
-
if (candidate.length <= 1)
|
|
582
|
-
return;
|
|
583
|
-
const distance = editDistance(word, candidate);
|
|
584
|
-
const length = Math.max(word.length, candidate.length);
|
|
585
|
-
const similarity = (length - distance) / length;
|
|
586
|
-
if (similarity > minSimilarity) {
|
|
587
|
-
if (distance < bestDistance) {
|
|
588
|
-
bestDistance = distance;
|
|
589
|
-
similar = [candidate];
|
|
590
|
-
} else if (distance === bestDistance) {
|
|
591
|
-
similar.push(candidate);
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
});
|
|
595
|
-
similar.sort((a, b) => a.localeCompare(b));
|
|
596
|
-
if (searchingOptions) {
|
|
597
|
-
similar = similar.map((candidate) => `--${candidate}`);
|
|
598
|
-
}
|
|
599
|
-
if (similar.length > 1) {
|
|
600
|
-
return `
|
|
601
|
-
(Did you mean one of ${similar.join(", ")}?)`;
|
|
602
|
-
}
|
|
603
|
-
if (similar.length === 1) {
|
|
604
|
-
return `
|
|
605
|
-
(Did you mean ${similar[0]}?)`;
|
|
606
|
-
}
|
|
607
|
-
return "";
|
|
608
|
-
}
|
|
609
|
-
exports.suggestSimilar = suggestSimilar;
|
|
610
|
-
});
|
|
611
|
-
|
|
612
|
-
// ../../node_modules/commander/lib/command.js
|
|
613
|
-
var require_command = __commonJS((exports) => {
|
|
614
|
-
var EventEmitter = __require("events").EventEmitter;
|
|
615
|
-
var childProcess = __require("child_process");
|
|
616
|
-
var path = __require("path");
|
|
617
|
-
var fs = __require("fs");
|
|
618
|
-
var process2 = __require("process");
|
|
619
|
-
var { Argument, humanReadableArgName } = require_argument();
|
|
620
|
-
var { CommanderError } = require_error();
|
|
621
|
-
var { Help } = require_help();
|
|
622
|
-
var { Option, DualOptions } = require_option();
|
|
623
|
-
var { suggestSimilar } = require_suggestSimilar();
|
|
624
|
-
|
|
625
|
-
class Command extends EventEmitter {
|
|
626
|
-
constructor(name) {
|
|
627
|
-
super();
|
|
628
|
-
this.commands = [];
|
|
629
|
-
this.options = [];
|
|
630
|
-
this.parent = null;
|
|
631
|
-
this._allowUnknownOption = false;
|
|
632
|
-
this._allowExcessArguments = true;
|
|
633
|
-
this.registeredArguments = [];
|
|
634
|
-
this._args = this.registeredArguments;
|
|
635
|
-
this.args = [];
|
|
636
|
-
this.rawArgs = [];
|
|
637
|
-
this.processedArgs = [];
|
|
638
|
-
this._scriptPath = null;
|
|
639
|
-
this._name = name || "";
|
|
640
|
-
this._optionValues = {};
|
|
641
|
-
this._optionValueSources = {};
|
|
642
|
-
this._storeOptionsAsProperties = false;
|
|
643
|
-
this._actionHandler = null;
|
|
644
|
-
this._executableHandler = false;
|
|
645
|
-
this._executableFile = null;
|
|
646
|
-
this._executableDir = null;
|
|
647
|
-
this._defaultCommandName = null;
|
|
648
|
-
this._exitCallback = null;
|
|
649
|
-
this._aliases = [];
|
|
650
|
-
this._combineFlagAndOptionalValue = true;
|
|
651
|
-
this._description = "";
|
|
652
|
-
this._summary = "";
|
|
653
|
-
this._argsDescription = undefined;
|
|
654
|
-
this._enablePositionalOptions = false;
|
|
655
|
-
this._passThroughOptions = false;
|
|
656
|
-
this._lifeCycleHooks = {};
|
|
657
|
-
this._showHelpAfterError = false;
|
|
658
|
-
this._showSuggestionAfterError = true;
|
|
659
|
-
this._outputConfiguration = {
|
|
660
|
-
writeOut: (str) => process2.stdout.write(str),
|
|
661
|
-
writeErr: (str) => process2.stderr.write(str),
|
|
662
|
-
getOutHelpWidth: () => process2.stdout.isTTY ? process2.stdout.columns : undefined,
|
|
663
|
-
getErrHelpWidth: () => process2.stderr.isTTY ? process2.stderr.columns : undefined,
|
|
664
|
-
outputError: (str, write) => write(str)
|
|
665
|
-
};
|
|
666
|
-
this._hidden = false;
|
|
667
|
-
this._helpOption = undefined;
|
|
668
|
-
this._addImplicitHelpCommand = undefined;
|
|
669
|
-
this._helpCommand = undefined;
|
|
670
|
-
this._helpConfiguration = {};
|
|
671
|
-
}
|
|
672
|
-
copyInheritedSettings(sourceCommand) {
|
|
673
|
-
this._outputConfiguration = sourceCommand._outputConfiguration;
|
|
674
|
-
this._helpOption = sourceCommand._helpOption;
|
|
675
|
-
this._helpCommand = sourceCommand._helpCommand;
|
|
676
|
-
this._helpConfiguration = sourceCommand._helpConfiguration;
|
|
677
|
-
this._exitCallback = sourceCommand._exitCallback;
|
|
678
|
-
this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;
|
|
679
|
-
this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;
|
|
680
|
-
this._allowExcessArguments = sourceCommand._allowExcessArguments;
|
|
681
|
-
this._enablePositionalOptions = sourceCommand._enablePositionalOptions;
|
|
682
|
-
this._showHelpAfterError = sourceCommand._showHelpAfterError;
|
|
683
|
-
this._showSuggestionAfterError = sourceCommand._showSuggestionAfterError;
|
|
684
|
-
return this;
|
|
685
|
-
}
|
|
686
|
-
_getCommandAndAncestors() {
|
|
687
|
-
const result = [];
|
|
688
|
-
for (let command = this;command; command = command.parent) {
|
|
689
|
-
result.push(command);
|
|
690
|
-
}
|
|
691
|
-
return result;
|
|
692
|
-
}
|
|
693
|
-
command(nameAndArgs, actionOptsOrExecDesc, execOpts) {
|
|
694
|
-
let desc = actionOptsOrExecDesc;
|
|
695
|
-
let opts = execOpts;
|
|
696
|
-
if (typeof desc === "object" && desc !== null) {
|
|
697
|
-
opts = desc;
|
|
698
|
-
desc = null;
|
|
699
|
-
}
|
|
700
|
-
opts = opts || {};
|
|
701
|
-
const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/);
|
|
702
|
-
const cmd = this.createCommand(name);
|
|
703
|
-
if (desc) {
|
|
704
|
-
cmd.description(desc);
|
|
705
|
-
cmd._executableHandler = true;
|
|
706
|
-
}
|
|
707
|
-
if (opts.isDefault)
|
|
708
|
-
this._defaultCommandName = cmd._name;
|
|
709
|
-
cmd._hidden = !!(opts.noHelp || opts.hidden);
|
|
710
|
-
cmd._executableFile = opts.executableFile || null;
|
|
711
|
-
if (args)
|
|
712
|
-
cmd.arguments(args);
|
|
713
|
-
this._registerCommand(cmd);
|
|
714
|
-
cmd.parent = this;
|
|
715
|
-
cmd.copyInheritedSettings(this);
|
|
716
|
-
if (desc)
|
|
717
|
-
return this;
|
|
718
|
-
return cmd;
|
|
719
|
-
}
|
|
720
|
-
createCommand(name) {
|
|
721
|
-
return new Command(name);
|
|
722
|
-
}
|
|
723
|
-
createHelp() {
|
|
724
|
-
return Object.assign(new Help, this.configureHelp());
|
|
725
|
-
}
|
|
726
|
-
configureHelp(configuration) {
|
|
727
|
-
if (configuration === undefined)
|
|
728
|
-
return this._helpConfiguration;
|
|
729
|
-
this._helpConfiguration = configuration;
|
|
730
|
-
return this;
|
|
731
|
-
}
|
|
732
|
-
configureOutput(configuration) {
|
|
733
|
-
if (configuration === undefined)
|
|
734
|
-
return this._outputConfiguration;
|
|
735
|
-
Object.assign(this._outputConfiguration, configuration);
|
|
736
|
-
return this;
|
|
737
|
-
}
|
|
738
|
-
showHelpAfterError(displayHelp = true) {
|
|
739
|
-
if (typeof displayHelp !== "string")
|
|
740
|
-
displayHelp = !!displayHelp;
|
|
741
|
-
this._showHelpAfterError = displayHelp;
|
|
742
|
-
return this;
|
|
743
|
-
}
|
|
744
|
-
showSuggestionAfterError(displaySuggestion = true) {
|
|
745
|
-
this._showSuggestionAfterError = !!displaySuggestion;
|
|
746
|
-
return this;
|
|
747
|
-
}
|
|
748
|
-
addCommand(cmd, opts) {
|
|
749
|
-
if (!cmd._name) {
|
|
750
|
-
throw new Error(`Command passed to .addCommand() must have a name
|
|
751
|
-
- specify the name in Command constructor or using .name()`);
|
|
752
|
-
}
|
|
753
|
-
opts = opts || {};
|
|
754
|
-
if (opts.isDefault)
|
|
755
|
-
this._defaultCommandName = cmd._name;
|
|
756
|
-
if (opts.noHelp || opts.hidden)
|
|
757
|
-
cmd._hidden = true;
|
|
758
|
-
this._registerCommand(cmd);
|
|
759
|
-
cmd.parent = this;
|
|
760
|
-
cmd._checkForBrokenPassThrough();
|
|
761
|
-
return this;
|
|
762
|
-
}
|
|
763
|
-
createArgument(name, description) {
|
|
764
|
-
return new Argument(name, description);
|
|
765
|
-
}
|
|
766
|
-
argument(name, description, fn, defaultValue) {
|
|
767
|
-
const argument = this.createArgument(name, description);
|
|
768
|
-
if (typeof fn === "function") {
|
|
769
|
-
argument.default(defaultValue).argParser(fn);
|
|
770
|
-
} else {
|
|
771
|
-
argument.default(fn);
|
|
772
|
-
}
|
|
773
|
-
this.addArgument(argument);
|
|
774
|
-
return this;
|
|
775
|
-
}
|
|
776
|
-
arguments(names) {
|
|
777
|
-
names.trim().split(/ +/).forEach((detail) => {
|
|
778
|
-
this.argument(detail);
|
|
779
|
-
});
|
|
780
|
-
return this;
|
|
781
|
-
}
|
|
782
|
-
addArgument(argument) {
|
|
783
|
-
const previousArgument = this.registeredArguments.slice(-1)[0];
|
|
784
|
-
if (previousArgument && previousArgument.variadic) {
|
|
785
|
-
throw new Error(`only the last argument can be variadic '${previousArgument.name()}'`);
|
|
786
|
-
}
|
|
787
|
-
if (argument.required && argument.defaultValue !== undefined && argument.parseArg === undefined) {
|
|
788
|
-
throw new Error(`a default value for a required argument is never used: '${argument.name()}'`);
|
|
789
|
-
}
|
|
790
|
-
this.registeredArguments.push(argument);
|
|
791
|
-
return this;
|
|
792
|
-
}
|
|
793
|
-
helpCommand(enableOrNameAndArgs, description) {
|
|
794
|
-
if (typeof enableOrNameAndArgs === "boolean") {
|
|
795
|
-
this._addImplicitHelpCommand = enableOrNameAndArgs;
|
|
796
|
-
return this;
|
|
797
|
-
}
|
|
798
|
-
enableOrNameAndArgs = enableOrNameAndArgs ?? "help [command]";
|
|
799
|
-
const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);
|
|
800
|
-
const helpDescription = description ?? "display help for command";
|
|
801
|
-
const helpCommand = this.createCommand(helpName);
|
|
802
|
-
helpCommand.helpOption(false);
|
|
803
|
-
if (helpArgs)
|
|
804
|
-
helpCommand.arguments(helpArgs);
|
|
805
|
-
if (helpDescription)
|
|
806
|
-
helpCommand.description(helpDescription);
|
|
807
|
-
this._addImplicitHelpCommand = true;
|
|
808
|
-
this._helpCommand = helpCommand;
|
|
809
|
-
return this;
|
|
810
|
-
}
|
|
811
|
-
addHelpCommand(helpCommand, deprecatedDescription) {
|
|
812
|
-
if (typeof helpCommand !== "object") {
|
|
813
|
-
this.helpCommand(helpCommand, deprecatedDescription);
|
|
814
|
-
return this;
|
|
815
|
-
}
|
|
816
|
-
this._addImplicitHelpCommand = true;
|
|
817
|
-
this._helpCommand = helpCommand;
|
|
818
|
-
return this;
|
|
819
|
-
}
|
|
820
|
-
_getHelpCommand() {
|
|
821
|
-
const hasImplicitHelpCommand = this._addImplicitHelpCommand ?? (this.commands.length && !this._actionHandler && !this._findCommand("help"));
|
|
822
|
-
if (hasImplicitHelpCommand) {
|
|
823
|
-
if (this._helpCommand === undefined) {
|
|
824
|
-
this.helpCommand(undefined, undefined);
|
|
825
|
-
}
|
|
826
|
-
return this._helpCommand;
|
|
827
|
-
}
|
|
828
|
-
return null;
|
|
829
|
-
}
|
|
830
|
-
hook(event, listener) {
|
|
831
|
-
const allowedValues = ["preSubcommand", "preAction", "postAction"];
|
|
832
|
-
if (!allowedValues.includes(event)) {
|
|
833
|
-
throw new Error(`Unexpected value for event passed to hook : '${event}'.
|
|
834
|
-
Expecting one of '${allowedValues.join("', '")}'`);
|
|
835
|
-
}
|
|
836
|
-
if (this._lifeCycleHooks[event]) {
|
|
837
|
-
this._lifeCycleHooks[event].push(listener);
|
|
838
|
-
} else {
|
|
839
|
-
this._lifeCycleHooks[event] = [listener];
|
|
840
|
-
}
|
|
841
|
-
return this;
|
|
842
|
-
}
|
|
843
|
-
exitOverride(fn) {
|
|
844
|
-
if (fn) {
|
|
845
|
-
this._exitCallback = fn;
|
|
846
|
-
} else {
|
|
847
|
-
this._exitCallback = (err) => {
|
|
848
|
-
if (err.code !== "commander.executeSubCommandAsync") {
|
|
849
|
-
throw err;
|
|
850
|
-
} else {}
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
return this;
|
|
854
|
-
}
|
|
855
|
-
_exit(exitCode, code, message) {
|
|
856
|
-
if (this._exitCallback) {
|
|
857
|
-
this._exitCallback(new CommanderError(exitCode, code, message));
|
|
858
|
-
}
|
|
859
|
-
process2.exit(exitCode);
|
|
860
|
-
}
|
|
861
|
-
action(fn) {
|
|
862
|
-
const listener = (args) => {
|
|
863
|
-
const expectedArgsCount = this.registeredArguments.length;
|
|
864
|
-
const actionArgs = args.slice(0, expectedArgsCount);
|
|
865
|
-
if (this._storeOptionsAsProperties) {
|
|
866
|
-
actionArgs[expectedArgsCount] = this;
|
|
867
|
-
} else {
|
|
868
|
-
actionArgs[expectedArgsCount] = this.opts();
|
|
869
|
-
}
|
|
870
|
-
actionArgs.push(this);
|
|
871
|
-
return fn.apply(this, actionArgs);
|
|
872
|
-
};
|
|
873
|
-
this._actionHandler = listener;
|
|
874
|
-
return this;
|
|
875
|
-
}
|
|
876
|
-
createOption(flags, description) {
|
|
877
|
-
return new Option(flags, description);
|
|
878
|
-
}
|
|
879
|
-
_callParseArg(target, value, previous, invalidArgumentMessage) {
|
|
880
|
-
try {
|
|
881
|
-
return target.parseArg(value, previous);
|
|
882
|
-
} catch (err) {
|
|
883
|
-
if (err.code === "commander.invalidArgument") {
|
|
884
|
-
const message = `${invalidArgumentMessage} ${err.message}`;
|
|
885
|
-
this.error(message, { exitCode: err.exitCode, code: err.code });
|
|
886
|
-
}
|
|
887
|
-
throw err;
|
|
888
|
-
}
|
|
889
|
-
}
|
|
890
|
-
_registerOption(option) {
|
|
891
|
-
const matchingOption = option.short && this._findOption(option.short) || option.long && this._findOption(option.long);
|
|
892
|
-
if (matchingOption) {
|
|
893
|
-
const matchingFlag = option.long && this._findOption(option.long) ? option.long : option.short;
|
|
894
|
-
throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'
|
|
895
|
-
- already used by option '${matchingOption.flags}'`);
|
|
896
|
-
}
|
|
897
|
-
this.options.push(option);
|
|
898
|
-
}
|
|
899
|
-
_registerCommand(command) {
|
|
900
|
-
const knownBy = (cmd) => {
|
|
901
|
-
return [cmd.name()].concat(cmd.aliases());
|
|
902
|
-
};
|
|
903
|
-
const alreadyUsed = knownBy(command).find((name) => this._findCommand(name));
|
|
904
|
-
if (alreadyUsed) {
|
|
905
|
-
const existingCmd = knownBy(this._findCommand(alreadyUsed)).join("|");
|
|
906
|
-
const newCmd = knownBy(command).join("|");
|
|
907
|
-
throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);
|
|
908
|
-
}
|
|
909
|
-
this.commands.push(command);
|
|
910
|
-
}
|
|
911
|
-
addOption(option) {
|
|
912
|
-
this._registerOption(option);
|
|
913
|
-
const oname = option.name();
|
|
914
|
-
const name = option.attributeName();
|
|
915
|
-
if (option.negate) {
|
|
916
|
-
const positiveLongFlag = option.long.replace(/^--no-/, "--");
|
|
917
|
-
if (!this._findOption(positiveLongFlag)) {
|
|
918
|
-
this.setOptionValueWithSource(name, option.defaultValue === undefined ? true : option.defaultValue, "default");
|
|
919
|
-
}
|
|
920
|
-
} else if (option.defaultValue !== undefined) {
|
|
921
|
-
this.setOptionValueWithSource(name, option.defaultValue, "default");
|
|
922
|
-
}
|
|
923
|
-
const handleOptionValue = (val, invalidValueMessage, valueSource) => {
|
|
924
|
-
if (val == null && option.presetArg !== undefined) {
|
|
925
|
-
val = option.presetArg;
|
|
926
|
-
}
|
|
927
|
-
const oldValue = this.getOptionValue(name);
|
|
928
|
-
if (val !== null && option.parseArg) {
|
|
929
|
-
val = this._callParseArg(option, val, oldValue, invalidValueMessage);
|
|
930
|
-
} else if (val !== null && option.variadic) {
|
|
931
|
-
val = option._concatValue(val, oldValue);
|
|
932
|
-
}
|
|
933
|
-
if (val == null) {
|
|
934
|
-
if (option.negate) {
|
|
935
|
-
val = false;
|
|
936
|
-
} else if (option.isBoolean() || option.optional) {
|
|
937
|
-
val = true;
|
|
938
|
-
} else {
|
|
939
|
-
val = "";
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
this.setOptionValueWithSource(name, val, valueSource);
|
|
943
|
-
};
|
|
944
|
-
this.on("option:" + oname, (val) => {
|
|
945
|
-
const invalidValueMessage = `error: option '${option.flags}' argument '${val}' is invalid.`;
|
|
946
|
-
handleOptionValue(val, invalidValueMessage, "cli");
|
|
947
|
-
});
|
|
948
|
-
if (option.envVar) {
|
|
949
|
-
this.on("optionEnv:" + oname, (val) => {
|
|
950
|
-
const invalidValueMessage = `error: option '${option.flags}' value '${val}' from env '${option.envVar}' is invalid.`;
|
|
951
|
-
handleOptionValue(val, invalidValueMessage, "env");
|
|
952
|
-
});
|
|
953
|
-
}
|
|
954
|
-
return this;
|
|
955
|
-
}
|
|
956
|
-
_optionEx(config, flags, description, fn, defaultValue) {
|
|
957
|
-
if (typeof flags === "object" && flags instanceof Option) {
|
|
958
|
-
throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");
|
|
959
|
-
}
|
|
960
|
-
const option = this.createOption(flags, description);
|
|
961
|
-
option.makeOptionMandatory(!!config.mandatory);
|
|
962
|
-
if (typeof fn === "function") {
|
|
963
|
-
option.default(defaultValue).argParser(fn);
|
|
964
|
-
} else if (fn instanceof RegExp) {
|
|
965
|
-
const regex = fn;
|
|
966
|
-
fn = (val, def) => {
|
|
967
|
-
const m = regex.exec(val);
|
|
968
|
-
return m ? m[0] : def;
|
|
969
|
-
};
|
|
970
|
-
option.default(defaultValue).argParser(fn);
|
|
971
|
-
} else {
|
|
972
|
-
option.default(fn);
|
|
973
|
-
}
|
|
974
|
-
return this.addOption(option);
|
|
975
|
-
}
|
|
976
|
-
option(flags, description, parseArg, defaultValue) {
|
|
977
|
-
return this._optionEx({}, flags, description, parseArg, defaultValue);
|
|
978
|
-
}
|
|
979
|
-
requiredOption(flags, description, parseArg, defaultValue) {
|
|
980
|
-
return this._optionEx({ mandatory: true }, flags, description, parseArg, defaultValue);
|
|
981
|
-
}
|
|
982
|
-
combineFlagAndOptionalValue(combine = true) {
|
|
983
|
-
this._combineFlagAndOptionalValue = !!combine;
|
|
984
|
-
return this;
|
|
985
|
-
}
|
|
986
|
-
allowUnknownOption(allowUnknown = true) {
|
|
987
|
-
this._allowUnknownOption = !!allowUnknown;
|
|
988
|
-
return this;
|
|
989
|
-
}
|
|
990
|
-
allowExcessArguments(allowExcess = true) {
|
|
991
|
-
this._allowExcessArguments = !!allowExcess;
|
|
992
|
-
return this;
|
|
993
|
-
}
|
|
994
|
-
enablePositionalOptions(positional = true) {
|
|
995
|
-
this._enablePositionalOptions = !!positional;
|
|
996
|
-
return this;
|
|
997
|
-
}
|
|
998
|
-
passThroughOptions(passThrough = true) {
|
|
999
|
-
this._passThroughOptions = !!passThrough;
|
|
1000
|
-
this._checkForBrokenPassThrough();
|
|
1001
|
-
return this;
|
|
1002
|
-
}
|
|
1003
|
-
_checkForBrokenPassThrough() {
|
|
1004
|
-
if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {
|
|
1005
|
-
throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);
|
|
1006
|
-
}
|
|
1007
|
-
}
|
|
1008
|
-
storeOptionsAsProperties(storeAsProperties = true) {
|
|
1009
|
-
if (this.options.length) {
|
|
1010
|
-
throw new Error("call .storeOptionsAsProperties() before adding options");
|
|
1011
|
-
}
|
|
1012
|
-
if (Object.keys(this._optionValues).length) {
|
|
1013
|
-
throw new Error("call .storeOptionsAsProperties() before setting option values");
|
|
1014
|
-
}
|
|
1015
|
-
this._storeOptionsAsProperties = !!storeAsProperties;
|
|
1016
|
-
return this;
|
|
1017
|
-
}
|
|
1018
|
-
getOptionValue(key) {
|
|
1019
|
-
if (this._storeOptionsAsProperties) {
|
|
1020
|
-
return this[key];
|
|
1021
|
-
}
|
|
1022
|
-
return this._optionValues[key];
|
|
1023
|
-
}
|
|
1024
|
-
setOptionValue(key, value) {
|
|
1025
|
-
return this.setOptionValueWithSource(key, value, undefined);
|
|
1026
|
-
}
|
|
1027
|
-
setOptionValueWithSource(key, value, source) {
|
|
1028
|
-
if (this._storeOptionsAsProperties) {
|
|
1029
|
-
this[key] = value;
|
|
1030
|
-
} else {
|
|
1031
|
-
this._optionValues[key] = value;
|
|
1032
|
-
}
|
|
1033
|
-
this._optionValueSources[key] = source;
|
|
1034
|
-
return this;
|
|
1035
|
-
}
|
|
1036
|
-
getOptionValueSource(key) {
|
|
1037
|
-
return this._optionValueSources[key];
|
|
1038
|
-
}
|
|
1039
|
-
getOptionValueSourceWithGlobals(key) {
|
|
1040
|
-
let source;
|
|
1041
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1042
|
-
if (cmd.getOptionValueSource(key) !== undefined) {
|
|
1043
|
-
source = cmd.getOptionValueSource(key);
|
|
1044
|
-
}
|
|
1045
|
-
});
|
|
1046
|
-
return source;
|
|
1047
|
-
}
|
|
1048
|
-
_prepareUserArgs(argv, parseOptions) {
|
|
1049
|
-
if (argv !== undefined && !Array.isArray(argv)) {
|
|
1050
|
-
throw new Error("first parameter to parse must be array or undefined");
|
|
1051
|
-
}
|
|
1052
|
-
parseOptions = parseOptions || {};
|
|
1053
|
-
if (argv === undefined && parseOptions.from === undefined) {
|
|
1054
|
-
if (process2.versions?.electron) {
|
|
1055
|
-
parseOptions.from = "electron";
|
|
1056
|
-
}
|
|
1057
|
-
const execArgv = process2.execArgv ?? [];
|
|
1058
|
-
if (execArgv.includes("-e") || execArgv.includes("--eval") || execArgv.includes("-p") || execArgv.includes("--print")) {
|
|
1059
|
-
parseOptions.from = "eval";
|
|
1060
|
-
}
|
|
1061
|
-
}
|
|
1062
|
-
if (argv === undefined) {
|
|
1063
|
-
argv = process2.argv;
|
|
1064
|
-
}
|
|
1065
|
-
this.rawArgs = argv.slice();
|
|
1066
|
-
let userArgs;
|
|
1067
|
-
switch (parseOptions.from) {
|
|
1068
|
-
case undefined:
|
|
1069
|
-
case "node":
|
|
1070
|
-
this._scriptPath = argv[1];
|
|
1071
|
-
userArgs = argv.slice(2);
|
|
1072
|
-
break;
|
|
1073
|
-
case "electron":
|
|
1074
|
-
if (process2.defaultApp) {
|
|
1075
|
-
this._scriptPath = argv[1];
|
|
1076
|
-
userArgs = argv.slice(2);
|
|
1077
|
-
} else {
|
|
1078
|
-
userArgs = argv.slice(1);
|
|
1079
|
-
}
|
|
1080
|
-
break;
|
|
1081
|
-
case "user":
|
|
1082
|
-
userArgs = argv.slice(0);
|
|
1083
|
-
break;
|
|
1084
|
-
case "eval":
|
|
1085
|
-
userArgs = argv.slice(1);
|
|
1086
|
-
break;
|
|
1087
|
-
default:
|
|
1088
|
-
throw new Error(`unexpected parse option { from: '${parseOptions.from}' }`);
|
|
1089
|
-
}
|
|
1090
|
-
if (!this._name && this._scriptPath)
|
|
1091
|
-
this.nameFromFilename(this._scriptPath);
|
|
1092
|
-
this._name = this._name || "program";
|
|
1093
|
-
return userArgs;
|
|
1094
|
-
}
|
|
1095
|
-
parse(argv, parseOptions) {
|
|
1096
|
-
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1097
|
-
this._parseCommand([], userArgs);
|
|
1098
|
-
return this;
|
|
1099
|
-
}
|
|
1100
|
-
async parseAsync(argv, parseOptions) {
|
|
1101
|
-
const userArgs = this._prepareUserArgs(argv, parseOptions);
|
|
1102
|
-
await this._parseCommand([], userArgs);
|
|
1103
|
-
return this;
|
|
1104
|
-
}
|
|
1105
|
-
_executeSubCommand(subcommand, args) {
|
|
1106
|
-
args = args.slice();
|
|
1107
|
-
let launchWithNode = false;
|
|
1108
|
-
const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
|
|
1109
|
-
function findFile(baseDir, baseName) {
|
|
1110
|
-
const localBin = path.resolve(baseDir, baseName);
|
|
1111
|
-
if (fs.existsSync(localBin))
|
|
1112
|
-
return localBin;
|
|
1113
|
-
if (sourceExt.includes(path.extname(baseName)))
|
|
1114
|
-
return;
|
|
1115
|
-
const foundExt = sourceExt.find((ext) => fs.existsSync(`${localBin}${ext}`));
|
|
1116
|
-
if (foundExt)
|
|
1117
|
-
return `${localBin}${foundExt}`;
|
|
1118
|
-
return;
|
|
1119
|
-
}
|
|
1120
|
-
this._checkForMissingMandatoryOptions();
|
|
1121
|
-
this._checkForConflictingOptions();
|
|
1122
|
-
let executableFile = subcommand._executableFile || `${this._name}-${subcommand._name}`;
|
|
1123
|
-
let executableDir = this._executableDir || "";
|
|
1124
|
-
if (this._scriptPath) {
|
|
1125
|
-
let resolvedScriptPath;
|
|
1126
|
-
try {
|
|
1127
|
-
resolvedScriptPath = fs.realpathSync(this._scriptPath);
|
|
1128
|
-
} catch (err) {
|
|
1129
|
-
resolvedScriptPath = this._scriptPath;
|
|
1130
|
-
}
|
|
1131
|
-
executableDir = path.resolve(path.dirname(resolvedScriptPath), executableDir);
|
|
1132
|
-
}
|
|
1133
|
-
if (executableDir) {
|
|
1134
|
-
let localFile = findFile(executableDir, executableFile);
|
|
1135
|
-
if (!localFile && !subcommand._executableFile && this._scriptPath) {
|
|
1136
|
-
const legacyName = path.basename(this._scriptPath, path.extname(this._scriptPath));
|
|
1137
|
-
if (legacyName !== this._name) {
|
|
1138
|
-
localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
|
|
1139
|
-
}
|
|
1140
|
-
}
|
|
1141
|
-
executableFile = localFile || executableFile;
|
|
1142
|
-
}
|
|
1143
|
-
launchWithNode = sourceExt.includes(path.extname(executableFile));
|
|
1144
|
-
let proc;
|
|
1145
|
-
if (process2.platform !== "win32") {
|
|
1146
|
-
if (launchWithNode) {
|
|
1147
|
-
args.unshift(executableFile);
|
|
1148
|
-
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
1149
|
-
proc = childProcess.spawn(process2.argv[0], args, { stdio: "inherit" });
|
|
1150
|
-
} else {
|
|
1151
|
-
proc = childProcess.spawn(executableFile, args, { stdio: "inherit" });
|
|
1152
|
-
}
|
|
1153
|
-
} else {
|
|
1154
|
-
args.unshift(executableFile);
|
|
1155
|
-
args = incrementNodeInspectorPort(process2.execArgv).concat(args);
|
|
1156
|
-
proc = childProcess.spawn(process2.execPath, args, { stdio: "inherit" });
|
|
1157
|
-
}
|
|
1158
|
-
if (!proc.killed) {
|
|
1159
|
-
const signals = ["SIGUSR1", "SIGUSR2", "SIGTERM", "SIGINT", "SIGHUP"];
|
|
1160
|
-
signals.forEach((signal) => {
|
|
1161
|
-
process2.on(signal, () => {
|
|
1162
|
-
if (proc.killed === false && proc.exitCode === null) {
|
|
1163
|
-
proc.kill(signal);
|
|
1164
|
-
}
|
|
1165
|
-
});
|
|
1166
|
-
});
|
|
1167
|
-
}
|
|
1168
|
-
const exitCallback = this._exitCallback;
|
|
1169
|
-
proc.on("close", (code) => {
|
|
1170
|
-
code = code ?? 1;
|
|
1171
|
-
if (!exitCallback) {
|
|
1172
|
-
process2.exit(code);
|
|
1173
|
-
} else {
|
|
1174
|
-
exitCallback(new CommanderError(code, "commander.executeSubCommandAsync", "(close)"));
|
|
1175
|
-
}
|
|
1176
|
-
});
|
|
1177
|
-
proc.on("error", (err) => {
|
|
1178
|
-
if (err.code === "ENOENT") {
|
|
1179
|
-
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";
|
|
1180
|
-
const executableMissing = `'${executableFile}' does not exist
|
|
1181
|
-
- if '${subcommand._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
1182
|
-
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
1183
|
-
- ${executableDirMessage}`;
|
|
1184
|
-
throw new Error(executableMissing);
|
|
1185
|
-
} else if (err.code === "EACCES") {
|
|
1186
|
-
throw new Error(`'${executableFile}' not executable`);
|
|
1187
|
-
}
|
|
1188
|
-
if (!exitCallback) {
|
|
1189
|
-
process2.exit(1);
|
|
1190
|
-
} else {
|
|
1191
|
-
const wrappedError = new CommanderError(1, "commander.executeSubCommandAsync", "(error)");
|
|
1192
|
-
wrappedError.nestedError = err;
|
|
1193
|
-
exitCallback(wrappedError);
|
|
1194
|
-
}
|
|
1195
|
-
});
|
|
1196
|
-
this.runningCommand = proc;
|
|
1197
|
-
}
|
|
1198
|
-
_dispatchSubcommand(commandName, operands, unknown) {
|
|
1199
|
-
const subCommand = this._findCommand(commandName);
|
|
1200
|
-
if (!subCommand)
|
|
1201
|
-
this.help({ error: true });
|
|
1202
|
-
let promiseChain;
|
|
1203
|
-
promiseChain = this._chainOrCallSubCommandHook(promiseChain, subCommand, "preSubcommand");
|
|
1204
|
-
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1205
|
-
if (subCommand._executableHandler) {
|
|
1206
|
-
this._executeSubCommand(subCommand, operands.concat(unknown));
|
|
1207
|
-
} else {
|
|
1208
|
-
return subCommand._parseCommand(operands, unknown);
|
|
1209
|
-
}
|
|
1210
|
-
});
|
|
1211
|
-
return promiseChain;
|
|
1212
|
-
}
|
|
1213
|
-
_dispatchHelpCommand(subcommandName) {
|
|
1214
|
-
if (!subcommandName) {
|
|
1215
|
-
this.help();
|
|
1216
|
-
}
|
|
1217
|
-
const subCommand = this._findCommand(subcommandName);
|
|
1218
|
-
if (subCommand && !subCommand._executableHandler) {
|
|
1219
|
-
subCommand.help();
|
|
1220
|
-
}
|
|
1221
|
-
return this._dispatchSubcommand(subcommandName, [], [this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? "--help"]);
|
|
1222
|
-
}
|
|
1223
|
-
_checkNumberOfArguments() {
|
|
1224
|
-
this.registeredArguments.forEach((arg, i) => {
|
|
1225
|
-
if (arg.required && this.args[i] == null) {
|
|
1226
|
-
this.missingArgument(arg.name());
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
if (this.registeredArguments.length > 0 && this.registeredArguments[this.registeredArguments.length - 1].variadic) {
|
|
1230
|
-
return;
|
|
1231
|
-
}
|
|
1232
|
-
if (this.args.length > this.registeredArguments.length) {
|
|
1233
|
-
this._excessArguments(this.args);
|
|
1234
|
-
}
|
|
1235
|
-
}
|
|
1236
|
-
_processArguments() {
|
|
1237
|
-
const myParseArg = (argument, value, previous) => {
|
|
1238
|
-
let parsedValue = value;
|
|
1239
|
-
if (value !== null && argument.parseArg) {
|
|
1240
|
-
const invalidValueMessage = `error: command-argument value '${value}' is invalid for argument '${argument.name()}'.`;
|
|
1241
|
-
parsedValue = this._callParseArg(argument, value, previous, invalidValueMessage);
|
|
1242
|
-
}
|
|
1243
|
-
return parsedValue;
|
|
1244
|
-
};
|
|
1245
|
-
this._checkNumberOfArguments();
|
|
1246
|
-
const processedArgs = [];
|
|
1247
|
-
this.registeredArguments.forEach((declaredArg, index) => {
|
|
1248
|
-
let value = declaredArg.defaultValue;
|
|
1249
|
-
if (declaredArg.variadic) {
|
|
1250
|
-
if (index < this.args.length) {
|
|
1251
|
-
value = this.args.slice(index);
|
|
1252
|
-
if (declaredArg.parseArg) {
|
|
1253
|
-
value = value.reduce((processed, v) => {
|
|
1254
|
-
return myParseArg(declaredArg, v, processed);
|
|
1255
|
-
}, declaredArg.defaultValue);
|
|
1256
|
-
}
|
|
1257
|
-
} else if (value === undefined) {
|
|
1258
|
-
value = [];
|
|
1259
|
-
}
|
|
1260
|
-
} else if (index < this.args.length) {
|
|
1261
|
-
value = this.args[index];
|
|
1262
|
-
if (declaredArg.parseArg) {
|
|
1263
|
-
value = myParseArg(declaredArg, value, declaredArg.defaultValue);
|
|
1264
|
-
}
|
|
1265
|
-
}
|
|
1266
|
-
processedArgs[index] = value;
|
|
1267
|
-
});
|
|
1268
|
-
this.processedArgs = processedArgs;
|
|
1269
|
-
}
|
|
1270
|
-
_chainOrCall(promise, fn) {
|
|
1271
|
-
if (promise && promise.then && typeof promise.then === "function") {
|
|
1272
|
-
return promise.then(() => fn());
|
|
1273
|
-
}
|
|
1274
|
-
return fn();
|
|
1275
|
-
}
|
|
1276
|
-
_chainOrCallHooks(promise, event) {
|
|
1277
|
-
let result = promise;
|
|
1278
|
-
const hooks = [];
|
|
1279
|
-
this._getCommandAndAncestors().reverse().filter((cmd) => cmd._lifeCycleHooks[event] !== undefined).forEach((hookedCommand) => {
|
|
1280
|
-
hookedCommand._lifeCycleHooks[event].forEach((callback) => {
|
|
1281
|
-
hooks.push({ hookedCommand, callback });
|
|
1282
|
-
});
|
|
1283
|
-
});
|
|
1284
|
-
if (event === "postAction") {
|
|
1285
|
-
hooks.reverse();
|
|
1286
|
-
}
|
|
1287
|
-
hooks.forEach((hookDetail) => {
|
|
1288
|
-
result = this._chainOrCall(result, () => {
|
|
1289
|
-
return hookDetail.callback(hookDetail.hookedCommand, this);
|
|
1290
|
-
});
|
|
1291
|
-
});
|
|
1292
|
-
return result;
|
|
1293
|
-
}
|
|
1294
|
-
_chainOrCallSubCommandHook(promise, subCommand, event) {
|
|
1295
|
-
let result = promise;
|
|
1296
|
-
if (this._lifeCycleHooks[event] !== undefined) {
|
|
1297
|
-
this._lifeCycleHooks[event].forEach((hook) => {
|
|
1298
|
-
result = this._chainOrCall(result, () => {
|
|
1299
|
-
return hook(this, subCommand);
|
|
1300
|
-
});
|
|
1301
|
-
});
|
|
1302
|
-
}
|
|
1303
|
-
return result;
|
|
1304
|
-
}
|
|
1305
|
-
_parseCommand(operands, unknown) {
|
|
1306
|
-
const parsed = this.parseOptions(unknown);
|
|
1307
|
-
this._parseOptionsEnv();
|
|
1308
|
-
this._parseOptionsImplied();
|
|
1309
|
-
operands = operands.concat(parsed.operands);
|
|
1310
|
-
unknown = parsed.unknown;
|
|
1311
|
-
this.args = operands.concat(unknown);
|
|
1312
|
-
if (operands && this._findCommand(operands[0])) {
|
|
1313
|
-
return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);
|
|
1314
|
-
}
|
|
1315
|
-
if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {
|
|
1316
|
-
return this._dispatchHelpCommand(operands[1]);
|
|
1317
|
-
}
|
|
1318
|
-
if (this._defaultCommandName) {
|
|
1319
|
-
this._outputHelpIfRequested(unknown);
|
|
1320
|
-
return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);
|
|
1321
|
-
}
|
|
1322
|
-
if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {
|
|
1323
|
-
this.help({ error: true });
|
|
1324
|
-
}
|
|
1325
|
-
this._outputHelpIfRequested(parsed.unknown);
|
|
1326
|
-
this._checkForMissingMandatoryOptions();
|
|
1327
|
-
this._checkForConflictingOptions();
|
|
1328
|
-
const checkForUnknownOptions = () => {
|
|
1329
|
-
if (parsed.unknown.length > 0) {
|
|
1330
|
-
this.unknownOption(parsed.unknown[0]);
|
|
1331
|
-
}
|
|
1332
|
-
};
|
|
1333
|
-
const commandEvent = `command:${this.name()}`;
|
|
1334
|
-
if (this._actionHandler) {
|
|
1335
|
-
checkForUnknownOptions();
|
|
1336
|
-
this._processArguments();
|
|
1337
|
-
let promiseChain;
|
|
1338
|
-
promiseChain = this._chainOrCallHooks(promiseChain, "preAction");
|
|
1339
|
-
promiseChain = this._chainOrCall(promiseChain, () => this._actionHandler(this.processedArgs));
|
|
1340
|
-
if (this.parent) {
|
|
1341
|
-
promiseChain = this._chainOrCall(promiseChain, () => {
|
|
1342
|
-
this.parent.emit(commandEvent, operands, unknown);
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
promiseChain = this._chainOrCallHooks(promiseChain, "postAction");
|
|
1346
|
-
return promiseChain;
|
|
1347
|
-
}
|
|
1348
|
-
if (this.parent && this.parent.listenerCount(commandEvent)) {
|
|
1349
|
-
checkForUnknownOptions();
|
|
1350
|
-
this._processArguments();
|
|
1351
|
-
this.parent.emit(commandEvent, operands, unknown);
|
|
1352
|
-
} else if (operands.length) {
|
|
1353
|
-
if (this._findCommand("*")) {
|
|
1354
|
-
return this._dispatchSubcommand("*", operands, unknown);
|
|
1355
|
-
}
|
|
1356
|
-
if (this.listenerCount("command:*")) {
|
|
1357
|
-
this.emit("command:*", operands, unknown);
|
|
1358
|
-
} else if (this.commands.length) {
|
|
1359
|
-
this.unknownCommand();
|
|
1360
|
-
} else {
|
|
1361
|
-
checkForUnknownOptions();
|
|
1362
|
-
this._processArguments();
|
|
1363
|
-
}
|
|
1364
|
-
} else if (this.commands.length) {
|
|
1365
|
-
checkForUnknownOptions();
|
|
1366
|
-
this.help({ error: true });
|
|
1367
|
-
} else {
|
|
1368
|
-
checkForUnknownOptions();
|
|
1369
|
-
this._processArguments();
|
|
1370
|
-
}
|
|
1371
|
-
}
|
|
1372
|
-
_findCommand(name) {
|
|
1373
|
-
if (!name)
|
|
1374
|
-
return;
|
|
1375
|
-
return this.commands.find((cmd) => cmd._name === name || cmd._aliases.includes(name));
|
|
1376
|
-
}
|
|
1377
|
-
_findOption(arg) {
|
|
1378
|
-
return this.options.find((option) => option.is(arg));
|
|
1379
|
-
}
|
|
1380
|
-
_checkForMissingMandatoryOptions() {
|
|
1381
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1382
|
-
cmd.options.forEach((anOption) => {
|
|
1383
|
-
if (anOption.mandatory && cmd.getOptionValue(anOption.attributeName()) === undefined) {
|
|
1384
|
-
cmd.missingMandatoryOptionValue(anOption);
|
|
1385
|
-
}
|
|
1386
|
-
});
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
_checkForConflictingLocalOptions() {
|
|
1390
|
-
const definedNonDefaultOptions = this.options.filter((option) => {
|
|
1391
|
-
const optionKey = option.attributeName();
|
|
1392
|
-
if (this.getOptionValue(optionKey) === undefined) {
|
|
1393
|
-
return false;
|
|
1394
|
-
}
|
|
1395
|
-
return this.getOptionValueSource(optionKey) !== "default";
|
|
1396
|
-
});
|
|
1397
|
-
const optionsWithConflicting = definedNonDefaultOptions.filter((option) => option.conflictsWith.length > 0);
|
|
1398
|
-
optionsWithConflicting.forEach((option) => {
|
|
1399
|
-
const conflictingAndDefined = definedNonDefaultOptions.find((defined) => option.conflictsWith.includes(defined.attributeName()));
|
|
1400
|
-
if (conflictingAndDefined) {
|
|
1401
|
-
this._conflictingOption(option, conflictingAndDefined);
|
|
1402
|
-
}
|
|
1403
|
-
});
|
|
1404
|
-
}
|
|
1405
|
-
_checkForConflictingOptions() {
|
|
1406
|
-
this._getCommandAndAncestors().forEach((cmd) => {
|
|
1407
|
-
cmd._checkForConflictingLocalOptions();
|
|
1408
|
-
});
|
|
1409
|
-
}
|
|
1410
|
-
parseOptions(argv) {
|
|
1411
|
-
const operands = [];
|
|
1412
|
-
const unknown = [];
|
|
1413
|
-
let dest = operands;
|
|
1414
|
-
const args = argv.slice();
|
|
1415
|
-
function maybeOption(arg) {
|
|
1416
|
-
return arg.length > 1 && arg[0] === "-";
|
|
1417
|
-
}
|
|
1418
|
-
let activeVariadicOption = null;
|
|
1419
|
-
while (args.length) {
|
|
1420
|
-
const arg = args.shift();
|
|
1421
|
-
if (arg === "--") {
|
|
1422
|
-
if (dest === unknown)
|
|
1423
|
-
dest.push(arg);
|
|
1424
|
-
dest.push(...args);
|
|
1425
|
-
break;
|
|
1426
|
-
}
|
|
1427
|
-
if (activeVariadicOption && !maybeOption(arg)) {
|
|
1428
|
-
this.emit(`option:${activeVariadicOption.name()}`, arg);
|
|
1429
|
-
continue;
|
|
1430
|
-
}
|
|
1431
|
-
activeVariadicOption = null;
|
|
1432
|
-
if (maybeOption(arg)) {
|
|
1433
|
-
const option = this._findOption(arg);
|
|
1434
|
-
if (option) {
|
|
1435
|
-
if (option.required) {
|
|
1436
|
-
const value = args.shift();
|
|
1437
|
-
if (value === undefined)
|
|
1438
|
-
this.optionMissingArgument(option);
|
|
1439
|
-
this.emit(`option:${option.name()}`, value);
|
|
1440
|
-
} else if (option.optional) {
|
|
1441
|
-
let value = null;
|
|
1442
|
-
if (args.length > 0 && !maybeOption(args[0])) {
|
|
1443
|
-
value = args.shift();
|
|
1444
|
-
}
|
|
1445
|
-
this.emit(`option:${option.name()}`, value);
|
|
1446
|
-
} else {
|
|
1447
|
-
this.emit(`option:${option.name()}`);
|
|
1448
|
-
}
|
|
1449
|
-
activeVariadicOption = option.variadic ? option : null;
|
|
1450
|
-
continue;
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
if (arg.length > 2 && arg[0] === "-" && arg[1] !== "-") {
|
|
1454
|
-
const option = this._findOption(`-${arg[1]}`);
|
|
1455
|
-
if (option) {
|
|
1456
|
-
if (option.required || option.optional && this._combineFlagAndOptionalValue) {
|
|
1457
|
-
this.emit(`option:${option.name()}`, arg.slice(2));
|
|
1458
|
-
} else {
|
|
1459
|
-
this.emit(`option:${option.name()}`);
|
|
1460
|
-
args.unshift(`-${arg.slice(2)}`);
|
|
1461
|
-
}
|
|
1462
|
-
continue;
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
if (/^--[^=]+=/.test(arg)) {
|
|
1466
|
-
const index = arg.indexOf("=");
|
|
1467
|
-
const option = this._findOption(arg.slice(0, index));
|
|
1468
|
-
if (option && (option.required || option.optional)) {
|
|
1469
|
-
this.emit(`option:${option.name()}`, arg.slice(index + 1));
|
|
1470
|
-
continue;
|
|
1471
|
-
}
|
|
1472
|
-
}
|
|
1473
|
-
if (maybeOption(arg)) {
|
|
1474
|
-
dest = unknown;
|
|
1475
|
-
}
|
|
1476
|
-
if ((this._enablePositionalOptions || this._passThroughOptions) && operands.length === 0 && unknown.length === 0) {
|
|
1477
|
-
if (this._findCommand(arg)) {
|
|
1478
|
-
operands.push(arg);
|
|
1479
|
-
if (args.length > 0)
|
|
1480
|
-
unknown.push(...args);
|
|
1481
|
-
break;
|
|
1482
|
-
} else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {
|
|
1483
|
-
operands.push(arg);
|
|
1484
|
-
if (args.length > 0)
|
|
1485
|
-
operands.push(...args);
|
|
1486
|
-
break;
|
|
1487
|
-
} else if (this._defaultCommandName) {
|
|
1488
|
-
unknown.push(arg);
|
|
1489
|
-
if (args.length > 0)
|
|
1490
|
-
unknown.push(...args);
|
|
1491
|
-
break;
|
|
1492
|
-
}
|
|
1493
|
-
}
|
|
1494
|
-
if (this._passThroughOptions) {
|
|
1495
|
-
dest.push(arg);
|
|
1496
|
-
if (args.length > 0)
|
|
1497
|
-
dest.push(...args);
|
|
1498
|
-
break;
|
|
1499
|
-
}
|
|
1500
|
-
dest.push(arg);
|
|
1501
|
-
}
|
|
1502
|
-
return { operands, unknown };
|
|
1503
|
-
}
|
|
1504
|
-
opts() {
|
|
1505
|
-
if (this._storeOptionsAsProperties) {
|
|
1506
|
-
const result = {};
|
|
1507
|
-
const len = this.options.length;
|
|
1508
|
-
for (let i = 0;i < len; i++) {
|
|
1509
|
-
const key = this.options[i].attributeName();
|
|
1510
|
-
result[key] = key === this._versionOptionName ? this._version : this[key];
|
|
1511
|
-
}
|
|
1512
|
-
return result;
|
|
1513
|
-
}
|
|
1514
|
-
return this._optionValues;
|
|
1515
|
-
}
|
|
1516
|
-
optsWithGlobals() {
|
|
1517
|
-
return this._getCommandAndAncestors().reduce((combinedOptions, cmd) => Object.assign(combinedOptions, cmd.opts()), {});
|
|
1518
|
-
}
|
|
1519
|
-
error(message, errorOptions) {
|
|
1520
|
-
this._outputConfiguration.outputError(`${message}
|
|
1521
|
-
`, this._outputConfiguration.writeErr);
|
|
1522
|
-
if (typeof this._showHelpAfterError === "string") {
|
|
1523
|
-
this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
1524
|
-
`);
|
|
1525
|
-
} else if (this._showHelpAfterError) {
|
|
1526
|
-
this._outputConfiguration.writeErr(`
|
|
1527
|
-
`);
|
|
1528
|
-
this.outputHelp({ error: true });
|
|
1529
|
-
}
|
|
1530
|
-
const config = errorOptions || {};
|
|
1531
|
-
const exitCode = config.exitCode || 1;
|
|
1532
|
-
const code = config.code || "commander.error";
|
|
1533
|
-
this._exit(exitCode, code, message);
|
|
1534
|
-
}
|
|
1535
|
-
_parseOptionsEnv() {
|
|
1536
|
-
this.options.forEach((option) => {
|
|
1537
|
-
if (option.envVar && option.envVar in process2.env) {
|
|
1538
|
-
const optionKey = option.attributeName();
|
|
1539
|
-
if (this.getOptionValue(optionKey) === undefined || ["default", "config", "env"].includes(this.getOptionValueSource(optionKey))) {
|
|
1540
|
-
if (option.required || option.optional) {
|
|
1541
|
-
this.emit(`optionEnv:${option.name()}`, process2.env[option.envVar]);
|
|
1542
|
-
} else {
|
|
1543
|
-
this.emit(`optionEnv:${option.name()}`);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
}
|
|
1547
|
-
});
|
|
1548
|
-
}
|
|
1549
|
-
_parseOptionsImplied() {
|
|
1550
|
-
const dualHelper = new DualOptions(this.options);
|
|
1551
|
-
const hasCustomOptionValue = (optionKey) => {
|
|
1552
|
-
return this.getOptionValue(optionKey) !== undefined && !["default", "implied"].includes(this.getOptionValueSource(optionKey));
|
|
1553
|
-
};
|
|
1554
|
-
this.options.filter((option) => option.implied !== undefined && hasCustomOptionValue(option.attributeName()) && dualHelper.valueFromOption(this.getOptionValue(option.attributeName()), option)).forEach((option) => {
|
|
1555
|
-
Object.keys(option.implied).filter((impliedKey) => !hasCustomOptionValue(impliedKey)).forEach((impliedKey) => {
|
|
1556
|
-
this.setOptionValueWithSource(impliedKey, option.implied[impliedKey], "implied");
|
|
1557
|
-
});
|
|
1558
|
-
});
|
|
1559
|
-
}
|
|
1560
|
-
missingArgument(name) {
|
|
1561
|
-
const message = `error: missing required argument '${name}'`;
|
|
1562
|
-
this.error(message, { code: "commander.missingArgument" });
|
|
1563
|
-
}
|
|
1564
|
-
optionMissingArgument(option) {
|
|
1565
|
-
const message = `error: option '${option.flags}' argument missing`;
|
|
1566
|
-
this.error(message, { code: "commander.optionMissingArgument" });
|
|
1567
|
-
}
|
|
1568
|
-
missingMandatoryOptionValue(option) {
|
|
1569
|
-
const message = `error: required option '${option.flags}' not specified`;
|
|
1570
|
-
this.error(message, { code: "commander.missingMandatoryOptionValue" });
|
|
1571
|
-
}
|
|
1572
|
-
_conflictingOption(option, conflictingOption) {
|
|
1573
|
-
const findBestOptionFromValue = (option2) => {
|
|
1574
|
-
const optionKey = option2.attributeName();
|
|
1575
|
-
const optionValue = this.getOptionValue(optionKey);
|
|
1576
|
-
const negativeOption = this.options.find((target) => target.negate && optionKey === target.attributeName());
|
|
1577
|
-
const positiveOption = this.options.find((target) => !target.negate && optionKey === target.attributeName());
|
|
1578
|
-
if (negativeOption && (negativeOption.presetArg === undefined && optionValue === false || negativeOption.presetArg !== undefined && optionValue === negativeOption.presetArg)) {
|
|
1579
|
-
return negativeOption;
|
|
1580
|
-
}
|
|
1581
|
-
return positiveOption || option2;
|
|
1582
|
-
};
|
|
1583
|
-
const getErrorMessage = (option2) => {
|
|
1584
|
-
const bestOption = findBestOptionFromValue(option2);
|
|
1585
|
-
const optionKey = bestOption.attributeName();
|
|
1586
|
-
const source = this.getOptionValueSource(optionKey);
|
|
1587
|
-
if (source === "env") {
|
|
1588
|
-
return `environment variable '${bestOption.envVar}'`;
|
|
1589
|
-
}
|
|
1590
|
-
return `option '${bestOption.flags}'`;
|
|
1591
|
-
};
|
|
1592
|
-
const message = `error: ${getErrorMessage(option)} cannot be used with ${getErrorMessage(conflictingOption)}`;
|
|
1593
|
-
this.error(message, { code: "commander.conflictingOption" });
|
|
1594
|
-
}
|
|
1595
|
-
unknownOption(flag) {
|
|
1596
|
-
if (this._allowUnknownOption)
|
|
1597
|
-
return;
|
|
1598
|
-
let suggestion = "";
|
|
1599
|
-
if (flag.startsWith("--") && this._showSuggestionAfterError) {
|
|
1600
|
-
let candidateFlags = [];
|
|
1601
|
-
let command = this;
|
|
1602
|
-
do {
|
|
1603
|
-
const moreFlags = command.createHelp().visibleOptions(command).filter((option) => option.long).map((option) => option.long);
|
|
1604
|
-
candidateFlags = candidateFlags.concat(moreFlags);
|
|
1605
|
-
command = command.parent;
|
|
1606
|
-
} while (command && !command._enablePositionalOptions);
|
|
1607
|
-
suggestion = suggestSimilar(flag, candidateFlags);
|
|
1608
|
-
}
|
|
1609
|
-
const message = `error: unknown option '${flag}'${suggestion}`;
|
|
1610
|
-
this.error(message, { code: "commander.unknownOption" });
|
|
1611
|
-
}
|
|
1612
|
-
_excessArguments(receivedArgs) {
|
|
1613
|
-
if (this._allowExcessArguments)
|
|
1614
|
-
return;
|
|
1615
|
-
const expected = this.registeredArguments.length;
|
|
1616
|
-
const s = expected === 1 ? "" : "s";
|
|
1617
|
-
const forSubcommand = this.parent ? ` for '${this.name()}'` : "";
|
|
1618
|
-
const message = `error: too many arguments${forSubcommand}. Expected ${expected} argument${s} but got ${receivedArgs.length}.`;
|
|
1619
|
-
this.error(message, { code: "commander.excessArguments" });
|
|
1620
|
-
}
|
|
1621
|
-
unknownCommand() {
|
|
1622
|
-
const unknownName = this.args[0];
|
|
1623
|
-
let suggestion = "";
|
|
1624
|
-
if (this._showSuggestionAfterError) {
|
|
1625
|
-
const candidateNames = [];
|
|
1626
|
-
this.createHelp().visibleCommands(this).forEach((command) => {
|
|
1627
|
-
candidateNames.push(command.name());
|
|
1628
|
-
if (command.alias())
|
|
1629
|
-
candidateNames.push(command.alias());
|
|
1630
|
-
});
|
|
1631
|
-
suggestion = suggestSimilar(unknownName, candidateNames);
|
|
1632
|
-
}
|
|
1633
|
-
const message = `error: unknown command '${unknownName}'${suggestion}`;
|
|
1634
|
-
this.error(message, { code: "commander.unknownCommand" });
|
|
1635
|
-
}
|
|
1636
|
-
version(str, flags, description) {
|
|
1637
|
-
if (str === undefined)
|
|
1638
|
-
return this._version;
|
|
1639
|
-
this._version = str;
|
|
1640
|
-
flags = flags || "-V, --version";
|
|
1641
|
-
description = description || "output the version number";
|
|
1642
|
-
const versionOption = this.createOption(flags, description);
|
|
1643
|
-
this._versionOptionName = versionOption.attributeName();
|
|
1644
|
-
this._registerOption(versionOption);
|
|
1645
|
-
this.on("option:" + versionOption.name(), () => {
|
|
1646
|
-
this._outputConfiguration.writeOut(`${str}
|
|
1647
|
-
`);
|
|
1648
|
-
this._exit(0, "commander.version", str);
|
|
1649
|
-
});
|
|
1650
|
-
return this;
|
|
1651
|
-
}
|
|
1652
|
-
description(str, argsDescription) {
|
|
1653
|
-
if (str === undefined && argsDescription === undefined)
|
|
1654
|
-
return this._description;
|
|
1655
|
-
this._description = str;
|
|
1656
|
-
if (argsDescription) {
|
|
1657
|
-
this._argsDescription = argsDescription;
|
|
1658
|
-
}
|
|
1659
|
-
return this;
|
|
1660
|
-
}
|
|
1661
|
-
summary(str) {
|
|
1662
|
-
if (str === undefined)
|
|
1663
|
-
return this._summary;
|
|
1664
|
-
this._summary = str;
|
|
1665
|
-
return this;
|
|
1666
|
-
}
|
|
1667
|
-
alias(alias) {
|
|
1668
|
-
if (alias === undefined)
|
|
1669
|
-
return this._aliases[0];
|
|
1670
|
-
let command = this;
|
|
1671
|
-
if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) {
|
|
1672
|
-
command = this.commands[this.commands.length - 1];
|
|
1673
|
-
}
|
|
1674
|
-
if (alias === command._name)
|
|
1675
|
-
throw new Error("Command alias can't be the same as its name");
|
|
1676
|
-
const matchingCommand = this.parent?._findCommand(alias);
|
|
1677
|
-
if (matchingCommand) {
|
|
1678
|
-
const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join("|");
|
|
1679
|
-
throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);
|
|
1680
|
-
}
|
|
1681
|
-
command._aliases.push(alias);
|
|
1682
|
-
return this;
|
|
1683
|
-
}
|
|
1684
|
-
aliases(aliases) {
|
|
1685
|
-
if (aliases === undefined)
|
|
1686
|
-
return this._aliases;
|
|
1687
|
-
aliases.forEach((alias) => this.alias(alias));
|
|
1688
|
-
return this;
|
|
1689
|
-
}
|
|
1690
|
-
usage(str) {
|
|
1691
|
-
if (str === undefined) {
|
|
1692
|
-
if (this._usage)
|
|
1693
|
-
return this._usage;
|
|
1694
|
-
const args = this.registeredArguments.map((arg) => {
|
|
1695
|
-
return humanReadableArgName(arg);
|
|
1696
|
-
});
|
|
1697
|
-
return [].concat(this.options.length || this._helpOption !== null ? "[options]" : [], this.commands.length ? "[command]" : [], this.registeredArguments.length ? args : []).join(" ");
|
|
1698
|
-
}
|
|
1699
|
-
this._usage = str;
|
|
1700
|
-
return this;
|
|
1701
|
-
}
|
|
1702
|
-
name(str) {
|
|
1703
|
-
if (str === undefined)
|
|
1704
|
-
return this._name;
|
|
1705
|
-
this._name = str;
|
|
1706
|
-
return this;
|
|
1707
|
-
}
|
|
1708
|
-
nameFromFilename(filename) {
|
|
1709
|
-
this._name = path.basename(filename, path.extname(filename));
|
|
1710
|
-
return this;
|
|
1711
|
-
}
|
|
1712
|
-
executableDir(path2) {
|
|
1713
|
-
if (path2 === undefined)
|
|
1714
|
-
return this._executableDir;
|
|
1715
|
-
this._executableDir = path2;
|
|
1716
|
-
return this;
|
|
1717
|
-
}
|
|
1718
|
-
helpInformation(contextOptions) {
|
|
1719
|
-
const helper = this.createHelp();
|
|
1720
|
-
if (helper.helpWidth === undefined) {
|
|
1721
|
-
helper.helpWidth = contextOptions && contextOptions.error ? this._outputConfiguration.getErrHelpWidth() : this._outputConfiguration.getOutHelpWidth();
|
|
1722
|
-
}
|
|
1723
|
-
return helper.formatHelp(this, helper);
|
|
1724
|
-
}
|
|
1725
|
-
_getHelpContext(contextOptions) {
|
|
1726
|
-
contextOptions = contextOptions || {};
|
|
1727
|
-
const context = { error: !!contextOptions.error };
|
|
1728
|
-
let write;
|
|
1729
|
-
if (context.error) {
|
|
1730
|
-
write = (arg) => this._outputConfiguration.writeErr(arg);
|
|
1731
|
-
} else {
|
|
1732
|
-
write = (arg) => this._outputConfiguration.writeOut(arg);
|
|
1733
|
-
}
|
|
1734
|
-
context.write = contextOptions.write || write;
|
|
1735
|
-
context.command = this;
|
|
1736
|
-
return context;
|
|
1737
|
-
}
|
|
1738
|
-
outputHelp(contextOptions) {
|
|
1739
|
-
let deprecatedCallback;
|
|
1740
|
-
if (typeof contextOptions === "function") {
|
|
1741
|
-
deprecatedCallback = contextOptions;
|
|
1742
|
-
contextOptions = undefined;
|
|
1743
|
-
}
|
|
1744
|
-
const context = this._getHelpContext(contextOptions);
|
|
1745
|
-
this._getCommandAndAncestors().reverse().forEach((command) => command.emit("beforeAllHelp", context));
|
|
1746
|
-
this.emit("beforeHelp", context);
|
|
1747
|
-
let helpInformation = this.helpInformation(context);
|
|
1748
|
-
if (deprecatedCallback) {
|
|
1749
|
-
helpInformation = deprecatedCallback(helpInformation);
|
|
1750
|
-
if (typeof helpInformation !== "string" && !Buffer.isBuffer(helpInformation)) {
|
|
1751
|
-
throw new Error("outputHelp callback must return a string or a Buffer");
|
|
1752
|
-
}
|
|
1753
|
-
}
|
|
1754
|
-
context.write(helpInformation);
|
|
1755
|
-
if (this._getHelpOption()?.long) {
|
|
1756
|
-
this.emit(this._getHelpOption().long);
|
|
1757
|
-
}
|
|
1758
|
-
this.emit("afterHelp", context);
|
|
1759
|
-
this._getCommandAndAncestors().forEach((command) => command.emit("afterAllHelp", context));
|
|
1760
|
-
}
|
|
1761
|
-
helpOption(flags, description) {
|
|
1762
|
-
if (typeof flags === "boolean") {
|
|
1763
|
-
if (flags) {
|
|
1764
|
-
this._helpOption = this._helpOption ?? undefined;
|
|
1765
|
-
} else {
|
|
1766
|
-
this._helpOption = null;
|
|
1767
|
-
}
|
|
1768
|
-
return this;
|
|
1769
|
-
}
|
|
1770
|
-
flags = flags ?? "-h, --help";
|
|
1771
|
-
description = description ?? "display help for command";
|
|
1772
|
-
this._helpOption = this.createOption(flags, description);
|
|
1773
|
-
return this;
|
|
1774
|
-
}
|
|
1775
|
-
_getHelpOption() {
|
|
1776
|
-
if (this._helpOption === undefined) {
|
|
1777
|
-
this.helpOption(undefined, undefined);
|
|
1778
|
-
}
|
|
1779
|
-
return this._helpOption;
|
|
1780
|
-
}
|
|
1781
|
-
addHelpOption(option) {
|
|
1782
|
-
this._helpOption = option;
|
|
1783
|
-
return this;
|
|
1784
|
-
}
|
|
1785
|
-
help(contextOptions) {
|
|
1786
|
-
this.outputHelp(contextOptions);
|
|
1787
|
-
let exitCode = process2.exitCode || 0;
|
|
1788
|
-
if (exitCode === 0 && contextOptions && typeof contextOptions !== "function" && contextOptions.error) {
|
|
1789
|
-
exitCode = 1;
|
|
1790
|
-
}
|
|
1791
|
-
this._exit(exitCode, "commander.help", "(outputHelp)");
|
|
1792
|
-
}
|
|
1793
|
-
addHelpText(position, text) {
|
|
1794
|
-
const allowedValues = ["beforeAll", "before", "after", "afterAll"];
|
|
1795
|
-
if (!allowedValues.includes(position)) {
|
|
1796
|
-
throw new Error(`Unexpected value for position to addHelpText.
|
|
1797
|
-
Expecting one of '${allowedValues.join("', '")}'`);
|
|
1798
|
-
}
|
|
1799
|
-
const helpEvent = `${position}Help`;
|
|
1800
|
-
this.on(helpEvent, (context) => {
|
|
1801
|
-
let helpStr;
|
|
1802
|
-
if (typeof text === "function") {
|
|
1803
|
-
helpStr = text({ error: context.error, command: context.command });
|
|
1804
|
-
} else {
|
|
1805
|
-
helpStr = text;
|
|
1806
|
-
}
|
|
1807
|
-
if (helpStr) {
|
|
1808
|
-
context.write(`${helpStr}
|
|
1809
|
-
`);
|
|
1810
|
-
}
|
|
1811
|
-
});
|
|
1812
|
-
return this;
|
|
1813
|
-
}
|
|
1814
|
-
_outputHelpIfRequested(args) {
|
|
1815
|
-
const helpOption = this._getHelpOption();
|
|
1816
|
-
const helpRequested = helpOption && args.find((arg) => helpOption.is(arg));
|
|
1817
|
-
if (helpRequested) {
|
|
1818
|
-
this.outputHelp();
|
|
1819
|
-
this._exit(0, "commander.helpDisplayed", "(outputHelp)");
|
|
1820
|
-
}
|
|
1821
|
-
}
|
|
1822
|
-
}
|
|
1823
|
-
function incrementNodeInspectorPort(args) {
|
|
1824
|
-
return args.map((arg) => {
|
|
1825
|
-
if (!arg.startsWith("--inspect")) {
|
|
1826
|
-
return arg;
|
|
1827
|
-
}
|
|
1828
|
-
let debugOption;
|
|
1829
|
-
let debugHost = "127.0.0.1";
|
|
1830
|
-
let debugPort = "9229";
|
|
1831
|
-
let match;
|
|
1832
|
-
if ((match = arg.match(/^(--inspect(-brk)?)$/)) !== null) {
|
|
1833
|
-
debugOption = match[1];
|
|
1834
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+)$/)) !== null) {
|
|
1835
|
-
debugOption = match[1];
|
|
1836
|
-
if (/^\d+$/.test(match[3])) {
|
|
1837
|
-
debugPort = match[3];
|
|
1838
|
-
} else {
|
|
1839
|
-
debugHost = match[3];
|
|
1840
|
-
}
|
|
1841
|
-
} else if ((match = arg.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/)) !== null) {
|
|
1842
|
-
debugOption = match[1];
|
|
1843
|
-
debugHost = match[3];
|
|
1844
|
-
debugPort = match[4];
|
|
1845
|
-
}
|
|
1846
|
-
if (debugOption && debugPort !== "0") {
|
|
1847
|
-
return `${debugOption}=${debugHost}:${parseInt(debugPort) + 1}`;
|
|
1848
|
-
}
|
|
1849
|
-
return arg;
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
exports.Command = Command;
|
|
1853
|
-
});
|
|
1854
|
-
|
|
1855
|
-
// ../../node_modules/commander/index.js
|
|
1856
|
-
var require_commander = __commonJS((exports) => {
|
|
1857
|
-
var { Argument } = require_argument();
|
|
1858
|
-
var { Command } = require_command();
|
|
1859
|
-
var { CommanderError, InvalidArgumentError } = require_error();
|
|
1860
|
-
var { Help } = require_help();
|
|
1861
|
-
var { Option } = require_option();
|
|
1862
|
-
exports.program = new Command;
|
|
1863
|
-
exports.createCommand = (name) => new Command(name);
|
|
1864
|
-
exports.createOption = (flags, description) => new Option(flags, description);
|
|
1865
|
-
exports.createArgument = (name, description) => new Argument(name, description);
|
|
1866
|
-
exports.Command = Command;
|
|
1867
|
-
exports.Option = Option;
|
|
1868
|
-
exports.Argument = Argument;
|
|
1869
|
-
exports.Help = Help;
|
|
1870
|
-
exports.CommanderError = CommanderError;
|
|
1871
|
-
exports.InvalidArgumentError = InvalidArgumentError;
|
|
1872
|
-
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
1873
|
-
});
|
|
1874
|
-
|
|
1875
|
-
// ../../node_modules/commander/esm.mjs
|
|
1876
|
-
var import__ = __toESM(require_commander(), 1);
|
|
1877
|
-
var {
|
|
1878
|
-
program,
|
|
1879
|
-
createCommand,
|
|
1880
|
-
createArgument,
|
|
1881
|
-
createOption,
|
|
1882
|
-
CommanderError,
|
|
1883
|
-
InvalidArgumentError,
|
|
1884
|
-
InvalidOptionArgumentError,
|
|
1885
|
-
Command,
|
|
1886
|
-
Argument,
|
|
1887
|
-
Option,
|
|
1888
|
-
Help
|
|
1889
|
-
} = import__.default;
|
|
1890
|
-
|
|
1891
|
-
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1892
|
-
var ANSI_BACKGROUND_OFFSET = 10;
|
|
1893
|
-
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
1894
|
-
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
1895
|
-
var wrapAnsi16m = (offset = 0) => (red, green, blue) => `\x1B[${38 + offset};2;${red};${green};${blue}m`;
|
|
1896
|
-
var styles = {
|
|
1897
|
-
modifier: {
|
|
1898
|
-
reset: [0, 0],
|
|
1899
|
-
bold: [1, 22],
|
|
1900
|
-
dim: [2, 22],
|
|
1901
|
-
italic: [3, 23],
|
|
1902
|
-
underline: [4, 24],
|
|
1903
|
-
overline: [53, 55],
|
|
1904
|
-
inverse: [7, 27],
|
|
1905
|
-
hidden: [8, 28],
|
|
1906
|
-
strikethrough: [9, 29]
|
|
1907
|
-
},
|
|
1908
|
-
color: {
|
|
1909
|
-
black: [30, 39],
|
|
1910
|
-
red: [31, 39],
|
|
1911
|
-
green: [32, 39],
|
|
1912
|
-
yellow: [33, 39],
|
|
1913
|
-
blue: [34, 39],
|
|
1914
|
-
magenta: [35, 39],
|
|
1915
|
-
cyan: [36, 39],
|
|
1916
|
-
white: [37, 39],
|
|
1917
|
-
blackBright: [90, 39],
|
|
1918
|
-
gray: [90, 39],
|
|
1919
|
-
grey: [90, 39],
|
|
1920
|
-
redBright: [91, 39],
|
|
1921
|
-
greenBright: [92, 39],
|
|
1922
|
-
yellowBright: [93, 39],
|
|
1923
|
-
blueBright: [94, 39],
|
|
1924
|
-
magentaBright: [95, 39],
|
|
1925
|
-
cyanBright: [96, 39],
|
|
1926
|
-
whiteBright: [97, 39]
|
|
1927
|
-
},
|
|
1928
|
-
bgColor: {
|
|
1929
|
-
bgBlack: [40, 49],
|
|
1930
|
-
bgRed: [41, 49],
|
|
1931
|
-
bgGreen: [42, 49],
|
|
1932
|
-
bgYellow: [43, 49],
|
|
1933
|
-
bgBlue: [44, 49],
|
|
1934
|
-
bgMagenta: [45, 49],
|
|
1935
|
-
bgCyan: [46, 49],
|
|
1936
|
-
bgWhite: [47, 49],
|
|
1937
|
-
bgBlackBright: [100, 49],
|
|
1938
|
-
bgGray: [100, 49],
|
|
1939
|
-
bgGrey: [100, 49],
|
|
1940
|
-
bgRedBright: [101, 49],
|
|
1941
|
-
bgGreenBright: [102, 49],
|
|
1942
|
-
bgYellowBright: [103, 49],
|
|
1943
|
-
bgBlueBright: [104, 49],
|
|
1944
|
-
bgMagentaBright: [105, 49],
|
|
1945
|
-
bgCyanBright: [106, 49],
|
|
1946
|
-
bgWhiteBright: [107, 49]
|
|
1947
|
-
}
|
|
1948
|
-
};
|
|
1949
|
-
var modifierNames = Object.keys(styles.modifier);
|
|
1950
|
-
var foregroundColorNames = Object.keys(styles.color);
|
|
1951
|
-
var backgroundColorNames = Object.keys(styles.bgColor);
|
|
1952
|
-
var colorNames = [...foregroundColorNames, ...backgroundColorNames];
|
|
1953
|
-
function assembleStyles() {
|
|
1954
|
-
const codes = new Map;
|
|
1955
|
-
for (const [groupName, group] of Object.entries(styles)) {
|
|
1956
|
-
for (const [styleName, style] of Object.entries(group)) {
|
|
1957
|
-
styles[styleName] = {
|
|
1958
|
-
open: `\x1B[${style[0]}m`,
|
|
1959
|
-
close: `\x1B[${style[1]}m`
|
|
1960
|
-
};
|
|
1961
|
-
group[styleName] = styles[styleName];
|
|
1962
|
-
codes.set(style[0], style[1]);
|
|
1963
|
-
}
|
|
1964
|
-
Object.defineProperty(styles, groupName, {
|
|
1965
|
-
value: group,
|
|
1966
|
-
enumerable: false
|
|
1967
|
-
});
|
|
1968
|
-
}
|
|
1969
|
-
Object.defineProperty(styles, "codes", {
|
|
1970
|
-
value: codes,
|
|
1971
|
-
enumerable: false
|
|
1972
|
-
});
|
|
1973
|
-
styles.color.close = "\x1B[39m";
|
|
1974
|
-
styles.bgColor.close = "\x1B[49m";
|
|
1975
|
-
styles.color.ansi = wrapAnsi16();
|
|
1976
|
-
styles.color.ansi256 = wrapAnsi256();
|
|
1977
|
-
styles.color.ansi16m = wrapAnsi16m();
|
|
1978
|
-
styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET);
|
|
1979
|
-
styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);
|
|
1980
|
-
styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);
|
|
1981
|
-
Object.defineProperties(styles, {
|
|
1982
|
-
rgbToAnsi256: {
|
|
1983
|
-
value(red, green, blue) {
|
|
1984
|
-
if (red === green && green === blue) {
|
|
1985
|
-
if (red < 8) {
|
|
1986
|
-
return 16;
|
|
1987
|
-
}
|
|
1988
|
-
if (red > 248) {
|
|
1989
|
-
return 231;
|
|
1990
|
-
}
|
|
1991
|
-
return Math.round((red - 8) / 247 * 24) + 232;
|
|
1992
|
-
}
|
|
1993
|
-
return 16 + 36 * Math.round(red / 255 * 5) + 6 * Math.round(green / 255 * 5) + Math.round(blue / 255 * 5);
|
|
1994
|
-
},
|
|
1995
|
-
enumerable: false
|
|
1996
|
-
},
|
|
1997
|
-
hexToRgb: {
|
|
1998
|
-
value(hex) {
|
|
1999
|
-
const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16));
|
|
2000
|
-
if (!matches) {
|
|
2001
|
-
return [0, 0, 0];
|
|
2002
|
-
}
|
|
2003
|
-
let [colorString] = matches;
|
|
2004
|
-
if (colorString.length === 3) {
|
|
2005
|
-
colorString = [...colorString].map((character) => character + character).join("");
|
|
2006
|
-
}
|
|
2007
|
-
const integer = Number.parseInt(colorString, 16);
|
|
2008
|
-
return [
|
|
2009
|
-
integer >> 16 & 255,
|
|
2010
|
-
integer >> 8 & 255,
|
|
2011
|
-
integer & 255
|
|
2012
|
-
];
|
|
2013
|
-
},
|
|
2014
|
-
enumerable: false
|
|
2015
|
-
},
|
|
2016
|
-
hexToAnsi256: {
|
|
2017
|
-
value: (hex) => styles.rgbToAnsi256(...styles.hexToRgb(hex)),
|
|
2018
|
-
enumerable: false
|
|
2019
|
-
},
|
|
2020
|
-
ansi256ToAnsi: {
|
|
2021
|
-
value(code) {
|
|
2022
|
-
if (code < 8) {
|
|
2023
|
-
return 30 + code;
|
|
2024
|
-
}
|
|
2025
|
-
if (code < 16) {
|
|
2026
|
-
return 90 + (code - 8);
|
|
2027
|
-
}
|
|
2028
|
-
let red;
|
|
2029
|
-
let green;
|
|
2030
|
-
let blue;
|
|
2031
|
-
if (code >= 232) {
|
|
2032
|
-
red = ((code - 232) * 10 + 8) / 255;
|
|
2033
|
-
green = red;
|
|
2034
|
-
blue = red;
|
|
2035
|
-
} else {
|
|
2036
|
-
code -= 16;
|
|
2037
|
-
const remainder = code % 36;
|
|
2038
|
-
red = Math.floor(code / 36) / 5;
|
|
2039
|
-
green = Math.floor(remainder / 6) / 5;
|
|
2040
|
-
blue = remainder % 6 / 5;
|
|
2041
|
-
}
|
|
2042
|
-
const value = Math.max(red, green, blue) * 2;
|
|
2043
|
-
if (value === 0) {
|
|
2044
|
-
return 30;
|
|
2045
|
-
}
|
|
2046
|
-
let result = 30 + (Math.round(blue) << 2 | Math.round(green) << 1 | Math.round(red));
|
|
2047
|
-
if (value === 2) {
|
|
2048
|
-
result += 60;
|
|
2049
|
-
}
|
|
2050
|
-
return result;
|
|
2051
|
-
},
|
|
2052
|
-
enumerable: false
|
|
2053
|
-
},
|
|
2054
|
-
rgbToAnsi: {
|
|
2055
|
-
value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)),
|
|
2056
|
-
enumerable: false
|
|
2057
|
-
},
|
|
2058
|
-
hexToAnsi: {
|
|
2059
|
-
value: (hex) => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)),
|
|
2060
|
-
enumerable: false
|
|
2061
|
-
}
|
|
2062
|
-
});
|
|
2063
|
-
return styles;
|
|
2064
|
-
}
|
|
2065
|
-
var ansiStyles = assembleStyles();
|
|
2066
|
-
var ansi_styles_default = ansiStyles;
|
|
2067
|
-
|
|
2068
|
-
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
2069
|
-
import process2 from "process";
|
|
2070
|
-
import os from "os";
|
|
2071
|
-
import tty from "tty";
|
|
2072
|
-
function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
|
|
2073
|
-
const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
|
|
2074
|
-
const position = argv.indexOf(prefix + flag);
|
|
2075
|
-
const terminatorPosition = argv.indexOf("--");
|
|
2076
|
-
return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
|
|
2077
|
-
}
|
|
2078
|
-
var { env } = process2;
|
|
2079
|
-
var flagForceColor;
|
|
2080
|
-
if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
|
|
2081
|
-
flagForceColor = 0;
|
|
2082
|
-
} else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
|
|
2083
|
-
flagForceColor = 1;
|
|
2084
|
-
}
|
|
2085
|
-
function envForceColor() {
|
|
2086
|
-
if ("FORCE_COLOR" in env) {
|
|
2087
|
-
if (env.FORCE_COLOR === "true") {
|
|
2088
|
-
return 1;
|
|
2089
|
-
}
|
|
2090
|
-
if (env.FORCE_COLOR === "false") {
|
|
2091
|
-
return 0;
|
|
2092
|
-
}
|
|
2093
|
-
return env.FORCE_COLOR.length === 0 ? 1 : Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
|
|
2094
|
-
}
|
|
2095
|
-
}
|
|
2096
|
-
function translateLevel(level) {
|
|
2097
|
-
if (level === 0) {
|
|
2098
|
-
return false;
|
|
2099
|
-
}
|
|
2100
|
-
return {
|
|
2101
|
-
level,
|
|
2102
|
-
hasBasic: true,
|
|
2103
|
-
has256: level >= 2,
|
|
2104
|
-
has16m: level >= 3
|
|
2105
|
-
};
|
|
2106
|
-
}
|
|
2107
|
-
function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
2108
|
-
const noFlagForceColor = envForceColor();
|
|
2109
|
-
if (noFlagForceColor !== undefined) {
|
|
2110
|
-
flagForceColor = noFlagForceColor;
|
|
2111
|
-
}
|
|
2112
|
-
const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
|
|
2113
|
-
if (forceColor === 0) {
|
|
2114
|
-
return 0;
|
|
2115
|
-
}
|
|
2116
|
-
if (sniffFlags) {
|
|
2117
|
-
if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
|
|
2118
|
-
return 3;
|
|
2119
|
-
}
|
|
2120
|
-
if (hasFlag("color=256")) {
|
|
2121
|
-
return 2;
|
|
2122
|
-
}
|
|
2123
|
-
}
|
|
2124
|
-
if ("TF_BUILD" in env && "AGENT_NAME" in env) {
|
|
2125
|
-
return 1;
|
|
2126
|
-
}
|
|
2127
|
-
if (haveStream && !streamIsTTY && forceColor === undefined) {
|
|
2128
|
-
return 0;
|
|
2129
|
-
}
|
|
2130
|
-
const min = forceColor || 0;
|
|
2131
|
-
if (env.TERM === "dumb") {
|
|
2132
|
-
return min;
|
|
2133
|
-
}
|
|
2134
|
-
if (process2.platform === "win32") {
|
|
2135
|
-
const osRelease = os.release().split(".");
|
|
2136
|
-
if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
|
|
2137
|
-
return Number(osRelease[2]) >= 14931 ? 3 : 2;
|
|
2138
|
-
}
|
|
2139
|
-
return 1;
|
|
2140
|
-
}
|
|
2141
|
-
if ("CI" in env) {
|
|
2142
|
-
if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => (key in env))) {
|
|
2143
|
-
return 3;
|
|
2144
|
-
}
|
|
2145
|
-
if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => (sign in env)) || env.CI_NAME === "codeship") {
|
|
2146
|
-
return 1;
|
|
2147
|
-
}
|
|
2148
|
-
return min;
|
|
2149
|
-
}
|
|
2150
|
-
if ("TEAMCITY_VERSION" in env) {
|
|
2151
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
|
|
2152
|
-
}
|
|
2153
|
-
if (env.COLORTERM === "truecolor") {
|
|
2154
|
-
return 3;
|
|
2155
|
-
}
|
|
2156
|
-
if (env.TERM === "xterm-kitty") {
|
|
2157
|
-
return 3;
|
|
2158
|
-
}
|
|
2159
|
-
if (env.TERM === "xterm-ghostty") {
|
|
2160
|
-
return 3;
|
|
2161
|
-
}
|
|
2162
|
-
if (env.TERM === "wezterm") {
|
|
2163
|
-
return 3;
|
|
2164
|
-
}
|
|
2165
|
-
if ("TERM_PROGRAM" in env) {
|
|
2166
|
-
const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
|
2167
|
-
switch (env.TERM_PROGRAM) {
|
|
2168
|
-
case "iTerm.app": {
|
|
2169
|
-
return version >= 3 ? 3 : 2;
|
|
2170
|
-
}
|
|
2171
|
-
case "Apple_Terminal": {
|
|
2172
|
-
return 2;
|
|
2173
|
-
}
|
|
2174
|
-
}
|
|
2175
|
-
}
|
|
2176
|
-
if (/-256(color)?$/i.test(env.TERM)) {
|
|
2177
|
-
return 2;
|
|
2178
|
-
}
|
|
2179
|
-
if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
|
|
2180
|
-
return 1;
|
|
2181
|
-
}
|
|
2182
|
-
if ("COLORTERM" in env) {
|
|
2183
|
-
return 1;
|
|
2184
|
-
}
|
|
2185
|
-
return min;
|
|
2186
|
-
}
|
|
2187
|
-
function createSupportsColor(stream, options = {}) {
|
|
2188
|
-
const level = _supportsColor(stream, {
|
|
2189
|
-
streamIsTTY: stream && stream.isTTY,
|
|
2190
|
-
...options
|
|
2191
|
-
});
|
|
2192
|
-
return translateLevel(level);
|
|
2193
|
-
}
|
|
2194
|
-
var supportsColor = {
|
|
2195
|
-
stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
|
|
2196
|
-
stderr: createSupportsColor({ isTTY: tty.isatty(2) })
|
|
2197
|
-
};
|
|
2198
|
-
var supports_color_default = supportsColor;
|
|
2199
|
-
|
|
2200
|
-
// ../../node_modules/chalk/source/utilities.js
|
|
2201
|
-
function stringReplaceAll(string, substring, replacer) {
|
|
2202
|
-
let index = string.indexOf(substring);
|
|
2203
|
-
if (index === -1) {
|
|
2204
|
-
return string;
|
|
2205
|
-
}
|
|
2206
|
-
const substringLength = substring.length;
|
|
2207
|
-
let endIndex = 0;
|
|
2208
|
-
let returnValue = "";
|
|
2209
|
-
do {
|
|
2210
|
-
returnValue += string.slice(endIndex, index) + substring + replacer;
|
|
2211
|
-
endIndex = index + substringLength;
|
|
2212
|
-
index = string.indexOf(substring, endIndex);
|
|
2213
|
-
} while (index !== -1);
|
|
2214
|
-
returnValue += string.slice(endIndex);
|
|
2215
|
-
return returnValue;
|
|
2216
|
-
}
|
|
2217
|
-
function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
2218
|
-
let endIndex = 0;
|
|
2219
|
-
let returnValue = "";
|
|
2220
|
-
do {
|
|
2221
|
-
const gotCR = string[index - 1] === "\r";
|
|
2222
|
-
returnValue += string.slice(endIndex, gotCR ? index - 1 : index) + prefix + (gotCR ? `\r
|
|
2223
|
-
` : `
|
|
2224
|
-
`) + postfix;
|
|
2225
|
-
endIndex = index + 1;
|
|
2226
|
-
index = string.indexOf(`
|
|
2227
|
-
`, endIndex);
|
|
2228
|
-
} while (index !== -1);
|
|
2229
|
-
returnValue += string.slice(endIndex);
|
|
2230
|
-
return returnValue;
|
|
2231
|
-
}
|
|
2232
|
-
|
|
2233
|
-
// ../../node_modules/chalk/source/index.js
|
|
2234
|
-
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
2235
|
-
var GENERATOR = Symbol("GENERATOR");
|
|
2236
|
-
var STYLER = Symbol("STYLER");
|
|
2237
|
-
var IS_EMPTY = Symbol("IS_EMPTY");
|
|
2238
|
-
var levelMapping = [
|
|
2239
|
-
"ansi",
|
|
2240
|
-
"ansi",
|
|
2241
|
-
"ansi256",
|
|
2242
|
-
"ansi16m"
|
|
2243
|
-
];
|
|
2244
|
-
var styles2 = Object.create(null);
|
|
2245
|
-
var applyOptions = (object, options = {}) => {
|
|
2246
|
-
if (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {
|
|
2247
|
-
throw new Error("The `level` option should be an integer from 0 to 3");
|
|
2248
|
-
}
|
|
2249
|
-
const colorLevel = stdoutColor ? stdoutColor.level : 0;
|
|
2250
|
-
object.level = options.level === undefined ? colorLevel : options.level;
|
|
2251
|
-
};
|
|
2252
|
-
var chalkFactory = (options) => {
|
|
2253
|
-
const chalk = (...strings) => strings.join(" ");
|
|
2254
|
-
applyOptions(chalk, options);
|
|
2255
|
-
Object.setPrototypeOf(chalk, createChalk.prototype);
|
|
2256
|
-
return chalk;
|
|
2257
|
-
};
|
|
2258
|
-
function createChalk(options) {
|
|
2259
|
-
return chalkFactory(options);
|
|
2260
|
-
}
|
|
2261
|
-
Object.setPrototypeOf(createChalk.prototype, Function.prototype);
|
|
2262
|
-
for (const [styleName, style] of Object.entries(ansi_styles_default)) {
|
|
2263
|
-
styles2[styleName] = {
|
|
2264
|
-
get() {
|
|
2265
|
-
const builder = createBuilder(this, createStyler(style.open, style.close, this[STYLER]), this[IS_EMPTY]);
|
|
2266
|
-
Object.defineProperty(this, styleName, { value: builder });
|
|
2267
|
-
return builder;
|
|
2268
|
-
}
|
|
2269
|
-
};
|
|
2270
|
-
}
|
|
2271
|
-
styles2.visible = {
|
|
2272
|
-
get() {
|
|
2273
|
-
const builder = createBuilder(this, this[STYLER], true);
|
|
2274
|
-
Object.defineProperty(this, "visible", { value: builder });
|
|
2275
|
-
return builder;
|
|
2276
|
-
}
|
|
2277
|
-
};
|
|
2278
|
-
var getModelAnsi = (model, level, type, ...arguments_) => {
|
|
2279
|
-
if (model === "rgb") {
|
|
2280
|
-
if (level === "ansi16m") {
|
|
2281
|
-
return ansi_styles_default[type].ansi16m(...arguments_);
|
|
2282
|
-
}
|
|
2283
|
-
if (level === "ansi256") {
|
|
2284
|
-
return ansi_styles_default[type].ansi256(ansi_styles_default.rgbToAnsi256(...arguments_));
|
|
2285
|
-
}
|
|
2286
|
-
return ansi_styles_default[type].ansi(ansi_styles_default.rgbToAnsi(...arguments_));
|
|
2287
|
-
}
|
|
2288
|
-
if (model === "hex") {
|
|
2289
|
-
return getModelAnsi("rgb", level, type, ...ansi_styles_default.hexToRgb(...arguments_));
|
|
2290
|
-
}
|
|
2291
|
-
return ansi_styles_default[type][model](...arguments_);
|
|
2292
|
-
};
|
|
2293
|
-
var usedModels = ["rgb", "hex", "ansi256"];
|
|
2294
|
-
for (const model of usedModels) {
|
|
2295
|
-
styles2[model] = {
|
|
2296
|
-
get() {
|
|
2297
|
-
const { level } = this;
|
|
2298
|
-
return function(...arguments_) {
|
|
2299
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "color", ...arguments_), ansi_styles_default.color.close, this[STYLER]);
|
|
2300
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2301
|
-
};
|
|
2302
|
-
}
|
|
2303
|
-
};
|
|
2304
|
-
const bgModel = "bg" + model[0].toUpperCase() + model.slice(1);
|
|
2305
|
-
styles2[bgModel] = {
|
|
2306
|
-
get() {
|
|
2307
|
-
const { level } = this;
|
|
2308
|
-
return function(...arguments_) {
|
|
2309
|
-
const styler = createStyler(getModelAnsi(model, levelMapping[level], "bgColor", ...arguments_), ansi_styles_default.bgColor.close, this[STYLER]);
|
|
2310
|
-
return createBuilder(this, styler, this[IS_EMPTY]);
|
|
2311
|
-
};
|
|
2312
|
-
}
|
|
2313
|
-
};
|
|
2314
|
-
}
|
|
2315
|
-
var proto = Object.defineProperties(() => {}, {
|
|
2316
|
-
...styles2,
|
|
2317
|
-
level: {
|
|
2318
|
-
enumerable: true,
|
|
2319
|
-
get() {
|
|
2320
|
-
return this[GENERATOR].level;
|
|
2321
|
-
},
|
|
2322
|
-
set(level) {
|
|
2323
|
-
this[GENERATOR].level = level;
|
|
2324
|
-
}
|
|
2325
|
-
}
|
|
2326
|
-
});
|
|
2327
|
-
var createStyler = (open, close, parent) => {
|
|
2328
|
-
let openAll;
|
|
2329
|
-
let closeAll;
|
|
2330
|
-
if (parent === undefined) {
|
|
2331
|
-
openAll = open;
|
|
2332
|
-
closeAll = close;
|
|
2333
|
-
} else {
|
|
2334
|
-
openAll = parent.openAll + open;
|
|
2335
|
-
closeAll = close + parent.closeAll;
|
|
2336
|
-
}
|
|
2337
|
-
return {
|
|
2338
|
-
open,
|
|
2339
|
-
close,
|
|
2340
|
-
openAll,
|
|
2341
|
-
closeAll,
|
|
2342
|
-
parent
|
|
2343
|
-
};
|
|
2344
|
-
};
|
|
2345
|
-
var createBuilder = (self, _styler, _isEmpty) => {
|
|
2346
|
-
const builder = (...arguments_) => applyStyle(builder, arguments_.length === 1 ? "" + arguments_[0] : arguments_.join(" "));
|
|
2347
|
-
Object.setPrototypeOf(builder, proto);
|
|
2348
|
-
builder[GENERATOR] = self;
|
|
2349
|
-
builder[STYLER] = _styler;
|
|
2350
|
-
builder[IS_EMPTY] = _isEmpty;
|
|
2351
|
-
return builder;
|
|
2352
|
-
};
|
|
2353
|
-
var applyStyle = (self, string) => {
|
|
2354
|
-
if (self.level <= 0 || !string) {
|
|
2355
|
-
return self[IS_EMPTY] ? "" : string;
|
|
2356
|
-
}
|
|
2357
|
-
let styler = self[STYLER];
|
|
2358
|
-
if (styler === undefined) {
|
|
2359
|
-
return string;
|
|
2360
|
-
}
|
|
2361
|
-
const { openAll, closeAll } = styler;
|
|
2362
|
-
if (string.includes("\x1B")) {
|
|
2363
|
-
while (styler !== undefined) {
|
|
2364
|
-
string = stringReplaceAll(string, styler.close, styler.open);
|
|
2365
|
-
styler = styler.parent;
|
|
2366
|
-
}
|
|
2367
|
-
}
|
|
2368
|
-
const lfIndex = string.indexOf(`
|
|
2369
|
-
`);
|
|
2370
|
-
if (lfIndex !== -1) {
|
|
2371
|
-
string = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);
|
|
2372
|
-
}
|
|
2373
|
-
return openAll + string + closeAll;
|
|
2374
|
-
};
|
|
2375
|
-
Object.defineProperties(createChalk.prototype, styles2);
|
|
2376
|
-
var chalk = createChalk();
|
|
2377
|
-
var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
2378
|
-
var source_default = chalk;
|
|
2379
|
-
|
|
2380
|
-
// ../../node_modules/open/index.js
|
|
2381
|
-
import process9 from "process";
|
|
2382
|
-
import path from "path";
|
|
2383
|
-
import { fileURLToPath } from "url";
|
|
2384
|
-
import childProcess3 from "child_process";
|
|
2385
|
-
import fs5, { constants as fsConstants2 } from "fs/promises";
|
|
2386
|
-
|
|
2387
|
-
// ../../node_modules/wsl-utils/index.js
|
|
2388
|
-
import { promisify as promisify2 } from "util";
|
|
2389
|
-
import childProcess2 from "child_process";
|
|
2390
|
-
import fs4, { constants as fsConstants } from "fs/promises";
|
|
2391
|
-
|
|
2392
|
-
// ../../node_modules/is-wsl/index.js
|
|
2393
|
-
import process3 from "process";
|
|
2394
|
-
import os2 from "os";
|
|
2395
|
-
import fs3 from "fs";
|
|
2396
|
-
|
|
2397
|
-
// ../../node_modules/is-inside-container/index.js
|
|
2398
|
-
import fs2 from "fs";
|
|
2399
|
-
|
|
2400
|
-
// ../../node_modules/is-docker/index.js
|
|
2401
|
-
import fs from "fs";
|
|
2402
|
-
var isDockerCached;
|
|
2403
|
-
function hasDockerEnv() {
|
|
2404
|
-
try {
|
|
2405
|
-
fs.statSync("/.dockerenv");
|
|
2406
|
-
return true;
|
|
2407
|
-
} catch {
|
|
2408
|
-
return false;
|
|
2409
|
-
}
|
|
2410
|
-
}
|
|
2411
|
-
function hasDockerCGroup() {
|
|
2412
|
-
try {
|
|
2413
|
-
return fs.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
|
|
2414
|
-
} catch {
|
|
2415
|
-
return false;
|
|
2416
|
-
}
|
|
2417
|
-
}
|
|
2418
|
-
function isDocker() {
|
|
2419
|
-
if (isDockerCached === undefined) {
|
|
2420
|
-
isDockerCached = hasDockerEnv() || hasDockerCGroup();
|
|
2421
|
-
}
|
|
2422
|
-
return isDockerCached;
|
|
2423
|
-
}
|
|
2424
|
-
|
|
2425
|
-
// ../../node_modules/is-inside-container/index.js
|
|
2426
|
-
var cachedResult;
|
|
2427
|
-
var hasContainerEnv = () => {
|
|
2428
|
-
try {
|
|
2429
|
-
fs2.statSync("/run/.containerenv");
|
|
2430
|
-
return true;
|
|
2431
|
-
} catch {
|
|
2432
|
-
return false;
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
function isInsideContainer() {
|
|
2436
|
-
if (cachedResult === undefined) {
|
|
2437
|
-
cachedResult = hasContainerEnv() || isDocker();
|
|
2438
|
-
}
|
|
2439
|
-
return cachedResult;
|
|
2440
|
-
}
|
|
2441
|
-
|
|
2442
|
-
// ../../node_modules/is-wsl/index.js
|
|
2443
|
-
var isWsl = () => {
|
|
2444
|
-
if (process3.platform !== "linux") {
|
|
2445
|
-
return false;
|
|
2446
|
-
}
|
|
2447
|
-
if (os2.release().toLowerCase().includes("microsoft")) {
|
|
2448
|
-
if (isInsideContainer()) {
|
|
2449
|
-
return false;
|
|
2450
|
-
}
|
|
2451
|
-
return true;
|
|
2452
|
-
}
|
|
2453
|
-
try {
|
|
2454
|
-
if (fs3.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft")) {
|
|
2455
|
-
return !isInsideContainer();
|
|
2456
|
-
}
|
|
2457
|
-
} catch {}
|
|
2458
|
-
if (fs3.existsSync("/proc/sys/fs/binfmt_misc/WSLInterop") || fs3.existsSync("/run/WSL")) {
|
|
2459
|
-
return !isInsideContainer();
|
|
2460
|
-
}
|
|
2461
|
-
return false;
|
|
2462
|
-
};
|
|
2463
|
-
var is_wsl_default = process3.env.__IS_WSL_TEST__ ? isWsl : isWsl();
|
|
2464
|
-
|
|
2465
|
-
// ../../node_modules/powershell-utils/index.js
|
|
2466
|
-
import process4 from "process";
|
|
2467
|
-
import { Buffer as Buffer2 } from "buffer";
|
|
2468
|
-
import { promisify } from "util";
|
|
2469
|
-
import childProcess from "child_process";
|
|
2470
|
-
var execFile = promisify(childProcess.execFile);
|
|
2471
|
-
var powerShellPath = () => `${process4.env.SYSTEMROOT || process4.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
|
|
2472
|
-
var executePowerShell = async (command, options = {}) => {
|
|
2473
|
-
const {
|
|
2474
|
-
powerShellPath: psPath,
|
|
2475
|
-
...execFileOptions
|
|
2476
|
-
} = options;
|
|
2477
|
-
const encodedCommand = executePowerShell.encodeCommand(command);
|
|
2478
|
-
return execFile(psPath ?? powerShellPath(), [
|
|
2479
|
-
...executePowerShell.argumentsPrefix,
|
|
2480
|
-
encodedCommand
|
|
2481
|
-
], {
|
|
2482
|
-
encoding: "utf8",
|
|
2483
|
-
...execFileOptions
|
|
2484
|
-
});
|
|
2485
|
-
};
|
|
2486
|
-
executePowerShell.argumentsPrefix = [
|
|
2487
|
-
"-NoProfile",
|
|
2488
|
-
"-NonInteractive",
|
|
2489
|
-
"-ExecutionPolicy",
|
|
2490
|
-
"Bypass",
|
|
2491
|
-
"-EncodedCommand"
|
|
2492
|
-
];
|
|
2493
|
-
executePowerShell.encodeCommand = (command) => Buffer2.from(command, "utf16le").toString("base64");
|
|
2494
|
-
executePowerShell.escapeArgument = (value) => `'${String(value).replaceAll("'", "''")}'`;
|
|
2495
|
-
|
|
2496
|
-
// ../../node_modules/wsl-utils/utilities.js
|
|
2497
|
-
function parseMountPointFromConfig(content) {
|
|
2498
|
-
for (const line of content.split(`
|
|
2499
|
-
`)) {
|
|
2500
|
-
if (/^\s*#/.test(line)) {
|
|
2501
|
-
continue;
|
|
2502
|
-
}
|
|
2503
|
-
const match = /^\s*root\s*=\s*(?<mountPoint>"[^"]*"|'[^']*'|[^#]*)/.exec(line);
|
|
2504
|
-
if (!match) {
|
|
2505
|
-
continue;
|
|
2506
|
-
}
|
|
2507
|
-
return match.groups.mountPoint.trim().replaceAll(/^["']|["']$/g, "");
|
|
2508
|
-
}
|
|
2509
|
-
}
|
|
2510
|
-
|
|
2511
|
-
// ../../node_modules/wsl-utils/index.js
|
|
2512
|
-
var execFile2 = promisify2(childProcess2.execFile);
|
|
2513
|
-
var wslDrivesMountPoint = (() => {
|
|
2514
|
-
const defaultMountPoint = "/mnt/";
|
|
2515
|
-
let mountPoint;
|
|
2516
|
-
return async function() {
|
|
2517
|
-
if (mountPoint) {
|
|
2518
|
-
return mountPoint;
|
|
2519
|
-
}
|
|
2520
|
-
const configFilePath = "/etc/wsl.conf";
|
|
2521
|
-
let isConfigFileExists = false;
|
|
2522
|
-
try {
|
|
2523
|
-
await fs4.access(configFilePath, fsConstants.F_OK);
|
|
2524
|
-
isConfigFileExists = true;
|
|
2525
|
-
} catch {}
|
|
2526
|
-
if (!isConfigFileExists) {
|
|
2527
|
-
return defaultMountPoint;
|
|
2528
|
-
}
|
|
2529
|
-
const configContent = await fs4.readFile(configFilePath, { encoding: "utf8" });
|
|
2530
|
-
const parsedMountPoint = parseMountPointFromConfig(configContent);
|
|
2531
|
-
if (parsedMountPoint === undefined) {
|
|
2532
|
-
return defaultMountPoint;
|
|
2533
|
-
}
|
|
2534
|
-
mountPoint = parsedMountPoint;
|
|
2535
|
-
mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
|
|
2536
|
-
return mountPoint;
|
|
2537
|
-
};
|
|
2538
|
-
})();
|
|
2539
|
-
var powerShellPathFromWsl = async () => {
|
|
2540
|
-
const mountPoint = await wslDrivesMountPoint();
|
|
2541
|
-
return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
|
|
2542
|
-
};
|
|
2543
|
-
var powerShellPath2 = is_wsl_default ? powerShellPathFromWsl : powerShellPath;
|
|
2544
|
-
var canAccessPowerShellPromise;
|
|
2545
|
-
var canAccessPowerShell = async () => {
|
|
2546
|
-
canAccessPowerShellPromise ??= (async () => {
|
|
2547
|
-
try {
|
|
2548
|
-
const psPath = await powerShellPath2();
|
|
2549
|
-
await fs4.access(psPath, fsConstants.X_OK);
|
|
2550
|
-
return true;
|
|
2551
|
-
} catch {
|
|
2552
|
-
return false;
|
|
2553
|
-
}
|
|
2554
|
-
})();
|
|
2555
|
-
return canAccessPowerShellPromise;
|
|
2556
|
-
};
|
|
2557
|
-
var wslDefaultBrowser = async () => {
|
|
2558
|
-
const psPath = await powerShellPath2();
|
|
2559
|
-
const command = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
|
|
2560
|
-
const { stdout } = await executePowerShell(command, { powerShellPath: psPath });
|
|
2561
|
-
return stdout.trim();
|
|
2562
|
-
};
|
|
2563
|
-
var convertWslPathToWindows = async (path) => {
|
|
2564
|
-
if (/^[a-z]+:\/\//i.test(path)) {
|
|
2565
|
-
return path;
|
|
2566
|
-
}
|
|
2567
|
-
try {
|
|
2568
|
-
const { stdout } = await execFile2("wslpath", ["-aw", path], { encoding: "utf8" });
|
|
2569
|
-
return stdout.trim();
|
|
2570
|
-
} catch {
|
|
2571
|
-
return path;
|
|
2572
|
-
}
|
|
2573
|
-
};
|
|
2574
|
-
|
|
2575
|
-
// ../../node_modules/define-lazy-prop/index.js
|
|
2576
|
-
function defineLazyProperty(object, propertyName, valueGetter) {
|
|
2577
|
-
const define = (value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true });
|
|
2578
|
-
Object.defineProperty(object, propertyName, {
|
|
2579
|
-
configurable: true,
|
|
2580
|
-
enumerable: true,
|
|
2581
|
-
get() {
|
|
2582
|
-
const result = valueGetter();
|
|
2583
|
-
define(result);
|
|
2584
|
-
return result;
|
|
2585
|
-
},
|
|
2586
|
-
set(value) {
|
|
2587
|
-
define(value);
|
|
2588
|
-
}
|
|
2589
|
-
});
|
|
2590
|
-
return object;
|
|
2591
|
-
}
|
|
2592
|
-
|
|
2593
|
-
// ../../node_modules/default-browser/index.js
|
|
2594
|
-
import { promisify as promisify6 } from "util";
|
|
2595
|
-
import process7 from "process";
|
|
2596
|
-
import { execFile as execFile6 } from "child_process";
|
|
2597
|
-
|
|
2598
|
-
// ../../node_modules/default-browser-id/index.js
|
|
2599
|
-
import { promisify as promisify3 } from "util";
|
|
2600
|
-
import process5 from "process";
|
|
2601
|
-
import { execFile as execFile3 } from "child_process";
|
|
2602
|
-
var execFileAsync = promisify3(execFile3);
|
|
2603
|
-
async function defaultBrowserId() {
|
|
2604
|
-
if (process5.platform !== "darwin") {
|
|
2605
|
-
throw new Error("macOS only");
|
|
2606
|
-
}
|
|
2607
|
-
const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
|
|
2608
|
-
const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
|
|
2609
|
-
const browserId = match?.groups.id ?? "com.apple.Safari";
|
|
2610
|
-
if (browserId === "com.apple.safari") {
|
|
2611
|
-
return "com.apple.Safari";
|
|
2612
|
-
}
|
|
2613
|
-
return browserId;
|
|
2614
|
-
}
|
|
2615
|
-
|
|
2616
|
-
// ../../node_modules/run-applescript/index.js
|
|
2617
|
-
import process6 from "process";
|
|
2618
|
-
import { promisify as promisify4 } from "util";
|
|
2619
|
-
import { execFile as execFile4, execFileSync } from "child_process";
|
|
2620
|
-
var execFileAsync2 = promisify4(execFile4);
|
|
2621
|
-
async function runAppleScript(script, { humanReadableOutput = true, signal } = {}) {
|
|
2622
|
-
if (process6.platform !== "darwin") {
|
|
2623
|
-
throw new Error("macOS only");
|
|
2624
|
-
}
|
|
2625
|
-
const outputArguments = humanReadableOutput ? [] : ["-ss"];
|
|
2626
|
-
const execOptions = {};
|
|
2627
|
-
if (signal) {
|
|
2628
|
-
execOptions.signal = signal;
|
|
2629
|
-
}
|
|
2630
|
-
const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments], execOptions);
|
|
2631
|
-
return stdout.trim();
|
|
2632
|
-
}
|
|
2633
|
-
|
|
2634
|
-
// ../../node_modules/bundle-name/index.js
|
|
2635
|
-
async function bundleName(bundleId) {
|
|
2636
|
-
return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
|
|
2637
|
-
tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
// ../../node_modules/default-browser/windows.js
|
|
2641
|
-
import { promisify as promisify5 } from "util";
|
|
2642
|
-
import { execFile as execFile5 } from "child_process";
|
|
2643
|
-
var execFileAsync3 = promisify5(execFile5);
|
|
2644
|
-
var windowsBrowserProgIds = {
|
|
2645
|
-
MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
|
|
2646
|
-
MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
|
|
2647
|
-
MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
|
|
2648
|
-
AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
|
|
2649
|
-
ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
|
|
2650
|
-
ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
|
|
2651
|
-
ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
|
|
2652
|
-
ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
|
|
2653
|
-
BraveHTML: { name: "Brave", id: "com.brave.Browser" },
|
|
2654
|
-
BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
|
|
2655
|
-
BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
|
|
2656
|
-
BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
|
|
2657
|
-
FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
|
|
2658
|
-
OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
|
|
2659
|
-
VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
|
|
2660
|
-
"IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
|
|
2661
|
-
};
|
|
2662
|
-
var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
|
|
2663
|
-
|
|
2664
|
-
class UnknownBrowserError extends Error {
|
|
2665
|
-
}
|
|
2666
|
-
async function defaultBrowser(_execFileAsync = execFileAsync3) {
|
|
2667
|
-
const { stdout } = await _execFileAsync("reg", [
|
|
2668
|
-
"QUERY",
|
|
2669
|
-
" HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
|
|
2670
|
-
"/v",
|
|
2671
|
-
"ProgId"
|
|
2672
|
-
]);
|
|
2673
|
-
const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
|
|
2674
|
-
if (!match) {
|
|
2675
|
-
throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
|
|
2676
|
-
}
|
|
2677
|
-
const { id } = match.groups;
|
|
2678
|
-
const dotIndex = id.lastIndexOf(".");
|
|
2679
|
-
const hyphenIndex = id.lastIndexOf("-");
|
|
2680
|
-
const baseIdByDot = dotIndex === -1 ? undefined : id.slice(0, dotIndex);
|
|
2681
|
-
const baseIdByHyphen = hyphenIndex === -1 ? undefined : id.slice(0, hyphenIndex);
|
|
2682
|
-
return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
|
|
2683
|
-
}
|
|
2684
|
-
|
|
2685
|
-
// ../../node_modules/default-browser/index.js
|
|
2686
|
-
var execFileAsync4 = promisify6(execFile6);
|
|
2687
|
-
var titleize = (string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase());
|
|
2688
|
-
async function defaultBrowser2() {
|
|
2689
|
-
if (process7.platform === "darwin") {
|
|
2690
|
-
const id = await defaultBrowserId();
|
|
2691
|
-
const name = await bundleName(id);
|
|
2692
|
-
return { name, id };
|
|
2693
|
-
}
|
|
2694
|
-
if (process7.platform === "linux") {
|
|
2695
|
-
const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
|
|
2696
|
-
const id = stdout.trim();
|
|
2697
|
-
const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
|
|
2698
|
-
return { name, id };
|
|
2699
|
-
}
|
|
2700
|
-
if (process7.platform === "win32") {
|
|
2701
|
-
return defaultBrowser();
|
|
2702
|
-
}
|
|
2703
|
-
throw new Error("Only macOS, Linux, and Windows are supported");
|
|
2704
|
-
}
|
|
2705
|
-
|
|
2706
|
-
// ../../node_modules/is-in-ssh/index.js
|
|
2707
|
-
import process8 from "process";
|
|
2708
|
-
var isInSsh = Boolean(process8.env.SSH_CONNECTION || process8.env.SSH_CLIENT || process8.env.SSH_TTY);
|
|
2709
|
-
var is_in_ssh_default = isInSsh;
|
|
2710
|
-
|
|
2711
|
-
// ../../node_modules/open/index.js
|
|
2712
|
-
var fallbackAttemptSymbol = Symbol("fallbackAttempt");
|
|
2713
|
-
var __dirname2 = import.meta.url ? path.dirname(fileURLToPath(import.meta.url)) : "";
|
|
2714
|
-
var localXdgOpenPath = path.join(__dirname2, "xdg-open");
|
|
2715
|
-
var { platform, arch } = process9;
|
|
2716
|
-
var tryEachApp = async (apps, opener) => {
|
|
2717
|
-
if (apps.length === 0) {
|
|
2718
|
-
return;
|
|
2719
|
-
}
|
|
2720
|
-
const errors = [];
|
|
2721
|
-
for (const app of apps) {
|
|
2722
|
-
try {
|
|
2723
|
-
return await opener(app);
|
|
2724
|
-
} catch (error) {
|
|
2725
|
-
errors.push(error);
|
|
2726
|
-
}
|
|
2727
|
-
}
|
|
2728
|
-
throw new AggregateError(errors, "Failed to open in all supported apps");
|
|
2729
|
-
};
|
|
2730
|
-
var baseOpen = async (options) => {
|
|
2731
|
-
options = {
|
|
2732
|
-
wait: false,
|
|
2733
|
-
background: false,
|
|
2734
|
-
newInstance: false,
|
|
2735
|
-
allowNonzeroExitCode: false,
|
|
2736
|
-
...options
|
|
2737
|
-
};
|
|
2738
|
-
const isFallbackAttempt = options[fallbackAttemptSymbol] === true;
|
|
2739
|
-
delete options[fallbackAttemptSymbol];
|
|
2740
|
-
if (Array.isArray(options.app)) {
|
|
2741
|
-
return tryEachApp(options.app, (singleApp) => baseOpen({
|
|
2742
|
-
...options,
|
|
2743
|
-
app: singleApp,
|
|
2744
|
-
[fallbackAttemptSymbol]: true
|
|
2745
|
-
}));
|
|
2746
|
-
}
|
|
2747
|
-
let { name: app, arguments: appArguments = [] } = options.app ?? {};
|
|
2748
|
-
appArguments = [...appArguments];
|
|
2749
|
-
if (Array.isArray(app)) {
|
|
2750
|
-
return tryEachApp(app, (appName) => baseOpen({
|
|
2751
|
-
...options,
|
|
2752
|
-
app: {
|
|
2753
|
-
name: appName,
|
|
2754
|
-
arguments: appArguments
|
|
2755
|
-
},
|
|
2756
|
-
[fallbackAttemptSymbol]: true
|
|
2757
|
-
}));
|
|
2758
|
-
}
|
|
2759
|
-
if (app === "browser" || app === "browserPrivate") {
|
|
2760
|
-
const ids = {
|
|
2761
|
-
"com.google.chrome": "chrome",
|
|
2762
|
-
"google-chrome.desktop": "chrome",
|
|
2763
|
-
"com.brave.browser": "brave",
|
|
2764
|
-
"org.mozilla.firefox": "firefox",
|
|
2765
|
-
"firefox.desktop": "firefox",
|
|
2766
|
-
"com.microsoft.msedge": "edge",
|
|
2767
|
-
"com.microsoft.edge": "edge",
|
|
2768
|
-
"com.microsoft.edgemac": "edge",
|
|
2769
|
-
"microsoft-edge.desktop": "edge",
|
|
2770
|
-
"com.apple.safari": "safari"
|
|
2771
|
-
};
|
|
2772
|
-
const flags = {
|
|
2773
|
-
chrome: "--incognito",
|
|
2774
|
-
brave: "--incognito",
|
|
2775
|
-
firefox: "--private-window",
|
|
2776
|
-
edge: "--inPrivate"
|
|
2777
|
-
};
|
|
2778
|
-
let browser;
|
|
2779
|
-
if (is_wsl_default) {
|
|
2780
|
-
const progId = await wslDefaultBrowser();
|
|
2781
|
-
const browserInfo = _windowsBrowserProgIdMap.get(progId);
|
|
2782
|
-
browser = browserInfo ?? {};
|
|
2783
|
-
} else {
|
|
2784
|
-
browser = await defaultBrowser2();
|
|
2785
|
-
}
|
|
2786
|
-
if (browser.id in ids) {
|
|
2787
|
-
const browserName = ids[browser.id.toLowerCase()];
|
|
2788
|
-
if (app === "browserPrivate") {
|
|
2789
|
-
if (browserName === "safari") {
|
|
2790
|
-
throw new Error("Safari doesn't support opening in private mode via command line");
|
|
2791
|
-
}
|
|
2792
|
-
appArguments.push(flags[browserName]);
|
|
2793
|
-
}
|
|
2794
|
-
return baseOpen({
|
|
2795
|
-
...options,
|
|
2796
|
-
app: {
|
|
2797
|
-
name: apps[browserName],
|
|
2798
|
-
arguments: appArguments
|
|
2799
|
-
}
|
|
2800
|
-
});
|
|
2801
|
-
}
|
|
2802
|
-
throw new Error(`${browser.name} is not supported as a default browser`);
|
|
2803
|
-
}
|
|
2804
|
-
let command;
|
|
2805
|
-
const cliArguments = [];
|
|
2806
|
-
const childProcessOptions = {};
|
|
2807
|
-
let shouldUseWindowsInWsl = false;
|
|
2808
|
-
if (is_wsl_default && !isInsideContainer() && !is_in_ssh_default && !app) {
|
|
2809
|
-
shouldUseWindowsInWsl = await canAccessPowerShell();
|
|
2810
|
-
}
|
|
2811
|
-
if (platform === "darwin") {
|
|
2812
|
-
command = "open";
|
|
2813
|
-
if (options.wait) {
|
|
2814
|
-
cliArguments.push("--wait-apps");
|
|
2815
|
-
}
|
|
2816
|
-
if (options.background) {
|
|
2817
|
-
cliArguments.push("--background");
|
|
2818
|
-
}
|
|
2819
|
-
if (options.newInstance) {
|
|
2820
|
-
cliArguments.push("--new");
|
|
2821
|
-
}
|
|
2822
|
-
if (app) {
|
|
2823
|
-
cliArguments.push("-a", app);
|
|
2824
|
-
}
|
|
2825
|
-
} else if (platform === "win32" || shouldUseWindowsInWsl) {
|
|
2826
|
-
command = await powerShellPath2();
|
|
2827
|
-
cliArguments.push(...executePowerShell.argumentsPrefix);
|
|
2828
|
-
if (!is_wsl_default) {
|
|
2829
|
-
childProcessOptions.windowsVerbatimArguments = true;
|
|
2830
|
-
}
|
|
2831
|
-
if (is_wsl_default && options.target) {
|
|
2832
|
-
options.target = await convertWslPathToWindows(options.target);
|
|
2833
|
-
}
|
|
2834
|
-
const encodedArguments = ["$ProgressPreference = 'SilentlyContinue';", "Start"];
|
|
2835
|
-
if (options.wait) {
|
|
2836
|
-
encodedArguments.push("-Wait");
|
|
2837
|
-
}
|
|
2838
|
-
if (app) {
|
|
2839
|
-
encodedArguments.push(executePowerShell.escapeArgument(app));
|
|
2840
|
-
if (options.target) {
|
|
2841
|
-
appArguments.push(options.target);
|
|
2842
|
-
}
|
|
2843
|
-
} else if (options.target) {
|
|
2844
|
-
encodedArguments.push(executePowerShell.escapeArgument(options.target));
|
|
2845
|
-
}
|
|
2846
|
-
if (appArguments.length > 0) {
|
|
2847
|
-
appArguments = appArguments.map((argument) => executePowerShell.escapeArgument(argument));
|
|
2848
|
-
encodedArguments.push("-ArgumentList", appArguments.join(","));
|
|
2849
|
-
}
|
|
2850
|
-
options.target = executePowerShell.encodeCommand(encodedArguments.join(" "));
|
|
2851
|
-
if (!options.wait) {
|
|
2852
|
-
childProcessOptions.stdio = "ignore";
|
|
2853
|
-
}
|
|
2854
|
-
} else {
|
|
2855
|
-
if (app) {
|
|
2856
|
-
command = app;
|
|
2857
|
-
} else {
|
|
2858
|
-
const isBundled = !__dirname2 || __dirname2 === "/";
|
|
2859
|
-
let exeLocalXdgOpen = false;
|
|
2860
|
-
try {
|
|
2861
|
-
await fs5.access(localXdgOpenPath, fsConstants2.X_OK);
|
|
2862
|
-
exeLocalXdgOpen = true;
|
|
2863
|
-
} catch {}
|
|
2864
|
-
const useSystemXdgOpen = process9.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
|
|
2865
|
-
command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
|
|
2866
|
-
}
|
|
2867
|
-
if (appArguments.length > 0) {
|
|
2868
|
-
cliArguments.push(...appArguments);
|
|
2869
|
-
}
|
|
2870
|
-
if (!options.wait) {
|
|
2871
|
-
childProcessOptions.stdio = "ignore";
|
|
2872
|
-
childProcessOptions.detached = true;
|
|
2873
|
-
}
|
|
2874
|
-
}
|
|
2875
|
-
if (platform === "darwin" && appArguments.length > 0) {
|
|
2876
|
-
cliArguments.push("--args", ...appArguments);
|
|
2877
|
-
}
|
|
2878
|
-
if (options.target) {
|
|
2879
|
-
cliArguments.push(options.target);
|
|
2880
|
-
}
|
|
2881
|
-
const subprocess = childProcess3.spawn(command, cliArguments, childProcessOptions);
|
|
2882
|
-
if (options.wait) {
|
|
2883
|
-
return new Promise((resolve, reject) => {
|
|
2884
|
-
subprocess.once("error", reject);
|
|
2885
|
-
subprocess.once("close", (exitCode) => {
|
|
2886
|
-
if (!options.allowNonzeroExitCode && exitCode !== 0) {
|
|
2887
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
2888
|
-
return;
|
|
2889
|
-
}
|
|
2890
|
-
resolve(subprocess);
|
|
2891
|
-
});
|
|
2892
|
-
});
|
|
2893
|
-
}
|
|
2894
|
-
if (isFallbackAttempt) {
|
|
2895
|
-
return new Promise((resolve, reject) => {
|
|
2896
|
-
subprocess.once("error", reject);
|
|
2897
|
-
subprocess.once("spawn", () => {
|
|
2898
|
-
subprocess.once("close", (exitCode) => {
|
|
2899
|
-
subprocess.off("error", reject);
|
|
2900
|
-
if (exitCode !== 0) {
|
|
2901
|
-
reject(new Error(`Exited with code ${exitCode}`));
|
|
2902
|
-
return;
|
|
2903
|
-
}
|
|
2904
|
-
subprocess.unref();
|
|
2905
|
-
resolve(subprocess);
|
|
2906
|
-
});
|
|
2907
|
-
});
|
|
2908
|
-
});
|
|
2909
|
-
}
|
|
2910
|
-
subprocess.unref();
|
|
2911
|
-
return new Promise((resolve, reject) => {
|
|
2912
|
-
subprocess.once("error", reject);
|
|
2913
|
-
subprocess.once("spawn", () => {
|
|
2914
|
-
subprocess.off("error", reject);
|
|
2915
|
-
resolve(subprocess);
|
|
2916
|
-
});
|
|
2917
|
-
});
|
|
2918
|
-
};
|
|
2919
|
-
var open = (target, options) => {
|
|
2920
|
-
if (typeof target !== "string") {
|
|
2921
|
-
throw new TypeError("Expected a `target`");
|
|
2922
|
-
}
|
|
2923
|
-
return baseOpen({
|
|
2924
|
-
...options,
|
|
2925
|
-
target
|
|
2926
|
-
});
|
|
2927
|
-
};
|
|
2928
|
-
function detectArchBinary(binary) {
|
|
2929
|
-
if (typeof binary === "string" || Array.isArray(binary)) {
|
|
2930
|
-
return binary;
|
|
2931
|
-
}
|
|
2932
|
-
const { [arch]: archBinary } = binary;
|
|
2933
|
-
if (!archBinary) {
|
|
2934
|
-
throw new Error(`${arch} is not supported`);
|
|
2935
|
-
}
|
|
2936
|
-
return archBinary;
|
|
2937
|
-
}
|
|
2938
|
-
function detectPlatformBinary({ [platform]: platformBinary }, { wsl } = {}) {
|
|
2939
|
-
if (wsl && is_wsl_default) {
|
|
2940
|
-
return detectArchBinary(wsl);
|
|
2941
|
-
}
|
|
2942
|
-
if (!platformBinary) {
|
|
2943
|
-
throw new Error(`${platform} is not supported`);
|
|
2944
|
-
}
|
|
2945
|
-
return detectArchBinary(platformBinary);
|
|
2946
|
-
}
|
|
2947
|
-
var apps = {
|
|
2948
|
-
browser: "browser",
|
|
2949
|
-
browserPrivate: "browserPrivate"
|
|
2950
|
-
};
|
|
2951
|
-
defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
|
|
2952
|
-
darwin: "google chrome",
|
|
2953
|
-
win32: "chrome",
|
|
2954
|
-
linux: ["google-chrome", "google-chrome-stable", "chromium", "chromium-browser"]
|
|
2955
|
-
}, {
|
|
2956
|
-
wsl: {
|
|
2957
|
-
ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
|
|
2958
|
-
x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
|
|
2959
|
-
}
|
|
2960
|
-
}));
|
|
2961
|
-
defineLazyProperty(apps, "brave", () => detectPlatformBinary({
|
|
2962
|
-
darwin: "brave browser",
|
|
2963
|
-
win32: "brave",
|
|
2964
|
-
linux: ["brave-browser", "brave"]
|
|
2965
|
-
}, {
|
|
2966
|
-
wsl: {
|
|
2967
|
-
ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
|
|
2968
|
-
x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
|
|
2969
|
-
}
|
|
2970
|
-
}));
|
|
2971
|
-
defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
|
|
2972
|
-
darwin: "firefox",
|
|
2973
|
-
win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
|
|
2974
|
-
linux: "firefox"
|
|
2975
|
-
}, {
|
|
2976
|
-
wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
|
|
2977
|
-
}));
|
|
2978
|
-
defineLazyProperty(apps, "edge", () => detectPlatformBinary({
|
|
2979
|
-
darwin: "microsoft edge",
|
|
2980
|
-
win32: "msedge",
|
|
2981
|
-
linux: ["microsoft-edge", "microsoft-edge-dev"]
|
|
2982
|
-
}, {
|
|
2983
|
-
wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
|
|
2984
|
-
}));
|
|
2985
|
-
defineLazyProperty(apps, "safari", () => detectPlatformBinary({
|
|
2986
|
-
darwin: "Safari"
|
|
2987
|
-
}));
|
|
2988
|
-
var open_default = open;
|
|
2989
|
-
|
|
2990
|
-
// src/cli/index.ts
|
|
2991
|
-
import { writeFileSync as writeFileSync2, existsSync as existsSync2 } from "fs";
|
|
2992
|
-
import { join as join2, basename as basename2 } from "path";
|
|
2993
|
-
|
|
2994
|
-
// src/types/index.ts
|
|
2995
|
-
class PhotosApiError extends Error {
|
|
2996
|
-
statusCode;
|
|
2997
|
-
status;
|
|
2998
|
-
details;
|
|
2999
|
-
constructor(message, statusCode, status, details) {
|
|
3000
|
-
super(message);
|
|
3001
|
-
this.name = "PhotosApiError";
|
|
3002
|
-
this.statusCode = statusCode;
|
|
3003
|
-
this.status = status;
|
|
3004
|
-
this.details = details;
|
|
3005
|
-
}
|
|
3006
|
-
}
|
|
3007
|
-
|
|
3008
|
-
// src/utils/auth.ts
|
|
3009
|
-
import { createServer } from "http";
|
|
3010
|
-
|
|
3011
|
-
// src/utils/config.ts
|
|
3012
|
-
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync, renameSync } from "fs";
|
|
3013
|
-
import { homedir } from "os";
|
|
3014
|
-
import { join } from "path";
|
|
3015
|
-
var DEFAULT_PROFILE = "default";
|
|
3016
|
-
var CURRENT_PROFILE_FILE = "current_profile";
|
|
3017
|
-
var PROFILES_DIR = "profiles";
|
|
3018
|
-
var profileOverride;
|
|
3019
|
-
function resolveBaseConfigDir() {
|
|
3020
|
-
return join(homedir(), ".hasna", "connectors", "connect-googlephotos");
|
|
3021
|
-
}
|
|
3022
|
-
var BASE_CONFIG_DIR = resolveBaseConfigDir();
|
|
3023
|
-
function setProfileOverride(profile) {
|
|
3024
|
-
profileOverride = profile;
|
|
3025
|
-
}
|
|
3026
|
-
function ensureBaseConfigDir() {
|
|
3027
|
-
if (!existsSync(BASE_CONFIG_DIR)) {
|
|
3028
|
-
mkdirSync(BASE_CONFIG_DIR, { recursive: true });
|
|
3029
|
-
}
|
|
3030
|
-
}
|
|
3031
|
-
function getProfilesDir() {
|
|
3032
|
-
return join(BASE_CONFIG_DIR, PROFILES_DIR);
|
|
3033
|
-
}
|
|
3034
|
-
function getCurrentProfileFile() {
|
|
3035
|
-
return join(BASE_CONFIG_DIR, CURRENT_PROFILE_FILE);
|
|
3036
|
-
}
|
|
3037
|
-
function migrateToProfileStructure() {
|
|
3038
|
-
const profilesDir = getProfilesDir();
|
|
3039
|
-
const defaultProfileDir = join(profilesDir, DEFAULT_PROFILE);
|
|
3040
|
-
if (existsSync(profilesDir)) {
|
|
3041
|
-
return;
|
|
3042
|
-
}
|
|
3043
|
-
const oldConfigFile = join(BASE_CONFIG_DIR, "config.json");
|
|
3044
|
-
const oldTokensFile = join(BASE_CONFIG_DIR, "tokens.json");
|
|
3045
|
-
const hasOldStructure = existsSync(oldConfigFile) || existsSync(oldTokensFile);
|
|
3046
|
-
if (!hasOldStructure) {
|
|
3047
|
-
mkdirSync(profilesDir, { recursive: true });
|
|
3048
|
-
return;
|
|
3049
|
-
}
|
|
3050
|
-
mkdirSync(defaultProfileDir, { recursive: true });
|
|
3051
|
-
if (existsSync(oldConfigFile)) {
|
|
3052
|
-
renameSync(oldConfigFile, join(defaultProfileDir, "config.json"));
|
|
3053
|
-
}
|
|
3054
|
-
if (existsSync(oldTokensFile)) {
|
|
3055
|
-
renameSync(oldTokensFile, join(defaultProfileDir, "tokens.json"));
|
|
3056
|
-
}
|
|
3057
|
-
writeFileSync(getCurrentProfileFile(), DEFAULT_PROFILE);
|
|
3058
|
-
}
|
|
3059
|
-
function getCurrentProfile() {
|
|
3060
|
-
if (profileOverride) {
|
|
3061
|
-
return profileOverride;
|
|
3062
|
-
}
|
|
3063
|
-
ensureBaseConfigDir();
|
|
3064
|
-
migrateToProfileStructure();
|
|
3065
|
-
const currentProfileFile = getCurrentProfileFile();
|
|
3066
|
-
if (existsSync(currentProfileFile)) {
|
|
3067
|
-
try {
|
|
3068
|
-
const profile = readFileSync(currentProfileFile, "utf-8").trim();
|
|
3069
|
-
if (profile && profileExists(profile)) {
|
|
3070
|
-
return profile;
|
|
3071
|
-
}
|
|
3072
|
-
} catch {}
|
|
3073
|
-
}
|
|
3074
|
-
return DEFAULT_PROFILE;
|
|
3075
|
-
}
|
|
3076
|
-
function setCurrentProfile(profile) {
|
|
3077
|
-
ensureBaseConfigDir();
|
|
3078
|
-
migrateToProfileStructure();
|
|
3079
|
-
if (!profileExists(profile)) {
|
|
3080
|
-
throw new Error(`Profile "${profile}" does not exist. Create it first with "profile create ${profile}"`);
|
|
3081
|
-
}
|
|
3082
|
-
writeFileSync(getCurrentProfileFile(), profile);
|
|
3083
|
-
}
|
|
3084
|
-
function profileExists(profile) {
|
|
3085
|
-
const profileDir = join(getProfilesDir(), profile);
|
|
3086
|
-
return existsSync(profileDir);
|
|
3087
|
-
}
|
|
3088
|
-
function listProfiles() {
|
|
3089
|
-
ensureBaseConfigDir();
|
|
3090
|
-
migrateToProfileStructure();
|
|
3091
|
-
const profilesDir = getProfilesDir();
|
|
3092
|
-
if (!existsSync(profilesDir)) {
|
|
3093
|
-
return [];
|
|
3094
|
-
}
|
|
3095
|
-
return readdirSync(profilesDir, { withFileTypes: true }).filter((dirent) => dirent.isDirectory()).map((dirent) => dirent.name).sort();
|
|
3096
|
-
}
|
|
3097
|
-
function createProfile(profile) {
|
|
3098
|
-
ensureBaseConfigDir();
|
|
3099
|
-
migrateToProfileStructure();
|
|
3100
|
-
if (profileExists(profile)) {
|
|
3101
|
-
throw new Error(`Profile "${profile}" already exists`);
|
|
3102
|
-
}
|
|
3103
|
-
if (!/^[a-zA-Z0-9_-]+$/.test(profile)) {
|
|
3104
|
-
throw new Error("Profile name can only contain letters, numbers, hyphens, and underscores");
|
|
3105
|
-
}
|
|
3106
|
-
const profileDir = join(getProfilesDir(), profile);
|
|
3107
|
-
mkdirSync(profileDir, { recursive: true });
|
|
3108
|
-
}
|
|
3109
|
-
function deleteProfile(profile) {
|
|
3110
|
-
if (profile === DEFAULT_PROFILE) {
|
|
3111
|
-
throw new Error("Cannot delete the default profile");
|
|
3112
|
-
}
|
|
3113
|
-
if (!profileExists(profile)) {
|
|
3114
|
-
throw new Error(`Profile "${profile}" does not exist`);
|
|
3115
|
-
}
|
|
3116
|
-
const currentProfile = getCurrentProfile();
|
|
3117
|
-
if (currentProfile === profile) {
|
|
3118
|
-
setCurrentProfile(DEFAULT_PROFILE);
|
|
3119
|
-
}
|
|
3120
|
-
const profileDir = join(getProfilesDir(), profile);
|
|
3121
|
-
rmSync(profileDir, { recursive: true });
|
|
3122
|
-
}
|
|
3123
|
-
function resolveConfigDir() {
|
|
3124
|
-
ensureBaseConfigDir();
|
|
3125
|
-
migrateToProfileStructure();
|
|
3126
|
-
const profile = getCurrentProfile();
|
|
3127
|
-
const profileDir = join(getProfilesDir(), profile);
|
|
3128
|
-
if (!existsSync(profileDir)) {
|
|
3129
|
-
mkdirSync(profileDir, { recursive: true });
|
|
3130
|
-
}
|
|
3131
|
-
return profileDir;
|
|
3132
|
-
}
|
|
3133
|
-
function getConfigDirInternal() {
|
|
3134
|
-
return resolveConfigDir();
|
|
3135
|
-
}
|
|
3136
|
-
function getConfigDir() {
|
|
3137
|
-
return getConfigDirInternal();
|
|
3138
|
-
}
|
|
3139
|
-
function getBaseConfigDir() {
|
|
3140
|
-
return BASE_CONFIG_DIR;
|
|
3141
|
-
}
|
|
3142
|
-
function ensureConfigDir() {
|
|
3143
|
-
const configDir = getConfigDirInternal();
|
|
3144
|
-
if (!existsSync(configDir)) {
|
|
3145
|
-
mkdirSync(configDir, { recursive: true });
|
|
3146
|
-
}
|
|
3147
|
-
}
|
|
3148
|
-
function getDownloadsDir() {
|
|
3149
|
-
return join(getConfigDirInternal(), "downloads");
|
|
3150
|
-
}
|
|
3151
|
-
function ensureDownloadsDir() {
|
|
3152
|
-
const dir = getDownloadsDir();
|
|
3153
|
-
if (!existsSync(dir)) {
|
|
3154
|
-
mkdirSync(dir, { recursive: true });
|
|
3155
|
-
}
|
|
3156
|
-
return dir;
|
|
3157
|
-
}
|
|
3158
|
-
function loadConfig() {
|
|
3159
|
-
ensureConfigDir();
|
|
3160
|
-
const configFile = join(getConfigDirInternal(), "config.json");
|
|
3161
|
-
if (!existsSync(configFile)) {
|
|
3162
|
-
return {};
|
|
3163
|
-
}
|
|
3164
|
-
try {
|
|
3165
|
-
const content = readFileSync(configFile, "utf-8");
|
|
3166
|
-
return JSON.parse(content);
|
|
3167
|
-
} catch {
|
|
3168
|
-
return {};
|
|
3169
|
-
}
|
|
3170
|
-
}
|
|
3171
|
-
function saveConfig(config) {
|
|
3172
|
-
ensureConfigDir();
|
|
3173
|
-
const configFile = join(getConfigDirInternal(), "config.json");
|
|
3174
|
-
writeFileSync(configFile, JSON.stringify(config, null, 2));
|
|
3175
|
-
}
|
|
3176
|
-
function loadBaseConfig() {
|
|
3177
|
-
ensureBaseConfigDir();
|
|
3178
|
-
const configFile = join(BASE_CONFIG_DIR, "credentials.json");
|
|
3179
|
-
if (!existsSync(configFile)) {
|
|
3180
|
-
const profiles = listProfiles();
|
|
3181
|
-
for (const profile of profiles) {
|
|
3182
|
-
const profileConfigFile = join(getProfilesDir(), profile, "config.json");
|
|
3183
|
-
if (existsSync(profileConfigFile)) {
|
|
3184
|
-
try {
|
|
3185
|
-
const content = readFileSync(profileConfigFile, "utf-8");
|
|
3186
|
-
const profileConfig = JSON.parse(content);
|
|
3187
|
-
if (profileConfig.clientId && profileConfig.clientSecret) {
|
|
3188
|
-
writeFileSync(configFile, JSON.stringify({
|
|
3189
|
-
clientId: profileConfig.clientId,
|
|
3190
|
-
clientSecret: profileConfig.clientSecret
|
|
3191
|
-
}, null, 2));
|
|
3192
|
-
return { clientId: profileConfig.clientId, clientSecret: profileConfig.clientSecret };
|
|
3193
|
-
}
|
|
3194
|
-
} catch {}
|
|
3195
|
-
}
|
|
3196
|
-
}
|
|
3197
|
-
return {};
|
|
3198
|
-
}
|
|
3199
|
-
try {
|
|
3200
|
-
const content = readFileSync(configFile, "utf-8");
|
|
3201
|
-
return JSON.parse(content);
|
|
3202
|
-
} catch {
|
|
3203
|
-
return {};
|
|
3204
|
-
}
|
|
3205
|
-
}
|
|
3206
|
-
function saveBaseConfig(config) {
|
|
3207
|
-
ensureBaseConfigDir();
|
|
3208
|
-
const configFile = join(BASE_CONFIG_DIR, "credentials.json");
|
|
3209
|
-
writeFileSync(configFile, JSON.stringify(config, null, 2));
|
|
3210
|
-
}
|
|
3211
|
-
function getClientId() {
|
|
3212
|
-
return process.env.GOOGLE_PHOTOS_CLIENT_ID || loadBaseConfig().clientId;
|
|
3213
|
-
}
|
|
3214
|
-
function getClientSecret() {
|
|
3215
|
-
return process.env.GOOGLE_PHOTOS_CLIENT_SECRET || loadBaseConfig().clientSecret;
|
|
3216
|
-
}
|
|
3217
|
-
function setCredentials(clientId, clientSecret) {
|
|
3218
|
-
const config = loadBaseConfig();
|
|
3219
|
-
config.clientId = clientId;
|
|
3220
|
-
config.clientSecret = clientSecret;
|
|
3221
|
-
saveBaseConfig(config);
|
|
3222
|
-
}
|
|
3223
|
-
function loadTokens() {
|
|
3224
|
-
ensureConfigDir();
|
|
3225
|
-
const tokensFile = join(getConfigDirInternal(), "tokens.json");
|
|
3226
|
-
if (!existsSync(tokensFile)) {
|
|
3227
|
-
return null;
|
|
3228
|
-
}
|
|
3229
|
-
try {
|
|
3230
|
-
const content = readFileSync(tokensFile, "utf-8");
|
|
3231
|
-
return JSON.parse(content);
|
|
3232
|
-
} catch {
|
|
3233
|
-
return null;
|
|
3234
|
-
}
|
|
3235
|
-
}
|
|
3236
|
-
function saveTokens(tokens) {
|
|
3237
|
-
ensureConfigDir();
|
|
3238
|
-
const tokensFile = join(getConfigDirInternal(), "tokens.json");
|
|
3239
|
-
writeFileSync(tokensFile, JSON.stringify(tokens, null, 2), { mode: 384 });
|
|
3240
|
-
}
|
|
3241
|
-
function getUserEmail() {
|
|
3242
|
-
return loadConfig().userEmail;
|
|
3243
|
-
}
|
|
3244
|
-
function setUserEmail(email) {
|
|
3245
|
-
const config = loadConfig();
|
|
3246
|
-
config.userEmail = email;
|
|
3247
|
-
saveConfig(config);
|
|
3248
|
-
}
|
|
3249
|
-
function clearTokens() {
|
|
3250
|
-
const tokensFile = join(getConfigDirInternal(), "tokens.json");
|
|
3251
|
-
if (existsSync(tokensFile)) {
|
|
3252
|
-
writeFileSync(tokensFile, "{}");
|
|
3253
|
-
}
|
|
3254
|
-
}
|
|
3255
|
-
function clearConfig() {
|
|
3256
|
-
saveConfig({});
|
|
3257
|
-
clearTokens();
|
|
3258
|
-
}
|
|
3259
|
-
function isAuthenticated() {
|
|
3260
|
-
const tokens = loadTokens();
|
|
3261
|
-
return tokens !== null && tokens.accessToken !== undefined && tokens.refreshToken !== undefined;
|
|
3262
|
-
}
|
|
3263
|
-
|
|
3264
|
-
// src/utils/auth.ts
|
|
3265
|
-
var GOOGLE_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
3266
|
-
var GOOGLE_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
3267
|
-
var PHOTOS_SCOPES = [
|
|
3268
|
-
"https://www.googleapis.com/auth/photoslibrary.appendonly",
|
|
3269
|
-
"https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata",
|
|
3270
|
-
"https://www.googleapis.com/auth/photoslibrary.edit.appcreateddata",
|
|
3271
|
-
"https://www.googleapis.com/auth/userinfo.email"
|
|
3272
|
-
].join(" ");
|
|
3273
|
-
var REDIRECT_PORT = 8090;
|
|
3274
|
-
var REDIRECT_URI = `http://localhost:${REDIRECT_PORT}/callback`;
|
|
3275
|
-
function getAuthUrl() {
|
|
3276
|
-
const clientId = getClientId();
|
|
3277
|
-
if (!clientId) {
|
|
3278
|
-
throw new Error('Client ID not configured. Run "connect-googlephotos config set-credentials" first.');
|
|
3279
|
-
}
|
|
3280
|
-
const params = new URLSearchParams({
|
|
3281
|
-
client_id: clientId,
|
|
3282
|
-
redirect_uri: REDIRECT_URI,
|
|
3283
|
-
response_type: "code",
|
|
3284
|
-
scope: PHOTOS_SCOPES,
|
|
3285
|
-
access_type: "offline",
|
|
3286
|
-
prompt: "consent"
|
|
3287
|
-
});
|
|
3288
|
-
return `${GOOGLE_AUTH_URL}?${params.toString()}`;
|
|
3289
|
-
}
|
|
3290
|
-
async function exchangeCodeForTokens(code) {
|
|
3291
|
-
const clientId = getClientId();
|
|
3292
|
-
const clientSecret = getClientSecret();
|
|
3293
|
-
if (!clientId || !clientSecret) {
|
|
3294
|
-
throw new Error("OAuth credentials not configured");
|
|
3295
|
-
}
|
|
3296
|
-
const response = await fetch(GOOGLE_TOKEN_URL, {
|
|
3297
|
-
method: "POST",
|
|
3298
|
-
headers: {
|
|
3299
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3300
|
-
},
|
|
3301
|
-
body: new URLSearchParams({
|
|
3302
|
-
code,
|
|
3303
|
-
client_id: clientId,
|
|
3304
|
-
client_secret: clientSecret,
|
|
3305
|
-
redirect_uri: REDIRECT_URI,
|
|
3306
|
-
grant_type: "authorization_code"
|
|
3307
|
-
})
|
|
3308
|
-
});
|
|
3309
|
-
if (!response.ok) {
|
|
3310
|
-
const error = await response.json();
|
|
3311
|
-
throw new Error(`Token exchange failed: ${error.error_description || error.error}`);
|
|
3312
|
-
}
|
|
3313
|
-
const data = await response.json();
|
|
3314
|
-
const tokens = {
|
|
3315
|
-
accessToken: data.access_token,
|
|
3316
|
-
refreshToken: data.refresh_token,
|
|
3317
|
-
expiresAt: Date.now() + data.expires_in * 1000,
|
|
3318
|
-
tokenType: data.token_type,
|
|
3319
|
-
scope: data.scope
|
|
3320
|
-
};
|
|
3321
|
-
return tokens;
|
|
3322
|
-
}
|
|
3323
|
-
async function refreshAccessToken() {
|
|
3324
|
-
const clientId = getClientId();
|
|
3325
|
-
const clientSecret = getClientSecret();
|
|
3326
|
-
const currentTokens = loadTokens();
|
|
3327
|
-
if (!clientId || !clientSecret) {
|
|
3328
|
-
throw new Error("OAuth credentials not configured");
|
|
3329
|
-
}
|
|
3330
|
-
if (!currentTokens?.refreshToken) {
|
|
3331
|
-
throw new Error("No refresh token available. Please login again.");
|
|
3332
|
-
}
|
|
3333
|
-
const response = await fetch(GOOGLE_TOKEN_URL, {
|
|
3334
|
-
method: "POST",
|
|
3335
|
-
headers: {
|
|
3336
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
|
3337
|
-
},
|
|
3338
|
-
body: new URLSearchParams({
|
|
3339
|
-
client_id: clientId,
|
|
3340
|
-
client_secret: clientSecret,
|
|
3341
|
-
refresh_token: currentTokens.refreshToken,
|
|
3342
|
-
grant_type: "refresh_token"
|
|
3343
|
-
})
|
|
3344
|
-
});
|
|
3345
|
-
if (!response.ok) {
|
|
3346
|
-
const error = await response.json();
|
|
3347
|
-
throw new Error(`Token refresh failed: ${error.error_description || error.error}`);
|
|
3348
|
-
}
|
|
3349
|
-
const data = await response.json();
|
|
3350
|
-
const tokens = {
|
|
3351
|
-
accessToken: data.access_token,
|
|
3352
|
-
refreshToken: currentTokens.refreshToken,
|
|
3353
|
-
expiresAt: Date.now() + data.expires_in * 1000,
|
|
3354
|
-
tokenType: data.token_type,
|
|
3355
|
-
scope: data.scope || currentTokens.scope
|
|
3356
|
-
};
|
|
3357
|
-
saveTokens(tokens);
|
|
3358
|
-
return tokens;
|
|
3359
|
-
}
|
|
3360
|
-
function startCallbackServer() {
|
|
3361
|
-
return new Promise((resolve) => {
|
|
3362
|
-
const server = createServer(async (req, res) => {
|
|
3363
|
-
const url = new URL(req.url || "", `http://localhost:${REDIRECT_PORT}`);
|
|
3364
|
-
if (url.pathname === "/callback") {
|
|
3365
|
-
const code = url.searchParams.get("code");
|
|
3366
|
-
const error = url.searchParams.get("error");
|
|
3367
|
-
if (error) {
|
|
3368
|
-
res.writeHead(200, { "Content-Type": "text/html" });
|
|
3369
|
-
res.end(`
|
|
3370
|
-
<html>
|
|
3371
|
-
<body style="font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0;">
|
|
3372
|
-
<div style="text-align: center;">
|
|
3373
|
-
<h1 style="color: #dc3545;">Authentication Failed</h1>
|
|
3374
|
-
<p>Error: ${error}</p>
|
|
3375
|
-
<p>You can close this window.</p>
|
|
3376
|
-
</div>
|
|
3377
|
-
</body>
|
|
3378
|
-
</html>
|
|
3379
|
-
`);
|
|
3380
|
-
server.close();
|
|
3381
|
-
resolve({ success: false, error });
|
|
3382
|
-
return;
|
|
3383
|
-
}
|
|
3384
|
-
if (code) {
|
|
3385
|
-
try {
|
|
3386
|
-
const tokens = await exchangeCodeForTokens(code);
|
|
3387
|
-
res.writeHead(200, { "Content-Type": "text/html" });
|
|
3388
|
-
res.end(`
|
|
3389
|
-
<html>
|
|
3390
|
-
<body style="font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0;">
|
|
3391
|
-
<div style="text-align: center;">
|
|
3392
|
-
<h1 style="color: #28a745;">Authentication Successful!</h1>
|
|
3393
|
-
<p>You can close this window and return to the terminal.</p>
|
|
3394
|
-
</div>
|
|
3395
|
-
</body>
|
|
3396
|
-
</html>
|
|
3397
|
-
`);
|
|
3398
|
-
server.close();
|
|
3399
|
-
resolve({ success: true, tokens });
|
|
3400
|
-
} catch (err) {
|
|
3401
|
-
res.writeHead(200, { "Content-Type": "text/html" });
|
|
3402
|
-
res.end(`
|
|
3403
|
-
<html>
|
|
3404
|
-
<body style="font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0;">
|
|
3405
|
-
<div style="text-align: center;">
|
|
3406
|
-
<h1 style="color: #dc3545;">Authentication Failed</h1>
|
|
3407
|
-
<p>Error: ${String(err)}</p>
|
|
3408
|
-
<p>You can close this window.</p>
|
|
3409
|
-
</div>
|
|
3410
|
-
</body>
|
|
3411
|
-
</html>
|
|
3412
|
-
`);
|
|
3413
|
-
server.close();
|
|
3414
|
-
resolve({ success: false, error: String(err) });
|
|
3415
|
-
}
|
|
3416
|
-
}
|
|
3417
|
-
}
|
|
3418
|
-
});
|
|
3419
|
-
server.listen(REDIRECT_PORT, () => {});
|
|
3420
|
-
setTimeout(() => {
|
|
3421
|
-
server.close();
|
|
3422
|
-
resolve({ success: false, error: "Authentication timed out" });
|
|
3423
|
-
}, 5 * 60 * 1000);
|
|
3424
|
-
});
|
|
3425
|
-
}
|
|
3426
|
-
async function getValidAccessToken() {
|
|
3427
|
-
const tokens = loadTokens();
|
|
3428
|
-
if (!tokens) {
|
|
3429
|
-
throw new Error('Not authenticated. Run "connect-googlephotos auth login" first.');
|
|
3430
|
-
}
|
|
3431
|
-
if (Date.now() >= tokens.expiresAt - 5 * 60 * 1000) {
|
|
3432
|
-
const newTokens = await refreshAccessToken();
|
|
3433
|
-
return newTokens.accessToken;
|
|
3434
|
-
}
|
|
3435
|
-
return tokens.accessToken;
|
|
3436
|
-
}
|
|
3437
|
-
async function getUserInfo(accessToken) {
|
|
3438
|
-
const response = await fetch("https://www.googleapis.com/oauth2/v2/userinfo", {
|
|
3439
|
-
headers: {
|
|
3440
|
-
Authorization: `Bearer ${accessToken}`
|
|
3441
|
-
}
|
|
3442
|
-
});
|
|
3443
|
-
if (!response.ok) {
|
|
3444
|
-
throw new Error("Failed to get user info");
|
|
3445
|
-
}
|
|
3446
|
-
const data = await response.json();
|
|
3447
|
-
return {
|
|
3448
|
-
email: data.email,
|
|
3449
|
-
name: data.name
|
|
3450
|
-
};
|
|
3451
|
-
}
|
|
3452
|
-
|
|
3453
|
-
// src/api/client.ts
|
|
3454
|
-
var PHOTOS_API_BASE = "https://photoslibrary.googleapis.com/v1";
|
|
3455
|
-
|
|
3456
|
-
class PhotosClient {
|
|
3457
|
-
buildUrl(path2, params) {
|
|
3458
|
-
const url = new URL(`${PHOTOS_API_BASE}${path2}`);
|
|
3459
|
-
if (params) {
|
|
3460
|
-
Object.entries(params).forEach(([key, value]) => {
|
|
3461
|
-
if (value !== undefined && value !== null && value !== "") {
|
|
3462
|
-
url.searchParams.append(key, String(value));
|
|
3463
|
-
}
|
|
3464
|
-
});
|
|
3465
|
-
}
|
|
3466
|
-
return url.toString();
|
|
3467
|
-
}
|
|
3468
|
-
async request(path2, options = {}) {
|
|
3469
|
-
const { method = "GET", params, body, headers = {} } = options;
|
|
3470
|
-
const accessToken = await getValidAccessToken();
|
|
3471
|
-
const url = this.buildUrl(path2, params);
|
|
3472
|
-
const requestHeaders = {
|
|
3473
|
-
Authorization: `Bearer ${accessToken}`,
|
|
3474
|
-
Accept: "application/json",
|
|
3475
|
-
...headers
|
|
3476
|
-
};
|
|
3477
|
-
if (body && ["POST", "PUT", "PATCH"].includes(method)) {
|
|
3478
|
-
if (typeof body === "string") {
|
|
3479
|
-
if (!requestHeaders["Content-Type"]) {
|
|
3480
|
-
requestHeaders["Content-Type"] = "application/octet-stream";
|
|
3481
|
-
}
|
|
3482
|
-
} else {
|
|
3483
|
-
requestHeaders["Content-Type"] = "application/json";
|
|
3484
|
-
}
|
|
3485
|
-
}
|
|
3486
|
-
const fetchOptions = {
|
|
3487
|
-
method,
|
|
3488
|
-
headers: requestHeaders
|
|
3489
|
-
};
|
|
3490
|
-
if (body && ["POST", "PUT", "PATCH"].includes(method)) {
|
|
3491
|
-
fetchOptions.body = typeof body === "string" ? body : JSON.stringify(body);
|
|
3492
|
-
}
|
|
3493
|
-
const response = await fetch(url, fetchOptions);
|
|
3494
|
-
if (response.status === 204) {
|
|
3495
|
-
return {};
|
|
3496
|
-
}
|
|
3497
|
-
let data;
|
|
3498
|
-
const contentType = response.headers.get("content-type") || "";
|
|
3499
|
-
if (contentType.includes("application/json")) {
|
|
3500
|
-
const text = await response.text();
|
|
3501
|
-
if (text) {
|
|
3502
|
-
try {
|
|
3503
|
-
data = JSON.parse(text);
|
|
3504
|
-
} catch {
|
|
3505
|
-
data = text;
|
|
3506
|
-
}
|
|
3507
|
-
}
|
|
3508
|
-
} else {
|
|
3509
|
-
data = await response.text();
|
|
3510
|
-
}
|
|
3511
|
-
if (!response.ok) {
|
|
3512
|
-
const errorData = data;
|
|
3513
|
-
const errorMessage = errorData?.error?.message || String(data || response.statusText);
|
|
3514
|
-
const errorStatus = errorData?.error?.status || "UNKNOWN";
|
|
3515
|
-
throw new PhotosApiError(errorMessage, response.status, errorStatus, errorData?.error?.details);
|
|
3516
|
-
}
|
|
3517
|
-
return data;
|
|
3518
|
-
}
|
|
3519
|
-
async get(path2, params) {
|
|
3520
|
-
return this.request(path2, { method: "GET", params });
|
|
3521
|
-
}
|
|
3522
|
-
async post(path2, body, params) {
|
|
3523
|
-
return this.request(path2, { method: "POST", body, params });
|
|
3524
|
-
}
|
|
3525
|
-
async put(path2, body, params) {
|
|
3526
|
-
return this.request(path2, { method: "PUT", body, params });
|
|
3527
|
-
}
|
|
3528
|
-
async patch(path2, body, params) {
|
|
3529
|
-
return this.request(path2, { method: "PATCH", body, params });
|
|
3530
|
-
}
|
|
3531
|
-
async delete(path2, params) {
|
|
3532
|
-
return this.request(path2, { method: "DELETE", params });
|
|
3533
|
-
}
|
|
3534
|
-
async uploadBytes(data, mimeType, filename) {
|
|
3535
|
-
const accessToken = await getValidAccessToken();
|
|
3536
|
-
const headers = {
|
|
3537
|
-
Authorization: `Bearer ${accessToken}`,
|
|
3538
|
-
"Content-Type": "application/octet-stream",
|
|
3539
|
-
"X-Goog-Upload-Content-Type": mimeType,
|
|
3540
|
-
"X-Goog-Upload-Protocol": "raw"
|
|
3541
|
-
};
|
|
3542
|
-
if (filename) {
|
|
3543
|
-
headers["X-Goog-Upload-File-Name"] = filename;
|
|
3544
|
-
}
|
|
3545
|
-
const response = await fetch("https://photoslibrary.googleapis.com/v1/uploads", {
|
|
3546
|
-
method: "POST",
|
|
3547
|
-
headers,
|
|
3548
|
-
body: data
|
|
3549
|
-
});
|
|
3550
|
-
if (!response.ok) {
|
|
3551
|
-
const text = await response.text();
|
|
3552
|
-
throw new PhotosApiError(`Upload failed: ${text}`, response.status, "UPLOAD_FAILED");
|
|
3553
|
-
}
|
|
3554
|
-
const uploadToken = await response.text();
|
|
3555
|
-
return uploadToken;
|
|
3556
|
-
}
|
|
3557
|
-
}
|
|
3558
|
-
|
|
3559
|
-
// src/api/albums.ts
|
|
3560
|
-
class AlbumsApi {
|
|
3561
|
-
client;
|
|
3562
|
-
constructor(client) {
|
|
3563
|
-
this.client = client;
|
|
3564
|
-
}
|
|
3565
|
-
async list(options = {}) {
|
|
3566
|
-
const params = {
|
|
3567
|
-
pageSize: options.pageSize || 50,
|
|
3568
|
-
pageToken: options.pageToken,
|
|
3569
|
-
excludeNonAppCreatedData: options.excludeNonAppCreatedData
|
|
3570
|
-
};
|
|
3571
|
-
return this.client.get("/albums", params);
|
|
3572
|
-
}
|
|
3573
|
-
async listAll(options = {}) {
|
|
3574
|
-
const albums = [];
|
|
3575
|
-
let pageToken;
|
|
3576
|
-
do {
|
|
3577
|
-
const response = await this.list({ ...options, pageToken });
|
|
3578
|
-
if (response.albums) {
|
|
3579
|
-
albums.push(...response.albums);
|
|
3580
|
-
}
|
|
3581
|
-
pageToken = response.nextPageToken;
|
|
3582
|
-
} while (pageToken);
|
|
3583
|
-
return albums;
|
|
3584
|
-
}
|
|
3585
|
-
async get(albumId) {
|
|
3586
|
-
return this.client.get(`/albums/${albumId}`);
|
|
3587
|
-
}
|
|
3588
|
-
async create(title) {
|
|
3589
|
-
return this.client.post("/albums", {
|
|
3590
|
-
album: { title }
|
|
3591
|
-
});
|
|
3592
|
-
}
|
|
3593
|
-
async addEnrichment(albumId, enrichment, position = "LAST_IN_ALBUM") {
|
|
3594
|
-
return this.client.post(`/albums/${albumId}:addEnrichment`, {
|
|
3595
|
-
newEnrichmentItem: enrichment,
|
|
3596
|
-
albumPosition: { position }
|
|
3597
|
-
});
|
|
3598
|
-
}
|
|
3599
|
-
async share(albumId, options) {
|
|
3600
|
-
const request = {};
|
|
3601
|
-
if (options) {
|
|
3602
|
-
request.sharedAlbumOptions = options;
|
|
3603
|
-
}
|
|
3604
|
-
return this.client.post(`/albums/${albumId}:share`, request);
|
|
3605
|
-
}
|
|
3606
|
-
async unshare(albumId) {
|
|
3607
|
-
await this.client.post(`/albums/${albumId}:unshare`, {});
|
|
3608
|
-
}
|
|
3609
|
-
async listShared(options = {}) {
|
|
3610
|
-
const params = {
|
|
3611
|
-
pageSize: options.pageSize || 50,
|
|
3612
|
-
pageToken: options.pageToken,
|
|
3613
|
-
excludeNonAppCreatedData: options.excludeNonAppCreatedData
|
|
3614
|
-
};
|
|
3615
|
-
return this.client.get("/sharedAlbums", params);
|
|
3616
|
-
}
|
|
3617
|
-
async join(shareToken) {
|
|
3618
|
-
return this.client.post("/sharedAlbums:join", { shareToken });
|
|
3619
|
-
}
|
|
3620
|
-
async leave(shareToken) {
|
|
3621
|
-
await this.client.post("/sharedAlbums:leave", { shareToken });
|
|
3622
|
-
}
|
|
3623
|
-
async addMediaItems(albumId, mediaItemIds) {
|
|
3624
|
-
await this.client.post(`/albums/${albumId}:batchAddMediaItems`, {
|
|
3625
|
-
mediaItemIds
|
|
3626
|
-
});
|
|
3627
|
-
}
|
|
3628
|
-
async removeMediaItems(albumId, mediaItemIds) {
|
|
3629
|
-
await this.client.post(`/albums/${albumId}:batchRemoveMediaItems`, {
|
|
3630
|
-
mediaItemIds
|
|
3631
|
-
});
|
|
3632
|
-
}
|
|
3633
|
-
async updateTitle(albumId, title) {
|
|
3634
|
-
return this.client.patch(`/albums/${albumId}`, { title }, { updateMask: "title" });
|
|
3635
|
-
}
|
|
3636
|
-
async updateCoverPhoto(albumId, coverPhotoMediaItemId) {
|
|
3637
|
-
return this.client.patch(`/albums/${albumId}`, { coverPhotoMediaItemId }, { updateMask: "coverPhotoMediaItemId" });
|
|
3638
|
-
}
|
|
3639
|
-
}
|
|
3640
|
-
|
|
3641
|
-
// src/api/media.ts
|
|
3642
|
-
class MediaApi {
|
|
3643
|
-
client;
|
|
3644
|
-
constructor(client) {
|
|
3645
|
-
this.client = client;
|
|
3646
|
-
}
|
|
3647
|
-
async list(options = {}) {
|
|
3648
|
-
const params = {
|
|
3649
|
-
pageSize: options.pageSize || 25,
|
|
3650
|
-
pageToken: options.pageToken
|
|
3651
|
-
};
|
|
3652
|
-
return this.client.get("/mediaItems", params);
|
|
3653
|
-
}
|
|
3654
|
-
async listAll(options = {}, maxItems) {
|
|
3655
|
-
const items = [];
|
|
3656
|
-
let pageToken;
|
|
3657
|
-
do {
|
|
3658
|
-
const response = await this.list({ ...options, pageToken });
|
|
3659
|
-
if (response.mediaItems) {
|
|
3660
|
-
items.push(...response.mediaItems);
|
|
3661
|
-
if (maxItems && items.length >= maxItems) {
|
|
3662
|
-
return items.slice(0, maxItems);
|
|
3663
|
-
}
|
|
3664
|
-
}
|
|
3665
|
-
pageToken = response.nextPageToken;
|
|
3666
|
-
} while (pageToken);
|
|
3667
|
-
return items;
|
|
3668
|
-
}
|
|
3669
|
-
async get(mediaItemId) {
|
|
3670
|
-
return this.client.get(`/mediaItems/${mediaItemId}`);
|
|
3671
|
-
}
|
|
3672
|
-
async batchGet(mediaItemIds) {
|
|
3673
|
-
const params = {};
|
|
3674
|
-
mediaItemIds.forEach((id, index) => {
|
|
3675
|
-
params[`mediaItemIds[${index}]`] = id;
|
|
3676
|
-
});
|
|
3677
|
-
return this.client.get("/mediaItems:batchGet", params);
|
|
3678
|
-
}
|
|
3679
|
-
async search(options = {}) {
|
|
3680
|
-
const body = {
|
|
3681
|
-
pageSize: options.pageSize || 25,
|
|
3682
|
-
pageToken: options.pageToken
|
|
3683
|
-
};
|
|
3684
|
-
if (options.albumId) {
|
|
3685
|
-
body.albumId = options.albumId;
|
|
3686
|
-
}
|
|
3687
|
-
if (options.filters) {
|
|
3688
|
-
body.filters = options.filters;
|
|
3689
|
-
}
|
|
3690
|
-
if (options.orderBy) {
|
|
3691
|
-
body.orderBy = options.orderBy;
|
|
3692
|
-
}
|
|
3693
|
-
return this.client.post("/mediaItems:search", body);
|
|
3694
|
-
}
|
|
3695
|
-
async searchAll(options = {}, maxItems) {
|
|
3696
|
-
const items = [];
|
|
3697
|
-
let pageToken;
|
|
3698
|
-
do {
|
|
3699
|
-
const response = await this.search({ ...options, pageToken });
|
|
3700
|
-
if (response.mediaItems) {
|
|
3701
|
-
items.push(...response.mediaItems);
|
|
3702
|
-
if (maxItems && items.length >= maxItems) {
|
|
3703
|
-
return items.slice(0, maxItems);
|
|
3704
|
-
}
|
|
3705
|
-
}
|
|
3706
|
-
pageToken = response.nextPageToken;
|
|
3707
|
-
} while (pageToken);
|
|
3708
|
-
return items;
|
|
3709
|
-
}
|
|
3710
|
-
async searchByDate(startDate, endDate, options = {}) {
|
|
3711
|
-
const filters = {
|
|
3712
|
-
dateFilter: endDate ? { ranges: [{ startDate, endDate }] } : { dates: [startDate] }
|
|
3713
|
-
};
|
|
3714
|
-
return this.searchAll({ ...options, filters });
|
|
3715
|
-
}
|
|
3716
|
-
async searchByCategory(categories, options = {}) {
|
|
3717
|
-
const filters = {
|
|
3718
|
-
contentFilter: {
|
|
3719
|
-
includedContentCategories: categories
|
|
3720
|
-
}
|
|
3721
|
-
};
|
|
3722
|
-
return this.searchAll({ ...options, filters });
|
|
3723
|
-
}
|
|
3724
|
-
async searchByMediaType(mediaTypes, options = {}) {
|
|
3725
|
-
const filters = {
|
|
3726
|
-
mediaTypeFilter: { mediaTypes }
|
|
3727
|
-
};
|
|
3728
|
-
return this.searchAll({ ...options, filters });
|
|
3729
|
-
}
|
|
3730
|
-
async getFavorites(options = {}) {
|
|
3731
|
-
const filters = {
|
|
3732
|
-
featureFilter: {
|
|
3733
|
-
includedFeatures: ["FAVORITES"]
|
|
3734
|
-
}
|
|
3735
|
-
};
|
|
3736
|
-
return this.searchAll({ ...options, filters });
|
|
3737
|
-
}
|
|
3738
|
-
async getInAlbum(albumId, options = {}) {
|
|
3739
|
-
return this.searchAll({ ...options, albumId });
|
|
3740
|
-
}
|
|
3741
|
-
getDownloadUrl(mediaItem, width, height) {
|
|
3742
|
-
let url = mediaItem.baseUrl;
|
|
3743
|
-
if (mediaItem.mediaMetadata.photo) {
|
|
3744
|
-
if (width && height) {
|
|
3745
|
-
url += `=w${width}-h${height}`;
|
|
3746
|
-
} else if (width) {
|
|
3747
|
-
url += `=w${width}`;
|
|
3748
|
-
} else if (height) {
|
|
3749
|
-
url += `=h${height}`;
|
|
3750
|
-
} else {
|
|
3751
|
-
url += `=d`;
|
|
3752
|
-
}
|
|
3753
|
-
}
|
|
3754
|
-
if (mediaItem.mediaMetadata.video) {
|
|
3755
|
-
url += "=dv";
|
|
3756
|
-
}
|
|
3757
|
-
return url;
|
|
3758
|
-
}
|
|
3759
|
-
async download(mediaItem, width, height) {
|
|
3760
|
-
const url = this.getDownloadUrl(mediaItem, width, height);
|
|
3761
|
-
const response = await fetch(url);
|
|
3762
|
-
if (!response.ok) {
|
|
3763
|
-
throw new Error(`Failed to download media item: ${response.statusText}`);
|
|
3764
|
-
}
|
|
3765
|
-
const arrayBuffer = await response.arrayBuffer();
|
|
3766
|
-
return Buffer.from(arrayBuffer);
|
|
3767
|
-
}
|
|
3768
|
-
async updateDescription(mediaItemId, description) {
|
|
3769
|
-
return this.client.patch(`/mediaItems/${mediaItemId}`, { description }, { updateMask: "description" });
|
|
3770
|
-
}
|
|
3771
|
-
}
|
|
3772
|
-
|
|
3773
|
-
// src/api/upload.ts
|
|
3774
|
-
import { readFileSync as readFileSync2 } from "fs";
|
|
3775
|
-
import { basename, extname } from "path";
|
|
3776
|
-
var MIME_TYPES = {
|
|
3777
|
-
".jpg": "image/jpeg",
|
|
3778
|
-
".jpeg": "image/jpeg",
|
|
3779
|
-
".png": "image/png",
|
|
3780
|
-
".gif": "image/gif",
|
|
3781
|
-
".webp": "image/webp",
|
|
3782
|
-
".heic": "image/heic",
|
|
3783
|
-
".heif": "image/heif",
|
|
3784
|
-
".bmp": "image/bmp",
|
|
3785
|
-
".tiff": "image/tiff",
|
|
3786
|
-
".tif": "image/tiff",
|
|
3787
|
-
".raw": "image/raw",
|
|
3788
|
-
".ico": "image/x-icon",
|
|
3789
|
-
".mp4": "video/mp4",
|
|
3790
|
-
".mov": "video/quicktime",
|
|
3791
|
-
".avi": "video/x-msvideo",
|
|
3792
|
-
".mkv": "video/x-matroska",
|
|
3793
|
-
".webm": "video/webm",
|
|
3794
|
-
".m4v": "video/x-m4v",
|
|
3795
|
-
".3gp": "video/3gpp",
|
|
3796
|
-
".mpg": "video/mpeg",
|
|
3797
|
-
".mpeg": "video/mpeg",
|
|
3798
|
-
".wmv": "video/x-ms-wmv"
|
|
3799
|
-
};
|
|
3800
|
-
|
|
3801
|
-
class UploadApi {
|
|
3802
|
-
client;
|
|
3803
|
-
constructor(client) {
|
|
3804
|
-
this.client = client;
|
|
3805
|
-
}
|
|
3806
|
-
getMimeType(filePath) {
|
|
3807
|
-
const ext = extname(filePath).toLowerCase();
|
|
3808
|
-
return MIME_TYPES[ext] || "application/octet-stream";
|
|
3809
|
-
}
|
|
3810
|
-
async uploadFile(filePath) {
|
|
3811
|
-
const data = readFileSync2(filePath);
|
|
3812
|
-
const mimeType = this.getMimeType(filePath);
|
|
3813
|
-
const filename = basename(filePath);
|
|
3814
|
-
return this.client.uploadBytes(data, mimeType, filename);
|
|
3815
|
-
}
|
|
3816
|
-
async uploadBytes(data, mimeType, filename) {
|
|
3817
|
-
return this.client.uploadBytes(data, mimeType, filename);
|
|
3818
|
-
}
|
|
3819
|
-
async createMediaItems(uploadTokens, albumId) {
|
|
3820
|
-
const newMediaItems = uploadTokens.map((item) => ({
|
|
3821
|
-
description: item.description,
|
|
3822
|
-
simpleMediaItem: {
|
|
3823
|
-
fileName: item.filename,
|
|
3824
|
-
uploadToken: item.uploadToken
|
|
3825
|
-
}
|
|
3826
|
-
}));
|
|
3827
|
-
const request = {
|
|
3828
|
-
newMediaItems
|
|
3829
|
-
};
|
|
3830
|
-
if (albumId) {
|
|
3831
|
-
request.albumId = albumId;
|
|
3832
|
-
}
|
|
3833
|
-
return this.client.post("/mediaItems:batchCreate", request);
|
|
3834
|
-
}
|
|
3835
|
-
async uploadAndCreate(filePath, options = {}) {
|
|
3836
|
-
const uploadToken = await this.uploadFile(filePath);
|
|
3837
|
-
const filename = basename(filePath);
|
|
3838
|
-
const response = await this.createMediaItems([{ uploadToken, filename, description: options.description }], options.albumId);
|
|
3839
|
-
const result = response.newMediaItemResults[0];
|
|
3840
|
-
if (result.status?.code && result.status.code !== 0) {
|
|
3841
|
-
throw new Error(`Failed to create media item: ${result.status.message}`);
|
|
3842
|
-
}
|
|
3843
|
-
return result.mediaItem || null;
|
|
3844
|
-
}
|
|
3845
|
-
async uploadMultiple(filePaths, options = {}) {
|
|
3846
|
-
const uploadTokens = [];
|
|
3847
|
-
for (let i = 0;i < filePaths.length; i++) {
|
|
3848
|
-
const filePath = filePaths[i];
|
|
3849
|
-
const filename = basename(filePath);
|
|
3850
|
-
if (options.onProgress) {
|
|
3851
|
-
options.onProgress(i, filePaths.length, filename);
|
|
3852
|
-
}
|
|
3853
|
-
const uploadToken = await this.uploadFile(filePath);
|
|
3854
|
-
uploadTokens.push({ uploadToken, filename });
|
|
3855
|
-
}
|
|
3856
|
-
if (options.onProgress) {
|
|
3857
|
-
options.onProgress(filePaths.length, filePaths.length, "Creating media items...");
|
|
3858
|
-
}
|
|
3859
|
-
return this.createMediaItems(uploadTokens, options.albumId);
|
|
3860
|
-
}
|
|
3861
|
-
async uploadDirectory(dirPath, options = {}) {
|
|
3862
|
-
const { readdirSync: readdirSync2, statSync } = await import("fs");
|
|
3863
|
-
const { join: join2 } = await import("path");
|
|
3864
|
-
const supportedExtensions = options.extensions || Object.keys(MIME_TYPES);
|
|
3865
|
-
const files = [];
|
|
3866
|
-
const collectFiles = (dir) => {
|
|
3867
|
-
const entries = readdirSync2(dir, { withFileTypes: true });
|
|
3868
|
-
for (const entry of entries) {
|
|
3869
|
-
const fullPath = join2(dir, entry.name);
|
|
3870
|
-
if (entry.isDirectory() && options.recursive) {
|
|
3871
|
-
collectFiles(fullPath);
|
|
3872
|
-
} else if (entry.isFile()) {
|
|
3873
|
-
const ext = extname(entry.name).toLowerCase();
|
|
3874
|
-
if (supportedExtensions.includes(ext)) {
|
|
3875
|
-
files.push(fullPath);
|
|
3876
|
-
}
|
|
3877
|
-
}
|
|
3878
|
-
}
|
|
3879
|
-
};
|
|
3880
|
-
collectFiles(dirPath);
|
|
3881
|
-
if (files.length === 0) {
|
|
3882
|
-
return { newMediaItemResults: [] };
|
|
3883
|
-
}
|
|
3884
|
-
return this.uploadMultiple(files, {
|
|
3885
|
-
albumId: options.albumId,
|
|
3886
|
-
onProgress: options.onProgress
|
|
3887
|
-
});
|
|
3888
|
-
}
|
|
3889
|
-
getSupportedExtensions() {
|
|
3890
|
-
return Object.keys(MIME_TYPES);
|
|
3891
|
-
}
|
|
3892
|
-
isSupported(filePath) {
|
|
3893
|
-
const ext = extname(filePath).toLowerCase();
|
|
3894
|
-
return ext in MIME_TYPES;
|
|
3895
|
-
}
|
|
3896
|
-
}
|
|
3897
|
-
|
|
3898
|
-
// src/api/bulk.ts
|
|
3899
|
-
class BulkApi {
|
|
3900
|
-
client;
|
|
3901
|
-
constructor(client) {
|
|
3902
|
-
this.client = client;
|
|
3903
|
-
}
|
|
3904
|
-
async preview(options) {
|
|
3905
|
-
const items = await this.fetchMediaItems({
|
|
3906
|
-
albumId: options?.albumId,
|
|
3907
|
-
mediaType: options?.mediaType,
|
|
3908
|
-
favoritesOnly: options?.favoritesOnly,
|
|
3909
|
-
maxResults: options?.maxResults || 50
|
|
3910
|
-
});
|
|
3911
|
-
return { items, total: items.length };
|
|
3912
|
-
}
|
|
3913
|
-
async removeFromAlbums(options) {
|
|
3914
|
-
const { albumIds, mediaItemIds, ...rest } = options;
|
|
3915
|
-
let items;
|
|
3916
|
-
if (mediaItemIds && mediaItemIds.length > 0) {
|
|
3917
|
-
items = mediaItemIds.map((id) => ({
|
|
3918
|
-
id,
|
|
3919
|
-
filename: id,
|
|
3920
|
-
mimeType: "unknown",
|
|
3921
|
-
created: "",
|
|
3922
|
-
productUrl: ""
|
|
3923
|
-
}));
|
|
3924
|
-
} else {
|
|
3925
|
-
items = await this.fetchMediaItems({
|
|
3926
|
-
albumId: albumIds[0],
|
|
3927
|
-
maxResults: rest.maxResults || 100
|
|
3928
|
-
});
|
|
3929
|
-
}
|
|
3930
|
-
return this.executeBatch(items, {
|
|
3931
|
-
dryRun: rest.dryRun || false,
|
|
3932
|
-
concurrency: rest.concurrency || 10,
|
|
3933
|
-
onProgress: rest.onProgress,
|
|
3934
|
-
onError: rest.onError,
|
|
3935
|
-
operation: async (item) => {
|
|
3936
|
-
for (const albumId of albumIds) {
|
|
3937
|
-
await this.client.post(`/albums/${albumId}:batchRemoveMediaItems`, {
|
|
3938
|
-
mediaItemIds: [item.id]
|
|
3939
|
-
});
|
|
3940
|
-
}
|
|
3941
|
-
}
|
|
3942
|
-
});
|
|
3943
|
-
}
|
|
3944
|
-
async addToAlbum(options) {
|
|
3945
|
-
let itemIds = options.mediaItemIds;
|
|
3946
|
-
if (!itemIds || itemIds.length === 0) {
|
|
3947
|
-
const items = await this.fetchMediaItems({
|
|
3948
|
-
albumId: options.albumId,
|
|
3949
|
-
mediaType: options.mediaType,
|
|
3950
|
-
favoritesOnly: options.favoritesOnly,
|
|
3951
|
-
includeArchived: options.includeArchived,
|
|
3952
|
-
maxResults: options.maxResults || 100
|
|
3953
|
-
});
|
|
3954
|
-
itemIds = items.map((i) => i.id);
|
|
3955
|
-
}
|
|
3956
|
-
const summaries = itemIds.map((id) => ({
|
|
3957
|
-
id,
|
|
3958
|
-
filename: id,
|
|
3959
|
-
mimeType: "unknown",
|
|
3960
|
-
created: "",
|
|
3961
|
-
productUrl: ""
|
|
3962
|
-
}));
|
|
3963
|
-
return this.executeBatch(summaries, {
|
|
3964
|
-
dryRun: options.dryRun || false,
|
|
3965
|
-
concurrency: options.concurrency || 10,
|
|
3966
|
-
onProgress: options.onProgress,
|
|
3967
|
-
onError: options.onError,
|
|
3968
|
-
operation: async (item) => {
|
|
3969
|
-
await this.client.post(`/albums/${options.targetAlbumId}:batchAddMediaItems`, {
|
|
3970
|
-
mediaItemIds: [item.id]
|
|
3971
|
-
});
|
|
3972
|
-
}
|
|
3973
|
-
});
|
|
3974
|
-
}
|
|
3975
|
-
async removeFromAlbum(options) {
|
|
3976
|
-
let itemIds = options.mediaItemIds;
|
|
3977
|
-
if (!itemIds || itemIds.length === 0) {
|
|
3978
|
-
const items = await this.fetchMediaItems({
|
|
3979
|
-
albumId: options.albumId,
|
|
3980
|
-
maxResults: options.maxResults || 100
|
|
3981
|
-
});
|
|
3982
|
-
itemIds = items.map((i) => i.id);
|
|
3983
|
-
}
|
|
3984
|
-
const summaries = itemIds.map((id) => ({
|
|
3985
|
-
id,
|
|
3986
|
-
filename: id,
|
|
3987
|
-
mimeType: "unknown",
|
|
3988
|
-
created: "",
|
|
3989
|
-
productUrl: ""
|
|
3990
|
-
}));
|
|
3991
|
-
return this.executeBatch(summaries, {
|
|
3992
|
-
dryRun: options.dryRun || false,
|
|
3993
|
-
concurrency: options.concurrency || 10,
|
|
3994
|
-
onProgress: options.onProgress,
|
|
3995
|
-
onError: options.onError,
|
|
3996
|
-
operation: async (item) => {
|
|
3997
|
-
await this.client.post(`/albums/${options.albumId}:batchRemoveMediaItems`, {
|
|
3998
|
-
mediaItemIds: [item.id]
|
|
3999
|
-
});
|
|
4000
|
-
}
|
|
4001
|
-
});
|
|
4002
|
-
}
|
|
4003
|
-
async createAlbums(options) {
|
|
4004
|
-
const { titles, concurrency = 10, dryRun = false, onProgress, onError } = options;
|
|
4005
|
-
const result = {
|
|
4006
|
-
total: titles.length,
|
|
4007
|
-
success: 0,
|
|
4008
|
-
failed: 0,
|
|
4009
|
-
errors: [],
|
|
4010
|
-
createdAlbums: []
|
|
4011
|
-
};
|
|
4012
|
-
if (titles.length === 0)
|
|
4013
|
-
return result;
|
|
4014
|
-
const chunks = this.chunkArray(titles, concurrency);
|
|
4015
|
-
for (const chunk of chunks) {
|
|
4016
|
-
await Promise.all(chunk.map(async (title) => {
|
|
4017
|
-
try {
|
|
4018
|
-
if (dryRun) {
|
|
4019
|
-
result.success++;
|
|
4020
|
-
} else {
|
|
4021
|
-
const album = await this.client.post("/albums", { album: { title } });
|
|
4022
|
-
result.success++;
|
|
4023
|
-
result.createdAlbums.push(album);
|
|
4024
|
-
}
|
|
4025
|
-
if (onProgress)
|
|
4026
|
-
onProgress(result.success + result.failed, result.total, title);
|
|
4027
|
-
} catch (err) {
|
|
4028
|
-
result.failed++;
|
|
4029
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
4030
|
-
result.errors.push({ title, error: errorMessage });
|
|
4031
|
-
if (onError)
|
|
4032
|
-
onError(err instanceof Error ? err : new Error(errorMessage), title);
|
|
4033
|
-
}
|
|
4034
|
-
}));
|
|
4035
|
-
}
|
|
4036
|
-
return result;
|
|
4037
|
-
}
|
|
4038
|
-
async listFavorites(options) {
|
|
4039
|
-
const items = await this.fetchMediaItems({
|
|
4040
|
-
favoritesOnly: true,
|
|
4041
|
-
maxResults: options?.maxResults || 100
|
|
4042
|
-
});
|
|
4043
|
-
return { items, total: items.length };
|
|
4044
|
-
}
|
|
4045
|
-
async fetchMediaItems(params) {
|
|
4046
|
-
const items = [];
|
|
4047
|
-
let pageToken;
|
|
4048
|
-
const max = params.maxResults || 100;
|
|
4049
|
-
while (items.length < max) {
|
|
4050
|
-
const body = {
|
|
4051
|
-
pageSize: Math.min(100, max - items.length)
|
|
4052
|
-
};
|
|
4053
|
-
if (params.albumId) {
|
|
4054
|
-
body.albumId = params.albumId;
|
|
4055
|
-
}
|
|
4056
|
-
const filters = {};
|
|
4057
|
-
if (params.mediaType) {
|
|
4058
|
-
filters.mediaTypeFilter = { mediaTypes: [params.mediaType] };
|
|
4059
|
-
}
|
|
4060
|
-
if (params.favoritesOnly) {
|
|
4061
|
-
filters.featureFilter = { includedFeatures: ["FAVORITES"] };
|
|
4062
|
-
}
|
|
4063
|
-
if (params.includeArchived) {
|
|
4064
|
-
filters.includeArchivedMedia = true;
|
|
4065
|
-
}
|
|
4066
|
-
if (Object.keys(filters).length > 0) {
|
|
4067
|
-
body.filters = filters;
|
|
4068
|
-
}
|
|
4069
|
-
if (pageToken) {
|
|
4070
|
-
body.pageToken = pageToken;
|
|
4071
|
-
}
|
|
4072
|
-
const response = await this.client.post("/mediaItems:search", body);
|
|
4073
|
-
if (!response.mediaItems || response.mediaItems.length === 0)
|
|
4074
|
-
break;
|
|
4075
|
-
for (const item of response.mediaItems) {
|
|
4076
|
-
items.push({
|
|
4077
|
-
id: item.id,
|
|
4078
|
-
filename: item.filename,
|
|
4079
|
-
mimeType: item.mimeType,
|
|
4080
|
-
created: item.mediaMetadata.creationTime,
|
|
4081
|
-
productUrl: item.productUrl
|
|
4082
|
-
});
|
|
4083
|
-
}
|
|
4084
|
-
pageToken = response.nextPageToken;
|
|
4085
|
-
if (!pageToken)
|
|
4086
|
-
break;
|
|
4087
|
-
}
|
|
4088
|
-
return items;
|
|
4089
|
-
}
|
|
4090
|
-
async executeBatch(items, options) {
|
|
4091
|
-
const { dryRun, concurrency, onProgress, onError, operation } = options;
|
|
4092
|
-
const result = {
|
|
4093
|
-
total: items.length,
|
|
4094
|
-
success: 0,
|
|
4095
|
-
failed: 0,
|
|
4096
|
-
skipped: 0,
|
|
4097
|
-
errors: [],
|
|
4098
|
-
processedItems: []
|
|
4099
|
-
};
|
|
4100
|
-
if (items.length === 0)
|
|
4101
|
-
return result;
|
|
4102
|
-
const chunks = this.chunkArray(items, concurrency);
|
|
4103
|
-
for (const chunk of chunks) {
|
|
4104
|
-
await Promise.all(chunk.map(async (item) => {
|
|
4105
|
-
try {
|
|
4106
|
-
if (dryRun) {
|
|
4107
|
-
result.success++;
|
|
4108
|
-
result.processedItems.push(item);
|
|
4109
|
-
} else {
|
|
4110
|
-
await operation(item);
|
|
4111
|
-
result.success++;
|
|
4112
|
-
result.processedItems.push(item);
|
|
4113
|
-
}
|
|
4114
|
-
if (onProgress)
|
|
4115
|
-
onProgress(result.success + result.failed, result.total, item);
|
|
4116
|
-
} catch (err) {
|
|
4117
|
-
result.failed++;
|
|
4118
|
-
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
4119
|
-
result.errors.push({ mediaId: item.id, error: errorMessage });
|
|
4120
|
-
if (onError)
|
|
4121
|
-
onError(err instanceof Error ? err : new Error(errorMessage), item);
|
|
4122
|
-
}
|
|
4123
|
-
}));
|
|
4124
|
-
}
|
|
4125
|
-
return result;
|
|
4126
|
-
}
|
|
4127
|
-
chunkArray(array, size) {
|
|
4128
|
-
const chunks = [];
|
|
4129
|
-
for (let i = 0;i < array.length; i += size) {
|
|
4130
|
-
chunks.push(array.slice(i, i + size));
|
|
4131
|
-
}
|
|
4132
|
-
return chunks;
|
|
4133
|
-
}
|
|
4134
|
-
}
|
|
4135
|
-
|
|
4136
|
-
// src/api/index.ts
|
|
4137
|
-
class GooglePhotos {
|
|
4138
|
-
client;
|
|
4139
|
-
albums;
|
|
4140
|
-
media;
|
|
4141
|
-
upload;
|
|
4142
|
-
bulk;
|
|
4143
|
-
constructor() {
|
|
4144
|
-
this.client = new PhotosClient;
|
|
4145
|
-
this.albums = new AlbumsApi(this.client);
|
|
4146
|
-
this.media = new MediaApi(this.client);
|
|
4147
|
-
this.upload = new UploadApi(this.client);
|
|
4148
|
-
this.bulk = new BulkApi(this.client);
|
|
4149
|
-
}
|
|
4150
|
-
static create() {
|
|
4151
|
-
return new GooglePhotos;
|
|
4152
|
-
}
|
|
4153
|
-
getClient() {
|
|
4154
|
-
return this.client;
|
|
4155
|
-
}
|
|
4156
|
-
}
|
|
4157
|
-
|
|
4158
|
-
// src/utils/output.ts
|
|
4159
|
-
function success(message) {
|
|
4160
|
-
console.log(source_default.green("\u2713"), message);
|
|
4161
|
-
}
|
|
4162
|
-
function error(message) {
|
|
4163
|
-
console.error(source_default.red("\u2717"), message);
|
|
4164
|
-
}
|
|
4165
|
-
function info(message) {
|
|
4166
|
-
console.log(source_default.blue("\u2139"), message);
|
|
4167
|
-
}
|
|
4168
|
-
function warn(message) {
|
|
4169
|
-
console.log(source_default.yellow("\u26A0"), message);
|
|
4170
|
-
}
|
|
4171
|
-
function print(data, format = "pretty") {
|
|
4172
|
-
switch (format) {
|
|
4173
|
-
case "json":
|
|
4174
|
-
console.log(JSON.stringify(data, null, 2));
|
|
4175
|
-
break;
|
|
4176
|
-
case "table":
|
|
4177
|
-
printTable(data);
|
|
4178
|
-
break;
|
|
4179
|
-
case "pretty":
|
|
4180
|
-
default:
|
|
4181
|
-
printPretty(data);
|
|
4182
|
-
break;
|
|
4183
|
-
}
|
|
4184
|
-
}
|
|
4185
|
-
function printTable(data) {
|
|
4186
|
-
if (Array.isArray(data)) {
|
|
4187
|
-
if (data.length === 0) {
|
|
4188
|
-
console.log("No data");
|
|
4189
|
-
return;
|
|
4190
|
-
}
|
|
4191
|
-
const keys = Array.from(new Set(data.flatMap((item) => typeof item === "object" && item ? Object.keys(item) : [])));
|
|
4192
|
-
if (keys.length === 0) {
|
|
4193
|
-
console.log(data);
|
|
4194
|
-
return;
|
|
4195
|
-
}
|
|
4196
|
-
const widths = {};
|
|
4197
|
-
for (const key of keys) {
|
|
4198
|
-
widths[key] = Math.max(key.length, ...data.map((item) => {
|
|
4199
|
-
const val = item?.[key];
|
|
4200
|
-
return String(val ?? "").substring(0, 50).length;
|
|
4201
|
-
}));
|
|
4202
|
-
}
|
|
4203
|
-
const header = keys.map((k) => k.padEnd(widths[k])).join(" | ");
|
|
4204
|
-
console.log(source_default.bold(header));
|
|
4205
|
-
console.log(keys.map((k) => "-".repeat(widths[k])).join("-+-"));
|
|
4206
|
-
for (const item of data) {
|
|
4207
|
-
const row = keys.map((k) => {
|
|
4208
|
-
const val = item?.[k];
|
|
4209
|
-
return String(val ?? "").substring(0, 50).padEnd(widths[k]);
|
|
4210
|
-
}).join(" | ");
|
|
4211
|
-
console.log(row);
|
|
4212
|
-
}
|
|
4213
|
-
} else if (typeof data === "object" && data !== null) {
|
|
4214
|
-
const entries = Object.entries(data);
|
|
4215
|
-
const maxKeyLen = Math.max(...entries.map(([k]) => k.length));
|
|
4216
|
-
for (const [key, value] of entries) {
|
|
4217
|
-
const displayValue = typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
4218
|
-
console.log(`${source_default.cyan(key.padEnd(maxKeyLen))}: ${displayValue}`);
|
|
4219
|
-
}
|
|
4220
|
-
} else {
|
|
4221
|
-
console.log(data);
|
|
4222
|
-
}
|
|
4223
|
-
}
|
|
4224
|
-
function printPretty(data) {
|
|
4225
|
-
if (Array.isArray(data)) {
|
|
4226
|
-
if (data.length === 0) {
|
|
4227
|
-
console.log("No data");
|
|
4228
|
-
return;
|
|
4229
|
-
}
|
|
4230
|
-
for (let i = 0;i < data.length; i++) {
|
|
4231
|
-
if (i > 0)
|
|
4232
|
-
console.log("");
|
|
4233
|
-
printPrettyObject(data[i], i + 1);
|
|
4234
|
-
}
|
|
4235
|
-
} else if (typeof data === "object" && data !== null) {
|
|
4236
|
-
printPrettyObject(data);
|
|
4237
|
-
} else {
|
|
4238
|
-
console.log(data);
|
|
4239
|
-
}
|
|
4240
|
-
}
|
|
4241
|
-
function printPrettyObject(obj, index) {
|
|
4242
|
-
if (typeof obj !== "object" || obj === null) {
|
|
4243
|
-
console.log(obj);
|
|
4244
|
-
return;
|
|
4245
|
-
}
|
|
4246
|
-
const entries = Object.entries(obj);
|
|
4247
|
-
if (index !== undefined) {
|
|
4248
|
-
console.log(source_default.gray(`[${index}]`));
|
|
4249
|
-
}
|
|
4250
|
-
for (const [key, value] of entries) {
|
|
4251
|
-
const displayKey = formatKey(key);
|
|
4252
|
-
const displayValue = formatValue(value);
|
|
4253
|
-
console.log(` ${source_default.cyan(displayKey)}: ${displayValue}`);
|
|
4254
|
-
}
|
|
4255
|
-
}
|
|
4256
|
-
function formatKey(key) {
|
|
4257
|
-
return key.replace(/([A-Z])/g, " $1").replace(/^./, (str) => str.toUpperCase()).trim();
|
|
4258
|
-
}
|
|
4259
|
-
function formatValue(value) {
|
|
4260
|
-
if (value === null || value === undefined) {
|
|
4261
|
-
return source_default.gray("\u2014");
|
|
4262
|
-
}
|
|
4263
|
-
if (typeof value === "boolean") {
|
|
4264
|
-
return value ? source_default.green("Yes") : source_default.red("No");
|
|
4265
|
-
}
|
|
4266
|
-
if (typeof value === "number") {
|
|
4267
|
-
return source_default.yellow(String(value));
|
|
4268
|
-
}
|
|
4269
|
-
if (typeof value === "string") {
|
|
4270
|
-
if (value.startsWith("http://") || value.startsWith("https://")) {
|
|
4271
|
-
return source_default.blue(value);
|
|
4272
|
-
}
|
|
4273
|
-
if (/^\d{4}-\d{2}-\d{2}/.test(value)) {
|
|
4274
|
-
return source_default.magenta(value);
|
|
4275
|
-
}
|
|
4276
|
-
if (value.length > 100) {
|
|
4277
|
-
return value.substring(0, 100) + source_default.gray("...");
|
|
4278
|
-
}
|
|
4279
|
-
return value;
|
|
4280
|
-
}
|
|
4281
|
-
if (Array.isArray(value)) {
|
|
4282
|
-
if (value.length === 0) {
|
|
4283
|
-
return source_default.gray("[]");
|
|
4284
|
-
}
|
|
4285
|
-
return source_default.gray(`[${value.length} items]`);
|
|
4286
|
-
}
|
|
4287
|
-
if (typeof value === "object") {
|
|
4288
|
-
const keys = Object.keys(value);
|
|
4289
|
-
if (keys.length === 0) {
|
|
4290
|
-
return source_default.gray("{}");
|
|
4291
|
-
}
|
|
4292
|
-
return source_default.gray(`{${keys.join(", ")}}`);
|
|
4293
|
-
}
|
|
4294
|
-
return String(value);
|
|
4295
|
-
}
|
|
4296
|
-
function formatBytes(bytes) {
|
|
4297
|
-
if (bytes === 0)
|
|
4298
|
-
return "0 B";
|
|
4299
|
-
const k = 1024;
|
|
4300
|
-
const sizes = ["B", "KB", "MB", "GB", "TB"];
|
|
4301
|
-
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
4302
|
-
return `${(bytes / Math.pow(k, i)).toFixed(1)} ${sizes[i]}`;
|
|
4303
|
-
}
|
|
4304
|
-
|
|
4305
|
-
// src/cli/index.ts
|
|
4306
|
-
var program2 = new Command;
|
|
4307
|
-
program2.name("connect-googlephotos").description("Google Photos API connector CLI - Browse, download, and upload photos with ease").version("0.1.0").option("-f, --format <format>", "Output format (json, table, pretty)", "pretty").option("-p, --profile <profile>", "Use a specific profile").hook("preAction", (thisCommand) => {
|
|
4308
|
-
const opts = thisCommand.opts();
|
|
4309
|
-
if (opts.profile) {
|
|
4310
|
-
if (!profileExists(opts.profile)) {
|
|
4311
|
-
error(`Profile "${opts.profile}" does not exist. Create it with "connect-googlephotos profiles create ${opts.profile}"`);
|
|
4312
|
-
process.exit(1);
|
|
4313
|
-
}
|
|
4314
|
-
setProfileOverride(opts.profile);
|
|
4315
|
-
}
|
|
4316
|
-
});
|
|
4317
|
-
function getFormat(cmd) {
|
|
4318
|
-
const parent = cmd.parent;
|
|
4319
|
-
return parent?.opts().format || "pretty";
|
|
4320
|
-
}
|
|
4321
|
-
function requireAuth() {
|
|
4322
|
-
if (!isAuthenticated()) {
|
|
4323
|
-
error('Not authenticated. Run "connect-googlephotos auth login" first.');
|
|
4324
|
-
process.exit(1);
|
|
4325
|
-
}
|
|
4326
|
-
return GooglePhotos.create();
|
|
4327
|
-
}
|
|
4328
|
-
var authCmd = program2.command("auth").description("Authentication commands");
|
|
4329
|
-
authCmd.command("login").description("Login to Google Photos via OAuth2 (opens browser) - auto-creates profile from email").action(async () => {
|
|
4330
|
-
const clientId = getClientId();
|
|
4331
|
-
const clientSecret = getClientSecret();
|
|
4332
|
-
if (!clientId || !clientSecret) {
|
|
4333
|
-
error("OAuth credentials not configured.");
|
|
4334
|
-
info('Run "connect-googlephotos config set-credentials <client-id> <client-secret>" first.');
|
|
4335
|
-
info("Or set GOOGLE_PHOTOS_CLIENT_ID and GOOGLE_PHOTOS_CLIENT_SECRET environment variables.");
|
|
4336
|
-
process.exit(1);
|
|
4337
|
-
}
|
|
4338
|
-
info("Starting OAuth2 authentication flow...");
|
|
4339
|
-
info("A browser window will open for you to authorize the application.");
|
|
4340
|
-
const serverPromise = startCallbackServer();
|
|
4341
|
-
const authUrl = getAuthUrl();
|
|
4342
|
-
await open_default(authUrl);
|
|
4343
|
-
info("Waiting for authentication...");
|
|
4344
|
-
const result = await serverPromise;
|
|
4345
|
-
if (result.success) {
|
|
4346
|
-
success("Successfully authenticated!");
|
|
4347
|
-
try {
|
|
4348
|
-
setProfileOverride("default");
|
|
4349
|
-
if (result.tokens) {
|
|
4350
|
-
saveTokens(result.tokens);
|
|
4351
|
-
}
|
|
4352
|
-
const userInfo = await getUserInfo(result.tokens.accessToken);
|
|
4353
|
-
const email = userInfo.email;
|
|
4354
|
-
const profileSlug = email.replace(/[^a-zA-Z0-9]/g, "").toLowerCase();
|
|
4355
|
-
if (!profileExists(profileSlug)) {
|
|
4356
|
-
createProfile(profileSlug);
|
|
4357
|
-
info(`Created profile: ${profileSlug}`);
|
|
4358
|
-
}
|
|
4359
|
-
setCurrentProfile(profileSlug);
|
|
4360
|
-
setProfileOverride(profileSlug);
|
|
4361
|
-
setUserEmail(email);
|
|
4362
|
-
if (result.tokens) {
|
|
4363
|
-
saveTokens(result.tokens);
|
|
4364
|
-
}
|
|
4365
|
-
success(`Profile: ${profileSlug}`);
|
|
4366
|
-
info(`Email: ${email}`);
|
|
4367
|
-
} catch (err) {
|
|
4368
|
-
warn(`Could not auto-create profile: ${err}`);
|
|
4369
|
-
}
|
|
4370
|
-
} else {
|
|
4371
|
-
error(`Authentication failed: ${result.error}`);
|
|
4372
|
-
process.exit(1);
|
|
4373
|
-
}
|
|
4374
|
-
});
|
|
4375
|
-
authCmd.command("status").description("Check authentication status").action(async () => {
|
|
4376
|
-
if (isAuthenticated()) {
|
|
4377
|
-
const tokens = loadTokens();
|
|
4378
|
-
const email = getUserEmail();
|
|
4379
|
-
success("Authenticated");
|
|
4380
|
-
if (email) {
|
|
4381
|
-
info(`Email: ${email}`);
|
|
4382
|
-
}
|
|
4383
|
-
if (tokens) {
|
|
4384
|
-
const expiresIn = Math.max(0, Math.floor((tokens.expiresAt - Date.now()) / 1000 / 60));
|
|
4385
|
-
info(`Access token expires in: ${expiresIn} minutes`);
|
|
4386
|
-
info(`Has refresh token: ${tokens.refreshToken ? "Yes" : "No"}`);
|
|
4387
|
-
}
|
|
4388
|
-
} else {
|
|
4389
|
-
warn("Not authenticated");
|
|
4390
|
-
info('Run "connect-googlephotos auth login" to authenticate.');
|
|
4391
|
-
}
|
|
4392
|
-
});
|
|
4393
|
-
authCmd.command("logout").description("Clear stored authentication tokens").action(() => {
|
|
4394
|
-
clearConfig();
|
|
4395
|
-
success("Logged out successfully");
|
|
4396
|
-
});
|
|
4397
|
-
var configCmd = program2.command("config").description("Manage CLI configuration");
|
|
4398
|
-
configCmd.command("set-credentials <clientId> <clientSecret>").description("Set OAuth2 client credentials").action((clientId, clientSecret) => {
|
|
4399
|
-
setCredentials(clientId, clientSecret);
|
|
4400
|
-
success("OAuth credentials saved successfully");
|
|
4401
|
-
info(`Config stored in: ${getBaseConfigDir()}`);
|
|
4402
|
-
});
|
|
4403
|
-
configCmd.command("show").description("Show current configuration").action(() => {
|
|
4404
|
-
const clientId = getClientId();
|
|
4405
|
-
const clientSecret = getClientSecret();
|
|
4406
|
-
const email = getUserEmail();
|
|
4407
|
-
const tokens = loadTokens();
|
|
4408
|
-
info(`Base config directory: ${getBaseConfigDir()}`);
|
|
4409
|
-
info(`Profile config directory: ${getConfigDir()}`);
|
|
4410
|
-
info(`Client ID: ${clientId ? `${clientId.substring(0, 20)}...` : source_default.gray("not set")}`);
|
|
4411
|
-
info(`Client Secret: ${clientSecret ? "********" : source_default.gray("not set")}`);
|
|
4412
|
-
info(`Authenticated: ${isAuthenticated() ? source_default.green("Yes") : source_default.red("No")}`);
|
|
4413
|
-
if (email) {
|
|
4414
|
-
info(`Email: ${email}`);
|
|
4415
|
-
}
|
|
4416
|
-
if (tokens) {
|
|
4417
|
-
info(`Token expires: ${new Date(tokens.expiresAt).toLocaleString()}`);
|
|
4418
|
-
}
|
|
4419
|
-
});
|
|
4420
|
-
configCmd.command("clear").description("Clear all configuration and tokens").action(() => {
|
|
4421
|
-
clearConfig();
|
|
4422
|
-
success("Configuration cleared");
|
|
4423
|
-
});
|
|
4424
|
-
var profilesCmd = program2.command("profiles").description("Manage multiple Google Photos profiles");
|
|
4425
|
-
profilesCmd.command("list").description("List all profiles").action(() => {
|
|
4426
|
-
try {
|
|
4427
|
-
const profiles = listProfiles();
|
|
4428
|
-
const current = getCurrentProfile();
|
|
4429
|
-
if (profiles.length === 0) {
|
|
4430
|
-
info("No profiles found");
|
|
4431
|
-
return;
|
|
4432
|
-
}
|
|
4433
|
-
success(`${profiles.length} profile(s):`);
|
|
4434
|
-
for (const p of profiles) {
|
|
4435
|
-
if (p === current) {
|
|
4436
|
-
info(` ${source_default.green("\u2192")} ${p} ${source_default.gray("(current)")}`);
|
|
4437
|
-
} else {
|
|
4438
|
-
info(` ${p}`);
|
|
4439
|
-
}
|
|
4440
|
-
}
|
|
4441
|
-
} catch (err) {
|
|
4442
|
-
error(String(err));
|
|
4443
|
-
process.exit(1);
|
|
4444
|
-
}
|
|
4445
|
-
});
|
|
4446
|
-
profilesCmd.command("current").description("Show current profile").action(() => {
|
|
4447
|
-
const current = getCurrentProfile();
|
|
4448
|
-
info(`Current profile: ${source_default.green(current)}`);
|
|
4449
|
-
info(`Config directory: ${getConfigDir()}`);
|
|
4450
|
-
});
|
|
4451
|
-
profilesCmd.command("create <name>").description("Create a new profile").action((name) => {
|
|
4452
|
-
try {
|
|
4453
|
-
createProfile(name);
|
|
4454
|
-
success(`Profile "${name}" created`);
|
|
4455
|
-
info(`Switch to it with: connect-googlephotos profiles switch ${name}`);
|
|
4456
|
-
} catch (err) {
|
|
4457
|
-
error(String(err));
|
|
4458
|
-
process.exit(1);
|
|
4459
|
-
}
|
|
4460
|
-
});
|
|
4461
|
-
profilesCmd.command("switch <name>").alias("use").description("Switch to a different profile").action((name) => {
|
|
4462
|
-
try {
|
|
4463
|
-
setCurrentProfile(name);
|
|
4464
|
-
success(`Switched to profile "${name}"`);
|
|
4465
|
-
info(`Config directory: ${getConfigDir()}`);
|
|
4466
|
-
if (isAuthenticated()) {
|
|
4467
|
-
const email = getUserEmail();
|
|
4468
|
-
if (email) {
|
|
4469
|
-
info(`Logged in as: ${email}`);
|
|
4470
|
-
}
|
|
4471
|
-
} else {
|
|
4472
|
-
warn('Profile not authenticated. Run "connect-googlephotos auth login"');
|
|
4473
|
-
}
|
|
4474
|
-
} catch (err) {
|
|
4475
|
-
error(String(err));
|
|
4476
|
-
process.exit(1);
|
|
4477
|
-
}
|
|
4478
|
-
});
|
|
4479
|
-
profilesCmd.command("delete <name>").description("Delete a profile").action((name) => {
|
|
4480
|
-
try {
|
|
4481
|
-
deleteProfile(name);
|
|
4482
|
-
success(`Profile "${name}" deleted`);
|
|
4483
|
-
} catch (err) {
|
|
4484
|
-
error(String(err));
|
|
4485
|
-
process.exit(1);
|
|
4486
|
-
}
|
|
4487
|
-
});
|
|
4488
|
-
profilesCmd.command("show").description("Show all profiles with their status").action(async () => {
|
|
4489
|
-
try {
|
|
4490
|
-
const profiles = listProfiles();
|
|
4491
|
-
const current = getCurrentProfile();
|
|
4492
|
-
if (profiles.length === 0) {
|
|
4493
|
-
info("No profiles found");
|
|
4494
|
-
return;
|
|
4495
|
-
}
|
|
4496
|
-
success(`${profiles.length} profile(s):
|
|
4497
|
-
`);
|
|
4498
|
-
for (const p of profiles) {
|
|
4499
|
-
setProfileOverride(p);
|
|
4500
|
-
const authenticated = isAuthenticated();
|
|
4501
|
-
const email = authenticated ? getUserEmail() : null;
|
|
4502
|
-
setProfileOverride(undefined);
|
|
4503
|
-
const isCurrent = p === current;
|
|
4504
|
-
const marker = isCurrent ? source_default.green("\u2192") : " ";
|
|
4505
|
-
const status = authenticated ? source_default.green("authenticated") : source_default.yellow("not authenticated");
|
|
4506
|
-
const emailStr = email ? source_default.gray(`(${email})`) : "";
|
|
4507
|
-
const currentStr = isCurrent ? source_default.gray(" [current]") : "";
|
|
4508
|
-
info(` ${marker} ${p}${currentStr}`);
|
|
4509
|
-
info(` Status: ${status} ${emailStr}`);
|
|
4510
|
-
}
|
|
4511
|
-
} catch (err) {
|
|
4512
|
-
error(String(err));
|
|
4513
|
-
process.exit(1);
|
|
4514
|
-
}
|
|
4515
|
-
});
|
|
4516
|
-
var albumsCmd = program2.command("albums").description("Album management commands");
|
|
4517
|
-
albumsCmd.command("list").description("List all albums").option("-n, --max <number>", "Maximum albums to return", "50").option("--shared", "List shared albums instead").action(async (opts) => {
|
|
4518
|
-
try {
|
|
4519
|
-
const photos = requireAuth();
|
|
4520
|
-
let albums;
|
|
4521
|
-
if (opts.shared) {
|
|
4522
|
-
const response = await photos.albums.listShared({ pageSize: parseInt(opts.max) });
|
|
4523
|
-
albums = response.albums || [];
|
|
4524
|
-
} else {
|
|
4525
|
-
const response = await photos.albums.list({ pageSize: parseInt(opts.max) });
|
|
4526
|
-
albums = response.albums || [];
|
|
4527
|
-
}
|
|
4528
|
-
if (albums.length === 0) {
|
|
4529
|
-
info("No albums found");
|
|
4530
|
-
return;
|
|
4531
|
-
}
|
|
4532
|
-
success(`Found ${albums.length} album(s):`);
|
|
4533
|
-
const formatted = albums.map((album) => ({
|
|
4534
|
-
id: album.id,
|
|
4535
|
-
title: album.title,
|
|
4536
|
-
itemCount: album.mediaItemsCount || "0",
|
|
4537
|
-
shared: album.shareInfo ? "Yes" : "No"
|
|
4538
|
-
}));
|
|
4539
|
-
print(formatted, getFormat(albumsCmd));
|
|
4540
|
-
} catch (err) {
|
|
4541
|
-
error(String(err));
|
|
4542
|
-
process.exit(1);
|
|
4543
|
-
}
|
|
4544
|
-
});
|
|
4545
|
-
albumsCmd.command("get <albumId>").description("Get album details").action(async (albumId) => {
|
|
4546
|
-
try {
|
|
4547
|
-
const photos = requireAuth();
|
|
4548
|
-
const album = await photos.albums.get(albumId);
|
|
4549
|
-
print(album, getFormat(albumsCmd));
|
|
4550
|
-
} catch (err) {
|
|
4551
|
-
error(String(err));
|
|
4552
|
-
process.exit(1);
|
|
4553
|
-
}
|
|
4554
|
-
});
|
|
4555
|
-
albumsCmd.command("create <title>").description("Create a new album").action(async (title) => {
|
|
4556
|
-
try {
|
|
4557
|
-
const photos = requireAuth();
|
|
4558
|
-
const album = await photos.albums.create(title);
|
|
4559
|
-
success(`Album created: ${album.title}`);
|
|
4560
|
-
info(`Album ID: ${album.id}`);
|
|
4561
|
-
info(`URL: ${album.productUrl}`);
|
|
4562
|
-
} catch (err) {
|
|
4563
|
-
error(String(err));
|
|
4564
|
-
process.exit(1);
|
|
4565
|
-
}
|
|
4566
|
-
});
|
|
4567
|
-
albumsCmd.command("share <albumId>").description("Share an album").option("--collaborative", "Allow others to add photos").option("--commentable", "Allow comments").action(async (albumId, opts) => {
|
|
4568
|
-
try {
|
|
4569
|
-
const photos = requireAuth();
|
|
4570
|
-
const result = await photos.albums.share(albumId, {
|
|
4571
|
-
isCollaborative: opts.collaborative || false,
|
|
4572
|
-
isCommentable: opts.commentable || false
|
|
4573
|
-
});
|
|
4574
|
-
success("Album shared!");
|
|
4575
|
-
info(`Share URL: ${result.shareInfo.shareableUrl}`);
|
|
4576
|
-
info(`Share token: ${result.shareInfo.shareToken}`);
|
|
4577
|
-
} catch (err) {
|
|
4578
|
-
error(String(err));
|
|
4579
|
-
process.exit(1);
|
|
4580
|
-
}
|
|
4581
|
-
});
|
|
4582
|
-
albumsCmd.command("unshare <albumId>").description("Unshare an album").action(async (albumId) => {
|
|
4583
|
-
try {
|
|
4584
|
-
const photos = requireAuth();
|
|
4585
|
-
await photos.albums.unshare(albumId);
|
|
4586
|
-
success("Album unshared");
|
|
4587
|
-
} catch (err) {
|
|
4588
|
-
error(String(err));
|
|
4589
|
-
process.exit(1);
|
|
4590
|
-
}
|
|
4591
|
-
});
|
|
4592
|
-
albumsCmd.command("contents <albumId>").description("List media items in an album").option("-n, --max <number>", "Maximum items to return", "25").action(async (albumId, opts) => {
|
|
4593
|
-
try {
|
|
4594
|
-
const photos = requireAuth();
|
|
4595
|
-
const items = await photos.media.getInAlbum(albumId);
|
|
4596
|
-
if (items.length === 0) {
|
|
4597
|
-
info("No items in album");
|
|
4598
|
-
return;
|
|
4599
|
-
}
|
|
4600
|
-
success(`Found ${items.length} item(s) in album:`);
|
|
4601
|
-
const formatted = items.slice(0, parseInt(opts.max)).map((item) => ({
|
|
4602
|
-
id: item.id,
|
|
4603
|
-
filename: item.filename,
|
|
4604
|
-
type: item.mediaMetadata.photo ? "Photo" : "Video",
|
|
4605
|
-
created: item.mediaMetadata.creationTime,
|
|
4606
|
-
size: `${item.mediaMetadata.width}x${item.mediaMetadata.height}`
|
|
4607
|
-
}));
|
|
4608
|
-
print(formatted, getFormat(albumsCmd));
|
|
4609
|
-
} catch (err) {
|
|
4610
|
-
error(String(err));
|
|
4611
|
-
process.exit(1);
|
|
4612
|
-
}
|
|
4613
|
-
});
|
|
4614
|
-
var mediaCmd = program2.command("media").description("Media item commands");
|
|
4615
|
-
mediaCmd.command("list").description("List media items in your library").option("-n, --max <number>", "Maximum items to return", "25").action(async (opts) => {
|
|
4616
|
-
try {
|
|
4617
|
-
const photos = requireAuth();
|
|
4618
|
-
const response = await photos.media.list({ pageSize: parseInt(opts.max) });
|
|
4619
|
-
if (!response.mediaItems || response.mediaItems.length === 0) {
|
|
4620
|
-
info("No media items found");
|
|
4621
|
-
return;
|
|
4622
|
-
}
|
|
4623
|
-
success(`Found ${response.mediaItems.length} item(s):`);
|
|
4624
|
-
const formatted = response.mediaItems.map((item) => ({
|
|
4625
|
-
id: item.id,
|
|
4626
|
-
filename: item.filename,
|
|
4627
|
-
type: item.mediaMetadata.photo ? "Photo" : "Video",
|
|
4628
|
-
created: item.mediaMetadata.creationTime,
|
|
4629
|
-
size: `${item.mediaMetadata.width}x${item.mediaMetadata.height}`
|
|
4630
|
-
}));
|
|
4631
|
-
print(formatted, getFormat(mediaCmd));
|
|
4632
|
-
} catch (err) {
|
|
4633
|
-
error(String(err));
|
|
4634
|
-
process.exit(1);
|
|
4635
|
-
}
|
|
4636
|
-
});
|
|
4637
|
-
mediaCmd.command("get <mediaItemId>").description("Get details of a specific media item").action(async (mediaItemId) => {
|
|
4638
|
-
try {
|
|
4639
|
-
const photos = requireAuth();
|
|
4640
|
-
const item = await photos.media.get(mediaItemId);
|
|
4641
|
-
print(item, getFormat(mediaCmd));
|
|
4642
|
-
} catch (err) {
|
|
4643
|
-
error(String(err));
|
|
4644
|
-
process.exit(1);
|
|
4645
|
-
}
|
|
4646
|
-
});
|
|
4647
|
-
mediaCmd.command("search").description("Search for media items").option("--category <category>", "Filter by category (LANDSCAPES, SELFIES, PEOPLE, PETS, etc.)").option("--type <type>", "Filter by type (PHOTO, VIDEO)").option("--favorites", "Only show favorites").option("-n, --max <number>", "Maximum items to return", "25").action(async (opts) => {
|
|
4648
|
-
try {
|
|
4649
|
-
const photos = requireAuth();
|
|
4650
|
-
let items;
|
|
4651
|
-
if (opts.favorites) {
|
|
4652
|
-
items = await photos.media.getFavorites({ pageSize: parseInt(opts.max) });
|
|
4653
|
-
} else if (opts.category) {
|
|
4654
|
-
items = await photos.media.searchByCategory([opts.category.toUpperCase()], { pageSize: parseInt(opts.max) });
|
|
4655
|
-
} else if (opts.type) {
|
|
4656
|
-
items = await photos.media.searchByMediaType([opts.type.toUpperCase()], { pageSize: parseInt(opts.max) });
|
|
4657
|
-
} else {
|
|
4658
|
-
const response = await photos.media.search({ pageSize: parseInt(opts.max) });
|
|
4659
|
-
items = response.mediaItems || [];
|
|
4660
|
-
}
|
|
4661
|
-
if (items.length === 0) {
|
|
4662
|
-
info("No media items found");
|
|
4663
|
-
return;
|
|
4664
|
-
}
|
|
4665
|
-
success(`Found ${items.length} item(s):`);
|
|
4666
|
-
const formatted = items.slice(0, parseInt(opts.max)).map((item) => ({
|
|
4667
|
-
id: item.id,
|
|
4668
|
-
filename: item.filename,
|
|
4669
|
-
type: item.mediaMetadata.photo ? "Photo" : "Video",
|
|
4670
|
-
created: item.mediaMetadata.creationTime
|
|
4671
|
-
}));
|
|
4672
|
-
print(formatted, getFormat(mediaCmd));
|
|
4673
|
-
} catch (err) {
|
|
4674
|
-
error(String(err));
|
|
4675
|
-
process.exit(1);
|
|
4676
|
-
}
|
|
4677
|
-
});
|
|
4678
|
-
mediaCmd.command("download <mediaItemId>").description("Download a media item").option("-o, --output <path>", "Output file path").option("-w, --width <number>", "Width for photos").option("-h, --height <number>", "Height for photos").action(async (mediaItemId, opts) => {
|
|
4679
|
-
try {
|
|
4680
|
-
const photos = requireAuth();
|
|
4681
|
-
const item = await photos.media.get(mediaItemId);
|
|
4682
|
-
info(`Downloading: ${item.filename}`);
|
|
4683
|
-
const buffer = await photos.media.download(item, opts.width ? parseInt(opts.width) : undefined, opts.height ? parseInt(opts.height) : undefined);
|
|
4684
|
-
const outputPath = opts.output || join2(ensureDownloadsDir(), item.filename);
|
|
4685
|
-
writeFileSync2(outputPath, buffer);
|
|
4686
|
-
success(`Downloaded to: ${outputPath}`);
|
|
4687
|
-
info(`Size: ${formatBytes(buffer.length)}`);
|
|
4688
|
-
} catch (err) {
|
|
4689
|
-
error(String(err));
|
|
4690
|
-
process.exit(1);
|
|
4691
|
-
}
|
|
4692
|
-
});
|
|
4693
|
-
mediaCmd.command("url <mediaItemId>").description("Get download URL for a media item").option("-w, --width <number>", "Width for photos").option("-h, --height <number>", "Height for photos").action(async (mediaItemId, opts) => {
|
|
4694
|
-
try {
|
|
4695
|
-
const photos = requireAuth();
|
|
4696
|
-
const item = await photos.media.get(mediaItemId);
|
|
4697
|
-
const url = photos.media.getDownloadUrl(item, opts.width ? parseInt(opts.width) : undefined, opts.height ? parseInt(opts.height) : undefined);
|
|
4698
|
-
info(`Filename: ${item.filename}`);
|
|
4699
|
-
info(`URL: ${url}`);
|
|
4700
|
-
} catch (err) {
|
|
4701
|
-
error(String(err));
|
|
4702
|
-
process.exit(1);
|
|
4703
|
-
}
|
|
4704
|
-
});
|
|
4705
|
-
var uploadCmd = program2.command("upload").description("Upload photos and videos");
|
|
4706
|
-
uploadCmd.command("file <path>").description("Upload a single file").option("-a, --album <albumId>", "Add to album").option("-d, --description <text>", "Description for the media item").action(async (filePath, opts) => {
|
|
4707
|
-
try {
|
|
4708
|
-
const photos = requireAuth();
|
|
4709
|
-
if (!existsSync2(filePath)) {
|
|
4710
|
-
error(`File not found: ${filePath}`);
|
|
4711
|
-
process.exit(1);
|
|
4712
|
-
}
|
|
4713
|
-
if (!photos.upload.isSupported(filePath)) {
|
|
4714
|
-
error(`Unsupported file type. Supported: ${photos.upload.getSupportedExtensions().join(", ")}`);
|
|
4715
|
-
process.exit(1);
|
|
4716
|
-
}
|
|
4717
|
-
info(`Uploading: ${basename2(filePath)}`);
|
|
4718
|
-
const item = await photos.upload.uploadAndCreate(filePath, {
|
|
4719
|
-
description: opts.description,
|
|
4720
|
-
albumId: opts.album
|
|
4721
|
-
});
|
|
4722
|
-
if (item) {
|
|
4723
|
-
success("Upload complete!");
|
|
4724
|
-
info(`Media ID: ${item.id}`);
|
|
4725
|
-
info(`URL: ${item.productUrl}`);
|
|
4726
|
-
} else {
|
|
4727
|
-
warn("Upload succeeded but no media item returned");
|
|
4728
|
-
}
|
|
4729
|
-
} catch (err) {
|
|
4730
|
-
error(String(err));
|
|
4731
|
-
process.exit(1);
|
|
4732
|
-
}
|
|
4733
|
-
});
|
|
4734
|
-
uploadCmd.command("dir <path>").description("Upload all photos/videos from a directory").option("-a, --album <albumId>", "Add to album").option("-r, --recursive", "Include subdirectories").action(async (dirPath, opts) => {
|
|
4735
|
-
try {
|
|
4736
|
-
const photos = requireAuth();
|
|
4737
|
-
if (!existsSync2(dirPath)) {
|
|
4738
|
-
error(`Directory not found: ${dirPath}`);
|
|
4739
|
-
process.exit(1);
|
|
4740
|
-
}
|
|
4741
|
-
info(`Scanning directory: ${dirPath}`);
|
|
4742
|
-
const result = await photos.upload.uploadDirectory(dirPath, {
|
|
4743
|
-
albumId: opts.album,
|
|
4744
|
-
recursive: opts.recursive,
|
|
4745
|
-
onProgress: (completed, total, filename) => {
|
|
4746
|
-
if (completed < total) {
|
|
4747
|
-
info(`[${completed + 1}/${total}] Uploading: ${filename}`);
|
|
4748
|
-
}
|
|
4749
|
-
}
|
|
4750
|
-
});
|
|
4751
|
-
const succeeded = result.newMediaItemResults.filter((r) => r.mediaItem).length;
|
|
4752
|
-
const failed = result.newMediaItemResults.filter((r) => !r.mediaItem).length;
|
|
4753
|
-
success(`Upload complete!`);
|
|
4754
|
-
info(`Succeeded: ${succeeded}`);
|
|
4755
|
-
if (failed > 0) {
|
|
4756
|
-
warn(`Failed: ${failed}`);
|
|
4757
|
-
}
|
|
4758
|
-
} catch (err) {
|
|
4759
|
-
error(String(err));
|
|
4760
|
-
process.exit(1);
|
|
4761
|
-
}
|
|
4762
|
-
});
|
|
4763
|
-
uploadCmd.command("supported").description("List supported file types").action(() => {
|
|
4764
|
-
const photos = GooglePhotos.create();
|
|
4765
|
-
const extensions = photos.upload.getSupportedExtensions();
|
|
4766
|
-
info("Supported file types:");
|
|
4767
|
-
info(extensions.join(", "));
|
|
4768
|
-
});
|
|
4769
|
-
var bulkCmd = program2.command("bulk").description("Bulk operations on media items and albums");
|
|
4770
|
-
bulkCmd.command("preview").description("Preview media items matching filters").option("--album-id <albumId>", "Filter by album").option("--type <type>", "Filter by media type (PHOTO, VIDEO)").option("--favorites", "Only show favorites").option("-n, --max <number>", "Maximum results", "50").action(async (opts) => {
|
|
4771
|
-
try {
|
|
4772
|
-
const photos = requireAuth();
|
|
4773
|
-
const bulk = new BulkApi(photos.getClient());
|
|
4774
|
-
const result = await bulk.preview({
|
|
4775
|
-
albumId: opts.albumId,
|
|
4776
|
-
mediaType: opts.type,
|
|
4777
|
-
favoritesOnly: opts.favorites,
|
|
4778
|
-
maxResults: parseInt(opts.max)
|
|
4779
|
-
});
|
|
4780
|
-
success(`Found ${result.total} item(s):`);
|
|
4781
|
-
print(result.items, getFormat(bulkCmd));
|
|
4782
|
-
} catch (err) {
|
|
4783
|
-
error(String(err));
|
|
4784
|
-
process.exit(1);
|
|
4785
|
-
}
|
|
4786
|
-
});
|
|
4787
|
-
bulkCmd.command("add-to-album <albumId>").description("Bulk add media items to an album").option("--query-album-id <albumId>", "Filter by album to discover items").option("--type <type>", "Filter by media type").option("--favorites", "Only favorites").option("-n, --max <number>", "Maximum results", "100").option("--concurrency <number>", "Max concurrent operations", "10").option("--dry-run", "Preview without adding").action(async (albumId, opts) => {
|
|
4788
|
-
try {
|
|
4789
|
-
const photos = requireAuth();
|
|
4790
|
-
const bulk = new BulkApi(photos.getClient());
|
|
4791
|
-
const result = await bulk.addToAlbum({
|
|
4792
|
-
targetAlbumId: albumId,
|
|
4793
|
-
albumId: opts.queryAlbumId,
|
|
4794
|
-
mediaType: opts.type,
|
|
4795
|
-
favoritesOnly: opts.favorites,
|
|
4796
|
-
maxResults: parseInt(opts.max),
|
|
4797
|
-
concurrency: parseInt(opts.concurrency),
|
|
4798
|
-
dryRun: opts.dryRun || false,
|
|
4799
|
-
onProgress: (cur, total) => {
|
|
4800
|
-
process.stdout.write(`\r Progress: ${cur}/${total}`);
|
|
4801
|
-
},
|
|
4802
|
-
onError: (err, item) => {
|
|
4803
|
-
warn(`Failed: ${item.filename} - ${err.message}`);
|
|
4804
|
-
}
|
|
4805
|
-
});
|
|
4806
|
-
process.stdout.write(`
|
|
4807
|
-
`);
|
|
4808
|
-
if (opts.dryRun) {
|
|
4809
|
-
info(`Dry run: would add ${result.success} item(s) to album`);
|
|
4810
|
-
} else {
|
|
4811
|
-
success(`Added ${result.success} item(s) to album, ${result.failed} failed`);
|
|
4812
|
-
}
|
|
4813
|
-
if (result.errors.length > 0) {
|
|
4814
|
-
print(result.errors, "pretty");
|
|
4815
|
-
}
|
|
4816
|
-
} catch (err) {
|
|
4817
|
-
error(String(err));
|
|
4818
|
-
process.exit(1);
|
|
4819
|
-
}
|
|
4820
|
-
});
|
|
4821
|
-
bulkCmd.command("remove-from-album <albumId>").description("Bulk remove media items from an album").option("--media-ids <ids>", "Comma-separated media item IDs").option("-n, --max <number>", "Maximum results", "100").option("--concurrency <number>", "Max concurrent operations", "10").option("--dry-run", "Preview without removing").action(async (albumId, opts) => {
|
|
4822
|
-
try {
|
|
4823
|
-
const photos = requireAuth();
|
|
4824
|
-
const bulk = new BulkApi(photos.getClient());
|
|
4825
|
-
const mediaItemIds = opts.mediaIds ? opts.mediaIds.split(",") : undefined;
|
|
4826
|
-
const result = await bulk.removeFromAlbum({
|
|
4827
|
-
albumId,
|
|
4828
|
-
mediaItemIds,
|
|
4829
|
-
maxResults: parseInt(opts.max),
|
|
4830
|
-
concurrency: parseInt(opts.concurrency),
|
|
4831
|
-
dryRun: opts.dryRun || false,
|
|
4832
|
-
onProgress: (cur, total) => {
|
|
4833
|
-
process.stdout.write(`\r Progress: ${cur}/${total}`);
|
|
4834
|
-
},
|
|
4835
|
-
onError: (err, item) => {
|
|
4836
|
-
warn(`Failed: ${item.filename} - ${err.message}`);
|
|
4837
|
-
}
|
|
4838
|
-
});
|
|
4839
|
-
process.stdout.write(`
|
|
4840
|
-
`);
|
|
4841
|
-
if (opts.dryRun) {
|
|
4842
|
-
info(`Dry run: would remove ${result.success} item(s) from album`);
|
|
4843
|
-
} else {
|
|
4844
|
-
success(`Removed ${result.success} item(s) from album, ${result.failed} failed`);
|
|
4845
|
-
}
|
|
4846
|
-
if (result.errors.length > 0) {
|
|
4847
|
-
print(result.errors, "pretty");
|
|
4848
|
-
}
|
|
4849
|
-
} catch (err) {
|
|
4850
|
-
error(String(err));
|
|
4851
|
-
process.exit(1);
|
|
4852
|
-
}
|
|
4853
|
-
});
|
|
4854
|
-
bulkCmd.command("create-albums").description("Bulk create albums from titles").option("--titles <titles>", "Comma-separated album titles").option("--titles-file <path>", "File with one title per line").option("--concurrency <number>", "Max concurrent operations", "10").option("--dry-run", "Preview without creating").action(async (opts) => {
|
|
4855
|
-
let titles = [];
|
|
4856
|
-
if (opts.titles) {
|
|
4857
|
-
titles = opts.titles.split(",").map((t) => t.trim()).filter(Boolean);
|
|
4858
|
-
} else if (opts.titlesFile) {
|
|
4859
|
-
if (!existsSync2(opts.titlesFile)) {
|
|
4860
|
-
error(`File not found: ${opts.titlesFile}`);
|
|
4861
|
-
process.exit(1);
|
|
4862
|
-
}
|
|
4863
|
-
titles = __require("fs").readFileSync(opts.titlesFile, "utf-8").split(`
|
|
4864
|
-
`).map((t) => t.trim()).filter(Boolean);
|
|
4865
|
-
}
|
|
4866
|
-
if (titles.length === 0) {
|
|
4867
|
-
error("Provide --titles or --titles-file");
|
|
4868
|
-
process.exit(1);
|
|
4869
|
-
}
|
|
4870
|
-
try {
|
|
4871
|
-
const photos = requireAuth();
|
|
4872
|
-
const bulk = new BulkApi(photos.getClient());
|
|
4873
|
-
const result = await bulk.createAlbums({
|
|
4874
|
-
titles,
|
|
4875
|
-
concurrency: parseInt(opts.concurrency),
|
|
4876
|
-
dryRun: opts.dryRun || false,
|
|
4877
|
-
onProgress: (cur, total) => {
|
|
4878
|
-
process.stdout.write(`\r Progress: ${cur}/${total}`);
|
|
4879
|
-
},
|
|
4880
|
-
onError: (err, title) => {
|
|
4881
|
-
warn(`Failed: ${title} - ${err.message}`);
|
|
4882
|
-
}
|
|
4883
|
-
});
|
|
4884
|
-
process.stdout.write(`
|
|
4885
|
-
`);
|
|
4886
|
-
if (opts.dryRun) {
|
|
4887
|
-
info(`Dry run: would create ${result.success} album(s)`);
|
|
4888
|
-
} else {
|
|
4889
|
-
success(`Created ${result.success} album(s), ${result.failed} failed`);
|
|
4890
|
-
}
|
|
4891
|
-
if (result.errors.length > 0) {
|
|
4892
|
-
print(result.errors, "pretty");
|
|
4893
|
-
}
|
|
4894
|
-
} catch (err) {
|
|
4895
|
-
error(String(err));
|
|
4896
|
-
process.exit(1);
|
|
4897
|
-
}
|
|
4898
|
-
});
|
|
4899
|
-
bulkCmd.command("favorites").description("List favorite media items").option("-n, --max <number>", "Maximum results", "100").action(async (opts) => {
|
|
4900
|
-
try {
|
|
4901
|
-
const photos = requireAuth();
|
|
4902
|
-
const bulk = new BulkApi(photos.getClient());
|
|
4903
|
-
const result = await bulk.listFavorites({ maxResults: parseInt(opts.max) });
|
|
4904
|
-
success(`Found ${result.total} favorite(s):`);
|
|
4905
|
-
print(result.items, getFormat(bulkCmd));
|
|
4906
|
-
} catch (err) {
|
|
4907
|
-
error(String(err));
|
|
4908
|
-
process.exit(1);
|
|
4909
|
-
}
|
|
4910
|
-
});
|
|
4911
|
-
program2.parse();
|