@vercel/cli-support 68.2.0 → 68.3.0-snapshot-24d117b8c08a
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-4BFJ2SAR.js → add-K63YQ4KL.js} +1 -1
- package/dist/chunks/{add-5BQ3RSZQ.js → add-U4WWFW6A.js} +1 -1
- package/dist/chunks/{add-S7U4ZFBS.js → add-UC3PDROQ.js} +1 -1
- package/dist/chunks/{alerts-GIT77GJG.js → alerts-TCS56TZU.js} +1 -1
- package/dist/chunks/{build-RQ4ABN6Z.js → build-62AFJDRZ.js} +1 -1
- package/dist/chunks/{chunk-R5KBPWWS.js → chunk-237WN2MK.js} +1 -1
- package/dist/chunks/{chunk-FSM7YM4W.js → chunk-26HAXM56.js} +2 -2
- package/dist/chunks/{chunk-UFE4RBZV.js → chunk-2A7TTZJ4.js} +1 -1
- package/dist/chunks/{chunk-PIGJVJNM.js → chunk-2I4XYW65.js} +1 -1
- package/dist/chunks/{chunk-E6VQXHBD.js → chunk-3QTP26QS.js} +1 -1
- package/dist/chunks/{chunk-KNKGJD5J.js → chunk-3RPOSTE4.js} +1 -1
- package/dist/chunks/{chunk-GPVXJI6X.js → chunk-46DSHEHL.js} +1 -1
- package/dist/chunks/{chunk-3JYREVOI.js → chunk-4KEWLHYF.js} +1 -1
- package/dist/chunks/{chunk-KDIICSD5.js → chunk-4U2H6XBH.js} +1 -1
- package/dist/chunks/{chunk-K4J43D5J.js → chunk-55EEFTI7.js} +1 -1
- package/dist/chunks/{chunk-ZWPASRC2.js → chunk-5KTOBHJR.js} +1 -1
- package/dist/chunks/{chunk-IZOKMWU5.js → chunk-6SK6TOSJ.js} +1 -1
- package/dist/chunks/{chunk-7CLATJZX.js → chunk-7VFMF2X2.js} +1 -1
- package/dist/chunks/{chunk-V7VHLSYL.js → chunk-A5JWEPUR.js} +1 -1
- package/dist/chunks/{chunk-N4FZIVIS.js → chunk-AHAT5QYP.js} +1 -1
- package/dist/chunks/{chunk-JM7KUCBM.js → chunk-ALRMGYWE.js} +1 -1
- package/dist/chunks/{chunk-LHK6B4ER.js → chunk-BAHTCIMJ.js} +1 -1
- package/dist/chunks/{chunk-WWEUGL6W.js → chunk-BV456GI7.js} +1 -1
- package/dist/chunks/chunk-BVHXBPKR.js +7 -0
- package/dist/chunks/{chunk-B7LM2BNN.js → chunk-CEJO447T.js} +1 -1
- package/dist/chunks/{chunk-H43XHICL.js → chunk-CM2HJYDA.js} +1 -1
- package/dist/chunks/{chunk-54W7S4EV.js → chunk-CMAZDLNJ.js} +1 -1
- package/dist/chunks/{chunk-TL4AEZXF.js → chunk-CVGKZ2YC.js} +1 -1
- package/dist/chunks/{chunk-6KI5LJIB.js → chunk-CYBPBS37.js} +1 -1
- package/dist/chunks/chunk-DBPL6EVR.js +27 -0
- package/dist/chunks/chunk-DFZRZPCJ.js +13 -0
- package/dist/chunks/{chunk-Y45NZT7C.js → chunk-DWE2A6BG.js} +1 -1
- package/dist/chunks/{chunk-6O2LDFGJ.js → chunk-DXFQOBXB.js} +1 -1
- package/dist/chunks/{chunk-JRUL67UC.js → chunk-E7R5SQDA.js} +2 -2
- package/dist/chunks/{chunk-ZG7A4P5U.js → chunk-EEH7JGGG.js} +1 -1
- package/dist/chunks/{chunk-MEF5BUJ5.js → chunk-EHA24PIE.js} +1 -1
- package/dist/chunks/{chunk-76XUBFXI.js → chunk-EYSD2ULB.js} +1 -1
- package/dist/chunks/chunk-FJPYSIUV.js +7 -0
- package/dist/chunks/{chunk-HJPZOKEB.js → chunk-GEBGZ3EG.js} +1 -1
- package/dist/chunks/{chunk-WQBNOQUT.js → chunk-GGRFONYT.js} +1 -1
- package/dist/chunks/{chunk-CRPZYLIL.js → chunk-H3HSH5FW.js} +1 -1
- package/dist/chunks/{chunk-HDKEES7E.js → chunk-H4BQDKOU.js} +6 -6
- package/dist/chunks/{chunk-GILTW5RJ.js → chunk-HPXRESOF.js} +1 -1
- package/dist/chunks/{chunk-Q4W3R6U2.js → chunk-HPYP2LC3.js} +1 -1
- package/dist/chunks/{chunk-MMMX3KE2.js → chunk-I3QZSYRK.js} +1 -1
- package/dist/chunks/{chunk-Z3Z5GBKO.js → chunk-IFSD556O.js} +1 -1
- package/dist/chunks/{chunk-FMLRVSWK.js → chunk-ILX4D2PP.js} +1 -1
- package/dist/chunks/{chunk-SWABNAKZ.js → chunk-J3DYBDSK.js} +1 -1
- package/dist/chunks/{chunk-XL6PE4AA.js → chunk-JJ4DOHP4.js} +1 -1
- package/dist/chunks/{chunk-WRTBYD4I.js → chunk-JMJ2FVX3.js} +1 -1
- package/dist/chunks/{chunk-IKVQLMEI.js → chunk-KVX64ZHU.js} +1 -1
- package/dist/chunks/{chunk-Q3R4HAAA.js → chunk-M345GUX4.js} +1 -1
- package/dist/chunks/{chunk-RXHW3T4H.js → chunk-MADCVSMW.js} +1 -1
- package/dist/chunks/{chunk-BB27VKHS.js → chunk-MUCHLKSG.js} +1 -1
- package/dist/chunks/{chunk-AGFG7WHE.js → chunk-MX66ZGZL.js} +1 -1
- package/dist/chunks/{chunk-Z62G57GC.js → chunk-NKACWBO3.js} +1 -1
- package/dist/chunks/{chunk-WA4CPW3H.js → chunk-NX4KI56H.js} +1 -1
- package/dist/chunks/chunk-O5RWOOY4.js +7 -0
- package/dist/chunks/{chunk-2TUJJIYU.js → chunk-OBSOJQH7.js} +1 -1
- package/dist/chunks/{chunk-TXROE436.js → chunk-OIIOMP67.js} +1 -1
- package/dist/chunks/{chunk-Y3ETQZSK.js → chunk-P5TIDWPF.js} +1 -1
- package/dist/chunks/{chunk-JK3NTR7T.js → chunk-P7QYBTLJ.js} +1 -1
- package/dist/chunks/{chunk-PG5BHJVH.js → chunk-PL2KOT4Q.js} +1 -1
- package/dist/chunks/{chunk-A7XRIU6Z.js → chunk-PUNGYINC.js} +1 -1
- package/dist/chunks/{chunk-XPWLEGWA.js → chunk-PVXBOZ45.js} +1 -1
- package/dist/chunks/{chunk-XY2GGCHC.js → chunk-Q45WRPBA.js} +1 -1
- package/dist/chunks/{chunk-2XQO6C7Q.js → chunk-Q4WSTT5G.js} +1 -1
- package/dist/chunks/{chunk-7EI554V5.js → chunk-QI7BWXRV.js} +1 -1
- package/dist/chunks/{chunk-FVMRKUWL.js → chunk-QIVM5MTP.js} +1 -1
- package/dist/chunks/{chunk-HT3CQEAF.js → chunk-R3BZ4IDA.js} +1 -1
- package/dist/chunks/{chunk-YU33PPKX.js → chunk-R5GFF2NL.js} +1 -1
- package/dist/chunks/{chunk-Z2NPMUPM.js → chunk-RRRXKACI.js} +1 -1
- package/dist/chunks/{chunk-USCJFJD4.js → chunk-S5TWKTHV.js} +1 -1
- package/dist/chunks/{chunk-DRNUHJ6I.js → chunk-T2DXWRDM.js} +1 -1
- package/dist/chunks/{chunk-VTAH7VMY.js → chunk-T52PWZNS.js} +1 -1
- package/dist/chunks/{chunk-BCOUDSOR.js → chunk-TAIREW55.js} +1 -1
- package/dist/chunks/{chunk-IMZD7QEB.js → chunk-UITNWLE7.js} +2 -2
- package/dist/chunks/{chunk-MTPHHAPR.js → chunk-UNAQQ5DF.js} +1 -1
- package/dist/chunks/{chunk-EPCRR72R.js → chunk-VNTREJRW.js} +1 -1
- package/dist/chunks/{chunk-UGVOMXYR.js → chunk-VO5M6G7M.js} +1 -1
- package/dist/chunks/chunk-VSWANERN.js +7 -0
- package/dist/chunks/{chunk-4KHVAEGO.js → chunk-VTA5KIL5.js} +1 -1
- package/dist/chunks/{chunk-EGXRQ73P.js → chunk-VZX47KDU.js} +1 -1
- package/dist/chunks/{chunk-YIKXLWSR.js → chunk-WBYRQHSP.js} +1 -1
- package/dist/chunks/{chunk-V2J5U5KQ.js → chunk-WYSNAEMX.js} +1 -1
- package/dist/chunks/{chunk-RJB5Y7M4.js → chunk-XCEO6325.js} +1 -1
- package/dist/chunks/{chunk-LA3VRJX7.js → chunk-XRCHG3IF.js} +1 -1
- package/dist/chunks/{chunk-4R7ICESH.js → chunk-Y7JAJKAJ.js} +1 -1
- package/dist/chunks/{chunk-4HHDAGMC.js → chunk-YBE2G3LP.js} +1 -1
- package/dist/chunks/{chunk-EDXNAXEZ.js → chunk-YM52B2ZV.js} +1 -1
- package/dist/chunks/{chunk-42RUDD27.js → chunk-Z3QJKD32.js} +1 -1
- package/dist/chunks/{chunk-QYAXCGZA.js → chunk-ZD3CDFPZ.js} +1 -1
- package/dist/chunks/{chunk-IKOVY76G.js → chunk-ZJTN7U74.js} +1 -1
- package/dist/chunks/{chunk-33ETNP4M.js → chunk-ZNKDVMRD.js} +1 -1
- package/dist/chunks/{chunk-HAAKXJ4V.js → chunk-ZUCLG4ML.js} +1 -1
- package/dist/chunks/{chunk-KDCLHZYL.js → chunk-ZUWIJMH2.js} +1 -1
- package/dist/chunks/{clear-PQBUHQMO.js → clear-JOCTJFHZ.js} +1 -1
- package/dist/chunks/{compile-vercel-config-A2DMFB2R.js → compile-vercel-config-H5MLKZB5.js} +1 -1
- package/dist/chunks/{config-QQY3G5PG.js → config-4IL23FDT.js} +1 -1
- package/dist/chunks/{config-6CSTGEZQ.js → config-WY56RPZJ.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-MPYSAOTH.js → connect-git-provider-JZ6PATUW.js} +1 -1
- package/dist/chunks/{delete-CELW3NLN.js → delete-PWULSIJU.js} +1 -1
- package/dist/chunks/{delete-YRATGP5Y.js → delete-SN7E5MTV.js} +1 -1
- package/dist/chunks/describe-II22LJP3.js +25 -0
- package/dist/chunks/{detect-projects-DHS2E3N4.js → detect-projects-FIGBZP42.js} +1 -1
- package/dist/chunks/{detect-services-VBKVN4A2.js → detect-services-VIJ4XLRR.js} +1 -1
- package/dist/chunks/{disable-CG3R2VAL.js → disable-7PWT4ILT.js} +1 -1
- package/dist/chunks/{discard-REGFZXFU.js → discard-GL42ZPA7.js} +1 -1
- package/dist/chunks/{edit-HHLQDVOP.js → edit-JCJDO73Y.js} +1 -1
- package/dist/chunks/{edit-YAYZEQRX.js → edit-SJH6BCRY.js} +1 -1
- package/dist/chunks/{enable-BV3N6GEL.js → enable-G7RZ5VV4.js} +1 -1
- package/dist/chunks/{export-WUPMMHSX.js → export-CUKYNL3C.js} +1 -1
- package/dist/chunks/{future-DJOUGRV4.js → future-PAAXGZTN.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-PZHDFX3W.js → generate-cert-for-deploy-ZAMSUCFF.js} +1 -1
- package/dist/chunks/{group-actions-UOMO2WB2.js → group-actions-O76SXUUJ.js} +1 -1
- package/dist/chunks/{image-DXZ4FKTV.js → image-QDQO36EW.js} +1 -1
- package/dist/chunks/{import-builders-IUEC2WN2.js → import-builders-EFVZQWHA.js} +1 -1
- package/dist/chunks/{inspect-BZKFXH45.js → inspect-AGC7W3OS.js} +1 -1
- package/dist/chunks/{inspect-YBEV7TZS.js → inspect-BSLSCH4L.js} +1 -1
- package/dist/chunks/{inspect-YPATSOEP.js → inspect-KPAFRFZA.js} +1 -1
- package/dist/chunks/{inspect-TAR6RBRU.js → inspect-XXQ7X2W7.js} +1 -1
- package/dist/chunks/{inspect-TDDHNNQS.js → inspect-XYVW6J2E.js} +1 -1
- package/dist/chunks/{inspect-YGVXE4HR.js → inspect-YQHS73JH.js} +1 -1
- package/dist/chunks/{list-KJGICUN5.js → list-2KYHARKO.js} +1 -1
- package/dist/chunks/{list-27R4USBV.js → list-CXRL7UNF.js} +1 -1
- package/dist/chunks/{list-6JXV7U6T.js → list-RYYPFUX4.js} +1 -1
- package/dist/chunks/{list-JB32VTAB.js → list-X6EO34N6.js} +1 -1
- package/dist/chunks/{login-NXBKDSGN.js → login-6VVAMBOA.js} +1 -1
- package/dist/chunks/{login-YCOZROC2.js → login-IPMI6XEL.js} +1 -1
- package/dist/chunks/{logs-W4GZLDHE.js → logs-UQPPRXTB.js} +1 -1
- package/dist/chunks/{ls-TBZHWZVO.js → ls-5SH4HSZ5.js} +1 -1
- package/dist/chunks/{ls-SSLCXR4A.js → ls-6GPP7PTK.js} +1 -1
- package/dist/chunks/{ls-BPD6GAEF.js → ls-FR5KWP4I.js} +1 -1
- package/dist/chunks/{ls-KSFP2X45.js → ls-KAPV4POT.js} +1 -1
- package/dist/chunks/{ls-TDYTE4HM.js → ls-KITNPWDE.js} +1 -1
- package/dist/chunks/{ls-A576SCRN.js → ls-QQ3F6OJ3.js} +1 -1
- package/dist/chunks/{ls-5UEICZHX.js → ls-WRJ6GDUR.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-556MHJWK.js → migrate-experimental-services-BORV5SUM.js} +1 -1
- package/dist/chunks/{mutate-IQQTYNNF.js → mutate-TER55VAA.js} +1 -1
- package/dist/chunks/{notifications-BC2UCLDC.js → notifications-SUB7P4EX.js} +1 -1
- package/dist/chunks/{open-JS5WAG77.js → open-GANU5JWA.js} +1 -1
- package/dist/chunks/{openapi-S6F32ZQD.js → openapi-GW2NXVYL.js} +1 -1
- package/dist/chunks/{permissions-3CD6EL4U.js → permissions-V4UHHOV2.js} +1 -1
- package/dist/chunks/{plugin-offer-RZADKNYF.js → plugin-offer-SFFLTT66.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-OSAV5B7N.js → prompt-missing-credentials-CVIIFJ6S.js} +1 -1
- package/dist/chunks/{publish-ZB2Q2YSB.js → publish-MV3RCHJM.js} +1 -1
- package/dist/chunks/{pull-WUFIVXEG.js → pull-JGTNLAF3.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-YVVGT7MZ.js → purchase-domain-if-available-OO533ARB.js} +1 -1
- package/dist/chunks/{push-TO7G2R7N.js → push-FJZEB3K2.js} +1 -1
- package/dist/chunks/{query-EVW5T2PI.js → query-3HB7DLVE.js} +1 -1
- package/dist/chunks/{raw-query-7GAKEK2P.js → raw-query-PNZO3D3S.js} +1 -1
- package/dist/chunks/{reauthenticate-WQZ5HISG.js → reauthenticate-6TPAZX5R.js} +1 -1
- package/dist/chunks/{remove-AAFJR4EN.js → remove-76ZLLEHO.js} +1 -1
- package/dist/chunks/{reorder-QVSTUVEQ.js → reorder-ZZRQMWQO.js} +1 -1
- package/dist/chunks/{reply-QSTMHPP5.js → reply-LWX3Q77Y.js} +1 -1
- package/dist/chunks/{resolve-MITWQMP7.js → resolve-K72DNP5D.js} +1 -1
- package/dist/chunks/{resolve-agent-team-NQCRA6ER.js → resolve-agent-team-75QSXK3C.js} +1 -1
- package/dist/chunks/{restore-5RLBSVYQ.js → restore-CMVVFIY3.js} +1 -1
- package/dist/chunks/{rm-P6AGSBXP.js → rm-4W2E3LPX.js} +1 -1
- package/dist/chunks/{rm-GXDLM3SA.js → rm-7Q6CRYDP.js} +1 -1
- package/dist/chunks/{rm-HXJWSOE4.js → rm-KGIBQFXK.js} +1 -1
- package/dist/chunks/{rm-6KTCXHBG.js → rm-MRH5RXBQ.js} +1 -1
- package/dist/chunks/{rm-M7QVN2N6.js → rm-TELAXNYE.js} +1 -1
- package/dist/chunks/{rule-inspect-D3BVZZRN.js → rule-inspect-2Z7XXWVB.js} +1 -1
- package/dist/chunks/{schema-T5BO3RBL.js → schema-5OJQWJJ6.js} +1 -1
- package/dist/chunks/{schema-AJAHECZG.js → schema-QAYQPSHG.js} +1 -1
- package/dist/chunks/{select-org-JBKKKZSN.js → select-org-CRZAHEXQ.js} +1 -1
- package/dist/chunks/{set-774P7GEL.js → set-AQP6ILFQ.js} +1 -1
- package/dist/chunks/{set-OWNTI5SM.js → set-ZSJYTLHB.js} +1 -1
- package/dist/chunks/{setup-and-link-3LD4LQGE.js → setup-and-link-EFNAHZR4.js} +1 -1
- package/dist/chunks/{skills-W45E2EWS.js → skills-MTZCIW44.js} +2 -2
- package/dist/chunks/{tags-KBCTII3M.js → tags-EHN3GJUF.js} +1 -1
- package/dist/chunks/{types-SYUZH46V.js → types-Z5UQ5OMJ.js} +1 -1
- package/dist/chunks/{update-FZESOZEW.js → update-2CVWFAVE.js} +1 -1
- package/dist/chunks/{usage-NF6S3DAZ.js → usage-LE5BHDUT.js} +1 -1
- package/dist/chunks/{validate-config-MJQI5EMD.js → validate-config-CKVP2P4B.js} +1 -1
- package/dist/chunks/{views-YXAMSKLM.js → views-AKV4QHMO.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +5 -5
- 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 +4 -4
- package/dist/commands/project/index.js +1 -1
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +2 -2
- package/dist/commands-ai.js +103 -103
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +30 -24
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +7 -7
- package/dist/commands-integrations.js +69 -56
- package/dist/commands-observability.js +44 -34
- package/dist/commands-routing.js +5 -7
- package/dist/index.js +4 -4
- package/dist/internal-build.js +1 -1
- package/dist/package.json +40 -40
- package/dist/version.mjs +1 -1
- package/package.json +42 -42
- package/dist/chunks/chunk-ECQW2R5M.js +0 -7
- package/dist/chunks/chunk-JJTAADC5.js +0 -7
- package/dist/chunks/chunk-NFBFXM6X.js +0 -7
- package/dist/chunks/chunk-R6LM3MBK.js +0 -13
- package/dist/chunks/chunk-RBM4KOQ2.js +0 -27
- package/dist/chunks/chunk-ZSJU5MJP.js +0 -7
- package/dist/chunks/describe-Q5D5GYVG.js +0 -25
|
@@ -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{require_cjs}from"./chunk-IKOVY76G.js";import{CONTACT_FIELDS,billingFieldsUsed,collectContactInformation,getBillingContact,getDomainPrice,getDomainStatus,isPurchasedSince,mergeContact,missingContactFields,purchaseDomain,readContactFlags}from"./chunk-ZSJU5MJP.js";import{stamp_default}from"./chunk-LY3EY2VG.js";import{amountMatchesPrice,canPromptForCharge,chargeFailureReason,chargeFlagWithValue,formatAmountArg,formatTerm,orderStatusStep,parseAmount,parseOrderWait,printChargeRecovery,refuseUnnamedTeam,reportChargeFailure,reportOrderPending,reportPriceChanged,reportUnknownOutcome,reportUsageError,trackApprovalOutcome,writeChargeAction}from"./chunk-RBM4KOQ2.js";import{formatUsd}from"./chunk-KDCLHZYL.js";import{param}from"./chunk-ERMHTPO4.js";import{buySubcommand}from"./chunk-R6LM3MBK.js";import{getScope}from"./chunk-CRPZYLIL.js";import{TelemetryClient}from"./chunk-QROPMCL2.js";import{printError}from"./chunk-7EI554V5.js";import{parseArguments}from"./chunk-E7ICSU45.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-E6VQXHBD.js";import{validateJsonOutput}from"./chunk-BDLZ6WL2.js";import{DomainChargeOutcomeUnknown,DomainPaymentAuthenticationRequired,DomainPriceChanged,DomainPurchaseInProgress,isAPIError}from"./chunk-MTPHHAPR.js";import{getCommandName,getCommandNamePlain}from"./chunk-EFGZK6OY.js";import{output_manager_default,recordCliError}from"./chunk-RIXTYUYN.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{getFlagsSpecification,getGlobalFlagsFromArgs,quoteArg}from"./chunk-CUO3CYU3.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{require_strip_ansi}from"./chunk-LPYHYTYI.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1),import_strip_ansi=__toESM(require_strip_ansi(),1),import_tldts=__toESM(require_cjs(),1),import_error_utils=__toESM(require_dist(),1);var DomainsBuyTelemetryClient=class extends TelemetryClient{trackCliArgumentDomain(v){v&&this.trackCliArgument({arg:"domain",value:this.redactedValue})}trackCliOptionAmount(v){this.trackRedactedCliOption("amount",v)}trackCliFlagUseBillingDetails(v){v&&this.trackCliFlag("use-billing-details")}trackCliOptionFirstName(v){this.trackRedactedCliOption("first-name",v)}trackCliOptionLastName(v){this.trackRedactedCliOption("last-name",v)}trackCliOptionEmail(v){this.trackRedactedCliOption("email",v)}trackCliOptionPhone(v){this.trackRedactedCliOption("phone",v)}trackCliOptionAddress(v){this.trackRedactedCliOption("address",v)}trackCliOptionCity(v){this.trackRedactedCliOption("city",v)}trackCliOptionState(v){this.trackRedactedCliOption("state",v)}trackCliOptionZip(v){this.trackRedactedCliOption("zip",v)}trackCliOptionCountry(v){this.trackRedactedCliOption("country",v)}trackCliOptionCompany(v){this.trackRedactedCliOption("company",v)}trackCliFlagAutoRenew(v){v&&this.trackCliFlag("auto-renew")}trackCliFlagNoAutoRenew(v){v&&this.trackCliFlag("no-auto-renew")}trackCliFlagJson(v){v&&this.trackCliFlag("json")}trackCliOptionTimeout(timeout){timeout&&this.trackCliOption({option:"timeout",value:"[TIME]"})}trackCliFlagNoWait(noWait){noWait&&this.trackCliFlag("no-wait")}};function buildBuyCommand(client,domain,opts){let parts=[`domains buy ${domain}`];opts.team&&parts.push(`--scope ${opts.team}`),opts.amount!==void 0&&parts.push(`--amount ${formatAmountArg(opts.amount)}`),opts.useBilling&&parts.push("--use-billing-details");for(let{field,flag}of CONTACT_FIELDS){let value=opts.contact[field];value!==void 0?parts.push(`${flag} ${quoteArg(value)}`):opts.missing.includes(field)&&parts.push(`${flag} <${flag.slice(2)}>`)}return opts.autoRenew===!0&&parts.push("--auto-renew"),opts.autoRenew===!1&&parts.push("--no-auto-renew"),opts.wait?.noWait?parts.push("--no-wait"):opts.wait?.timeout&&parts.push(`--timeout ${quoteArg(opts.wait.timeout)}`),opts.json&&parts.push("--json"),buildCommandWithGlobalFlags(client.argv,parts.join(" "))}function flagFor(field){return CONTACT_FIELDS.find(f=>f.field===field).flag}function usageError(client,message){return reportUsageError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}async function buy(client,argv){let telemetry=new DomainsBuyTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs,flagsSpecification=getFlagsSpecification(buySubcommand.options);try{parsedArgs=parseArguments(argv,flagsSpecification)}catch(error){return client.nonInteractive&&outputAgentError(client,{status:"error",reason:"invalid_arguments",message:error instanceof Error?error.message:String(error)},2),printError(error),2}let{args,flags}=parsedArgs,[domainName]=args;if(telemetry.trackCliArgumentDomain(domainName),telemetry.trackCliOptionAmount(flags["--amount"]),telemetry.trackCliFlagUseBillingDetails(flags["--use-billing-details"]),telemetry.trackCliOptionFirstName(flags["--first-name"]),telemetry.trackCliOptionLastName(flags["--last-name"]),telemetry.trackCliOptionEmail(flags["--email"]),telemetry.trackCliOptionPhone(flags["--phone"]),telemetry.trackCliOptionAddress(flags["--address"]),telemetry.trackCliOptionCity(flags["--city"]),telemetry.trackCliOptionState(flags["--state"]),telemetry.trackCliOptionZip(flags["--zip"]),telemetry.trackCliOptionCountry(flags["--country"]),telemetry.trackCliOptionCompany(flags["--company"]),telemetry.trackCliFlagAutoRenew(flags["--auto-renew"]),telemetry.trackCliFlagNoAutoRenew(flags["--no-auto-renew"]),telemetry.trackCliOptionTimeout(flags["--timeout"]),telemetry.trackCliFlagNoWait(flags["--no-wait"]),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]),!domainName){if(client.nonInteractive){let globalFlags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`domains buy <domain> ${globalFlags.join(" ")}`.trim());outputAgentError(client,{status:"error",reason:"missing_arguments",message:`Missing domain name. Run: ${cmd}`,next:[{command:cmd,when:"Replace <domain> with the domain to buy"}]},2)}return recordCliError({code:AGENT_REASON.MISSING_ARGUMENTS}),output_manager_default.error(`Missing domain name. Run ${getCommandName("domains --help")}`),2}if(args.length>1){let extra=args[1].toLowerCase();return usageError(client,extra==="true"||extra==="false"?"Unexpected extra argument. On/off options like --auto-renew don't take a value: pass --auto-renew or --no-auto-renew.":'Unexpected extra argument. domains buy takes one domain; quote option values that contain spaces, like --address "1 Main St".')}let formatResult=validateJsonOutput(flags);if(!formatResult.valid)return usageError(client,formatResult.error);let asJson=formatResult.jsonOutput,{domain:rootDomain,subdomain}=(0,import_tldts.parse)(domainName);if(subdomain||!rootDomain)return client.nonInteractive&&outputAgentError(client,{status:"error",reason:"invalid_domain",message:`Invalid domain name '${domainName}'. Use a registrable root domain (no subdomain).`},1),recordCliError({code:AGENT_REASON.INVALID_DOMAIN}),output_manager_default.error(`Invalid domain name "${domainName}". Run ${getCommandName("domains --help")}`),1;let amount=parseAmount(flags["--amount"]);if(amount instanceof Error)return usageError(client,amount.message);let wait=parseOrderWait(flags);if(typeof wait=="string")return usageError(client,wait);let fromFlags=readContactFlags(flags);if(typeof fromFlags=="string")return usageError(client,fromFlags);let valuedFlag=chargeFlagWithValue(argv,["--auto-renew","--no-auto-renew","--use-billing-details"]);if(valuedFlag)return usageError(client,valuedFlag);let useBilling=!!flags["--use-billing-details"];if(flags["--auto-renew"]&&flags["--no-auto-renew"])return usageError(client,"Can't use --auto-renew with --no-auto-renew.");let autoRenewChoice=flags["--auto-renew"]?!0:flags["--no-auto-renew"]?!1:void 0,{contextName,team}=await getScope(client),commandOptions={team:team?.slug,useBilling,contact:fromFlags,autoRenew:autoRenewChoice,wait:{noWait:wait.noWait,timeout:flags["--timeout"]===void 0?void 0:wait.timeout},json:asJson},availableStamp=stamp_default(),[domainPrice,domainStatus]=await Promise.all([getDomainPrice(client,domainName),getDomainStatus(client,domainName)]);if(!domainStatus.available){if(await isPurchasedSince(client,domainName,0)){if(!canPromptForCharge(client,asJson)&&team){let refused=refuseUnnamedTeam(client,asJson,{verb:"buy",domain:domainName,team,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount,missing:[]})});if(refused!==void 0)return refused}return reportAlreadyOwned(client,asJson,domainName,contextName,{autoRenew:autoRenewChoice})}return reportChargeFailure(client,asJson,{reason:AGENT_REASON.DOMAIN_NOT_AVAILABLE,message:`The domain ${domainName} is unavailable.`})}if(domainPrice instanceof Error)return reportChargeFailure(client,asJson,{reason:chargeFailureReason(domainPrice),message:domainPrice.message});let{years,purchasePrice,renewalPrice}=domainPrice;if(purchasePrice===null||renewalPrice===null)return reportChargeFailure(client,asJson,{reason:AGENT_REASON.API_ERROR,message:`The price of ${domainName} was not found.`});output_manager_default.log(`The domain ${param(domainName)} is ${import_chalk.default.underline("available")} to buy under ${import_chalk.default.bold(contextName)}! ${availableStamp()}`);let billing=getBillingContact(team),contact=mergeContact(fromFlags,useBilling?billing:{});if(amount!==void 0&&!amountMatchesPrice(amount,purchasePrice))return reportPriceChanged(client,{verb:"buy",domain:domainName,amount,price:purchasePrice,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount:purchasePrice,missing:missingContactFields(contact)}),json:asJson});let autoRenew,contactInformation;if(canPromptForCharge(client,asJson)){if(amount===void 0&&!await client.input.confirm(`Buy now for ${import_chalk.default.bold(formatUsd(purchasePrice))} (${formatTerm(years)})?`,!1))return trackApprovalOutcome(client,"purchase","declined"),0;autoRenew=autoRenewChoice??await client.input.confirm(years===1?`Auto renew yearly for ${import_chalk.default.bold(formatUsd(renewalPrice))}?`:`Auto renew every ${years} years for ${import_chalk.default.bold(formatUsd(renewalPrice))}?`,!0),contactInformation=await collectContactInformation(client,{provided:contact,defaults:mergeContact(fromFlags,billing)})}else{let missing=missingContactFields(contact);if(amount===void 0||missing.length>0||autoRenewChoice===void 0)return refuseWithoutApproval(client,{domain:domainName,team:team?.slug,contextName,price:purchasePrice,renewalPrice,years,amount,fromFlags,billing,useBilling,autoRenew:autoRenewChoice,wait:commandOptions.wait,json:asJson});if(team){let refused=refuseUnnamedTeam(client,asJson,{verb:"buy",domain:domainName,team,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount,missing:[]})});if(refused!==void 0)return refused}autoRenew=autoRenewChoice,contactInformation={...contact,companyName:contact.companyName||void 0}}let inspectCommand=buildCommandWithGlobalFlags(client.argv,`domains inspect ${domainName}`),buyResult,purchaseStamp=stamp_default();output_manager_default.spinner("Purchasing");try{buyResult=await purchaseDomain(client,domainName,purchasePrice,years,autoRenew,contactInformation,{waitMs:wait.waitMs,onOrderAccepted:orderId=>{asJson||wait.noWait||(output_manager_default.stopSpinner(),output_manager_default.log(`Order ${orderId} accepted.`),output_manager_default.spinner(`Waiting on the registrar to register ${domainName}`))}})}catch(err){output_manager_default.stopSpinner(),output_manager_default.debug(`Server response: ${(0,import_error_utils.errorToString)(err)}`);let apiError=isAPIError(err)?err:void 0;return reportChargeFailure(client,asJson,{reason:AGENT_REASON.API_ERROR,message:apiError?`Couldn't buy ${domainName}. The API returned an error (${apiError.code}). Nothing was charged.`:`Couldn't buy ${domainName}. The order wasn't sent, so nothing was charged.`},{apiMessage:apiError?.serverMessage})}if(output_manager_default.stopSpinner(),buyResult instanceof DomainPriceChanged)return reportPriceChanged(client,{verb:"buy",domain:domainName,amount:purchasePrice,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,missing:[]}),json:asJson});if(buyResult instanceof DomainChargeOutcomeUnknown)return reportUnknownOutcome(client,asJson,{verb:"buy",domain:domainName,inspectCommand,orderId:buyResult.meta.orderId});if(buyResult instanceof DomainPurchaseInProgress){let{orderId}=buyResult.meta;return reportChargeFailure(client,asJson,{reason:AGENT_REASON.PURCHASE_IN_PROGRESS,message:buyResult.message,retryable:!1,data:{domain:domainName,remote:"none",...orderId&&{orderId}},next:[...orderId?[orderStatusStep(client,{verb:"buy",domain:domainName,orderId})]:[],{command:inspectCommand,when:"Once that order finishes, see the domain"}]})}return buyResult instanceof DomainPaymentAuthenticationRequired?reportChargeFailure(client,asJson,{reason:AGENT_REASON.PAYMENT_AUTHENTICATION_REQUIRED,message:buyResult.message,userActionRequired:!0,verification_uri:buyResult.meta.url}):buyResult instanceof Error?reportChargeFailure(client,asJson,{reason:chargeFailureReason(buyResult),message:buyResult.message}):buyResult.status==="already_owned"?reportAlreadyOwned(client,asJson,domainName,contextName,{autoRenew,duplicate:{orderId:buyResult.orderId,orderOutcome:buyResult.orderOutcome}}):buyResult.status==="pending"?reportOrderPending(client,asJson,{verb:"buy",domain:domainName,orderId:buyResult.orderId,lastStatus:buyResult.lastStatus,readError:buyResult.readError,inspectCommand,wait}):asJson?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,domain:domainName,years,charge:{amount:purchasePrice,currency:"USD"},orderId:buyResult.orderId,autoRenew,renewalPrice,message:`Domain ${domainName} purchased.`},null,2)}
|
|
7
|
+
import{require_cjs}from"./chunk-ZJTN7U74.js";import{CONTACT_FIELDS,billingFieldsUsed,collectContactInformation,getBillingContact,getDomainPrice,getDomainStatus,isPurchasedSince,mergeContact,missingContactFields,purchaseDomain,readContactFlags}from"./chunk-BVHXBPKR.js";import{stamp_default}from"./chunk-LY3EY2VG.js";import{amountMatchesPrice,canPromptForCharge,chargeFailureReason,chargeFlagWithValue,formatAmountArg,formatTerm,orderStatusStep,parseAmount,parseOrderWait,printChargeRecovery,refuseUnnamedTeam,reportChargeFailure,reportOrderPending,reportPriceChanged,reportUnknownOutcome,reportUsageError,trackApprovalOutcome,writeChargeAction}from"./chunk-DBPL6EVR.js";import{formatUsd}from"./chunk-ZUWIJMH2.js";import{param}from"./chunk-ERMHTPO4.js";import{buySubcommand}from"./chunk-DFZRZPCJ.js";import{getScope}from"./chunk-H3HSH5FW.js";import{TelemetryClient}from"./chunk-QROPMCL2.js";import{printError}from"./chunk-QI7BWXRV.js";import{parseArguments}from"./chunk-E7ICSU45.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-3QTP26QS.js";import{validateJsonOutput}from"./chunk-BDLZ6WL2.js";import{DomainChargeOutcomeUnknown,DomainPaymentAuthenticationRequired,DomainPriceChanged,DomainPurchaseInProgress,isAPIError}from"./chunk-UNAQQ5DF.js";import{getCommandName,getCommandNamePlain}from"./chunk-EFGZK6OY.js";import{output_manager_default,recordCliError}from"./chunk-RIXTYUYN.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{getFlagsSpecification,getGlobalFlagsFromArgs,quoteArg}from"./chunk-CUO3CYU3.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{require_strip_ansi}from"./chunk-LPYHYTYI.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1),import_strip_ansi=__toESM(require_strip_ansi(),1),import_tldts=__toESM(require_cjs(),1),import_error_utils=__toESM(require_dist(),1);var DomainsBuyTelemetryClient=class extends TelemetryClient{trackCliArgumentDomain(v){v&&this.trackCliArgument({arg:"domain",value:this.redactedValue})}trackCliOptionAmount(v){this.trackRedactedCliOption("amount",v)}trackCliFlagUseBillingDetails(v){v&&this.trackCliFlag("use-billing-details")}trackCliOptionFirstName(v){this.trackRedactedCliOption("first-name",v)}trackCliOptionLastName(v){this.trackRedactedCliOption("last-name",v)}trackCliOptionEmail(v){this.trackRedactedCliOption("email",v)}trackCliOptionPhone(v){this.trackRedactedCliOption("phone",v)}trackCliOptionAddress(v){this.trackRedactedCliOption("address",v)}trackCliOptionCity(v){this.trackRedactedCliOption("city",v)}trackCliOptionState(v){this.trackRedactedCliOption("state",v)}trackCliOptionZip(v){this.trackRedactedCliOption("zip",v)}trackCliOptionCountry(v){this.trackRedactedCliOption("country",v)}trackCliOptionCompany(v){this.trackRedactedCliOption("company",v)}trackCliFlagAutoRenew(v){v&&this.trackCliFlag("auto-renew")}trackCliFlagNoAutoRenew(v){v&&this.trackCliFlag("no-auto-renew")}trackCliFlagJson(v){v&&this.trackCliFlag("json")}trackCliOptionTimeout(timeout){timeout&&this.trackCliOption({option:"timeout",value:"[TIME]"})}trackCliFlagNoWait(noWait){noWait&&this.trackCliFlag("no-wait")}};function buildBuyCommand(client,domain,opts){let parts=[`domains buy ${domain}`];opts.team&&parts.push(`--scope ${opts.team}`),opts.amount!==void 0&&parts.push(`--amount ${formatAmountArg(opts.amount)}`),opts.useBilling&&parts.push("--use-billing-details");for(let{field,flag}of CONTACT_FIELDS){let value=opts.contact[field];value!==void 0?parts.push(`${flag} ${quoteArg(value)}`):opts.missing.includes(field)&&parts.push(`${flag} <${flag.slice(2)}>`)}return opts.autoRenew===!0&&parts.push("--auto-renew"),opts.autoRenew===!1&&parts.push("--no-auto-renew"),opts.wait?.noWait?parts.push("--no-wait"):opts.wait?.timeout&&parts.push(`--timeout ${quoteArg(opts.wait.timeout)}`),opts.json&&parts.push("--json"),buildCommandWithGlobalFlags(client.argv,parts.join(" "))}function flagFor(field){return CONTACT_FIELDS.find(f=>f.field===field).flag}function usageError(client,message){return reportUsageError(client,AGENT_REASON.INVALID_ARGUMENTS,message)}async function buy(client,argv){let telemetry=new DomainsBuyTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArgs,flagsSpecification=getFlagsSpecification(buySubcommand.options);try{parsedArgs=parseArguments(argv,flagsSpecification)}catch(error){return client.nonInteractive&&outputAgentError(client,{status:"error",reason:"invalid_arguments",message:error instanceof Error?error.message:String(error)},2),printError(error),2}let{args,flags}=parsedArgs,[domainName]=args;if(telemetry.trackCliArgumentDomain(domainName),telemetry.trackCliOptionAmount(flags["--amount"]),telemetry.trackCliFlagUseBillingDetails(flags["--use-billing-details"]),telemetry.trackCliOptionFirstName(flags["--first-name"]),telemetry.trackCliOptionLastName(flags["--last-name"]),telemetry.trackCliOptionEmail(flags["--email"]),telemetry.trackCliOptionPhone(flags["--phone"]),telemetry.trackCliOptionAddress(flags["--address"]),telemetry.trackCliOptionCity(flags["--city"]),telemetry.trackCliOptionState(flags["--state"]),telemetry.trackCliOptionZip(flags["--zip"]),telemetry.trackCliOptionCountry(flags["--country"]),telemetry.trackCliOptionCompany(flags["--company"]),telemetry.trackCliFlagAutoRenew(flags["--auto-renew"]),telemetry.trackCliFlagNoAutoRenew(flags["--no-auto-renew"]),telemetry.trackCliOptionTimeout(flags["--timeout"]),telemetry.trackCliFlagNoWait(flags["--no-wait"]),telemetry.trackCliOptionFormat(flags["--format"]),telemetry.trackCliFlagJson(flags["--json"]),!domainName){if(client.nonInteractive){let globalFlags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`domains buy <domain> ${globalFlags.join(" ")}`.trim());outputAgentError(client,{status:"error",reason:"missing_arguments",message:`Missing domain name. Run: ${cmd}`,next:[{command:cmd,when:"Replace <domain> with the domain to buy"}]},2)}return recordCliError({code:AGENT_REASON.MISSING_ARGUMENTS}),output_manager_default.error(`Missing domain name. Run ${getCommandName("domains --help")}`),2}if(args.length>1){let extra=args[1].toLowerCase();return usageError(client,extra==="true"||extra==="false"?"Unexpected extra argument. On/off options like --auto-renew don't take a value: pass --auto-renew or --no-auto-renew.":'Unexpected extra argument. domains buy takes one domain; quote option values that contain spaces, like --address "1 Main St".')}let formatResult=validateJsonOutput(flags);if(!formatResult.valid)return usageError(client,formatResult.error);let asJson=formatResult.jsonOutput,{domain:rootDomain,subdomain}=(0,import_tldts.parse)(domainName);if(subdomain||!rootDomain)return client.nonInteractive&&outputAgentError(client,{status:"error",reason:"invalid_domain",message:`Invalid domain name '${domainName}'. Use a registrable root domain (no subdomain).`},1),recordCliError({code:AGENT_REASON.INVALID_DOMAIN}),output_manager_default.error(`Invalid domain name "${domainName}". Run ${getCommandName("domains --help")}`),1;let amount=parseAmount(flags["--amount"]);if(amount instanceof Error)return usageError(client,amount.message);let wait=parseOrderWait(flags);if(typeof wait=="string")return usageError(client,wait);let fromFlags=readContactFlags(flags);if(typeof fromFlags=="string")return usageError(client,fromFlags);let valuedFlag=chargeFlagWithValue(argv,["--auto-renew","--no-auto-renew","--use-billing-details"]);if(valuedFlag)return usageError(client,valuedFlag);let useBilling=!!flags["--use-billing-details"];if(flags["--auto-renew"]&&flags["--no-auto-renew"])return usageError(client,"Can't use --auto-renew with --no-auto-renew.");let autoRenewChoice=flags["--auto-renew"]?!0:flags["--no-auto-renew"]?!1:void 0,{contextName,team}=await getScope(client),commandOptions={team:team?.slug,useBilling,contact:fromFlags,autoRenew:autoRenewChoice,wait:{noWait:wait.noWait,timeout:flags["--timeout"]===void 0?void 0:wait.timeout},json:asJson},availableStamp=stamp_default(),[domainPrice,domainStatus]=await Promise.all([getDomainPrice(client,domainName),getDomainStatus(client,domainName)]);if(!domainStatus.available){if(await isPurchasedSince(client,domainName,0)){if(!canPromptForCharge(client,asJson)&&team){let refused=refuseUnnamedTeam(client,asJson,{verb:"buy",domain:domainName,team,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount,missing:[]})});if(refused!==void 0)return refused}return reportAlreadyOwned(client,asJson,domainName,contextName,{autoRenew:autoRenewChoice})}return reportChargeFailure(client,asJson,{reason:AGENT_REASON.DOMAIN_NOT_AVAILABLE,message:`The domain ${domainName} is unavailable.`})}if(domainPrice instanceof Error)return reportChargeFailure(client,asJson,{reason:chargeFailureReason(domainPrice),message:domainPrice.message});let{years,purchasePrice,renewalPrice}=domainPrice;if(purchasePrice===null||renewalPrice===null)return reportChargeFailure(client,asJson,{reason:AGENT_REASON.API_ERROR,message:`The price of ${domainName} was not found.`});output_manager_default.log(`The domain ${param(domainName)} is ${import_chalk.default.underline("available")} to buy under ${import_chalk.default.bold(contextName)}! ${availableStamp()}`);let billing=getBillingContact(team),contact=mergeContact(fromFlags,useBilling?billing:{});if(amount!==void 0&&!amountMatchesPrice(amount,purchasePrice))return reportPriceChanged(client,{verb:"buy",domain:domainName,amount,price:purchasePrice,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount:purchasePrice,missing:missingContactFields(contact)}),json:asJson});let autoRenew,contactInformation;if(canPromptForCharge(client,asJson)){if(amount===void 0&&!await client.input.confirm(`Buy now for ${import_chalk.default.bold(formatUsd(purchasePrice))} (${formatTerm(years)})?`,!1))return trackApprovalOutcome(client,"purchase","declined"),0;autoRenew=autoRenewChoice??await client.input.confirm(years===1?`Auto renew yearly for ${import_chalk.default.bold(formatUsd(renewalPrice))}?`:`Auto renew every ${years} years for ${import_chalk.default.bold(formatUsd(renewalPrice))}?`,!0),contactInformation=await collectContactInformation(client,{provided:contact,defaults:mergeContact(fromFlags,billing)})}else{let missing=missingContactFields(contact);if(amount===void 0||missing.length>0||autoRenewChoice===void 0)return refuseWithoutApproval(client,{domain:domainName,team:team?.slug,contextName,price:purchasePrice,renewalPrice,years,amount,fromFlags,billing,useBilling,autoRenew:autoRenewChoice,wait:commandOptions.wait,json:asJson});if(team){let refused=refuseUnnamedTeam(client,asJson,{verb:"buy",domain:domainName,team,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,amount,missing:[]})});if(refused!==void 0)return refused}autoRenew=autoRenewChoice,contactInformation={...contact,companyName:contact.companyName||void 0}}let inspectCommand=buildCommandWithGlobalFlags(client.argv,`domains inspect ${domainName}`),buyResult,purchaseStamp=stamp_default();output_manager_default.spinner("Purchasing");try{buyResult=await purchaseDomain(client,domainName,purchasePrice,years,autoRenew,contactInformation,{waitMs:wait.waitMs,onOrderAccepted:orderId=>{asJson||wait.noWait||(output_manager_default.stopSpinner(),output_manager_default.log(`Order ${orderId} accepted.`),output_manager_default.spinner(`Waiting on the registrar to register ${domainName}`))}})}catch(err){output_manager_default.stopSpinner(),output_manager_default.debug(`Server response: ${(0,import_error_utils.errorToString)(err)}`);let apiError=isAPIError(err)?err:void 0;return reportChargeFailure(client,asJson,{reason:AGENT_REASON.API_ERROR,message:apiError?`Couldn't buy ${domainName}. The API returned an error (${apiError.code}). Nothing was charged.`:`Couldn't buy ${domainName}. The order wasn't sent, so nothing was charged.`},{apiMessage:apiError?.serverMessage})}if(output_manager_default.stopSpinner(),buyResult instanceof DomainPriceChanged)return reportPriceChanged(client,{verb:"buy",domain:domainName,amount:purchasePrice,nextCommand:buildBuyCommand(client,domainName,{...commandOptions,missing:[]}),json:asJson});if(buyResult instanceof DomainChargeOutcomeUnknown)return reportUnknownOutcome(client,asJson,{verb:"buy",domain:domainName,inspectCommand,cause:buyResult.meta.cause,orderId:buyResult.meta.orderId});if(buyResult instanceof DomainPurchaseInProgress){let{orderId}=buyResult.meta;return reportChargeFailure(client,asJson,{reason:AGENT_REASON.PURCHASE_IN_PROGRESS,message:buyResult.message,retryable:!1,data:{domain:domainName,remote:"none",...orderId&&{orderId}},next:[...orderId?[orderStatusStep(client,{verb:"buy",domain:domainName,orderId})]:[],{command:inspectCommand,when:"Once that order finishes, see the domain"}]})}return buyResult instanceof DomainPaymentAuthenticationRequired?reportChargeFailure(client,asJson,{reason:AGENT_REASON.PAYMENT_AUTHENTICATION_REQUIRED,message:buyResult.message,userActionRequired:!0,verification_uri:buyResult.meta.url}):buyResult instanceof Error?reportChargeFailure(client,asJson,{reason:chargeFailureReason(buyResult),message:buyResult.message}):buyResult.status==="already_owned"?reportAlreadyOwned(client,asJson,domainName,contextName,{autoRenew,duplicate:{orderId:buyResult.orderId,orderOutcome:buyResult.orderOutcome}}):buyResult.status==="pending"?reportOrderPending(client,asJson,{verb:"buy",domain:domainName,orderId:buyResult.orderId,lastStatus:buyResult.lastStatus,readError:buyResult.readError,inspectCommand,wait}):asJson?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,domain:domainName,years,charge:{amount:purchasePrice,currency:"USD"},orderId:buyResult.orderId,autoRenew,renewalPrice,message:`Domain ${domainName} purchased.`},null,2)}
|
|
8
8
|
`),0):(client.stdout.write(`${domainName}
|
|
9
9
|
`),output_manager_default.success(`Domain ${param(domainName)} purchased ${purchaseStamp()}`),output_manager_default.log(`Charged ${formatUsd(purchasePrice)} for ${formatTerm(years)}. Registered to ${contactInformation.firstName} ${contactInformation.lastName} (${contactInformation.email}).`),output_manager_default.note(`You may now use your domain as an alias to your deployments. Run ${getCommandName("alias --help")}`),0)}function reportAlreadyOwned(client,json,domain,contextName,opts={}){let{duplicate,autoRenew}=opts,autoRenewCommand=autoRenew===void 0?void 0:buildCommandWithGlobalFlags(client.argv,`domains auto-renew ${autoRenew?"enable":"disable"} ${domain}`),message=[duplicate?`${domain} is already registered to ${contextName} by an earlier purchase. This run's order ${duplicate.orderId} ${duplicate.orderOutcome==="refunded"?"failed, and its charge was refunded":"failed"}.`:`${domain} is already registered to ${contextName}. Nothing was charged.`,autoRenewCommand?`This run didn't change its auto-renew setting; to turn it ${autoRenew?"on":"off"}, run ${autoRenewCommand}.`:""].filter(Boolean).join(" ");return json?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,domain,outcome:"unchanged",...duplicate&&{orderId:duplicate.orderId,orderStatus:duplicate.orderOutcome},message,...autoRenewCommand&&{next:[{command:autoRenewCommand,when:`To turn auto-renew ${autoRenew?"on":"off"} for the existing registration`}]}},null,2)}
|
|
10
10
|
`),0):(client.stdout.write(`${domain}
|
|
@@ -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{getContextName}from"./chunk-
|
|
7
|
+
import{getContextName}from"./chunk-H3HSH5FW.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,isAPIError}from"./chunk-UNAQQ5DF.js";async function getAliases(client,deploymentId,next,limit=20){let aliasUrl=`/v3/now/aliases?limit=${limit}`;next&&(aliasUrl+=`&until=${next}`);let to=deploymentId?`/now/deployments/${deploymentId}/aliases`:aliasUrl;try{return await client.fetch(to)}catch(err){if(isAPIError(err)){let contextName=await getContextName(client,{allowOwnerLookupFallback:!0});if(err.status===404)throw new DeploymentNotFound({id:deploymentId,context:contextName});if(err.status===403&&deploymentId)throw new DeploymentPermissionDenied(deploymentId,contextName);if(err.status===400&&err.message.includes("`id`")&&deploymentId)throw new InvalidDeploymentId(deploymentId)}throw err}}export{getAliases};
|
|
@@ -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{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunk-
|
|
7
|
+
import{FILTER_DEPRECATION_WARNING,alignTimeRangeToGranularity,canonicalResponseToMetricsResponse,createCanonicalMetricsRequest,usesODataSyntax}from"./chunk-ZNKDVMRD.js";import{OBSERVABILITY_METRICS_PATH,fetchCatalogMetricDetailOrExit}from"./chunk-YM52B2ZV.js";import{computeGranularity,formatText,getDefaultCustomMetricAggregation}from"./chunk-6SK6TOSJ.js";import{formatErrorJson,formatQueryJson,getRollupColumnName,handleApiError,toPublicQueryMeta}from"./chunk-P7QYBTLJ.js";import{validateAllProjectMutualExclusivity}from"./chunk-6JY43KSR.js";import{resolveTimeRange}from"./chunk-FIICEEXO.js";import{warnDeprecatedProdFlag}from"./chunk-7IHVCKUV.js";import{getRenamedOption}from"./chunk-237WN2MK.js";import{metricsCommand}from"./chunk-6XXXPJBV.js";import{getScope}from"./chunk-H3HSH5FW.js";import{getLinkedProject}from"./chunk-H4BQDKOU.js";import{getProjectByNameOrId}from"./chunk-VO5M6G7M.js";import{printError}from"./chunk-QI7BWXRV.js";import{getTypedOptionName,parseArguments}from"./chunk-E7ICSU45.js";import{validateJsonOutput}from"./chunk-BDLZ6WL2.js";import{ProjectNotFound,isAPIError}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{getFlagsSpecification}from"./chunk-CUO3CYU3.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function validateRequiredMetric(metric){return metric?{valid:!0,value:metric}:{valid:!1,code:"MISSING_METRIC",message:`Missing required metric. Specify the metric to query.
|
|
8
8
|
|
|
9
9
|
Run 'vercel metrics schema' to see available metrics.`}}function validateOrderDirection(orderDirection){return orderDirection===void 0?{valid:!0,value:void 0}:orderDirection==="asc"||orderDirection==="desc"?{valid:!0,value:orderDirection}:{valid:!1,code:"INVALID_ORDER",message:`Invalid order "${orderDirection}". Use "asc" or "desc".`,allowedValues:["asc","desc"]}}function validateOrderBy(orderBy){return orderBy===void 0?{valid:!0,value:void 0}:orderBy==="value"||orderBy==="count"?{valid:!0,value:orderBy}:{valid:!1,code:"INVALID_ORDER_BY",message:`Invalid order-by "${orderBy}". Use "value" or "count".`,allowedValues:["value","count"]}}function handleValidationError(result,jsonOutput,client,telemetry){return telemetry.trackCliError(result.code),jsonOutput?client.stdout.write(formatErrorJson(result.code,result.message,result.allowedValues)):(output_manager_default.error(result.message),result.allowedValues&&result.allowedValues.length>0&&output_manager_default.print(`
|
|
10
10
|
Available values: ${result.allowedValues.join(", ")}
|
|
@@ -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{formatErrorJson,handleApiError}from"./chunk-
|
|
7
|
+
import{formatErrorJson,handleApiError}from"./chunk-P7QYBTLJ.js";import{isAPIError}from"./chunk-UNAQQ5DF.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";var OBSERVABILITY_METRICS_PATH="/metrics/v1",METRIC_CATALOG_PAGE_SIZE=250;async function fetchMetricCatalog(client,accountId,kind,search,activeSince){let metrics=[],cursor=null;do{let searchParams=new URLSearchParams({limit:String(METRIC_CATALOG_PAGE_SIZE),kind});search&&searchParams.set("search",search),activeSince&&searchParams.set("activeSince",activeSince),cursor&&searchParams.set("cursor",cursor);let response=await client.fetch(`${OBSERVABILITY_METRICS_PATH}?${searchParams}`,{accountId,bailOn429:!0});metrics.push(...response.metrics.map(metric=>({id:metric.id,description:metric.description,dimensions:metric.dimensions,unit:metric.unit,aggregations:metric.aggregations}))),cursor=response.pagination.hasMore?response.pagination.nextCursor:null}while(cursor);return metrics.filter(metric=>(kind==="all"||(kind==="system"?metric.id.startsWith("vercel."):!metric.id.startsWith("vercel.")))&&(!search||metric.id.startsWith(search))).sort((left,right)=>left.id.localeCompare(right.id))}async function fetchCatalogMetricDetail(client,accountId,metricId,kind,activeSince){let metrics=await fetchMetricCatalog(client,accountId,kind,metricId,activeSince),exactMetric=metrics.find(metric=>metric.id===metricId);return exactMetric?[exactMetric]:metrics}async function fetchSchemaOrExit(client,jsonOutput,operation,accountId){try{return await operation()}catch(err){if(isAPIError(err))return handleApiError(err,jsonOutput,client,{401:{code:"SCHEMA_UNAUTHORIZED",message:"The metrics schema API request was not authorized. Run `vercel login` to authenticate and `vercel switch` to select a team, then try again."},403:{code:"SCHEMA_UNAUTHORIZED",message:"The metrics schema API request was not authorized. Run `vercel login` to authenticate and `vercel switch` to select a team, then try again."}},accountId?.startsWith("team_")?{scope:accountId}:{});let message=err instanceof Error?`Failed to fetch metrics schema: ${err.message}`:`Failed to fetch metrics schema: ${String(err)}`;return jsonOutput?client.stdout.write(formatErrorJson("SCHEMA_FETCH_FAILED",message)):output_manager_default.error(message),1}}function fetchCatalogMetricDetailOrExit(client,accountId,jsonOutput,metricId,kind,activeSince){return fetchSchemaOrExit(client,jsonOutput,()=>fetchCatalogMetricDetail(client,accountId,metricId,kind,activeSince),accountId)}function fetchMetricCatalogListOrExit(client,accountId,jsonOutput){return fetchSchemaOrExit(client,jsonOutput,()=>fetchMetricCatalog(client,accountId,"all").then(metrics=>metrics.map(({id,description})=>({id,description}))),accountId)}export{OBSERVABILITY_METRICS_PATH,fetchCatalogMetricDetailOrExit,fetchMetricCatalogListOrExit};
|
|
@@ -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{ensureLink}from"./chunk-
|
|
7
|
+
import{ensureLink}from"./chunk-UITNWLE7.js";import{getScope}from"./chunk-H3HSH5FW.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";async function ensureMicrofrontendsContext(client,options){let link=await ensureLink("microfrontends",client,client.cwd,{autoConfirm:options?.autoConfirm});if(typeof link=="number")return link;let{project,org,repoRoot}=link;if(org.type!=="team")return output_manager_default.error("Microfrontends are only available for teams."),1;client.config.currentTeam=org.id;let{team}=await getScope(client);return team?{project,org,team,repoRoot}:(output_manager_default.error("Microfrontends are only available for teams."),1)}async function fetchMicrofrontendsGroups(client,teamId){output_manager_default.spinner("Fetching microfrontends groups\u2026");let response=await client.fetch(`/v1/microfrontends/groups?teamId=${teamId}`,{method:"GET"});return output_manager_default.stopSpinner(),response}function validateDefaultRoute(path){if(!path||!path.startsWith("/"))return"Route must start with /";if(/\s/.test(path))return"Route must not contain spaces";if(path.includes("?")||path.includes("#"))return"Route must not contain query strings or fragments";try{new URL(path,"http://n")}catch{return"Route is not a valid URL path"}return!0}function validateRoutingPath(path){return!path||!path.startsWith("/")?"Path must start with /. See https://vercel.com/docs/microfrontends/path-routing for supported syntax.":/\s/.test(path)?"Path must not contain spaces. See https://vercel.com/docs/microfrontends/path-routing for supported syntax.":!0}export{ensureMicrofrontendsContext,fetchMicrofrontendsGroups,validateDefaultRoute,validateRoutingPath};
|
|
@@ -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{AGENT_REASON,writeActionRequired}from"./chunk-
|
|
7
|
+
import{AGENT_REASON,writeActionRequired}from"./chunk-3QTP26QS.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";var FIRST_DEPLOYMENT_PRODUCTION_NOTICE="This is the project\u2019s first deployment, so it will go to production.";function isNonProductionTarget(target){return!!target&&target!=="production"}async function hasDeployment(client,org,projectId){let{deployments}=await client.fetch(`/v6/deployments?projectId=${encodeURIComponent(projectId)}&limit=1`,{accountId:org.id});return deployments.length>0}async function hasEarlierDeployment(client,org,projectId,listedDeployments){if(listedDeployments?.length)return!0;try{return await hasDeployment(client,org,projectId)}catch(err){return output_manager_default.debug(`Couldn't check the project for earlier deployments: ${err}`),!0}}function refuseFirstDeployment(client,{target,newProject,prodCommand,prepareCommands=[]}){let environment=target==="preview"?"Preview":target,cause=newProject?"This deploy would create a new project":"This project has no deployments yet",recovery=prepareCommands.length?"pull its Production settings, build again with --prod, then retry with --prod":"retry with --prod",message=`Can't create a ${environment} deployment. ${cause}, and a project's first deployment is assigned to Production. To deploy to Production, ${recovery}. Later deployments can use --environment ${target}.`,note=prodCommand.note?`; ${prodCommand.note}`:"",steps=prepareCommands.length?[...prepareCommands,{command:prodCommand.command,action:`deploy the build to Production${note}`}]:[{command:prodCommand.command,action:`deploy to Production instead${note}`}];return client.nonInteractive&&writeActionRequired(client,{status:"action_required",reason:AGENT_REASON.FIRST_DEPLOYMENT_PRODUCTION,message,userActionRequired:!0,hint:"Ask the user before deploying to Production.",next:steps.map((step,i)=>({command:step.command,when:i===0?`Only after the user approves: ${step.action}`:`Then ${step.action}`}))}),output_manager_default.error(`${message}
|
|
8
8
|
|
|
9
9
|
${steps.map((step,i)=>`${i===0?"To":"Then"} ${step.action}:
|
|
10
10
|
${step.command}`).join(`
|