@gadicc/loom 1.22.1 → 1.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -197,7 +197,11 @@ documented in [`docs/project-tooling.md`](docs/project-tooling.md).
197
197
  - `loom db release setup-github` creates/updates the GitHub `production`
198
198
  environment for staged Vercel releases: it stores `VERCEL_ORG_ID` and
199
199
  `VERCEL_PROJECT_ID`, creates a Vercel token scoped to the linked Vercel team,
200
- and saves that token as the GitHub `VERCEL_TOKEN` environment secret.
200
+ and saves that token as the GitHub `VERCEL_TOKEN` environment secret. Its
201
+ branch policy and the release checks use
202
+ `features.db.config.release.productionBranch` from `loom.json`, defaulting to
203
+ `main`. See [release configuration](docs/network-checks.md) for other
204
+ production branches and matching app-owned workflow/Vercel settings.
201
205
  - `loom dev local /path/to/loom` enables local unpublished Loom development. It
202
206
  adds a managed `file:` override in `pnpm-workspace.yaml` for pnpm projects or
203
207
  a Deno `links` entry in `deno.json(c)`, then runs the local-dev sync flow when
@@ -23,6 +23,7 @@ type PackageJson = {
23
23
  dependencies?: Record<string, string>;
24
24
  devDependencies?: Record<string, string>;
25
25
  packageManager?: string;
26
+ pnpm?: Record<string, unknown>;
26
27
  version?: string;
27
28
  };
28
29
  type ManagedLocalSchemaConfig = {
@@ -238,6 +239,16 @@ export declare function clearPnpmWorkspaceLocalDevText(existingText: string | nu
238
239
  changed: boolean;
239
240
  text: string;
240
241
  };
242
+ /** Keeps first-party Loom releases outside pnpm's package-age delay. */
243
+ export declare function ensurePnpmWorkspaceLoomReleaseAgeExcludeText(existingText: string | null): {
244
+ changed: boolean;
245
+ conflict: null;
246
+ text: string;
247
+ } | {
248
+ changed: boolean;
249
+ conflict: string;
250
+ text: string;
251
+ };
241
252
  export declare function syncLocalDevPackage(cwd: string, options?: DevSyncOptions): Promise<DevSyncResult>;
242
253
  export declare function useLocalDevPackage(cwd: string, inputPath: string): Promise<DevOverrideResult>;
243
254
  export declare function usePublishedDevPackage(cwd: string, options?: UsePublishedDevPackageOptions): Promise<DevOverrideResult>;
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/cli/mod.ts"],"names":[],"mappings":"AAyCA,OAAO,EAUL,KAAK,cAAc,EAMpB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,kBAAkB,WAAW,CAAC;AAC3C,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAC9C,eAAO,MAAM,oBAAoB,2DACyB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,uCAAuC,CAAC;AAC9E,eAAO,MAAM,uBAAuB,qCAAqC,CAAC;AAC1E,eAAO,MAAM,8BAA8B,8CACE,CAAC;AAC9C,eAAO,MAAM,4BAA4B,4CACE,CAAC;AAC5C,eAAO,MAAM,+BAA+B,6BAA6B,CAAC;AAC1E,eAAO,MAAM,6BAA6B,2BAA2B,CAAC;AACtE,eAAO,MAAM,kCAAkC,yBAAyB,CAAC;AACzE,eAAO,MAAM,mCAAmC,yBAAyB,CAAC;AAI1E,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAO,CAAC;AAwCtD,KAAK,aAAa,GAAG;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACtC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAqEF,KAAK,wBAAwB,GAAG;IA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a,CAAC;CAC1B,mBAiBP;AAymBD,wBAAsB,MAAM,CAC1B,IAAI,MAAwB,EAC5B,EAAE,GAAE,SAGH,mBAuKF"}
@@ -6,6 +6,7 @@ import { createRequire } from "node:module";
6
6
  import { basename, dirname, join, relative, resolve, sep } from "node:path";
7
7
  import process from "node:process";
8
8
  import { parseArgs } from "node:util";
9
+ import { resolveProductionBranch, } from "./releaseConfig.js";
9
10
  import { DEFAULT_API_KEY_AUDIT_RETENTION } from "../apiKeys/retention.js";
10
11
  import { checkProjectSkills, getProjectSkillStatus, LOOM_EXTERNAL_SKILLS_GITIGNORE_LINE, removeLegacyNextSkillLink, setProjectSkillDisabled, syncExternalProjectSkills, syncInstalledPackageSkills, } from "./projectSkills.js";
11
12
  import { resolveMigrationEnvironment, resolveMigrationEnvironmentFromEnvFile, verifyMigrationConnection, verifyMigrationConnectionFromEnvFile, } from "./migrationEnv.js";
@@ -1201,6 +1202,7 @@ function mergeDbConfig(framework, featureConfig) {
1201
1202
  ...featureConfig?.modules,
1202
1203
  },
1203
1204
  provider: featureConfig?.provider,
1205
+ release: featureConfig?.release,
1204
1206
  };
1205
1207
  }
