@rightkit/release 0.2.159 → 0.2.161
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/cargo-contract.mjs +10 -2
- package/disk-command.mjs +53 -8
- package/local-publish.mjs +12 -0
- package/ownership-mandatory-set.json +3 -3
- package/package.json +1 -1
- package/rightkit-ownership.json +1 -1
- package/rightkit-versions.json +21 -15
package/cargo-contract.mjs
CHANGED
|
@@ -181,11 +181,19 @@ function readToml(file, label) {
|
|
|
181
181
|
return JSON.parse(result.stdout);
|
|
182
182
|
}
|
|
183
183
|
|
|
184
|
-
|
|
184
|
+
// Not product code: SwiftPM `.build` (dependency checkouts and build products), throwaway probe dirs (`*-probe`, `pdfprobe2`), `tmp`, and
|
|
185
|
+
// `tasks/handoffs` (handoff probes and their manifests). They are never built by the product, so they are not gated.
|
|
186
|
+
export function isExcludedScanDirectory(name, parentName = "") {
|
|
187
|
+
if (SKIP_DIRECTORIES.has(name) || name === ".build") return true;
|
|
188
|
+
if (/probe\d*$/i.test(name) || name === "tmp") return true;
|
|
189
|
+
return name === "handoffs" && parentName === "tasks";
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function findCargoManifests(root) {
|
|
185
193
|
const found = [];
|
|
186
194
|
const visit = (dir) => {
|
|
187
195
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
188
|
-
if (entry.isDirectory() &&
|
|
196
|
+
if (entry.isDirectory() && isExcludedScanDirectory(entry.name, path.basename(dir))) continue;
|
|
189
197
|
const full = path.join(dir, entry.name);
|
|
190
198
|
if (entry.isDirectory()) visit(full);
|
|
191
199
|
else if (entry.isFile() && entry.name === "Cargo.toml") found.push(full);
|
package/disk-command.mjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { existsSync, mkdirSync, realpathSync, unlinkSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, realpathSync, unlinkSync, writeFileSync } from "node:fs";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
6
6
|
import { spawnSync } from "./background-process.mjs";
|
|
7
|
+
import { compareVersions } from "./rightkit-sync.mjs";
|
|
7
8
|
import {
|
|
8
9
|
DISK_EXIT_WARNING, applySweep, checkDisk, formatBytes, listOpenPaths, logEvent, planSweep, platformKey, purgeHoldings, readDiskPolicy,
|
|
9
10
|
} from "./disk-policy.mjs";
|
|
@@ -65,13 +66,57 @@ export function insideGitCheckout(file, exists = existsSync) {
|
|
|
65
66
|
}
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
const CLI_TAIL = path.join("@rightkit", "release", "cli", "right-release.mjs");
|
|
70
|
+
const SHIM_TARGET = /(%~dp0|%dp0%|\$basedir|\$PSScriptRoot)?([^\s"'%$=;~]*node_modules[\\/]@rightkit[\\/]release[\\/]cli[\\/]right-release\.mjs)/;
|
|
71
|
+
|
|
72
|
+
/** Target `cli/right-release.mjs` behind the `right-release` bin on PATH: the realpath of the bin when it is the script
|
|
73
|
+
* itself, otherwise the path a pnpm/npm shim (.cmd, .ps1 or sh script) names, resolved against the shim's directory. */
|
|
74
|
+
export function cliFromPathBin({ env = process.env, exists = existsSync, readFile = (f) => readFileSync(f, "utf8") } = {}) {
|
|
75
|
+
const found = [];
|
|
76
|
+
for (const dir of String(env.PATH ?? env.Path ?? "").split(path.delimiter).filter(Boolean)) {
|
|
77
|
+
for (const name of ["right-release", "right-release.cmd", "right-release.ps1", "right-release.mjs"]) {
|
|
78
|
+
const bin = path.join(dir, name);
|
|
79
|
+
if (!exists(bin)) continue;
|
|
80
|
+
let real = bin;
|
|
81
|
+
try { real = realpathSync(bin); } catch { /* keep lexical */ }
|
|
82
|
+
if (real.endsWith(path.join("cli", "right-release.mjs"))) { found.push(real); continue; }
|
|
83
|
+
try {
|
|
84
|
+
const m = SHIM_TARGET.exec(readFile(real));
|
|
85
|
+
if (m) found.push(path.resolve(dir, (m[1] ? m[2].replace(/^[\\/]+/, "") : m[2]).split(/[\\/]/).join(path.sep)));
|
|
86
|
+
} catch { /* unreadable shim */ }
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return found;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const versionOf = (cli, readFile) => {
|
|
93
|
+
try { return JSON.parse(readFile(path.join(path.dirname(cli), "..", "package.json"))).version; } catch { return "0.0.0"; }
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/** Global-root candidates: `<root>/@rightkit/release/...` (npm, pnpm <= 10) and `<root>/<hash>/node_modules/@rightkit/release/...`
|
|
97
|
+
* (pnpm 11 global layout), highest installed version first. */
|
|
98
|
+
export function cliFromGlobalRoots(roots, { exists = existsSync, readdir = (d) => readdirSync(d), readFile = (f) => readFileSync(f, "utf8") } = {}) {
|
|
99
|
+
const found = [];
|
|
100
|
+
for (const root of roots) {
|
|
101
|
+
found.push(path.join(root, CLI_TAIL));
|
|
102
|
+
let names = [];
|
|
103
|
+
try { names = readdir(root); } catch { /* root absent */ }
|
|
104
|
+
for (const name of names) found.push(path.join(root, name, "node_modules", CLI_TAIL));
|
|
105
|
+
}
|
|
106
|
+
return found.filter((f) => exists(f))
|
|
107
|
+
.map((f) => ({ f, v: versionOf(f, readFile) }))
|
|
108
|
+
.sort((x, y) => { try { return compareVersions(y.v, x.v); } catch { return 0; } })
|
|
109
|
+
.map((x) => x.f);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Installed @rightkit/release CLI for the Windows task: explicit --cli / RIGHT_RELEASE_INSTALLED_CLI, else the target of the
|
|
113
|
+
* `right-release` bin on PATH, else the global package roots (`npm root -g`, `pnpm root -g`, hashed pnpm 11 layout included).
|
|
114
|
+
* Only a candidate inside a git checkout is refused; the installed package may itself run install. */
|
|
115
|
+
export function resolveInstalledCli({ explicit, env = process.env, globalRoots = defaultGlobalRoots, exists = existsSync, readFile, readdir, pathBin = cliFromPathBin } = {}) {
|
|
116
|
+
const fixed = explicit || env.RIGHT_RELEASE_INSTALLED_CLI;
|
|
117
|
+
const candidates = fixed
|
|
118
|
+
? [fixed]
|
|
119
|
+
: [...pathBin({ env, exists, ...(readFile ? { readFile } : {}) }), ...cliFromGlobalRoots(globalRoots({ env }), { exists, ...(readFile ? { readFile } : {}), ...(readdir ? { readdir } : {}) })];
|
|
75
120
|
for (const candidate of candidates) {
|
|
76
121
|
if (!exists(candidate)) continue;
|
|
77
122
|
let real = candidate;
|
package/local-publish.mjs
CHANGED
|
@@ -79,6 +79,17 @@ async function defaultLoadWorkspaceModules(workspaceRoot) {
|
|
|
79
79
|
return { results, checkNpmTarball: upload.checkNpmTarball };
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
+
/**
|
|
83
|
+
* Feature sets that must at least compile, beyond the tested ones. A crate whose tested sets already
|
|
84
|
+
* include `--all-features` needs none. `checkFeatureSets` (ci/gate.config.json) lists them explicitly for
|
|
85
|
+
* crates with mutually exclusive features; otherwise one `--all-features` check runs. Mirrored in scripts/ci/gate.mjs.
|
|
86
|
+
*/
|
|
87
|
+
export function allFeatureCheckSets(entry = {}) {
|
|
88
|
+
const tested = entry.featureSets ?? [[]];
|
|
89
|
+
if (tested.some((features) => features.includes("--all-features"))) return [];
|
|
90
|
+
return entry.checkFeatureSets ?? [["--all-features"]];
|
|
91
|
+
}
|
|
92
|
+
|
|
82
93
|
/** The CI gate's commands for one unit (scripts/ci/gate.mjs npmGate/rustGate), mirrored exactly. */
|
|
83
94
|
export function localTestPlan({ kind, unit, dir, config, manifest }) {
|
|
84
95
|
if (kind === "npm") {
|
|
@@ -100,6 +111,7 @@ export function localTestPlan({ kind, unit, dir, config, manifest }) {
|
|
|
100
111
|
if (entry.alsoSerial) steps.push({ command: "cargo", args: ["test", "-p", unit, ...features, "--no-fail-fast", "--", "--test-threads=1", "--show-output"], test: true });
|
|
101
112
|
}
|
|
102
113
|
steps.push({ command: "cargo", args: ["clippy", "-p", unit, "--no-deps", "--all-targets", ...featureSets[0], "--", "-D", "warnings"], test: false });
|
|
114
|
+
for (const features of allFeatureCheckSets(entry)) steps.push({ command: "cargo", args: ["check", "-p", unit, "--all-targets", ...features], test: false });
|
|
103
115
|
return { id: `rust:${unit}`, featureLabels: featureSets.map((features) => features.join(" ") || "default"), steps };
|
|
104
116
|
}
|
|
105
117
|
|
|
@@ -375,10 +375,10 @@
|
|
|
375
375
|
"profile": "desktop",
|
|
376
376
|
"owners": [
|
|
377
377
|
{
|
|
378
|
-
"name": "rightkit-
|
|
378
|
+
"name": "rightkit-agent-tools",
|
|
379
379
|
"ecosystem": "cargo",
|
|
380
|
-
"min": "0.
|
|
381
|
-
"registryMax": "0.
|
|
380
|
+
"min": "0.1.2",
|
|
381
|
+
"registryMax": "0.1.2"
|
|
382
382
|
}
|
|
383
383
|
]
|
|
384
384
|
}
|
package/package.json
CHANGED
package/rightkit-ownership.json
CHANGED
|
@@ -2193,7 +2193,7 @@
|
|
|
2193
2193
|
"Declaration-only: the lifecycle, bundle writer, redaction, protocol and reader are not an ownership fingerprint.",
|
|
2194
2194
|
"Windows capture lives in this crate (src/windows, cfg(windows)) and is served out of process by rightkit-record-helper in serve mode.",
|
|
2195
2195
|
"rightkit-child-process owns helper spawning, supervision and restart; this crate only speaks the protocol over the streams it is given.",
|
|
2196
|
-
"The macOS helper
|
|
2196
|
+
"The macOS ScreenCaptureKit helper (helpers/macos, Swift) ships with this crate sources and implements the same protocol; the crate never sends input. Capturing needs the OS Screen Recording permission on macOS."
|
|
2197
2197
|
]
|
|
2198
2198
|
},
|
|
2199
2199
|
{
|
package/rightkit-versions.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"stagedNpm": {
|
|
16
16
|
"@rightkit/app-update": "0.2.5",
|
|
17
17
|
"@rightkit/ax": "0.3.2",
|
|
18
|
-
"@rightkit/ci": "0.2.
|
|
18
|
+
"@rightkit/ci": "0.2.45",
|
|
19
19
|
"@rightkit/doc-render": "0.1.6",
|
|
20
20
|
"@rightkit/hooks": "0.1.2",
|
|
21
21
|
"@rightkit/i18n": "0.1.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@rightkit/qa": "0.4.8",
|
|
32
32
|
"@rightkit/qa-chrome": "0.1.6",
|
|
33
33
|
"@rightkit/react-shell": "0.6.4",
|
|
34
|
-
"@rightkit/release": "0.2.
|
|
34
|
+
"@rightkit/release": "0.2.161",
|
|
35
35
|
"@rightkit/settings-ui": "0.4.4",
|
|
36
36
|
"@rightkit/tauri": "0.2.1",
|
|
37
37
|
"@rightkit/tauri-shell": "0.1.1",
|
|
@@ -200,7 +200,9 @@
|
|
|
200
200
|
"0.2.151",
|
|
201
201
|
"0.2.155",
|
|
202
202
|
"0.2.156",
|
|
203
|
-
"0.2.158"
|
|
203
|
+
"0.2.158",
|
|
204
|
+
"0.2.159",
|
|
205
|
+
"0.2.160"
|
|
204
206
|
],
|
|
205
207
|
"@rightkit/qa": [
|
|
206
208
|
"0.1.0",
|
|
@@ -329,7 +331,8 @@
|
|
|
329
331
|
"0.1.0"
|
|
330
332
|
],
|
|
331
333
|
"@rightkit/ci": [
|
|
332
|
-
"0.2.43"
|
|
334
|
+
"0.2.43",
|
|
335
|
+
"0.2.44"
|
|
333
336
|
]
|
|
334
337
|
},
|
|
335
338
|
"cargo": {
|
|
@@ -364,7 +367,7 @@
|
|
|
364
367
|
"rightkit-contracts": "0.1.5",
|
|
365
368
|
"rightkit-crash": "0.3.0",
|
|
366
369
|
"rightkit-credentials": "0.2.0",
|
|
367
|
-
"rightkit-daemon": "0.2.
|
|
370
|
+
"rightkit-daemon": "0.2.3",
|
|
368
371
|
"rightkit-db": "0.4.0",
|
|
369
372
|
"rightkit-device": "0.1.3",
|
|
370
373
|
"rightkit-embed": "0.4.0",
|
|
@@ -387,8 +390,8 @@
|
|
|
387
390
|
"rightkit-ownership": "0.2.1",
|
|
388
391
|
"rightkit-pdf": "0.3.0",
|
|
389
392
|
"rightkit-playback": "0.2.1",
|
|
390
|
-
"rightkit-qa": "0.
|
|
391
|
-
"rightkit-qa-driver": "0.
|
|
393
|
+
"rightkit-qa": "0.4.0",
|
|
394
|
+
"rightkit-qa-driver": "0.4.0",
|
|
392
395
|
"rightkit-review": "0.2.0",
|
|
393
396
|
"rightkit-sandbox": "0.4.0",
|
|
394
397
|
"rightkit-search": "0.2.1",
|
|
@@ -434,7 +437,7 @@
|
|
|
434
437
|
"rightkit-control": "0.3.0",
|
|
435
438
|
"rightkit-crash": "0.3.0",
|
|
436
439
|
"rightkit-credentials": "0.2.0",
|
|
437
|
-
"rightkit-daemon": "0.2.
|
|
440
|
+
"rightkit-daemon": "0.2.3",
|
|
438
441
|
"rightkit-db": "0.4.0",
|
|
439
442
|
"rightkit-device": "0.1.3",
|
|
440
443
|
"rightkit-embed": "0.4.0",
|
|
@@ -462,8 +465,8 @@
|
|
|
462
465
|
"rightkit-pdf": "0.3.0",
|
|
463
466
|
"rightkit-playback": "0.2.1",
|
|
464
467
|
"rightkit-process": "0.4.0",
|
|
465
|
-
"rightkit-qa": "0.
|
|
466
|
-
"rightkit-qa-driver": "0.
|
|
468
|
+
"rightkit-qa": "0.4.0",
|
|
469
|
+
"rightkit-qa-driver": "0.4.0",
|
|
467
470
|
"rightkit-qts": "0.2.6",
|
|
468
471
|
"rightkit-qts-ggml": "0.1.2",
|
|
469
472
|
"rightkit-qts-ggml-sys": "0.1.2",
|
|
@@ -492,7 +495,7 @@
|
|
|
492
495
|
"@rightkit/app-shell": "0.6.2",
|
|
493
496
|
"@rightkit/app-update": "0.2.5",
|
|
494
497
|
"@rightkit/ax": "0.3.2",
|
|
495
|
-
"@rightkit/ci": "0.2.
|
|
498
|
+
"@rightkit/ci": "0.2.45",
|
|
496
499
|
"@rightkit/doc-render": "0.1.6",
|
|
497
500
|
"@rightkit/git": "0.2.42",
|
|
498
501
|
"@rightkit/hooks": "0.1.2",
|
|
@@ -509,7 +512,7 @@
|
|
|
509
512
|
"@rightkit/qa": "0.4.8",
|
|
510
513
|
"@rightkit/qa-chrome": "0.1.6",
|
|
511
514
|
"@rightkit/react-shell": "0.6.4",
|
|
512
|
-
"@rightkit/release": "0.2.
|
|
515
|
+
"@rightkit/release": "0.2.160",
|
|
513
516
|
"@rightkit/settings-ui": "0.4.4",
|
|
514
517
|
"@rightkit/shell": "0.1.1",
|
|
515
518
|
"@rightkit/tauri": "0.2.1",
|
|
@@ -609,7 +612,8 @@
|
|
|
609
612
|
"0.2.11",
|
|
610
613
|
"0.2.12",
|
|
611
614
|
"0.2.14",
|
|
612
|
-
"0.2.16"
|
|
615
|
+
"0.2.16",
|
|
616
|
+
"0.3.0"
|
|
613
617
|
],
|
|
614
618
|
"rightkit-sandbox": [
|
|
615
619
|
"0.1.0",
|
|
@@ -742,13 +746,15 @@
|
|
|
742
746
|
],
|
|
743
747
|
"rightkit-daemon": [
|
|
744
748
|
"0.2.0",
|
|
745
|
-
"0.2.1"
|
|
749
|
+
"0.2.1",
|
|
750
|
+
"0.2.2"
|
|
746
751
|
],
|
|
747
752
|
"rightkit-job-queue": [
|
|
748
753
|
"0.3.0"
|
|
749
754
|
],
|
|
750
755
|
"rightkit-qa-driver": [
|
|
751
|
-
"0.3.0"
|
|
756
|
+
"0.3.0",
|
|
757
|
+
"0.3.1"
|
|
752
758
|
]
|
|
753
759
|
}
|
|
754
760
|
}
|