vercel 62.1.0 → 62.2.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/chunks/{add-HANL3P77.js → add-7HJR3HK7.js} +1 -1
- package/dist/chunks/{add-XUAM4VOK.js → add-Q5OZFIRM.js} +1 -1
- package/dist/chunks/{add-XNYC3JIL.js → add-VLVURKGS.js} +1 -1
- package/dist/chunks/{build-ZBS6SOT7.js → build-MR7MUWBQ.js} +1 -1
- package/dist/chunks/{chunk-4NICAS7W.js → chunk-4HXRTNAK.js} +1 -1
- package/dist/chunks/{chunk-OGVFR4VL.js → chunk-743NGLUN.js} +1 -1
- package/dist/chunks/{chunk-BN3XAVPG.js → chunk-7ANQHBBE.js} +1 -1
- package/dist/chunks/{chunk-Z5PMK6F2.js → chunk-7IRKF3ZG.js} +3 -3
- package/dist/chunks/{chunk-35QWU4NB.js → chunk-7POWBJDF.js} +2 -2
- package/dist/chunks/{chunk-NKC536ZX.js → chunk-ADDXKC3J.js} +2 -2
- package/dist/chunks/{chunk-Z6TGFLIO.js → chunk-AKPQWZIP.js} +2 -2
- package/dist/chunks/{chunk-ZNFC3CZF.js → chunk-ALXWJ7XN.js} +1 -1
- package/dist/chunks/{chunk-QMBXEDTG.js → chunk-B5PFD6Q3.js} +1 -1
- package/dist/chunks/{chunk-7VSX264O.js → chunk-C6ITILVT.js} +2 -2
- package/dist/chunks/chunk-D5VTBRWF.js +7 -0
- package/dist/chunks/{chunk-RBYCFVJN.js → chunk-DECIQZZQ.js} +1 -1
- package/dist/chunks/{chunk-AIMMAROX.js → chunk-E4RLHRDF.js} +1 -1
- package/dist/chunks/{chunk-ULYAF4N3.js → chunk-EQHNA4BW.js} +1 -1
- package/dist/chunks/{chunk-DECRXYX6.js → chunk-GASSNHZG.js} +1 -1
- package/dist/chunks/{chunk-7NSHIG54.js → chunk-HLVUEYOZ.js} +1 -1
- package/dist/chunks/chunk-HVROAV4B.js +9 -0
- package/dist/chunks/{chunk-64JYKBGN.js → chunk-HYW4A5B3.js} +1 -1
- package/dist/chunks/{chunk-CS4QF4YI.js → chunk-ILXXXXVQ.js} +1 -1
- package/dist/chunks/{chunk-NYUESPV2.js → chunk-JO3XBFR3.js} +1 -1
- package/dist/chunks/{chunk-B7YJLE3P.js → chunk-JSKSNCK2.js} +1 -1
- package/dist/chunks/{chunk-I327YWUE.js → chunk-K5WTLFS6.js} +1 -1
- package/dist/chunks/{chunk-V6BHS2M2.js → chunk-KG5BMLOI.js} +1 -1
- package/dist/chunks/{chunk-FWN57YF7.js → chunk-KREBNPHL.js} +1 -1
- package/dist/chunks/{chunk-6MR2VYMC.js → chunk-L46BHPRD.js} +1 -1
- package/dist/chunks/{chunk-NXJLJLEM.js → chunk-LCY4SULE.js} +1 -1
- package/dist/chunks/chunk-LHQUNL52.js +7 -0
- package/dist/chunks/{chunk-A5VLP25I.js → chunk-MCCL762Q.js} +1 -1
- package/dist/chunks/chunk-MK3CTSDV.js +24 -0
- package/dist/chunks/{chunk-DT3EUC6S.js → chunk-N4PVXHAJ.js} +2 -1
- package/dist/chunks/{chunk-JK5Z72G5.js → chunk-N5MNZPPJ.js} +1 -1
- package/dist/chunks/{chunk-GR76JFDX.js → chunk-NRN65VUM.js} +1 -1
- package/dist/chunks/{chunk-Z26EOSNI.js → chunk-NXTK7VKL.js} +1 -1
- package/dist/chunks/{chunk-JLOCNOBV.js → chunk-PADCVJ7G.js} +1 -1
- package/dist/chunks/{chunk-QAPUB4EX.js → chunk-PAI3WRPA.js} +1 -1
- package/dist/chunks/{chunk-Y3A7ZJNX.js → chunk-PTFKU33G.js} +1 -1
- package/dist/chunks/{chunk-XF5HR3BJ.js → chunk-RVKOPGOI.js} +1 -1
- package/dist/chunks/{chunk-6OI6SRHZ.js → chunk-SDGWKUST.js} +1 -1
- package/dist/chunks/{chunk-BKNROJQU.js → chunk-UOHVKN6N.js} +1 -1
- package/dist/chunks/{chunk-ZOIPWLUF.js → chunk-UWO3M2L2.js} +1 -1
- package/dist/chunks/chunk-VGXFOQ4P.js +8 -0
- package/dist/chunks/{chunk-T4QWSTWE.js → chunk-VTMLKJVQ.js} +1 -1
- package/dist/chunks/{chunk-7PQBWGSI.js → chunk-VZDY57PJ.js} +1 -1
- package/dist/chunks/{chunk-TBLJVTTQ.js → chunk-WN6OXK2F.js} +1 -1
- package/dist/chunks/{chunk-X5OINFLV.js → chunk-WOKSTB3F.js} +1 -1
- package/dist/chunks/{chunk-K6GIN2TC.js → chunk-WW3VUXRV.js} +1 -1
- package/dist/chunks/{chunk-7RT22KMX.js → chunk-ZQIUMXCI.js} +1 -1
- package/dist/chunks/{clear-UYIYBIU7.js → clear-PPE55RPM.js} +1 -1
- package/dist/chunks/{compile-vercel-config-SRYQK624.js → compile-vercel-config-2IC23CNT.js} +1 -1
- package/dist/chunks/{config-EDC5XGQX.js → config-G2A6KPPM.js} +1 -1
- package/dist/chunks/{config-6AXT6WNO.js → config-T3WHONFJ.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-GYK2QMZA.js → delete-75SYJKNE.js} +1 -1
- package/dist/chunks/{delete-PIASS7TQ.js → delete-MHXN5KTO.js} +1 -1
- package/dist/chunks/{detect-projects-325QE23N.js → detect-projects-GJF4VXQI.js} +1 -1
- package/dist/chunks/detect-services-K3363KB7.js +7 -0
- package/dist/chunks/{disable-SFNXBFOL.js → disable-OUYOHEWN.js} +1 -1
- package/dist/chunks/{discard-QX7SXCDX.js → discard-RXSHOY3J.js} +1 -1
- package/dist/chunks/{edit-4U3ZERPO.js → edit-Y7OL72ZK.js} +1 -1
- package/dist/chunks/{edit-PNIFJF2H.js → edit-Z5RCWPOX.js} +1 -1
- package/dist/chunks/{enable-HZFCTROZ.js → enable-HI2UH2NM.js} +1 -1
- package/dist/chunks/{export-QOTSGWFE.js → export-CMP3APAJ.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-L5NMXX37.js → generate-cert-for-deploy-2HHUYGHU.js} +1 -1
- package/dist/chunks/{image-PY2GZYQD.js → image-SQIUEBFK.js} +1 -1
- package/dist/chunks/{import-builders-WWYNSGXV.js → import-builders-EUOOFPHW.js} +1 -1
- package/dist/chunks/{inspect-NIRGPMGV.js → inspect-2SXPXNYH.js} +1 -1
- package/dist/chunks/{inspect-DKJC7ORF.js → inspect-DYNTJMTQ.js} +1 -1
- package/dist/chunks/{inspect-QQJAYYMO.js → inspect-J3F3U3YF.js} +1 -1
- package/dist/chunks/{inspect-EHEMDPJD.js → inspect-KYFVYFWX.js} +1 -1
- package/dist/chunks/{inspect-IIF3N5Z2.js → inspect-V7HA2GZ5.js} +1 -1
- package/dist/chunks/{list-4TZ6QS5J.js → list-TSDBEAVF.js} +1 -1
- package/dist/chunks/{list-MMQAS2OQ.js → list-X4MKKDJX.js} +1 -1
- package/dist/chunks/{list-4MCOLKTO.js → list-ZQSOWXRI.js} +1 -1
- package/dist/chunks/{login-5QOABZRX.js → login-5FMKHZVG.js} +1 -1
- package/dist/chunks/{login-ZAAIOSQ4.js → login-YEDMPXUF.js} +1 -1
- package/dist/chunks/{logs-KWMWFGLA.js → logs-X2OIQXGW.js} +1 -1
- package/dist/chunks/{ls-KCE6GJZL.js → ls-4W4KTJ6T.js} +1 -1
- package/dist/chunks/{ls-43NFH2L6.js → ls-6EDJUUDW.js} +1 -1
- package/dist/chunks/{ls-HKXEYGZT.js → ls-BMAVUMXU.js} +1 -1
- package/dist/chunks/{ls-L454FAKC.js → ls-HK45UWBD.js} +1 -1
- package/dist/chunks/{ls-KAIRQI27.js → ls-LAYBQVU2.js} +1 -1
- package/dist/chunks/{ls-ID2DGRGG.js → ls-SQ42O6O5.js} +1 -1
- package/dist/chunks/{ls-42F5OUPY.js → ls-XIJ4CY2N.js} +1 -1
- package/dist/chunks/{mutate-QK3U73PH.js → mutate-6FCOCHSA.js} +1 -1
- package/dist/chunks/{notifications-2QARJQFZ.js → notifications-JTK7ZOLC.js} +1 -1
- package/dist/chunks/{open-PORNBO4I.js → open-3G4R3VIN.js} +1 -1
- package/dist/chunks/{openapi-6L7RIFOR.js → openapi-W365UPH2.js} +1 -1
- package/dist/chunks/{permissions-EYOTCJGO.js → permissions-IWUBXZBZ.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-N7ETDDXW.js → prompt-missing-credentials-VDR5HVA2.js} +1 -1
- package/dist/chunks/{publish-JTCJ6Z5K.js → publish-5QKVU6YV.js} +1 -1
- package/dist/chunks/{pull-FNJGDSP2.js → pull-K4JQEP7N.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-IIEFQGPX.js → purchase-domain-if-available-Q7H2TGKR.js} +1 -1
- package/dist/chunks/{push-LBPCQFBD.js → push-COILRLCW.js} +1 -1
- package/dist/chunks/{query-CBEGOTEI.js → query-ABPO2REN.js} +2 -2
- package/dist/chunks/{reorder-LLR3OV6E.js → reorder-FBUQ5ET7.js} +1 -1
- package/dist/chunks/{reply-3CDS6LPX.js → reply-FR5VO7DA.js} +1 -1
- package/dist/chunks/{resolve-XQ6UPCSZ.js → resolve-JI2ENFS6.js} +1 -1
- package/dist/chunks/{restore-U4EWQAAZ.js → restore-LYY4BSYJ.js} +1 -1
- package/dist/chunks/{rm-XGXSPQIY.js → rm-C2RWWMO3.js} +1 -1
- package/dist/chunks/{rm-WEMHKTUL.js → rm-CYYVIF2U.js} +1 -1
- package/dist/chunks/{rm-3FAU5JLM.js → rm-ETLZ75RJ.js} +1 -1
- package/dist/chunks/{rm-7OBAUU4F.js → rm-GHSQEFRG.js} +1 -1
- package/dist/chunks/{rm-XW6CPP6J.js → rm-KHO6RV55.js} +1 -1
- package/dist/chunks/{routes-IPGKJ2E4.js → routes-FOCZWOGO.js} +1 -1
- package/dist/chunks/{rule-inspect-I6WJTC7O.js → rule-inspect-MISYALLU.js} +1 -1
- package/dist/chunks/{rules-TMEV52OR.js → rules-KAGL6MH3.js} +1 -1
- package/dist/chunks/schema-EKWTCBNR.js +14 -0
- package/dist/chunks/{schema-4R7CRVMR.js → schema-FZVKQRNB.js} +2 -2
- package/dist/chunks/{set-FOMKZDT2.js → set-5D7C6HMZ.js} +1 -1
- package/dist/chunks/{setup-and-link-QI6PHWVL.js → setup-and-link-H4P3FZB3.js} +1 -1
- package/dist/chunks/{tags-BTMFM3XQ.js → tags-DVGQQZNC.js} +1 -1
- package/dist/chunks/{update-CA3E2G46.js → update-QY3ZME4T.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +4 -4
- package/dist/commands/dev/index.js +7 -7
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands-bulk.js +66 -65
- package/dist/index.js +2 -2
- package/dist/version.mjs +1 -1
- package/package.json +56 -55
- package/dist/chunks/chunk-4O5TQSWD.js +0 -7
- package/dist/chunks/chunk-G43DZJ2Z.js +0 -7
- package/dist/chunks/chunk-JVCUTKAX.js +0 -24
- package/dist/chunks/chunk-N5Q4IX3H.js +0 -9
- package/dist/chunks/detect-services-QNPD7J6F.js +0 -7
- package/dist/chunks/schema-W3ZXTSRT.js +0 -14
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{noBorderChars,require_cli_table3}from"./chunk-6TAQ6OWD.js";import{require_dist}from"./chunk-
|
|
7
|
+
import{noBorderChars,require_cli_table3}from"./chunk-6TAQ6OWD.js";import{require_dist}from"./chunk-MCCL762Q.js";import{globalCommandOptions}from"./chunk-PV5YI2ZZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1),import_constants=__toESM(require_dist(),1),import_cli_table3=__toESM(require_cli_table3(),1);var INDENT=" ".repeat(2),NEWLINE=`
|
|
8
8
|
`,tableOptions={chars:noBorderChars,style:{"padding-left":0,"padding-right":0}};function wordWrap(text,maxWidth){let _tableOptions=Object.assign({},tableOptions,{colWidths:[maxWidth],style:{"padding-left":INDENT.length}}),table=new import_cli_table3.default(_tableOptions);return table.push([{content:text,wordWrap:!0}]),table.toString()}function lineToString(line){let string="";for(let i=0;i<line.length;i++)if(i===line.length-1)string+=line[i];else{let curr=line[i],next=line[i+1];string+=curr,curr.trim()!==""&&next.trim()!==""&&(string+=" ")}return string}function outputArrayToString(outputArray){return outputArray.filter(line=>line!==null).join(NEWLINE)}var commandPaths=new WeakMap;function registerCommandPaths(roots){let visit=(command,parentPath)=>{let path=[...parentPath,command.name];commandPaths.has(command)||commandPaths.set(command,path);for(let subcommand of command.subcommands??[])visit(subcommand,path)};for(let root of roots)visit(root,[])}function getCommandPath(command,parent){let registered=commandPaths.get(command);return registered||(parent?[parent.name,command.name]:[command.name])}function buildCommandSynopsisLine(command,parent){let line=[INDENT,import_constants.LOGO,import_chalk.default.bold(import_constants.NAME)];for(let name of getCommandPath(command,parent))line.push(import_chalk.default.bold(name));let args=command.arguments.slice(0);if(args.length===0&&command.subcommands&&command.subcommands.length>0&&args.push({name:"command",required:!command.subcommands.some(subcommand=>subcommand.default)}),args.length>0)for(let argument of args){let{name}=argument;argument.multiple&&(name+=" ..."),line.push(argument.required?name:`[${name}]`)}return command.options.length>0&&line.push("[options]"),line.push(NEWLINE),lineToString(line)}function buildCommandOptionLines(commandOptions,options,sectionTitle){let filteredCommandOptions=commandOptions.filter(option=>!option.deprecated&&option.description!==void 0);if(filteredCommandOptions.length===0)return null;filteredCommandOptions.sort((a,b)=>a.name<b.name?-1:a.name>b.name?1:0);let maxWidthOfUnwrappedColumns=0,rows=[];for(let option of filteredCommandOptions){let shorthandCell=option.shorthand?`${INDENT}-${option.shorthand},`:"",longhandCell=`${INDENT}--${option.name}`;option.argument&&(longhandCell+=` <${option.argument}>`),longhandCell+=INDENT;let widthOfUnwrappedColumns=shorthandCell.length+longhandCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([shorthandCell,longhandCell,{content:option.description,wordWrap:!0}])}let finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return table.push(...rows),[`${INDENT}${import_chalk.default.dim(sectionTitle)}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join("")}function buildSubcommandLines(subcommands,options){if(!subcommands)return null;let maxWidthOfUnwrappedColumns=0,rows=[];for(let command of subcommands){if(command.hidden)continue;let nameCell=`${INDENT}${command.name}`,argsCell=INDENT;argsCell+=command.arguments.map(arg=>arg.required?arg.name:`[${arg.name}]`).join(" "),argsCell+=INDENT;let widthOfUnwrappedColumns=nameCell.length+argsCell.length;maxWidthOfUnwrappedColumns=Math.max(widthOfUnwrappedColumns,maxWidthOfUnwrappedColumns),rows.push([nameCell,argsCell,{content:command.default?`${command.description} ${import_chalk.default.bold("(default)")}`:command.description,wordWrap:!0}])}let rightMargin=INDENT.repeat(4).length,finalColumnWidth=options.columns-maxWidthOfUnwrappedColumns-rightMargin,table=new import_cli_table3.default(Object.assign({},tableOptions,{colWidths:[null,null,finalColumnWidth]}));return rows.length===0?null:(table.push(...rows),[`${INDENT}${import_chalk.default.dim("Commands")}:`,NEWLINE,NEWLINE,table.toString(),NEWLINE,NEWLINE].join(""))}function buildCommandExampleLines(command){if(!command.examples?.length)return null;let outputArray=[`${INDENT}${import_chalk.default.dim("Examples:")}`,""];for(let example of command.examples){let nameLine=[INDENT];nameLine.push(import_chalk.default.gray("-")),nameLine.push(example.name),outputArray.push(lineToString(nameLine)),outputArray.push("");let buildValueLine=value=>lineToString([INDENT,INDENT,import_chalk.default.cyan(`$ ${value}`)]);if(Array.isArray(example.value))for(let line of example.value)outputArray.push(buildValueLine(line));else outputArray.push(buildValueLine(example.value));outputArray.push("")}return outputArrayToString(outputArray)}function buildCommandDocumentationLines(command,options){if(options.omitDocumentation)return null;let documentation=command.documentation??options.parent?.documentation;return documentation?outputArrayToString([`${INDENT}${import_chalk.default.dim(`${documentation.label}:`)}`,"",lineToString([INDENT,INDENT,import_chalk.default.cyan(documentation.url)]),""]):null}function buildDescriptionLine(command,options){return`${wordWrap(command.description,options.columns)}${NEWLINE}`}function buildHelpOutput(command,options){let filteredGlobalOptions=command.disabledGlobalOptions?globalCommandOptions.filter(opt=>!command.disabledGlobalOptions?.includes(opt.name)):globalCommandOptions,outputArray=["",buildCommandSynopsisLine(command,options.parent),buildDescriptionLine(command,options),buildSubcommandLines(command.subcommands,options),buildCommandOptionLines(command.options,options,"Options"),buildCommandOptionLines(filteredGlobalOptions,options,"Global Options"),buildCommandExampleLines(command),...(command.helpSections??[]).map(section=>outputArrayToString([`${INDENT}${import_chalk.default.dim(`${section.title}:`)}`,"",...section.body.map(line=>line===""?"":wordWrap(line,options.columns)),""])),buildCommandDocumentationLines(command,options),""];return outputArrayToString(outputArray)}function help(command,options){return buildHelpOutput(command,{...options,columns:options.columns??80})}function findOption(token,options){let isLong=token.startsWith("--"),name=isLong?token.slice(2):token.slice(1);return options.find(candidate=>isLong?candidate.name===name:candidate.shorthand===name)}function subtreeOptions(command){return[...command.options,...(command.subcommands??[]).flatMap(subtreeOptions)]}function isSubcommandOf(command,token){return token!==void 0&&(command.subcommands??[]).some(subcommand=>subcommand.name===token||subcommand.aliases.includes(token))}function optionTakesValue(token,walkedOptions,command,nextToken){let walked=findOption(token,walkedOptions);if(walked)return walked.type!==Boolean;let below=findOption(token,subtreeOptions(command));if(below&&below.type!==Boolean&&!isSubcommandOf(command,nextToken))return!0;let global=findOption(token,globalCommandOptions);return global!==void 0&&global.type!==Boolean}function resolveHelpTarget(root,tokens){let command=root,ancestors=[],typedPath=[],options=[...root.options],groupArguments=0;for(let i=0;i<tokens.length;i++){let token=tokens[i];if(token==="--")break;if(token.startsWith("-")){!token.includes("=")&&optionTakesValue(token,options,command,tokens[i+1])&&i++;continue}let subcommand=command.subcommands?.find(candidate=>candidate.name===token||candidate.aliases.includes(token));if(!subcommand){if(command.argumentsBeforeSubcommand&&groupArguments<command.arguments.length){groupArguments++;continue}break}ancestors.push(command),typedPath.push(token),options.push(...subcommand.options),command=subcommand,groupArguments=0}let parent=ancestors[ancestors.length-1];for(let i=ancestors.length-1;i>=0;i--)if(ancestors[i].documentation){parent=ancestors[i];break}return{command,parent,typedPath}}export{registerCommandPaths,buildCommandDocumentationLines,help,resolveHelpTarget};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR}from"./chunk-
|
|
7
|
+
import{VERCEL_CONFIG_EXTENSIONS,VERCEL_DIR}from"./chunk-7IRKF3ZG.js";import{ConflictingConfigFiles,DeprecatedNowJson}from"./chunk-RINZXCDJ.js";import{output_manager_default,require_build_utils}from"./chunk-EWWFNMPZ.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_main=__commonJS({"../../node_modules/.pnpm/dotenv@4.0.0/node_modules/dotenv/lib/main.js"(exports,module){"use strict";var fs=__require("fs");function parse(src){var obj={};return src.toString().split(`
|
|
8
8
|
`).forEach(function(line){var keyValueArr=line.match(/^\s*([\w\.\-]+)\s*=\s*(.*)?\s*$/);if(keyValueArr!=null){var key=keyValueArr[1],value=keyValueArr[2]?keyValueArr[2]:"",len=value?value.length:0;len>0&&value.charAt(0)==='"'&&value.charAt(len-1)==='"'&&(value=value.replace(/\\n/gm,`
|
|
9
9
|
`)),value=value.replace(/(^['"]|['"]$)/g,"").trim(),obj[key]=value}}),obj}function config(options){var path=".env",encoding="utf8";options&&(options.path&&(path=options.path),options.encoding&&(encoding=options.encoding));try{var parsedObj=parse(fs.readFileSync(path,{encoding}));return Object.keys(parsedObj).forEach(function(key){process.env[key]=process.env[key]||parsedObj[key]}),{parsed:parsedObj}}catch(e){return{error:e}}}module.exports.config=config;module.exports.load=config;module.exports.parse=parse}});var import_dotenv=__toESM(require_main(),1);import{mkdir,readFile,writeFile,unlink,access}from"fs/promises";import{join,basename}from"path";import{fork}from"child_process";async function loadEsbuild(){let nativeLoader=Reflect.get(globalThis,Symbol.for("vercel.cli.loadEsbuild"));return typeof nativeLoader=="function"?nativeLoader():import("esbuild")}var import_build_utils=__toESM(require_build_utils(),1);function toRouteFormat(item){if("src"in item)return item;let{source,destination,headers,statusCode,permanent,...rest}=item,route={src:source,...rest};return destination&&(route.dest=destination),headers&&(route.headers=Object.fromEntries(headers.map(h=>[h.key,h.value]))),statusCode!==void 0?route.status=statusCode:permanent!==void 0&&(route.status=permanent?308:307),route}function normalizeConfig(config){let normalized={...config},{rewrites,redirects,headers}=normalized,allRoutes=normalized.routes||[],hasRoutes=allRoutes.length>0,hasRewrites=(rewrites?.length??0)>0,hasRedirects=(redirects?.length??0)>0,hasHeaders=(headers?.length??0)>0;function hasRouteFormat(items){return items?.some(item=>"src"in item)??!1}if(hasRoutes&&(hasRewrites||hasRedirects||hasHeaders))return normalized;let shouldConvertRewrites=hasRewrites&&hasRouteFormat(rewrites),shouldConvertRedirects=hasRedirects&&hasRouteFormat(redirects),shouldConvertHeaders=hasHeaders&&hasRouteFormat(headers);if((shouldConvertRewrites||shouldConvertRedirects||shouldConvertHeaders)&&(hasRewrites&&!shouldConvertRewrites||hasRedirects&&!shouldConvertRedirects||hasHeaders&&!shouldConvertHeaders))throw new import_build_utils.NowBuildError({code:"INVALID_VERCEL_CONFIG",message:"Transforms (e.g., requestHeaders) require the `routes` format, which cannot be used alongside `rewrites`, `redirects`, or `headers`. Move everything into the `routes` array instead.",link:"https://vercel.com/docs/projects/project-configuration#routes"});return rewrites&&shouldConvertRewrites&&(allRoutes=[...allRoutes,...rewrites.map(toRouteFormat)],delete normalized.rewrites),redirects&&shouldConvertRedirects&&(allRoutes=[...allRoutes,...redirects.map(toRouteFormat)],delete normalized.redirects),headers&&shouldConvertHeaders&&(allRoutes=[...allRoutes,...headers.map(toRouteFormat)],delete normalized.headers),allRoutes.length>0&&(normalized.routes=allRoutes.map(toRouteFormat)),normalized}async function fileExists(filePath){try{return await access(filePath),!0}catch{return!1}}async function findAllVercelConfigFiles(workPath){let foundFiles=[];for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);await fileExists(configPath)&&foundFiles.push(configPath)}return foundFiles}async function findSourceVercelConfigFile(workPath){for(let ext of VERCEL_CONFIG_EXTENSIONS){let configPath=join(workPath,`vercel.${ext}`);if(await fileExists(configPath))return basename(configPath)}let tomlPath=join(workPath,"vercel.toml");return await fileExists(tomlPath)?"vercel.toml":null}async function findVercelConfigFile(workPath){let foundFiles=await findAllVercelConfigFiles(workPath);if(foundFiles.length>1)throw new ConflictingConfigFiles(foundFiles,"Multiple vercel config files found. Please use only one configuration file.","https://vercel.com/docs/projects/project-configuration");return foundFiles[0]||null}function parseConfigLoaderError(stderr){if(!stderr.trim())return"";let moduleNotFoundMatch=stderr.match(/Error \[ERR_MODULE_NOT_FOUND\]: Cannot find package '([^']+)'/);if(moduleNotFoundMatch)return`Cannot find package '${moduleNotFoundMatch[1]}'. Make sure it's installed in your project dependencies.`;let syntaxErrorMatch=stderr.match(/SyntaxError: (.+?)(?:\n|$)/);if(syntaxErrorMatch)return`Syntax error: ${syntaxErrorMatch[1]}`;let errorMatch=stderr.match(/^(?:Error|TypeError|ReferenceError): (.+?)(?:\n|$)/m);return errorMatch?errorMatch[1]:stderr.trim()}async function compileVercelConfig(workPath){let vercelJsonPath=join(workPath,"vercel.json"),nowJsonPath=join(workPath,"now.json"),vercelTomlPath=join(workPath,"vercel.toml"),hasVercelJson=await fileExists(vercelJsonPath),hasNowJson=await fileExists(nowJsonPath),hasVercelToml=await fileExists(vercelTomlPath),vercelConfigPath=await findVercelConfigFile(workPath),vercelDir=join(workPath,VERCEL_DIR),compiledConfigPath=join(vercelDir,"vercel.json");if(hasNowJson)throw new DeprecatedNowJson(nowJsonPath);let foundConfigs=[];if(hasVercelJson&&foundConfigs.push(vercelJsonPath),hasVercelToml&&foundConfigs.push(vercelTomlPath),vercelConfigPath&&foundConfigs.push(vercelConfigPath),foundConfigs.length>1)throw new ConflictingConfigFiles(foundConfigs,`Multiple config files found: ${foundConfigs.map(f=>basename(f)).join(", ")}. Please use only one configuration method.`,"https://vercel.com/docs/projects/project-configuration");if(!vercelConfigPath&&!hasVercelToml)return hasVercelJson?{configPath:vercelJsonPath,wasCompiled:!1}:await fileExists(compiledConfigPath)?{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:await findSourceVercelConfigFile(workPath)??void 0}:{configPath:null,wasCompiled:!1};if(hasVercelToml)try{let{parse:tomlParse}=await import("smol-toml"),tomlContent=await readFile(vercelTomlPath,"utf8"),config=tomlParse(tomlContent),normalizedConfig=normalizeConfig(config);return await mkdir(vercelDir,{recursive:!0}),await writeFile(compiledConfigPath,JSON.stringify(normalizedConfig,null,2),"utf-8"),output_manager_default.debug(`Compiled ${vercelTomlPath} -> ${compiledConfigPath}`),{configPath:compiledConfigPath,wasCompiled:!0,sourceFile:"vercel.toml"}}catch(error){throw new import_build_utils.NowBuildError({code:error.code??"vercel_toml_parse_failed",message:`Failed to parse vercel.toml: ${error.message}`,link:error.link??"https://vercel.com/docs/projects/project-configuration"})}let sourceConfigPath=vercelConfigPath;(0,import_dotenv.config)({path:join(workPath,".env")}),(0,import_dotenv.config)({path:join(workPath,".env.local")});let tempOutPath=join(vercelDir,"vercel-temp.mjs"),loaderPath=join(vercelDir,"vercel-loader.mjs");try{let{build}=await loadEsbuild();await mkdir(vercelDir,{recursive:!0}),await build({entryPoints:[sourceConfigPath],bundle:!0,platform:"node",format:"esm",outfile:tempOutPath,packages:"external",target:"node20",sourcemap:"inline"}),await writeFile(loaderPath,`
|
|
10
10
|
import { pathToFileURL } from 'url';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var FID_METRIC_ID="vercel.speed_insights.fid_ms",FID_DEPRECATION_WARNING="First Input Delay will be sunset on November 1st. Use Interaction to Next Paint instead (vercel.speed_insights.inp_ms). Learn more: https://web.dev/articles/fid";function warnIfFidMetric(metric){metric===FID_METRIC_ID&&output_manager_default.print(`${import_chalk.default.yellow("!")} ${FID_DEPRECATION_WARNING}
|
|
8
|
+
`)}export{warnIfFidMetric};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{login}from"./chunk-6JU3QZ3O.js";import{loginCommand}from"./chunk-JKTQV2QJ.js";import{help}from"./chunk-
|
|
7
|
+
import{login}from"./chunk-6JU3QZ3O.js";import{loginCommand}from"./chunk-JKTQV2QJ.js";import{help}from"./chunk-UOHVKN6N.js";import{TelemetryClient}from"./chunk-MCCL762Q.js";import{printError}from"./chunk-7T4CJ6MJ.js";import{parseArguments}from"./chunk-LCWCTL6L.js";import{getFlagsSpecification}from"./chunk-PV5YI2ZZ.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);var LoginTelemetryClient=class extends TelemetryClient{trackState(...args){this.trackLoginState(...args)}};async function login2(client,options){let parsedArgs=null,flagsSpecification=getFlagsSpecification(loginCommand.options),telemetry=new LoginTelemetryClient({opts:{store:client.telemetryEventStore}});try{options.shouldParseArgs&&(parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification))}catch(error){return printError(error),1}if(parsedArgs?.flags["--help"])return telemetry.trackCliFlagHelp("login"),output_manager_default.print(help(loginCommand,{columns:client.stderr.columns})),0;if(parsedArgs?.flags["--token"])return output_manager_default.error('`--token` may not be used with the "login" command'),2;if(options.shouldParseArgs&&parsedArgs){let obsoleteFlags=Object.keys(parsedArgs.flags).filter(flag=>{let flagKey=flag.replace("--",""),option=loginCommand.options.find(o=>o.name===flagKey);if(!(!option||typeof option=="number"))return"deprecated"in option&&option.deprecated});if(obsoleteFlags.length){let flags=obsoleteFlags.map(f=>import_chalk.default.bold(f)).join(", ");output_manager_default.warn(`The following flags are deprecated: ${flags}`)}let obsoleteArguments=parsedArgs.args.slice(1);if(obsoleteArguments.length){let args=obsoleteArguments.map(a=>import_chalk.default.bold(a)).join(", ");output_manager_default.warn(`The following arguments are deprecated: ${args}`)}(obsoleteArguments.length||obsoleteFlags.length)&&output_manager_default.print(`Read more in our ${output_manager_default.link("changelog","https://vercel.com/changelog/new-vercel-cli-login-flow")}.
|
|
8
8
|
`)}return telemetry.trackState("started"),await login(client,telemetry,options.shouldParseArgs)}export{login2 as login};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{outputError}from"./chunk-FA6O7FPC.js";import{AGENT_REASON}from"./chunk-CVX5X5RI.js";import{getScope}from"./chunk-
|
|
7
|
+
import{outputError}from"./chunk-FA6O7FPC.js";import{AGENT_REASON}from"./chunk-CVX5X5RI.js";import{getScope}from"./chunk-ALXWJ7XN.js";import{getLinkedProject,getProjectByNameOrId}from"./chunk-7IRKF3ZG.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-5VWK73R6.js";import{ProjectNotFound,isAPIError}from"./chunk-RINZXCDJ.js";function emitAlertsScopeError(client,jsonOutput,code,message,agent){return outputAgentError(client,{status:"error",reason:agent.reason,message,hint:agent.hint,next:agent.next},1),outputError(client,jsonOutput,code,message)}async function resolveAlertsScope(client,opts){let command=opts.command??"alerts",projectCommand=`${command} --project <name_or_id>`,allCommand=`${command} --all`;if(opts.all||opts.project){let{team}=await getScope(client);if(!team){let msg="No team context found. Run `vercel switch` to select a team, or use `vercel link` in a project directory.";return emitAlertsScopeError(client,opts.jsonOutput,"NO_TEAM",msg,{reason:AGENT_REASON.MISSING_SCOPE,hint:"Select a team scope before using --project or --all with alerts.",next:[{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"See current user and team"},{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Switch to a team that owns the project"}]})}if(opts.all)return{teamId:team.id};let projectResult;try{projectResult=await getProjectByNameOrId(client,opts.project,team.id)}catch(err){if(isAPIError(err)){let msg=err.serverMessage||(err.status===403?`You do not have permission to access project "${opts.project}" in team "${team.slug}".`:`API error (${err.status}).`),reason=err.status===401?"not_authorized":err.status===403?"forbidden":AGENT_REASON.API_ERROR;return emitAlertsScopeError(client,opts.jsonOutput,err.code||"API_ERROR",msg,{reason,next:[{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with a project you can access (replace <name_or_id>)"}]})}throw err}if(projectResult instanceof ProjectNotFound){let msg=`Project "${opts.project}" was not found in team "${team.slug}".`;return emitAlertsScopeError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",msg,{reason:AGENT_REASON.NOT_FOUND,next:[{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with a valid project (replace <name_or_id>)"}]})}return{teamId:team.id,projectId:projectResult.id,projectName:projectResult.name}}let linkedProject=await getLinkedProject(client);if(linkedProject.status==="error")return linkedProject.exitCode;if(linkedProject.status==="not_linked"){let msg="No linked project found. Run `vercel link` to link a project, or use --project <name> or --all.";return emitAlertsScopeError(client,opts.jsonOutput,"NOT_LINKED",msg,{reason:AGENT_REASON.NOT_LINKED,hint:"Agents should pass --project or --all when no .vercel link exists in --cwd.",next:[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Link this directory to a Vercel project"},{command:buildCommandWithGlobalFlags(client.argv,projectCommand),when:"Retry with an explicit project (replace <name_or_id>)"},{command:buildCommandWithGlobalFlags(client.argv,allCommand),when:"Use team-wide scope without a linked project"}]})}return{teamId:linkedProject.org.id,projectId:linkedProject.project.id,projectName:linkedProject.project.name}}export{emitAlertsScopeError,resolveAlertsScope};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{getEnvTargetPlaceholder}from"./chunk-
|
|
7
|
+
import{getEnvTargetPlaceholder}from"./chunk-B5PFD6Q3.js";import{projectOption,yesOption}from"./chunk-PV5YI2ZZ.js";import{packageName}from"./chunk-FI772UVH.js";var buildCommand={name:"build",aliases:[],description:"Build the project.",arguments:[],options:[{name:"prod",description:"Build a production deployment",shorthand:null,type:Boolean,deprecated:!1},{name:"target",shorthand:null,type:String,argument:"TARGET",deprecated:!1,description:"Specify the target environment"},{name:"output",description:"Directory where built assets will be written to",shorthand:null,argument:"DIR",type:String,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt about pulling environment variables and project settings when not found locally"},{name:"standalone",description:"Create a standalone build with all dependencies inlined into function output folders",shorthand:null,type:Boolean,deprecated:!1},{name:"id",description:"Deployment ID to pull environment variables from (e.g. dpl_xxx)",shorthand:null,type:String,argument:"ID",deprecated:!1},projectOption],examples:[{name:"Build the project",value:`${packageName} build`},{name:"Build the project in a specific directory",value:`${packageName} build --cwd ./path-to-project`},{name:"Build with deployment-scoped environment variables",value:`${packageName} build --id dpl_xxx`}]};var pullCommand={name:"pull",aliases:[],description:"Pull Environment Variables and project settings into .vercel",arguments:[{name:"project-path",required:!1}],options:[{name:"environment",description:"Deployment environment [development]",argument:"TARGET",shorthand:null,type:String,deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",argument:"NAME",shorthand:null,type:String,deprecated:!1},{name:"prod",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip questions when setting up new project using default scope and settings"},projectOption],examples:[{name:"Pull the latest Environment Variables and Project Settings from the cloud",value:`${packageName} pull`},{name:"Pull the latest Environment Variables and Project Settings from the cloud targeting a directory",value:`${packageName} pull ./path-to-project`},{name:"Pull for a specific environment",value:`${packageName} pull --environment=${getEnvTargetPlaceholder()}`},{name:"Pull for a preview feature branch",value:`${packageName} pull --environment=preview --git-branch=feature-branch`},{name:"Pull Environment Variables into an application env file with `vercel env pull`",value:`${packageName} env pull`}]};export{buildCommand,pullCommand};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{writeProjectSettings}from"./chunk-
|
|
7
|
+
import{writeProjectSettings}from"./chunk-AKPQWZIP.js";import{autoInstallVercelPlugin}from"./chunk-MKY5IBKK.js";import{stamp_default}from"./chunk-XPXOV5UO.js";import{envPullCommandLogic}from"./chunk-4HXRTNAK.js";import{ensureLink}from"./chunk-ZQIUMXCI.js";import{pullCommand}from"./chunk-WN6OXK2F.js";import{parseTarget}from"./chunk-R3B67TKQ.js";import{help}from"./chunk-UOHVKN6N.js";import{TelemetryClient}from"./chunk-MCCL762Q.js";import{printError}from"./chunk-7T4CJ6MJ.js";import{parseArguments}from"./chunk-LCWCTL6L.js";import{VERCEL_DIR,VERCEL_DIR_PROJECT}from"./chunk-7IRKF3ZG.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{getFlagsSpecification}from"./chunk-PV5YI2ZZ.js";import{emoji,output_manager_default,prependEmoji}from"./chunk-EWWFNMPZ.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);import{join}from"node:path";var PullTelemetryClient=class extends TelemetryClient{trackCliArgumentProjectPath(value){value&&this.trackCliArgument({arg:"projectPath",value:this.redactedValue})}trackCliOptionEnvironment(environment){environment&&this.trackCliOption({option:"environment",value:this.redactedTargetName(environment)})}trackCliOptionGitBranch(gitBranch){gitBranch&&this.trackCliOption({option:"git-branch",value:this.redactedValue})}trackCliFlagProd(isProduction){isProduction&&this.trackCliFlag("prod")}trackCliFlagYes(yes){yes&&this.trackCliFlag("yes")}};async function pullAllEnvFiles(environment,client,link,flags,cwd){let environmentFile=`.env.${environment}.local`;return await envPullCommandLogic(client,join(".vercel",environmentFile),!!flags["--yes"],environment,link,flags["--git-branch"],cwd,"vercel-cli:pull"),0}async function main(client){let parsedArgs=null,flagsSpecification=getFlagsSpecification(pullCommand.options);try{parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification)}catch(error){return printError(error),1}let telemetryClient=new PullTelemetryClient({opts:{store:client.telemetryEventStore}});if(parsedArgs.flags["--help"])return telemetryClient.trackCliFlagHelp("pull"),output_manager_default.print(help(pullCommand,{columns:client.stderr.columns})),2;let cwd=parsedArgs.args[1]||client.cwd,autoConfirm=!!parsedArgs.flags["--yes"],isProduction=!!parsedArgs.flags["--prod"],environment=parseTarget({flagName:"environment",flags:parsedArgs.flags})||"development";telemetryClient.trackCliArgumentProjectPath(parsedArgs.args[1]),telemetryClient.trackCliFlagYes(autoConfirm),telemetryClient.trackCliFlagProd(isProduction),telemetryClient.trackCliOptionGitBranch(parsedArgs.flags["--git-branch"]),telemetryClient.trackCliOptionEnvironment(parsedArgs.flags["--environment"]),telemetryClient.trackCliOptionProject(parsedArgs.flags["--project"]);let returnCode=await pullCommandLogic(client,cwd,autoConfirm,environment,parsedArgs.flags,parsedArgs.flags["--project"]);return returnCode===0&&!autoConfirm&&await autoInstallVercelPlugin(client),returnCode}async function pullCommandLogic(client,cwd,autoConfirm,environment,flags,projectNameOrId){let link=await ensureLink("pull",client,cwd,{autoConfirm,pullEnv:!1,projectName:projectNameOrId,failIfNotFound:!!projectNameOrId,skipOwnerLookup:!0});if(typeof link=="number")return link;let{project,org,repoRoot}=link,currentDirectory;repoRoot?currentDirectory=join(repoRoot,project.rootDirectory||""):currentDirectory=cwd,client.config.currentTeam=org.type==="team"?org.id:void 0;let pullResultCode=await pullAllEnvFiles(environment,client,link,flags,currentDirectory);if(pullResultCode!==0)return pullResultCode;output_manager_default.print(`
|
|
8
8
|
`),output_manager_default.log("Downloading project settings"),await writeProjectSettings(currentDirectory,project,org,typeof repoRoot=="string");let settingsStamp=stamp_default();return output_manager_default.print(`${prependEmoji(`Downloaded project settings to ${import_chalk.default.bold(humanizePath(join(currentDirectory,VERCEL_DIR,VERCEL_DIR_PROJECT)))} ${import_chalk.default.gray(settingsStamp())}`,emoji("success"))}
|
|
9
9
|
`),0}function isNothing(subject){return typeof subject>"u"||subject===null}function isObject(subject){return typeof subject=="object"&&subject!==null}function toArray(sequence){return Array.isArray(sequence)?sequence:isNothing(sequence)?[]:[sequence]}function extend(target,source){var index,length,key,sourceKeys;if(source)for(sourceKeys=Object.keys(source),index=0,length=sourceKeys.length;index<length;index+=1)key=sourceKeys[index],target[key]=source[key];return target}function repeat(string,count){var result="",cycle;for(cycle=0;cycle<count;cycle+=1)result+=string;return result}function isNegativeZero(number){return number===0&&Number.NEGATIVE_INFINITY===1/number}var isNothing_1=isNothing,isObject_1=isObject,toArray_1=toArray,repeat_1=repeat,isNegativeZero_1=isNegativeZero,extend_1=extend,common={isNothing:isNothing_1,isObject:isObject_1,toArray:toArray_1,repeat:repeat_1,isNegativeZero:isNegativeZero_1,extend:extend_1};function formatError(exception2,compact){var where="",message=exception2.reason||"(unknown reason)";return exception2.mark?(exception2.mark.name&&(where+='in "'+exception2.mark.name+'" '),where+="("+(exception2.mark.line+1)+":"+(exception2.mark.column+1)+")",!compact&&exception2.mark.snippet&&(where+=`
|
|
10
10
|
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist}from"./chunk-TRTEXGVN.js";import{getDeployment}from"./chunk-C5KVTG2O.js";import{getScope}from"./chunk-
|
|
7
|
+
import{require_dist}from"./chunk-TRTEXGVN.js";import{getDeployment}from"./chunk-C5KVTG2O.js";import{getScope}from"./chunk-ALXWJ7XN.js";import{toNodeReadable}from"./chunk-MY4MONOH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import{require_ansi_escapes}from"./chunk-7HL2RPUO.js";import{__commonJS,__require,__toESM}from"./chunk-6L236MNA.js";var require_parser=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/lib/parser.js"(exports,module){var Transform=__require("stream").Transform;function Parser(options){if(!(this instanceof Parser))throw new TypeError("Cannot call a class as a function");options=options||{},Transform.call(this,{objectMode:!0}),this._memory="",this._emitInvalidLines=options.emitInvalidLines||!1}Parser.prototype=Object.create(Transform.prototype);Parser.prototype._handleLines=function(lines,cb){for(var i=0;i<lines.length;i++)if(lines[i]!==""){var err=null,json=null;try{json=JSON.parse(lines[i])}catch(_err){_err.source=lines[i],err=_err}if(err)if(this._emitInvalidLines)this.emit("invalid-line",err);else return cb(err);else this.push(json)}cb(null)};Parser.prototype._transform=function(chunk,encoding,cb){var lines=(this._memory+chunk.toString()).split(`
|
|
8
8
|
`);this._memory=lines.pop(),this._handleLines(lines,cb)};Parser.prototype._flush=function(cb){if(!this._memory)return cb(null);var line=this._memory;this._memory="",this._handleLines([line],cb)};module.exports=Parser}});var require_stringifier=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/lib/stringifier.js"(exports,module){var Transform=__require("stream").Transform;function Stringifier(){if(!(this instanceof Stringifier))throw new TypeError("Cannot call a class as a function");Transform.call(this,{objectMode:!0})}Stringifier.prototype=Object.create(Transform.prototype);Stringifier.prototype._transform=function(data,_,cb){var value;try{value=JSON.stringify(data)}catch(err){return err.source=data,cb(err)}cb(null,value+`
|
|
9
9
|
`)};module.exports=Stringifier}});var require_jsonlines=__commonJS({"../../node_modules/.pnpm/jsonlines@0.1.1/node_modules/jsonlines/index.js"(exports){var Parser=require_parser(),Stringifier=require_stringifier();exports.parse=function(options){return new Parser(options)};exports.stringify=function(){return new Stringifier}}});var import_async_retry=__toESM(require_dist(),1),import_jsonlines=__toESM(require_jsonlines(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);import{URLSearchParams}from"url";async function printEvents(client,urlOrDeploymentId,{mode,onEvent,onAliasAssigned,quiet,findOpts},abortController){let{log,debug}=output_manager_default,scope=mode==="deploy"?await getScope(client):null,o=0;await(0,import_async_retry.default)(async(bail,attemptNumber)=>{attemptNumber>1&&debug("Retrying events");let query=new URLSearchParams({direction:findOpts.direction,follow:findOpts.follow?"1":"",format:"lines"});findOpts.limit&&query.set("limit",String(findOpts.limit)),findOpts.since&&query.set("since",String(findOpts.since)),findOpts.until&&query.set("until",String(findOpts.until));let eventsUrl=`/v3/now/deployments/${urlOrDeploymentId}/events?${query}`;try{let eventsRes=await client.fetch(eventsUrl,{json:!1,signal:abortController?.signal});if(eventsRes.ok){let readable=toNodeReadable(eventsRes.body);return new Promise((resolve,reject)=>{let stream=readable.pipe(import_jsonlines.default.parse()),poller;mode==="deploy"&&(poller=function startPoller(){return setTimeout(async()=>{try{if((await getDeployment(client,scope.contextName,urlOrDeploymentId)).readyState==="READY"){stream.end(),finish();return}poller=startPoller()}catch(err2){stream.end(),finish(err2)}},5e3)}());let finishCalled=!1;function finish(err2){finishCalled||(finishCalled=!0,clearTimeout(poller),err2?reject(err2):resolve())}let latestLogDate=0,onData=data=>{if(data.type==="alias-assigned"){data.deploymentId===urlOrDeploymentId&&onAliasAssigned?.(data);return}let{event,payload,date}=data;event==="state"&&payload.value==="READY"?mode==="deploy"&&(stream.end(),finish()):(latestLogDate=Math.max(latestLogDate,date),onEvent(data))},onErrorCalled=!1,onError=err2=>{if(finishCalled||onErrorCalled)return;if(err2.name==="AbortError"){finish();return}onErrorCalled=!0,o++;let errorMessage=`Deployment event stream error: ${err2.message}`;if(!findOpts.follow){log(errorMessage);return}debug(errorMessage),clearTimeout(poller),stream.destroy(err2);let retryFindOpts={...findOpts,since:latestLogDate},retryTimeout=setTimeout(()=>{abortController?.signal.removeEventListener("abort",onAbort),!abortController?.signal.aborted&&printEvents(client,urlOrDeploymentId,{mode,onEvent,onAliasAssigned,quiet,findOpts:retryFindOpts},abortController).then(resolve,reject)},2e3),onAbort=()=>{clearTimeout(retryTimeout),finish()};abortController?.signal.addEventListener("abort",onAbort,{once:!0})};stream.on("end",finish),stream.on("data",onData),stream.on("error",onError),readable.on("error",onError)})}let err=new Error(`Deployment events status ${eventsRes.status}`);if(eventsRes.status<500)bail(err);else throw err}catch(err){if(err instanceof Error&&err.name==="AbortError")return;throw err}},{retries:4,unref:!!onAliasAssigned,onRetry:err=>{!quiet&&o&&(process.stdout.write((0,import_ansi_escapes.eraseLines)(o+1)),o=0),log(`Deployment events polling error: ${err.message}`)}})}var events_default=printEvents;export{require_jsonlines,events_default};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{printProjectNotFoundError}from"./chunk-
|
|
7
|
+
import{printProjectNotFoundError}from"./chunk-LCY4SULE.js";import{param}from"./chunk-SXUEGVWB.js";import{detectExplicitScope}from"./chunk-ALXWJ7XN.js";import{getLinkedProject,resolveProjectCwd}from"./chunk-7IRKF3ZG.js";import{buildCommandWithYes,outputActionRequired}from"./chunk-5VWK73R6.js";import{getCommandName,getCommandNamePlain}from"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};async function ensureLink(commandName,client,cwd,opts={}){cwd=await resolveProjectCwd(cwd);let link=opts.link,nonInteractive=opts.nonInteractive??client.nonInteractive??!1;if(opts.nonInteractive=nonInteractive,link||(opts.forceDelete?link={status:"not_linked",org:null,project:null}:link=await getLinkedProject(client,{cwd,projectName:opts.projectName,projectNameIsExplicit:!!(opts.projectName&&opts.failIfNotFound),scopeIsExplicit:detectExplicitScope(client),allowOwnerLookupFallback:opts.allowOwnerLookupFallback,skipOwnerLookup:opts.skipOwnerLookup,skipRemoteLookup:opts.skipRemoteLookup}),opts.link=link),link.status==="linked"&&opts.forceDelete||link.status==="not_linked"){if(link.status==="not_linked"&&opts.failIfNotFound&&opts.projectName)return await printProjectNotFoundError(client,opts.projectName,commandName,link.orgId),1;if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-H4P3FZB3.js");if(link=await setupAndLink(client,cwd,opts),link.status==="not_linked")return 0}return link.status==="error"?(link.reason==="HEADLESS"&&(nonInteractive?outputActionRequired(client,{status:"action_required",reason:"confirmation_required",message:`Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"Confirm and run"}]},link.exitCode):output_manager_default.error(`Command ${getCommandName(commandName)} requires confirmation. Use option ${param("--yes")} to confirm.`)),nonInteractive&&process.exit(link.exitCode),link.exitCode):link}export{parseEnv,ensureLink};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{repositoryPermissionsClearPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrJsonOutput}from"./chunk-
|
|
7
|
+
import{repositoryPermissionsClearPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrJsonOutput}from"./chunk-PTFKU33G.js";import"./chunk-FA6O7FPC.js";import"./chunk-HWWHR7H3.js";import"./chunk-2I64AYHG.js";import"./chunk-D4MW3RDW.js";import{AGENT_REASON}from"./chunk-CVX5X5RI.js";import{permissionsClearSubcommand}from"./chunk-2RQFMCPJ.js";import"./chunk-SOJCELXH.js";import"./chunk-ALXWJ7XN.js";import"./chunk-QTKJC2O5.js";import"./chunk-CQ3RAERR.js";import"./chunk-RCTYVKM5.js";import"./chunk-GHM7V3GG.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-7T4CJ6MJ.js";import{parseArguments}from"./chunk-LCWCTL6L.js";import"./chunk-MY4MONOH.js";import"./chunk-7IRKF3ZG.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-BRK4OB4B.js";import{buildCommandWithYes,outputAgentError}from"./chunk-5VWK73R6.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-PV5YI2ZZ.js";import"./chunk-YMM3VY3J.js";import"./chunk-SM5JI6QM.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-RINZXCDJ.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";async function clear(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsClearSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr permissions <repository> clear"),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],project=parsedArgs.flags["--project"],skipConfirmation=!!parsedArgs.flags["--yes"];telemetry.trackCliOptionProject(project),telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);let missingRepository=requireVcrRepository(client,repository,fr.jsonOutput,"vcr permissions <repository> clear");if(typeof missingRepository=="number")return missingRepository;let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;if(!skipConfirmation&&(outputAgentError(client,{status:"error",reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:"Clearing repository permissions removes access for every team. Re-run with --yes.",next:[{command:buildCommandWithYes(client.argv)}]},1),!await client.input.confirm(`Remove access to ${repository} for all teams? They will no longer be able to pull its images.`,!1)))return output_manager_default.log("Canceled"),0;let path=repositoryPermissionsClearPath(scope,repository);output_manager_default.spinner("Clearing repository permissions...");try{return await client.fetch(path,{method:"DELETE"}),fr.jsonOutput?client.stdout.write(`${JSON.stringify({repository,cleared:!0},null,2)}
|
|
8
8
|
`):output_manager_default.success(`Cleared repository permissions for ${repository}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput);throw err}finally{output_manager_default.stopSpinner()}}export{clear as default};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{compileVercelConfig,findSourceVercelConfigFile,getVercelConfigPath,normalizeConfig}from"./chunk-
|
|
7
|
+
import{compileVercelConfig,findSourceVercelConfigFile,getVercelConfigPath,normalizeConfig}from"./chunk-UWO3M2L2.js";import{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_CONFIG_EXTENSIONS}from"./chunk-7IRKF3ZG.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-YMM3VY3J.js";import"./chunk-SM5JI6QM.js";import"./chunk-VOZEB6PD.js";import"./chunk-RINZXCDJ.js";import"./chunk-FI772UVH.js";import"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";export{DEFAULT_VERCEL_CONFIG_FILENAME,VERCEL_CONFIG_EXTENSIONS,compileVercelConfig,findSourceVercelConfigFile,getVercelConfigPath,normalizeConfig};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{repositoryPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrChoice,validateVcrJsonOutput}from"./chunk-
|
|
7
|
+
import{repositoryPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrChoice,validateVcrJsonOutput}from"./chunk-PTFKU33G.js";import{outputError}from"./chunk-FA6O7FPC.js";import"./chunk-HWWHR7H3.js";import"./chunk-2I64AYHG.js";import"./chunk-D4MW3RDW.js";import{AGENT_REASON}from"./chunk-CVX5X5RI.js";import{configSubcommand}from"./chunk-D5VTBRWF.js";import"./chunk-2RQFMCPJ.js";import"./chunk-NT67T6DL.js";import"./chunk-NESZV33T.js";import"./chunk-SOJCELXH.js";import"./chunk-ALXWJ7XN.js";import"./chunk-QTKJC2O5.js";import"./chunk-CQ3RAERR.js";import"./chunk-RCTYVKM5.js";import"./chunk-GHM7V3GG.js";import"./chunk-5XJNPXQK.js";import{printError}from"./chunk-7T4CJ6MJ.js";import{parseArguments}from"./chunk-LCWCTL6L.js";import"./chunk-MY4MONOH.js";import"./chunk-7IRKF3ZG.js";import"./chunk-F2ZWW2IO.js";import"./chunk-B4ATVYZW.js";import"./chunk-PPCFQQSU.js";import"./chunk-BRK4OB4B.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-5VWK73R6.js";import"./chunk-BKV35LVB.js";import{getFlagsSpecification}from"./chunk-PV5YI2ZZ.js";import"./chunk-YMM3VY3J.js";import"./chunk-SM5JI6QM.js";import"./chunk-VOZEB6PD.js";import{isAPIError}from"./chunk-RINZXCDJ.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var USAGE="vcr config <repository> --public <true|false>";async function config(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(configSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),1}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],project=parsedArgs.flags["--project"],publicValue=parsedArgs.flags["--public"],invalidChoice=validateVcrChoice(client,"--public",publicValue,["true","false"],fr.jsonOutput);if(typeof invalidChoice=="number")return invalidChoice;telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),telemetry.trackCliOptionPublic(publicValue);let missingRepository=requireVcrRepository(client,repository,fr.jsonOutput,USAGE);if(typeof missingRepository=="number")return missingRepository;if(publicValue===void 0){let message="Missing a setting to change. Pass --public true to make the repository public, or --public false to make it private.";return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Re-run with --public true or --public false"}]},1),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",message)}let desiredPublic=publicValue==="true",scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPath(scope,repository);output_manager_default.spinner("Updating repository...");try{let updated=await client.fetch(path,{method:"PATCH",body:{public:desiredPublic}});if(fr.jsonOutput)client.stdout.write(`${JSON.stringify(updated,null,2)}
|
|
8
8
|
`);else{let isPublic=updated.repository?.public??desiredPublic;output_manager_default.success(`Repository ${updated.repository?.name??repository} is now ${isPublic?"public":"private"}`)}return 0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List repositories to confirm the name or id"}});throw err}finally{output_manager_default.stopSpinner()}}export{config as default};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{getSubcommand}from"./chunk-ETV3C2CV.js";import{getCommandAliases}from"./chunk-
|
|
7
|
+
import{getSubcommand}from"./chunk-ETV3C2CV.js";import{getCommandAliases}from"./chunk-ADDXKC3J.js";import{tracesCommand}from"./chunk-LHQUNL52.js";import{lsSubcommand,rmSubcommand,setSubcommand,tracesConfigCommand}from"./chunk-3R66O72V.js";import"./chunk-D5VTBRWF.js";import"./chunk-2RQFMCPJ.js";import"./chunk-NT67T6DL.js";import"./chunk-NESZV33T.js";import"./chunk-RFWCEREA.js";import"./chunk-KOSM3DYE.js";import"./chunk-7JFK53D4.js";import"./chunk-RVKOPGOI.js";import"./chunk-HVROAV4B.js";import"./chunk-JRU6AGXG.js";import"./chunk-W7PVS44H.js";import"./chunk-7I23VXBQ.js";import"./chunk-JKTQV2QJ.js";import"./chunk-WN6OXK2F.js";import"./chunk-C3XFIO5L.js";import"./chunk-FAW6NBLQ.js";import"./chunk-B5PFD6Q3.js";import"./chunk-S2LBGLRE.js";import{help}from"./chunk-UOHVKN6N.js";import"./chunk-6TAQ6OWD.js";import{TelemetryClient}from"./chunk-MCCL762Q.js";import"./chunk-RCTYVKM5.js";import"./chunk-7T6TL3GQ.js";import"./chunk-F2ZWW2IO.js";import"./chunk-BRK4OB4B.js";import"./chunk-WPS6JZF6.js";import"./chunk-OSCCYU74.js";import"./chunk-PV5YI2ZZ.js";import"./chunk-FI772UVH.js";import{output_manager_default}from"./chunk-EWWFNMPZ.js";import"./chunk-QGIQK47P.js";import"./chunk-AVSPFBLM.js";import"./chunk-XCJDGQO7.js";import"./chunk-YPTLSODC.js";import"./chunk-7HL2RPUO.js";import"./chunk-U7KCDTCH.js";import"./chunk-N3ZZ7FHQ.js";import"./chunk-GU6VIFR5.js";import"./chunk-6L236MNA.js";var TracesConfigTelemetryClient=class extends TelemetryClient{trackCliSubcommandLs(actual){this.trackCliSubcommand({subcommand:"ls",value:actual})}trackCliSubcommandSet(actual){this.trackCliSubcommand({subcommand:"set",value:actual})}trackCliSubcommandRm(actual){this.trackCliSubcommand({subcommand:"rm",value:actual})}};var COMMAND_CONFIG={ls:getCommandAliases(lsSubcommand),set:getCommandAliases(setSubcommand),rm:getCommandAliases(rmSubcommand)},SUBCOMMAND_METADATA={ls:lsSubcommand,set:setSubcommand,rm:rmSubcommand};async function config(client,{args,needHelp,subcommandOriginal,telemetry}){let{subcommand:action,subcommandOriginal:actionOriginal}=getSubcommand(args,COMMAND_CONFIG),actionMetadata=typeof action=="string"?SUBCOMMAND_METADATA[action]:void 0;function printHelp(command){return output_manager_default.print(help(command,{parent:tracesCommand,columns:client.stderr.columns})),needHelp?0:2}if(needHelp)return telemetry.trackCliFlagHelp("traces",subcommandOriginal),printHelp(actionMetadata||tracesConfigCommand);telemetry.trackCliSubcommandConfig(subcommandOriginal);let configTelemetry=new TracesConfigTelemetryClient({opts:{store:client.telemetryEventStore}});switch(action){case"ls":return configTelemetry.trackCliSubcommandLs(actionOriginal),(await import("./ls-XIJ4CY2N.js")).default(client);case"set":return configTelemetry.trackCliSubcommandSet(actionOriginal),(await import("./set-5D7C6HMZ.js")).default(client);case"rm":return configTelemetry.trackCliSubcommandRm(actionOriginal),(await import("./rm-ETLZ75RJ.js")).default(client);default:return printHelp(tracesConfigCommand)}}export{config as default};
|