Skip to content

Commit 7c2a12f

Browse files
fix(server): stop packing the deleted service-launcher entry
The build:bundle script and the publish asset check still named service-launcher.mjs after its source was removed, which failed the server build in CI. The marketing staging script also imported Node built-ins in the form the repo's lint rule rejects. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 5435a68 commit 7c2a12f

3 files changed

Lines changed: 10 additions & 14 deletions

File tree

‎apps/marketing/scripts/stage-install-scripts.mjs‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
// the release tooling; the site serves them at /install.sh and /install.ps1.
33
// Copy them into public/ before every Astro build and dev server so the two
44
// never drift. The copies are gitignored.
5-
import { copyFileSync, mkdirSync } from "node:fs";
6-
import { dirname, join } from "node:path";
7-
import { fileURLToPath } from "node:url";
5+
import * as NodeFS from "node:fs";
6+
import * as NodePath from "node:path";
7+
import * as NodeURL from "node:url";
88

9-
const marketingDir = dirname(dirname(fileURLToPath(import.meta.url)));
10-
const repoRoot = dirname(dirname(marketingDir));
11-
const publicDir = join(marketingDir, "public");
12-
mkdirSync(publicDir, { recursive: true });
9+
const marketingDir = NodePath.dirname(NodePath.dirname(NodeURL.fileURLToPath(import.meta.url)));
10+
const repoRoot = NodePath.dirname(NodePath.dirname(marketingDir));
11+
const publicDir = NodePath.join(marketingDir, "public");
12+
NodeFS.mkdirSync(publicDir, { recursive: true });
1313
for (const name of ["install.sh", "install.ps1"]) {
14-
copyFileSync(join(repoRoot, "scripts", name), join(publicDir, name));
14+
NodeFS.copyFileSync(NodePath.join(repoRoot, "scripts", name), NodePath.join(publicDir, name));
1515
}

‎apps/server/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"type": "module",
1717
"scripts": {
1818
"dev": "node --watch src/bin.ts",
19-
"build:bundle": "vp pack && vp pack src/service-launcher.ts --out-dir dist --no-clean",
19+
"build:bundle": "vp pack",
2020
"build:exe": "node scripts/cli.ts build-exe",
2121
"start": "node dist/bin.mjs",
2222
"typecheck": "tsc --noEmit",

‎apps/server/scripts/cli.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,7 @@ const publishCmd = Command.make(
284284
const packageJsonPath = path.join(serverDir, "package.json");
285285

286286
// Assert build assets exist
287-
for (const relPath of [
288-
"dist/bin.mjs",
289-
"dist/service-launcher.mjs",
290-
"dist/client/index.html",
291-
]) {
287+
for (const relPath of ["dist/bin.mjs", "dist/client/index.html"]) {
292288
const abs = path.join(serverDir, relPath);
293289
if (!(yield* fs.exists(abs))) {
294290
return yield* new ServerCliBuildAssetMissingError({ assetPath: abs });

0 commit comments

Comments
 (0)