@hasna/connectors 1.3.30 → 1.3.32
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/LICENSE +1 -1
- package/README.md +9 -0
- package/bin/index.js +461 -1702
- package/bin/mcp.js +583 -1768
- package/bin/serve.js +647 -1875
- package/connectors/{imessage → connect-github}/bin/index.js +892 -390
- package/connectors/connect-github/dist/index.js +520 -0
- package/connectors/{cloudflare → connect-yousign}/bun.lock +3 -3
- package/connectors/connect-yousign/node_modules/@types/bun/LICENSE +21 -0
- package/connectors/connect-yousign/node_modules/@types/bun/README.md +20 -0
- package/connectors/connect-yousign/node_modules/@types/bun/index.d.ts +1 -0
- package/connectors/connect-yousign/node_modules/@types/bun/package.json +53 -0
- package/connectors/connect-yousign/node_modules/@types/node/LICENSE +21 -0
- package/connectors/connect-yousign/node_modules/@types/node/README.md +15 -0
- package/connectors/connect-yousign/node_modules/@types/node/assert/strict.d.ts +105 -0
- package/connectors/connect-yousign/node_modules/@types/node/assert.d.ts +955 -0
- package/connectors/connect-yousign/node_modules/@types/node/async_hooks.d.ts +623 -0
- package/connectors/connect-yousign/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/connectors/connect-yousign/node_modules/@types/node/buffer.d.ts +1810 -0
- package/connectors/connect-yousign/node_modules/@types/node/child_process.d.ts +1433 -0
- package/connectors/connect-yousign/node_modules/@types/node/cluster.d.ts +486 -0
- package/connectors/connect-yousign/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/@types/node/console.d.ts +151 -0
- package/connectors/connect-yousign/node_modules/@types/node/constants.d.ts +20 -0
- package/connectors/connect-yousign/node_modules/@types/node/crypto.d.ts +4065 -0
- package/connectors/connect-yousign/node_modules/@types/node/dgram.d.ts +564 -0
- package/connectors/connect-yousign/node_modules/@types/node/diagnostics_channel.d.ts +576 -0
- package/connectors/connect-yousign/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/connectors/connect-yousign/node_modules/@types/node/dns.d.ts +922 -0
- package/connectors/connect-yousign/node_modules/@types/node/domain.d.ts +166 -0
- package/connectors/connect-yousign/node_modules/@types/node/events.d.ts +1047 -0
- package/connectors/connect-yousign/node_modules/@types/node/fs/promises.d.ts +1329 -0
- package/connectors/connect-yousign/node_modules/@types/node/fs.d.ts +4678 -0
- package/connectors/connect-yousign/node_modules/@types/node/globals.d.ts +150 -0
- package/connectors/connect-yousign/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/connectors/connect-yousign/node_modules/@types/node/http.d.ts +2188 -0
- package/connectors/connect-yousign/node_modules/@types/node/http2.d.ts +2480 -0
- package/connectors/connect-yousign/node_modules/@types/node/https.d.ts +405 -0
- package/connectors/connect-yousign/node_modules/@types/node/index.d.ts +115 -0
- package/connectors/connect-yousign/node_modules/@types/node/inspector/promises.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/@types/node/inspector.d.ts +269 -0
- package/connectors/connect-yousign/node_modules/@types/node/inspector.generated.d.ts +4401 -0
- package/connectors/connect-yousign/node_modules/@types/node/module.d.ts +757 -0
- package/connectors/connect-yousign/node_modules/@types/node/net.d.ts +933 -0
- package/connectors/connect-yousign/node_modules/@types/node/os.d.ts +507 -0
- package/connectors/connect-yousign/node_modules/@types/node/package.json +155 -0
- package/connectors/connect-yousign/node_modules/@types/node/path/posix.d.ts +8 -0
- package/connectors/connect-yousign/node_modules/@types/node/path/win32.d.ts +8 -0
- package/connectors/connect-yousign/node_modules/@types/node/path.d.ts +187 -0
- package/connectors/connect-yousign/node_modules/@types/node/perf_hooks.d.ts +643 -0
- package/connectors/connect-yousign/node_modules/@types/node/process.d.ts +2175 -0
- package/connectors/connect-yousign/node_modules/@types/node/punycode.d.ts +117 -0
- package/connectors/connect-yousign/node_modules/@types/node/querystring.d.ts +152 -0
- package/connectors/connect-yousign/node_modules/@types/node/quic.d.ts +910 -0
- package/connectors/connect-yousign/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/connectors/connect-yousign/node_modules/@types/node/readline.d.ts +542 -0
- package/connectors/connect-yousign/node_modules/@types/node/repl.d.ts +415 -0
- package/connectors/connect-yousign/node_modules/@types/node/sea.d.ts +162 -0
- package/connectors/connect-yousign/node_modules/@types/node/sqlite.d.ts +1065 -0
- package/connectors/connect-yousign/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/connectors/connect-yousign/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/connectors/connect-yousign/node_modules/@types/node/stream/web.d.ts +296 -0
- package/connectors/connect-yousign/node_modules/@types/node/stream.d.ts +1770 -0
- package/connectors/connect-yousign/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/connectors/connect-yousign/node_modules/@types/node/test/reporters.d.ts +96 -0
- package/connectors/connect-yousign/node_modules/@types/node/test.d.ts +2275 -0
- package/connectors/connect-yousign/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/connectors/connect-yousign/node_modules/@types/node/timers.d.ts +159 -0
- package/connectors/connect-yousign/node_modules/@types/node/tls.d.ts +1203 -0
- package/connectors/connect-yousign/node_modules/@types/node/trace_events.d.ts +197 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.6/index.d.ts +117 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/connectors/connect-yousign/node_modules/@types/node/ts5.7/index.d.ts +117 -0
- package/connectors/connect-yousign/node_modules/@types/node/tty.d.ts +250 -0
- package/connectors/connect-yousign/node_modules/@types/node/url.d.ts +541 -0
- package/connectors/connect-yousign/node_modules/@types/node/util/types.d.ts +558 -0
- package/connectors/connect-yousign/node_modules/@types/node/util.d.ts +1687 -0
- package/connectors/connect-yousign/node_modules/@types/node/v8.d.ts +988 -0
- package/connectors/connect-yousign/node_modules/@types/node/vm.d.ts +1208 -0
- package/connectors/connect-yousign/node_modules/@types/node/wasi.d.ts +202 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/connectors/connect-yousign/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/@types/node/worker_threads.d.ts +717 -0
- package/connectors/connect-yousign/node_modules/@types/node/zlib.d.ts +682 -0
- package/connectors/connect-yousign/node_modules/bun-types/CLAUDE.md +105 -0
- package/connectors/connect-yousign/node_modules/bun-types/README.md +33 -0
- package/connectors/connect-yousign/node_modules/bun-types/bun.d.ts +8481 -0
- package/connectors/connect-yousign/node_modules/bun-types/bun.ns.d.ts +5 -0
- package/connectors/connect-yousign/node_modules/bun-types/bundle.d.ts +74 -0
- package/connectors/connect-yousign/node_modules/bun-types/deprecated.d.ts +184 -0
- package/connectors/connect-yousign/node_modules/bun-types/devserver.d.ts +187 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/README.md +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/bytecode.mdx +447 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/css.mdx +1024 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/esbuild.mdx +304 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/executables.mdx +1318 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/fullstack.mdx +1086 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/hot-reloading.mdx +229 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/html-static.mdx +498 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/index.mdx +1840 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/loaders.mdx +451 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/macros.mdx +328 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/minifier.mdx +1286 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/plugins.mdx +477 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/bundler/standalone-html.mdx +314 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/feedback.mdx +75 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-array.mdx +29 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-blob.mdx +26 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-buffer.mdx +27 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-string.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/arraybuffer-to-typedarray.mdx +41 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-arraybuffer.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-dataview.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-stream.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-string.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/blob-to-typedarray.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-arraybuffer.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-blob.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-readablestream.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-string.mdx +27 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/buffer-to-typedarray.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/dataview-to-string.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-arraybuffer.mdx +27 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-blob.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-buffer.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-dataview.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-readablestream.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/binary/typedarray-to-string.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/aws-lambda.mdx +204 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/digital-ocean.mdx +161 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/google-cloud-run.mdx +194 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/railway.mdx +145 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/render.mdx +82 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/deployment/vercel.mdx +97 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/astro.mdx +82 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/discordjs.mdx +80 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/docker.mdx +151 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/drizzle.mdx +195 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/elysia.mdx +31 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/express.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/gel.mdx +261 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/hono.mdx +47 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/mongoose.mdx +92 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-drizzle.mdx +234 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/neon-serverless-postgres.mdx +60 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nextjs.mdx +103 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/nuxt.mdx +96 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/pm2.mdx +55 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma-postgres.mdx +169 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/prisma.mdx +164 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/qwik.mdx +114 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/react.mdx +52 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/remix.mdx +97 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sentry.mdx +54 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/solidstart.mdx +62 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/ssr-react.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/stric.mdx +54 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/sveltekit.mdx +138 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/systemd.mdx +114 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/tanstack-start.mdx +791 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/upstash.mdx +87 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/ecosystem/vite.mdx +77 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-links.mdx +71 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/html-rewriter/extract-social-meta.mdx +97 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/cluster.mdx +69 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch-unix.mdx +35 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/fetch.mdx +26 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/file-uploads.mdx +97 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/hot.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/proxy.mdx +50 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/server.mdx +48 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/simple.mdx +20 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-file.mdx +50 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-iterator.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/stream-node-streams-in-bun.mdx +22 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/http/tls.mdx +32 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/index.mdx +10 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-dev.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-git.mdx +40 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-optional.mdx +27 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-peer.mdx +45 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add-tarball.mdx +35 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/add.mdx +44 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/azure-artifacts.mdx +76 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/cicd.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/custom-registry.mdx +32 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/from-npm-install-to-bun-install.mdx +230 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/git-diff-bun-lockfile.mdx +48 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/jfrog-artifactory.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/npm-alias.mdx +25 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/registry-scope.mdx +40 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/trusted.mdx +52 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/workspaces.mdx +70 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/install/yarnlock.mdx +51 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/argv.mdx +66 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ctrl-c.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/ipc.mdx +69 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/nanoseconds.mdx +15 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/os-signals.mdx +31 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stderr.mdx +34 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn-stdout.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/spawn.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/process/stdin.mdx +62 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/arraybuffer.mdx +30 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/buffer.mdx +21 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/exists.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/json.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/mime.mdx +22 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/stream.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/string.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/uint8array.mdx +23 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/read-file/watch.mdx +66 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/build-time-constants.mdx +295 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/cicd.mdx +45 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/codesign-macos-executable.mdx +61 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/define-constant.mdx +149 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-directory.mdx +39 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/delete-file.mdx +21 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/heap-snapshot.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-html.mdx +15 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json.mdx +46 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-json5.mdx +74 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-toml.mdx +32 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/import-yaml.mdx +104 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/read-env.mdx +37 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/set-env.mdx +51 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/shell.mdx +42 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/timezone.mdx +38 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/tsconfig-paths.mdx +31 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/typescript.mdx +51 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/vscode-debugger.mdx +47 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/runtime/web-debugger.mdx +103 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-arraybuffer.mdx +13 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-blob.mdx +13 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-json.mdx +14 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-string.mdx +14 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/node-readable-to-uint8array.mdx +13 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-array.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-arraybuffer.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-blob.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-buffer.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-json.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-string.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/streams/to-typedarray.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/bail.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/concurrent-test-glob.mdx +146 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage-threshold.mdx +67 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/coverage.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/happy-dom.mdx +73 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/migrate-from-jest.mdx +125 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-clock.mdx +50 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/mock-functions.mdx +70 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/rerun-each.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/run-tests.mdx +116 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/skip-tests.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/snapshot.mdx +102 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/spy-on.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/svelte-test.mdx +113 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/testing-library.mdx +93 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/timeout.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/todo-tests.mdx +74 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/update-snapshots.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/test/watch-mode.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/base64.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deep-equals.mdx +41 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/deflate.mdx +20 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/detect-bun.mdx +28 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/entrypoint.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/escape-html.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/file-url-to-path.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/gzip.mdx +20 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/hash-a-password.mdx +56 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-dir.mdx +15 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-file.mdx +15 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/import-meta-path.mdx +15 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/javascript-uuid.mdx +25 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/main.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/path-to-file-url.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/sleep.mdx +24 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/upgrade.mdx +93 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/version.mdx +23 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/util/which-path-to-executable-bin.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/compression.mdx +33 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/context.mdx +79 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/pubsub.mdx +43 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/websocket/simple.mdx +38 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/append.mdx +54 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/basic.mdx +46 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/blob.mdx +30 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/cat.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/file-cp.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/filesink.mdx +54 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/response.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stdout.mdx +23 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/stream.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/guides/write-file/unlink.mdx +18 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/index.mdx +133 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/installation.mdx +372 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/bunx.mdx +91 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/catalogs.mdx +292 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/add.mdx +179 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/audit.mdx +60 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/info.mdx +70 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/install.mdx +591 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/link.mdx +61 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/outdated.mdx +197 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/patch.mdx +69 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/pm.mdx +323 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/publish.mdx +131 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/remove.mdx +16 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/update.mdx +140 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/cli/why.mdx +84 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/filter.mdx +127 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/global-cache.mdx +72 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/isolated-installs.mdx +220 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lifecycle.mdx +64 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/lockfile.mdx +64 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/npmrc.mdx +245 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/overrides.mdx +83 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/scopes-registries.mdx +35 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/security-scanner-api.mdx +95 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/pm/workspaces.mdx +115 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/benchmarking.mdx +296 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/bindgen.mdx +223 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/building-windows.mdx +143 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/contributing.mdx +366 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/feedback.mdx +20 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/license.mdx +78 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/project/roadmap.mdx +8 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/quickstart.mdx +251 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/archive.mdx +452 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/auto-install.mdx +97 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/binary-data.mdx +846 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bun-apis.mdx +59 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/bunfig.mdx +754 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/c-compiler.mdx +204 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/child-process.mdx +659 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/color.mdx +267 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/console.mdx +67 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/cookies.mdx +454 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/debugger.mdx +335 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/environment-variables.mdx +231 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/ffi.mdx +567 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-io.mdx +306 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-system-router.mdx +118 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/file-types.mdx +482 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/glob.mdx +181 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/globals.mdx +72 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/hashing.mdx +315 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/html-rewriter.mdx +333 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/cookies.mdx +79 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/error-handling.mdx +40 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/metrics.mdx +36 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/routing.mdx +289 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/server.mdx +645 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/tls.mdx +101 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/http/websockets.mdx +414 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/index.mdx +223 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/json5.mdx +271 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsonl.mdx +188 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/jsx.mdx +115 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/markdown.mdx +344 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/module-resolution.mdx +374 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/dns.mdx +111 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/fetch.mdx +484 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/tcp.mdx +239 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/networking/udp.mdx +180 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/node-api.mdx +19 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/nodejs-compat.mdx +468 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/plugins.mdx +419 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/redis.mdx +583 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/repl.mdx +176 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/s3.mdx +881 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/secrets.mdx +340 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/semver.mdx +57 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/shell.mdx +637 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sql.mdx +1404 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/sqlite.mdx +721 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/streams.mdx +232 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/create.mdx +269 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/templating/init.mdx +58 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/transpiler.mdx +288 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/typescript.mdx +58 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/utils.mdx +1010 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/watch-mode.mdx +161 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/web-apis.mdx +29 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/workers.mdx +314 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/runtime/yaml.mdx +469 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/add.mdx +166 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/build.mdx +197 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/bunx.mdx +49 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/feedback.mdx +17 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/init.mdx +84 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/install.mdx +173 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/link.mdx +163 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/outdated.mdx +140 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/patch.mdx +171 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/publish.mdx +198 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/remove.mdx +146 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/run.mdx +305 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/test.mdx +105 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/snippets/cli/update.mdx +144 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/code-coverage.mdx +409 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/configuration.mdx +520 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/dates-times.mdx +129 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/discovery.mdx +90 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/dom.mdx +226 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/index.mdx +409 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/lifecycle.mdx +366 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/mocks.mdx +637 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/reporters.mdx +126 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/runtime-behavior.mdx +342 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/snapshots.mdx +434 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/test/writing-tests.mdx +672 -0
- package/connectors/connect-yousign/node_modules/bun-types/docs/typescript.mdx +54 -0
- package/connectors/connect-yousign/node_modules/bun-types/extensions.d.ts +40 -0
- package/connectors/connect-yousign/node_modules/bun-types/fetch.d.ts +79 -0
- package/connectors/connect-yousign/node_modules/bun-types/ffi.d.ts +1154 -0
- package/connectors/connect-yousign/node_modules/bun-types/globals.d.ts +2067 -0
- package/connectors/connect-yousign/node_modules/bun-types/html-rewriter.d.ts +186 -0
- package/connectors/connect-yousign/node_modules/bun-types/index.d.ts +32 -0
- package/connectors/connect-yousign/node_modules/bun-types/jsc.d.ts +233 -0
- package/connectors/connect-yousign/node_modules/bun-types/jsx.d.ts +11 -0
- package/connectors/connect-yousign/node_modules/bun-types/overrides.d.ts +376 -0
- package/connectors/connect-yousign/node_modules/bun-types/package.json +37 -0
- package/connectors/connect-yousign/node_modules/bun-types/redis.d.ts +3352 -0
- package/connectors/connect-yousign/node_modules/bun-types/s3.d.ts +1335 -0
- package/connectors/connect-yousign/node_modules/bun-types/security.d.ts +101 -0
- package/connectors/connect-yousign/node_modules/bun-types/serve.d.ts +1296 -0
- package/connectors/connect-yousign/node_modules/bun-types/shell.d.ts +380 -0
- package/connectors/connect-yousign/node_modules/bun-types/sql.d.ts +887 -0
- package/connectors/connect-yousign/node_modules/bun-types/sqlite.d.ts +1322 -0
- package/connectors/connect-yousign/node_modules/bun-types/test-globals.d.ts +22 -0
- package/connectors/connect-yousign/node_modules/bun-types/test.d.ts +2392 -0
- package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/branding.d.ts +283 -0
- package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/index.d.ts +1207 -0
- package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/messages.d.ts +395 -0
- package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/overloads.d.ts +669 -0
- package/connectors/connect-yousign/node_modules/bun-types/vendor/expect-type/utils.d.ts +431 -0
- package/connectors/connect-yousign/node_modules/bun-types/wasm.d.ts +193 -0
- package/connectors/connect-yousign/node_modules/chalk/license +9 -0
- package/connectors/connect-yousign/node_modules/chalk/package.json +83 -0
- package/connectors/connect-yousign/node_modules/chalk/readme.md +297 -0
- package/connectors/connect-yousign/node_modules/chalk/source/index.d.ts +325 -0
- package/connectors/connect-yousign/node_modules/chalk/source/index.js +225 -0
- package/connectors/connect-yousign/node_modules/chalk/source/utilities.js +33 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
- package/connectors/connect-yousign/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
- package/connectors/connect-yousign/node_modules/commander/LICENSE +22 -0
- package/connectors/connect-yousign/node_modules/commander/Readme.md +1157 -0
- package/connectors/connect-yousign/node_modules/commander/esm.mjs +16 -0
- package/connectors/connect-yousign/node_modules/commander/index.js +24 -0
- package/connectors/connect-yousign/node_modules/commander/lib/argument.js +149 -0
- package/connectors/connect-yousign/node_modules/commander/lib/command.js +2509 -0
- package/connectors/connect-yousign/node_modules/commander/lib/error.js +39 -0
- package/connectors/connect-yousign/node_modules/commander/lib/help.js +520 -0
- package/connectors/connect-yousign/node_modules/commander/lib/option.js +330 -0
- package/connectors/connect-yousign/node_modules/commander/lib/suggestSimilar.js +101 -0
- package/connectors/connect-yousign/node_modules/commander/package-support.json +16 -0
- package/connectors/connect-yousign/node_modules/commander/package.json +84 -0
- package/connectors/connect-yousign/node_modules/commander/typings/esm.d.mts +3 -0
- package/connectors/connect-yousign/node_modules/commander/typings/index.d.ts +969 -0
- package/connectors/connect-yousign/node_modules/typescript/LICENSE.txt +55 -0
- package/connectors/connect-yousign/node_modules/typescript/README.md +50 -0
- package/connectors/connect-yousign/node_modules/typescript/SECURITY.md +41 -0
- package/connectors/connect-yousign/node_modules/typescript/ThirdPartyNoticeText.txt +193 -0
- package/connectors/connect-yousign/node_modules/typescript/bin/tsc +2 -0
- package/connectors/connect-yousign/node_modules/typescript/bin/tsserver +2 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/_tsc.js +133818 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/_tsserver.js +659 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/_typingsInstaller.js +222 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/cs/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/de/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/es/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/fr/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/it/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/ja/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/ko/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.d.ts +22 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.d.ts +384 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.decorators.legacy.d.ts +22 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.asynciterable.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.d.ts +39429 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.dom.iterable.d.ts +571 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.collection.d.ts +147 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.core.d.ts +597 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.d.ts +28 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.generator.d.ts +77 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.iterable.d.ts +605 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.promise.d.ts +81 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.proxy.d.ts +128 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.reflect.d.ts +144 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.d.ts +46 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts +326 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.array.include.d.ts +116 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.full.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2016.intl.d.ts +31 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.d.ts +26 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.date.d.ts +31 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.full.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.intl.d.ts +44 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.object.d.ts +49 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts +135 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.string.d.ts +45 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts +53 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts +77 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts +53 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.intl.d.ts +83 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.promise.d.ts +30 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2018.regexp.d.ts +37 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.array.d.ts +79 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.intl.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.object.d.ts +33 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.string.d.ts +37 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2019.symbol.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.bigint.d.ts +765 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.d.ts +27 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.date.d.ts +42 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.intl.d.ts +474 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.number.d.ts +28 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.promise.d.ts +47 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts +99 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.string.d.ts +44 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.intl.d.ts +166 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.promise.d.ts +48 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.string.d.ts +33 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2021.weakref.d.ts +78 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.array.d.ts +121 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.d.ts +25 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.error.d.ts +75 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.intl.d.ts +145 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.object.d.ts +26 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.regexp.d.ts +39 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2022.string.d.ts +25 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.array.d.ts +924 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.collection.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.d.ts +22 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2023.intl.d.ts +56 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.arraybuffer.d.ts +65 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.collection.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.d.ts +26 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.object.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.promise.d.ts +35 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.regexp.d.ts +25 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.sharedmemory.d.ts +68 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es2024.string.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es5.d.ts +4601 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.es6.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.array.d.ts +35 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.collection.d.ts +96 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.decorators.d.ts +28 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.disposable.d.ts +193 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.error.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.float16.d.ts +445 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.full.d.ts +24 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.intl.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.iterator.d.ts +148 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.promise.d.ts +34 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.esnext.sharedmemory.d.ts +25 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.scripthost.d.ts +322 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.asynciterable.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.d.ts +13150 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.importscripts.d.ts +23 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/lib.webworker.iterable.d.ts +340 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/pl/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/pt-br/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/ru/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/tr/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/tsc.js +8 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/tsserver.js +8 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.d.ts +17 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/tsserverlibrary.js +21 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/typesMap.json +497 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/typescript.d.ts +11437 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/typescript.js +200276 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/typingsInstaller.js +8 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/watchGuard.js +53 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/zh-cn/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/lib/zh-tw/diagnosticMessages.generated.json +2122 -0
- package/connectors/connect-yousign/node_modules/typescript/package.json +120 -0
- package/connectors/connect-yousign/node_modules/undici-types/LICENSE +21 -0
- package/connectors/connect-yousign/node_modules/undici-types/README.md +6 -0
- package/connectors/connect-yousign/node_modules/undici-types/agent.d.ts +32 -0
- package/connectors/connect-yousign/node_modules/undici-types/api.d.ts +43 -0
- package/connectors/connect-yousign/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/connectors/connect-yousign/node_modules/undici-types/cache-interceptor.d.ts +173 -0
- package/connectors/connect-yousign/node_modules/undici-types/cache.d.ts +36 -0
- package/connectors/connect-yousign/node_modules/undici-types/client-stats.d.ts +15 -0
- package/connectors/connect-yousign/node_modules/undici-types/client.d.ts +108 -0
- package/connectors/connect-yousign/node_modules/undici-types/connector.d.ts +34 -0
- package/connectors/connect-yousign/node_modules/undici-types/content-type.d.ts +21 -0
- package/connectors/connect-yousign/node_modules/undici-types/cookies.d.ts +30 -0
- package/connectors/connect-yousign/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/connectors/connect-yousign/node_modules/undici-types/dispatcher.d.ts +276 -0
- package/connectors/connect-yousign/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/connectors/connect-yousign/node_modules/undici-types/errors.d.ts +161 -0
- package/connectors/connect-yousign/node_modules/undici-types/eventsource.d.ts +66 -0
- package/connectors/connect-yousign/node_modules/undici-types/fetch.d.ts +211 -0
- package/connectors/connect-yousign/node_modules/undici-types/formdata.d.ts +108 -0
- package/connectors/connect-yousign/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/connectors/connect-yousign/node_modules/undici-types/global-origin.d.ts +7 -0
- package/connectors/connect-yousign/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/connectors/connect-yousign/node_modules/undici-types/handlers.d.ts +15 -0
- package/connectors/connect-yousign/node_modules/undici-types/header.d.ts +160 -0
- package/connectors/connect-yousign/node_modules/undici-types/index.d.ts +88 -0
- package/connectors/connect-yousign/node_modules/undici-types/interceptors.d.ts +73 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-client.d.ts +27 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/connectors/connect-yousign/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/connectors/connect-yousign/node_modules/undici-types/package.json +55 -0
- package/connectors/connect-yousign/node_modules/undici-types/patch.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/connectors/connect-yousign/node_modules/undici-types/pool.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/connectors/connect-yousign/node_modules/undici-types/readable.d.ts +68 -0
- package/connectors/connect-yousign/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/connectors/connect-yousign/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/connectors/connect-yousign/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/connectors/connect-yousign/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/connectors/connect-yousign/node_modules/undici-types/util.d.ts +18 -0
- package/connectors/connect-yousign/node_modules/undici-types/utility.d.ts +7 -0
- package/connectors/connect-yousign/node_modules/undici-types/webidl.d.ts +341 -0
- package/connectors/connect-yousign/node_modules/undici-types/websocket.d.ts +186 -0
- 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/cli/commands/auth.d.ts +0 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +167 -1399
- package/dist/lib/lock.d.ts +1 -1
- package/dist/lib/runner.d.ts +0 -31
- package/dist/lib/workflow-runner.d.ts +0 -7
- package/dist/server/auth.d.ts +3 -4
- package/package.json +1 -1
- package/connectors/gmail/bin/index.js +0 -7027
- package/connectors/googledrive/bin/index.js +0 -5958
- package/connectors/imessage/bin/.gitkeep +0 -2
- package/connectors/imessage/bun.lock +0 -32
- package/dashboard/dist/assets/index-ClBXkNbL.css +0 -1
- package/dashboard/dist/assets/index-DvfmyAO4.js +0 -284
- package/dist/core/builtins.test.d.ts +0 -1
- package/dist/core/connectors/gmail.d.ts +0 -5
- package/dist/core/connectors/googledrive.d.ts +0 -6
- package/dist/core/connectors/internal-operations.test.d.ts +0 -1
- package/dist/core/connectors/internal-runtime.test.d.ts +0 -1
- package/dist/core/errors.test.d.ts +0 -1
- package/dist/lib/connector-resolver.d.ts +0 -37
- package/dist/lib/connector-resolver.test.d.ts +0 -1
- package/dist/lib/manifest.d.ts +0 -50
- package/dist/lib/manifest.test.d.ts +0 -1
- package/dist/lib/runner-auth.test.d.ts +0 -1
- package/dist/lib/test-endpoints.test.d.ts +0 -1
- package/dist/server/auth-exchange.test.d.ts +0 -1
- package/dist/server/auth-refresh.test.d.ts +0 -1
- /package/dist/{cli/auth-no-browser.test.d.ts → server/server.test.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
2
|
// @bun
|
|
3
3
|
var __create = Object.create;
|
|
4
4
|
var __getProtoOf = Object.getPrototypeOf;
|
|
@@ -33,7 +33,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
33
33
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
34
34
|
var __require = import.meta.require;
|
|
35
35
|
|
|
36
|
-
// node_modules/commander/lib/error.js
|
|
36
|
+
// ../../node_modules/commander/lib/error.js
|
|
37
37
|
var require_error = __commonJS((exports) => {
|
|
38
38
|
class CommanderError extends Error {
|
|
39
39
|
constructor(exitCode, code, message) {
|
|
@@ -57,7 +57,7 @@ var require_error = __commonJS((exports) => {
|
|
|
57
57
|
exports.InvalidArgumentError = InvalidArgumentError;
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
// node_modules/commander/lib/argument.js
|
|
60
|
+
// ../../node_modules/commander/lib/argument.js
|
|
61
61
|
var require_argument = __commonJS((exports) => {
|
|
62
62
|
var { InvalidArgumentError } = require_error();
|
|
63
63
|
|
|
@@ -136,7 +136,7 @@ var require_argument = __commonJS((exports) => {
|
|
|
136
136
|
exports.humanReadableArgName = humanReadableArgName;
|
|
137
137
|
});
|
|
138
138
|
|
|
139
|
-
// node_modules/commander/lib/help.js
|
|
139
|
+
// ../../node_modules/commander/lib/help.js
|
|
140
140
|
var require_help = __commonJS((exports) => {
|
|
141
141
|
var { humanReadableArgName } = require_argument();
|
|
142
142
|
|
|
@@ -385,7 +385,7 @@ var require_help = __commonJS((exports) => {
|
|
|
385
385
|
exports.Help = Help;
|
|
386
386
|
});
|
|
387
387
|
|
|
388
|
-
// node_modules/commander/lib/option.js
|
|
388
|
+
// ../../node_modules/commander/lib/option.js
|
|
389
389
|
var require_option = __commonJS((exports) => {
|
|
390
390
|
var { InvalidArgumentError } = require_error();
|
|
391
391
|
|
|
@@ -536,7 +536,7 @@ var require_option = __commonJS((exports) => {
|
|
|
536
536
|
exports.DualOptions = DualOptions;
|
|
537
537
|
});
|
|
538
538
|
|
|
539
|
-
// node_modules/commander/lib/suggestSimilar.js
|
|
539
|
+
// ../../node_modules/commander/lib/suggestSimilar.js
|
|
540
540
|
var require_suggestSimilar = __commonJS((exports) => {
|
|
541
541
|
var maxDistance = 3;
|
|
542
542
|
function editDistance(a, b) {
|
|
@@ -609,7 +609,7 @@ var require_suggestSimilar = __commonJS((exports) => {
|
|
|
609
609
|
exports.suggestSimilar = suggestSimilar;
|
|
610
610
|
});
|
|
611
611
|
|
|
612
|
-
// node_modules/commander/lib/command.js
|
|
612
|
+
// ../../node_modules/commander/lib/command.js
|
|
613
613
|
var require_command = __commonJS((exports) => {
|
|
614
614
|
var EventEmitter = __require("events").EventEmitter;
|
|
615
615
|
var childProcess = __require("child_process");
|
|
@@ -1852,7 +1852,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1852
1852
|
exports.Command = Command;
|
|
1853
1853
|
});
|
|
1854
1854
|
|
|
1855
|
-
// node_modules/commander/index.js
|
|
1855
|
+
// ../../node_modules/commander/index.js
|
|
1856
1856
|
var require_commander = __commonJS((exports) => {
|
|
1857
1857
|
var { Argument } = require_argument();
|
|
1858
1858
|
var { Command } = require_command();
|
|
@@ -1872,7 +1872,7 @@ var require_commander = __commonJS((exports) => {
|
|
|
1872
1872
|
exports.InvalidOptionArgumentError = InvalidArgumentError;
|
|
1873
1873
|
});
|
|
1874
1874
|
|
|
1875
|
-
// node_modules/commander/esm.mjs
|
|
1875
|
+
// ../../node_modules/commander/esm.mjs
|
|
1876
1876
|
var import__ = __toESM(require_commander(), 1);
|
|
1877
1877
|
var {
|
|
1878
1878
|
program,
|
|
@@ -1888,7 +1888,7 @@ var {
|
|
|
1888
1888
|
Help
|
|
1889
1889
|
} = import__.default;
|
|
1890
1890
|
|
|
1891
|
-
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1891
|
+
// ../../node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
1892
1892
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
1893
1893
|
var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
|
|
1894
1894
|
var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
|
|
@@ -2065,7 +2065,7 @@ function assembleStyles() {
|
|
|
2065
2065
|
var ansiStyles = assembleStyles();
|
|
2066
2066
|
var ansi_styles_default = ansiStyles;
|
|
2067
2067
|
|
|
2068
|
-
// node_modules/chalk/source/vendor/supports-color/index.js
|
|
2068
|
+
// ../../node_modules/chalk/source/vendor/supports-color/index.js
|
|
2069
2069
|
import process2 from "process";
|
|
2070
2070
|
import os from "os";
|
|
2071
2071
|
import tty from "tty";
|
|
@@ -2197,7 +2197,7 @@ var supportsColor = {
|
|
|
2197
2197
|
};
|
|
2198
2198
|
var supports_color_default = supportsColor;
|
|
2199
2199
|
|
|
2200
|
-
// node_modules/chalk/source/utilities.js
|
|
2200
|
+
// ../../node_modules/chalk/source/utilities.js
|
|
2201
2201
|
function stringReplaceAll(string, substring, replacer) {
|
|
2202
2202
|
let index = string.indexOf(substring);
|
|
2203
2203
|
if (index === -1) {
|
|
@@ -2230,7 +2230,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
|
|
|
2230
2230
|
return returnValue;
|
|
2231
2231
|
}
|
|
2232
2232
|
|
|
2233
|
-
// node_modules/chalk/source/index.js
|
|
2233
|
+
// ../../node_modules/chalk/source/index.js
|
|
2234
2234
|
var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
|
|
2235
2235
|
var GENERATOR = Symbol("GENERATOR");
|
|
2236
2236
|
var STYLER = Symbol("STYLER");
|
|
@@ -2378,32 +2378,35 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
|
|
|
2378
2378
|
var source_default = chalk;
|
|
2379
2379
|
|
|
2380
2380
|
// src/types/index.ts
|
|
2381
|
-
class
|
|
2381
|
+
class GitHubApiError extends Error {
|
|
2382
2382
|
statusCode;
|
|
2383
|
-
|
|
2384
|
-
|
|
2383
|
+
errors;
|
|
2384
|
+
documentationUrl;
|
|
2385
|
+
constructor(message, statusCode, errors, documentationUrl) {
|
|
2385
2386
|
super(message);
|
|
2386
|
-
this.name = "
|
|
2387
|
+
this.name = "GitHubApiError";
|
|
2387
2388
|
this.statusCode = statusCode;
|
|
2388
|
-
this.
|
|
2389
|
+
this.errors = errors;
|
|
2390
|
+
this.documentationUrl = documentationUrl;
|
|
2389
2391
|
}
|
|
2390
2392
|
}
|
|
2391
2393
|
|
|
2392
2394
|
// src/api/client.ts
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2395
|
+
var DEFAULT_BASE_URL = "https://api.github.com";
|
|
2396
|
+
var API_VERSION = "2022-11-28";
|
|
2397
|
+
|
|
2398
|
+
class GitHubClient {
|
|
2399
|
+
token;
|
|
2400
|
+
baseUrl;
|
|
2397
2401
|
constructor(config) {
|
|
2398
|
-
if (!config.
|
|
2399
|
-
throw new Error("
|
|
2402
|
+
if (!config.token) {
|
|
2403
|
+
throw new Error("GitHub token is required");
|
|
2400
2404
|
}
|
|
2401
|
-
this.
|
|
2402
|
-
this.
|
|
2403
|
-
this.deviceId = config.deviceId;
|
|
2405
|
+
this.token = config.token;
|
|
2406
|
+
this.baseUrl = config.baseUrl || DEFAULT_BASE_URL;
|
|
2404
2407
|
}
|
|
2405
2408
|
buildUrl(path, params) {
|
|
2406
|
-
const url = new URL(this.
|
|
2409
|
+
const url = new URL(`${this.baseUrl}${path}`);
|
|
2407
2410
|
if (params) {
|
|
2408
2411
|
Object.entries(params).forEach(([key, value]) => {
|
|
2409
2412
|
if (value !== undefined && value !== null && value !== "") {
|
|
@@ -2413,42 +2416,32 @@ class ImessageClient {
|
|
|
2413
2416
|
}
|
|
2414
2417
|
return url.toString();
|
|
2415
2418
|
}
|
|
2416
|
-
|
|
2417
|
-
const headers = {
|
|
2418
|
-
|
|
2419
|
+
async request(path, options = {}) {
|
|
2420
|
+
const { method = "GET", params, body, headers = {} } = options;
|
|
2421
|
+
const url = this.buildUrl(path, params);
|
|
2422
|
+
const requestHeaders = {
|
|
2423
|
+
Authorization: `Bearer ${this.token}`,
|
|
2424
|
+
Accept: "application/vnd.github+json",
|
|
2425
|
+
"X-GitHub-Api-Version": API_VERSION,
|
|
2426
|
+
...headers
|
|
2419
2427
|
};
|
|
2420
|
-
if (
|
|
2421
|
-
|
|
2422
|
-
}
|
|
2423
|
-
if (this.deviceId) {
|
|
2424
|
-
headers["X-API-Key"] = this.deviceId;
|
|
2428
|
+
if (body && ["POST", "PUT", "PATCH"].includes(method)) {
|
|
2429
|
+
requestHeaders["Content-Type"] = "application/json";
|
|
2425
2430
|
}
|
|
2426
|
-
return headers;
|
|
2427
|
-
}
|
|
2428
|
-
async request(path, options = {}) {
|
|
2429
|
-
const { method = "GET", params, body } = options;
|
|
2430
|
-
const url = this.buildUrl(path, method === "GET" ? params : undefined);
|
|
2431
|
-
const headers = this.getHeaders();
|
|
2432
2431
|
const fetchOptions = {
|
|
2433
2432
|
method,
|
|
2434
|
-
headers
|
|
2433
|
+
headers: requestHeaders
|
|
2435
2434
|
};
|
|
2436
2435
|
if (body && ["POST", "PUT", "PATCH"].includes(method)) {
|
|
2437
|
-
|
|
2438
|
-
fetchOptions.body = JSON.stringify(body);
|
|
2436
|
+
fetchOptions.body = typeof body === "string" ? body : JSON.stringify(body);
|
|
2439
2437
|
}
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
} catch (error) {
|
|
2444
|
-
if (error instanceof Error) {
|
|
2445
|
-
throw new IMessageApiError("Failed to reach bridge: " + error.message, 0);
|
|
2446
|
-
}
|
|
2447
|
-
throw new IMessageApiError("Failed to reach bridge", 0);
|
|
2438
|
+
const response = await fetch(url, fetchOptions);
|
|
2439
|
+
if (response.status === 204) {
|
|
2440
|
+
return {};
|
|
2448
2441
|
}
|
|
2449
2442
|
let data;
|
|
2450
2443
|
const contentType = response.headers.get("content-type") || "";
|
|
2451
|
-
if (contentType.includes("application/json")) {
|
|
2444
|
+
if (contentType.includes("application/json") || contentType.includes("application/vnd.github")) {
|
|
2452
2445
|
const text = await response.text();
|
|
2453
2446
|
if (text) {
|
|
2454
2447
|
try {
|
|
@@ -2462,180 +2455,307 @@ class ImessageClient {
|
|
|
2462
2455
|
}
|
|
2463
2456
|
if (!response.ok) {
|
|
2464
2457
|
const errorData = data;
|
|
2465
|
-
const
|
|
2466
|
-
throw new
|
|
2458
|
+
const errorMessage = errorData?.message || response.statusText;
|
|
2459
|
+
throw new GitHubApiError(errorMessage, response.status, errorData?.errors, errorData?.documentation_url);
|
|
2467
2460
|
}
|
|
2468
|
-
return data
|
|
2461
|
+
return data;
|
|
2469
2462
|
}
|
|
2470
2463
|
async get(path, params) {
|
|
2471
2464
|
return this.request(path, { method: "GET", params });
|
|
2472
2465
|
}
|
|
2473
|
-
async post(path, body) {
|
|
2474
|
-
return this.request(path, { method: "POST", body });
|
|
2466
|
+
async post(path, body, params) {
|
|
2467
|
+
return this.request(path, { method: "POST", body, params });
|
|
2475
2468
|
}
|
|
2476
|
-
async put(path, body) {
|
|
2477
|
-
return this.request(path, { method: "PUT", body });
|
|
2469
|
+
async put(path, body, params) {
|
|
2470
|
+
return this.request(path, { method: "PUT", body, params });
|
|
2478
2471
|
}
|
|
2479
|
-
async patch(path, body) {
|
|
2480
|
-
return this.request(path, { method: "PATCH", body });
|
|
2472
|
+
async patch(path, body, params) {
|
|
2473
|
+
return this.request(path, { method: "PATCH", body, params });
|
|
2481
2474
|
}
|
|
2482
|
-
async delete(path) {
|
|
2483
|
-
return this.request(path, { method: "DELETE" });
|
|
2475
|
+
async delete(path, params) {
|
|
2476
|
+
return this.request(path, { method: "DELETE", params });
|
|
2484
2477
|
}
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
return url.host;
|
|
2489
|
-
} catch {
|
|
2490
|
-
return "invalid-url";
|
|
2478
|
+
getTokenPreview() {
|
|
2479
|
+
if (this.token.length > 10) {
|
|
2480
|
+
return `${this.token.substring(0, 6)}...${this.token.substring(this.token.length - 4)}`;
|
|
2491
2481
|
}
|
|
2482
|
+
return "***";
|
|
2492
2483
|
}
|
|
2493
2484
|
}
|
|
2494
2485
|
|
|
2495
|
-
// src/api/
|
|
2496
|
-
class
|
|
2486
|
+
// src/api/repos.ts
|
|
2487
|
+
class ReposApi {
|
|
2497
2488
|
client;
|
|
2498
2489
|
constructor(client) {
|
|
2499
2490
|
this.client = client;
|
|
2500
2491
|
}
|
|
2501
|
-
async
|
|
2502
|
-
return this.client.get(
|
|
2492
|
+
async get(owner, repo) {
|
|
2493
|
+
return this.client.get(`/repos/${owner}/${repo}`);
|
|
2494
|
+
}
|
|
2495
|
+
async list(username, options) {
|
|
2496
|
+
return this.client.get(`/users/${username}/repos`, options);
|
|
2497
|
+
}
|
|
2498
|
+
async listOrg(org, options) {
|
|
2499
|
+
return this.client.get(`/orgs/${org}/repos`, options);
|
|
2500
|
+
}
|
|
2501
|
+
async listForAuthenticatedUser(options) {
|
|
2502
|
+
return this.client.get("/user/repos", options);
|
|
2503
|
+
}
|
|
2504
|
+
async create(name, options) {
|
|
2505
|
+
return this.client.post("/user/repos", {
|
|
2506
|
+
name,
|
|
2507
|
+
...options
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
async createInOrg(org, name, options) {
|
|
2511
|
+
return this.client.post(`/orgs/${org}/repos`, {
|
|
2512
|
+
name,
|
|
2513
|
+
...options
|
|
2514
|
+
});
|
|
2515
|
+
}
|
|
2516
|
+
async delete(owner, repo) {
|
|
2517
|
+
await this.client.delete(`/repos/${owner}/${repo}`);
|
|
2518
|
+
}
|
|
2519
|
+
async getContent(owner, repo, path, options) {
|
|
2520
|
+
return this.client.get(`/repos/${owner}/${repo}/contents/${path}`, options);
|
|
2521
|
+
}
|
|
2522
|
+
async createOrUpdateFile(owner, repo, path, options) {
|
|
2523
|
+
return this.client.put(`/repos/${owner}/${repo}/contents/${path}`, options);
|
|
2524
|
+
}
|
|
2525
|
+
async deleteFile(owner, repo, path, options) {
|
|
2526
|
+
return this.client.delete(`/repos/${owner}/${repo}/contents/${path}`, options);
|
|
2527
|
+
}
|
|
2528
|
+
async listCommits(owner, repo, options) {
|
|
2529
|
+
return this.client.get(`/repos/${owner}/${repo}/commits`, options);
|
|
2530
|
+
}
|
|
2531
|
+
async getCommit(owner, repo, ref) {
|
|
2532
|
+
return this.client.get(`/repos/${owner}/${repo}/commits/${ref}`);
|
|
2533
|
+
}
|
|
2534
|
+
async listBranches(owner, repo, options) {
|
|
2535
|
+
return this.client.get(`/repos/${owner}/${repo}/branches`, options);
|
|
2536
|
+
}
|
|
2537
|
+
async listTopics(owner, repo) {
|
|
2538
|
+
return this.client.get(`/repos/${owner}/${repo}/topics`);
|
|
2539
|
+
}
|
|
2540
|
+
async replaceTopics(owner, repo, names) {
|
|
2541
|
+
return this.client.put(`/repos/${owner}/${repo}/topics`, { names });
|
|
2503
2542
|
}
|
|
2504
2543
|
}
|
|
2505
2544
|
|
|
2506
|
-
// src/api/
|
|
2507
|
-
class
|
|
2545
|
+
// src/api/issues.ts
|
|
2546
|
+
class IssuesApi {
|
|
2508
2547
|
client;
|
|
2509
2548
|
constructor(client) {
|
|
2510
2549
|
this.client = client;
|
|
2511
2550
|
}
|
|
2512
|
-
async list(
|
|
2513
|
-
|
|
2514
|
-
if (options.limit)
|
|
2515
|
-
params.limit = options.limit;
|
|
2516
|
-
if (options.offset)
|
|
2517
|
-
params.offset = options.offset;
|
|
2518
|
-
return this.client.get("/conversations", params);
|
|
2551
|
+
async list(owner, repo, options) {
|
|
2552
|
+
return this.client.get(`/repos/${owner}/${repo}/issues`, options);
|
|
2519
2553
|
}
|
|
2520
|
-
async
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2554
|
+
async get(owner, repo, issueNumber) {
|
|
2555
|
+
return this.client.get(`/repos/${owner}/${repo}/issues/${issueNumber}`);
|
|
2556
|
+
}
|
|
2557
|
+
async create(owner, repo, title, body, options) {
|
|
2558
|
+
return this.client.post(`/repos/${owner}/${repo}/issues`, {
|
|
2559
|
+
title,
|
|
2560
|
+
body,
|
|
2561
|
+
...options
|
|
2562
|
+
});
|
|
2563
|
+
}
|
|
2564
|
+
async update(owner, repo, issueNumber, options) {
|
|
2565
|
+
return this.client.patch(`/repos/${owner}/${repo}/issues/${issueNumber}`, options);
|
|
2566
|
+
}
|
|
2567
|
+
async lock(owner, repo, issueNumber, lockReason) {
|
|
2568
|
+
await this.client.put(`/repos/${owner}/${repo}/issues/${issueNumber}/lock`, {
|
|
2569
|
+
lock_reason: lockReason
|
|
2570
|
+
});
|
|
2571
|
+
}
|
|
2572
|
+
async unlock(owner, repo, issueNumber) {
|
|
2573
|
+
await this.client.delete(`/repos/${owner}/${repo}/issues/${issueNumber}/lock`);
|
|
2574
|
+
}
|
|
2575
|
+
async listComments(owner, repo, issueNumber, options) {
|
|
2576
|
+
return this.client.get(`/repos/${owner}/${repo}/issues/${issueNumber}/comments`, options);
|
|
2534
2577
|
}
|
|
2535
|
-
async
|
|
2536
|
-
return this.client.get(`/
|
|
2578
|
+
async getComment(owner, repo, commentId) {
|
|
2579
|
+
return this.client.get(`/repos/${owner}/${repo}/issues/comments/${commentId}`);
|
|
2580
|
+
}
|
|
2581
|
+
async createComment(owner, repo, issueNumber, body) {
|
|
2582
|
+
return this.client.post(`/repos/${owner}/${repo}/issues/${issueNumber}/comments`, { body });
|
|
2583
|
+
}
|
|
2584
|
+
async updateComment(owner, repo, commentId, body) {
|
|
2585
|
+
return this.client.patch(`/repos/${owner}/${repo}/issues/comments/${commentId}`, { body });
|
|
2586
|
+
}
|
|
2587
|
+
async deleteComment(owner, repo, commentId) {
|
|
2588
|
+
await this.client.delete(`/repos/${owner}/${repo}/issues/comments/${commentId}`);
|
|
2589
|
+
}
|
|
2590
|
+
async addLabels(owner, repo, issueNumber, labels) {
|
|
2591
|
+
await this.client.post(`/repos/${owner}/${repo}/issues/${issueNumber}/labels`, { labels });
|
|
2592
|
+
}
|
|
2593
|
+
async removeLabel(owner, repo, issueNumber, label) {
|
|
2594
|
+
await this.client.delete(`/repos/${owner}/${repo}/issues/${issueNumber}/labels/${label}`);
|
|
2595
|
+
}
|
|
2596
|
+
async addAssignees(owner, repo, issueNumber, assignees) {
|
|
2597
|
+
return this.client.post(`/repos/${owner}/${repo}/issues/${issueNumber}/assignees`, { assignees });
|
|
2598
|
+
}
|
|
2599
|
+
async removeAssignees(owner, repo, issueNumber, assignees) {
|
|
2600
|
+
return this.client.request(`/repos/${owner}/${repo}/issues/${issueNumber}/assignees`, { method: "DELETE", body: { assignees } });
|
|
2537
2601
|
}
|
|
2538
2602
|
}
|
|
2539
2603
|
|
|
2540
|
-
// src/api/
|
|
2541
|
-
class
|
|
2604
|
+
// src/api/pulls.ts
|
|
2605
|
+
class PullsApi {
|
|
2542
2606
|
client;
|
|
2543
2607
|
constructor(client) {
|
|
2544
2608
|
this.client = client;
|
|
2545
2609
|
}
|
|
2546
|
-
async list(options) {
|
|
2547
|
-
|
|
2548
|
-
chatGuid: options.chatGuid
|
|
2549
|
-
};
|
|
2550
|
-
if (options.limit)
|
|
2551
|
-
params.limit = options.limit;
|
|
2552
|
-
if (options.offset)
|
|
2553
|
-
params.offset = options.offset;
|
|
2554
|
-
if (options.before)
|
|
2555
|
-
params.before = options.before;
|
|
2556
|
-
if (options.after)
|
|
2557
|
-
params.after = options.after;
|
|
2558
|
-
return this.client.get("/messages", params);
|
|
2559
|
-
}
|
|
2560
|
-
async* listAll(options) {
|
|
2561
|
-
let offset = options.offset || 0;
|
|
2562
|
-
const limit = options.limit || 50;
|
|
2563
|
-
while (true) {
|
|
2564
|
-
const messages = await this.list({ ...options, limit, offset });
|
|
2565
|
-
if (messages.length === 0)
|
|
2566
|
-
break;
|
|
2567
|
-
for (const message of messages) {
|
|
2568
|
-
yield message;
|
|
2569
|
-
}
|
|
2570
|
-
if (messages.length < limit)
|
|
2571
|
-
break;
|
|
2572
|
-
offset += messages.length;
|
|
2573
|
-
}
|
|
2574
|
-
}
|
|
2575
|
-
async send(options) {
|
|
2576
|
-
const body = {
|
|
2577
|
-
text: options.text
|
|
2578
|
-
};
|
|
2579
|
-
if (options.chatGuid)
|
|
2580
|
-
body.chatGuid = options.chatGuid;
|
|
2581
|
-
if (options.recipient)
|
|
2582
|
-
body.recipient = options.recipient;
|
|
2583
|
-
if (options.method)
|
|
2584
|
-
body.method = options.method;
|
|
2585
|
-
if (options.effectId)
|
|
2586
|
-
body.effectId = options.effectId;
|
|
2587
|
-
return this.client.post("/messages", body);
|
|
2588
|
-
}
|
|
2589
|
-
async reply(messageGuid, options) {
|
|
2590
|
-
const body = {
|
|
2591
|
-
text: options.text,
|
|
2592
|
-
selectedMessageGuid: options.selectedMessageGuid
|
|
2593
|
-
};
|
|
2594
|
-
return this.client.post(`/messages/${messageGuid}/reply`, body);
|
|
2610
|
+
async list(owner, repo, options) {
|
|
2611
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls`, options);
|
|
2595
2612
|
}
|
|
2596
|
-
async get(
|
|
2597
|
-
return this.client.get(`/
|
|
2613
|
+
async get(owner, repo, prNumber) {
|
|
2614
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}`);
|
|
2598
2615
|
}
|
|
2599
|
-
async
|
|
2600
|
-
return this.client.
|
|
2601
|
-
|
|
2616
|
+
async create(owner, repo, title, head, base, body, options) {
|
|
2617
|
+
return this.client.post(`/repos/${owner}/${repo}/pulls`, {
|
|
2618
|
+
title,
|
|
2619
|
+
head,
|
|
2620
|
+
base,
|
|
2621
|
+
body,
|
|
2622
|
+
...options
|
|
2602
2623
|
});
|
|
2603
2624
|
}
|
|
2604
|
-
async
|
|
2605
|
-
return this.client.
|
|
2606
|
-
|
|
2625
|
+
async update(owner, repo, prNumber, options) {
|
|
2626
|
+
return this.client.patch(`/repos/${owner}/${repo}/pulls/${prNumber}`, options);
|
|
2627
|
+
}
|
|
2628
|
+
async merge(owner, repo, prNumber, options) {
|
|
2629
|
+
return this.client.put(`/repos/${owner}/${repo}/pulls/${prNumber}/merge`, options || {});
|
|
2630
|
+
}
|
|
2631
|
+
async isMerged(owner, repo, prNumber) {
|
|
2632
|
+
try {
|
|
2633
|
+
await this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/merge`);
|
|
2634
|
+
return true;
|
|
2635
|
+
} catch {
|
|
2636
|
+
return false;
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
async listCommits(owner, repo, prNumber, options) {
|
|
2640
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/commits`, options);
|
|
2641
|
+
}
|
|
2642
|
+
async listFiles(owner, repo, prNumber, options) {
|
|
2643
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/files`, options);
|
|
2644
|
+
}
|
|
2645
|
+
async listReviews(owner, repo, prNumber, options) {
|
|
2646
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/reviews`, options);
|
|
2647
|
+
}
|
|
2648
|
+
async getReview(owner, repo, prNumber, reviewId) {
|
|
2649
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/reviews/${reviewId}`);
|
|
2650
|
+
}
|
|
2651
|
+
async createReview(owner, repo, prNumber, body, event, options) {
|
|
2652
|
+
return this.client.post(`/repos/${owner}/${repo}/pulls/${prNumber}/reviews`, {
|
|
2653
|
+
body,
|
|
2654
|
+
event,
|
|
2655
|
+
...options
|
|
2607
2656
|
});
|
|
2608
2657
|
}
|
|
2609
|
-
async
|
|
2610
|
-
|
|
2658
|
+
async submitReview(owner, repo, prNumber, reviewId, event, body) {
|
|
2659
|
+
return this.client.post(`/repos/${owner}/${repo}/pulls/${prNumber}/reviews/${reviewId}/events`, { event, body });
|
|
2660
|
+
}
|
|
2661
|
+
async dismissReview(owner, repo, prNumber, reviewId, message) {
|
|
2662
|
+
return this.client.put(`/repos/${owner}/${repo}/pulls/${prNumber}/reviews/${reviewId}/dismissals`, { message });
|
|
2663
|
+
}
|
|
2664
|
+
async listReviewComments(owner, repo, prNumber, options) {
|
|
2665
|
+
return this.client.get(`/repos/${owner}/${repo}/pulls/${prNumber}/comments`, options);
|
|
2666
|
+
}
|
|
2667
|
+
async requestReviewers(owner, repo, prNumber, reviewers, teamReviewers) {
|
|
2668
|
+
return this.client.post(`/repos/${owner}/${repo}/pulls/${prNumber}/requested_reviewers`, {
|
|
2669
|
+
reviewers,
|
|
2670
|
+
team_reviewers: teamReviewers
|
|
2671
|
+
});
|
|
2672
|
+
}
|
|
2673
|
+
async removeRequestedReviewers(owner, repo, prNumber, reviewers, teamReviewers) {
|
|
2674
|
+
await this.client.request(`/repos/${owner}/${repo}/pulls/${prNumber}/requested_reviewers`, { method: "DELETE", body: { reviewers, team_reviewers: teamReviewers } });
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2678
|
+
// src/api/users.ts
|
|
2679
|
+
class UsersApi {
|
|
2680
|
+
client;
|
|
2681
|
+
constructor(client) {
|
|
2682
|
+
this.client = client;
|
|
2683
|
+
}
|
|
2684
|
+
async getAuthenticated() {
|
|
2685
|
+
return this.client.get("/user");
|
|
2686
|
+
}
|
|
2687
|
+
async get(username) {
|
|
2688
|
+
return this.client.get(`/users/${username}`);
|
|
2689
|
+
}
|
|
2690
|
+
async listFollowers(username, options) {
|
|
2691
|
+
return this.client.get(`/users/${username}/followers`, options);
|
|
2692
|
+
}
|
|
2693
|
+
async listFollowing(username, options) {
|
|
2694
|
+
return this.client.get(`/users/${username}/following`, options);
|
|
2695
|
+
}
|
|
2696
|
+
async listMyFollowers(options) {
|
|
2697
|
+
return this.client.get("/user/followers", options);
|
|
2698
|
+
}
|
|
2699
|
+
async listMyFollowing(options) {
|
|
2700
|
+
return this.client.get("/user/following", options);
|
|
2701
|
+
}
|
|
2702
|
+
async isFollowing(username) {
|
|
2703
|
+
try {
|
|
2704
|
+
await this.client.get(`/user/following/${username}`);
|
|
2705
|
+
return true;
|
|
2706
|
+
} catch {
|
|
2707
|
+
return false;
|
|
2708
|
+
}
|
|
2709
|
+
}
|
|
2710
|
+
async checkFollowing(username, targetUser) {
|
|
2711
|
+
try {
|
|
2712
|
+
await this.client.get(`/users/${username}/following/${targetUser}`);
|
|
2713
|
+
return true;
|
|
2714
|
+
} catch {
|
|
2715
|
+
return false;
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
async follow(username) {
|
|
2719
|
+
await this.client.put(`/user/following/${username}`, {});
|
|
2720
|
+
}
|
|
2721
|
+
async unfollow(username) {
|
|
2722
|
+
await this.client.delete(`/user/following/${username}`);
|
|
2723
|
+
}
|
|
2724
|
+
async listEmails(options) {
|
|
2725
|
+
return this.client.get("/user/emails", options);
|
|
2726
|
+
}
|
|
2727
|
+
async listPublicEmails(options) {
|
|
2728
|
+
return this.client.get("/user/public_emails", options);
|
|
2729
|
+
}
|
|
2730
|
+
async update(options) {
|
|
2731
|
+
return this.client.patch("/user", options);
|
|
2611
2732
|
}
|
|
2612
2733
|
}
|
|
2613
2734
|
|
|
2614
2735
|
// src/api/index.ts
|
|
2615
|
-
class
|
|
2736
|
+
class GitHub {
|
|
2616
2737
|
client;
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2738
|
+
repos;
|
|
2739
|
+
issues;
|
|
2740
|
+
pulls;
|
|
2741
|
+
users;
|
|
2620
2742
|
constructor(config) {
|
|
2621
|
-
this.client = new
|
|
2622
|
-
this.
|
|
2623
|
-
this.
|
|
2624
|
-
this.
|
|
2743
|
+
this.client = new GitHubClient(config);
|
|
2744
|
+
this.repos = new ReposApi(this.client);
|
|
2745
|
+
this.issues = new IssuesApi(this.client);
|
|
2746
|
+
this.pulls = new PullsApi(this.client);
|
|
2747
|
+
this.users = new UsersApi(this.client);
|
|
2625
2748
|
}
|
|
2626
2749
|
static fromEnv() {
|
|
2627
|
-
const
|
|
2628
|
-
if (!
|
|
2629
|
-
throw new Error("
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
apiKey: process.env.IMESSAGE_API_KEY,
|
|
2634
|
-
deviceId: process.env.IMESSAGE_DEVICE_ID
|
|
2635
|
-
});
|
|
2750
|
+
const token = process.env.GITHUB_TOKEN;
|
|
2751
|
+
if (!token) {
|
|
2752
|
+
throw new Error("GITHUB_TOKEN environment variable is required");
|
|
2753
|
+
}
|
|
2754
|
+
const baseUrl = process.env.GITHUB_BASE_URL;
|
|
2755
|
+
return new GitHub({ token, baseUrl });
|
|
2636
2756
|
}
|
|
2637
|
-
|
|
2638
|
-
return this.client.
|
|
2757
|
+
getTokenPreview() {
|
|
2758
|
+
return this.client.getTokenPreview();
|
|
2639
2759
|
}
|
|
2640
2760
|
getClient() {
|
|
2641
2761
|
return this.client;
|
|
@@ -2646,12 +2766,15 @@ class IMessage {
|
|
|
2646
2766
|
import { existsSync, readFileSync, writeFileSync, mkdirSync, readdirSync, rmSync } from "fs";
|
|
2647
2767
|
import { homedir } from "os";
|
|
2648
2768
|
import { join } from "path";
|
|
2649
|
-
var CONNECTOR_NAME = "connect-
|
|
2769
|
+
var CONNECTOR_NAME = "connect-github";
|
|
2650
2770
|
var DEFAULT_PROFILE = "default";
|
|
2651
2771
|
var profileOverride;
|
|
2652
|
-
var CONFIG_DIR = join(homedir(), ".
|
|
2772
|
+
var CONFIG_DIR = join(homedir(), ".connect", CONNECTOR_NAME);
|
|
2653
2773
|
var PROFILES_DIR = join(CONFIG_DIR, "profiles");
|
|
2654
2774
|
var CURRENT_PROFILE_FILE = join(CONFIG_DIR, "current_profile");
|
|
2775
|
+
function setProfileOverride(profile) {
|
|
2776
|
+
profileOverride = profile;
|
|
2777
|
+
}
|
|
2655
2778
|
function ensureConfigDir() {
|
|
2656
2779
|
if (!existsSync(CONFIG_DIR)) {
|
|
2657
2780
|
mkdirSync(CONFIG_DIR, { recursive: true });
|
|
@@ -2660,8 +2783,8 @@ function ensureConfigDir() {
|
|
|
2660
2783
|
mkdirSync(PROFILES_DIR, { recursive: true });
|
|
2661
2784
|
}
|
|
2662
2785
|
}
|
|
2663
|
-
function getProfilePath(
|
|
2664
|
-
return join(PROFILES_DIR,
|
|
2786
|
+
function getProfilePath(profile) {
|
|
2787
|
+
return join(PROFILES_DIR, `${profile}.json`);
|
|
2665
2788
|
}
|
|
2666
2789
|
function getCurrentProfile() {
|
|
2667
2790
|
if (profileOverride) {
|
|
@@ -2681,7 +2804,7 @@ function getCurrentProfile() {
|
|
|
2681
2804
|
function setCurrentProfile(profile) {
|
|
2682
2805
|
ensureConfigDir();
|
|
2683
2806
|
if (!profileExists(profile) && profile !== DEFAULT_PROFILE) {
|
|
2684
|
-
throw new Error(
|
|
2807
|
+
throw new Error(`Profile "${profile}" does not exist`);
|
|
2685
2808
|
}
|
|
2686
2809
|
writeFileSync(CURRENT_PROFILE_FILE, profile);
|
|
2687
2810
|
}
|
|
@@ -2737,280 +2860,659 @@ function saveProfile(config, profile) {
|
|
|
2737
2860
|
const profileName = profile || getCurrentProfile();
|
|
2738
2861
|
writeFileSync(getProfilePath(profileName), JSON.stringify(config, null, 2));
|
|
2739
2862
|
}
|
|
2740
|
-
function
|
|
2741
|
-
return process.env.
|
|
2863
|
+
function getToken() {
|
|
2864
|
+
return process.env.GITHUB_TOKEN || loadProfile().token;
|
|
2742
2865
|
}
|
|
2743
|
-
function
|
|
2866
|
+
function setToken(token) {
|
|
2744
2867
|
const config = loadProfile();
|
|
2745
|
-
config.
|
|
2868
|
+
config.token = token;
|
|
2746
2869
|
saveProfile(config);
|
|
2747
2870
|
}
|
|
2748
|
-
function
|
|
2749
|
-
|
|
2750
|
-
config.apiKey = apiKey;
|
|
2751
|
-
saveProfile(config);
|
|
2752
|
-
}
|
|
2753
|
-
function setDeviceId(deviceId) {
|
|
2754
|
-
const config = loadProfile();
|
|
2755
|
-
config.deviceId = deviceId;
|
|
2756
|
-
saveProfile(config);
|
|
2871
|
+
function clearConfig() {
|
|
2872
|
+
saveProfile({});
|
|
2757
2873
|
}
|
|
2758
2874
|
function getConfigDir() {
|
|
2759
2875
|
return CONFIG_DIR;
|
|
2760
2876
|
}
|
|
2761
2877
|
|
|
2762
2878
|
// src/utils/output.ts
|
|
2763
|
-
function
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2879
|
+
function formatOutput(data, format = "pretty") {
|
|
2880
|
+
switch (format) {
|
|
2881
|
+
case "json":
|
|
2882
|
+
return JSON.stringify(data, null, 2);
|
|
2883
|
+
case "table":
|
|
2884
|
+
return formatAsTable(data);
|
|
2885
|
+
case "pretty":
|
|
2886
|
+
default:
|
|
2887
|
+
return formatPretty(data);
|
|
2770
2888
|
}
|
|
2771
|
-
if (Array.isArray(data)) {
|
|
2772
|
-
if (data.length === 0) {
|
|
2773
|
-
console.log(source_default.dim("No results"));
|
|
2774
|
-
return;
|
|
2775
|
-
}
|
|
2776
|
-
data.forEach((item) => outputSingle(item));
|
|
2777
|
-
} else {
|
|
2778
|
-
outputSingle(data);
|
|
2779
|
-
}
|
|
2780
|
-
}
|
|
2781
|
-
function outputSingle(data) {
|
|
2782
|
-
if (isHealth(data)) {
|
|
2783
|
-
outputHealth(data);
|
|
2784
|
-
} else if (isConversation(data)) {
|
|
2785
|
-
outputConversation(data);
|
|
2786
|
-
} else if (isMessage(data)) {
|
|
2787
|
-
outputMessage(data);
|
|
2788
|
-
} else if (isContact(data)) {
|
|
2789
|
-
outputContact(data);
|
|
2790
|
-
} else {
|
|
2791
|
-
console.log(formatJson(data));
|
|
2792
|
-
}
|
|
2793
|
-
}
|
|
2794
|
-
function isHealth(data) {
|
|
2795
|
-
return typeof data === "object" && data !== null && "bridge" in data && "imessage" in data;
|
|
2796
2889
|
}
|
|
2797
|
-
function
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2890
|
+
function formatAsTable(data) {
|
|
2891
|
+
if (!Array.isArray(data)) {
|
|
2892
|
+
data = [data];
|
|
2893
|
+
}
|
|
2894
|
+
const items = data;
|
|
2895
|
+
if (items.length === 0) {
|
|
2896
|
+
return "No data";
|
|
2897
|
+
}
|
|
2898
|
+
const firstItem = items[0];
|
|
2899
|
+
if (!firstItem || typeof firstItem !== "object") {
|
|
2900
|
+
return "No data";
|
|
2901
|
+
}
|
|
2902
|
+
const keys = Object.keys(firstItem);
|
|
2903
|
+
const colWidths = keys.map((key) => {
|
|
2904
|
+
const maxValue = Math.max(key.length, ...items.map((item) => String(item[key] ?? "").length));
|
|
2905
|
+
return Math.min(maxValue, 40);
|
|
2906
|
+
});
|
|
2907
|
+
const header = keys.map((key, i) => key.padEnd(colWidths[i] ?? 10)).join(" | ");
|
|
2908
|
+
const separator = colWidths.map((w) => "-".repeat(w)).join("-+-");
|
|
2909
|
+
const rows = items.map((item) => keys.map((key, i) => {
|
|
2910
|
+
const value = String(item[key] ?? "");
|
|
2911
|
+
const width = colWidths[i] ?? 10;
|
|
2912
|
+
return value.length > width ? value.substring(0, width - 3) + "..." : value.padEnd(width);
|
|
2913
|
+
}).join(" | "));
|
|
2914
|
+
return [header, separator, ...rows].join(`
|
|
2915
|
+
`);
|
|
2821
2916
|
}
|
|
2822
|
-
function
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
console.log(" Participants:", conv.participants.map((p) => p.name || p.handle).join(", "));
|
|
2917
|
+
function formatPretty(data) {
|
|
2918
|
+
if (Array.isArray(data)) {
|
|
2919
|
+
return data.map((item, i) => `${source_default.cyan(`[${i + 1}]`)} ${formatPrettyItem(item)}`).join(`
|
|
2920
|
+
|
|
2921
|
+
`);
|
|
2828
2922
|
}
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2923
|
+
return formatPrettyItem(data);
|
|
2924
|
+
}
|
|
2925
|
+
function formatPrettyItem(item, indent = 0) {
|
|
2926
|
+
if (item === null || item === undefined) {
|
|
2927
|
+
return source_default.gray("null");
|
|
2832
2928
|
}
|
|
2833
|
-
if (
|
|
2834
|
-
|
|
2929
|
+
if (typeof item !== "object") {
|
|
2930
|
+
return String(item);
|
|
2835
2931
|
}
|
|
2836
|
-
|
|
2932
|
+
const spaces = " ".repeat(indent);
|
|
2933
|
+
const entries = Object.entries(item);
|
|
2934
|
+
return entries.map(([key, value]) => {
|
|
2935
|
+
if (Array.isArray(value)) {
|
|
2936
|
+
if (value.length === 0) {
|
|
2937
|
+
return `${spaces}${source_default.blue(key)}: ${source_default.gray("[]")}`;
|
|
2938
|
+
}
|
|
2939
|
+
if (typeof value[0] === "object") {
|
|
2940
|
+
return `${spaces}${source_default.blue(key)}:
|
|
2941
|
+
${value.map((v) => formatPrettyItem(v, indent + 1)).join(`
|
|
2942
|
+
`)}`;
|
|
2943
|
+
}
|
|
2944
|
+
return `${spaces}${source_default.blue(key)}: ${value.join(", ")}`;
|
|
2945
|
+
}
|
|
2946
|
+
if (typeof value === "object" && value !== null) {
|
|
2947
|
+
return `${spaces}${source_default.blue(key)}:
|
|
2948
|
+
${formatPrettyItem(value, indent + 1)}`;
|
|
2949
|
+
}
|
|
2950
|
+
return `${spaces}${source_default.blue(key)}: ${source_default.white(String(value))}`;
|
|
2951
|
+
}).join(`
|
|
2952
|
+
`);
|
|
2837
2953
|
}
|
|
2838
|
-
function
|
|
2839
|
-
|
|
2954
|
+
function success(message) {
|
|
2955
|
+
console.log(source_default.green("\u2713"), message);
|
|
2840
2956
|
}
|
|
2841
|
-
function
|
|
2842
|
-
|
|
2843
|
-
const arrow = msg.fromMe ? "\u2192" : "\u2190";
|
|
2844
|
-
console.log(`${sender} ${arrow} ${msg.text || "(no text)"}`);
|
|
2845
|
-
console.log(" Date:", msg.date);
|
|
2846
|
-
if (msg.attachments?.length) {
|
|
2847
|
-
console.log(" Attachments:", msg.attachments.length);
|
|
2848
|
-
}
|
|
2849
|
-
console.log("");
|
|
2957
|
+
function error(message) {
|
|
2958
|
+
console.error(source_default.red("\u2717"), message);
|
|
2850
2959
|
}
|
|
2851
|
-
function
|
|
2852
|
-
|
|
2960
|
+
function warn(message) {
|
|
2961
|
+
console.warn(source_default.yellow("\u26A0"), message);
|
|
2853
2962
|
}
|
|
2854
|
-
function
|
|
2855
|
-
console.log(source_default.
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
}
|
|
2860
|
-
if (contact.emails?.length) {
|
|
2861
|
-
console.log(" Emails:", contact.emails.join(", "));
|
|
2862
|
-
}
|
|
2863
|
-
console.log("");
|
|
2963
|
+
function info(message) {
|
|
2964
|
+
console.log(source_default.blue("\u2139"), message);
|
|
2965
|
+
}
|
|
2966
|
+
function print(data, format = "pretty") {
|
|
2967
|
+
console.log(formatOutput(data, format));
|
|
2864
2968
|
}
|
|
2865
2969
|
|
|
2866
2970
|
// src/cli/index.ts
|
|
2971
|
+
var CONNECTOR_NAME2 = "connect-github";
|
|
2972
|
+
var VERSION = "0.0.1";
|
|
2867
2973
|
var program2 = new Command;
|
|
2868
|
-
program2.name(
|
|
2869
|
-
|
|
2974
|
+
program2.name(CONNECTOR_NAME2).description("GitHub API connector CLI").version(VERSION).option("-t, --token <token>", "GitHub token (overrides config)").option("-f, --format <format>", "Output format (json, pretty)", "pretty").option("-p, --profile <profile>", "Use a specific profile").hook("preAction", (thisCommand) => {
|
|
2975
|
+
const opts = thisCommand.opts();
|
|
2976
|
+
if (opts.profile) {
|
|
2977
|
+
if (!profileExists(opts.profile)) {
|
|
2978
|
+
error(`Profile "${opts.profile}" does not exist. Create it with "${CONNECTOR_NAME2} profile create ${opts.profile}"`);
|
|
2979
|
+
process.exit(1);
|
|
2980
|
+
}
|
|
2981
|
+
setProfileOverride(opts.profile);
|
|
2982
|
+
}
|
|
2983
|
+
if (opts.token) {
|
|
2984
|
+
process.env.GITHUB_TOKEN = opts.token;
|
|
2985
|
+
}
|
|
2986
|
+
});
|
|
2987
|
+
function getFormat(cmd) {
|
|
2988
|
+
const parent = cmd.parent;
|
|
2989
|
+
return parent?.opts().format || "pretty";
|
|
2990
|
+
}
|
|
2991
|
+
function getClient() {
|
|
2992
|
+
const token = getToken();
|
|
2993
|
+
if (!token) {
|
|
2994
|
+
error(`No GitHub token configured. Run "${CONNECTOR_NAME2} config set-token <token>" or set GITHUB_TOKEN environment variable.`);
|
|
2995
|
+
process.exit(1);
|
|
2996
|
+
}
|
|
2997
|
+
return new GitHub({ token });
|
|
2998
|
+
}
|
|
2999
|
+
var profileCmd = program2.command("profile").description("Manage configuration profiles");
|
|
2870
3000
|
profileCmd.command("list").description("List all profiles").action(() => {
|
|
2871
3001
|
const profiles = listProfiles();
|
|
2872
3002
|
const current = getCurrentProfile();
|
|
2873
|
-
for (const name of profiles) {
|
|
2874
|
-
const marker = name === current ? source_default.green("* ") : " ";
|
|
2875
|
-
console.log(marker + name);
|
|
2876
|
-
}
|
|
2877
3003
|
if (profiles.length === 0) {
|
|
2878
|
-
|
|
3004
|
+
info('No profiles found. Use "profile create <name>" to create one.');
|
|
3005
|
+
return;
|
|
2879
3006
|
}
|
|
3007
|
+
success(`Profiles:`);
|
|
3008
|
+
profiles.forEach((p) => {
|
|
3009
|
+
const isActive = p === current ? source_default.green(" (active)") : "";
|
|
3010
|
+
console.log(` ${p}${isActive}`);
|
|
3011
|
+
});
|
|
2880
3012
|
});
|
|
2881
|
-
profileCmd.command("
|
|
2882
|
-
|
|
2883
|
-
|
|
3013
|
+
profileCmd.command("use <name>").description("Switch to a profile").action((name) => {
|
|
3014
|
+
if (!profileExists(name)) {
|
|
3015
|
+
error(`Profile "${name}" does not exist. Create it with "profile create ${name}"`);
|
|
3016
|
+
process.exit(1);
|
|
3017
|
+
}
|
|
3018
|
+
setCurrentProfile(name);
|
|
3019
|
+
success(`Switched to profile: ${name}`);
|
|
3020
|
+
});
|
|
3021
|
+
profileCmd.command("create <name>").description("Create a new profile").option("--token <token>", "GitHub token").option("--use", "Switch to this profile after creation").action((name, opts) => {
|
|
3022
|
+
if (profileExists(name)) {
|
|
3023
|
+
error(`Profile "${name}" already exists`);
|
|
3024
|
+
process.exit(1);
|
|
3025
|
+
}
|
|
3026
|
+
createProfile(name, {
|
|
3027
|
+
token: opts.token
|
|
3028
|
+
});
|
|
3029
|
+
success(`Profile "${name}" created`);
|
|
3030
|
+
if (opts.use) {
|
|
3031
|
+
setCurrentProfile(name);
|
|
3032
|
+
info(`Switched to profile: ${name}`);
|
|
3033
|
+
}
|
|
2884
3034
|
});
|
|
2885
3035
|
profileCmd.command("delete <name>").description("Delete a profile").action((name) => {
|
|
3036
|
+
if (name === "default") {
|
|
3037
|
+
error("Cannot delete the default profile");
|
|
3038
|
+
process.exit(1);
|
|
3039
|
+
}
|
|
2886
3040
|
if (deleteProfile(name)) {
|
|
2887
|
-
|
|
3041
|
+
success(`Profile "${name}" deleted`);
|
|
2888
3042
|
} else {
|
|
2889
|
-
|
|
3043
|
+
error(`Profile "${name}" not found`);
|
|
3044
|
+
process.exit(1);
|
|
2890
3045
|
}
|
|
2891
3046
|
});
|
|
2892
|
-
profileCmd.command("
|
|
2893
|
-
|
|
2894
|
-
|
|
3047
|
+
profileCmd.command("show [name]").description("Show profile configuration").action((name) => {
|
|
3048
|
+
const profileName = name || getCurrentProfile();
|
|
3049
|
+
const config = loadProfile(profileName);
|
|
3050
|
+
const active = getCurrentProfile();
|
|
3051
|
+
console.log(source_default.bold(`Profile: ${profileName}${profileName === active ? source_default.green(" (active)") : ""}`));
|
|
3052
|
+
info(`Token: ${config.token ? `${config.token.substring(0, 8)}...` : source_default.gray("not set")}`);
|
|
3053
|
+
});
|
|
3054
|
+
var configCmd = program2.command("config").description("Manage CLI configuration (for active profile)");
|
|
3055
|
+
configCmd.command("set-token <token>").description("Set GitHub token").action((token) => {
|
|
3056
|
+
setToken(token);
|
|
3057
|
+
success(`Token saved to profile: ${getCurrentProfile()}`);
|
|
2895
3058
|
});
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
3059
|
+
configCmd.command("show").description("Show current configuration").action(() => {
|
|
3060
|
+
const profileName = getCurrentProfile();
|
|
3061
|
+
const token = getToken();
|
|
3062
|
+
console.log(source_default.bold(`Active Profile: ${profileName}`));
|
|
3063
|
+
info(`Config directory: ${getConfigDir()}`);
|
|
3064
|
+
info(`Token: ${token ? `${token.substring(0, 8)}...` : source_default.gray("not set")}`);
|
|
3065
|
+
});
|
|
3066
|
+
configCmd.command("clear").description("Clear configuration for active profile").action(() => {
|
|
3067
|
+
clearConfig();
|
|
3068
|
+
success(`Configuration cleared for profile: ${getCurrentProfile()}`);
|
|
3069
|
+
});
|
|
3070
|
+
var repoCmd = program2.command("repo").description("Manage repositories");
|
|
3071
|
+
repoCmd.command("list [owner]").description("List repositories for a user/org (defaults to authenticated user)").option("--org", "Treat owner as an organization").option("-n, --per-page <number>", "Results per page", "30").option("--page <number>", "Page number", "1").option("--sort <sort>", "Sort by: created, updated, pushed, full_name", "updated").action(async (owner, opts) => {
|
|
3072
|
+
try {
|
|
3073
|
+
const client = getClient();
|
|
3074
|
+
let repos;
|
|
3075
|
+
if (!owner) {
|
|
3076
|
+
repos = await client.repos.listForAuthenticatedUser({
|
|
3077
|
+
per_page: parseInt(opts.perPage),
|
|
3078
|
+
page: parseInt(opts.page),
|
|
3079
|
+
sort: opts.sort
|
|
3080
|
+
});
|
|
3081
|
+
} else if (opts.org) {
|
|
3082
|
+
repos = await client.repos.listOrg(owner, {
|
|
3083
|
+
per_page: parseInt(opts.perPage),
|
|
3084
|
+
page: parseInt(opts.page),
|
|
3085
|
+
sort: opts.sort
|
|
3086
|
+
});
|
|
3087
|
+
} else {
|
|
3088
|
+
repos = await client.repos.list(owner, {
|
|
3089
|
+
per_page: parseInt(opts.perPage),
|
|
3090
|
+
page: parseInt(opts.page),
|
|
3091
|
+
sort: opts.sort
|
|
3092
|
+
});
|
|
3093
|
+
}
|
|
3094
|
+
if (getFormat(repoCmd) === "json") {
|
|
3095
|
+
print(repos, "json");
|
|
3096
|
+
} else {
|
|
3097
|
+
if (repos.length === 0) {
|
|
3098
|
+
info("No repositories found");
|
|
3099
|
+
return;
|
|
3100
|
+
}
|
|
3101
|
+
repos.forEach((repo) => {
|
|
3102
|
+
const visibility = repo.private ? source_default.yellow("private") : source_default.green("public");
|
|
3103
|
+
const stars = repo.stargazers_count > 0 ? source_default.yellow(`* ${repo.stargazers_count}`) : "";
|
|
3104
|
+
console.log(`${source_default.cyan(repo.full_name)} ${visibility} ${stars}`);
|
|
3105
|
+
if (repo.description) {
|
|
3106
|
+
console.log(` ${source_default.gray(repo.description)}`);
|
|
3107
|
+
}
|
|
3108
|
+
});
|
|
3109
|
+
}
|
|
3110
|
+
} catch (err) {
|
|
3111
|
+
error(String(err));
|
|
2906
3112
|
process.exit(1);
|
|
2907
3113
|
}
|
|
2908
|
-
console.log(source_default.green("Set " + key));
|
|
2909
3114
|
});
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
console.log(" deviceId:", config.deviceId || "(not set)");
|
|
3115
|
+
repoCmd.command("get <owner> <repo>").description("Get repository information").action(async (owner, repo) => {
|
|
3116
|
+
try {
|
|
3117
|
+
const client = getClient();
|
|
3118
|
+
const result = await client.repos.get(owner, repo);
|
|
3119
|
+
print(result, getFormat(repoCmd));
|
|
3120
|
+
} catch (err) {
|
|
3121
|
+
error(String(err));
|
|
3122
|
+
process.exit(1);
|
|
3123
|
+
}
|
|
2920
3124
|
});
|
|
2921
|
-
|
|
2922
|
-
const client = createClient();
|
|
3125
|
+
repoCmd.command("create <name>").description("Create a new repository").option("-d, --description <description>", "Repository description").option("--private", "Create as private repository").option("--org <org>", "Create in an organization").option("--auto-init", "Initialize with README").action(async (name, opts) => {
|
|
2923
3126
|
try {
|
|
2924
|
-
const
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
3127
|
+
const client = getClient();
|
|
3128
|
+
let result;
|
|
3129
|
+
const options = {
|
|
3130
|
+
description: opts.description,
|
|
3131
|
+
private: opts.private,
|
|
3132
|
+
auto_init: opts.autoInit
|
|
3133
|
+
};
|
|
3134
|
+
if (opts.org) {
|
|
3135
|
+
result = await client.repos.createInOrg(opts.org, name, options);
|
|
3136
|
+
} else {
|
|
3137
|
+
result = await client.repos.create(name, options);
|
|
3138
|
+
}
|
|
3139
|
+
success(`Repository created: ${result.html_url}`);
|
|
3140
|
+
print(result, getFormat(repoCmd));
|
|
3141
|
+
} catch (err) {
|
|
3142
|
+
error(String(err));
|
|
3143
|
+
process.exit(1);
|
|
3144
|
+
}
|
|
3145
|
+
});
|
|
3146
|
+
repoCmd.command("delete <owner> <repo>").description("Delete a repository").action(async (owner, repo) => {
|
|
3147
|
+
try {
|
|
3148
|
+
const client = getClient();
|
|
3149
|
+
await client.repos.delete(owner, repo);
|
|
3150
|
+
success(`Repository ${owner}/${repo} deleted`);
|
|
3151
|
+
} catch (err) {
|
|
3152
|
+
error(String(err));
|
|
2928
3153
|
process.exit(1);
|
|
2929
3154
|
}
|
|
2930
3155
|
});
|
|
2931
|
-
|
|
2932
|
-
convCmd.command("list").description("List conversations").option("-l, --limit <n>", "Max conversations to return").action(async (opts) => {
|
|
2933
|
-
const client = createClient();
|
|
3156
|
+
repoCmd.command("content <owner> <repo> <path>").description("Get file or directory content").option("--ref <ref>", "Git ref (branch, tag, commit)").action(async (owner, repo, path, opts) => {
|
|
2934
3157
|
try {
|
|
2935
|
-
const
|
|
2936
|
-
|
|
3158
|
+
const client = getClient();
|
|
3159
|
+
const result = await client.repos.getContent(owner, repo, path, { ref: opts.ref });
|
|
3160
|
+
if (!Array.isArray(result) && result.type === "file" && result.content) {
|
|
3161
|
+
if (getFormat(repoCmd) === "json") {
|
|
3162
|
+
print(result, "json");
|
|
3163
|
+
} else {
|
|
3164
|
+
const content = Buffer.from(result.content, "base64").toString("utf-8");
|
|
3165
|
+
console.log(content);
|
|
3166
|
+
}
|
|
3167
|
+
} else {
|
|
3168
|
+
print(result, getFormat(repoCmd));
|
|
3169
|
+
}
|
|
3170
|
+
} catch (err) {
|
|
3171
|
+
error(String(err));
|
|
3172
|
+
process.exit(1);
|
|
3173
|
+
}
|
|
3174
|
+
});
|
|
3175
|
+
repoCmd.command("commits <owner> <repo>").description("List commits on a repository").option("--sha <sha>", "SHA or branch to start listing from").option("--path <path>", "Only commits containing this file path").option("--author <author>", "GitHub login or email to filter by").option("--since <since>", "Only commits after this date (ISO 8601)").option("--until <until>", "Only commits before this date (ISO 8601)").option("--limit <number>", "Maximum results", "10").action(async (owner, repo, opts) => {
|
|
3176
|
+
try {
|
|
3177
|
+
const client = getClient();
|
|
3178
|
+
const commits = await client.repos.listCommits(owner, repo, {
|
|
3179
|
+
sha: opts.sha,
|
|
3180
|
+
path: opts.path,
|
|
3181
|
+
author: opts.author,
|
|
3182
|
+
since: opts.since,
|
|
3183
|
+
until: opts.until,
|
|
3184
|
+
per_page: parseInt(opts.limit, 10) || 10
|
|
2937
3185
|
});
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
3186
|
+
if (getFormat(repoCmd) === "json") {
|
|
3187
|
+
print(commits, "json");
|
|
3188
|
+
} else {
|
|
3189
|
+
if (commits.length === 0) {
|
|
3190
|
+
info("No commits found.");
|
|
3191
|
+
return;
|
|
3192
|
+
}
|
|
3193
|
+
for (const c of commits) {
|
|
3194
|
+
const date = c.commit.author?.date ? new Date(c.commit.author.date).toLocaleDateString() : "";
|
|
3195
|
+
const author = c.commit.author?.name || c.author?.login || "unknown";
|
|
3196
|
+
const msg = c.commit.message.split(`
|
|
3197
|
+
`)[0];
|
|
3198
|
+
console.log(`${source_default.yellow(c.sha.slice(0, 7))} ${source_default.gray(date)} ${source_default.cyan(author)} ${msg}`);
|
|
3199
|
+
}
|
|
3200
|
+
info(`${commits.length} commit(s)`);
|
|
3201
|
+
}
|
|
3202
|
+
} catch (err) {
|
|
3203
|
+
error(String(err));
|
|
3204
|
+
process.exit(1);
|
|
3205
|
+
}
|
|
3206
|
+
});
|
|
3207
|
+
repoCmd.command("commit <owner> <repo> <ref>").description("Get a single commit by SHA or ref").action(async (owner, repo, ref) => {
|
|
3208
|
+
try {
|
|
3209
|
+
const client = getClient();
|
|
3210
|
+
const commit = await client.repos.getCommit(owner, repo, ref);
|
|
3211
|
+
if (getFormat(repoCmd) === "json") {
|
|
3212
|
+
print(commit, "json");
|
|
3213
|
+
} else {
|
|
3214
|
+
const msg = commit.commit.message.split(`
|
|
3215
|
+
`)[0];
|
|
3216
|
+
const author = commit.commit.author?.name || "unknown";
|
|
3217
|
+
const date = commit.commit.author?.date || "";
|
|
3218
|
+
console.log(`${source_default.yellow("Commit:")} ${commit.sha}`);
|
|
3219
|
+
console.log(`${source_default.cyan("Author:")} ${author}`);
|
|
3220
|
+
console.log(`${source_default.gray("Date:")} ${date}`);
|
|
3221
|
+
console.log(`${source_default.white("Message:")} ${msg}`);
|
|
3222
|
+
if (commit.parents.length > 0) {
|
|
3223
|
+
console.log(`${source_default.gray("Parents:")} ${commit.parents.map((p) => p.sha.slice(0, 7)).join(", ")}`);
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
} catch (err) {
|
|
3227
|
+
error(String(err));
|
|
2941
3228
|
process.exit(1);
|
|
2942
3229
|
}
|
|
2943
3230
|
});
|
|
2944
|
-
|
|
2945
|
-
const client = createClient();
|
|
3231
|
+
repoCmd.command("branches <owner> <repo>").description("List branches for a repository").option("--protected", "Only show protected branches").option("--limit <number>", "Maximum results", "30").action(async (owner, repo, opts) => {
|
|
2946
3232
|
try {
|
|
2947
|
-
const
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3233
|
+
const client = getClient();
|
|
3234
|
+
const branches = await client.repos.listBranches(owner, repo, {
|
|
3235
|
+
protected: opts.protected,
|
|
3236
|
+
per_page: parseInt(opts.limit, 10) || 30
|
|
3237
|
+
});
|
|
3238
|
+
if (getFormat(repoCmd) === "json") {
|
|
3239
|
+
print(branches, "json");
|
|
3240
|
+
} else {
|
|
3241
|
+
if (branches.length === 0) {
|
|
3242
|
+
info("No branches found.");
|
|
3243
|
+
return;
|
|
3244
|
+
}
|
|
3245
|
+
for (const b of branches) {
|
|
3246
|
+
const prot = b.protected ? source_default.yellow(" [protected]") : "";
|
|
3247
|
+
console.log(`${source_default.cyan(b.name)}${prot} ${source_default.gray(b.commit.sha.slice(0, 7))}`);
|
|
3248
|
+
}
|
|
3249
|
+
info(`${branches.length} branch(es)`);
|
|
3250
|
+
}
|
|
3251
|
+
} catch (err) {
|
|
3252
|
+
error(String(err));
|
|
2951
3253
|
process.exit(1);
|
|
2952
3254
|
}
|
|
2953
3255
|
});
|
|
2954
|
-
var
|
|
2955
|
-
|
|
2956
|
-
const client = createClient();
|
|
3256
|
+
var issueCmd = program2.command("issue").description("Manage issues");
|
|
3257
|
+
issueCmd.command("list <owner> <repo>").description("List issues in a repository").option("--state <state>", "Filter by state: open, closed, all", "open").option("--labels <labels>", "Filter by labels (comma-separated)").option("-n, --per-page <number>", "Results per page", "30").option("--page <number>", "Page number", "1").action(async (owner, repo, opts) => {
|
|
2957
3258
|
try {
|
|
2958
|
-
const
|
|
2959
|
-
|
|
2960
|
-
|
|
3259
|
+
const client = getClient();
|
|
3260
|
+
const issues = await client.issues.list(owner, repo, {
|
|
3261
|
+
state: opts.state,
|
|
3262
|
+
labels: opts.labels,
|
|
3263
|
+
per_page: parseInt(opts.perPage),
|
|
3264
|
+
page: parseInt(opts.page)
|
|
2961
3265
|
});
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
3266
|
+
if (getFormat(issueCmd) === "json") {
|
|
3267
|
+
print(issues, "json");
|
|
3268
|
+
} else {
|
|
3269
|
+
if (issues.length === 0) {
|
|
3270
|
+
info("No issues found");
|
|
3271
|
+
return;
|
|
3272
|
+
}
|
|
3273
|
+
issues.forEach((issue) => {
|
|
3274
|
+
const state = issue.state === "open" ? source_default.green("open") : source_default.red("closed");
|
|
3275
|
+
const labels = issue.labels.map((l) => source_default.cyan(l.name)).join(", ");
|
|
3276
|
+
console.log(`#${issue.number} ${state} ${source_default.bold(issue.title)}`);
|
|
3277
|
+
if (labels)
|
|
3278
|
+
console.log(` Labels: ${labels}`);
|
|
3279
|
+
if (issue.assignee)
|
|
3280
|
+
console.log(` Assignee: ${source_default.yellow(issue.assignee.login)}`);
|
|
3281
|
+
});
|
|
3282
|
+
}
|
|
3283
|
+
} catch (err) {
|
|
3284
|
+
error(String(err));
|
|
2965
3285
|
process.exit(1);
|
|
2966
3286
|
}
|
|
2967
3287
|
});
|
|
2968
|
-
|
|
2969
|
-
const client = createClient();
|
|
3288
|
+
issueCmd.command("get <owner> <repo> <number>").description("Get an issue").action(async (owner, repo, number) => {
|
|
2970
3289
|
try {
|
|
2971
|
-
const
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
3290
|
+
const client = getClient();
|
|
3291
|
+
const result = await client.issues.get(owner, repo, parseInt(number));
|
|
3292
|
+
print(result, getFormat(issueCmd));
|
|
3293
|
+
} catch (err) {
|
|
3294
|
+
error(String(err));
|
|
3295
|
+
process.exit(1);
|
|
3296
|
+
}
|
|
3297
|
+
});
|
|
3298
|
+
issueCmd.command("create <owner> <repo>").description("Create an issue").requiredOption("-t, --title <title>", "Issue title").option("-b, --body <body>", "Issue body").option("--labels <labels>", "Labels (comma-separated)").option("--assignees <assignees>", "Assignees (comma-separated)").action(async (owner, repo, opts) => {
|
|
3299
|
+
try {
|
|
3300
|
+
const client = getClient();
|
|
3301
|
+
const result = await client.issues.create(owner, repo, opts.title, opts.body, {
|
|
3302
|
+
labels: opts.labels?.split(",").map((l) => l.trim()),
|
|
3303
|
+
assignees: opts.assignees?.split(",").map((a) => a.trim())
|
|
2975
3304
|
});
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
3305
|
+
success(`Issue created: ${result.html_url}`);
|
|
3306
|
+
print(result, getFormat(issueCmd));
|
|
3307
|
+
} catch (err) {
|
|
3308
|
+
error(String(err));
|
|
2979
3309
|
process.exit(1);
|
|
2980
3310
|
}
|
|
2981
3311
|
});
|
|
2982
|
-
|
|
2983
|
-
const client = createClient();
|
|
3312
|
+
issueCmd.command("close <owner> <repo> <number>").description("Close an issue").option("--reason <reason>", "Close reason: completed, not_planned", "completed").action(async (owner, repo, number, opts) => {
|
|
2984
3313
|
try {
|
|
2985
|
-
const
|
|
2986
|
-
|
|
2987
|
-
|
|
3314
|
+
const client = getClient();
|
|
3315
|
+
await client.issues.update(owner, repo, parseInt(number), {
|
|
3316
|
+
state: "closed",
|
|
3317
|
+
state_reason: opts.reason
|
|
2988
3318
|
});
|
|
2989
|
-
|
|
2990
|
-
} catch (
|
|
2991
|
-
|
|
3319
|
+
success(`Issue #${number} closed`);
|
|
3320
|
+
} catch (err) {
|
|
3321
|
+
error(String(err));
|
|
2992
3322
|
process.exit(1);
|
|
2993
3323
|
}
|
|
2994
3324
|
});
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3325
|
+
issueCmd.command("comment <owner> <repo> <number>").description("Add a comment to an issue").requiredOption("-b, --body <body>", "Comment body").action(async (owner, repo, number, opts) => {
|
|
3326
|
+
try {
|
|
3327
|
+
const client = getClient();
|
|
3328
|
+
const result = await client.issues.createComment(owner, repo, parseInt(number), opts.body);
|
|
3329
|
+
success(`Comment added: ${result.html_url}`);
|
|
3330
|
+
} catch (err) {
|
|
3331
|
+
error(String(err));
|
|
3332
|
+
process.exit(1);
|
|
3333
|
+
}
|
|
3334
|
+
});
|
|
3335
|
+
issueCmd.command("comments <owner> <repo> <number>").description("List comments on an issue").action(async (owner, repo, number) => {
|
|
3336
|
+
try {
|
|
3337
|
+
const client = getClient();
|
|
3338
|
+
const comments = await client.issues.listComments(owner, repo, parseInt(number));
|
|
3339
|
+
if (getFormat(issueCmd) === "json") {
|
|
3340
|
+
print(comments, "json");
|
|
3341
|
+
} else {
|
|
3342
|
+
if (comments.length === 0) {
|
|
3343
|
+
info("No comments");
|
|
3344
|
+
return;
|
|
3345
|
+
}
|
|
3346
|
+
comments.forEach((comment) => {
|
|
3347
|
+
console.log(`${source_default.cyan(comment.user.login)} ${source_default.gray(comment.created_at)}`);
|
|
3348
|
+
console.log(` ${comment.body}`);
|
|
3349
|
+
console.log();
|
|
3350
|
+
});
|
|
3351
|
+
}
|
|
3352
|
+
} catch (err) {
|
|
3353
|
+
error(String(err));
|
|
3354
|
+
process.exit(1);
|
|
3355
|
+
}
|
|
3356
|
+
});
|
|
3357
|
+
var prCmd = program2.command("pr").description("Manage pull requests");
|
|
3358
|
+
prCmd.command("list <owner> <repo>").description("List pull requests").option("--state <state>", "Filter by state: open, closed, all", "open").option("--base <base>", "Filter by base branch").option("--head <head>", "Filter by head branch").option("-n, --per-page <number>", "Results per page", "30").option("--page <number>", "Page number", "1").action(async (owner, repo, opts) => {
|
|
3359
|
+
try {
|
|
3360
|
+
const client = getClient();
|
|
3361
|
+
const prs = await client.pulls.list(owner, repo, {
|
|
3362
|
+
state: opts.state,
|
|
3363
|
+
base: opts.base,
|
|
3364
|
+
head: opts.head,
|
|
3365
|
+
per_page: parseInt(opts.perPage),
|
|
3366
|
+
page: parseInt(opts.page)
|
|
3367
|
+
});
|
|
3368
|
+
if (getFormat(prCmd) === "json") {
|
|
3369
|
+
print(prs, "json");
|
|
3370
|
+
} else {
|
|
3371
|
+
if (prs.length === 0) {
|
|
3372
|
+
info("No pull requests found");
|
|
3373
|
+
return;
|
|
3374
|
+
}
|
|
3375
|
+
prs.forEach((pr) => {
|
|
3376
|
+
const state = pr.state === "open" ? source_default.green("open") : source_default.red("closed");
|
|
3377
|
+
const merged = pr.merged ? source_default.magenta(" [merged]") : "";
|
|
3378
|
+
const draft = pr.draft ? source_default.gray(" [draft]") : "";
|
|
3379
|
+
console.log(`#${pr.number} ${state}${merged}${draft} ${source_default.bold(pr.title)}`);
|
|
3380
|
+
console.log(` ${source_default.cyan(pr.head.ref)} -> ${source_default.cyan(pr.base.ref)}`);
|
|
3381
|
+
if (pr.user)
|
|
3382
|
+
console.log(` Author: ${source_default.yellow(pr.user.login)}`);
|
|
3383
|
+
});
|
|
3384
|
+
}
|
|
3385
|
+
} catch (err) {
|
|
3386
|
+
error(String(err));
|
|
3387
|
+
process.exit(1);
|
|
3388
|
+
}
|
|
3389
|
+
});
|
|
3390
|
+
prCmd.command("get <owner> <repo> <number>").description("Get a pull request").action(async (owner, repo, number) => {
|
|
3391
|
+
try {
|
|
3392
|
+
const client = getClient();
|
|
3393
|
+
const result = await client.pulls.get(owner, repo, parseInt(number));
|
|
3394
|
+
print(result, getFormat(prCmd));
|
|
3395
|
+
} catch (err) {
|
|
3396
|
+
error(String(err));
|
|
3397
|
+
process.exit(1);
|
|
3398
|
+
}
|
|
3399
|
+
});
|
|
3400
|
+
prCmd.command("create <owner> <repo>").description("Create a pull request").requiredOption("-t, --title <title>", "PR title").requiredOption("--head <head>", "Head branch").requiredOption("--base <base>", "Base branch").option("-b, --body <body>", "PR body").option("--draft", "Create as draft").action(async (owner, repo, opts) => {
|
|
3401
|
+
try {
|
|
3402
|
+
const client = getClient();
|
|
3403
|
+
const result = await client.pulls.create(owner, repo, opts.title, opts.head, opts.base, opts.body, { draft: opts.draft });
|
|
3404
|
+
success(`Pull request created: ${result.html_url}`);
|
|
3405
|
+
print(result, getFormat(prCmd));
|
|
3406
|
+
} catch (err) {
|
|
3407
|
+
error(String(err));
|
|
3408
|
+
process.exit(1);
|
|
3409
|
+
}
|
|
3410
|
+
});
|
|
3411
|
+
prCmd.command("merge <owner> <repo> <number>").description("Merge a pull request").option("--method <method>", "Merge method: merge, squash, rebase", "merge").option("--title <title>", "Commit title").option("--message <message>", "Commit message").action(async (owner, repo, number, opts) => {
|
|
3412
|
+
try {
|
|
3413
|
+
const client = getClient();
|
|
3414
|
+
const result = await client.pulls.merge(owner, repo, parseInt(number), {
|
|
3415
|
+
merge_method: opts.method,
|
|
3416
|
+
commit_title: opts.title,
|
|
3417
|
+
commit_message: opts.message
|
|
3418
|
+
});
|
|
3419
|
+
if (result.merged) {
|
|
3420
|
+
success(`Pull request #${number} merged`);
|
|
3421
|
+
} else {
|
|
3422
|
+
warn(`Merge result: ${result.message}`);
|
|
3423
|
+
}
|
|
3424
|
+
} catch (err) {
|
|
3425
|
+
error(String(err));
|
|
3426
|
+
process.exit(1);
|
|
3427
|
+
}
|
|
3428
|
+
});
|
|
3429
|
+
prCmd.command("reviews <owner> <repo> <number>").description("List reviews on a pull request").action(async (owner, repo, number) => {
|
|
3430
|
+
try {
|
|
3431
|
+
const client = getClient();
|
|
3432
|
+
const reviews = await client.pulls.listReviews(owner, repo, parseInt(number));
|
|
3433
|
+
if (getFormat(prCmd) === "json") {
|
|
3434
|
+
print(reviews, "json");
|
|
3435
|
+
} else {
|
|
3436
|
+
if (reviews.length === 0) {
|
|
3437
|
+
info("No reviews");
|
|
3438
|
+
return;
|
|
3439
|
+
}
|
|
3440
|
+
reviews.forEach((review) => {
|
|
3441
|
+
const stateColor = review.state === "APPROVED" ? source_default.green : review.state === "CHANGES_REQUESTED" ? source_default.red : source_default.gray;
|
|
3442
|
+
console.log(`${source_default.cyan(review.user.login)} ${stateColor(review.state)}`);
|
|
3443
|
+
if (review.body)
|
|
3444
|
+
console.log(` ${review.body}`);
|
|
3445
|
+
});
|
|
3446
|
+
}
|
|
3447
|
+
} catch (err) {
|
|
3448
|
+
error(String(err));
|
|
3449
|
+
process.exit(1);
|
|
3450
|
+
}
|
|
3451
|
+
});
|
|
3452
|
+
prCmd.command("review <owner> <repo> <number>").description("Create a review on a pull request").option("-b, --body <body>", "Review body").option("--approve", "Approve the PR").option("--request-changes", "Request changes").option("--comment", "Just comment (no approval)").action(async (owner, repo, number, opts) => {
|
|
3453
|
+
try {
|
|
3454
|
+
const client = getClient();
|
|
3455
|
+
let event = "COMMENT";
|
|
3456
|
+
if (opts.approve)
|
|
3457
|
+
event = "APPROVE";
|
|
3458
|
+
if (opts.requestChanges)
|
|
3459
|
+
event = "REQUEST_CHANGES";
|
|
3460
|
+
const result = await client.pulls.createReview(owner, repo, parseInt(number), opts.body, event);
|
|
3461
|
+
success(`Review submitted: ${result.state}`);
|
|
3462
|
+
} catch (err) {
|
|
3463
|
+
error(String(err));
|
|
3464
|
+
process.exit(1);
|
|
3465
|
+
}
|
|
3466
|
+
});
|
|
3467
|
+
var userCmd = program2.command("user").description("User information");
|
|
3468
|
+
userCmd.command("info [username]").description("Get user information (defaults to authenticated user)").action(async (username) => {
|
|
3469
|
+
try {
|
|
3470
|
+
const client = getClient();
|
|
3471
|
+
const result = username ? await client.users.get(username) : await client.users.getAuthenticated();
|
|
3472
|
+
print(result, getFormat(userCmd));
|
|
3473
|
+
} catch (err) {
|
|
3474
|
+
error(String(err));
|
|
3475
|
+
process.exit(1);
|
|
3476
|
+
}
|
|
3477
|
+
});
|
|
3478
|
+
userCmd.command("followers [username]").description("List followers").option("-n, --per-page <number>", "Results per page", "30").action(async (username, opts) => {
|
|
3479
|
+
try {
|
|
3480
|
+
const client = getClient();
|
|
3481
|
+
const followers = username ? await client.users.listFollowers(username, { per_page: parseInt(opts.perPage) }) : await client.users.listMyFollowers({ per_page: parseInt(opts.perPage) });
|
|
3482
|
+
if (getFormat(userCmd) === "json") {
|
|
3483
|
+
print(followers, "json");
|
|
3484
|
+
} else {
|
|
3485
|
+
if (followers.length === 0) {
|
|
3486
|
+
info("No followers");
|
|
3487
|
+
return;
|
|
3488
|
+
}
|
|
3489
|
+
followers.forEach((user) => {
|
|
3490
|
+
console.log(`${source_default.cyan(user.login)}`);
|
|
3491
|
+
});
|
|
3492
|
+
}
|
|
3493
|
+
} catch (err) {
|
|
3494
|
+
error(String(err));
|
|
3495
|
+
process.exit(1);
|
|
3496
|
+
}
|
|
3497
|
+
});
|
|
3498
|
+
userCmd.command("following [username]").description("List users being followed").option("-n, --per-page <number>", "Results per page", "30").action(async (username, opts) => {
|
|
3499
|
+
try {
|
|
3500
|
+
const client = getClient();
|
|
3501
|
+
const following = username ? await client.users.listFollowing(username, { per_page: parseInt(opts.perPage) }) : await client.users.listMyFollowing({ per_page: parseInt(opts.perPage) });
|
|
3502
|
+
if (getFormat(userCmd) === "json") {
|
|
3503
|
+
print(following, "json");
|
|
3504
|
+
} else {
|
|
3505
|
+
if (following.length === 0) {
|
|
3506
|
+
info("Not following anyone");
|
|
3507
|
+
return;
|
|
3508
|
+
}
|
|
3509
|
+
following.forEach((user) => {
|
|
3510
|
+
console.log(`${source_default.cyan(user.login)}`);
|
|
3511
|
+
});
|
|
3512
|
+
}
|
|
3513
|
+
} catch (err) {
|
|
3514
|
+
error(String(err));
|
|
3001
3515
|
process.exit(1);
|
|
3002
3516
|
}
|
|
3003
|
-
return new IMessage({
|
|
3004
|
-
bridgeUrl,
|
|
3005
|
-
apiKey: process.env.IMESSAGE_API_KEY,
|
|
3006
|
-
deviceId: process.env.IMESSAGE_DEVICE_ID
|
|
3007
|
-
});
|
|
3008
|
-
}
|
|
3009
|
-
function getFormat() {
|
|
3010
|
-
const format = program2.opts().format;
|
|
3011
|
-
return format === "json" ? "json" : "pretty";
|
|
3012
|
-
}
|
|
3013
|
-
program2.parseAsync().catch((err) => {
|
|
3014
|
-
console.error(err);
|
|
3015
|
-
process.exit(1);
|
|
3016
3517
|
});
|
|
3518
|
+
program2.parse();
|