sandbox 2.2.0 → 2.4.0
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/dist/{app-BNIol84k.mjs → app-uOMbKaBL.mjs} +505 -306
- package/dist/app-uOMbKaBL.mjs.map +1 -0
- package/dist/index.mjs +1 -1
- package/dist/pty-server-linux-x86_64 +0 -0
- package/dist/sandbox.mjs +143 -2
- package/dist/sandbox.mjs.map +1 -1
- package/package.json +4 -4
- package/dist/app-BNIol84k.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
Binary file
|
package/dist/sandbox.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as __require, s as __toESM, t as __commonJS } from "./chunk-btbCw1m3.mjs";
|
|
2
|
-
import { n as StyledError, r as require_cjs, t as app } from "./app-
|
|
1
|
+
import { a as __toCommonJS, i as __require, s as __toESM, t as __commonJS } from "./chunk-btbCw1m3.mjs";
|
|
2
|
+
import { a as source_exports, i as init_source, n as StyledError, r as require_cjs, t as app } from "./app-uOMbKaBL.mjs";
|
|
3
3
|
import "./string-width-D78SVDLD.mjs";
|
|
4
4
|
import "./cli-cursor-Dab4mDU2.mjs";
|
|
5
5
|
import "./token-error-C0CafU2G.mjs";
|
|
@@ -623,12 +623,153 @@ var require_dotenv_flow = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm
|
|
|
623
623
|
};
|
|
624
624
|
}) });
|
|
625
625
|
|
|
626
|
+
//#endregion
|
|
627
|
+
//#region ../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/batteries/vercel-formatter.js
|
|
628
|
+
var require_vercel_formatter = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/batteries/vercel-formatter.js": ((exports) => {
|
|
629
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
630
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
631
|
+
};
|
|
632
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
633
|
+
exports.vercelFormatter = void 0;
|
|
634
|
+
const chalk_1 = __importDefault((init_source(), __toCommonJS(source_exports)));
|
|
635
|
+
/**
|
|
636
|
+
* Extract argument hints from help topics.
|
|
637
|
+
* Returns a string like "[cmd]" or "[src] [dst]" based on positional arguments.
|
|
638
|
+
*/
|
|
639
|
+
function getArgHint(helpTopics) {
|
|
640
|
+
return helpTopics.filter((t) => t.category === "arguments").map((t) => t.usage).join(" ");
|
|
641
|
+
}
|
|
642
|
+
/**
|
|
643
|
+
* Format command name with aliases in "alias | name" style.
|
|
644
|
+
* Prefers shorter alias first for display.
|
|
645
|
+
*/
|
|
646
|
+
function formatCommandName(name, aliases) {
|
|
647
|
+
if (!(aliases === null || aliases === void 0 ? void 0 : aliases.length)) return name;
|
|
648
|
+
return `${[...aliases].sort((a, b) => a.length - b.length)[0]} | ${name}`;
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Create a Vercel-style help formatter.
|
|
652
|
+
*
|
|
653
|
+
* This formatter produces output similar to the Vercel CLI with:
|
|
654
|
+
* - A header with CLI name and version
|
|
655
|
+
* - Logo symbol before the command name
|
|
656
|
+
* - Column-aligned commands with aliases shown as "short | long"
|
|
657
|
+
* - Argument hints derived from positional arguments
|
|
658
|
+
* - Examples section with highlighted commands
|
|
659
|
+
*
|
|
660
|
+
* @example
|
|
661
|
+
* ```ts
|
|
662
|
+
* import { setDefaultHelpFormatter } from "cmd-ts";
|
|
663
|
+
* import { createVercelFormatter } from "cmd-ts/batteries/vercelFormatter";
|
|
664
|
+
*
|
|
665
|
+
* setDefaultHelpFormatter(createVercelFormatter({
|
|
666
|
+
* cliName: "Vercel Sandbox CLI",
|
|
667
|
+
* logo: "▲",
|
|
668
|
+
* }));
|
|
669
|
+
* ```
|
|
670
|
+
*/
|
|
671
|
+
function createVercelFormatter(config$2 = {}) {
|
|
672
|
+
const { cliName, logo = "▲" } = config$2;
|
|
673
|
+
return {
|
|
674
|
+
formatCommand(data, _context) {
|
|
675
|
+
var _a;
|
|
676
|
+
const lines = [];
|
|
677
|
+
let header = cliName !== null && cliName !== void 0 ? cliName : data.name;
|
|
678
|
+
if (data.version) header += ` ${data.version}`;
|
|
679
|
+
lines.push(chalk_1.default.grey(header));
|
|
680
|
+
lines.push("");
|
|
681
|
+
const path$1 = data.path.length > 0 ? data.path.join(" ") : data.name;
|
|
682
|
+
lines.push(`${logo} ${chalk_1.default.bold(path$1)} [options]`);
|
|
683
|
+
if (data.description) {
|
|
684
|
+
lines.push("");
|
|
685
|
+
lines.push(chalk_1.default.dim(data.description));
|
|
686
|
+
}
|
|
687
|
+
const byCategory = /* @__PURE__ */ new Map();
|
|
688
|
+
for (const topic of data.helpTopics) {
|
|
689
|
+
const existing = (_a = byCategory.get(topic.category)) !== null && _a !== void 0 ? _a : [];
|
|
690
|
+
existing.push(topic);
|
|
691
|
+
byCategory.set(topic.category, existing);
|
|
692
|
+
}
|
|
693
|
+
for (const [category, topics] of byCategory) {
|
|
694
|
+
lines.push("");
|
|
695
|
+
lines.push(chalk_1.default.dim(`${capitalize(category)}:`));
|
|
696
|
+
lines.push("");
|
|
697
|
+
const maxUsageWidth = Math.max(...topics.map((t) => t.usage.length));
|
|
698
|
+
for (const topic of topics) {
|
|
699
|
+
const defaults = topic.defaults.length > 0 ? chalk_1.default.dim(` [${topic.defaults.join(", ")}]`) : "";
|
|
700
|
+
lines.push(` ${topic.usage.padEnd(maxUsageWidth + 2)}${chalk_1.default.dim(topic.description)}${defaults}`);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
if (data.examples && data.examples.length > 0) {
|
|
704
|
+
lines.push("");
|
|
705
|
+
lines.push(chalk_1.default.dim("Examples:"));
|
|
706
|
+
for (const example of data.examples) {
|
|
707
|
+
lines.push("");
|
|
708
|
+
lines.push(`${chalk_1.default.gray("–")} ${example.description}`);
|
|
709
|
+
lines.push("");
|
|
710
|
+
lines.push(chalk_1.default.cyan(` $ ${example.command}`));
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
lines.push("");
|
|
714
|
+
return lines.join("\n");
|
|
715
|
+
},
|
|
716
|
+
formatSubcommands(data, _context) {
|
|
717
|
+
var _a;
|
|
718
|
+
const lines = [];
|
|
719
|
+
const path$1 = data.path.length > 0 ? data.path.join(" ") : data.name;
|
|
720
|
+
const displayName = cliName !== null && cliName !== void 0 ? cliName : path$1;
|
|
721
|
+
if (data.version) lines.push(chalk_1.default.grey(`${displayName} ${data.version}`));
|
|
722
|
+
else lines.push(chalk_1.default.grey(displayName));
|
|
723
|
+
lines.push("");
|
|
724
|
+
lines.push(`${logo} ${chalk_1.default.bold(path$1)} [options] <command>`);
|
|
725
|
+
lines.push("");
|
|
726
|
+
lines.push(chalk_1.default.dim(`For command help, run \`${path$1} <command> --help\``));
|
|
727
|
+
lines.push("");
|
|
728
|
+
lines.push(chalk_1.default.dim("Commands:"));
|
|
729
|
+
lines.push("");
|
|
730
|
+
const commandNames = data.commands.map((cmd) => formatCommandName(cmd.name, cmd.aliases));
|
|
731
|
+
const maxNameWidth = Math.max(...commandNames.map((n) => n.length));
|
|
732
|
+
const argHints = data.commands.map((cmd) => getArgHint(cmd.helpTopics));
|
|
733
|
+
const maxArgWidth = Math.max(...argHints.map((a) => a.length), 0);
|
|
734
|
+
for (let i = 0; i < data.commands.length; i++) {
|
|
735
|
+
const cmd = data.commands[i];
|
|
736
|
+
const displayCommandName = commandNames[i];
|
|
737
|
+
const argHint = argHints[i];
|
|
738
|
+
lines.push(` ${displayCommandName.padEnd(maxNameWidth + 2)}${chalk_1.default.dim(argHint.padEnd(maxArgWidth + 2))}${chalk_1.default.dim((_a = cmd.description) !== null && _a !== void 0 ? _a : "")}`);
|
|
739
|
+
}
|
|
740
|
+
if (data.examples && data.examples.length > 0) {
|
|
741
|
+
lines.push("");
|
|
742
|
+
lines.push(chalk_1.default.dim("Examples:"));
|
|
743
|
+
for (const example of data.examples) {
|
|
744
|
+
lines.push("");
|
|
745
|
+
lines.push(`${chalk_1.default.gray("–")} ${example.description}`);
|
|
746
|
+
lines.push("");
|
|
747
|
+
lines.push(chalk_1.default.cyan(` $ ${example.command}`));
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
lines.push("");
|
|
751
|
+
return lines.join("\n");
|
|
752
|
+
}
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
function capitalize(str) {
|
|
756
|
+
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
757
|
+
}
|
|
758
|
+
/**
|
|
759
|
+
* A pre-configured Vercel-style formatter with default settings.
|
|
760
|
+
* Uses "▲" as the logo and derives the CLI name from the command name.
|
|
761
|
+
*/
|
|
762
|
+
exports.vercelFormatter = createVercelFormatter();
|
|
763
|
+
}) });
|
|
764
|
+
|
|
626
765
|
//#endregion
|
|
627
766
|
//#region src/sandbox.ts
|
|
628
767
|
var import_cjs = require_cjs();
|
|
629
768
|
var import_dotenv_flow = /* @__PURE__ */ __toESM(require_dotenv_flow());
|
|
769
|
+
var import_vercel_formatter = require_vercel_formatter();
|
|
630
770
|
import_dotenv_flow.default.config({ silent: true });
|
|
631
771
|
async function main() {
|
|
772
|
+
(0, import_cjs.setDefaultHelpFormatter)(import_vercel_formatter.vercelFormatter);
|
|
632
773
|
try {
|
|
633
774
|
let args = process.argv.slice(2);
|
|
634
775
|
if (args.length >= 1 && args[0] === "sh") {
|
package/dist/sandbox.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.mjs","names":["fs","version","parse","debug","path","config","dotenv","path","dotenv"],"sources":["../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json","../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js","../../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/package.json","../../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/lib/dotenv-flow.js","../src/sandbox.ts"],"sourcesContent":["{\n \"name\": \"dotenv\",\n \"version\": \"16.5.0\",\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=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 const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\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 _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 if (debug) {\n _debug('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\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 (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","{\n \"name\": \"dotenv-flow\",\n \"version\": \"4.1.0\",\n \"description\": \"Loads environment variables from `.env.[development|test|production][.local]` files\",\n \"keywords\": [\n \"dotenv\",\n \"node_env\",\n \"development\",\n \"test\",\n \"production\",\n \"local\",\n \"env\",\n \"environment\",\n \"variables\"\n ],\n \"homepage\": \"https://github.com/kerimdzhanov/dotenv-flow#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/kerimdzhanov/dotenv-flow.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/kerimdzhanov/dotenv-flow/issues\"\n },\n \"main\": \"lib/dotenv-flow.js\",\n \"types\": \"lib/dotenv-flow.d.ts\",\n \"exports\": {\n \".\": \"./lib/dotenv-flow.js\",\n \"./config\": {\n \"require\": \"./config.js\",\n \"node\": \"./config.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"lib/cli-options.js\",\n \"lib/dotenv-flow.d.ts\",\n \"lib/env-options.js\",\n \"config.d.ts\",\n \"config.js\"\n ],\n \"dependencies\": {\n \"dotenv\": \"^16.0.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.6.2\",\n \"chai\": \"^4.3.7\",\n \"conventional-changelog-cli\": \"^2.0.35\",\n \"mocha\": \"^10.2.0\",\n \"sinon\": \"^15.2.0\",\n \"sinon-chai\": \"^3.7.0\",\n \"tmp\": \"^0.2.1\",\n \"typescript\": \"^5.2.2\"\n },\n \"engines\": {\n \"node\": \">= 12.0.0\"\n },\n \"scripts\": {\n \"test\": \"yarn run test:unit && yarn run test:integration && yarn run test:types\",\n \"test:unit\": \"mocha -r mocha.conf.js test/unit/*.spec.js\",\n \"test:integration\": \"mocha -r mocha.conf.js test/integration/*.spec.{m,}js\",\n \"test:types\": \"tsc\",\n \"changelog\": \"conventional-changelog -p angular -i CHANGELOG.md -s\"\n },\n \"author\": \"Dan Kerimdzhanov\",\n \"license\": \"MIT\"\n}\n","'use strict';\n\nconst fs = require('fs');\nconst p = require('path');\nconst dotenv = require('dotenv');\nconst {version} = require('../package.json');\n\nconst DEFAULT_PATTERN = '.env[.node_env][.local]';\n\nconst LOCAL_PLACEHOLDER_REGEX = /\\[(\\W*\\blocal\\b\\W*)]/g;\nconst NODE_ENV_PLACEHOLDER_REGEX = /\\[(\\W*\\b)node_env(\\b\\W*)]/g;\n\n/**\n * Compose a filename from a given `patten`.\n *\n * @param {string} pattern\n * @param {object} [options]\n * @param {boolean} [options.local]\n * @param {string} [options.node_env]\n * @return {string} filename\n */\nfunction composeFilename(pattern, options) {\n let filename = pattern;\n\n filename = filename.replace(\n LOCAL_PLACEHOLDER_REGEX,\n (options && options.local) ? '$1' : ''\n );\n\n filename = filename.replace(\n NODE_ENV_PLACEHOLDER_REGEX,\n (options && options.node_env) ? `$1${options.node_env}$2` : ''\n );\n\n return filename;\n}\n\n/**\n * Returns a list of existing `.env*` filenames depending on the given `options`.\n *\n * The resulting list is ordered by the env files'\n * variables overwriting priority from lowest to highest.\n *\n * This can also be referenced as \"env files' environment cascade\"\n * or \"order of ascending priority.\"\n *\n * ⚠️ Note that the `.env.local` file is not listed for \"test\" environment,\n * since normally you expect tests to produce the same results for everyone.\n *\n * @param {object} [options] - `.env*` files listing options\n * @param {string} [options.node_env] - node environment (development/test/production/etc.)\n * @param {string} [options.path] - path to the working directory (default: `process.cwd()`)\n * @param {string} [options.pattern] - `.env*` files' naming convention pattern\n * (default: \".env[.node_env][.local]\")\n * @param {boolean} [options.debug] - turn on debug messages\n * @return {string[]}\n */\nfunction listFiles(options = {}) {\n options.debug && debug('listing effective `.env*` files…');\n\n const {\n node_env,\n path = process.cwd(),\n pattern = DEFAULT_PATTERN,\n } = options;\n\n const hasLocalPlaceholder = LOCAL_PLACEHOLDER_REGEX.test(pattern);\n\n const filenames = {};\n\n if (pattern === DEFAULT_PATTERN) {\n filenames['.env.defaults'] = '.env.defaults'; // for seamless transition from \".env + .env.defaults\"\n }\n\n filenames['.env'] = composeFilename(pattern);\n\n if (hasLocalPlaceholder) {\n const envlocal = composeFilename(pattern, { local: true });\n\n if (node_env !== 'test') {\n filenames['.env.local'] = envlocal;\n }\n else if (options.debug && fs.existsSync(p.resolve(path, envlocal))) {\n debug(\n '[!] note that `%s` is being skipped for \"test\" environment',\n envlocal\n );\n }\n }\n\n if (node_env && NODE_ENV_PLACEHOLDER_REGEX.test(pattern)) {\n filenames['.env.node_env'] = composeFilename(pattern, { node_env });\n\n if (hasLocalPlaceholder) {\n filenames['.env.node_env.local'] = composeFilename(pattern, { node_env, local: true });\n }\n }\n\n return [\n '.env.defaults',\n '.env',\n '.env.local',\n '.env.node_env',\n '.env.node_env.local'\n ]\n .reduce((list, basename) => {\n if (!filenames[basename]) {\n return list;\n }\n\n const filename = p.resolve(path, filenames[basename]);\n if (fs.existsSync(filename)) {\n options.debug && debug('>> %s', filename);\n list.push(filename);\n }\n\n return list;\n }, []);\n}\n\n/**\n * Parses a given file or a list of files.\n *\n * When a list of filenames is given, the files will be parsed and merged in the same order as given.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {{ encoding?: string, debug?: boolean }} [options] - parse options\n * @return {Object<string, string>} the resulting map of `{ env_var: value }` as an object\n */\nfunction parse(filenames, options = {}) {\n if (typeof filenames === 'string') {\n options.debug && debug('parsing \"%s\"…', filenames);\n\n const parsed = dotenv.parse(\n fs.readFileSync(\n filenames,\n options.encoding && { encoding: options.encoding }\n )\n );\n\n if (options.debug) {\n Object.keys(parsed)\n .forEach(varname => debug('>> %s', varname));\n }\n\n return parsed;\n }\n\n return filenames.reduce((result, filename) => {\n const parsed = parse(filename, options);\n\n if (options.debug) {\n Object.keys(parsed)\n .filter(varname => result.hasOwnProperty(varname))\n .forEach(varname => debug('`%s` is being overwritten by merge from \"%s\"', varname, filename));\n }\n\n return Object.assign(result, parsed);\n }, {});\n}\n\n/**\n * Parses variables defined in given file(s) and assigns them to `process.env`.\n *\n * Variables that are already defined in `process.env` will not be overwritten,\n * thus giving a higher priority to environment variables predefined by the shell.\n *\n * If the loading is successful, an object with `parsed` property is returned.\n * The `parsed` property contains parsed variables' `key => value` pairs merged in order using\n * the \"overwrite merge\" strategy.\n *\n * If parsing fails for any of the given files, `process.env` is being left untouched,\n * and an object with `error` property is returned.\n * The `error` property, if present, references to the occurred error.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {object} [options] - file loading options\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.debug=false] - turn on debug messages\n * @param {boolean} [options.silent=false] - suppress console errors and warnings\n * @return {{ error: Error } | { parsed: Object<string, string> }}\n */\nfunction load(filenames, options = {}) {\n try {\n const parsed = parse(filenames, {\n encoding: options.encoding,\n debug: options.debug\n });\n\n options.debug && debug('safe-merging parsed environment variables into `process.env`…');\n\n for (const varname of Object.keys(parsed)) {\n if (!process.env.hasOwnProperty(varname)) {\n options.debug && debug('>> process.env.%s', varname);\n process.env[varname] = parsed[varname];\n }\n else if (options.debug && process.env[varname] !== parsed[varname]) {\n debug('environment variable `%s` is predefined and not being overwritten', varname);\n }\n }\n\n return { parsed };\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\n/**\n * Unload variables defined in a given file(s) from `process.env`.\n *\n * This function can gracefully resolve the following issue:\n *\n * In some cases, the original \"dotenv\" library can be used by one of the dependent npm modules.\n * It causes calling the original `dotenv.config()` that loads the `.env` file from your project before you can call `dotenv-flow.config()`.\n * Such cases break `.env*` files priority because the previously loaded environment variables are treated as shell-defined thus having a higher priority.\n *\n * Unloading the previously loaded `.env` file can be activated when using the `dotenv-flow.config()` with the `purge_dotenv` option set to `true`.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to unload\n * @param {object} [options] - `fs.readFileSync` options\n */\nfunction unload(filenames, options = {}) {\n const parsed = parse(filenames, options);\n\n Object.keys(parsed).forEach((key) => {\n if (process.env[key] === parsed[key]) {\n delete process.env[key];\n }\n });\n}\n\n/**\n * Returns effective (computed) `node_env`.\n *\n * @param {object} [options]\n * @param {string} [options.node_env]\n * @param {string} [options.default_node_env]\n * @param {boolean} [options.debug]\n * @return {string|undefined} node_env\n */\nfunction getEffectiveNodeEnv(options = {}) {\n if (options.node_env) {\n options.debug && debug(\n `operating in \"${options.node_env}\" environment (set by \\`options.node_env\\`)`\n );\n return options.node_env;\n }\n\n if (process.env.NODE_ENV) {\n options.debug && debug(\n `operating in \"${process.env.NODE_ENV}\" environment (as per \\`process.env.NODE_ENV\\`)`\n );\n return process.env.NODE_ENV;\n }\n\n if (options.default_node_env) {\n options.debug && debug(\n `operating in \"${options.default_node_env}\" environment (taken from \\`options.default_node_env\\`)`\n );\n return options.default_node_env;\n }\n\n options.debug && debug(\n 'operating in \"no environment\" mode (no environment-related options are set)'\n );\n return undefined;\n}\n\nconst CONFIG_OPTION_KEYS = [\n 'node_env',\n 'default_node_env',\n 'path',\n 'pattern',\n 'files',\n 'encoding',\n 'purge_dotenv',\n 'silent'\n];\n\n/**\n * \"dotenv-flow\" initialization function (API entry point).\n *\n * Allows configuring dotenv-flow programmatically.\n *\n * @param {object} [options] - configuration options\n * @param {string} [options.node_env=process.env.NODE_ENV] - node environment (development/test/production/etc.)\n * @param {string} [options.default_node_env] - the default node environment\n * @param {string} [options.path=process.cwd()] - path to `.env*` files directory\n * @param {string} [options.pattern=\".env[.node_env][.local]\"] - `.env*` files' naming convention pattern\n * @param {string[]} [options.files] - an explicit list of `.env*` files to load (note that `options.[default_]node_env` and `options.pattern` are ignored in this case)\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.purge_dotenv=false] - perform the `.env` file {@link unload}\n * @param {boolean} [options.debug=false] - turn on detailed logging to help debug why certain variables are not being set as you expect\n * @param {boolean} [options.silent=false] - suppress all kinds of warnings including \".env*\" files' loading errors\n * @return {{ parsed?: object, error?: Error }} with a `parsed` key containing the loaded content or an `error` key with an error that is occurred\n */\nfunction config(options = {}) {\n if (options.debug) {\n debug('initializing…');\n\n CONFIG_OPTION_KEYS\n .filter(key => key in options)\n .forEach(key => debug(`| options.${key} =`, options[key]));\n }\n\n const {\n path = process.cwd(),\n pattern = DEFAULT_PATTERN\n } = options;\n\n if (options.purge_dotenv) {\n options.debug && debug(\n '`options.purge_dotenv` is enabled, unloading potentially pre-loaded `.env`…'\n );\n\n const dotenvFile = p.resolve(path, '.env');\n try {\n fs.existsSync(dotenvFile) && unload(dotenvFile, { encoding: options.encoding });\n }\n catch (error) {\n !options.silent && warn('unloading failed: ', error);\n }\n }\n\n try {\n let filenames;\n\n if (options.files) {\n options.debug && debug(\n 'using explicit list of `.env*` files: %s…',\n options.files.join(', ')\n );\n\n filenames = options.files\n .reduce((list, basename) => {\n const filename = p.resolve(path, basename);\n\n if (fs.existsSync(filename)) {\n list.push(filename);\n }\n else if (options.debug) {\n debug('>> %s does not exist, skipping…', filename);\n }\n\n return list;\n }, []);\n }\n else {\n const node_env = getEffectiveNodeEnv(options);\n\n filenames = listFiles({ node_env, path, pattern, debug: options.debug });\n\n if (filenames.length === 0) {\n const _pattern = node_env\n ? pattern.replace(NODE_ENV_PLACEHOLDER_REGEX, `[$1${node_env}$2]`)\n : pattern;\n\n return failure(\n new Error(`no \".env*\" files matching pattern \"${_pattern}\" in \"${path}\" dir`),\n options\n );\n }\n }\n\n const result = load(filenames, {\n encoding: options.encoding,\n debug: options.debug,\n silent: options.silent\n });\n\n options.debug && debug('initialization completed.');\n\n return result;\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\nfunction failure(error, options) {\n if (!options.silent) {\n warn(`\".env*\" files loading failed: ${error.message || error}`);\n }\n\n return { error };\n}\n\nfunction warn(message, error) {\n if (error) {\n message += ': %s';\n }\n\n console.warn(`[dotenv-flow@${version}]: ${message}`, error);\n}\n\nfunction debug(message, ...values) {\n console.debug(`[dotenv-flow@${version}]: ${message}`, ...values);\n}\n\nmodule.exports = {\n DEFAULT_PATTERN,\n listFiles,\n parse,\n load,\n unload,\n config\n};\n","import { run } from \"cmd-ts\";\nimport { app } from \"./app\";\nimport dotenv from \"dotenv-flow\";\nimport { StyledError } from \"./error\";\n\ndotenv.config({\n silent: true,\n});\n\nasync function main() {\n try {\n // We've renamed `sandbox sh` to `sandbox create --connect`. cmd-ts doesn't support aliases for commands\n // with different arguments. Best effort deprecation warning, remap to the new command if the user just\n // runs `sandbox sh ...`\n let args = process.argv.slice(2);\n if (args.length >= 1 && args[0] === \"sh\") {\n args = [\"create\", \"--connect\", ...args.slice(1)];\n process.stderr.write('Warning: `sandbox sh` is deprecated. Please use `sandbox create --connect` instead.\\n');\n }\n\n await run(app(), args);\n } catch (e) {\n if (e instanceof StyledError) {\n console.error();\n console.error(e.message);\n process.exit(1);\n }\n\n console.error(e);\n process.exit(1);\n }\n}\n\nmain();\n"],"x_google_ignoreList":[0,1,2,3],"mappings":";;;;;;;;kBAAA;EACE,QAAQ;EACR,WAAW;EACX,eAAe;EACf,QAAQ;EACR,SAAS;EACT,WAAW;GACT,KAAK;IACH,SAAS;IACT,WAAW;IACX,WAAW;IACZ;GACD,YAAY;GACZ,eAAe;GACf,qBAAqB;GACrB,wBAAwB;GACxB,qBAAqB;GACrB,wBAAwB;GACxB,kBAAkB;GACnB;EACD,WAAW;GACT,aAAa;GACb,QAAQ;GACR,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;AACZ,UAAO,QAAQ,OAAO,QAAQ;;;CAIlC,SAAS,QAAQ,OAAO,SAAS;AAC/B,MAAI,CAAC,QAAQ,OACX,MAAK,iCAAiC,MAAM,WAAW,QAAQ;AAGjE,SAAO,EAAE,OAAO;;CAGlB,SAAS,KAAK,SAAS,OAAO;AAC5B,MAAI,MACF,YAAW;AAGb,UAAQ,KAAK,gBAAgB,QAAQ,KAAK,WAAW,MAAM;;CAG7D,SAAS,MAAM,SAAS,GAAG,QAAQ;AACjC,UAAQ,MAAM,gBAAgB,QAAQ,KAAK,WAAW,GAAG,OAAO;;AAGlE,QAAO,UAAU;EACf;EACA;EACA;EACA;EACA;EACA;EACD;;;;;;;AClZDC,2BAAO,OAAO,EACZ,QAAQ,MACT,CAAC;AAEF,eAAe,OAAO;AACpB,KAAI;EAIF,IAAI,OAAO,QAAQ,KAAK,MAAM,EAAE;AAChC,MAAI,KAAK,UAAU,KAAK,KAAK,OAAO,MAAM;AACxC,UAAO;IAAC;IAAU;IAAa,GAAG,KAAK,MAAM,EAAE;IAAC;AAChD,WAAQ,OAAO,MAAM,wFAAwF;;AAG/G,4BAAU,KAAK,EAAE,KAAK;UACf,GAAG;AACV,MAAI,aAAa,aAAa;AAC5B,WAAQ,OAAO;AACf,WAAQ,MAAM,EAAE,QAAQ;AACxB,WAAQ,KAAK,EAAE;;AAGjB,UAAQ,MAAM,EAAE;AAChB,UAAQ,KAAK,EAAE;;;AAInB,MAAM"}
|
|
1
|
+
{"version":3,"file":"sandbox.mjs","names":["fs","version","parse","debug","path","config","dotenv","path","config","path","dotenv","vercelFormatter"],"sources":["../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/package.json","../../../node_modules/.pnpm/dotenv@16.5.0/node_modules/dotenv/lib/main.js","../../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/package.json","../../../node_modules/.pnpm/dotenv-flow@4.1.0/node_modules/dotenv-flow/lib/dotenv-flow.js","../../../node_modules/.pnpm/cmd-ts@0.15.0/node_modules/cmd-ts/dist/cjs/batteries/vercel-formatter.js","../src/sandbox.ts"],"sourcesContent":["{\n \"name\": \"dotenv\",\n \"version\": \"16.5.0\",\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=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 const vaultPath = _vaultPath(options)\n\n // Parse .env.vault\n const result = DotenvModule.configDotenv({ path: vaultPath })\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 _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 if (debug) {\n _debug('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\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 (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","{\n \"name\": \"dotenv-flow\",\n \"version\": \"4.1.0\",\n \"description\": \"Loads environment variables from `.env.[development|test|production][.local]` files\",\n \"keywords\": [\n \"dotenv\",\n \"node_env\",\n \"development\",\n \"test\",\n \"production\",\n \"local\",\n \"env\",\n \"environment\",\n \"variables\"\n ],\n \"homepage\": \"https://github.com/kerimdzhanov/dotenv-flow#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/kerimdzhanov/dotenv-flow.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/kerimdzhanov/dotenv-flow/issues\"\n },\n \"main\": \"lib/dotenv-flow.js\",\n \"types\": \"lib/dotenv-flow.d.ts\",\n \"exports\": {\n \".\": \"./lib/dotenv-flow.js\",\n \"./config\": {\n \"require\": \"./config.js\",\n \"node\": \"./config.js\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"lib/cli-options.js\",\n \"lib/dotenv-flow.d.ts\",\n \"lib/env-options.js\",\n \"config.d.ts\",\n \"config.js\"\n ],\n \"dependencies\": {\n \"dotenv\": \"^16.0.0\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^20.6.2\",\n \"chai\": \"^4.3.7\",\n \"conventional-changelog-cli\": \"^2.0.35\",\n \"mocha\": \"^10.2.0\",\n \"sinon\": \"^15.2.0\",\n \"sinon-chai\": \"^3.7.0\",\n \"tmp\": \"^0.2.1\",\n \"typescript\": \"^5.2.2\"\n },\n \"engines\": {\n \"node\": \">= 12.0.0\"\n },\n \"scripts\": {\n \"test\": \"yarn run test:unit && yarn run test:integration && yarn run test:types\",\n \"test:unit\": \"mocha -r mocha.conf.js test/unit/*.spec.js\",\n \"test:integration\": \"mocha -r mocha.conf.js test/integration/*.spec.{m,}js\",\n \"test:types\": \"tsc\",\n \"changelog\": \"conventional-changelog -p angular -i CHANGELOG.md -s\"\n },\n \"author\": \"Dan Kerimdzhanov\",\n \"license\": \"MIT\"\n}\n","'use strict';\n\nconst fs = require('fs');\nconst p = require('path');\nconst dotenv = require('dotenv');\nconst {version} = require('../package.json');\n\nconst DEFAULT_PATTERN = '.env[.node_env][.local]';\n\nconst LOCAL_PLACEHOLDER_REGEX = /\\[(\\W*\\blocal\\b\\W*)]/g;\nconst NODE_ENV_PLACEHOLDER_REGEX = /\\[(\\W*\\b)node_env(\\b\\W*)]/g;\n\n/**\n * Compose a filename from a given `patten`.\n *\n * @param {string} pattern\n * @param {object} [options]\n * @param {boolean} [options.local]\n * @param {string} [options.node_env]\n * @return {string} filename\n */\nfunction composeFilename(pattern, options) {\n let filename = pattern;\n\n filename = filename.replace(\n LOCAL_PLACEHOLDER_REGEX,\n (options && options.local) ? '$1' : ''\n );\n\n filename = filename.replace(\n NODE_ENV_PLACEHOLDER_REGEX,\n (options && options.node_env) ? `$1${options.node_env}$2` : ''\n );\n\n return filename;\n}\n\n/**\n * Returns a list of existing `.env*` filenames depending on the given `options`.\n *\n * The resulting list is ordered by the env files'\n * variables overwriting priority from lowest to highest.\n *\n * This can also be referenced as \"env files' environment cascade\"\n * or \"order of ascending priority.\"\n *\n * ⚠️ Note that the `.env.local` file is not listed for \"test\" environment,\n * since normally you expect tests to produce the same results for everyone.\n *\n * @param {object} [options] - `.env*` files listing options\n * @param {string} [options.node_env] - node environment (development/test/production/etc.)\n * @param {string} [options.path] - path to the working directory (default: `process.cwd()`)\n * @param {string} [options.pattern] - `.env*` files' naming convention pattern\n * (default: \".env[.node_env][.local]\")\n * @param {boolean} [options.debug] - turn on debug messages\n * @return {string[]}\n */\nfunction listFiles(options = {}) {\n options.debug && debug('listing effective `.env*` files…');\n\n const {\n node_env,\n path = process.cwd(),\n pattern = DEFAULT_PATTERN,\n } = options;\n\n const hasLocalPlaceholder = LOCAL_PLACEHOLDER_REGEX.test(pattern);\n\n const filenames = {};\n\n if (pattern === DEFAULT_PATTERN) {\n filenames['.env.defaults'] = '.env.defaults'; // for seamless transition from \".env + .env.defaults\"\n }\n\n filenames['.env'] = composeFilename(pattern);\n\n if (hasLocalPlaceholder) {\n const envlocal = composeFilename(pattern, { local: true });\n\n if (node_env !== 'test') {\n filenames['.env.local'] = envlocal;\n }\n else if (options.debug && fs.existsSync(p.resolve(path, envlocal))) {\n debug(\n '[!] note that `%s` is being skipped for \"test\" environment',\n envlocal\n );\n }\n }\n\n if (node_env && NODE_ENV_PLACEHOLDER_REGEX.test(pattern)) {\n filenames['.env.node_env'] = composeFilename(pattern, { node_env });\n\n if (hasLocalPlaceholder) {\n filenames['.env.node_env.local'] = composeFilename(pattern, { node_env, local: true });\n }\n }\n\n return [\n '.env.defaults',\n '.env',\n '.env.local',\n '.env.node_env',\n '.env.node_env.local'\n ]\n .reduce((list, basename) => {\n if (!filenames[basename]) {\n return list;\n }\n\n const filename = p.resolve(path, filenames[basename]);\n if (fs.existsSync(filename)) {\n options.debug && debug('>> %s', filename);\n list.push(filename);\n }\n\n return list;\n }, []);\n}\n\n/**\n * Parses a given file or a list of files.\n *\n * When a list of filenames is given, the files will be parsed and merged in the same order as given.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {{ encoding?: string, debug?: boolean }} [options] - parse options\n * @return {Object<string, string>} the resulting map of `{ env_var: value }` as an object\n */\nfunction parse(filenames, options = {}) {\n if (typeof filenames === 'string') {\n options.debug && debug('parsing \"%s\"…', filenames);\n\n const parsed = dotenv.parse(\n fs.readFileSync(\n filenames,\n options.encoding && { encoding: options.encoding }\n )\n );\n\n if (options.debug) {\n Object.keys(parsed)\n .forEach(varname => debug('>> %s', varname));\n }\n\n return parsed;\n }\n\n return filenames.reduce((result, filename) => {\n const parsed = parse(filename, options);\n\n if (options.debug) {\n Object.keys(parsed)\n .filter(varname => result.hasOwnProperty(varname))\n .forEach(varname => debug('`%s` is being overwritten by merge from \"%s\"', varname, filename));\n }\n\n return Object.assign(result, parsed);\n }, {});\n}\n\n/**\n * Parses variables defined in given file(s) and assigns them to `process.env`.\n *\n * Variables that are already defined in `process.env` will not be overwritten,\n * thus giving a higher priority to environment variables predefined by the shell.\n *\n * If the loading is successful, an object with `parsed` property is returned.\n * The `parsed` property contains parsed variables' `key => value` pairs merged in order using\n * the \"overwrite merge\" strategy.\n *\n * If parsing fails for any of the given files, `process.env` is being left untouched,\n * and an object with `error` property is returned.\n * The `error` property, if present, references to the occurred error.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to parse and merge\n * @param {object} [options] - file loading options\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.debug=false] - turn on debug messages\n * @param {boolean} [options.silent=false] - suppress console errors and warnings\n * @return {{ error: Error } | { parsed: Object<string, string> }}\n */\nfunction load(filenames, options = {}) {\n try {\n const parsed = parse(filenames, {\n encoding: options.encoding,\n debug: options.debug\n });\n\n options.debug && debug('safe-merging parsed environment variables into `process.env`…');\n\n for (const varname of Object.keys(parsed)) {\n if (!process.env.hasOwnProperty(varname)) {\n options.debug && debug('>> process.env.%s', varname);\n process.env[varname] = parsed[varname];\n }\n else if (options.debug && process.env[varname] !== parsed[varname]) {\n debug('environment variable `%s` is predefined and not being overwritten', varname);\n }\n }\n\n return { parsed };\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\n/**\n * Unload variables defined in a given file(s) from `process.env`.\n *\n * This function can gracefully resolve the following issue:\n *\n * In some cases, the original \"dotenv\" library can be used by one of the dependent npm modules.\n * It causes calling the original `dotenv.config()` that loads the `.env` file from your project before you can call `dotenv-flow.config()`.\n * Such cases break `.env*` files priority because the previously loaded environment variables are treated as shell-defined thus having a higher priority.\n *\n * Unloading the previously loaded `.env` file can be activated when using the `dotenv-flow.config()` with the `purge_dotenv` option set to `true`.\n *\n * @param {string|string[]} filenames - filename or a list of filenames to unload\n * @param {object} [options] - `fs.readFileSync` options\n */\nfunction unload(filenames, options = {}) {\n const parsed = parse(filenames, options);\n\n Object.keys(parsed).forEach((key) => {\n if (process.env[key] === parsed[key]) {\n delete process.env[key];\n }\n });\n}\n\n/**\n * Returns effective (computed) `node_env`.\n *\n * @param {object} [options]\n * @param {string} [options.node_env]\n * @param {string} [options.default_node_env]\n * @param {boolean} [options.debug]\n * @return {string|undefined} node_env\n */\nfunction getEffectiveNodeEnv(options = {}) {\n if (options.node_env) {\n options.debug && debug(\n `operating in \"${options.node_env}\" environment (set by \\`options.node_env\\`)`\n );\n return options.node_env;\n }\n\n if (process.env.NODE_ENV) {\n options.debug && debug(\n `operating in \"${process.env.NODE_ENV}\" environment (as per \\`process.env.NODE_ENV\\`)`\n );\n return process.env.NODE_ENV;\n }\n\n if (options.default_node_env) {\n options.debug && debug(\n `operating in \"${options.default_node_env}\" environment (taken from \\`options.default_node_env\\`)`\n );\n return options.default_node_env;\n }\n\n options.debug && debug(\n 'operating in \"no environment\" mode (no environment-related options are set)'\n );\n return undefined;\n}\n\nconst CONFIG_OPTION_KEYS = [\n 'node_env',\n 'default_node_env',\n 'path',\n 'pattern',\n 'files',\n 'encoding',\n 'purge_dotenv',\n 'silent'\n];\n\n/**\n * \"dotenv-flow\" initialization function (API entry point).\n *\n * Allows configuring dotenv-flow programmatically.\n *\n * @param {object} [options] - configuration options\n * @param {string} [options.node_env=process.env.NODE_ENV] - node environment (development/test/production/etc.)\n * @param {string} [options.default_node_env] - the default node environment\n * @param {string} [options.path=process.cwd()] - path to `.env*` files directory\n * @param {string} [options.pattern=\".env[.node_env][.local]\"] - `.env*` files' naming convention pattern\n * @param {string[]} [options.files] - an explicit list of `.env*` files to load (note that `options.[default_]node_env` and `options.pattern` are ignored in this case)\n * @param {string} [options.encoding=\"utf8\"] - encoding of `.env*` files\n * @param {boolean} [options.purge_dotenv=false] - perform the `.env` file {@link unload}\n * @param {boolean} [options.debug=false] - turn on detailed logging to help debug why certain variables are not being set as you expect\n * @param {boolean} [options.silent=false] - suppress all kinds of warnings including \".env*\" files' loading errors\n * @return {{ parsed?: object, error?: Error }} with a `parsed` key containing the loaded content or an `error` key with an error that is occurred\n */\nfunction config(options = {}) {\n if (options.debug) {\n debug('initializing…');\n\n CONFIG_OPTION_KEYS\n .filter(key => key in options)\n .forEach(key => debug(`| options.${key} =`, options[key]));\n }\n\n const {\n path = process.cwd(),\n pattern = DEFAULT_PATTERN\n } = options;\n\n if (options.purge_dotenv) {\n options.debug && debug(\n '`options.purge_dotenv` is enabled, unloading potentially pre-loaded `.env`…'\n );\n\n const dotenvFile = p.resolve(path, '.env');\n try {\n fs.existsSync(dotenvFile) && unload(dotenvFile, { encoding: options.encoding });\n }\n catch (error) {\n !options.silent && warn('unloading failed: ', error);\n }\n }\n\n try {\n let filenames;\n\n if (options.files) {\n options.debug && debug(\n 'using explicit list of `.env*` files: %s…',\n options.files.join(', ')\n );\n\n filenames = options.files\n .reduce((list, basename) => {\n const filename = p.resolve(path, basename);\n\n if (fs.existsSync(filename)) {\n list.push(filename);\n }\n else if (options.debug) {\n debug('>> %s does not exist, skipping…', filename);\n }\n\n return list;\n }, []);\n }\n else {\n const node_env = getEffectiveNodeEnv(options);\n\n filenames = listFiles({ node_env, path, pattern, debug: options.debug });\n\n if (filenames.length === 0) {\n const _pattern = node_env\n ? pattern.replace(NODE_ENV_PLACEHOLDER_REGEX, `[$1${node_env}$2]`)\n : pattern;\n\n return failure(\n new Error(`no \".env*\" files matching pattern \"${_pattern}\" in \"${path}\" dir`),\n options\n );\n }\n }\n\n const result = load(filenames, {\n encoding: options.encoding,\n debug: options.debug,\n silent: options.silent\n });\n\n options.debug && debug('initialization completed.');\n\n return result;\n }\n catch (error) {\n return failure(error, options);\n }\n}\n\nfunction failure(error, options) {\n if (!options.silent) {\n warn(`\".env*\" files loading failed: ${error.message || error}`);\n }\n\n return { error };\n}\n\nfunction warn(message, error) {\n if (error) {\n message += ': %s';\n }\n\n console.warn(`[dotenv-flow@${version}]: ${message}`, error);\n}\n\nfunction debug(message, ...values) {\n console.debug(`[dotenv-flow@${version}]: ${message}`, ...values);\n}\n\nmodule.exports = {\n DEFAULT_PATTERN,\n listFiles,\n parse,\n load,\n unload,\n config\n};\n","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.vercelFormatter = void 0;\nexports.createVercelFormatter = createVercelFormatter;\nconst chalk_1 = __importDefault(require(\"chalk\"));\n/**\n * Extract argument hints from help topics.\n * Returns a string like \"[cmd]\" or \"[src] [dst]\" based on positional arguments.\n */\nfunction getArgHint(helpTopics) {\n return helpTopics\n .filter((t) => t.category === \"arguments\")\n .map((t) => t.usage)\n .join(\" \");\n}\n/**\n * Format command name with aliases in \"alias | name\" style.\n * Prefers shorter alias first for display.\n */\nfunction formatCommandName(name, aliases) {\n if (!(aliases === null || aliases === void 0 ? void 0 : aliases.length)) {\n return name;\n }\n // Sort aliases by length to prefer shorter ones first\n const sortedAliases = [...aliases].sort((a, b) => a.length - b.length);\n return `${sortedAliases[0]} | ${name}`;\n}\n/**\n * Create a Vercel-style help formatter.\n *\n * This formatter produces output similar to the Vercel CLI with:\n * - A header with CLI name and version\n * - Logo symbol before the command name\n * - Column-aligned commands with aliases shown as \"short | long\"\n * - Argument hints derived from positional arguments\n * - Examples section with highlighted commands\n *\n * @example\n * ```ts\n * import { setDefaultHelpFormatter } from \"cmd-ts\";\n * import { createVercelFormatter } from \"cmd-ts/batteries/vercelFormatter\";\n *\n * setDefaultHelpFormatter(createVercelFormatter({\n * cliName: \"Vercel Sandbox CLI\",\n * logo: \"▲\",\n * }));\n * ```\n */\nfunction createVercelFormatter(config = {}) {\n const { cliName, logo = \"▲\" } = config;\n return {\n formatCommand(data, _context) {\n var _a;\n const lines = [];\n const displayName = cliName !== null && cliName !== void 0 ? cliName : data.name;\n let header = displayName;\n if (data.version) {\n header += ` ${data.version}`;\n }\n lines.push(chalk_1.default.grey(header));\n // Command usage line\n lines.push(\"\");\n const path = data.path.length > 0 ? data.path.join(\" \") : data.name;\n lines.push(`${logo} ${chalk_1.default.bold(path)} [options]`);\n // Description\n if (data.description) {\n lines.push(\"\");\n lines.push(chalk_1.default.dim(data.description));\n }\n // Group help topics by category\n const byCategory = new Map();\n for (const topic of data.helpTopics) {\n const existing = (_a = byCategory.get(topic.category)) !== null && _a !== void 0 ? _a : [];\n existing.push(topic);\n byCategory.set(topic.category, existing);\n }\n // Render each category\n for (const [category, topics] of byCategory) {\n lines.push(\"\");\n lines.push(chalk_1.default.dim(`${capitalize(category)}:`));\n lines.push(\"\");\n // Calculate max width for alignment\n const maxUsageWidth = Math.max(...topics.map((t) => t.usage.length));\n for (const topic of topics) {\n const defaults = topic.defaults.length > 0\n ? chalk_1.default.dim(` [${topic.defaults.join(\", \")}]`)\n : \"\";\n lines.push(` ${topic.usage.padEnd(maxUsageWidth + 2)}${chalk_1.default.dim(topic.description)}${defaults}`);\n }\n }\n // Examples\n if (data.examples && data.examples.length > 0) {\n lines.push(\"\");\n lines.push(chalk_1.default.dim(\"Examples:\"));\n for (const example of data.examples) {\n lines.push(\"\");\n lines.push(`${chalk_1.default.gray(\"–\")} ${example.description}`);\n lines.push(\"\");\n lines.push(chalk_1.default.cyan(` $ ${example.command}`));\n }\n }\n lines.push(\"\");\n return lines.join(\"\\n\");\n },\n formatSubcommands(data, _context) {\n var _a;\n const lines = [];\n const path = data.path.length > 0 ? data.path.join(\" \") : data.name;\n const displayName = cliName !== null && cliName !== void 0 ? cliName : path;\n // Header\n if (data.version) {\n lines.push(chalk_1.default.grey(`${displayName} ${data.version}`));\n }\n else {\n lines.push(chalk_1.default.grey(displayName));\n }\n // Command usage line\n lines.push(\"\");\n lines.push(`${logo} ${chalk_1.default.bold(path)} [options] <command>`);\n // Help hint\n lines.push(\"\");\n lines.push(chalk_1.default.dim(`For command help, run \\`${path} <command> --help\\``));\n // Commands section\n lines.push(\"\");\n lines.push(chalk_1.default.dim(\"Commands:\"));\n lines.push(\"\");\n // Calculate column widths\n const commandNames = data.commands.map((cmd) => formatCommandName(cmd.name, cmd.aliases));\n const maxNameWidth = Math.max(...commandNames.map((n) => n.length));\n const argHints = data.commands.map((cmd) => getArgHint(cmd.helpTopics));\n const maxArgWidth = Math.max(...argHints.map((a) => a.length), 0);\n // Render commands\n for (let i = 0; i < data.commands.length; i++) {\n const cmd = data.commands[i];\n const displayCommandName = commandNames[i];\n const argHint = argHints[i];\n lines.push(` ${displayCommandName.padEnd(maxNameWidth + 2)}${chalk_1.default.dim(argHint.padEnd(maxArgWidth + 2))}${chalk_1.default.dim((_a = cmd.description) !== null && _a !== void 0 ? _a : \"\")}`);\n }\n // Examples\n if (data.examples && data.examples.length > 0) {\n lines.push(\"\");\n lines.push(chalk_1.default.dim(\"Examples:\"));\n for (const example of data.examples) {\n lines.push(\"\");\n lines.push(`${chalk_1.default.gray(\"–\")} ${example.description}`);\n lines.push(\"\");\n lines.push(chalk_1.default.cyan(` $ ${example.command}`));\n }\n }\n lines.push(\"\");\n return lines.join(\"\\n\");\n },\n };\n}\nfunction capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\n/**\n * A pre-configured Vercel-style formatter with default settings.\n * Uses \"▲\" as the logo and derives the CLI name from the command name.\n */\nexports.vercelFormatter = createVercelFormatter();\n//# sourceMappingURL=vercel-formatter.js.map","import { run, setDefaultHelpFormatter } from \"cmd-ts\";\nimport { app } from \"./app\";\nimport dotenv from \"dotenv-flow\";\nimport { StyledError } from \"./error\";\nimport { vercelFormatter } from \"cmd-ts/batteries/vercel-formatter\";\n\ndotenv.config({\n silent: true,\n});\n\nasync function main() {\n setDefaultHelpFormatter(vercelFormatter);\n\n try {\n // We've renamed `sandbox sh` to `sandbox create --connect`. cmd-ts doesn't support aliases for commands\n // with different arguments. Best effort deprecation warning, remap to the new command if the user just\n // runs `sandbox sh ...`\n let args = process.argv.slice(2);\n if (args.length >= 1 && args[0] === \"sh\") {\n args = [\"create\", \"--connect\", ...args.slice(1)];\n process.stderr.write(\n \"Warning: `sandbox sh` is deprecated. Please use `sandbox create --connect` instead.\\n\",\n );\n }\n\n await run(app(), args);\n } catch (e) {\n if (e instanceof StyledError) {\n console.error();\n console.error(e.message);\n process.exit(1);\n }\n\n console.error(e);\n process.exit(1);\n }\n}\n\nmain();\n"],"x_google_ignoreList":[0,1,2,3,4],"mappings":";;;;;;;;kBAAA;EACE,QAAQ;EACR,WAAW;EACX,eAAe;EACf,QAAQ;EACR,SAAS;EACT,WAAW;GACT,KAAK;IACH,SAAS;IACT,WAAW;IACX,WAAW;IACZ;GACD,YAAY;GACZ,eAAe;GACf,qBAAqB;GACrB,wBAAwB;GACxB,qBAAqB;GACrB,wBAAwB;GACxB,kBAAkB;GACnB;EACD,WAAW;GACT,aAAa;GACb,QAAQ;GACR,WAAW;GACX,QAAQ;GACR,iBAAiB;GACjB,cAAc;GACd,WAAW;GACZ;EACD,cAAc;GACZ,QAAQ;GACR,OAAO;GACR;EACD,YAAY;EACZ,WAAW;EACX,YAAY;GACV;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,kBAAkB;EAClB,WAAW;EACX,mBAAmB;GACjB,eAAe;GACf,WAAW;GACX,SAAS;GACT,YAAY;GACZ,oBAAoB;GACpB,OAAO;GACP,cAAc;GACf;EACD,WAAW,EACT,QAAQ,QACT;EACD,WAAW,EACT,MAAM,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
7
|
"sandbox",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"debug": "^4.4.1",
|
|
29
29
|
"zod": "^4.1.1",
|
|
30
|
-
"@vercel/sandbox": "1.
|
|
30
|
+
"@vercel/sandbox": "1.6.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/debug": "^4.1.12",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@types/node": "^22.15.12",
|
|
36
36
|
"@vercel/oidc": "^3.1.0",
|
|
37
37
|
"chalk": "^5.6.0",
|
|
38
|
-
"cmd-ts": "0.
|
|
38
|
+
"cmd-ts": "0.15.0",
|
|
39
39
|
"date-fns": "^4.1.0",
|
|
40
40
|
"dotenv-flow": "^4.1.0",
|
|
41
41
|
"listr2": "^9.0.2",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"xdg-app-paths": "5.1.0",
|
|
48
48
|
"@vercel/pty-tunnel": "2.0.3",
|
|
49
49
|
"@vercel/pty-tunnel-server": "0.0.2",
|
|
50
|
-
"@vercel/sandbox": "1.
|
|
50
|
+
"@vercel/sandbox": "1.6.0"
|
|
51
51
|
},
|
|
52
52
|
"scripts": {
|
|
53
53
|
"clean": "rm -rf node_modules dist",
|