1206
1208
  function isIdentifierLikeChar(char) {
@@ -2061,6 +2063,55 @@ export function clearPnpmWorkspaceLocalDevText(existingText) {
2061
2063
  text: nextText,
2062
2064
  };
2063
2065
  }
2066
+ function pnpmWorkspaceExcludesMinimumReleaseAge(text, dependency) {
2067
+ if (!text)
2068
+ return false;
2069
+ const lines = normalizeText(text).split("\n");
2070
+ const index = lines.findIndex((line) => /^minimumReleaseAgeExclude:\s*/.test(line));
2071
+ if (index === -1)
2072
+ return false;
2073
+ const value = lines[index].replace(/^minimumReleaseAgeExclude:\s*/, "");
2074
+ return yamlScalarValueContainsToken(value, dependency) ||
2075
+ yamlListContainsToken(lines, index, 0, dependency);
2076
+ }
2077
+ /** Keeps first-party Loom releases outside pnpm's package-age delay. */
2078
+ export function ensurePnpmWorkspaceLoomReleaseAgeExcludeText(existingText) {
2079
+ const normalized = existingText ? normalizeText(existingText) : "";
2080
+ if (pnpmWorkspaceExcludesMinimumReleaseAge(normalized, LOOM_DEPENDENCY)) {
2081
+ return { changed: false, conflict: null, text: normalized };
2082
+ }
2083
+ const lines = normalized === ""
2084
+ ? []
2085
+ : normalized.replace(/\n$/, "").split("\n");
2086
+ const index = lines.findIndex((line) => /^minimumReleaseAgeExclude:\s*/.test(line));
2087
+ const entry = ` - "${LOOM_DEPENDENCY}"`;
2088
+ if (index === -1) {
2089
+ if (lines.length && lines.at(-1) !== "")
2090
+ lines.push("");
2091
+ lines.push("minimumReleaseAgeExclude:", entry);
2092
+ }
2093
+ else {
2094
+ const value = lines[index].replace(/^minimumReleaseAgeExclude:\s*/, "");
2095
+ if (value === "" || value.startsWith("#")) {
2096
+ lines.splice(index + 1, 0, entry);
2097
+ }
2098
+ else {
2099
+ const inline = value.match(/^\[([^\]]*)\](\s*#.*)?$/);
2100
+ if (!inline) {
2101
+ return {
2102
+ changed: false,
2103
+ conflict: "pnpm-workspace.yaml defines minimumReleaseAgeExclude in an unsupported scalar form; add @gadicc/loom manually.",
2104
+ text: normalized,
2105
+ };
2106
+ }
2107
+ const existingItems = inline[1].trim();
2108
+ const comment = inline[2] ?? "";
2109
+ lines[index] = `minimumReleaseAgeExclude: [${existingItems ? `${existingItems}, ` : ""}"${LOOM_DEPENDENCY}"]${comment}`;
2110
+ }
2111
+ }
2112
+ const text = formatYamlLines(lines);
2113
+ return { changed: text !== normalized, conflict: null, text };
2114
+ }
2064
2115
  async function writeTextOrDeleteIfEmpty(path, text) {
2065
2116
  if (text === "") {
2066
2117
  try {
@@ -2733,6 +2784,97 @@ async function checkNextAgentGuidance(cwd, packageJson) {
2733
2784
  }
2734
2785
  return { issues: [], suggestions: [], warnings: [] };
2735
2786
  }
2787
+ const PNPM_11_LEGACY_WORKSPACE_SETTINGS = [
2788
+ "allowNonAppliedPatches",
2789
+ "ignoreDepScripts",
2790
+ "ignorePatchFailures",
2791
+ "ignoredBuiltDependencies",
2792
+ "neverBuiltDependencies",
2793
+ "onlyBuiltDependencies",
2794
+ "onlyBuiltDependenciesFile",
2795
+ ];
2796
+ function getPnpmMajor(packageManager) {
2797
+ const match = packageManager?.match(/^pnpm@(\d+)(?:\.|$)/);
2798
+ return match ? Number(match[1]) : null;
2799
+ }
2800
+ function isPnpmRegistryOrAuthSetting(key) {
2801
+ return key === "registry" || key.endsWith(":registry") ||
2802
+ /^(?:\/\/[^:]+\/?:)?(?::_authToken|_auth|username|_password|email|always-auth)$/i
2803
+ .test(key);
2804
+ }
2805
+ function findUnsupportedPnpm11NpmrcSettings(text) {
2806
+ if (!text)
2807
+ return [];
2808
+ const settings = new Set();
2809
+ for (const line of normalizeText(text).split("\n")) {
2810
+ const trimmed = line.trim();
2811
+ if (!trimmed || trimmed.startsWith("#") || trimmed.startsWith(";")) {
2812
+ continue;
2813
+ }
2814
+ const separator = trimmed.indexOf("=");
2815
+ const key = (separator === -1 ? trimmed : trimmed.slice(0, separator))
2816
+ .trim();
2817
+ if (key && !isPnpmRegistryOrAuthSetting(key))
2818
+ settings.add(key);
2819
+ }
2820
+ return [...settings].sort();
2821
+ }
2822
+ function findLegacyPnpm11WorkspaceSettings(text) {
2823
+ if (!text)
2824
+ return [];
2825
+ const settings = new Set();
2826
+ const pattern = new RegExp(`^(${PNPM_11_LEGACY_WORKSPACE_SETTINGS.join("|")}):\\s*`);
2827
+ for (const line of normalizeText(text).split("\n")) {
2828
+ const match = line.match(pattern);
2829
+ if (match)
2830
+ settings.add(match[1]);
2831
+ }
2832
+ return [...settings].sort();
2833
+ }
2834
+ async function checkPnpm11Compatibility(cwd, packageJson, npmrcText) {
2835
+ const workspaceText = await readTextIfExists(join(cwd, "pnpm-workspace.yaml"));
2836
+ const usesPnpm = packageJson.packageManager?.startsWith("pnpm@") ||
2837
+ workspaceText !== null || await exists(join(cwd, "pnpm-lock.yaml"));
2838
+ if (!usesPnpm)
2839
+ return { issues: [], suggestions: [], warnings: [] };
2840
+ const findings = [];
2841
+ if (packageJson.pnpm && Object.keys(packageJson.pnpm).length > 0) {
2842
+ findings.push("pnpm 11+ ignores package.json#pnpm; move those settings to pnpm-workspace.yaml.");
2843
+ }
2844
+ const npmrcSettings = findUnsupportedPnpm11NpmrcSettings(npmrcText);
2845
+ if (npmrcSettings.length > 0) {
2846
+ findings.push(`pnpm 11+ reads only registry/auth settings from .npmrc; move ${npmrcSettings.join(", ")} to pnpm-workspace.yaml.`);
2847
+ }
2848
+ const legacyWorkspaceSettings = findLegacyPnpm11WorkspaceSettings(workspaceText);
2849
+ if (legacyWorkspaceSettings.length > 0) {
2850
+ findings.push(`pnpm 11+ no longer supports ${legacyWorkspaceSettings.join(", ")} in pnpm-workspace.yaml; migrate dependency build policy to allowBuilds and replace removed patch settings.`);
2851
+ }
2852
+ if (!pnpmWorkspaceExcludesMinimumReleaseAge(workspaceText, LOOM_DEPENDENCY)) {
2853
+ findings.push("pnpm 11's release-age policy can delay first-party @gadicc/loom updates; add it to minimumReleaseAgeExclude in pnpm-workspace.yaml.");
2854
+ }
2855
+ const workflowPaths = await getGithubWorkflowRelativePaths(cwd);
2856
+ const legacyWorkflowPaths = [];
2857
+ for (const relativePath of workflowPaths) {
2858
+ const text = await readTextIfExists(join(cwd, relativePath));
2859
+ if (text && /\buses:\s*pnpm\/action-setup@/m.test(text)) {
2860
+ legacyWorkflowPaths.push(relativePath);
2861
+ }
2862
+ }
2863
+ if (legacyWorkflowPaths.length > 0) {
2864
+ findings.push(`pnpm 11+ projects should use pnpm/setup instead of pnpm/action-setup in ${legacyWorkflowPaths.join(", ")}.`);
2865
+ }
2866
+ if (findings.length === 0) {
2867
+ return { issues: [], suggestions: [], warnings: [] };
2868
+ }
2869
+ const major = getPnpmMajor(packageJson.packageManager);
2870
+ return {
2871
+ issues: major !== null && major >= 11 ? findings : [],
2872
+ suggestions: [
2873
+ "Follow the pnpm 11 migration guide, keep registry/auth settings in .npmrc, and rerun `loom check`.",
2874
+ ],
2875
+ warnings: major === null || major < 11 ? findings : [],
2876
+ };
2877
+ }
2736
2878
  function getSkillsContext(packageJson, manifest) {
2737
2879
  return {
2738
2880
  activeFeatureKeys: new Set(manifest
@@ -3082,12 +3224,6 @@ function yamlListContainsToken(lines, startIndex, parentIndent, token) {
3082
3224
  }
3083
3225
  return false;
3084
3226
  }
3085
- function yamlBranchValueContainsMain(value) {
3086
- return yamlScalarValueContainsToken(value, "main");
3087
- }
3088
- function yamlListContainsMainBranch(lines, startIndex, parentIndent) {
3089
- return yamlListContainsToken(lines, startIndex, parentIndent, "main");
3090
- }
3091
3227
  function findGithubOnPushIndex(lines) {
3092
3228
  const onIndex = lines.findIndex((line) => /^\s*on:\s*(?:#.*)?$/.test(line));
3093
3229
  if (onIndex === -1) {
@@ -3110,7 +3246,7 @@ function findGithubOnPushIndex(lines) {
3110
3246
  }
3111
3247
  return -1;
3112
3248
  }
3113
- function githubWorkflowRunsOnMainPush(text) {
3249
+ function githubWorkflowRunsOnBranchPush(text, productionBranch) {
3114
3250
  const normalized = normalizeText(text);
3115
3251
  if (/^\s*on:\s*(?:push|\[\s*push\s*\])\s*(?:#.*)?$/m.test(normalized)) {
3116
3252
  return true;
@@ -3122,7 +3258,7 @@ function githubWorkflowRunsOnMainPush(text) {
3122
3258
  }
3123
3259
  const pushIndent = lines[pushIndex].match(/^(\s*)/)?.[1].length ?? 0;
3124
3260
  let hasBranchFilter = false;
3125
- let ignoresMain = false;
3261
+ let ignoresProductionBranch = false;
3126
3262
  for (let index = pushIndex + 1; index < lines.length; index++) {
3127
3263
  const line = lines[index];
3128
3264
  const indent = line.match(/^(\s*)/)?.[1].length ?? 0;
@@ -3136,20 +3272,20 @@ function githubWorkflowRunsOnMainPush(text) {
3136
3272
  const branchMatch = line.match(/^\s*branches:\s*(.*)$/);
3137
3273
  if (branchMatch) {
3138
3274
  hasBranchFilter = true;
3139
- if (yamlBranchValueContainsMain(branchMatch[1]) ||
3140
- yamlListContainsMainBranch(lines, index, indent)) {
3275
+ if (yamlScalarValueContainsToken(branchMatch[1], productionBranch) ||
3276
+ yamlListContainsToken(lines, index, indent, productionBranch)) {
3141
3277
  return true;
3142
3278
  }
3143
3279
  continue;
3144
3280
  }
3145
3281
  const branchIgnoreMatch = line.match(/^\s*branches-ignore:\s*(.*)$/);
3146
3282
  if (branchIgnoreMatch &&
3147
- (yamlBranchValueContainsMain(branchIgnoreMatch[1]) ||
3148
- yamlListContainsMainBranch(lines, index, indent))) {
3149
- ignoresMain = true;
3283
+ (yamlScalarValueContainsToken(branchIgnoreMatch[1], productionBranch) ||
3284
+ yamlListContainsToken(lines, index, indent, productionBranch))) {
3285
+ ignoresProductionBranch = true;
3150
3286
  }
3151
3287
  }
3152
- return !hasBranchFilter && !ignoresMain;
3288
+ return !hasBranchFilter && !ignoresProductionBranch;
3153
3289
  }
3154
3290
  function workflowStepRunsDbMigrate(block) {
3155
3291
  return /\b(?:deno\s+task\s+db:migrate|pnpm\s+(?:run\s+)?db:migrate|npm\s+run\s+db:migrate|yarn\s+(?:run\s+)?db:migrate|bun\s+run\s+db:migrate)\b/
@@ -3287,7 +3423,7 @@ function getGithubWorkflowJobBlocks(text) {
3287
3423
  };
3288
3424
  });
3289
3425
  }
3290
- function inspectDbMigrationWorkflow(relativePath, workflowText) {
3426
+ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch) {
3291
3427
  const normalized = normalizeText(workflowText);
3292
3428
  const workflowEnvText = workflowPreambleBeforeJobs(normalized);
3293
3429
  const jobs = getGithubWorkflowJobBlocks(normalized).map((job) => {
@@ -3339,7 +3475,7 @@ function inspectDbMigrationWorkflow(relativePath, workflowText) {
3339
3475
  });
3340
3476
  return {
3341
3477
  jobs,
3342
- mainPush: githubWorkflowRunsOnMainPush(normalized),
3478
+ productionPush: githubWorkflowRunsOnBranchPush(normalized, productionBranch),
3343
3479
  usesGithubDatabaseUrlVariable: workflowUsesGithubDatabaseUrlVariable(normalized),
3344
3480
  relativePath,
3345
3481
  usesGithubDatabaseUrlSecret: workflowUsesGithubDatabaseUrlSecret(normalized),
@@ -3369,7 +3505,7 @@ function dbMigrationWorkflowIsValid(workflow) {
3369
3505
  function isJsonObject(value) {
3370
3506
  return typeof value === "object" && value !== null && !Array.isArray(value);
3371
3507
  }
3372
- function vercelMainDeploymentIsDisabled(vercelJson) {
3508
+ function vercelProductionDeploymentIsDisabled(vercelJson, productionBranch) {
3373
3509
  const git = vercelJson.git;
3374
3510
  if (!isJsonObject(git)) {
3375
3511
  return false;
@@ -3379,9 +3515,9 @@ function vercelMainDeploymentIsDisabled(vercelJson) {
3379
3515
  return true;
3380
3516
  }
3381
3517
  return isJsonObject(deploymentEnabled) &&
3382
- deploymentEnabled.main === false;
3518
+ deploymentEnabled[productionBranch] === false;
3383
3519
  }
3384
- async function checkDbProductionMigrationFlow(cwd, production) {
3520
+ async function checkDbProductionMigrationFlow(cwd, production, productionBranch) {
3385
3521
  const issues = [];
3386
3522
  const suggestions = new Set();
3387
3523
  const warnings = [];
@@ -3389,21 +3525,21 @@ async function checkDbProductionMigrationFlow(cwd, production) {
3389
3525
  const vercelJsonPath = join(cwd, "vercel.json");
3390
3526
  const vercelJsonText = await readTextIfExists(vercelJsonPath);
3391
3527
  if (!vercelJsonText) {
3392
- findings.push("DB production migration flow is missing vercel.json with automatic main deployments disabled.");
3393
- suggestions.add("Add `git.deploymentEnabled.main: false` to vercel.json so production deploys wait for the GitHub Actions migration job.");
3528
+ findings.push(`DB production migration flow is missing vercel.json with automatic ${productionBranch} deployments disabled.`);
3529
+ suggestions.add(`Add \`git.deploymentEnabled[${JSON.stringify(productionBranch)}]: false\` to vercel.json so production deploys wait for the GitHub Actions migration job.`);
3394
3530
  }
3395
3531
  else {
3396
3532
  try {
3397
3533
  const vercelJson = parseJson(vercelJsonText, "vercel.json");
3398
- if (!vercelMainDeploymentIsDisabled(vercelJson)) {
3399
- findings.push("DB production migration flow does not disable Vercel automatic deployments for main in vercel.json.");
3534
+ if (!vercelProductionDeploymentIsDisabled(vercelJson, productionBranch)) {
3535
+ findings.push(`DB production migration flow does not disable Vercel automatic deployments for ${productionBranch} in vercel.json.`);
3400
3536
  suggestions.add("Set `git.deploymentEnabled` to `false` in vercel.json so GitHub Actions owns production deployments.");
3401
3537
  }
3402
3538
  }
3403
3539
  catch (error) {
3404
3540
  findings.push("DB production migration flow could not inspect vercel.json: " +
3405
3541
  (error instanceof Error ? error.message : String(error)));
3406
- suggestions.add("Fix vercel.json so Loom can verify `git.deploymentEnabled.main: false`.");
3542
+ suggestions.add(`Fix vercel.json so Loom can verify \`git.deploymentEnabled[${JSON.stringify(productionBranch)}]: false\`.`);
3407
3543
  }
3408
3544
  }
3409
3545
  const workflowInspections = [];
@@ -3412,67 +3548,69 @@ async function checkDbProductionMigrationFlow(cwd, production) {
3412
3548
  if (!workflowText) {
3413
3549
  continue;
3414
3550
  }
3415
- workflowInspections.push(inspectDbMigrationWorkflow(relativePath, workflowText));
3551
+ workflowInspections.push(inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch));
3416
3552
  }
3417
- const mainPushWorkflows = workflowInspections.filter((inspection) => inspection.mainPush);
3418
- const migrationJobs = mainPushWorkflows.flatMap((inspection) => inspection.jobs.filter((job) => job.migrateStepIndex >= 0));
3553
+ const productionPushWorkflows = workflowInspections.filter((inspection) => inspection.productionPush);
3554
+ const migrationJobs = productionPushWorkflows.flatMap((inspection) => inspection.jobs.filter((job) => job.migrateStepIndex >= 0));
3419
3555
  const migrationWorkflowPaths = [
3420
3556
  ...new Set(migrationJobs.map((inspection) => inspection.relativePath)),
3421
3557
  ];
3422
- const validMigrationWorkflow = mainPushWorkflows.find(dbMigrationWorkflowIsValid);
3423
- const oldDeployHookWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesOldVercelDeployHook);
3424
- const duplicatedDatabaseUrlWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlSecret);
3425
- const databaseUrlVariableWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlVariable);
3426
- const legacyUnpooledSecretWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubUnpooledDatabaseUrlSecret &&
3558
+ const validMigrationWorkflow = productionPushWorkflows.find(dbMigrationWorkflowIsValid);
3559
+ const oldDeployHookWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesOldVercelDeployHook);
3560
+ const duplicatedDatabaseUrlWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlSecret);
3561
+ const databaseUrlVariableWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlVariable);
3562
+ const legacyUnpooledSecretWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubUnpooledDatabaseUrlSecret &&
3427
3563
  !inspection.usesGithubMigrationDatabaseUrlSecret);
3428
- const invalidMigrationValidationPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 &&
3564
+ const invalidMigrationValidationPaths = productionPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 &&
3429
3565
  !job.migrationVerifyUsesPulledSnapshot
3430
3566
  ? [inspection.relativePath]
3431
3567
  : []));
3432
- const structuralOnlyMigrationValidationPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 && !job.migrationVerifyConnects
3568
+ const structuralOnlyMigrationValidationPaths = productionPushWorkflows
3569
+ .flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 && !job.migrationVerifyConnects
3433
3570
  ? [inspection.relativePath]
3434
3571
  : []));
3435
- const vercelCurlWorkflowPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.some((job) => job.vercelCurlStepIndex >= 0)
3572
+ const vercelCurlWorkflowPaths = productionPushWorkflows.flatMap((inspection) => inspection.jobs.some((job) => job.vercelCurlStepIndex >= 0)
3436
3573
  ? [inspection.relativePath]
3437
3574
  : []);
3438
3575
  if (!validMigrationWorkflow) {
3439
- if (mainPushWorkflows.length === 0) {
3440
- findings.push("DB production migration flow is missing a GitHub Actions workflow for pushes to main.");
3576
+ if (productionPushWorkflows.length === 0) {
3577
+ findings.push(`DB production migration flow is missing a GitHub Actions workflow for pushes to ${productionBranch}.`);
3441
3578
  }
3442
3579
  else if (migrationJobs.length === 0) {
3443
- findings.push("DB production migration flow does not run `db:migrate` in the main release workflow: " +
3444
- mainPushWorkflows.map((inspection) => inspection.relativePath).join(", "));
3580
+ findings.push(`DB production migration flow does not run \`db:migrate\` in the ${productionBranch} release workflow: ` +
3581
+ productionPushWorkflows.map((inspection) => inspection.relativePath)
3582
+ .join(", "));
3445
3583
  }
3446
3584
  else if (!migrationJobs.some((inspection) => inspection.hasDatabaseUrlBinding ||
3447
3585
  inspection.migrateWithVercelProductionEnvStepIndex >= 0)) {
3448
3586
  findings.push("DB production migration flow runs migrations without Vercel production env injection: " +
3449
3587
  migrationWorkflowPaths.join(", "));
3450
3588
  }
3451
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.stageStepIndex >= 0))) {
3589
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.stageStepIndex >= 0))) {
3452
3590
  findings.push("DB production migration flow does not stage a prebuilt production deployment before migrations: " +
3453
3591
  migrationWorkflowPaths.join(", "));
3454
3592
  }
3455
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.promoteStepIndex >= 0))) {
3593
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.promoteStepIndex >= 0))) {
3456
3594
  findings.push("DB production migration flow does not promote the staged deployment after migrations: " +
3457
3595
  migrationWorkflowPaths.join(", "));
3458
3596
  }
3459
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.snapshotStepIndex === job.pullStepIndex &&
3597
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.snapshotStepIndex === job.pullStepIndex &&
3460
3598
  job.metadataStepIndex > job.pullStepIndex &&
3461
3599
  job.prepareBuildEnvStepIndex > job.metadataStepIndex &&
3462
3600
  job.verifyBuildEnvStepIndex > job.buildStepIndex))) {
3463
3601
  findings.push("DB production migration flow does not preserve the pulled migration env and verify metadata-backed build placeholders: " +
3464
3602
  migrationWorkflowPaths.join(", "));
3465
3603
  }
