@akanjs/devkit 3.0.0-beta.32 → 3.0.0-beta.33

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.
@@ -7,8 +7,8 @@ const track = tempRoots();
7
7
 
8
8
  const wait = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
9
9
 
10
- const until = async (proc: Bun.Subprocess, what: string, condition: () => boolean) => {
11
- const deadline = Date.now() + 20_000;
10
+ const until = async (proc: Bun.Subprocess, what: string, condition: () => boolean, timeoutMs = 20_000) => {
11
+ const deadline = Date.now() + timeoutMs;
12
12
  while (!condition()) {
13
13
  if (proc.exitCode !== null || Date.now() > deadline) throw new Error(`the builder never sent ${what}`);
14
14
  await wait(20);
@@ -124,7 +124,8 @@ process.send({ type: "build-batch-result", data: { generation, errors: {}, artif
124
124
  const ssrRuns = async () =>
125
125
  (await Bun.file(runs).exists()) ? (await Bun.file(runs).text()).trim().split("\n").map(Number) : [];
126
126
  try {
127
- await until(proc, "boot-armed", () => messages.some((message) => message.type === "boot-armed"));
127
+ //? boot-armed waits out the 10s crash window first, so 20s left a loaded machine too little for the rest.
128
+ await until(proc, "boot-armed", () => messages.some((message) => message.type === "boot-armed"), 30_000);
128
129
  const [first = 0, second = 0] = await ssrRuns();
129
130
  expect(await ssrRuns()).toHaveLength(2);
130
131
  expect(second - first).toBeGreaterThanOrEqual(9_500);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@akanjs/devkit",
3
- "version": "3.0.0-beta.32",
3
+ "version": "3.0.0-beta.33",
4
4
  "sourceType": "module",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -47,7 +47,7 @@
47
47
  "@earendil-works/pi-tui": "0.86.1",
48
48
  "@inquirer/prompts": "^8.4.3",
49
49
  "@tailwindcss/node": "^4.3.0",
50
- "akanjs": "3.0.0-beta.32",
50
+ "akanjs": "3.0.0-beta.33",
51
51
  "chalk": "^5.6.2",
52
52
  "commander": "^14.0.3",
53
53
  "dayjs": "^1.11.20",