@keyshade/cli
Version:
4 lines • 2.77 MB
Source Map (JSON)
{
"version": 3,
"sources": ["../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/env-options.js", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/cli-options.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/error.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/argument.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/help.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/option.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/suggestSimilar.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/lib/command.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/index.js", "../../../node_modules/.pnpm/color-name@1.1.4/node_modules/color-name/index.js", "../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/conversions.js", "../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/route.js", "../../../node_modules/.pnpm/color-convert@2.0.1/node_modules/color-convert/index.js", "../../../node_modules/.pnpm/ansi-styles@4.3.0/node_modules/ansi-styles/index.js", "../../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js", "../../../node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js", "../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/util.js", "../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/templates.js", "../../../node_modules/.pnpm/chalk@4.1.2/node_modules/chalk/source/index.js", "../../../node_modules/.pnpm/sisteransi@1.0.5/node_modules/sisteransi/src/index.js", "../../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js", "../../../node_modules/.pnpm/xmlhttprequest-ssl@2.1.2/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js", "../../../node_modules/.pnpm/@socket.io+component-emitter@3.1.2/node_modules/@socket.io/component-emitter/lib/cjs/index.js", "../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js", "../../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js", "../../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js", "../../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js", "../../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/stream.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/constants.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/buffer-util.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/limiter.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/permessage-deflate.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/validation.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/receiver.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/sender.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/event-target.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/extension.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/websocket.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/subprotocol.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/lib/websocket-server.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/config/versionTemplate.txt", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/utils.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/asap.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/then.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/promise/resolve.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/-internal.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/enumerator.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/promise/all.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/promise/race.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/promise/reject.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/promise.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise/polyfill.js", "../../../node_modules/.pnpm/es6-promise@4.2.8/node_modules/es6-promise/dist/lib/es6-promise.js", "../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js", "../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/bindings.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/lib/assert.js", "../../../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js", "../../../node_modules/.pnpm/bip66@1.1.5/node_modules/bip66/index.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/lib/der.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/lib/messages.json", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/lib/index.js", "../../../node_modules/.pnpm/create-hash@1.2.0/node_modules/create-hash/index.js", "../../../node_modules/.pnpm/bn.js@4.12.2/node_modules/bn.js/lib/bn.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/package.json", "../../../node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js", "../../../node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/utils.js", "../../../node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/base.js", "../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js", "../../../node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/short.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/mont.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/edwards.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curve/index.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js", "../../../node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/curves.js", "../../../node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/key.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/signature.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/ec/index.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/key.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/signature.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic/eddsa/index.js", "../../../node_modules/.pnpm/elliptic@6.5.4/node_modules/elliptic/lib/elliptic.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/lib/elliptic/index.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/elliptic.js", "../../../node_modules/.pnpm/secp256k1@3.7.1/node_modules/secp256k1/index.js", "../../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/browser.js", "../../../node_modules/.pnpm/eccrypto@1.1.6/node_modules/eccrypto/index.js", "../../../packages/secret-scan/dist/index.js", "../../../node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/dayjs.min.js", "../../../node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/config.js", "../../../node_modules/.pnpm/commander@12.1.0/node_modules/commander/esm.mjs", "../src/util/configuration.ts", "../src/util/logger.ts", "../../../packages/api-client/src/core/client.ts", "../../../packages/api-client/src/controllers/app.ts", "../../../packages/api-client/src/core/pagination-parser.ts", "../../../packages/api-client/src/core/response-parser.ts", "../../../packages/api-client/src/controllers/environment.ts", "../../../packages/api-client/src/controllers/secret.ts", "../../../packages/api-client/src/controllers/event.ts", "../../../packages/api-client/src/controllers/integration.ts", "../../../packages/api-client/src/controllers/project.ts", "../../../packages/api-client/src/controllers/variable.ts", "../../../packages/api-client/src/controllers/workspace.ts", "../../../packages/api-client/src/controllers/workspace-role.ts", "../../../packages/api-client/src/controllers/workspace-membership.ts", "../../../packages/api-client/src/controllers/auth.ts", "../../../packages/api-client/src/controllers/cli-session.ts", "../../../packages/api-client/src/controllers/personal-access-token.ts", "../src/util/controller-instance.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/ansi-regex@6.1.0/node_modules/ansi-regex/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/strip-ansi@7.1.0/node_modules/strip-ansi/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/eastasianwidth@0.2.0/node_modules/eastasianwidth/eastasianwidth.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/emoji-regex@9.2.2/node_modules/emoji-regex/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/string-width@5.1.2/node_modules/string-width/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/ansi-styles@6.2.1/node_modules/ansi-styles/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/node_modules/.pnpm/wrap-ansi@8.1.0/node_modules/wrap-ansi/index.js", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/utils/settings.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/utils/string.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/utils/index.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/prompt.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/confirm.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/group-multiselect.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/multi-select.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/password.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/select.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/select-key.ts", "../../../node_modules/.pnpm/@clack+core@0.5.0/node_modules/@clack/core/src/prompts/text.ts", "../src/util/prompt.ts", "../src/commands/base.command.ts", "../src/commands/init.command.ts", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.node.js", "../../../node_modules/.pnpm/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/esm/commons.js", "../../../node_modules/.pnpm/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/esm/encodePacket.js", "../../../node_modules/.pnpm/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/esm/decodePacket.js", "../../../node_modules/.pnpm/engine.io-parser@5.2.3/node_modules/engine.io-parser/build/esm/index.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transport.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/globals.node.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/util.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/contrib/parseqs.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/polling.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/polling-xhr.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/contrib/has-cors.js", "../../../node_modules/.pnpm/ws@8.17.1/node_modules/ws/wrapper.mjs", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/websocket.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/websocket.node.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/webtransport.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/transports/index.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/contrib/parseuri.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/socket.js", "../../../node_modules/.pnpm/engine.io-client@6.6.3/node_modules/engine.io-client/build/esm-debug/index.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/url.js", "../../../node_modules/.pnpm/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/esm-debug/index.js", "../../../node_modules/.pnpm/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/esm-debug/is-binary.js", "../../../node_modules/.pnpm/socket.io-parser@4.2.4/node_modules/socket.io-parser/build/esm-debug/binary.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/on.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/socket.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/contrib/backo2.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/manager.js", "../../../node_modules/.pnpm/socket.io-client@4.8.1/node_modules/socket.io-client/build/esm-debug/index.js", "../src/commands/run.command.ts", "../src/util/decrypt.ts", "../src/util/table.ts", "../src/commands/profile/list.profile.ts", "../src/commands/profile/update.profile.ts", "../src/commands/profile/switch.profile.ts", "../src/commands/profile/remove.profile.ts", "../src/commands/profile.command.ts", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/external.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/util.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/ZodError.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/locales/en.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/errors.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/parseUtil.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/helpers/errorUtil.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/v3/types.js", "../../../node_modules/.pnpm/zod@3.25.76/node_modules/zod/index.js", "../../../packages/schema/src/pagination/index.ts", "../../../packages/schema/src/enums/index.ts", "../../../packages/schema/src/environment/index.ts", "../../../packages/schema/src/workspace/index.ts", "../../../packages/schema/src/user/index.ts", "../../../packages/schema/src/auth/index.ts", "../../../packages/schema/src/project/index.ts", "../../../packages/schema/src/secret/index.ts", "../../../packages/schema/src/variable/index.ts", "../../../packages/schema/src/event/index.ts", "../../../packages/schema/src/integration/index.ts", "../../../packages/schema/src/workspace-role/index.ts", "../../../packages/schema/src/workspace-membership/index.ts", "../../../packages/schema/src/payment-gateway/index.ts", "../../../packages/schema/src/share-secret/index.ts", "../../../packages/schema/src/session/index.ts", "../../../packages/schema/src/personal-access-token/index.ts", "../src/commands/environment/create.environment.ts", "../src/commands/environment/delete.environment.ts", "../src/commands/environment/get.environment.ts", "../src/util/pagination-options.ts", "../src/commands/environment/list.environment.ts", "../src/commands/environment/update.environment.ts", "../src/commands/environment.command.ts", "../src/commands/workspace/create.workspace.ts", "../src/util/error.ts", "../src/commands/workspace/delete.workspace.ts", "../src/commands/workspace/export.workspace.ts", "../src/commands/workspace/get.workspace.ts", "../src/commands/workspace/list.workspace.ts", "../src/commands/workspace/search.workspace.ts", "../src/commands/workspace/update.workspace.ts", "../src/commands/workspace/role/create.role.ts", "../src/commands/workspace/role/delete.role.ts", "../src/commands/workspace/role/get.role.ts", "../src/commands/workspace/role/list.role.ts", "../src/commands/workspace/role/update.role.ts", "../src/commands/workspace/role.workspace.ts", "../src/commands/workspace/membership/accept-invitation.membership.ts", "../src/commands/workspace/membership/cancel-invitation.membership.ts", "../src/commands/workspace/membership/decline-invitation.membership.ts", "../src/commands/workspace/membership/get-all-members.membership.ts", "../src/commands/workspace/membership/invite.membership.ts", "../src/commands/workspace/membership/leave.membership.ts", "../src/commands/workspace/membership/remove.membership.ts", "../src/commands/workspace/membership/resend-invitation.membership.ts", "../src/commands/workspace/membership/transfer-ownership.membership copy.ts", "../src/commands/workspace/membership/update-role.membership.ts", "../src/commands/workspace/membership.workspace.ts", "../src/commands/workspace/list-invitations.workspace.ts", "../src/commands/workspace.command.ts", "../src/commands/scan.command.ts", "../../../node_modules/.pnpm/@isaacs+balanced-match@4.0.1/node_modules/@isaacs/balanced-match/src/index.ts", "../../../node_modules/.pnpm/@isaacs+brace-expansion@5.0.0/node_modules/@isaacs/brace-expansion/src/index.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/assert-valid-pattern.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/brace-expressions.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/unescape.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/ast.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/escape.ts", "../../../node_modules/.pnpm/minimatch@10.1.1/node_modules/minimatch/src/index.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/glob.ts", "../../../node_modules/.pnpm/lru-cache@11.2.4/node_modules/lru-cache/src/index.ts", "../../../node_modules/.pnpm/path-scurry@2.0.1/node_modules/path-scurry/src/index.ts", "../../../node_modules/.pnpm/minipass@7.1.2/node_modules/minipass/src/index.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/pattern.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/ignore.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/processor.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/walker.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/has-magic.ts", "../../../node_modules/.pnpm/glob@11.1.0/node_modules/glob/src/index.ts", "../src/commands/project/create.project.ts", "../src/commands/project/delete.project.ts", "../src/commands/project/export.project.ts", "../src/commands/project/fork.project.ts", "../src/commands/project/get.project.ts", "../src/commands/project/list-forks.project.ts", "../src/commands/project/list.project.ts", "../src/commands/project/sync.project.ts", "../src/commands/project/unlink.project.ts", "../src/commands/project/update.project.ts", "../src/commands/project.command.ts", "../src/commands/secret/create.secret.ts", "../src/commands/secret/delete.secret.ts", "../src/util/date-formatter.ts", "../src/commands/secret/list.secret.ts", "../src/commands/secret/revisions.secret.ts", "../src/commands/secret/update.secret.ts", "../src/commands/secret/rollback.secret.ts", "../src/commands/secret/disable.secret.ts", "../src/commands/secret/enable.secret.ts", "../src/commands/secret.command.ts", "../src/commands/variable/create.variable.ts", "../src/commands/variable/delete.variable.ts", "../src/commands/variable/list.variable.ts", "../src/commands/variable/revisions.variable.ts", "../src/commands/variable/update.variable.ts", "../src/commands/variable/rollback.variable.ts", "../src/commands/variable/disable.variable.ts", "../src/commands/variable/enable.variable.ts", "../src/commands/variable.command.ts", "../package.json", "../src/commands/config/private-key/add.private-key.ts", "../src/commands/config/private-key/delete.private-key.ts", "../src/commands/config/private-key/list.private-key.ts", "../src/commands/config/private-key/update.private-key.ts", "../src/commands/config/private-key.config.ts", "../src/commands/config/update.config.ts", "../src/commands/config.command.ts", "../src/commands/integration.command.ts", "../src/commands/login.command.ts", "../src/commands/reset.command.ts", "../src/util/pat.ts", "../src/commands/pat/update.pat.ts", "../src/commands/pat/create.pat.ts", "../src/commands/pat/regenerate.pat.ts", "../src/commands/pat/list.pat.ts", "../src/commands/pat/delete.pat.ts", "../src/commands/pat.command.ts", "../src/commands/import.command.ts", "../src/util/workspace.ts", "../src/util/project.ts", "../src/util/environment.ts", "../src/index.ts"],
"sourcesContent": ["{\n \"name\": \"dotenv\",\n \"version\": \"16.6.1\",\n \"description\": \"Loads environment variables from .env file\",\n \"main\": \"lib/main.js\",\n \"types\": \"lib/main.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./lib/main.d.ts\",\n \"require\": \"./lib/main.js\",\n \"default\": \"./lib/main.js\"\n },\n \"./config\": \"./config.js\",\n \"./config.js\": \"./config.js\",\n \"./lib/env-options\": \"./lib/env-options.js\",\n \"./lib/env-options.js\": \"./lib/env-options.js\",\n \"./lib/cli-options\": \"./lib/cli-options.js\",\n \"./lib/cli-options.js\": \"./lib/cli-options.js\",\n \"./package.json\": \"./package.json\"\n },\n \"scripts\": {\n \"dts-check\": \"tsc --project tests/types/tsconfig.json\",\n \"lint\": \"standard\",\n \"pretest\": \"npm run lint && npm run dts-check\",\n \"test\": \"tap run --allow-empty-coverage --disable-coverage --timeout=60000\",\n \"test:coverage\": \"tap run --show-full-coverage --timeout=60000 --coverage-report=text --coverage-report=lcov\",\n \"prerelease\": \"npm test\",\n \"release\": \"standard-version\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/motdotla/dotenv.git\"\n },\n \"homepage\": \"https://github.com/motdotla/dotenv#readme\",\n \"funding\": \"https://dotenvx.com\",\n \"keywords\": [\n \"dotenv\",\n \"env\",\n \".env\",\n \"environment\",\n \"variables\",\n \"config\",\n \"settings\"\n ],\n \"readmeFilename\": \"README.md\",\n \"license\": \"BSD-2-Clause\",\n \"devDependencies\": {\n \"@types/node\": \"^18.11.3\",\n \"decache\": \"^4.6.2\",\n \"sinon\": \"^14.0.1\",\n \"standard\": \"^17.0.0\",\n \"standard-version\": \"^9.5.0\",\n \"tap\": \"^19.2.0\",\n \"typescript\": \"^4.8.4\"\n },\n \"engines\": {\n \"node\": \">=12\"\n },\n \"browser\": {\n \"fs\": false\n }\n}\n", "const fs = require('fs')\nconst path = require('path')\nconst os = require('os')\nconst crypto = require('crypto')\nconst packageJson = require('../package.json')\n\nconst version = packageJson.version\n\nconst LINE = /(?:^|^)\\s*(?:export\\s+)?([\\w.-]+)(?:\\s*=\\s*?|:\\s+?)(\\s*'(?:\\\\'|[^'])*'|\\s*\"(?:\\\\\"|[^\"])*\"|\\s*`(?:\\\\`|[^`])*`|[^#\\r\\n]+)?\\s*(?:#.*)?(?:$|$)/mg\n\n// Parse src into an Object\nfunction parse (src) {\n const obj = {}\n\n // Convert buffer to string\n let lines = src.toString()\n\n // Convert line breaks to same format\n lines = lines.replace(/\\r\\n?/mg, '\\n')\n\n let match\n while ((match = LINE.exec(lines)) != null) {\n const key = match[1]\n\n // Default undefined or null to empty string\n let value = (match[2] || '')\n\n // Remove whitespace\n value = value.trim()\n\n // Check if double quoted\n const maybeQuote = value[0]\n\n // Remove surrounding quotes\n value = value.replace(/^(['\"`])([\\s\\S]*)\\1$/mg, '$2')\n\n // Expand newlines if double quoted\n if (maybeQuote === '\"') {\n value = value.replace(/\\\\n/g, '\\n')\n value = value.replace(/\\\\r/g, '\\r')\n }\n\n // Add to object\n obj[key] = value\n }\n\n return obj\n}\n\nfunction _parseVault (options) {\n options = options || {}\n\n const vaultPath = _vaultPath(options)\n options.path = vaultPath // parse .env.vault\n const result = DotenvModule.configDotenv(options)\n if (!result.parsed) {\n const err = new Error(`MISSING_DATA: Cannot parse ${vaultPath} for an unknown reason`)\n err.code = 'MISSING_DATA'\n throw err\n }\n\n // handle scenario for comma separated keys - for use with key rotation\n // example: DOTENV_KEY=\"dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=prod,dotenv://:key_7890@dotenvx.com/vault/.env.vault?environment=prod\"\n const keys = _dotenvKey(options).split(',')\n const length = keys.length\n\n let decrypted\n for (let i = 0; i < length; i++) {\n try {\n // Get full key\n const key = keys[i].trim()\n\n // Get instructions for decrypt\n const attrs = _instructions(result, key)\n\n // Decrypt\n decrypted = DotenvModule.decrypt(attrs.ciphertext, attrs.key)\n\n break\n } catch (error) {\n // last key\n if (i + 1 >= length) {\n throw error\n }\n // try next key\n }\n }\n\n // Parse decrypted .env string\n return DotenvModule.parse(decrypted)\n}\n\nfunction _warn (message) {\n console.log(`[dotenv@${version}][WARN] ${message}`)\n}\n\nfunction _debug (message) {\n console.log(`[dotenv@${version}][DEBUG] ${message}`)\n}\n\nfunction _log (message) {\n console.log(`[dotenv@${version}] ${message}`)\n}\n\nfunction _dotenvKey (options) {\n // prioritize developer directly setting options.DOTENV_KEY\n if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) {\n return options.DOTENV_KEY\n }\n\n // secondary infra already contains a DOTENV_KEY environment variable\n if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) {\n return process.env.DOTENV_KEY\n }\n\n // fallback to empty string\n return ''\n}\n\nfunction _instructions (result, dotenvKey) {\n // Parse DOTENV_KEY. Format is a URI\n let uri\n try {\n uri = new URL(dotenvKey)\n } catch (error) {\n if (error.code === 'ERR_INVALID_URL') {\n const err = new Error('INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenvx.com/vault/.env.vault?environment=development')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n throw error\n }\n\n // Get decrypt key\n const key = uri.password\n if (!key) {\n const err = new Error('INVALID_DOTENV_KEY: Missing key part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get environment\n const environment = uri.searchParams.get('environment')\n if (!environment) {\n const err = new Error('INVALID_DOTENV_KEY: Missing environment part')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n }\n\n // Get ciphertext payload\n const environmentKey = `DOTENV_VAULT_${environment.toUpperCase()}`\n const ciphertext = result.parsed[environmentKey] // DOTENV_VAULT_PRODUCTION\n if (!ciphertext) {\n const err = new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${environmentKey} in your .env.vault file.`)\n err.code = 'NOT_FOUND_DOTENV_ENVIRONMENT'\n throw err\n }\n\n return { ciphertext, key }\n}\n\nfunction _vaultPath (options) {\n let possibleVaultPath = null\n\n if (options && options.path && options.path.length > 0) {\n if (Array.isArray(options.path)) {\n for (const filepath of options.path) {\n if (fs.existsSync(filepath)) {\n possibleVaultPath = filepath.endsWith('.vault') ? filepath : `${filepath}.vault`\n }\n }\n } else {\n possibleVaultPath = options.path.endsWith('.vault') ? options.path : `${options.path}.vault`\n }\n } else {\n possibleVaultPath = path.resolve(process.cwd(), '.env.vault')\n }\n\n if (fs.existsSync(possibleVaultPath)) {\n return possibleVaultPath\n }\n\n return null\n}\n\nfunction _resolveHome (envPath) {\n return envPath[0] === '~' ? path.join(os.homedir(), envPath.slice(1)) : envPath\n}\n\nfunction _configVault (options) {\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (debug || !quiet) {\n _log('Loading env from encrypted .env.vault')\n }\n\n const parsed = DotenvModule._parseVault(options)\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsed, options)\n\n return { parsed }\n}\n\nfunction configDotenv (options) {\n const dotenvPath = path.resolve(process.cwd(), '.env')\n let encoding = 'utf8'\n const debug = Boolean(options && options.debug)\n const quiet = options && 'quiet' in options ? options.quiet : true\n\n if (options && options.encoding) {\n encoding = options.encoding\n } else {\n if (debug) {\n _debug('No encoding is specified. UTF-8 is used by default')\n }\n }\n\n let optionPaths = [dotenvPath] // default, look for .env\n if (options && options.path) {\n if (!Array.isArray(options.path)) {\n optionPaths = [_resolveHome(options.path)]\n } else {\n optionPaths = [] // reset default\n for (const filepath of options.path) {\n optionPaths.push(_resolveHome(filepath))\n }\n }\n }\n\n // Build the parsed data in a temporary object (because we need to return it). Once we have the final\n // parsed data, we will combine it with process.env (or options.processEnv if provided).\n let lastError\n const parsedAll = {}\n for (const path of optionPaths) {\n try {\n // Specifying an encoding returns a string instead of a buffer\n const parsed = DotenvModule.parse(fs.readFileSync(path, { encoding }))\n\n DotenvModule.populate(parsedAll, parsed, options)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${path} ${e.message}`)\n }\n lastError = e\n }\n }\n\n let processEnv = process.env\n if (options && options.processEnv != null) {\n processEnv = options.processEnv\n }\n\n DotenvModule.populate(processEnv, parsedAll, options)\n\n if (debug || !quiet) {\n const keysCount = Object.keys(parsedAll).length\n const shortPaths = []\n for (const filePath of optionPaths) {\n try {\n const relative = path.relative(process.cwd(), filePath)\n shortPaths.push(relative)\n } catch (e) {\n if (debug) {\n _debug(`Failed to load ${filePath} ${e.message}`)\n }\n lastError = e\n }\n }\n\n _log(`injecting env (${keysCount}) from ${shortPaths.join(',')}`)\n }\n\n if (lastError) {\n return { parsed: parsedAll, error: lastError }\n } else {\n return { parsed: parsedAll }\n }\n}\n\n// Populates process.env from .env file\nfunction config (options) {\n // fallback to original dotenv if DOTENV_KEY is not set\n if (_dotenvKey(options).length === 0) {\n return DotenvModule.configDotenv(options)\n }\n\n const vaultPath = _vaultPath(options)\n\n // dotenvKey exists but .env.vault file does not exist\n if (!vaultPath) {\n _warn(`You set DOTENV_KEY but you are missing a .env.vault file at ${vaultPath}. Did you forget to build it?`)\n\n return DotenvModule.configDotenv(options)\n }\n\n return DotenvModule._configVault(options)\n}\n\nfunction decrypt (encrypted, keyStr) {\n const key = Buffer.from(keyStr.slice(-64), 'hex')\n let ciphertext = Buffer.from(encrypted, 'base64')\n\n const nonce = ciphertext.subarray(0, 12)\n const authTag = ciphertext.subarray(-16)\n ciphertext = ciphertext.subarray(12, -16)\n\n try {\n const aesgcm = crypto.createDecipheriv('aes-256-gcm', key, nonce)\n aesgcm.setAuthTag(authTag)\n return `${aesgcm.update(ciphertext)}${aesgcm.final()}`\n } catch (error) {\n const isRange = error instanceof RangeError\n const invalidKeyLength = error.message === 'Invalid key length'\n const decryptionFailed = error.message === 'Unsupported state or unable to authenticate data'\n\n if (isRange || invalidKeyLength) {\n const err = new Error('INVALID_DOTENV_KEY: It must be 64 characters long (or more)')\n err.code = 'INVALID_DOTENV_KEY'\n throw err\n } else if (decryptionFailed) {\n const err = new Error('DECRYPTION_FAILED: Please check your DOTENV_KEY')\n err.code = 'DECRYPTION_FAILED'\n throw err\n } else {\n throw error\n }\n }\n}\n\n// Populate process.env with parsed values\nfunction populate (processEnv, parsed, options = {}) {\n const debug = Boolean(options && options.debug)\n const override = Boolean(options && options.override)\n\n if (typeof parsed !== 'object') {\n const err = new Error('OBJECT_REQUIRED: Please check the processEnv argument being passed to populate')\n err.code = 'OBJECT_REQUIRED'\n throw err\n }\n\n // Set process.env\n for (const key of Object.keys(parsed)) {\n if (Object.prototype.hasOwnProperty.call(processEnv, key)) {\n if (override === true) {\n processEnv[key] = parsed[key]\n }\n\n if (debug) {\n if (override === true) {\n _debug(`\"${key}\" is already defined and WAS overwritten`)\n } else {\n _debug(`\"${key}\" is already defined and was NOT overwritten`)\n }\n }\n } else {\n processEnv[key] = parsed[key]\n }\n }\n}\n\nconst DotenvModule = {\n configDotenv,\n _configVault,\n _parseVault,\n config,\n decrypt,\n parse,\n populate\n}\n\nmodule.exports.configDotenv = DotenvModule.configDotenv\nmodule.exports._configVault = DotenvModule._configVault\nmodule.exports._parseVault = DotenvModule._parseVault\nmodule.exports.config = DotenvModule.config\nmodule.exports.decrypt = DotenvModule.decrypt\nmodule.exports.parse = DotenvModule.parse\nmodule.exports.populate = DotenvModule.populate\n\nmodule.exports = DotenvModule\n", "// ../config.js accepts options via environment variables\nconst options = {}\n\nif (process.env.DOTENV_CONFIG_ENCODING != null) {\n options.encoding = process.env.DOTENV_CONFIG_ENCODING\n}\n\nif (process.env.DOTENV_CONFIG_PATH != null) {\n options.path = process.env.DOTENV_CONFIG_PATH\n}\n\nif (process.env.DOTENV_CONFIG_QUIET != null) {\n options.quiet = process.env.DOTENV_CONFIG_QUIET\n}\n\nif (process.env.DOTENV_CONFIG_DEBUG != null) {\n options.debug = process.env.DOTENV_CONFIG_DEBUG\n}\n\nif (process.env.DOTENV_CONFIG_OVERRIDE != null) {\n options.override = process.env.DOTENV_CONFIG_OVERRIDE\n}\n\nif (process.env.DOTENV_CONFIG_DOTENV_KEY != null) {\n options.DOTENV_KEY = process.env.DOTENV_CONFIG_DOTENV_KEY\n}\n\nmodule.exports = options\n", "const re = /^dotenv_config_(encoding|path|quiet|debug|override|DOTENV_KEY)=(.+)$/\n\nmodule.exports = function optionMatcher (args) {\n const options = args.reduce(function (acc, cur) {\n const matches = cur.match(re)\n if (matches) {\n acc[matches[1]] = matches[2]\n }\n return acc\n }, {})\n\n if (!('quiet' in options)) {\n options.quiet = 'true'\n }\n\n return options\n}\n", "/**\n * CommanderError class\n */\nclass CommanderError extends Error {\n /**\n * Constructs the CommanderError class\n * @param {number} exitCode suggested exit code which could be used with process.exit\n * @param {string} code an id string representing the error\n * @param {string} message human-readable description of the error\n */\n constructor(exitCode, code, message) {\n super(message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n this.code = code;\n this.exitCode = exitCode;\n this.nestedError = undefined;\n }\n}\n\n/**\n * InvalidArgumentError class\n */\nclass InvalidArgumentError extends CommanderError {\n /**\n * Constructs the InvalidArgumentError class\n * @param {string} [message] explanation of why argument is invalid\n */\n constructor(message) {\n super(1, 'commander.invalidArgument', message);\n // properly capture stack trace in Node.js\n Error.captureStackTrace(this, this.constructor);\n this.name = this.constructor.name;\n }\n}\n\nexports.CommanderError = CommanderError;\nexports.InvalidArgumentError = InvalidArgumentError;\n", "const { InvalidArgumentError } = require('./error.js');\n\nclass Argument {\n /**\n * Initialize a new command argument with the given name and description.\n * The default is that the argument is required, and you can explicitly\n * indicate this with <> around the name. Put [] around the name for an optional argument.\n *\n * @param {string} name\n * @param {string} [description]\n */\n\n constructor(name, description) {\n this.description = description || '';\n this.variadic = false;\n this.parseArg = undefined;\n this.defaultValue = undefined;\n this.defaultValueDescription = undefined;\n this.argChoices = undefined;\n\n switch (name[0]) {\n case '<': // e.g. <required>\n this.required = true;\n this._name = name.slice(1, -1);\n break;\n case '[': // e.g. [optional]\n this.required = false;\n this._name = name.slice(1, -1);\n break;\n default:\n this.required = true;\n this._name = name;\n break;\n }\n\n if (this._name.length > 3 && this._name.slice(-3) === '...') {\n this.variadic = true;\n this._name = this._name.slice(0, -3);\n }\n }\n\n /**\n * Return argument name.\n *\n * @return {string}\n */\n\n name() {\n return this._name;\n }\n\n /**\n * @package\n */\n\n _concatValue(value, previous) {\n if (previous === this.defaultValue || !Array.isArray(previous)) {\n return [value];\n }\n\n return previous.concat(value);\n }\n\n /**\n * Set the default value, and optionally supply the description to be displayed in the help.\n *\n * @param {*} value\n * @param {string} [description]\n * @return {Argument}\n */\n\n default(value, description) {\n this.defaultValue = value;\n this.defaultValueDescription = description;\n return this;\n }\n\n /**\n * Set the custom handler for processing CLI command arguments into argument values.\n *\n * @param {Function} [fn]\n * @return {Argument}\n */\n\n argParser(fn) {\n this.parseArg = fn;\n return this;\n }\n\n /**\n * Only allow argument value to be one of choices.\n *\n * @param {string[]} values\n * @return {Argument}\n */\n\n choices(values) {\n this.argChoices = values.slice();\n this.parseArg = (arg, previous) => {\n if (!this.argChoices.includes(arg)) {\n throw new InvalidArgumentError(\n `Allowed choices are ${this.argChoices.join(', ')}.`,\n );\n }\n if (this.variadic) {\n return this._concatValue(arg, previous);\n }\n return arg;\n };\n return this;\n }\n\n /**\n * Make argument required.\n *\n * @returns {Argument}\n */\n argRequired() {\n this.required = true;\n return this;\n }\n\n /**\n * Make argument optional.\n *\n * @returns {Argument}\n */\n argOptional() {\n this.required = false;\n return this;\n }\n}\n\n/**\n * Takes an argument and returns its human readable equivalent for help usage.\n *\n * @param {Argument} arg\n * @return {string}\n * @private\n */\n\nfunction humanReadableArgName(arg) {\n const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');\n\n return arg.required ? '<' + nameOutput + '>' : '[' + nameOutput + ']';\n}\n\nexports.Argument = Argument;\nexports.humanReadableArgName = humanReadableArgName;\n", "const { humanReadableArgName } = require('./argument.js');\n\n/**\n * TypeScript import types for JSDoc, used by Visual Studio Code IntelliSense and `npm run typescript-checkJS`\n * https://www.typescriptlang.org/docs/handbook/jsdoc-supported-types.html#import-types\n * @typedef { import(\"./argument.js\").Argument } Argument\n * @typedef { import(\"./command.js\").Command } Command\n * @typedef { import(\"./option.js\").Option } Option\n */\n\n// Although this is a class, methods are static in style to allow override using subclass or just functions.\nclass Help {\n constructor() {\n this.helpWidth = undefined;\n this.sortSubcommands = false;\n this.sortOptions = false;\n this.showGlobalOptions = false;\n }\n\n /**\n * Get an array of the visible subcommands. Includes a placeholder for the implicit help command, if there is one.\n *\n * @param {Command} cmd\n * @returns {Command[]}\n */\n\n visibleCommands(cmd) {\n const visibleCommands = cmd.commands.filter((cmd) => !cmd._hidden);\n const helpCommand = cmd._getHelpCommand();\n if (helpCommand && !helpCommand._hidden) {\n visibleCommands.push(helpCommand);\n }\n if (this.sortSubcommands) {\n visibleCommands.sort((a, b) => {\n // @ts-ignore: because overloaded return type\n return a.name().localeCompare(b.name());\n });\n }\n return visibleCommands;\n }\n\n /**\n * Compare options for sort.\n *\n * @param {Option} a\n * @param {Option} b\n * @returns {number}\n */\n compareOptions(a, b) {\n const getSortKey = (option) => {\n // WYSIWYG for order displayed in help. Short used for comparison if present. No special handling for negated.\n return option.short\n ? option.short.replace(/^-/, '')\n : option.long.replace(/^--/, '');\n };\n return getSortKey(a).localeCompare(getSortKey(b));\n }\n\n /**\n * Get an array of the visible options. Includes a placeholder for the implicit help option, if there is one.\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleOptions(cmd) {\n const visibleOptions = cmd.options.filter((option) => !option.hidden);\n // Built-in help option.\n const helpOption = cmd._getHelpOption();\n if (helpOption && !helpOption.hidden) {\n // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.\n const removeShort = helpOption.short && cmd._findOption(helpOption.short);\n const removeLong = helpOption.long && cmd._findOption(helpOption.long);\n if (!removeShort && !removeLong) {\n visibleOptions.push(helpOption); // no changes needed\n } else if (helpOption.long && !removeLong) {\n visibleOptions.push(\n cmd.createOption(helpOption.long, helpOption.description),\n );\n } else if (helpOption.short && !removeShort) {\n visibleOptions.push(\n cmd.createOption(helpOption.short, helpOption.description),\n );\n }\n }\n if (this.sortOptions) {\n visibleOptions.sort(this.compareOptions);\n }\n return visibleOptions;\n }\n\n /**\n * Get an array of the visible global options. (Not including help.)\n *\n * @param {Command} cmd\n * @returns {Option[]}\n */\n\n visibleGlobalOptions(cmd) {\n if (!this.showGlobalOptions) return [];\n\n const globalOptions = [];\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n const visibleOptions = ancestorCmd.options.filter(\n (option) => !option.hidden,\n );\n globalOptions.push(...visibleOptions);\n }\n if (this.sortOptions) {\n globalOptions.sort(this.compareOptions);\n }\n return globalOptions;\n }\n\n /**\n * Get an array of the arguments if any have a description.\n *\n * @param {Command} cmd\n * @returns {Argument[]}\n */\n\n visibleArguments(cmd) {\n // Side effect! Apply the legacy descriptions before the arguments are displayed.\n if (cmd._argsDescription) {\n cmd.registeredArguments.forEach((argument) => {\n argument.description =\n argument.description || cmd._argsDescription[argument.name()] || '';\n });\n }\n\n // If there are any arguments with a description then return all the arguments.\n if (cmd.registeredArguments.find((argument) => argument.description)) {\n return cmd.registeredArguments;\n }\n return [];\n }\n\n /**\n * Get the command term to show in the list of subcommands.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n subcommandTerm(cmd) {\n // Legacy. Ignores custom usage string, and nested commands.\n const args = cmd.registeredArguments\n .map((arg) => humanReadableArgName(arg))\n .join(' ');\n return (\n cmd._name +\n (cmd._aliases[0] ? '|' + cmd._aliases[0] : '') +\n (cmd.options.length ? ' [options]' : '') + // simplistic check for non-help option\n (args ? ' ' + args : '')\n );\n }\n\n /**\n * Get the option term to show in the list of options.\n *\n * @param {Option} option\n * @returns {string}\n */\n\n optionTerm(option) {\n return option.flags;\n }\n\n /**\n * Get the argument term to show in the list of arguments.\n *\n * @param {Argument} argument\n * @returns {string}\n */\n\n argumentTerm(argument) {\n return argument.name();\n }\n\n /**\n * Get the longest command term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestSubcommandTermLength(cmd, helper) {\n return helper.visibleCommands(cmd).reduce((max, command) => {\n return Math.max(max, helper.subcommandTerm(command).length);\n }, 0);\n }\n\n /**\n * Get the longest option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestOptionTermLength(cmd, helper) {\n return helper.visibleOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest global option term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestGlobalOptionTermLength(cmd, helper) {\n return helper.visibleGlobalOptions(cmd).reduce((max, option) => {\n return Math.max(max, helper.optionTerm(option).length);\n }, 0);\n }\n\n /**\n * Get the longest argument term length.\n *\n * @param {Command} cmd\n * @param {Help} helper\n * @returns {number}\n */\n\n longestArgumentTermLength(cmd, helper) {\n return helper.visibleArguments(cmd).reduce((max, argument) => {\n return Math.max(max, helper.argumentTerm(argument).length);\n }, 0);\n }\n\n /**\n * Get the command usage to be displayed at the top of the built-in help.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandUsage(cmd) {\n // Usage\n let cmdName = cmd._name;\n if (cmd._aliases[0]) {\n cmdName = cmdName + '|' + cmd._aliases[0];\n }\n let ancestorCmdNames = '';\n for (\n let ancestorCmd = cmd.parent;\n ancestorCmd;\n ancestorCmd = ancestorCmd.parent\n ) {\n ancestorCmdNames = ancestorCmd.name() + ' ' + ancestorCmdNames;\n }\n return ancestorCmdNames + cmdName + ' ' + cmd.usage();\n }\n\n /**\n * Get the description for the command.\n *\n * @param {Command} cmd\n * @returns {string}\n */\n\n commandDescription(cmd) {\n // @ts-ignore: because overloaded return type\n