@timmo001/groundwork-report 0.9.39 → 0.9.40

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timmo001/groundwork-report",
3
- "version": "0.9.39",
3
+ "version": "0.9.40",
4
4
  "description": "Groundwork's report page: one self-contained HTML file built from blocks, with every theme and the desktop's Omarchy theme",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -35,8 +35,8 @@
35
35
  "format:check": "prettier --check ."
36
36
  },
37
37
  "dependencies": {
38
- "@timmo001/groundwork-tokens": "0.9.39",
39
- "@timmo001/groundwork-ui": "0.9.39",
38
+ "@timmo001/groundwork-tokens": "0.9.40",
39
+ "@timmo001/groundwork-ui": "0.9.40",
40
40
  "effect": "4.1.2"
41
41
  },
42
42
  "devDependencies": {
package/src/assets.ts CHANGED
@@ -17,17 +17,21 @@ import type { ReportAssets } from "./page.ts";
17
17
 
18
18
  /** Bundles the page script and reads the themes' CSS. */
19
19
  export const reportAssets = async (): Promise<ReportAssets> => {
20
- const build = await Bun.build({
21
- entrypoints: [fileURLToPath(import.meta.resolve("./client.ts"))],
22
- target: "browser",
23
- format: "esm",
24
- minify: true,
25
- });
20
+ // The CLI rather than `Bun.build`, which can't run inside a macro while
21
+ // the bundler waits on it
22
+ const build = Bun.spawnSync([
23
+ process.execPath,
24
+ "build",
25
+ fileURLToPath(import.meta.resolve("./client.ts")),
26
+ "--target=browser",
27
+ "--format=esm",
28
+ "--minify",
29
+ ]);
26
30
 
27
- const [output] = build.outputs;
28
-
29
- if (!build.success || output === undefined) {
30
- throw new AggregateError(build.logs, "The report script didn't build");
31
+ if (!build.success) {
32
+ throw new Error(
33
+ `The report script didn't build:\n${build.stderr.toString()}`,
34
+ );
31
35
  }
32
36
 
33
37
  const css = await Bun.file(
@@ -36,5 +40,5 @@ export const reportAssets = async (): Promise<ReportAssets> => {
36
40
  ),
37
41
  ).text();
38
42
 
39
- return { css, script: await output.text() };
43
+ return { css, script: build.stdout.toString() };
40
44
  };
package/src/desktop.ts CHANGED
@@ -14,7 +14,7 @@ import { Result, Schema } from "effect";
14
14
 
15
15
  import { readDesktopThemes } from "@timmo001/groundwork-tokens/desktop-themes";
16
16
  import { readOmarchyTheme } from "@timmo001/groundwork-tokens/omarchy-current";
17
- import { optionalThemeDocuments } from "@timmo001/groundwork-tokens/page";
17
+ import { optionalThemeDocuments } from "@timmo001/groundwork-tokens/choices";
18
18
  import {
19
19
  omarchyTheme,
20
20
  type OmarchyCurrentTheme,
package/src/page.ts CHANGED
@@ -7,7 +7,8 @@
7
7
  */
8
8
  import type { MappedTheme } from "@timmo001/groundwork-tokens";
9
9
  import type { OmarchyCurrentTheme } from "@timmo001/groundwork-tokens/runtime";
10
- import { themeBootScript } from "@timmo001/groundwork-tokens/page";
10
+ // From `choices`, not `page`, so a CLI without the DOM lib type-checks it
11
+ import { themeBootScript } from "@timmo001/groundwork-tokens/choices";
11
12
 
12
13
  import { html, raw, type Content } from "./html.ts";
13
14
  import { reportCss } from "./styles.ts";