@gadicc/loom 1.30.0 → 1.31.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.
@@ -85,6 +85,7 @@ const retention_js_1 = require("../apiKeys/retention.js");
85
85
  const projectSkills_js_1 = require("./projectSkills.js");
86
86
  const migrationEnv_js_1 = require("./migrationEnv.js");
87
87
  const vercelBuildEnv_js_1 = require("./vercelBuildEnv.js");
88
+ const vercelProjectRelease_js_1 = require("./vercelProjectRelease.js");
88
89
  const projectTooling_js_1 = require("./projectTooling.js");
89
90
  exports.DEFAULT_LOOM_RANGE = "^1.0.0";
90
91
  exports.LOOM_DEPENDENCY = "@gadicc/loom";
@@ -3377,6 +3378,7 @@ function workflowStepRunsDbMigrate(block) {
3377
3378
  /spawnSync\(\s*["']pnpm["'][\s\S]*["']db:migrate["']/.test(block);
3378
3379
  }
3379
3380
  function workflowStepUsesVercelCommand(block, subcommand) {
3381
+ block = block.replace(/\\\r?\n\s*/g, " ");
3380
3382
  const launcher = String
3381
3383
  .raw `(?:vercel|deno\s+run\s+-A\s+npm:vercel(?:@[^\s]+)?|pnpm\s+(?:dlx|exec)\s+vercel(?:@[^\s]+)?|npx\s+vercel(?:@[^\s]+)?|yarn\s+(?:dlx\s+)?vercel(?:@[^\s]+)?|bunx\s+vercel(?:@[^\s]+)?)`;
3382
3384
  const globalFlags = String
@@ -3392,8 +3394,13 @@ function workflowStepBuildsVercelProductionArtifact(block) {
3392
3394
  return workflowStepUsesVercelCommand(block, "build") &&
3393
3395
  /\s--prod\b/.test(block);
3394
3396
  }
3397
+ function workflowStepBuildsStandaloneVercelProductionArtifact(block) {
3398
+ return workflowStepBuildsVercelProductionArtifact(block) &&
3399
+ /\s--standalone\b/.test(block);
3400
+ }
3395
3401
  function workflowStepPreservesVercelProductionEnv(block) {
3396
- return workflowStepPullsVercelProductionSettings(block) &&
3402
+ return (workflowStepPullsVercelProductionSettings(block) ||
3403
+ workflowStepPreparesVercelProject(block)) &&
3397
3404
  /\bcp\s+\.vercel\/\.env\.production\.local\s+["']?\$RUNNER_TEMP\/vercel-production\.env["']?/
3398
3405
  .test(block);
3399
3406
  }
@@ -3402,6 +3409,14 @@ function workflowStepQueriesVercelProductionEnvMetadata(block) {
3402
3409
  /\benv\s+ls\s+production\b/.test(block) &&
3403
3410
  /\s--format(?:=|\s+)json\b/.test(block);
3404
3411
  }
3412
+ function workflowStepPreparesVercelProject(block) {
3413
+ block = block.replace(/\\\r?\n\s*/g, " ");
3414
+ return /\bloom\b[\s\S]*\bdb\s+release\s+prepare-vercel-project\s+production\b/
3415
+ .test(block) &&
3416
+ /\.vercel\/\.env\.production\.local\b/.test(block) &&
3417
+ /vercel-production-env\.json\b/.test(block) &&
3418
+ /\.vercel\/project\.json\b/.test(block);
3419
+ }
3405
3420
  function workflowStepPreparesVercelBuildEnv(block) {
3406
3421
  return (/\bvercel-build-env(?:\.mjs)?\b[\s\S]*\bprepare\b/.test(block) ||
3407
3422
  /\bloom\b[\s\S]*\bdb\s+release\s+prepare-build-env\b/.test(block));
@@ -3439,12 +3454,28 @@ function workflowStepRestoresVercelMigrationEnv(block) {
3439
3454
  function workflowStepPromotesVercelDeployment(block) {
3440
3455
  return workflowStepUsesVercelCommand(block, "promote");
3441
3456
  }
3457
+ function workflowStepPromotesVercelDeploymentWithLoom(block) {
3458
+ return /\bloom\b[\s\S]*\bdb\s+release\s+promote-vercel\b/.test(block);
3459
+ }
3460
+ function workflowStepUsesMaterializedVercelLink(block) {
3461
+ block = block.replace(/\\\r?\n\s*/g, " ");
3462
+ const launcher = String
3463
+ .raw `(?:vercel|deno\s+run\s+-A\s+npm:vercel(?:@[^\s]+)?|pnpm\s+(?:dlx|exec)\s+vercel(?:@[^\s]+)?|npx\s+vercel(?:@[^\s]+)?|yarn\s+(?:dlx\s+)?vercel(?:@[^\s]+)?|bunx\s+vercel(?:@[^\s]+)?)`;
3464
+ const prefix = block.match(new RegExp(String.raw `\benv\s+([^\n]*?)(?=\b${launcher}\b)`))?.[1];
3465
+ return workflowStepStagesVercelProductionDeployment(block) &&
3466
+ prefix !== undefined && /(?:^|\s)-u\s+VERCEL_ORG_ID\b/.test(prefix) &&
3467
+ /(?:^|\s)-u\s+VERCEL_PROJECT_ID\b/.test(prefix) &&
3468
+ !workflowStepUsesExplicitVercelScope(block);
3469
+ }
3442
3470
  function workflowStepRunsVercelCurl(block) {
3443
3471
  return workflowStepUsesVercelCommand(block, "curl");
3444
3472
  }
3445
3473
  function workflowStepUsesExplicitVercelScope(block) {
3446
3474
  return /(?:^|\s)--scope(?:=|\s+)(?:"[^"]+"|'[^']+'|[^\s\\]+)/.test(block);
3447
3475
  }
3476
+ function workflowStepPassesVercelTokenArgument(block) {
3477
+ return /(?:^|\s)--token(?:=|\s+)(?:"[^"]+"|'[^']+'|[^\s\\]+)/.test(block.replace(/\\\r?\n\s*/g, " "));
3478
+ }
3448
3479
  function workflowUsesOldVercelDeployHook(text) {
3449
3480
  return /\bVERCEL_DEPLOY(?:_HOOK)?(?:_[A-Z0-9_]+)?\b/.test(text) ||
3450
3481
  /api\.vercel\.com\/v1\/integrations\/deploy\//.test(text);
@@ -3514,13 +3545,15 @@ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch
3514
3545
  const buildStepIndex = job.stepBlocks.findIndex(workflowStepBuildsVercelProductionArtifact);
3515
3546
  const snapshotStepIndex = job.stepBlocks.findIndex(workflowStepPreservesVercelProductionEnv);
3516
3547
  const metadataStepIndex = job.stepBlocks.findIndex(workflowStepQueriesVercelProductionEnvMetadata);
3548
+ const materializeStepIndex = job.stepBlocks.findIndex(workflowStepPreparesVercelProject);
3517
3549
  const prepareBuildEnvStepIndex = job.stepBlocks.findIndex(workflowStepPreparesVercelBuildEnv);
3518
3550
  const verifyBuildEnvStepIndex = job.stepBlocks.findIndex(workflowStepVerifiesVercelBuildEnv);
3519
3551
  const migrationVerifyStepIndex = job.stepBlocks.findIndex(workflowStepVerifiesMigrationEnv);
3520
3552
  const stageStepIndex = job.stepBlocks.findIndex(workflowStepStagesVercelProductionDeployment);
3521
3553
  const migrateStepIndex = job.stepBlocks.findIndex(workflowStepRunsDbMigrate);
3522
3554
  const migrateWithVercelProductionEnvStepIndex = job.stepBlocks.findIndex(workflowStepRunsDbMigrateWithVercelProductionEnv);
3523
- const promoteStepIndex = job.stepBlocks.findIndex(workflowStepPromotesVercelDeployment);
3555
+ const promoteStepIndex = job.stepBlocks.findIndex((block) => workflowStepPromotesVercelDeployment(block) ||
3556
+ workflowStepPromotesVercelDeploymentWithLoom(block));
3524
3557
  const vercelCurlStepIndex = job.stepBlocks.findIndex(workflowStepRunsVercelCurl);
3525
3558
  const migrateStep = migrateStepIndex >= 0
3526
3559
  ? job.stepBlocks[migrateStepIndex]
@@ -3531,13 +3564,32 @@ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch
3531
3564
  const promoteStep = promoteStepIndex >= 0
3532
3565
  ? job.stepBlocks[promoteStepIndex]
3533
3566
  : "";
3567
+ const buildStep = buildStepIndex >= 0 ? job.stepBlocks[buildStepIndex] : "";
3568
+ const stageStep = stageStepIndex >= 0 ? job.stepBlocks[stageStepIndex] : "";
3569
+ const legacyPullStepCount = job.stepBlocks.filter(workflowStepPullsVercelProductionSettings).length;
3570
+ const legacyMetadataStepCount = job.stepBlocks.filter(workflowStepQueriesVercelProductionEnvMetadata).length;
3571
+ const materializeStepCount = job.stepBlocks.filter(workflowStepPreparesVercelProject).length;
3572
+ const stageStepCount = job.stepBlocks.filter(workflowStepStagesVercelProductionDeployment).length;
3573
+ const cliPromoteStepCount = job.stepBlocks.filter(workflowStepPromotesVercelDeployment).length;
3574
+ const loomPromoteStepCount = job.stepBlocks.filter(workflowStepPromotesVercelDeploymentWithLoom).length;
3534
3575
  return {
3535
3576
  buildStepIndex,
3577
+ buildStepHasVercelToken: hasWorkflowEnvBinding(buildStep, "VERCEL_TOKEN") ||
3578
+ workflowStepPassesVercelTokenArgument(buildStep),
3579
+ buildStepIsStandalone: workflowStepBuildsStandaloneVercelProductionArtifact(buildStep),
3580
+ cliPromoteStepCount,
3536
3581
  hasDatabaseUrlBinding: hasWorkflowEnvBinding(workflowEnvText, "DATABASE_URL") ||
3537
3582
  hasWorkflowEnvBinding(jobPreambleBeforeSteps(job.text), "DATABASE_URL") ||
3538
3583
  hasWorkflowEnvBinding(migrateStep, "DATABASE_URL"),
3539
3584
  id: job.id,
3585
+ hasBroadVercelTokenBinding: hasWorkflowEnvBinding(workflowEnvText, "VERCEL_TOKEN") ||
3586
+ hasWorkflowEnvBinding(jobPreambleBeforeSteps(job.text), "VERCEL_TOKEN"),
3587
+ legacyMetadataStepCount,
3588
+ legacyPullStepCount,
3589
+ loomPromoteStepCount,
3540
3590
  metadataStepIndex,
3591
+ materializeStepCount,
3592
+ materializeStepIndex,
3541
3593
  migrationVerifyConnects: workflowStepVerifiesMigrationConnection(migrationVerifyStep),
3542
3594
  migrationVerifyStepIndex,
3543
3595
  migrationVerifyUsesPulledSnapshot: workflowStepVerifiesMigrationEnvWithPulledSnapshot(migrationVerifyStep),
@@ -3547,10 +3599,16 @@ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch
3547
3599
  prepareBuildEnvStepIndex,
3548
3600
  promoteStepIndex,
3549
3601
  promoteStepUsesExplicitScope: workflowStepUsesExplicitVercelScope(promoteStep),
3602
+ promoteStepUsesLoom: workflowStepPromotesVercelDeploymentWithLoom(promoteStep),
3550
3603
  pullStepIndex,
3551
3604
  relativePath,
3552
3605
  snapshotStepIndex,
3553
3606
  stageStepIndex,
3607
+ stageStepPassesTokenArgument: workflowStepPassesVercelTokenArgument(stageStep),
3608
+ stageStepCount,
3609
+ stageStepUsesExplicitScope: workflowStepUsesExplicitVercelScope(stageStep),
3610
+ stageStepUsesMaterializedLink: stageStepIndex >= 0 &&
3611
+ workflowStepUsesMaterializedVercelLink(stageStep),
3554
3612
  text: job.text,
3555
3613
  vercelCurlStepIndex,
3556
3614
  verifyBuildEnvStepIndex,
@@ -3567,21 +3625,52 @@ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch
3567
3625
  usesOldVercelDeployHook: workflowUsesOldVercelDeployHook(normalized),
3568
3626
  };
3569
3627
  }
3570
- function dbMigrationJobHasOrderedStagedRelease(job) {
3571
- return (job.pullStepIndex >= 0 &&
3628
+ function dbMigrationJobHasOrderedLegacyStagedRelease(job) {
3629
+ return (job.legacyPullStepCount === 1 &&
3630
+ job.legacyMetadataStepCount === 1 &&
3631
+ job.materializeStepCount === 0 &&
3632
+ job.stageStepCount === 1 &&
3633
+ job.cliPromoteStepCount === 1 &&
3634
+ job.loomPromoteStepCount === 0 &&
3635
+ job.pullStepIndex >= 0 &&
3572
3636
  job.snapshotStepIndex === job.pullStepIndex &&
3573
3637
  job.metadataStepIndex > job.pullStepIndex &&
3574
3638
  job.prepareBuildEnvStepIndex > job.metadataStepIndex &&
3575
3639
  job.buildStepIndex > job.prepareBuildEnvStepIndex &&
3576
3640
  job.verifyBuildEnvStepIndex > job.buildStepIndex &&
3577
3641
  job.stageStepIndex > job.verifyBuildEnvStepIndex &&
3642
+ job.stageStepUsesExplicitScope &&
3578
3643
  job.migrateWithVercelProductionEnvStepIndex > job.stageStepIndex &&
3579
3644
  job.migrateStepRestoresPulledEnv &&
3580
3645
  job.promoteStepIndex > job.migrateWithVercelProductionEnvStepIndex);
3581
3646
  }
3647
+ function dbMigrationJobHasOrderedProjectTokenRelease(job) {
3648
+ return (job.legacyPullStepCount === 0 &&
3649
+ job.legacyMetadataStepCount === 0 &&
3650
+ job.materializeStepCount === 1 &&
3651
+ job.stageStepCount === 1 &&
3652
+ job.cliPromoteStepCount === 0 &&
3653
+ job.loomPromoteStepCount === 1 &&
3654
+ job.materializeStepIndex >= 0 &&
3655
+ job.snapshotStepIndex === job.materializeStepIndex &&
3656
+ job.prepareBuildEnvStepIndex > job.materializeStepIndex &&
3657
+ job.buildStepIndex > job.prepareBuildEnvStepIndex &&
3658
+ job.verifyBuildEnvStepIndex > job.buildStepIndex &&
3659
+ job.buildStepIsStandalone &&
3660
+ !job.buildStepHasVercelToken &&
3661
+ !job.hasBroadVercelTokenBinding &&
3662
+ job.stageStepIndex > job.verifyBuildEnvStepIndex &&
3663
+ job.stageStepUsesMaterializedLink &&
3664
+ !job.stageStepPassesTokenArgument &&
3665
+ job.migrateWithVercelProductionEnvStepIndex > job.stageStepIndex &&
3666
+ job.migrateStepRestoresPulledEnv &&
3667
+ job.promoteStepIndex > job.migrateWithVercelProductionEnvStepIndex &&
3668
+ job.promoteStepUsesLoom);
3669
+ }
3582
3670
  function dbMigrationWorkflowIsValid(workflow) {
3583
- return workflow.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3584
- job.promoteStepUsesExplicitScope &&
3671
+ return workflow.jobs.some((job) => ((dbMigrationJobHasOrderedLegacyStagedRelease(job) &&
3672
+ job.promoteStepUsesExplicitScope) ||
3673
+ dbMigrationJobHasOrderedProjectTokenRelease(job)) &&
3585
3674
  (workflow.usesGithubMigrationDatabaseUrlSecret ||
3586
3675
  workflow.usesGithubUnpooledDatabaseUrlSecret));
3587
3676
  }
@@ -3677,9 +3766,11 @@ async function checkDbProductionMigrationFlow(cwd, production, productionBranch)
3677
3766
  findings.push("DB production migration flow does not promote the staged deployment after migrations: " +
3678
3767
  migrationWorkflowPaths.join(", "));
3679
3768
  }
3680
- else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.snapshotStepIndex === job.pullStepIndex &&
3769
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => ((job.snapshotStepIndex === job.pullStepIndex &&
3681
3770
  job.metadataStepIndex > job.pullStepIndex &&
3682
- job.prepareBuildEnvStepIndex > job.metadataStepIndex &&
3771
+ job.prepareBuildEnvStepIndex > job.metadataStepIndex) ||
3772
+ (job.snapshotStepIndex === job.materializeStepIndex &&
3773
+ job.prepareBuildEnvStepIndex > job.materializeStepIndex)) &&
3683
3774
  job.verifyBuildEnvStepIndex > job.buildStepIndex))) {
3684
3775
  findings.push("DB production migration flow does not preserve the pulled migration env and verify metadata-backed build placeholders: " +
3685
3776
  migrationWorkflowPaths.join(", "));
@@ -3693,16 +3784,17 @@ async function checkDbProductionMigrationFlow(cwd, production, productionBranch)
3693
3784
  findings.push("DB production migration flow is not ready for Sensitive database variables because it lacks a GitHub migration-secret binding: " +
3694
3785
  migrationWorkflowPaths.join(", "));
3695
3786
  }
3696
- else if (productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3787
+ else if (productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedLegacyStagedRelease(job) &&
3697
3788
  !job.promoteStepUsesExplicitScope))) {
3698
3789
  findings.push("DB production migration flow promotes the staged deployment without an explicit Vercel team scope: " +
3699
3790
  migrationWorkflowPaths.join(", "));
3791
+ suggestions.add('Run `vercel promote --scope "$VERCEL_ORG_ID"` for the legacy team-token workflow, or adopt the project-token preparation and promotion helpers together.');
3700
3792
  }
3701
3793
  else {
3702
3794
  findings.push("DB production migration flow does not order build, staged deploy, migration, and promotion correctly: " +
3703
3795
  migrationWorkflowPaths.join(", "));
3704
3796
  }
3705
- suggestions.add('Add a production GitHub Actions workflow that runs `vercel pull --environment=production --scope "$VERCEL_ORG_ID"`, preserves an untouched migration snapshot, masks usable pulled values, queries `vercel env ls production --format=json`, adds unique build-only placeholders for unreadable Sensitive values, runs `vercel build --prod --scope "$VERCEL_ORG_ID"`, rejects placeholder leakage from `.vercel/output`, stages with `vercel deploy --prebuilt --prod --skip-domain --scope "$VERCEL_ORG_ID"`, restores the migration snapshot with an optional GitHub `MIGRATION_DATABASE_URL_UNPOOLED` override, runs migrations, then runs `vercel promote --scope "$VERCEL_ORG_ID"`.');
3797
+ suggestions.add("Add a production GitHub Actions workflow that runs `loom db release prepare-vercel-project production` with explicit private env, metadata, and project-link outputs, preserves an untouched migration snapshot, adds metadata-backed build placeholders, runs a token-free standalone build, scans `.vercel/output`, stages with a no-scope `vercel deploy --prebuilt --prod --skip-domain` process that unsets VERCEL_ORG_ID and VERCEL_PROJECT_ID, restores the migration snapshot, runs migrations, then runs `loom db release promote-vercel`.");
3706
3798
  }
3707
3799
  if (invalidMigrationValidationPaths.length) {
3708
3800
  findings.push("DB production migration validation does not load the preserved Vercel production env snapshot: " +
@@ -10774,6 +10866,8 @@ function printHelp({ out }) {
10774
10866
  out(" db release trust-apply <plan> <approval-sha256> Apply a reviewed Trusted Sources plan.");
10775
10867
  out(" db release trust-check <plan> Verify the reviewed Trusted Sources plan is active.");
10776
10868
  out(" db release prepare-build-env <env> <metadata> <policy> <manifest> Prepare metadata-backed placeholders for an external Vercel build.");
10869
+ out(" db release prepare-vercel-project production <env> <metadata> <project> Materialize project-scoped Production release inputs.");
10870
+ out(" db release promote-vercel <deployment-id> Promote an exact READY Production deployment with project-scoped auth.");
10777
10871
  out(" db release verify-build-env <output> <manifest> [deployment-root] Reject build-only placeholders in a deployable Vercel artifact.");
10778
10872
  out(" dev local Enable local Loom development using a managed pnpm override or Deno link.");
10779
10873
  out(" dev sync Rebuild local Loom and refresh this project's pnpm or Deno install when linked.");
@@ -10806,6 +10900,7 @@ function printHelp({ out }) {
10806
10900
  out(" --rotate-token Explicitly replace an existing GitHub VERCEL_TOKEN; the old Vercel token remains active.");
10807
10901
  out(" --token-scope project|team Vercel release token scope (default project; team is compatibility mode).");
10808
10902
  out(" --token-expiry-days <days> Vercel release token lifetime (default 90).");
10903
+ out(" --timeout <duration> Bounded Vercel promotion wait (default 3m).");
10809
10904
  out(" --environment <name> GitHub Environment for migration credential setup (default production).");
10810
10905
  out(" --env-file <path> Preserved env snapshot for `db migrations verify-env`; process values take precedence.");
10811
10906
  out(" --connect Authenticate and check migration database identity and schema privileges.");
@@ -11353,6 +11448,33 @@ async function runDbRelease(cwd, command, args, io, options) {
11353
11448
  return 1;
11354
11449
  }
11355
11450
  switch (command) {
11451
+ case "prepare-vercel-project": {
11452
+ if (args.length !== 4 || args[0] !== "production") {
11453
+ io.err("Usage: loom db release prepare-vercel-project production <env-file> <metadata-file> <project-file>");
11454
+ return 1;
11455
+ }
11456
+ await (0, vercelProjectRelease_js_1.prepareVercelProjectRelease)({
11457
+ env: node_process_1.default.env,
11458
+ envFile: (0, node_path_1.resolve)(cwd, args[1]),
11459
+ metadataFile: (0, node_path_1.resolve)(cwd, args[2]),
11460
+ projectFile: (0, node_path_1.resolve)(cwd, args[3]),
11461
+ }, io);
11462
+ return 0;
11463
+ }
11464
+ case "promote-vercel": {
11465
+ if (args.length !== 1) {
11466
+ io.err("Usage: loom db release promote-vercel <deployment-id> [--timeout <duration>]");
11467
+ return 1;
11468
+ }
11469
+ await (0, vercelProjectRelease_js_1.promoteVercelProjectRelease)({
11470
+ deploymentId: args[0],
11471
+ env: node_process_1.default.env,
11472
+ timeoutMs: options.timeout === undefined
11473
+ ? undefined
11474
+ : (0, vercelProjectRelease_js_1.parseVercelReleaseTimeout)(options.timeout),
11475
+ }, io);
11476
+ return 0;
11477
+ }
11356
11478
  case "prepare-build-env": {
11357
11479
  if (args.length !== 4) {
11358
11480
  io.err("Usage: loom db release prepare-build-env <env-file> <metadata-file> <policy-file> <manifest-file>");
@@ -11666,6 +11788,7 @@ async function runCli(args = node_process_1.default.argv.slice(2), io = {
11666
11788
  "token-name": { type: "string" },
11667
11789
  "token-expiry-days": { type: "string" },
11668
11790
  "token-scope": { type: "string" },
11791
+ timeout: { type: "string" },
11669
11792
  "rotate-token": { type: "boolean" },
11670
11793
  version: { type: "string" },
11671
11794
  },
@@ -11756,6 +11879,7 @@ async function runCli(args = node_process_1.default.argv.slice(2), io = {
11756
11879
  tokenScope: parsed.values["token-scope"],
11757
11880
  tokenExpiryDays: parsed.values["token-expiry-days"],
11758
11881
  rotateToken: parsed.values["rotate-token"],
11882
+ timeout: parsed.values.timeout,
11759
11883
  });
11760
11884
  case "dev":
11761
11885
  return await runDev(cwd, arg1, arg2, io, {
@@ -0,0 +1,38 @@
1
+ type CliOutput = {
2
+ out: (line: string) => void;
3
+ };
4
+ type VercelFetch = typeof fetch;
5
+ type PrepareProjectOptions = {
6
+ env: Record<string, string | undefined>;
7
+ envFile: string;
8
+ fetchImpl?: VercelFetch;
9
+ metadataFile: string;
10
+ projectFile: string;
11
+ timeoutMs?: number;
12
+ };
13
+ type PromoteOptions = {
14
+ deploymentId: string;
15
+ env: Record<string, string | undefined>;
16
+ fetchImpl?: VercelFetch;
17
+ now?: () => number;
18
+ pollIntervalMs?: number;
19
+ sleep?: (milliseconds: number) => Promise<void>;
20
+ timeoutMs?: number;
21
+ };
22
+ /** Parse the bounded duration accepted by project-scoped promotion polling. */
23
+ export declare function parseVercelReleaseTimeout(value: string): number;
24
+ /** Serialize a pulled Vercel env map without changing its parsed values. */
25
+ export declare function serializeVercelPulledEnvironment(records: Record<string, string>): string;
26
+ /** Materialize private Production release inputs through project-bound APIs. */
27
+ export declare function prepareVercelProjectRelease(options: PrepareProjectOptions, io?: CliOutput): Promise<{
28
+ metadataCount: number;
29
+ projectId: string;
30
+ pulledCount: number;
31
+ }>;
32
+ /** Promote one exact deployment and require matching terminal provider state. */
33
+ export declare function promoteVercelProjectRelease(options: PromoteOptions, io?: CliOutput): Promise<{
34
+ replayed: boolean;
35
+ status: "succeeded";
36
+ }>;
37
+ export {};
38
+ //# sourceMappingURL=vercelProjectRelease.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercelProjectRelease.d.ts","sourceRoot":"","sources":["../../../src/src/cli/vercelProjectRelease.ts"],"names":[],"mappings":"AA2BA,KAAK,SAAS,GAAG;IACf,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7B,CAAC;AAQF,KAAK,WAAW,GAAG,OAAO,KAAK,CAAC;AAEhC,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,MAAM,UAatD;AA2JD,4EAA4E;AAC5E,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,UAsChC;AAgND,gFAAgF;AAChF,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,qBAAqB,EAC9B,EAAE,GAAE,SAAgD;;;;GAkGrD;AAyGD,iFAAiF;AACjF,wBAAsB,2BAA2B,CAC/C,OAAO,EAAE,cAAc,EACvB,EAAE,GAAE,SAAgD;;;GAsGrD"}