@rightkit/release 0.2.102 → 0.2.104
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/direct-bootstrap.mjs +17 -0
- package/nsis-upgrade-contract.mjs +12 -6
- package/package.json +1 -1
- package/release.mjs +4 -1
- package/rightkit-versions.json +1 -1
package/direct-bootstrap.mjs
CHANGED
|
@@ -22,6 +22,23 @@ export function sha256File(path) {
|
|
|
22
22
|
return createHash("sha256").update(readFileSync(path)).digest("hex");
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// The RightRelease PowerShell bootstrap is still generated and published to R2
|
|
26
|
+
// as the branded installer's outer verifier. It must not be embedded into the
|
|
27
|
+
// Membrane Tauri NSIS installer resource set: Section Install now lays the
|
|
28
|
+
// versioned payload down and runs `membrane activate` directly (see
|
|
29
|
+
// docs/MEMBRANE-INSTALLER-SIMPLIFICATION-CONTRACT-2026-09-02.md). This guard
|
|
30
|
+
// throws loudly if anyone re-wires the payload into that resource set.
|
|
31
|
+
export function assertBootstrapNotEmbeddedInNsis(product, resourceNames) {
|
|
32
|
+
if (product !== "membrane") return;
|
|
33
|
+
const embedded = [...(resourceNames ?? [])].filter((name) => /(^|[\\/])install\.ps1$/i.test(String(name)));
|
|
34
|
+
if (embedded.length) {
|
|
35
|
+
throw new Error(
|
|
36
|
+
`RightRelease bootstrap install.ps1 must not be embedded into the Membrane NSIS installer (${embedded.join(", ")}); ` +
|
|
37
|
+
"Section Install activates the release directly. See MEMBRANE-INSTALLER-SIMPLIFICATION-CONTRACT-2026-09-02.",
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
25
42
|
export function collectReleaseAsset({
|
|
26
43
|
target,
|
|
27
44
|
name,
|
|
@@ -33,16 +33,22 @@ export function assertNsisInPlaceUpgradeContract(appRoot, options = {}) {
|
|
|
33
33
|
"Windows NSIS template must declare the RightKit automatic in-place upgrade policy; uninstall/reinstall maintenance choices add unnecessary friction",
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
// Two acceptable shapes:
|
|
37
|
+
// - legacy: Tauri's reinstall page is present but skipped for same-version
|
|
38
|
+
// repair and in-place upgrades (the $WixMode / $R0 skip logic);
|
|
39
|
+
// - no maintenance surface at all: the template declares no reinstall page,
|
|
40
|
+
// no components page and no custom page, so there is nothing to skip.
|
|
41
|
+
const legacySkipLogic =
|
|
42
|
+
/\$\{If\}\s+\$WixMode\s*=\s*0[\s\S]{0,160}\$\{AndIf\}\s+\$R0\s*>=\s*0[\s\S]{0,80}\bAbort\b/.test(
|
|
38
43
|
source,
|
|
39
|
-
)
|
|
40
|
-
)
|
|
44
|
+
);
|
|
45
|
+
const maintenanceSurface = /\bPageReinstall\b|MUI_PAGE_COMPONENTS|^\s*Page\s+custom\b/m.test(source);
|
|
46
|
+
if (!legacySkipLogic && maintenanceSurface) {
|
|
41
47
|
throw new Error(
|
|
42
|
-
"Windows NSIS template
|
|
48
|
+
"Windows NSIS template has a reinstall or maintenance page without skip-page logic for same-version repair and in-place upgrades",
|
|
43
49
|
);
|
|
44
50
|
}
|
|
45
|
-
return { templatePath };
|
|
51
|
+
return { templatePath, shape: legacySkipLogic ? "legacy-skip-page" : "no-maintenance-page" };
|
|
46
52
|
}
|
|
47
53
|
|
|
48
54
|
function readJson(file, label) {
|
package/package.json
CHANGED
package/release.mjs
CHANGED
|
@@ -726,7 +726,10 @@ async function validateHostedWorkflows(root, appName, workflows, policy) {
|
|
|
726
726
|
// (Windows) and macos-sign (macOS), so publish is unreachable unless every
|
|
727
727
|
// signing/qualification stage actually verified in this exact run.
|
|
728
728
|
const legacyReleasePublishGate = /publish:\n needs: \[[^\n]*installed-qualification[^\n]*\]\n if: \$\{\{ startsWith\(github\.ref, 'refs\/tags\/v'\) && needs\.installed-qualification\.result == 'success'/.test(publishSource);
|
|
729
|
-
|
|
729
|
+
// Template 1.9.0 adds a dry-run rehearsal: publish is additionally unreachable
|
|
730
|
+
// when admission recorded `dry_run`. The clause only narrows the gate, so it
|
|
731
|
+
// is accepted as an optional trailing conjunct.
|
|
732
|
+
const admittedReleasePublishGate = /publish:\n needs: \[(?=[^\n]*\badmission\b)(?=[^\n]*\binstalled-qualification\b)(?=[^\n]*\bmacos-sign\b)[^\n]*\]\n if: \$\{\{ needs\.admission\.outputs\.publish == 'true' && needs\.installed-qualification\.result == 'success' && needs\.macos-sign\.result == 'success'(?: && needs\.admission\.outputs\.dry_run != 'true')? \}\}/.test(publishSource);
|
|
730
733
|
const protectedReleasePublish = releaseChain
|
|
731
734
|
&& (legacyReleasePublishGate || admittedReleasePublishGate)
|
|
732
735
|
&& /\n permissions:\n contents: write\n/.test(publishSource);
|
package/rightkit-versions.json
CHANGED