@crustjs/crust-linux-x64-musl 0.3.6 → 0.4.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-musl
3
- size: 75408944 bytes
4
- sha256: 1d6089513d87ee63100d3ee30671548cffea9eada451453d0adf5ca628dfecb0
3
+ size: 75417136 bytes
4
+ sha256: f3aaedc89054e2d0f31ef4275d5edfe99319dd99a1e87573d4ef02e261174bbe
@@ -0,0 +1,74 @@
1
+ import { BuildReport, BuildReport as BuildReport$1 } from "@crustjs/core";
2
+ import "@crustjs/core/tooling";
3
+ //#region src/utils/distribute.d.ts
4
+ /**
5
+ * One file `crust build` generated or compiled into the staged tree. `target`
6
+ * is the canonical compiler target of a platform package (`bun-linux-x64`),
7
+ * absent for the root package. Extension build hook output is reported by
8
+ * command in the `BuildReport`s instead, not repeated here.
9
+ */
10
+ type BuildArtifact = {
11
+ kind: "package-json";
12
+ path: string;
13
+ target?: string;
14
+ } | {
15
+ kind: "launcher";
16
+ path: string;
17
+ command: string;
18
+ } | {
19
+ kind: "executable";
20
+ path: string;
21
+ command: string;
22
+ target: string;
23
+ } | {
24
+ kind: "bundle";
25
+ path: string;
26
+ command: string;
27
+ };
28
+ //#endregion
29
+ //#region src/commands/build.d.ts
30
+ /** Options of the programmatic {@link build}; `crust build` maps its flags onto them. */
31
+ type BuildOptions = {
32
+ /** Project root whose package.json `bin` and `crust` are read. Default: `process.cwd()`. */
33
+ cwd?: string;
34
+ /**
35
+ * 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.
38
+ */
39
+ targets?: readonly string[];
40
+ /** Env files inlining `PUBLIC_*` build-time constants, resolved against `cwd`. Rejected for deno. */
41
+ envFiles?: readonly string[];
42
+ /** Minify the output. Default: true for bun and node; an explicit `true` is rejected for deno. */
43
+ minify?: boolean;
44
+ /** Materialize Command Snapshots and run Extension build hooks before compiling. Default: true. */
45
+ validate?: boolean;
46
+ /** Receives each progress line `crust build` would print; silent when omitted. Warnings arrive as `"stderr"`. */
47
+ onLog?: (line: string, stream: "stdout" | "stderr") => void;
48
+ };
49
+ /** What {@link build} staged in `stageDir` (`<cwd>/.crust`). */
50
+ type BuildResult = {
51
+ stageDir: string;
52
+ /** Generated package.json files, launchers, and compiled commands; see {@link BuildArtifact}. */
53
+ artifacts: BuildArtifact[];
54
+ /** Extension build hook output per command; absent when `validate` was false. */
55
+ reports?: Record<string, BuildReport$1>;
56
+ };
57
+ /**
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
64
+ * subprocesses (bun on PATH, or the running Bun executable), so this works
65
+ * under Node as well when Bun is installed.
66
+ *
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.
71
+ */
72
+ export declare function build(options?: BuildOptions): Promise<BuildResult>;
73
+ //#endregion
74
+ export type { BuildArtifact, BuildOptions, BuildReport, BuildResult };