@rightkit/release 0.2.173 → 0.2.174
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/README.md +10 -4
- package/bin/darwin/rightkit-swap +0 -0
- package/bin/darwin/rightkit-swap.sign.json +1 -1
- package/cli/right-release.mjs +5 -3
- package/development-signing.mjs +135 -4
- package/development.mjs +12 -11
- package/in-place-install.mjs +32 -7
- package/install-app-windows.mjs +108 -17
- package/install-app.mjs +32 -8
- package/install-tauri-devid.mjs +106 -47
- package/mac-bundle-signing.mjs +143 -1
- package/mac-signing-matrix.mjs +73 -6
- package/macos-signing-session.mjs +12 -2
- package/package-recipe-targets.mjs +166 -16
- package/package.json +1 -1
- package/portable-development.mjs +9 -9
- package/qa-build-features.mjs +7 -1
- package/recipe-build.mjs +346 -0
- package/release.mjs +23 -8
- package/rightkit-signing-agent.mjs +10 -4
- package/rightkit-versions.json +9 -5
- package/runtime-budgets.mjs +14 -5
- package/stage-binary.mjs +1 -1
- package/stage-sidecar-command.mjs +36 -4
- package/stage-sidecar.mjs +463 -48
package/stage-binary.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { resolveTargetRoot } from "./cargo-target.mjs";
|
|
|
9
9
|
* The build broker writes Cargo output to per-generation folders (`<managed>/rightkit-build-control/ws/<hash>/g/<gen>/...`)
|
|
10
10
|
* and `cargo-guard` uses a hashed `dev-targets/<project>-<hash>` folder. Those are build output only: their path is not
|
|
11
11
|
* stable, so NOTHING may run from them. macOS ties privacy grants to the path an app runs from, so a dev or QA binary is
|
|
12
|
-
* copied in place to `<root>/.rightkit-dev-bin/<triple-or-host>/<name>` (
|
|
12
|
+
* copied in place to `<root>/.rightkit-dev-bin/<triple-or-host>/<name>` (replaced in place, no `.previous` kept) and run from there.
|
|
13
13
|
*/
|
|
14
14
|
export const DEV_STAGE_DIRECTORY = ".rightkit-dev-bin";
|
|
15
15
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// `right-release stage-sidecar [--config right-release.config.mjs] [--target <triple>]` (bogusyogi/rightkit#345):
|
|
3
|
-
// stages the config's declarative `sidecars` into src-tauri/binaries with Tauri externalBin naming.
|
|
2
|
+
// `right-release stage-sidecar [--config right-release.config.mjs] [--target <triple>] [--check] [--json]` (bogusyogi/rightkit#345):
|
|
3
|
+
// stages the config's declarative `sidecars` into src-tauri/binaries with Tauri externalBin naming. `--check` validates
|
|
4
|
+
// the manifest and prints the plan without building, downloading, copying or deleting anything (for template gates).
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { pathToFileURL } from "node:url";
|
|
6
|
-
import { resolveTargetTriple, stageSidecars } from "./stage-sidecar.mjs";
|
|
7
|
+
import { planSidecarStaging, resolveTargetTriple, stageSidecars } from "./stage-sidecar.mjs";
|
|
7
8
|
|
|
8
9
|
export function parseStageSidecarArgs(argv) {
|
|
9
|
-
const opts = { config: "right-release.config.mjs", target: undefined, json: false };
|
|
10
|
+
const opts = { config: "right-release.config.mjs", target: undefined, json: false, check: false };
|
|
10
11
|
for (let i = 0; i < argv.length; i += 1) {
|
|
11
12
|
const arg = argv[i];
|
|
12
13
|
if (arg === "--config" || arg === "--target") {
|
|
@@ -15,11 +16,35 @@ export function parseStageSidecarArgs(argv) {
|
|
|
15
16
|
opts[arg.slice(2)] = value;
|
|
16
17
|
i += 1;
|
|
17
18
|
} else if (arg === "--json") opts.json = true;
|
|
19
|
+
else if (arg === "--check") opts.check = true;
|
|
18
20
|
else throw new Error(`unknown stage-sidecar argument: ${arg}`);
|
|
19
21
|
}
|
|
20
22
|
return opts;
|
|
21
23
|
}
|
|
22
24
|
|
|
25
|
+
const NODE_ARCH = { x64: "x86_64", arm64: "aarch64" };
|
|
26
|
+
const NODE_OS = { darwin: "apple-darwin", win32: "pc-windows-msvc", linux: "unknown-linux-gnu" };
|
|
27
|
+
|
|
28
|
+
/** Host triple from Node alone (no subprocess), so `--check` stays free of effects. */
|
|
29
|
+
export function nodeHostTriple(platform = process.platform, arch = process.arch) {
|
|
30
|
+
const cpu = NODE_ARCH[arch];
|
|
31
|
+
const system = NODE_OS[platform];
|
|
32
|
+
if (!cpu || !system) throw new Error(`cannot derive a target triple from ${platform}/${arch}; pass --target`);
|
|
33
|
+
return `${cpu}-${system}`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** Human-readable plan lines for `--check`. */
|
|
37
|
+
export function formatSidecarPlan(plan) {
|
|
38
|
+
const lines = [`right-release stage-sidecar --check: target ${plan.target}, mode ${plan.mode}, stageDir ${plan.stageDir}${plan.wipeStageDir ? " (wipeStageDir)" : ""}`];
|
|
39
|
+
for (const entry of plan.entries) {
|
|
40
|
+
if (entry.skipped) lines.push(` [${entry.index}] ${entry.kind}: skipped (platforms ${entry.platforms.join(",")})`);
|
|
41
|
+
else lines.push(` [${entry.index}] ${entry.kind}: ${entry.outputs.join(", ")}${entry.externalBin ? " (externalBin)" : ""}${entry.clean ? " (clean)" : ""}${entry.url ? ` <- ${entry.url}` : ""}`);
|
|
42
|
+
}
|
|
43
|
+
if (plan.nestedBrokerRisk) lines.push(" warning: running inside an outer broker build; staging would fail with STAGE_SIDECAR_NESTED_BROKER (run stage-sidecar in recipe prepare, before the Tauri build)");
|
|
44
|
+
lines.push("right-release stage-sidecar --check: manifest is valid; nothing was staged");
|
|
45
|
+
return lines;
|
|
46
|
+
}
|
|
47
|
+
|
|
23
48
|
async function main() {
|
|
24
49
|
const opts = parseStageSidecarArgs(process.argv.slice(2));
|
|
25
50
|
const configPath = path.resolve(opts.config);
|
|
@@ -27,6 +52,13 @@ async function main() {
|
|
|
27
52
|
const loaded = await import(pathToFileURL(configPath).href);
|
|
28
53
|
const config = loaded.default ?? loaded.config ?? loaded;
|
|
29
54
|
if (config?.sidecars === undefined) throw new Error(`${opts.config} declares no sidecars`);
|
|
55
|
+
if (opts.check) {
|
|
56
|
+
const target = opts.target ?? process.env.TAURI_ENV_TARGET_TRIPLE ?? nodeHostTriple();
|
|
57
|
+
const plan = planSidecarStaging({ manifest: config.sidecars, target });
|
|
58
|
+
if (opts.json) console.log(JSON.stringify(plan, null, 2));
|
|
59
|
+
else for (const line of formatSidecarPlan(plan)) console.log(line);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
30
62
|
const target = resolveTargetTriple({ target: opts.target, cwd: appRoot });
|
|
31
63
|
const result = await stageSidecars({ appRoot, manifest: config.sidecars, target });
|
|
32
64
|
if (opts.json) console.log(JSON.stringify(result, null, 2));
|