@crustjs/crust-linux-x64 0.4.1 → 0.5.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.
@@ -1,4 +1,4 @@
1
1
  [diffend] Oversized file quarantined before diffing.
2
2
  name: package/bin/crust-bun-linux-x64
3
- size: 81446368 bytes
4
- sha256: 955217b1525763b803323a8913d88223c40f6abddf7ef9f22bf8ce9d9b1cf363
3
+ size: 81483232 bytes
4
+ sha256: 26e605fc91569c507f4560d18517271384362d1c5f1513a61cc2538494eec6ca
@@ -1,6 +1,13 @@
1
1
  import { BuildReport, BuildReport as BuildReport$1 } from "@crustjs/core";
2
2
  import "@crustjs/core/tooling";
3
3
  //#region src/utils/distribute.d.ts
4
+ /**
5
+ * What one build distributes: a runtime `package` (a root-only JavaScript
6
+ * bundle that needs the runtime installed) or standalone `binary` executables
7
+ * in platform packages behind a Node launcher.
8
+ */
9
+ declare const ARTIFACT_KINDS: readonly ["package", "binary"];
10
+ type ArtifactKind = (typeof ARTIFACT_KINDS)[number];
4
11
  /**
5
12
  * One file `crust build` generated or compiled into the staged tree. `target`
6
13
  * is the canonical compiler target of a platform package (`bun-linux-x64`),
@@ -31,10 +38,17 @@ type BuildArtifact = {
31
38
  type BuildOptions = {
32
39
  /** Project root whose package.json `bin` and `crust` are read. Default: `process.cwd()`. */
33
40
  cwd?: string;
41
+ /**
42
+ * `"package"` for a runtime package (a root-only JavaScript bundle that runs
43
+ * on the installed runtime) or `"binary"` for standalone executables in
44
+ * platform packages. Overrides package.json `crust.artifact`; one of the two
45
+ * is required.
46
+ */
47
+ artifact?: ArtifactKind;
34
48
  /**
35
49
  * Canonical compiler targets, or `"host"` for this machine. Overrides
36
- * package.json `crust.targets`; omit both to stage every Bun/Deno target.
37
- * Rejected for the node runtime.
50
+ * package.json `crust.targets`; omit both to stage every target of the
51
+ * binary compiler. Rejected for runtime packages.
38
52
  */
39
53
  targets?: readonly string[];
40
54
  /** Env files inlining `PUBLIC_*` build-time constants, resolved against `cwd`. Rejected for deno. */
@@ -55,19 +69,23 @@ type BuildResult = {
55
69
  reports?: Record<string, BuildReport$1>;
56
70
  };
57
71
  /**
58
- * Stages the publishable npm tree in `<cwd>/.crust`: a root package with one
59
- * `bin/<command>.js` per package.json `bin` entry, each a Node launcher (Bun,
60
- * Deno) or the bundle itself (Node), plus one platform package per target for
61
- * Bun and Deno holding one binary per command. Command names and source
62
- * entries come from `bin`; the runtime, Bun plugins, and extra directories
63
- * from package.json `crust`. Compilation and Command Snapshots run in bun
72
+ * Stages the publishable npm tree in `<cwd>/.crust` for one runtime/artifact
73
+ * combination: a root package with one `bin/<command>.js` per package.json
74
+ * `bin` entry, each the command's bundle (artifact `package`) or a Node
75
+ * launcher (artifact `binary`), plus for binaries one platform package per
76
+ * target holding one executable per command. Command names and source entries
77
+ * come from `bin`; the runtime, artifact, Bun plugins, and extra directories
78
+ * from package.json `crust`. Bundling and Command Snapshots run in bun
64
79
  * subprocesses (bun on PATH, or the running Bun executable), so this works
65
- * under Node as well when Bun is installed.
80
+ * under Node as well when Bun is installed; Deno binaries and Deno runtime
81
+ * packages (experimental, deno 2.5.0 or newer) need deno on PATH, and Node
82
+ * binaries a node on PATH that Crust's tsdown can build executables with.
66
83
  *
67
- * Throws on any failure. Planning failures (bad options or package.json) leave
68
- * the previous `.crust/` stage untouched; failures after planning leave a
69
- * wiped stage without a completion `manifest.json`. Overlapping calls for the
70
- * same real project directory in this process are rejected before staging.
84
+ * Throws on any failure. Planning and compiler-selection failures (bad
85
+ * options or package.json, a missing or hung compiler, an engines mismatch) leave the
86
+ * previous `.crust/` stage untouched; later failures leave a wiped stage
87
+ * without a completion `manifest.json`. Overlapping calls for the same real
88
+ * project directory in this process are rejected before staging.
71
89
  */
72
90
  export declare function build(options?: BuildOptions): Promise<BuildResult>;
73
91
  //#endregion