@gadicc/loom 1.25.0 → 1.26.1
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/README.md +4 -3
- package/esm/src/cli/mod.d.ts +5 -0
- package/esm/src/cli/mod.d.ts.map +1 -1
- package/esm/src/cli/mod.js +65 -145
- package/esm/src/cli/releaseCredentials.d.ts +32 -0
- package/esm/src/cli/releaseCredentials.d.ts.map +1 -0
- package/esm/src/cli/releaseCredentials.js +388 -0
- package/esm/src/cli/releaseTrust.d.ts +39 -0
- package/esm/src/cli/releaseTrust.d.ts.map +1 -0
- package/esm/src/cli/releaseTrust.js +125 -0
- package/esm/src/cli/releaseTrustCommand.d.ts +18 -0
- package/esm/src/cli/releaseTrustCommand.d.ts.map +1 -0
- package/esm/src/cli/releaseTrustCommand.js +142 -0
- package/esm/src/cli/vercelBuildEnv.d.ts +6 -2
- package/esm/src/cli/vercelBuildEnv.d.ts.map +1 -1
- package/esm/src/cli/vercelBuildEnv.js +130 -14
- package/package.json +2 -2
- package/script/src/cli/mod.d.ts +5 -0
- package/script/src/cli/mod.d.ts.map +1 -1
- package/script/src/cli/mod.js +65 -145
- package/script/src/cli/releaseCredentials.d.ts +32 -0
- package/script/src/cli/releaseCredentials.d.ts.map +1 -0
- package/script/src/cli/releaseCredentials.js +392 -0
- package/script/src/cli/releaseTrust.d.ts +39 -0
- package/script/src/cli/releaseTrust.d.ts.map +1 -0
- package/script/src/cli/releaseTrust.js +130 -0
- package/script/src/cli/releaseTrustCommand.d.ts +18 -0
- package/script/src/cli/releaseTrustCommand.d.ts.map +1 -0
- package/script/src/cli/releaseTrustCommand.js +145 -0
- package/script/src/cli/vercelBuildEnv.d.ts +6 -2
- package/script/src/cli/vercelBuildEnv.d.ts.map +1 -1
- package/script/src/cli/vercelBuildEnv.js +128 -12
- package/skills/loom/SKILL.md +3 -1
- package/skills/loom-db/SKILL.md +22 -10
package/script/src/cli/mod.js
CHANGED
|
@@ -79,6 +79,8 @@ const node_process_1 = __importDefault(require("node:process"));
|
|
|
79
79
|
const node_util_1 = require("node:util");
|
|
80
80
|
const filesR2Policy_js_1 = require("./filesR2Policy.js");
|
|
81
81
|
const releaseConfig_js_1 = require("./releaseConfig.js");
|
|
82
|
+
const releaseCredentials_js_1 = require("./releaseCredentials.js");
|
|
83
|
+
const releaseTrustCommand_js_1 = require("./releaseTrustCommand.js");
|
|
82
84
|
const retention_js_1 = require("../apiKeys/retention.js");
|
|
83
85
|
const projectSkills_js_1 = require("./projectSkills.js");
|
|
84
86
|
const migrationEnv_js_1 = require("./migrationEnv.js");
|
|
@@ -6504,62 +6506,6 @@ async function hasProductionPushDbMigrationWorkflow(cwd, productionBranch) {
|
|
|
6504
6506
|
}
|
|
6505
6507
|
return false;
|
|
6506
6508
|
}
|
|
6507
|
-
function findStringPropertyDeep(value, propertyName) {
|
|
6508
|
-
if (typeof value !== "object" || value === null) {
|
|
6509
|
-
return null;
|
|
6510
|
-
}
|
|
6511
|
-
if (!Array.isArray(value) &&
|
|
6512
|
-
typeof value[propertyName] === "string") {
|
|
6513
|
-
return value[propertyName];
|
|
6514
|
-
}
|
|
6515
|
-
const children = Array.isArray(value)
|
|
6516
|
-
? value
|
|
6517
|
-
: Object.values(value);
|
|
6518
|
-
for (const child of children) {
|
|
6519
|
-
const found = findStringPropertyDeep(child, propertyName);
|
|
6520
|
-
if (found) {
|
|
6521
|
-
return found;
|
|
6522
|
-
}
|
|
6523
|
-
}
|
|
6524
|
-
return null;
|
|
6525
|
-
}
|
|
6526
|
-
function parseJsonFromCommandOutput(text) {
|
|
6527
|
-
const trimmed = text.trim();
|
|
6528
|
-
if (!trimmed) {
|
|
6529
|
-
return null;
|
|
6530
|
-
}
|
|
6531
|
-
try {
|
|
6532
|
-
return JSON.parse(trimmed);
|
|
6533
|
-
}
|
|
6534
|
-
catch {
|
|
6535
|
-
// Some CLIs print progress lines before JSON even with --format json.
|
|
6536
|
-
}
|
|
6537
|
-
const starts = [trimmed.indexOf("{"), trimmed.indexOf("[")]
|
|
6538
|
-
.filter((index) => index >= 0)
|
|
6539
|
-
.sort((a, b) => a - b);
|
|
6540
|
-
for (const start of starts) {
|
|
6541
|
-
const close = trimmed[start] === "{" ? "}" : "]";
|
|
6542
|
-
const end = trimmed.lastIndexOf(close);
|
|
6543
|
-
if (end <= start) {
|
|
6544
|
-
continue;
|
|
6545
|
-
}
|
|
6546
|
-
try {
|
|
6547
|
-
return JSON.parse(trimmed.slice(start, end + 1));
|
|
6548
|
-
}
|
|
6549
|
-
catch {
|
|
6550
|
-
// Try the next JSON-looking range.
|
|
6551
|
-
}
|
|
6552
|
-
}
|
|
6553
|
-
return null;
|
|
6554
|
-
}
|
|
6555
|
-
function parseVercelCreatedToken(text) {
|
|
6556
|
-
const parsed = parseJsonFromCommandOutput(text);
|
|
6557
|
-
if (!parsed) {
|
|
6558
|
-
return null;
|
|
6559
|
-
}
|
|
6560
|
-
return findStringPropertyDeep(parsed, "bearerToken") ??
|
|
6561
|
-
findStringPropertyDeep(parsed, "token");
|
|
6562
|
-
}
|
|
6563
6509
|
function getProjectSlug(cwd, packageJson, manifest) {
|
|
6564
6510
|
return sanitizeVercelResourceName(manifest?.project?.name ?? packageJson.name ?? (0, node_path_1.basename)(cwd));
|
|
6565
6511
|
}
|
|
@@ -6810,7 +6756,7 @@ function createGithubReleaseConfigCheckStep(state, context) {
|
|
|
6810
6756
|
return networkCheckResult("warning", "GitHub CLI is not available, so Loom could not inspect GitHub Actions secrets and variables.", {
|
|
6811
6757
|
suggestions: [
|
|
6812
6758
|
"Install and authenticate `gh`, then rerun `loom check --network`.",
|
|
6813
|
-
"After `gh` is available, run `loom db release setup-github` from the project root to create a
|
|
6759
|
+
"After `gh` is available, run `loom db release setup-github` from the project root to create a bounded project-scoped Vercel token and store the required GitHub release configuration.",
|
|
6814
6760
|
`Set production release config with \`gh secret set VERCEL_TOKEN --env ${PRODUCTION_GITHUB_ENVIRONMENT}\`, \`gh variable set VERCEL_ORG_ID --env ${PRODUCTION_GITHUB_ENVIRONMENT} --body ${state.vercelOrgId}\`, and \`gh variable set VERCEL_PROJECT_ID --env ${PRODUCTION_GITHUB_ENVIRONMENT} --body ${state.vercelProjectId}\`.`,
|
|
6815
6761
|
],
|
|
6816
6762
|
warnings: [
|
|
@@ -6842,7 +6788,7 @@ function createGithubReleaseConfigCheckStep(state, context) {
|
|
|
6842
6788
|
for (const secretName of REQUIRED_GITHUB_VERCEL_SECRET_NAMES) {
|
|
6843
6789
|
if (!collectionHasName(secretName, environmentSecrets, repoSecrets)) {
|
|
6844
6790
|
issues.push(`GitHub Actions is missing required production secret: ${secretName}.`);
|
|
6845
|
-
suggestions.add("Run `loom db release setup-github` from the project root to create
|
|
6791
|
+
suggestions.add("Run `loom db release setup-github` from the project root to create or preserve the bounded project-scoped Vercel release credential and store the required GitHub configuration.");
|
|
6846
6792
|
suggestions.add(`Run \`gh secret set ${secretName} --env ${PRODUCTION_GITHUB_ENVIRONMENT}\` from the project root.`);
|
|
6847
6793
|
suggestions.add(`If GitHub reports that the ${PRODUCTION_GITHUB_ENVIRONMENT} environment does not exist, create it with \`gh api --method PUT repos/:owner/:repo/environments/${PRODUCTION_GITHUB_ENVIRONMENT}\`, then rerun the secret command.`);
|
|
6848
6794
|
}
|
|
@@ -6866,7 +6812,7 @@ function createGithubReleaseConfigCheckStep(state, context) {
|
|
|
6866
6812
|
else {
|
|
6867
6813
|
issues.push(`GitHub Actions is missing required production variable: ${name}.`);
|
|
6868
6814
|
}
|
|
6869
|
-
suggestions.add("Run `loom db release setup-github` from the project root to create
|
|
6815
|
+
suggestions.add("Run `loom db release setup-github` from the project root to create or preserve the bounded project-scoped Vercel release credential and store the required GitHub configuration.");
|
|
6870
6816
|
suggestions.add(`Run \`gh variable set ${name} --env ${PRODUCTION_GITHUB_ENVIRONMENT} --body ${expectedValues[name]}\` from the project root.`);
|
|
6871
6817
|
}
|
|
6872
6818
|
for (const staleSecret of STALE_GITHUB_RELEASE_SECRET_NAMES) {
|
|
@@ -7624,10 +7570,6 @@ async function setupGithubVercelRelease(cwd, options = {}) {
|
|
|
7624
7570
|
const commandRunner = options.commandRunner ?? defaultCommandRunner;
|
|
7625
7571
|
const env = options.env ?? node_process_1.default.env;
|
|
7626
7572
|
const environment = options.environment ?? PRODUCTION_GITHUB_ENVIRONMENT;
|
|
7627
|
-
const io = options.io ?? {
|
|
7628
|
-
err: (line) => console.error(line),
|
|
7629
|
-
out: (line) => console.log(line),
|
|
7630
|
-
};
|
|
7631
7573
|
const { packageJson } = await readProjectPackageJson(cwd);
|
|
7632
7574
|
const manifestText = await readTextIfExists((0, node_path_1.join)(cwd, "loom.json"));
|
|
7633
7575
|
const manifest = manifestText
|
|
@@ -7648,89 +7590,24 @@ async function setupGithubVercelRelease(cwd, options = {}) {
|
|
|
7648
7590
|
}
|
|
7649
7591
|
const tokenName = options.tokenName ??
|
|
7650
7592
|
getDefaultVercelGithubTokenName(cwd, packageJson, manifest);
|
|
7651
|
-
|
|
7652
|
-
|
|
7653
|
-
"api",
|
|
7654
|
-
"--method",
|
|
7655
|
-
"PUT",
|
|
7656
|
-
`repos/:owner/:repo/environments/${environment}`,
|
|
7657
|
-
"--input",
|
|
7658
|
-
"-",
|
|
7659
|
-
], {
|
|
7593
|
+
return await (0, releaseCredentials_js_1.configureGithubVercelReleaseCredential)({
|
|
7594
|
+
commandRunner,
|
|
7660
7595
|
cwd,
|
|
7661
7596
|
env,
|
|
7662
|
-
input: JSON.stringify({
|
|
7663
|
-
deployment_branch_policy: {
|
|
7664
|
-
custom_branch_policies: true,
|
|
7665
|
-
protected_branches: false,
|
|
7666
|
-
},
|
|
7667
|
-
}),
|
|
7668
|
-
stdio: "pipe",
|
|
7669
|
-
});
|
|
7670
|
-
const branchPoliciesResult = await requireCommand(`List GitHub ${environment} deployment branches`, commandRunner, "gh", [
|
|
7671
|
-
"api",
|
|
7672
|
-
`repos/:owner/:repo/environments/${environment}/deployment-branch-policies`,
|
|
7673
|
-
], { cwd, env, stdio: "pipe" });
|
|
7674
|
-
const branchPolicies = parseJson(branchPoliciesResult.stdout || "{}", "GitHub deployment branch policies");
|
|
7675
|
-
if (!branchPolicies.branch_policies?.some((policy) => policy.name === productionBranch)) {
|
|
7676
|
-
await requireCommand(`Allow ${productionBranch} to deploy to GitHub ${environment}`, commandRunner, "gh", [
|
|
7677
|
-
"api",
|
|
7678
|
-
"--method",
|
|
7679
|
-
"POST",
|
|
7680
|
-
`repos/:owner/:repo/environments/${environment}/deployment-branch-policies`,
|
|
7681
|
-
"--input",
|
|
7682
|
-
"-",
|
|
7683
|
-
], {
|
|
7684
|
-
cwd,
|
|
7685
|
-
env,
|
|
7686
|
-
input: JSON.stringify({ name: productionBranch, type: "branch" }),
|
|
7687
|
-
stdio: "pipe",
|
|
7688
|
-
});
|
|
7689
|
-
}
|
|
7690
|
-
notes.push(`Ensured GitHub environment \`${environment}\` exists and allows the ${productionBranch} release branch; existing branch policies are preserved.`);
|
|
7691
|
-
await requireCommand("Set GitHub VERCEL_ORG_ID variable", commandRunner, "gh", [
|
|
7692
|
-
"variable",
|
|
7693
|
-
"set",
|
|
7694
|
-
"VERCEL_ORG_ID",
|
|
7695
|
-
"--env",
|
|
7696
7597
|
environment,
|
|
7697
|
-
|
|
7698
|
-
|
|
7699
|
-
|
|
7700
|
-
|
|
7701
|
-
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
notes.push("Set GitHub Vercel project ID variables.");
|
|
7710
|
-
io.out(`Creating Vercel token \`${tokenName}\` scoped to this team...`);
|
|
7711
|
-
const tokenResult = await requireCommand("Create Vercel authentication token", commandRunner, vercelCli.command, [
|
|
7712
|
-
"api",
|
|
7713
|
-
`/v3/user/tokens?teamId=${encodeURIComponent(vercelLink.orgId)}`,
|
|
7714
|
-
"--method",
|
|
7715
|
-
"POST",
|
|
7716
|
-
"--input",
|
|
7717
|
-
"-",
|
|
7718
|
-
"--raw",
|
|
7719
|
-
], {
|
|
7720
|
-
cwd,
|
|
7721
|
-
env,
|
|
7722
|
-
input: JSON.stringify({
|
|
7723
|
-
name: tokenName,
|
|
7724
|
-
}),
|
|
7725
|
-
stdio: "pipe",
|
|
7598
|
+
githubCommand: githubCli.command,
|
|
7599
|
+
hasTokenOverrides: options.tokenExpiryDays !== undefined ||
|
|
7600
|
+
options.tokenName !== undefined || options.tokenScope !== undefined,
|
|
7601
|
+
now: options.now,
|
|
7602
|
+
orgId: vercelLink.orgId,
|
|
7603
|
+
productionBranch,
|
|
7604
|
+
projectId: vercelLink.projectId,
|
|
7605
|
+
rotateToken: options.rotateToken ?? false,
|
|
7606
|
+
tokenExpiryDays: options.tokenExpiryDays,
|
|
7607
|
+
tokenName,
|
|
7608
|
+
tokenScope: options.tokenScope,
|
|
7609
|
+
vercelCommand: vercelCli.command,
|
|
7726
7610
|
});
|
|
7727
|
-
const token = parseVercelCreatedToken(tokenResult.stdout);
|
|
7728
|
-
if (!token) {
|
|
7729
|
-
throw new Error("Vercel token was created, but Loom could not find a token value in the CLI JSON output. Open the Vercel dashboard token page and set `gh secret set VERCEL_TOKEN --env production` manually.");
|
|
7730
|
-
}
|
|
7731
|
-
await requireCommand("Set GitHub VERCEL_TOKEN secret", commandRunner, "gh", ["secret", "set", "VERCEL_TOKEN", "--env", environment], { cwd, env, input: token, stdio: "pipe" });
|
|
7732
|
-
notes.push("Stored the new Vercel token as GitHub secret `VERCEL_TOKEN`.");
|
|
7733
|
-
return { notes };
|
|
7734
7611
|
}
|
|
7735
7612
|
async function applyJobsFeature(cwd, framework, manifest, activate) {
|
|
7736
7613
|
const changedFiles = [];
|
|
@@ -10827,8 +10704,11 @@ function printHelp({ out }) {
|
|
|
10827
10704
|
out(" db migrations verify-env Validate migration URL precedence and role metadata without printing credentials. Add --connect for a live access preflight.");
|
|
10828
10705
|
out(" db migrations setup-github Store an existing direct migration URL as a protected GitHub Environment secret.");
|
|
10829
10706
|
out(" db release setup-github Create/update GitHub production release config for staged Vercel deploys.");
|
|
10707
|
+
out(" db release trust-plan <workflow> <plan> Plan exact Vercel Trusted Sources for a GitHub release workflow.");
|
|
10708
|
+
out(" db release trust-apply <plan> <approval-sha256> Apply a reviewed Trusted Sources plan.");
|
|
10709
|
+
out(" db release trust-check <plan> Verify the reviewed Trusted Sources plan is active.");
|
|
10830
10710
|
out(" db release prepare-build-env <env> <metadata> <policy> <manifest> Prepare metadata-backed placeholders for an external Vercel build.");
|
|
10831
|
-
out(" db release verify-build-env <output> <manifest> Reject build-only placeholders in a deployable Vercel artifact.");
|
|
10711
|
+
out(" db release verify-build-env <output> <manifest> [deployment-root] Reject build-only placeholders in a deployable Vercel artifact.");
|
|
10832
10712
|
out(" dev local Enable local Loom development using a managed pnpm override or Deno link.");
|
|
10833
10713
|
out(" dev sync Rebuild local Loom and refresh this project's pnpm or Deno install when linked.");
|
|
10834
10714
|
out(" dev published Remove the managed local-dev override and return to the published dependency.");
|
|
@@ -10857,6 +10737,9 @@ function printHelp({ out }) {
|
|
|
10857
10737
|
out(" --configure-secrets Ask Vercel to prompt securely for missing R2 credentials; never replaces existing credentials.");
|
|
10858
10738
|
out(" --repair Apply declared non-secret Files provider drift; never deletes resources or rotates credentials.");
|
|
10859
10739
|
out(" --token-name <name> Override the Vercel token name for `loom db release setup-github`.");
|
|
10740
|
+
out(" --rotate-token Explicitly replace an existing GitHub VERCEL_TOKEN; the old Vercel token remains active.");
|
|
10741
|
+
out(" --token-scope project|team Vercel release token scope (default project; team is compatibility mode).");
|
|
10742
|
+
out(" --token-expiry-days <days> Vercel release token lifetime (default 90).");
|
|
10860
10743
|
out(" --environment <name> GitHub Environment for migration credential setup (default production).");
|
|
10861
10744
|
out(" --env-file <path> Preserved env snapshot for `db migrations verify-env`; process values take precedence.");
|
|
10862
10745
|
out(" --connect Authenticate and check migration database identity and schema privileges.");
|
|
@@ -11418,11 +11301,14 @@ async function runDbRelease(cwd, command, args, io, options) {
|
|
|
11418
11301
|
return 0;
|
|
11419
11302
|
}
|
|
11420
11303
|
case "verify-build-env": {
|
|
11421
|
-
if (args.length
|
|
11422
|
-
io.err("Usage: loom db release verify-build-env <output-directory> <manifest-file>");
|
|
11304
|
+
if (args.length < 2 || args.length > 3) {
|
|
11305
|
+
io.err("Usage: loom db release verify-build-env <output-directory> <manifest-file> [deployment-root]");
|
|
11423
11306
|
return 1;
|
|
11424
11307
|
}
|
|
11425
11308
|
(0, vercelBuildEnv_js_1.verifyVercelBuildArtifact)({
|
|
11309
|
+
deploymentRoot: args[2] === undefined
|
|
11310
|
+
? undefined
|
|
11311
|
+
: (0, node_path_1.resolve)(cwd, args[2]),
|
|
11426
11312
|
manifestFile: (0, node_path_1.resolve)(cwd, args[1]),
|
|
11427
11313
|
outputDirectory: (0, node_path_1.resolve)(cwd, args[0]),
|
|
11428
11314
|
}, io);
|
|
@@ -11432,7 +11318,10 @@ async function runDbRelease(cwd, command, args, io, options) {
|
|
|
11432
11318
|
const result = await setupGithubVercelRelease(cwd, {
|
|
11433
11319
|
environment: options.environment,
|
|
11434
11320
|
io,
|
|
11321
|
+
rotateToken: options.rotateToken,
|
|
11322
|
+
tokenExpiryDays: options.tokenExpiryDays,
|
|
11435
11323
|
tokenName: options.tokenName,
|
|
11324
|
+
tokenScope: options.tokenScope,
|
|
11436
11325
|
});
|
|
11437
11326
|
for (const note of result.notes) {
|
|
11438
11327
|
io.out(`Note: ${note}`);
|
|
@@ -11440,6 +11329,31 @@ async function runDbRelease(cwd, command, args, io, options) {
|
|
|
11440
11329
|
io.out("Next step: run `loom check --production --network` to verify the release configuration.");
|
|
11441
11330
|
return 0;
|
|
11442
11331
|
}
|
|
11332
|
+
case "trust-plan":
|
|
11333
|
+
case "trust-apply":
|
|
11334
|
+
case "trust-check": {
|
|
11335
|
+
const vercelCli = await detectVercelCliCommand(cwd, defaultCommandRunner, node_process_1.default.env);
|
|
11336
|
+
if (!vercelCli.command) {
|
|
11337
|
+
throw new Error("Vercel CLI is not available. Install it or make `vercel`/`vc` available on PATH.");
|
|
11338
|
+
}
|
|
11339
|
+
const action = command === "trust-plan"
|
|
11340
|
+
? "plan"
|
|
11341
|
+
: command === "trust-apply"
|
|
11342
|
+
? "apply"
|
|
11343
|
+
: "check";
|
|
11344
|
+
const notes = await (0, releaseTrustCommand_js_1.runGithubReleaseTrustCommand)(action, args, {
|
|
11345
|
+
commandRunner: defaultCommandRunner,
|
|
11346
|
+
cwd,
|
|
11347
|
+
env: node_process_1.default.env,
|
|
11348
|
+
environment: action === "plan"
|
|
11349
|
+
? options.environment ?? PRODUCTION_GITHUB_ENVIRONMENT
|
|
11350
|
+
: options.environment,
|
|
11351
|
+
vercelCli: vercelCli.command,
|
|
11352
|
+
});
|
|
11353
|
+
for (const note of notes)
|
|
11354
|
+
io.out(`Note: ${note}`);
|
|
11355
|
+
return 0;
|
|
11356
|
+
}
|
|
11443
11357
|
default:
|
|
11444
11358
|
io.err(`Unknown release subcommand: ${command}`);
|
|
11445
11359
|
io.err("Run `loom --help` for usage.");
|
|
@@ -11684,6 +11598,9 @@ async function runCli(args = node_process_1.default.argv.slice(2), io = {
|
|
|
11684
11598
|
"strict-skills": { type: "boolean" },
|
|
11685
11599
|
"shared-bucket": { type: "string" },
|
|
11686
11600
|
"token-name": { type: "string" },
|
|
11601
|
+
"token-expiry-days": { type: "string" },
|
|
11602
|
+
"token-scope": { type: "string" },
|
|
11603
|
+
"rotate-token": { type: "boolean" },
|
|
11687
11604
|
version: { type: "string" },
|
|
11688
11605
|
},
|
|
11689
11606
|
});
|
|
@@ -11770,6 +11687,9 @@ async function runCli(args = node_process_1.default.argv.slice(2), io = {
|
|
|
11770
11687
|
plan: parsed.values.plan,
|
|
11771
11688
|
region: parsed.values.region,
|
|
11772
11689
|
tokenName: parsed.values["token-name"],
|
|
11690
|
+
tokenScope: parsed.values["token-scope"],
|
|
11691
|
+
tokenExpiryDays: parsed.values["token-expiry-days"],
|
|
11692
|
+
rotateToken: parsed.values["rotate-token"],
|
|
11773
11693
|
});
|
|
11774
11694
|
case "dev":
|
|
11775
11695
|
return await runDev(cwd, arg1, arg2, io, {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { CommandRunner } from "./mod.js";
|
|
2
|
+
export declare const DEFAULT_VERCEL_TOKEN_EXPIRY_DAYS = 90;
|
|
3
|
+
export declare const VERCEL_TOKEN_EXPIRY_VARIABLE = "LOOM_VERCEL_TOKEN_EXPIRES_AT";
|
|
4
|
+
export declare const VERCEL_TOKEN_ID_VARIABLE = "LOOM_VERCEL_TOKEN_ID";
|
|
5
|
+
export declare const VERCEL_TOKEN_SCOPE_VARIABLE = "LOOM_VERCEL_TOKEN_SCOPE";
|
|
6
|
+
export type VercelReleaseTokenScope = "project" | "team";
|
|
7
|
+
type ReleaseCredentialSetupOptions = {
|
|
8
|
+
commandRunner: CommandRunner;
|
|
9
|
+
cwd: string;
|
|
10
|
+
env: Record<string, string | undefined>;
|
|
11
|
+
environment: string;
|
|
12
|
+
githubCommand: string;
|
|
13
|
+
hasTokenOverrides: boolean;
|
|
14
|
+
now?: () => Date;
|
|
15
|
+
orgId: string;
|
|
16
|
+
productionBranch: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
rotateToken: boolean;
|
|
19
|
+
tokenExpiryDays?: number | string;
|
|
20
|
+
tokenName: string;
|
|
21
|
+
tokenScope?: string;
|
|
22
|
+
vercelCommand: string;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Audits GitHub release protections and installs a bounded Vercel credential
|
|
26
|
+
* without exposing token values in arguments or provider failures.
|
|
27
|
+
*/
|
|
28
|
+
export declare function configureGithubVercelReleaseCredential(options: ReleaseCredentialSetupOptions): Promise<{
|
|
29
|
+
notes: string[];
|
|
30
|
+
}>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=releaseCredentials.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releaseCredentials.d.ts","sourceRoot":"","sources":["../../../src/src/cli/releaseCredentials.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,eAAO,MAAM,gCAAgC,KAAK,CAAC;AACnD,eAAO,MAAM,4BAA4B,iCAAiC,CAAC;AAC3E,eAAO,MAAM,wBAAwB,yBAAyB,CAAC;AAC/D,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AAErE,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,MAAM,CAAC;AAEzD,KAAK,6BAA6B,GAAG;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AA+eF;;;GAGG;AACH,wBAAsB,sCAAsC,CAC1D,OAAO,EAAE,6BAA6B;;GAuHvC"}
|