3466
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.migrateStepRestoresPulledEnv))) {
3604
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.migrateStepRestoresPulledEnv))) {
3467
3605
  findings.push("DB production migration flow does not restore the untouched pulled env before migrations: " +
3468
3606
  migrationWorkflowPaths.join(", "));
3469
3607
  }
3470
- else if (!mainPushWorkflows.some((inspection) => inspection.usesGithubMigrationDatabaseUrlSecret ||
3608
+ else if (!productionPushWorkflows.some((inspection) => inspection.usesGithubMigrationDatabaseUrlSecret ||
3471
3609
  inspection.usesGithubUnpooledDatabaseUrlSecret)) {
3472
3610
  findings.push("DB production migration flow is not ready for Sensitive database variables because it lacks a GitHub migration-secret binding: " +
3473
3611
  migrationWorkflowPaths.join(", "));
3474
3612
  }
3475
- else if (mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3613
+ else if (productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3476
3614
  !job.promoteStepUsesExplicitScope))) {
3477
3615
  findings.push("DB production migration flow promotes the staged deployment without an explicit Vercel team scope: " +
3478
3616
  migrationWorkflowPaths.join(", "));
@@ -6254,14 +6392,14 @@ function findGithubVariableValue(name, ...collections) {
6254
6392
  }
6255
6393
  return null;
6256
6394
  }
6257
- async function hasMainPushDbMigrationWorkflow(cwd) {
6395
+ async function hasProductionPushDbMigrationWorkflow(cwd, productionBranch) {
6258
6396
  for (const relativePath of await getGithubWorkflowRelativePaths(cwd)) {
6259
6397
  const workflowText = await readTextIfExists(join(cwd, relativePath));
6260
6398
  if (!workflowText) {
6261
6399
  continue;
6262
6400
  }
6263
- const inspection = inspectDbMigrationWorkflow(relativePath, workflowText);
6264
- if (inspection.mainPush &&
6401
+ const inspection = inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch);
6402
+ if (inspection.productionPush &&
6265
6403
  inspection.jobs.some((job) => job.migrateStepIndex >= 0 ||
6266
6404
  job.stageStepIndex >= 0 ||
6267
6405
  job.promoteStepIndex >= 0)) {
@@ -6708,6 +6846,19 @@ async function checkDbNetworkFeature(context) {
6708
6846
  if (!feature || feature.status !== "active") {
6709
6847
  return [];
6710
6848
  }
6849
+ let productionBranch;
6850
+ try {
6851
+ productionBranch = resolveProductionBranch(feature.config?.release);
6852
+ }
6853
+ catch (error) {
6854
+ return [{
6855
+ label: "DB release configuration",
6856
+ run: () => Promise.resolve(networkCheckResult("issue", error.message, {
6857
+ issues: [error.message],
6858
+ suggestions: ["Fix features.db.config.release in loom.json."],
6859
+ })),
6860
+ }];
6861
+ }
6711
6862
  const provider = feature.config
6712
6863
  ?.provider;
6713
6864
  const state = {
@@ -6815,7 +6966,7 @@ async function checkDbNetworkFeature(context) {
6815
6966
  createDbEnvCheckStep("Preview has Neon/Postgres env vars", "preview", "present", state, context),
6816
6967
  createDbEnvCheckStep("Development does not have Neon/Postgres env vars", "development", "absent", state, context),
6817
6968
  ];
6818
- if (await hasMainPushDbMigrationWorkflow(context.cwd)) {
6969
+ if (await hasProductionPushDbMigrationWorkflow(context.cwd, productionBranch)) {
6819
6970
  steps.push(createGithubReleaseConfigCheckStep(state, context));
6820
6971
  }
6821
6972
  return steps;
@@ -7329,6 +7480,7 @@ export async function setupGithubVercelRelease(cwd, options = {}) {
7329
7480
  const manifest = manifestText
7330
7481
  ? parseJson(manifestText, "loom.json")
7331
7482
  : null;
7483
+ const productionBranch = resolveProductionBranch(manifest?.features.db?.config?.release);
7332
7484
  const vercelLink = await readVercelProjectLink(cwd);
7333
7485
  if (!vercelLink.linked || !vercelLink.orgId || !vercelLink.projectId) {
7334
7486
  throw new Error(`${vercelLink.detail} Run \`vercel link\` before \`loom db release setup-github\`.`);
@@ -7367,8 +7519,8 @@ export async function setupGithubVercelRelease(cwd, options = {}) {
7367
7519
  `repos/:owner/:repo/environments/${environment}/deployment-branch-policies`,
7368
7520
  ], { cwd, env, stdio: "pipe" });
7369
7521
  const branchPolicies = parseJson(branchPoliciesResult.stdout || "{}", "GitHub deployment branch policies");
7370
- if (!branchPolicies.branch_policies?.some((policy) => policy.name === "main")) {
7371
- await requireCommand(`Allow main to deploy to GitHub ${environment}`, commandRunner, "gh", [
7522
+ if (!branchPolicies.branch_policies?.some((policy) => policy.name === productionBranch)) {
7523
+ await requireCommand(`Allow ${productionBranch} to deploy to GitHub ${environment}`, commandRunner, "gh", [
7372
7524
  "api",
7373
7525
  "--method",
7374
7526
  "POST",
@@ -7378,11 +7530,11 @@ export async function setupGithubVercelRelease(cwd, options = {}) {
7378
7530
  ], {
7379
7531
  cwd,
7380
7532
  env,
7381
- input: JSON.stringify({ name: "main", type: "branch" }),
7533
+ input: JSON.stringify({ name: productionBranch, type: "branch" }),
7382
7534
  stdio: "pipe",
7383
7535
  });
7384
7536
  }
7385
- notes.push(`Ensured GitHub environment \`${environment}\` exists and only allows the main release branch.`);
7537
+ notes.push(`Ensured GitHub environment \`${environment}\` exists and allows the ${productionBranch} release branch; existing branch policies are preserved.`);
7386
7538
  await requireCommand("Set GitHub VERCEL_ORG_ID variable", commandRunner, "gh", [
7387
7539
  "variable",
7388
7540
  "set",
@@ -7540,6 +7692,7 @@ async function applyDbFeature(cwd, framework, manifest, activate) {
7540
7692
  const currentFeature = manifest.features.db;
7541
7693
  const currentConfig = currentFeature?.config;
7542
7694
  const config = mergeDbConfig(framework, currentConfig);
7695
+ resolveProductionBranch(config.release);
7543
7696
  const feature = currentFeature
7544
7697
  ? structuredClone(currentFeature)
7545
7698
  : { status: "planned" };
@@ -8446,11 +8599,22 @@ async function checkDbFeature(cwd, framework, manifest, options) {
8446
8599
  return { issues, suggestions: [], warnings };
8447
8600
  }
8448
8601
  const config = mergeDbConfig(framework, feature.config);
8602
+ let productionBranch;
8603
+ try {
8604
+ productionBranch = resolveProductionBranch(config.release);
8605
+ }
8606
+ catch (error) {
8607
+ return {
8608
+ issues: [error.message],
8609
+ suggestions: ["Fix features.db.config.release in loom.json."],
8610
+ warnings,
8611
+ };
8612
+ }
8449
8613
  const { packageJson } = await readProjectPackageJson(cwd);
8450
8614
  const tooling = await getProjectTooling(cwd, manifest);
8451
8615
  const testRunner = await getDbTestRunner(cwd, tooling);
8452
8616
  const expectedScripts = getDbExpectedScripts(config, tooling);
8453
- const migrationFlowCheck = await checkDbProductionMigrationFlow(cwd, options.production ?? false);
8617
+ const migrationFlowCheck = await checkDbProductionMigrationFlow(cwd, options.production ?? false, productionBranch);
8454
8618
  issues.push(...migrationFlowCheck.issues);
8455
8619
  warnings.push(...migrationFlowCheck.warnings);
8456
8620
  for (const suggestion of migrationFlowCheck.suggestions) {
@@ -9646,6 +9810,18 @@ export async function initProject(cwd, versionRange) {
9646
9810
  }
9647
9811
  const packageJson = (await readProjectPackageMetadata(cwd))
9648
9812
  .packageJson;
9813
+ if (tooling.dependencies.manager === "pnpm") {
9814
+ const workspacePath = join(cwd, "pnpm-workspace.yaml");
9815
+ const releaseAgeUpdate = ensurePnpmWorkspaceLoomReleaseAgeExcludeText(await readTextIfExists(workspacePath));
9816
+ if (releaseAgeUpdate.conflict) {
9817
+ notes.push(releaseAgeUpdate.conflict);
9818
+ }
9819
+ else if (releaseAgeUpdate.changed) {
9820
+ await writeFile(workspacePath, releaseAgeUpdate.text, "utf8");
9821
+ changedFiles.push("pnpm-workspace.yaml");
9822
+ notes.push("Excluded first-party @gadicc/loom releases from pnpm's minimum release-age delay.");
9823
+ }
9824
+ }
9649
9825
  const framework = await detectFramework(cwd, packageJson);
9650
9826
  const manifest = buildManifest(cwd, packageJson, framework, existingManifest, tooling);
9651
9827
  const featureInit = await ensureActiveFeatureScaffolds(cwd, framework, manifest);
@@ -9850,6 +10026,12 @@ export async function checkProject(cwd, env = process.env, options = {}) {
9850
10026
  warnings.push(".npmrc retains Loom's obsolete GitHub Packages registry configuration.");
9851
10027
  suggestions.add("Run `loom init` to remove the obsolete Loom registry lines.");
9852
10028
  }
10029
+ const pnpmCompatibilityCheck = await checkPnpm11Compatibility(cwd, packageJson, npmrcText);
10030
+ issues.push(...pnpmCompatibilityCheck.issues);
10031
+ warnings.push(...pnpmCompatibilityCheck.warnings);
10032
+ for (const suggestion of pnpmCompatibilityCheck.suggestions) {
10033
+ suggestions.add(suggestion);
10034
+ }
9853
10035
  const framework = await detectFramework(cwd, packageJson);
9854
10036
  const dependency = packageJson.dependencies?.[LOOM_DEPENDENCY];
9855
10037
  if (!dependency) {
@@ -0,0 +1,10 @@
1
+ /** App-owned production release settings in features.db.config.release. */
2
+ export type DbReleaseConfig = {
3
+ /** Literal short Git branch name; omitted settings retain the main default. */
4
+ productionBranch?: string;
5
+ };
6
+ /** Portable literal branch names, excluding Git-invalid paths and glob syntax. */
7
+ export declare const PRODUCTION_BRANCH_PATTERN: string;
8
+ /** Resolve the release branch before writing provider configuration or checking it. */
9
+ export declare function resolveProductionBranch(release: unknown): string;
10
+ //# sourceMappingURL=releaseConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseConfig.d.ts","sourceRoot":"","sources":["../../../src/src/cli/releaseConfig.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG;IAC5B,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,QAC8E,CAAC;AAErH,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAuBhE"}
@@ -0,0 +1,22 @@
1
+ /** Portable literal branch names, excluding Git-invalid paths and glob syntax. */
2
+ export const PRODUCTION_BRANCH_PATTERN = String
3
+ .raw `^(?!HEAD$)(?!refs/)(?!.*(?:\.\.|//|/\.))(?!.*\.lock(?:/|$))(?!.*[/.]$)[A-Za-z0-9_][A-Za-z0-9._/-]*(?![\s\S])`;
4
+ /** Resolve the release branch before writing provider configuration or checking it. */
5
+ export function resolveProductionBranch(release) {
6
+ if (release === undefined)
7
+ return "main";
8
+ if (typeof release !== "object" || release === null || Array.isArray(release)) {
9
+ throw new Error("features.db.config.release must be an object.");
10
+ }
11
+ if (Object.keys(release).some((key) => key !== "productionBranch")) {
12
+ throw new Error("features.db.config.release only supports productionBranch.");
13
+ }
14
+ const branch = release.productionBranch;
15
+ if (branch === undefined)
16
+ return "main";
17
+ if (typeof branch !== "string" ||
18
+ !new RegExp(PRODUCTION_BRANCH_PATTERN).test(branch)) {
19
+ throw new Error("features.db.config.release.productionBranch must be a literal short Git branch name using letters, numbers, underscores, dots, hyphens or slashes; patterns and refs/ prefixes are not supported.");
20
+ }
21
+ return branch;
22
+ }