Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"source": {
"source": "github",
"repo": "LasVegasForTransit/repository-tooling",
"ref": "v0.7.8"
"ref": "v0.7.9"
}
}
},
Expand Down
6 changes: 3 additions & 3 deletions .lvbt/web-platform.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"formatVersion": 1,
"preset": "lvbt-web",
"release": "v0.7.8",
"commit": "3690a066080a394bb3af97dc5717844d3011a467",
"contentHash": "4221255e2e275d9630e40922f45132c25fc5787903eedb5d43b4c6a59b120103",
"release": "v0.7.9",
"commit": "5ebebb6dd19040acae98054e39ff794ae3fc8660",
"contentHash": "d2fa90baa7effc16137c1dada07bdd788ad53bfe489c1d44e0a865269466356d",
"executables": [
"examples/with-astro/.githooks/commit-msg",
"examples/with-astro/.githooks/pre-commit",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"source": {
"source": "github",
"repo": "LasVegasForTransit/repository-tooling",
"ref": "v0.7.8"
"ref": "v0.7.9"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

staging:
needs: [build, attest]
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@3567f0cb1345e8756eb5d84e0a3ea7b62695125a
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@141cafabceeebaef795812d530f573e56e01d2df
with:
target: preview
attestation-prefix: attestation-app-release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
secrets: inherit
promote:
needs: source
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@3567f0cb1345e8756eb5d84e0a3ea7b62695125a
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@141cafabceeebaef795812d530f573e56e01d2df
with:
target: production
expected-version: ${{ inputs.expected_version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"validate": "cf deploy --dry-run"
},
"devDependencies": {
"@lasvegasfortransit/eslint-config": "0.7.8",
"@lasvegasfortransit/eslint-config": "0.7.9",
"@lasvegasfortransit/site": "workspace:*",
"@lasvegasfortransit/typescript-config": "0.7.8",
"@lasvegasfortransit/typescript-config": "0.7.9",
"cf": "catalog:",
"eslint": "catalog:",
"typescript": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions .lvbt/web-platform/examples/with-astro/apps/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
},
"devDependencies": {
"@astrojs/check": "catalog:",
"@lasvegasfortransit/eslint-config": "0.7.8",
"@lasvegasfortransit/playwright-config": "0.7.8",
"@lasvegasfortransit/typescript-config": "0.7.8",
"@lasvegasfortransit/vitest-config": "0.7.8",
"@lasvegasfortransit/eslint-config": "0.7.9",
"@lasvegasfortransit/playwright-config": "0.7.9",
"@lasvegasfortransit/typescript-config": "0.7.9",
"@lasvegasfortransit/vitest-config": "0.7.9",
"@playwright/test": "catalog:",
"@types/node": "catalog:",
"eslint": "catalog:",
Expand Down
6 changes: 3 additions & 3 deletions .lvbt/web-platform/examples/with-astro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"*": "prettier --write --ignore-unknown"
},
"devDependencies": {
"@lasvegasfortransit/cli": "0.7.8",
"@lasvegasfortransit/prettier-config": "0.7.8",
"@lasvegasfortransit/cli": "0.7.9",
"@lasvegasfortransit/prettier-config": "0.7.9",
"lint-staged": "catalog:",
"markdownlint-cli2": "catalog:",
"markdownlint-rule-relative-links": "catalog:",
Expand All @@ -39,7 +39,7 @@
"typescript": "catalog:",
"wrangler": "catalog:",
"tsx": "catalog:",
"@lasvegasfortransit/web-platform": "0.7.8"
"@lasvegasfortransit/web-platform": "0.7.9"
},
"packageManager": "pnpm@11.25.0",
"engines": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"source": {
"source": "github",
"repo": "LasVegasForTransit/repository-tooling",
"ref": "v0.7.8"
"ref": "v0.7.9"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:

staging:
needs: [build, attest]
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@3567f0cb1345e8756eb5d84e0a3ea7b62695125a
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@141cafabceeebaef795812d530f573e56e01d2df
with:
target: preview
attestation-prefix: attestation-app-release
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
secrets: inherit
promote:
needs: source
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@3567f0cb1345e8756eb5d84e0a3ea7b62695125a
uses: LasVegasForTransit/repository-tooling/.github/workflows/release-publish.yml@141cafabceeebaef795812d530f573e56e01d2df
with:
target: production
expected-version: ${{ inputs.expected_version }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"react-dom": "catalog:"
},
"devDependencies": {
"@lasvegasfortransit/eslint-config": "0.7.8",
"@lasvegasfortransit/playwright-config": "0.7.8",
"@lasvegasfortransit/typescript-config": "0.7.8",
"@lasvegasfortransit/vitest-config": "0.7.8",
"@lasvegasfortransit/eslint-config": "0.7.9",
"@lasvegasfortransit/playwright-config": "0.7.9",
"@lasvegasfortransit/typescript-config": "0.7.9",
"@lasvegasfortransit/vitest-config": "0.7.9",
"@playwright/test": "catalog:",
"@tailwindcss/vite": "catalog:",
"@types/node": "catalog:",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"validate": "cf deploy --dry-run"
},
"devDependencies": {
"@lasvegasfortransit/eslint-config": "0.7.8",
"@lasvegasfortransit/eslint-config": "0.7.9",
"@lasvegasfortransit/app": "workspace:*",
"@lasvegasfortransit/typescript-config": "0.7.8",
"@lasvegasfortransit/typescript-config": "0.7.9",
"cf": "catalog:",
"eslint": "catalog:",
"typescript": "catalog:",
Expand Down
6 changes: 3 additions & 3 deletions .lvbt/web-platform/examples/with-vite-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"*": "prettier --write --ignore-unknown"
},
"devDependencies": {
"@lasvegasfortransit/cli": "0.7.8",
"@lasvegasfortransit/prettier-config": "0.7.8",
"@lasvegasfortransit/cli": "0.7.9",
"@lasvegasfortransit/prettier-config": "0.7.9",
"lint-staged": "catalog:",
"markdownlint-cli2": "catalog:",
"markdownlint-rule-relative-links": "catalog:",
Expand All @@ -38,7 +38,7 @@
"typescript": "catalog:",
"wrangler": "catalog:",
"tsx": "catalog:",
"@lasvegasfortransit/web-platform": "0.7.8"
"@lasvegasfortransit/web-platform": "0.7.9"
},
"packageManager": "pnpm@11.25.0",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/cli",
"version": "0.7.8",
"version": "0.7.9",
"description": "The lvbt command every LVBT repository runs for bootstrap, preflight, and deploy, plus the production platform setup, the shared git hooks, and the lvbt-contributions agent plugin.",
"license": "MIT",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lvbt-contributions",
"version": "0.7.8",
"version": "0.7.9",
"description": "Create readable LVBT contributions and reconcile trusted audit and recurring issues through the organization workflow.",
"author": {
"name": "Las Vegans for Better Transit",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lvbt-contributions",
"version": "0.7.8",
"version": "0.7.9",
"description": "Create readable LVBT contributions and reconcile trusted audit and recurring issues through the organization workflow.",
"author": {
"name": "Las Vegans for Better Transit",
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/eslint-config",
"version": "0.7.8",
"version": "0.7.9",
"description": "The ESLint configurations every LVBT repository uses.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/playwright-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/playwright-config",
"version": "0.7.8",
"version": "0.7.9",
"description": "The Playwright configuration every LVBT repository spreads into its own: end-to-end tests under tests/e2e, desktop and mobile projects, traces on failure.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/prettier-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/prettier-config",
"version": "0.7.8",
"version": "0.7.9",
"description": "The Prettier configuration every LVBT repository uses.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/typescript-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/typescript-config",
"version": "0.7.8",
"version": "0.7.9",
"description": "TypeScript configurations every LVBT repository extends.",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/vitest-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/vitest-config",
"version": "0.7.8",
"version": "0.7.9",
"description": "The Vitest configuration every LVBT repository spreads into its own.",
"license": "MIT",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion .lvbt/web-platform/packages/web-platform/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lasvegasfortransit/web-platform",
"version": "0.7.8",
"version": "0.7.9",
"description": "Provider-neutral deployment, provisioning, and validation primitives for LVBT web repositories.",
"license": "MIT",
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,12 +203,26 @@ async function verifiedManifest(
}
return manifest;
}
function migrationEnvironment(): NodeJS.ProcessEnv {
const token = process.env.CLOUDFLARE_MIGRATIONS_API_TOKEN;
if (token !== undefined && !token.trim())
throw new Error(
'CLOUDFLARE_MIGRATIONS_API_TOKEN must be nonempty when supplied; no SQL was applied.',
);
return {
...process.env,
...(token === undefined ? {} : { CLOUDFLARE_API_TOKEN: token }),
CI: 'true',
WRANGLER_LOG_SANITIZE: 'true',
};
}
async function applyMigrations(
directory: string,
manifest: z.infer<typeof manifestSchema>,
target: string,
artifactHash: string,
): Promise<void> {
const env = migrationEnvironment();
const temporary = await mkdtemp(path.join(os.tmpdir(), 'lvbt-release-migrate-'));
try {
const copy = path.join(temporary, 'release');
Expand All @@ -234,7 +248,7 @@ async function applyMigrations(
target === 'preview' ? 'preview' : '',
],
{
env: { ...process.env, CI: 'true', WRANGLER_LOG_SANITIZE: 'true' },
env,
maxBuffer: 16 * 1024 * 1024,
},
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,22 @@ test('named production installs Chromium before its browser-backed public smoke'
namedProduction.indexOf('name: Verify activated origin'),
);
});

test('every migration step supplies a separate D1 credential without overriding the publisher credential', async () => {
const workflow = await readFile(
new URL('../../../.github/workflows/release-publish.yml', import.meta.url),
'utf8',
);
const migrations = workflow
.split(' - name: ')
.filter((step) => step.startsWith('Apply retained '));
expect(migrations).toHaveLength(4);
for (const step of migrations) {
const environment = step.slice(step.indexOf(' env:'), step.indexOf(' run:'));
expect(environment).toMatch(/^\s+CLOUDFLARE_MIGRATIONS_API_TOKEN:/mu);
expect(environment).not.toMatch(/^\s+CLOUDFLARE_API_TOKEN:/mu);
expect(environment).toContain('secrets.CLOUDFLARE_MIGRATIONS_API_TOKEN ||');
if (step.startsWith('Apply retained production schema'))
expect(step).toContain('--expected-version "$EXPECTED_PRODUCTION_VERSION"');
}
});
Loading
Loading