vercel 64.1.0 → 64.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-GEAC4RAQ.js → add-IATD2WUV.js} +1 -1
- package/dist/chunks/{add-XZJ4G2MM.js → add-UPXURHDI.js} +1 -1
- package/dist/chunks/{add-JH6ALI3H.js → add-WVK3AP46.js} +1 -1
- package/dist/chunks/{build-3T6EUCCK.js → build-JOGD3ZEF.js} +1 -1
- package/dist/chunks/{chunk-RZGWCQP7.js → chunk-2FHICLHJ.js} +1 -1
- package/dist/chunks/{chunk-AG5QQNJ3.js → chunk-2UMWTCY7.js} +1 -1
- package/dist/chunks/{chunk-OZ47SVXA.js → chunk-3EU7MN5M.js} +1 -1
- package/dist/chunks/{chunk-37QGCN6P.js → chunk-3GSGG4YR.js} +1 -1
- package/dist/chunks/{chunk-SD757OFS.js → chunk-4BS552UW.js} +1 -1
- package/dist/chunks/{chunk-NJINP2WU.js → chunk-4GL254L4.js} +1 -1
- package/dist/chunks/{chunk-RFEREQPS.js → chunk-4IIRQJUW.js} +1 -1
- package/dist/chunks/{chunk-KELSPU2J.js → chunk-4TTF5E5U.js} +3 -3
- package/dist/chunks/{chunk-Z6UFAIEX.js → chunk-4VEK7DEH.js} +1 -1
- package/dist/chunks/{chunk-UBKETNGO.js → chunk-5JEU6QSM.js} +1 -1
- package/dist/chunks/{chunk-NFJPCOTV.js → chunk-7BOCT55A.js} +1 -1
- package/dist/chunks/{chunk-67NNB6S6.js → chunk-7C6BXZCV.js} +1 -1
- package/dist/chunks/{chunk-DW3TSGVC.js → chunk-AKM22FBX.js} +1 -1
- package/dist/chunks/chunk-BTCKMXWW.js +7 -0
- package/dist/chunks/{chunk-MYCQIZU6.js → chunk-CN3IVZJO.js} +1 -1
- package/dist/chunks/{chunk-Z4OH72VZ.js → chunk-CRQDQNQZ.js} +1 -1
- package/dist/chunks/chunk-EEZLBOSP.js +14 -0
- package/dist/chunks/{chunk-WHVT7UXE.js → chunk-EF3YL2R7.js} +1 -1
- package/dist/chunks/{chunk-AR5T62PK.js → chunk-EKUHN42H.js} +1 -1
- package/dist/chunks/{chunk-JESE5FPO.js → chunk-FGNMYSLD.js} +2 -2
- package/dist/chunks/{chunk-JAQM6UXY.js → chunk-FTY4BCAF.js} +1 -1
- package/dist/chunks/{chunk-IDGWQE4B.js → chunk-GSVOI5LW.js} +1 -1
- package/dist/chunks/{chunk-ZMBDYOVN.js → chunk-GUJVJKO7.js} +1 -1
- package/dist/chunks/{chunk-M7GT3ZPT.js → chunk-GVVIFYQE.js} +1 -1
- package/dist/chunks/{chunk-R5K37TXM.js → chunk-I62UUYTS.js} +1 -1
- package/dist/chunks/{chunk-JJSDRKX4.js → chunk-IRJ5XFT2.js} +2 -2
- package/dist/chunks/{chunk-QJKJBD2M.js → chunk-ITKS32PG.js} +1 -1
- package/dist/chunks/{chunk-THSHYFA6.js → chunk-J3CDVZE7.js} +1 -1
- package/dist/chunks/{chunk-UFXKCETS.js → chunk-J6O6JW2K.js} +1 -1
- package/dist/chunks/{chunk-PJMVU4JC.js → chunk-KLYIX4HK.js} +3 -3
- package/dist/chunks/{chunk-QYDG63GL.js → chunk-KUGY5FIM.js} +1 -1
- package/dist/chunks/{chunk-JLXG2XWW.js → chunk-LD5U73LA.js} +1 -1
- package/dist/chunks/{chunk-MJD6WHG4.js → chunk-LLPIBKFX.js} +1 -1
- package/dist/chunks/{chunk-5IPBCD7K.js → chunk-MI7W4QMV.js} +1 -1
- package/dist/chunks/{chunk-YNIW7DTL.js → chunk-N5D4455C.js} +1 -1
- package/dist/chunks/{chunk-ASU72O2R.js → chunk-N6ECEBHG.js} +1 -1
- package/dist/chunks/{chunk-ELI3L2UX.js → chunk-NBABZO3A.js} +1 -1
- package/dist/chunks/{chunk-YCXZZSW6.js → chunk-O7JMHULU.js} +1 -1
- package/dist/chunks/{chunk-XXDVZWWM.js → chunk-OLWE4UFC.js} +1 -1
- package/dist/chunks/{chunk-FIIHB66A.js → chunk-PAN6TUTQ.js} +1 -1
- package/dist/chunks/chunk-Q5ZGA2RO.js +7 -0
- package/dist/chunks/{chunk-ZKDWPKO2.js → chunk-QDOYNWNQ.js} +1 -1
- package/dist/chunks/{chunk-UDQYOGSQ.js → chunk-QL3IYPBV.js} +1 -1
- package/dist/chunks/chunk-RIDPB64C.js +10 -0
- package/dist/chunks/{chunk-WLK5BBNP.js → chunk-SGXN7SMU.js} +1 -1
- package/dist/chunks/{chunk-OGCVOINQ.js → chunk-SQB4T5FL.js} +1 -1
- package/dist/chunks/{chunk-YI5G2A3V.js → chunk-SRAC7DI4.js} +1 -1
- package/dist/chunks/{chunk-MFIVZXHH.js → chunk-THZR6O2M.js} +1 -1
- package/dist/chunks/{chunk-S7XZC23O.js → chunk-TPVAPVQC.js} +1 -1
- package/dist/chunks/{chunk-G6B6TVAE.js → chunk-TWKII7HO.js} +1 -1
- package/dist/chunks/{chunk-5VWJIYJE.js → chunk-TY4PMK7Y.js} +1 -1
- package/dist/chunks/{chunk-GRTIWUV2.js → chunk-UCAE5Z5L.js} +1 -1
- package/dist/chunks/{chunk-L5FUUGYX.js → chunk-UGMTKOTN.js} +1 -1
- package/dist/chunks/{chunk-WQIGKVBV.js → chunk-UJUNGWSD.js} +1 -1
- package/dist/chunks/{chunk-BAJDLMZS.js → chunk-VURCIZKT.js} +1 -1
- package/dist/chunks/chunk-W3TGCMRW.js +9 -0
- package/dist/chunks/{chunk-VM6TZGLE.js → chunk-WE3ZJX7P.js} +1 -1
- package/dist/chunks/{chunk-KAJM2NEI.js → chunk-WIAAACUI.js} +1 -1
- package/dist/chunks/{chunk-FWFTX2WE.js → chunk-WVJYKHGZ.js} +1 -1
- package/dist/chunks/{chunk-7YRPMVZK.js → chunk-WW4VUFHJ.js} +1 -1
- package/dist/chunks/{chunk-J53D7SLS.js → chunk-WZ7YJDKT.js} +1 -1
- package/dist/chunks/{chunk-OJZEOWK2.js → chunk-X65QKYDM.js} +1 -1
- package/dist/chunks/{chunk-FBJWLH2A.js → chunk-XSVF2CZM.js} +1 -1
- package/dist/chunks/{chunk-2JBVMF2Y.js → chunk-Y24OSBXP.js} +1 -1
- package/dist/chunks/{chunk-JNPG7MVL.js → chunk-YDM2PMMP.js} +1 -1
- package/dist/chunks/{chunk-VRWPRZJY.js → chunk-YO4VLAB7.js} +1 -1
- package/dist/chunks/{chunk-4ZICRXI5.js → chunk-YP46QVEI.js} +1 -1
- package/dist/chunks/{chunk-3AVG55SO.js → chunk-ZBDLYNUF.js} +1 -1
- package/dist/chunks/{clear-XCZCETRU.js → clear-FNH7KUCF.js} +1 -1
- package/dist/chunks/{compile-vercel-config-NQKOGOPH.js → compile-vercel-config-4LNHE3YV.js} +1 -1
- package/dist/chunks/{config-CIM647OM.js → config-JEHKUQMZ.js} +1 -1
- package/dist/chunks/{config-P42IQJDF.js → config-W3TVZPSK.js} +1 -1
- package/dist/chunks/{delete-MVJ3NENU.js → delete-HCZA6EVL.js} +1 -1
- package/dist/chunks/{delete-KJMVCQ7C.js → delete-LV744KVD.js} +1 -1
- package/dist/chunks/{detect-services-UYQZT6MU.js → detect-services-TVZ4HYVB.js} +1 -1
- package/dist/chunks/{disable-666GPFHE.js → disable-N7WZSMD4.js} +1 -1
- package/dist/chunks/{discard-RUQPJMOG.js → discard-2DN52DNW.js} +1 -1
- package/dist/chunks/{edit-NRJCMP4B.js → edit-CALU7PMG.js} +1 -1
- package/dist/chunks/{edit-IIM7GKC2.js → edit-MGJWXNFV.js} +1 -1
- package/dist/chunks/{enable-FVXIP7NX.js → enable-7GKPLJNR.js} +1 -1
- package/dist/chunks/{export-VPGLK5KL.js → export-BSOJAVDV.js} +1 -1
- package/dist/chunks/{future-MDYFVS3M.js → future-OV5I5HWT.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-MWXVKKFQ.js → generate-cert-for-deploy-GKQRQ3ZQ.js} +1 -1
- package/dist/chunks/{image-URNV2ABR.js → image-NMQWZBTW.js} +1 -1
- package/dist/chunks/{import-builders-FC5ESQ34.js → import-builders-WLKZNPTB.js} +1 -1
- package/dist/chunks/{inspect-6KZERH2F.js → inspect-LF3DIZZ2.js} +1 -1
- package/dist/chunks/{inspect-LYGYBYV3.js → inspect-LZJ5X3PH.js} +1 -1
- package/dist/chunks/{inspect-OBNVJRYC.js → inspect-PV6VVAN6.js} +1 -1
- package/dist/chunks/{inspect-G5NDWTDB.js → inspect-UEDFNY5H.js} +1 -1
- package/dist/chunks/{inspect-P4XEVJW5.js → inspect-V7M3GSZ7.js} +1 -1
- package/dist/chunks/{list-ICJMKLOR.js → list-64R2DNZA.js} +1 -1
- package/dist/chunks/{list-5YBZG374.js → list-AFVTD43R.js} +1 -1
- package/dist/chunks/{list-AV5CMKBK.js → list-QTTCSTZA.js} +1 -1
- package/dist/chunks/{login-SUBW6IFU.js → login-OS6DZT32.js} +1 -1
- package/dist/chunks/{login-5VKAY2R5.js → login-SKIDVUB7.js} +1 -1
- package/dist/chunks/{logs-BJL37R5U.js → logs-6AXWBF4D.js} +1 -1
- package/dist/chunks/{ls-TXKT6RCY.js → ls-5TZIOB3Q.js} +1 -1
- package/dist/chunks/{ls-AKUJ4VUV.js → ls-723HTK5U.js} +1 -1
- package/dist/chunks/{ls-VEWJPLJC.js → ls-A5A3APRI.js} +1 -1
- package/dist/chunks/{ls-3Y2X26EY.js → ls-EADWIBEQ.js} +1 -1
- package/dist/chunks/{ls-SOTQGCPD.js → ls-UP6KDPCD.js} +1 -1
- package/dist/chunks/{ls-QGJPVPLK.js → ls-WSPWJDWP.js} +1 -1
- package/dist/chunks/{ls-EJ4THXVR.js → ls-YPQ3CTTN.js} +1 -1
- package/dist/chunks/{mutate-Y4KO4NAJ.js → mutate-WHVA5NTT.js} +1 -1
- package/dist/chunks/{notifications-J3SMCQX5.js → notifications-I4PKIOYY.js} +1 -1
- package/dist/chunks/{open-COGMMSHS.js → open-SV3USET3.js} +1 -1
- package/dist/chunks/{openapi-TP6GEZGZ.js → openapi-NZJ6Q5Y2.js} +1 -1
- package/dist/chunks/{permissions-43WFISAY.js → permissions-3ZMQVJAQ.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-5AQVXSFB.js → prompt-missing-credentials-44DQQXOI.js} +1 -1
- package/dist/chunks/{publish-4NSLHSHF.js → publish-EDLEZCAF.js} +1 -1
- package/dist/chunks/{pull-MS2PVQUV.js → pull-5DQNSJCA.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-S43PVX5Y.js → purchase-domain-if-available-R3YQ2TFP.js} +1 -1
- package/dist/chunks/{push-2NBXVOX2.js → push-6O3JAFDA.js} +1 -1
- package/dist/chunks/{query-DI4FF2ZM.js → query-MYKQOBG3.js} +1 -1
- package/dist/chunks/{reauthenticate-Z62FFYZH.js → reauthenticate-3UH4WWKC.js} +1 -1
- package/dist/chunks/{reorder-P4AXRPMF.js → reorder-IU6GZK4H.js} +1 -1
- package/dist/chunks/{reply-ULZRH7KA.js → reply-FG74YRJ3.js} +1 -1
- package/dist/chunks/{resolve-3IS44LUW.js → resolve-MD3PGOME.js} +1 -1
- package/dist/chunks/{resolve-agent-team-DDBPICVE.js → resolve-agent-team-X6GPGGDR.js} +1 -1
- package/dist/chunks/{restore-WM4EZHD4.js → restore-7KOACNT7.js} +1 -1
- package/dist/chunks/{rm-C455A2EH.js → rm-CSIBWFYG.js} +1 -1
- package/dist/chunks/{rm-TRMBM6DD.js → rm-HOE3GJAB.js} +1 -1
- package/dist/chunks/{rm-4XX3UUUF.js → rm-JRAF4TPV.js} +1 -1
- package/dist/chunks/{rm-7Z6GJ4O2.js → rm-SKKBN7LZ.js} +1 -1
- package/dist/chunks/{rm-53YK7N2N.js → rm-ZF2F2ZE3.js} +1 -1
- package/dist/chunks/{rule-inspect-FMZTPH3S.js → rule-inspect-NICYVQPY.js} +1 -1
- package/dist/chunks/{rules-K7XMFMXG.js → rules-NHACEVVC.js} +1 -1
- package/dist/chunks/{schema-5R44NJNE.js → schema-3XLZGVH5.js} +1 -1
- package/dist/chunks/{schema-PQZAACV2.js → schema-ZJASGDRI.js} +1 -1
- package/dist/chunks/{select-org-GGUGYGDL.js → select-org-XVAGUP4V.js} +1 -1
- package/dist/chunks/{set-SZPCOILW.js → set-JOSIBICX.js} +1 -1
- package/dist/chunks/{setup-and-link-OAS7PYL6.js → setup-and-link-7GIAMCTM.js} +1 -1
- package/dist/chunks/{tags-YS7EQDJY.js → tags-LVP4LVHL.js} +1 -1
- package/dist/chunks/{types-FK3W7A2Y.js → types-YEYQERHE.js} +1 -1
- package/dist/chunks/{update-QVYTOT35.js → update-HPEVXFST.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 +2 -2
- 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 +73 -63
- package/dist/index.js +2 -2
- package/dist/internal-build.js +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +24 -24
- package/dist/chunks/chunk-AU42HSQ3.js +0 -7
- package/dist/chunks/chunk-CSIUJLB7.js +0 -9
- package/dist/chunks/chunk-FLQJAP2A.js +0 -14
- package/dist/chunks/chunk-FZIRYAXC.js +0 -10
- package/dist/chunks/chunk-QC47UKDR.js +0 -7
|
@@ -1,10 +0,0 @@
|
|
|
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{getGlobalFlagsFromArgs,stripSensitiveAuthArgs,suggestionFlagTakesSeparateValue}from"./chunk-5IPBCD7K.js";import{teamCache}from"./chunk-2VBFQZ72.js";import{LinkRequiredError,ProjectNotFound,isAPIError}from"./chunk-YIIPBH2D.js";import{getCommandName,packageName}from"./chunk-JESNVRVR.js";import{recordCliError}from"./chunk-75IAMKGV.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{pkg_default}from"./chunk-OO572JUC.js";import{__toESM}from"./chunk-BZENIQ7N.js";function quoteArg(value){return/^[A-Za-z0-9_./@:-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}var AGENT_STATUS={ERROR:"error",ACTION_REQUIRED:"action_required",OK:"ok"},AGENT_REASON={MISSING_ARGUMENTS:"missing_arguments",INVALID_ARGUMENTS:"invalid_arguments",CONFIRMATION_REQUIRED:"confirmation_required",INTERACTIVE_CONFIRMATION_REQUIRED:"interactive_confirmation_required",LOGIN_REQUIRED:"login_required",PROJECT_SETTINGS_REQUIRED:"project_settings_required",NOT_LINKED:"not_linked",NOT_FOUND:"not_found",PROJECT_NOT_FOUND:"project_not_found",MISSING_SCOPE:"missing_scope",SCOPE_NOT_ACCESSIBLE:"scope_not_accessible",AGENT_CANNOT_SWITCH:"agent_cannot_switch",API_ERROR:"api_error",RATE_LIMITED:"rate_limited",SEGMENT_IN_USE:"segment_in_use",ENTITY_IN_USE:"entity_in_use",MISSING_REQUIREMENTS:"missing_requirements",MISSING_NAME:"missing_name",MISSING_VALUE:"missing_value",MISSING_ENVIRONMENT:"missing_environment",ENV_NOT_FOUND:"env_not_found",MULTIPLE_ENVS:"multiple_envs",ENV_FILE_EXISTS:"env_file_exists",GIT_BRANCH_REQUIRED:"git_branch_required",ENV_KEY_SENSITIVE:"env_key_sensitive",AMBIGUOUS_ROUTE:"ambiguous_route",ROUTE_CREATE_FAILED:"route_create_failed",ROUTE_GENERATION_FAILED:"route_generation_failed",DOMAIN_NOT_FOUND:"domain_not_found",PRICE_CHANGED:"price_changed",CONFLICT:"conflict",DOMAIN_NOT_AVAILABLE:"domain_not_available",TLD_NOT_SUPPORTED:"tld_not_supported",PAYMENT_FAILED:"payment_failed",UNKNOWN_OUTCOME:"unknown_outcome",DNS_RECORD_NOT_FOUND:"dns_record_not_found",INCOMPLETE_RECORD:"incomplete_record",PERMISSION_DENIED:"permission_denied",INVALID_PORT:"invalid_port",INVALID_DNS_TYPE:"invalid_dns_type",DNS_ADD_FAILED:"dns_add_failed",INVALID_DOMAIN:"invalid_domain",CONFIGURED_CORRECTLY:"configured_correctly",VERIFICATION_NEEDED:"verification_needed",INVALID_CONFIGURATION:"invalid_configuration",DNS_CHANGE_REQUIRED:"dns_change_required",DNS_CHANGE_RECOMMENDED:"dns_change_recommended",DNSSEC_NEEDS_TO_BE_DISABLED:"dnssec_needs_to_be_disabled",PROJECT_ATTACHMENT_RECOMMENDED:"project_attachment_recommended",PROJECT_DOMAIN_MISSING:"project_domain_missing",INTEGRATION_TERMS_ACCEPTANCE_REQUIRED:"integration_terms_acceptance_required",INTEGRATION_SETUP_REQUIRED:"integration_setup_required",HAS_RESOURCES:"has_resources",INTEGRATION_SANDBOX_CLAIM_REQUIRED:"integration_sandbox_claim_required",CLASSIC_TOKEN_REQUIRED:"classic_token_required",TOKEN_USER_SCOPE_REQUIRED:"token_user_scope_required",MISSING_URL:"missing_url",MISSING_EVENTS:"missing_events",INVALID_URL:"invalid_url",INVALID_EVENT:"invalid_event",INVALID_BUDGET:"invalid_budget",INVALID_REFRESH_PERIOD:"invalid_refresh_period",INVALID_EXPIRATION:"invalid_expiration",INVALID_ALERT_THRESHOLDS:"invalid_alert_thresholds",REQUIRES_CONSENT:"requires_consent",MISSING_ISSUER_ID:"missing_issuer_id",MISSING_KEY:"missing_key",MISSING_KEY_ID:"missing_key_id",MISSING_PROJECT:"missing_project",ISSUER_NOT_FOUND:"issuer_not_found",ISSUER_MANAGED:"issuer_managed",ISSUER_REQUIRES_IMPORTED_KEY:"issuer_requires_imported_key",ISSUER_REQUIRES_GENERATED_KEY:"issuer_requires_generated_key",KEY_NOT_REVOKING:"key_not_revoking",NO_CHANGES_REQUESTED:"no_changes_requested",GIT_REPOSITORY_REQUIRED:"git_repository_required",CI_RUN_NOT_FOUND:"ci_run_not_found",CI_RUN_IN_PROGRESS:"ci_run_in_progress",CI_RUN_NOT_RETRYABLE:"ci_run_not_retryable",SCHEDULES_NOT_ENABLED:"schedules_not_enabled",SCHEDULE_ALREADY_EXISTS:"schedule_already_exists",SCHEDULE_COMPLETED:"schedule_completed",SCHEDULE_ALREADY_ACTIVE:"schedule_already_active",STATIC_SCHEDULE:"static_schedule",INVALID_CRON_EXPRESSION:"invalid_cron_expression",INVALID_JITTER:"invalid_jitter",JITTER_EXCEEDS_CADENCE:"jitter_exceeds_cadence",SINGLE_AT_TOO_SOON:"single_at_too_soon",SCHEDULE_PAYLOAD_TOO_LARGE:"payload_too_large",SCHEDULE_PAYLOAD_STORE_FAILED:"payload_store_failed",SCHEDULE_SERVICE_UNAVAILABLE:"service_unavailable",SCHEDULE_SERVICE_ERROR:"service_error",REDIRECT_NOT_FOUND:"redirect_not_found",VERSION_NOT_FOUND:"version_not_found",VERSION_ALREADY_LIVE:"version_already_live",VERSION_IS_STAGING:"version_is_staging",PLAN_UPGRADE_REQUIRED:"plan_upgrade_required",NOT_TEAM_MEMBER:"not_team_member",INVALID_ROLE_COMBINATION:"invalid_role_combination",TARGET_CONFLICT:"target_conflict",DEPRECATED:"deprecated",LIMIT_CLAMPED:"limit_clamped",STREAM_GAP:"stream_gap"},USAGE_ERROR_REASONS=new Set(["invalid_arguments","missing_arguments","unknown_command","missing_command","invalid_environment","invalid_type","missing_id","missing_value","missing_name","missing_flags","missing_clients","invalid_clients","conflicting_type_flags","missing_environment","invalid_slug","invalid_name","invalid_alert_thresholds","invalid_budget","invalid_dns_type","invalid_event","invalid_expiration","invalid_port","invalid_refresh_period","invalid_role_combination","invalid_url","missing_events","missing_issuer_id","missing_key_id","missing_key","missing_url"]);function getExitCodeForReason(reason){return reason!==void 0&&USAGE_ERROR_REASONS.has(reason)?2:1}var AGENT_ACTION={MISSING_ARGUMENTS:"missing_arguments",CONFIRMATION_REQUIRED:"confirmation_required",LOGIN_REQUIRED:"login_required"};var import_error_utils=__toESM(require_dist(),1);var OBSERVABILITY_PLUS_PURCHASE_COMMAND="buy addon observability-plus",PRIORITY_PROJECT_ENABLE_COMMAND="project priority enable",BUY_PRO_COMMAND="buy pro",PROJECT_ENABLE_COMMAND="project observability enable";function mentionsObservabilityPlus(message){return/observability\s+plus/i.test(message)}function mentionsPriorityProject(message){return/priority\s+project/i.test(message)||/priority\s+tier/i.test(message)}function observabilityPlusDenialReason(error){if(!error||typeof error!="object"||!("meta"in error))return;let meta=error.meta;if(meta&&typeof meta=="object"&&"reason"in meta&&typeof meta.reason=="string")return meta.reason}function observabilityPlusPurchaseHint(){return`Subscribe with ${getCommandName(OBSERVABILITY_PLUS_PURCHASE_COMMAND)}.`}function isHobbyLikePlan(plan){return plan==="hobby"||plan==="oss"}function isProOrEnterprisePlan(plan){return plan==="pro"||plan==="enterprise"}function currentTeamPlan(client){let id=client?.config?.currentTeam;if(id)return teamCache.get(id)?.billing?.plan}function planForTeam(idOrSlug){return teamCache.get(idOrSlug)?.billing?.plan}function buyProFix(hint){return{command:BUY_PRO_COMMAND,hint:hint??`Upgrade with ${getCommandName(BUY_PRO_COMMAND)}.`,when:"a person has approved upgrading the plan"}}function observabilityPlusPurchaseFix(){return{command:OBSERVABILITY_PLUS_PURCHASE_COMMAND,hint:observabilityPlusPurchaseHint(),when:"a person has approved buying the add-on"}}function inferDenialReason(message){if(/(?:disabled|switched off|re-enable)/i.test(message))return"subscription_disabled";if(/excluded from it|include the project/i.test(message))return"project_excluded";if(/upgrade your plan/i.test(message)&&/pro and enterprise/i.test(message))return"plan_upgrade_required";if(/(?:quota|usage limit|query limit)/i.test(message))return"quota"}function plusNeedsPlanUpgradeHint(){return`Observability Plus is available on Pro and Enterprise. Upgrade with ${getCommandName(BUY_PRO_COMMAND)}. The add-on cannot be purchased on Hobby.`}function observabilityPlusRecovery(message,denialReason,plan){if(mentionsObservabilityPlus(message))switch(denialReason??inferDenialReason(message)){case"subscription_disabled":return{hint:"Observability Plus is disabled. Ask a team owner to enable it for the intended team or project, then retry. A new subscription may not be needed."};case"project_excluded":return{command:PROJECT_ENABLE_COMMAND,excludeFlags:["--non-interactive","--project","--yes"],hint:`Observability Plus is on for the team, but this project is excluded. Enable it with ${getCommandName(PROJECT_ENABLE_COMMAND)}. A new subscription is not needed.`,preserveProject:!1,when:"a person has approved enabling Observability Plus for this project"};case"plan_upgrade_required":return buyProFix(plusNeedsPlanUpgradeHint());case"quota":return{hint:"The usage limit was reached. Ask a team owner to review the limit before retrying."};default:return isHobbyLikePlan(plan)?buyProFix(plusNeedsPlanUpgradeHint()):{...observabilityPlusPurchaseFix(),hint:`Check whether Observability Plus is disabled for this project or the team needs a subscription. Enable it if already subscribed. Otherwise, ${observabilityPlusPurchaseHint()}`,when:"the team has no subscription and a person has approved buying the add-on"}}}function priorityProjectRecovery(message,plan){if(mentionsPriorityProject(message))return isHobbyLikePlan(plan)?buyProFix(`Priority Projects are only available on Pro or Enterprise team plans. Upgrade with ${getCommandName(BUY_PRO_COMMAND)}, then run ${getCommandName(PRIORITY_PROJECT_ENABLE_COMMAND)}.`):{command:PRIORITY_PROJECT_ENABLE_COMMAND,excludeFlags:["--non-interactive","--project","--yes"],hint:getCommandName(PRIORITY_PROJECT_ENABLE_COMMAND),preserveProject:!1,when:"user runs this command in an interactive terminal"}}function observabilityPlanRecovery(message,denialReason,plan){return priorityProjectRecovery(message,plan)??observabilityPlusRecovery(message,denialReason,plan)}var PROJECT_POSITIONAL_COMMANDS=new Set([PRIORITY_PROJECT_ENABLE_COMMAND,PROJECT_ENABLE_COMMAND]);function currentTeamScope(client){let id=client?.config?.currentTeam;if(id)return teamCache.get(id)?.slug??id}function targetRecovery(fix,target){if(!fix)return;let targeted=command=>{let out=command;return target.projectName&&PROJECT_POSITIONAL_COMMANDS.has(command)&&(out+=` ${quoteArg(target.projectName)}`),target.scope&&(out+=` --scope ${quoteArg(target.scope)}`),out},hint=fix.hint;for(let command of[BUY_PRO_COMMAND,OBSERVABILITY_PLUS_PURCHASE_COMMAND,PRIORITY_PROJECT_ENABLE_COMMAND,PROJECT_ENABLE_COMMAND])hint=hint.split(getCommandName(command)).join(getCommandName(targeted(command)));if(!fix.command)return{...fix,hint};let excludeFlags=new Set(fix.excludeFlags??[]),preserveProject=fix.preserveProject;return target.projectName&&PROJECT_POSITIONAL_COMMANDS.has(fix.command)&&(excludeFlags.add("--project"),preserveProject=!1),fix.command===BUY_PRO_COMMAND&&excludeFlags.add("--project"),target.scope&&(excludeFlags.add("--scope"),excludeFlags.add("--team")),{...fix,command:targeted(fix.command),hint,...excludeFlags.size?{excludeFlags:Array.from(excludeFlags)}:{},...preserveProject!==void 0?{preserveProject}:{}}}function clientObservabilityPlanRecovery(client,error,message,projectName,scope){return targetRecovery(observabilityPlanRecovery(message,observabilityPlusDenialReason(error),scope?planForTeam(scope):currentTeamPlan(client)),{projectName,scope:scope??currentTeamScope(client)})}function errorContext(client){let teamId=client?.config?.currentTeam;return teamId?client?.teams?.find(team=>team.id===teamId||team.slug===teamId)?.slug??teamCache.get(teamId)?.slug:client?.user?.username||client?.user?.email}function getErrorRecovery(error,client){let reason=error.reason?.toLowerCase(),scope=errorContext(client);if(error.status===403||["forbidden","permission_denied","scope_not_accessible"].includes(reason??""))return{hint:`Check that the selected team is correct${scope?` (${scope})`:""}. If it is, ask a team owner to grant the required access. Retry only after the team or access changes.`,retryable:!1,userActionRequired:!0,...scope&&{scope},...error.action&&{action:error.action},...error.resource&&{resource:error.resource}};if(error.status===401||reason==="not_authorized")return{hint:"Provide valid credentials for the intended account and team, then retry.",retryable:!1,userActionRequired:!0};if(error.status===402||["payment_required","plan_upgrade_required"].includes(reason??"")){let message=error.serverMessage??error.message??"";return{hint:observabilityPlanRecovery(message,observabilityPlusDenialReason(error),currentTeamPlan(client))?.hint??(/(?:disabled|switched off|re-enable)/i.test(message)?"Enable the feature for the selected team or project, then retry.":/(?:overdue|payment method|unpaid|balance)/i.test(message)?"Ask a team owner to resolve the billing issue, then retry.":/(?:plan|subscription)/i.test(message)?"Ask a team owner to confirm the required plan or subscription before changing billing. Retry after access is enabled.":"Check the billing or feature requirement reported above with a team owner. Retry after that requirement is resolved."),retryable:!1,userActionRequired:!0,...scope&&{scope}}}if(error.status===429||reason==="rate_limited"){let wait=error.retryAfterMs;return{hint:typeof wait=="number"&&Number.isFinite(wait)&&wait>0?`Wait at least ${Math.ceil(wait/1e3)} seconds before trying again.`:wait==="never"?"This request cannot be retried with the current limit. Ask a team owner to review the limit.":"The request limit was reached. Wait before trying again; no retry time was provided.",retryable:wait!=="never",...typeof wait=="number"&&Number.isFinite(wait)&&wait>0&&{retryAfterMs:wait}}}return{}}import{randomUUID}from"node:crypto";function agentErrorMetadata(client){return client.isAgent?{cliVersion:pkg_default.version,invocationId:client.telemetryEventStore?.currentInvocationId}:{}}function agentErrorCategory(reason){return/^(forbidden|permission_denied|scope_not_accessible)$/i.test(reason)?"permission":/^(payment_required|plan_upgrade_required)$/i.test(reason)?"billing":/^(not_authorized|login_required)$/i.test(reason)?"authentication":/^(rate_limited|too_many_requests)$/i.test(reason)?"rate_limit":/^(invalid_arguments|unknown_command|ARG_UNKNOWN_OPTION)$/i.test(reason)?"usage":/^(link_required|project_not_found|not_found)$/i.test(reason)?"project_context":"other"}function trackAgentError(client,error){!client.isAgent||!client.telemetryEventStore||client.telemetryEventStore.add({id:randomUUID(),eventTime:Date.now(),key:"agent_error",value:JSON.stringify({invocationId:client.telemetryEventStore.currentInvocationId,category:agentErrorCategory(error.reason),hasRecovery:!!error.hint,retryable:error.retryable,userActionRequired:error.userActionRequired})})}function isHelpInvocation(argv){let args=argv.slice(2),separator=args.indexOf("--");return args.slice(0,separator<0?args.length:separator).some(arg=>arg==="--help"||arg==="-h")}function trackAgentCommandOutcome(client,exitCode){if(!client.isAgent||!client.telemetryEventStore)return;let help=isHelpInvocation(client.argv);client.telemetryEventStore.add({id:randomUUID(),eventTime:Date.now(),key:"agent_command_outcome",value:JSON.stringify({invocationId:client.telemetryEventStore.currentInvocationId,exitCode,outcome:help&&(exitCode===0||exitCode===2)?"help":exitCode===0?"success":"failure"})})}function buildCommandWithYes(argv,pkgName=packageName){let args=stripSensitiveAuthArgs(argv.slice(2)),out=args.some(a=>a==="--yes"||a==="-y")?args:[...args,"--yes"];return`${pkgName} ${out.join(" ")}`.trim()}function redactEnvValueArgs(argv){let redacted=[...argv];for(let i=0;i<redacted.length;i++)redacted[i]==="--value"&&i+1<redacted.length?(redacted[i+1]='"<value>"',i++):redacted[i].startsWith("--value=")&&(redacted[i]='--value="<value>"');return redacted}var GLOBAL_FLAG_NAMES=new Set(["--cwd","--config","--yes","-y","--non-interactive","--scope","--team","-S","-T"]),GLOBAL_FLAG_SHORTHANDS={"-y":"--yes","-S":"--scope","-T":"--team"};function canonicalGlobalFlagName(name){return GLOBAL_FLAG_SHORTHANDS[name]??name}function getGlobalFlagsFromArgv(argv){let args=getGlobalFlagsFromArgs(argv.slice(2),{preserveConfig:!0,preserveYes:!0}),out=[];for(let i=0;i<args.length;i++){let arg=args[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;GLOBAL_FLAG_NAMES.has(name)&&(out.push(arg),suggestionFlagTakesSeparateValue(name)&&!arg.includes("=")&&i+1<args.length&&!args[i+1].startsWith("-")&&(out.push(args[i+1]),i++))}return out}function omitGlobalFlagsFromArgs(args){let safeArgs=stripSensitiveAuthArgs(args),out=[];for(let i=0;i<safeArgs.length;i++){let arg=safeArgs[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;if(GLOBAL_FLAG_NAMES.has(name)){suggestionFlagTakesSeparateValue(name)&&!arg.includes("=")&&i+1<safeArgs.length&&!safeArgs[i+1].startsWith("-")&&i++;continue}out.push(arg)}return out}function buildIntegrationCommandTailFromArgv(argv){let args=argv.slice(2),idx=args.indexOf("integration");return idx===-1?"integration":omitGlobalFlagsFromArgs(args.slice(idx)).join(" ")}function buildCommandWithGlobalFlags(argv,commandTemplate,pkgName=packageName,options){let preserved=options?.globalFlags==="all"?getGlobalFlagsFromArgs(argv.slice(2),{preserveProject:options.preserveProject}):getGlobalFlagsFromArgv(argv);if(options?.globalFlags!=="all"&&options?.preserveProject){let globalArgs=getGlobalFlagsFromArgs(argv.slice(2)),contextArgs=getGlobalFlagsFromArgs(argv.slice(2),{preserveProject:!0});preserved.push(...contextArgs.slice(globalArgs.length))}let exclude=new Set(commandTemplate.split(/\s+/).filter(token=>token.startsWith("-")).map(token=>canonicalGlobalFlagName(token.split("=")[0])));for(let flag of options?.excludeFlags??[])exclude.add(canonicalGlobalFlagName(flag));if(exclude.size){let out=[];for(let i=0;i<preserved.length;i++){let arg=preserved[i],name=arg.startsWith("--")?arg.split("=")[0]:arg;if(exclude.has(canonicalGlobalFlagName(name))){!arg.includes("=")&&i+1<preserved.length&&!preserved[i+1].startsWith("-")&&i++;continue}out.push(arg)}preserved=out}let base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:options?.prependGlobalFlags?`${pkgName} ${preserved.join(" ")} ${commandTemplate}`:`${base} ${preserved.join(" ")}`}function withGlobalFlags(client,commandTemplate,options={}){return buildCommandWithGlobalFlags(client.argv,commandTemplate,packageName,{globalFlags:"all",preserveProject:options.preserveProject})}function getPreservedArgsAfterEnvSubcommand(argv,subcommands,positionalCount){let args=stripSensitiveAuthArgs(argv.slice(2)),envIdx=args.findIndex((arg,index)=>arg==="env"&&subcommands.includes(args[index+1])),subcommandIdx=envIdx+1;if(envIdx===-1)return args;let preserved=[],positionals=0,optionsEnded=!1;for(let i=subcommandIdx+1;i<args.length;i++){let arg=args[i];if(arg==="--"&&!optionsEnded){optionsEnded=!0;continue}if(!optionsEnded&&arg.startsWith("-")){preserved.push(arg),!arg.includes("=")&&suggestionFlagTakesSeparateValue(arg)&&i+1<args.length&&!args[i+1].startsWith("-")&&preserved.push(args[++i]);continue}if(positionals<positionalCount){positionals++;continue}optionsEnded&&!preserved.includes("--")&&preserved.push("--"),preserved.push(arg)}return preserved}function omitPreservedFlagsAlreadyInTemplate(args,commandTemplate){let templateFlags=new Set(commandTemplate.split(/\s+/).filter(token=>token.startsWith("-")).map(token=>canonicalGlobalFlagName(token.split("=")[0]))),out=[];for(let i=0;i<args.length;i++){let arg=args[i],name=arg.startsWith("-")?arg.split("=")[0]:arg;if(!templateFlags.has(canonicalGlobalFlagName(name))){out.push(arg);continue}!arg.includes("=")&&suggestionFlagTakesSeparateValue(name)&&i+1<args.length&&!args[i+1].startsWith("-")&&i++}return out}function getPreservedArgsForEnvAdd(argv){return getPreservedArgsAfterEnvSubcommand(argv,["add"],3)}function buildEnvAddCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvAdd(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}function getPreservedArgsForEnvPull(argv){return getPreservedArgsAfterEnvSubcommand(argv,["pull"],1)}function getPreservedArgsForEnvRm(argv){return getPreservedArgsAfterEnvSubcommand(argv,["rm","remove"],3)}function buildEnvRmCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvRm(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}function getPreservedArgsForEnvUpdate(argv){return getPreservedArgsAfterEnvSubcommand(argv,["update"],3)}function buildEnvUpdateCommandWithPreservedArgs(argv,commandTemplate,pkgName=packageName){let preserved=omitPreservedFlagsAlreadyInTemplate(getPreservedArgsForEnvUpdate(argv),commandTemplate),base=`${pkgName} ${commandTemplate}`;return preserved.length===0?base:`${base} ${preserved.map(quoteArg).join(" ")}`}function buildCommandWithScope(argv,scopeSlug,pkgName=packageName){let args=stripSensitiveAuthArgs(argv.slice(2)),out=[];for(let i=0;i<args.length;i++){if(args[i]==="--scope"||args[i]==="--team"||args[i]==="-S"||args[i]==="-T"){i++;continue}args[i].startsWith("--scope=")||args[i].startsWith("--team=")||out.push(args[i])}return out.push("--scope",scopeSlug),`${pkgName} ${out.join(" ")}`}function enrichActionRequiredWithInvokingCommand(payload,argv){if(payload.reason!=="missing_scope"||!payload.choices?.length)return payload;let next=[],linkCommand=buildCommandWithGlobalFlags(argv,"link",packageName,{preserveProject:!0,excludeFlags:["--scope","--team"]});for(let choice of payload.choices){let slug=choice.name;next.push({command:`${linkCommand} --scope ${slug}`,when:"Link first (then run any command without --scope)"}),next.push({command:buildCommandWithScope(argv,slug),when:"Run this command with scope (no link)"})}return{...payload,next}}function outputActionRequired(client,payload,exitCode=getExitCodeForReason(payload.reason)){if(!shouldEmitNonInteractiveCommandError(client))return;let enriched=enrichActionRequiredWithInvokingCommand(payload,client.argv);!enriched.hint&&enriched.next?.length&&(enriched.hint="Run one of the commands in next[] to complete without prompting."),recordCliError({code:payload.reason}),client.stdout.write(`${JSON.stringify(enriched,null,2)}
|
|
8
|
-
`),process.exit(exitCode)}function argvHasNonInteractive(argv){if(!argv?.length)return!1;for(let i=0;i<argv.length;i++){let a=argv[i];if(a==="--non-interactive")return argv[i+1]!=="false";if(a.startsWith("--non-interactive="))return a.slice(18)!=="false"}return!1}function shouldEmitNonInteractiveCommandError(client){return client.nonInteractive||argvHasNonInteractive(client.argv??[])}function outputAgentError(client,payload,exitCode=getExitCodeForReason(payload.reason)){shouldEmitNonInteractiveCommandError(client)&&(writeAgentError(client,payload),process.exit(exitCode))}function writeAgentError(client,payload){let enriched={...getErrorRecovery(payload,client),...payload,...agentErrorMetadata(client)};recordCliError({code:payload.reason,reportOnSuccess:!0}),trackAgentError(client,enriched),client.stdout.write(`${JSON.stringify(enriched,null,2)}
|
|
9
|
-
`)}function outputAgentSuccess(client,payload,exitCode=0){shouldEmitNonInteractiveCommandError(client)&&(!payload.hint&&payload.next?.length&&(payload.hint="Follow up with one of the commands in next[]."),client.stdout.write(`${JSON.stringify(payload,null,2)}
|
|
10
|
-
`),process.exit(exitCode))}function buildNextStepsForGlobalConfig(client){return[{command:buildCommandWithGlobalFlags(client.argv,"global-config list"),when:"List Global Config stores in the current team scope"},{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Switch to the team that owns the Global Config"},{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"Verify the current team or user scope"}]}var GLOBAL_CONFIG_NON_INTERACTIVE_HINT="Global Config commands use your current team scope. Pass --scope or run `vercel teams switch` if the store is missing.",LIST_ERROR_HINT="Project names are team-scoped. Use --scope when the project belongs to another team, or `list --all` to list deployments across all projects.";function buildNextStepsForList(client,projectName){return[projectName?{command:buildCommandWithGlobalFlags(client.argv,`project ls --filter ${projectName}`),when:"Search projects matching the attempted name to find the right one"}:{command:buildCommandWithGlobalFlags(client.argv,"project ls --filter <name>"),when:"Search projects by name substring to find the right one (replace <name>)"},{command:buildCommandWithGlobalFlags(client.argv,"list --all"),when:"List deployments across all projects in the current scope"},{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Re-link this directory to the correct Vercel project"}]}function buildNextStepsForProjectSubcommands(client,variant){let byName=variant==="access-groups"?{template:"project access-groups <name>",when:"List access groups by project name (replace <name>)"}:variant==="access-summary"?{template:"project access-summary <name>",when:"Show role counts by project name (replace <name>)"}:variant==="protection"?{template:"project protection <name>",when:"Show deployment protection by project name (replace <name>)"}:variant==="update"?{template:"project update <name> --framework <slug>",when:"Update a framework preset by project name (replace <name> and <slug>)"}:variant==="speed-insights"?{template:"project speed-insights <name>",when:"Enable Speed Insights by project name (replace <name>)"}:variant==="web-analytics"?{template:"project web-analytics <name>",when:"Enable Web Analytics by project name (replace <name>)"}:variant==="observability"?{template:"project observability enable <name>",when:"Enable Observability Plus by project name (replace <name>)"}:variant==="checks"?{template:"project checks add <name>",when:"Create a deployment check by project name (replace <name>)"}:variant==="inspect"?{template:"project inspect <name>",when:"Inspect a project by name (replace <name>)"}:variant==="resume"?{template:"project resume <name>",when:"Resume production traffic by project name (replace <name>)"}:{template:"project members <name>",when:"List members by project name (replace <name>)"};return[{command:buildCommandWithGlobalFlags(client.argv,"link"),when:"Re-link this directory to the correct Vercel project"},{command:buildCommandWithGlobalFlags(client.argv,byName.template),when:byName.when},{command:buildCommandWithGlobalFlags(client.argv,"project ls"),when:"List projects in the current team to pick a name"}]}var PROJECT_SUBCOMMAND_ERROR_HINT="If you use --cwd, ensure that folder is linked to the right project, or pass an explicit project name. Use --scope when the project belongs to another team.";function resolveNonInteractiveDefaults(client,variant){return variant==="global-config"?{next:buildNextStepsForGlobalConfig(client),hint:GLOBAL_CONFIG_NON_INTERACTIVE_HINT}:variant==="list"?{next:buildNextStepsForList(client),hint:LIST_ERROR_HINT}:{next:buildNextStepsForProjectSubcommands(client,variant),hint:PROJECT_SUBCOMMAND_ERROR_HINT}}function writeAgentErrorPayloadAndExit(client,payload,exitCode,variant){let defaults=["link_required","project_not_found","not_found"].includes(payload.reason)?resolveNonInteractiveDefaults(client,variant):{},out={...payload,next:payload.next??defaults.next,hint:payload.hint??defaults.hint};writeAgentError(client,out),process.exit(exitCode)}function isProjectNotFoundLike(err){return!!(err instanceof ProjectNotFound||(0,import_error_utils.isError)(err)&&"code"in err&&err.code==="PROJECT_NOT_FOUND")}function isLinkRequiredLike(err){return err instanceof LinkRequiredError}function normalizeApiErrorText(message){return message.replace(/\s*\(\d{3}\)\s*$/,"").trim()}function exitWithNonInteractiveError(client,err,exitCode=1,options={variant:"members"}){if(!shouldEmitNonInteractiveCommandError(client))return;let{variant}=options;if(isLinkRequiredLike(err)){if(variant==="global-config"){writeAgentErrorPayloadAndExit(client,{status:"error",reason:"link_required",message:err instanceof Error?err.message:String(err),next:buildNextStepsForGlobalConfig(client),hint:GLOBAL_CONFIG_NON_INTERACTIVE_HINT},exitCode,"global-config");return}writeAgentErrorPayloadAndExit(client,{status:"error",reason:"link_required",message:err instanceof Error?err.message:String(err)},exitCode,variant);return}if(isProjectNotFoundLike(err)){writeAgentErrorPayloadAndExit(client,{status:"error",reason:"project_not_found",message:err instanceof Error?err.message:String(err),...variant==="list"&&options.projectName?{next:buildNextStepsForList(client,options.projectName)}:{}},exitCode,variant);return}if(isAPIError(err)){let rawMessage=err.serverMessage||err.message,message=normalizeApiErrorText(rawMessage),reason=err.status===403?"forbidden":err.status===402?"payment_required":err.status===401?"not_authorized":err.status===404?variant==="global-config"?"not_found":"project_not_found":err.status===429?"rate_limited":"api_error";writeAgentErrorPayloadAndExit(client,{status:"error",reason,message,...getErrorRecovery(err,client),...err.action&&{action:err.action},...err.resource&&{resource:err.resource}},exitCode,variant)}writeAgentErrorPayloadAndExit(client,{status:"error",reason:"unexpected_error",message:err instanceof Error?err.message:String(err)},exitCode,variant)}function openUrlInBrowserCommand(url){return process.platform==="win32"?`start ${url}`:process.platform==="darwin"?`open '${url}'`:`xdg-open '${url}'`}export{quoteArg,AGENT_STATUS,AGENT_REASON,getExitCodeForReason,AGENT_ACTION,PRIORITY_PROJECT_ENABLE_COMMAND,BUY_PRO_COMMAND,isProOrEnterprisePlan,buyProFix,targetRecovery,clientObservabilityPlanRecovery,getErrorRecovery,agentErrorMetadata,trackAgentError,isHelpInvocation,trackAgentCommandOutcome,buildCommandWithYes,redactEnvValueArgs,getGlobalFlagsFromArgv,omitGlobalFlagsFromArgs,buildIntegrationCommandTailFromArgv,buildCommandWithGlobalFlags,withGlobalFlags,getPreservedArgsForEnvAdd,buildEnvAddCommandWithPreservedArgs,getPreservedArgsForEnvPull,getPreservedArgsForEnvRm,buildEnvRmCommandWithPreservedArgs,getPreservedArgsForEnvUpdate,buildEnvUpdateCommandWithPreservedArgs,outputActionRequired,argvHasNonInteractive,shouldEmitNonInteractiveCommandError,outputAgentError,writeAgentError,outputAgentSuccess,exitWithNonInteractiveError,openUrlInBrowserCommand};
|
|
@@ -1,7 +0,0 @@
|
|
|
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{projectOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-JESNVRVR.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,{name:"search",description:"Search by name, description, source, or destination",shorthand:"s",type:String,argument:"QUERY",deprecated:!1},{name:"filter",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:"f",type:String,argument:"TYPE",deprecated:!1},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"version-id",description:"List routes from a specific version ID",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!1},{name:"diff",description:"Compare staged changes against production. Use with --version-id to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --search "api"`},{name:"Filter by type",value:`${packageName} routes list --filter rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,{name:"count",description:"Number of versions to fetch (default: 20, max: 100)",shorthand:null,type:Number,argument:"NUMBER",deprecated:!1}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --count 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex (default), path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"disabled",description:"Create route in disabled state",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish all staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"delete",aliases:["rm"],description:"Delete one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when deleting"}],examples:[{name:"Delete a route by name",value:`${packageName} routes delete "Old Redirect"`},{name:"Delete a route by ID",value:`${packageName} routes delete abc123`},{name:"Delete multiple routes",value:`${packageName} routes delete "Route A" "Route B"`},{name:"Delete without confirmation",value:`${packageName} routes delete "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"reorder",aliases:["move"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when reordering"}],examples:[{name:"Move to first position",value:`${packageName} routes reorder "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes reorder "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes reorder "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes reorder "API Proxy" --position after:route-id-123`},{name:"Interactive reorder (prompts for position)",value:`${packageName} routes reorder "API Proxy"`}]},editSubcommand={name:"edit",aliases:[],description:"Edit an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes edit "API Proxy"`},{name:"Edit with AI",value:`${packageName} routes edit "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes edit "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes edit "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes edit "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes edit "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json (default) or .ts",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
|