@rightkit/release 0.2.98 → 0.2.99

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/nsis-payload.mjs CHANGED
@@ -94,10 +94,23 @@ export function extractNsisEntry(installer, entryName, { sevenZip = resolveSeven
94
94
  const destination = path.join(tempRoot, `right-nsis-${process.pid}-${Math.random().toString(16).slice(2)}`);
95
95
  mkdirSync(destination, { recursive: true });
96
96
  try {
97
- // `e` flattens the entry to the destination root, so the extracted path is
98
- // known regardless of how deep the entry sits inside the payload.
99
- const result = run(sevenZip, ["e", "-tnsis", "-y", `-o${destination}`, "--", resolvedInstaller, base]);
100
- const extracted = path.join(destination, base);
97
+ // NSIS entries may live below `$PLUGINSDIR/release`. A basename-only 7-Zip
98
+ // filter then reports `No files to process`, so resolve the actual archive
99
+ // member first & extract that exact path.
100
+ const requested = String(entryName).replace(/\\/g, "/");
101
+ const members = listNsisPayload(resolvedInstaller, { sevenZip, run });
102
+ const exact = members.filter((member) => member.name.toLowerCase() === requested.toLowerCase());
103
+ const matches = exact.length > 0
104
+ ? exact
105
+ : members.filter((member) => path.posix.basename(member.name).toLowerCase() === base.toLowerCase());
106
+ if (matches.length === 0) {
107
+ throw new Error(`could not extract ${base} from ${resolvedInstaller}: no such payload entry`);
108
+ }
109
+ if (matches.length !== 1) {
110
+ throw new Error(`could not uniquely identify ${base} in ${resolvedInstaller}: found ${matches.length} payload entries`);
111
+ }
112
+ const result = run(sevenZip, ["e", "-tnsis", "-y", `-o${destination}`, "--", resolvedInstaller, matches[0].name]);
113
+ const extracted = path.join(destination, path.posix.basename(matches[0].name));
101
114
  if (result.status !== 0 || !existsSync(extracted)) {
102
115
  throw new Error(
103
116
  `could not extract ${base} from ${resolvedInstaller}: ${(result.stderr || result.stdout || "no such entry").trim()}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rightkit/release",
3
- "version": "0.2.98",
3
+ "version": "0.2.99",
4
4
  "description": "Portable release CLI/SDK with fail-closed public GitHub Releases and private R2 + RightApps distribution.",
5
5
  "license": "MIT OR Apache-2.0",
6
6
  "type": "module",
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "stagedNpm": {
16
16
  "@rightkit/ax": "0.2.1",
17
- "@rightkit/git": "0.2.22",
17
+ "@rightkit/git": "0.2.23",
18
18
  "@rightkit/hooks": "0.1.1",
19
19
  "@rightkit/legal": "0.3.1",
20
20
  "@rightkit/legal-ui": "0.1.1",
@@ -22,7 +22,7 @@
22
22
  "@rightkit/logs": "0.1.4",
23
23
  "@rightkit/platform-ui": "0.1.1",
24
24
  "@rightkit/qa": "0.2.1",
25
- "@rightkit/release": "0.2.98",
25
+ "@rightkit/release": "0.2.99",
26
26
  "@rightkit/tauri": "0.1.1",
27
27
  "@rightkit/updates": "0.2.4"
28
28
  },
@@ -50,7 +50,8 @@
50
50
  "0.2.18",
51
51
  "0.2.19",
52
52
  "0.2.20",
53
- "0.2.21"
53
+ "0.2.21",
54
+ "0.2.22"
54
55
  ],
55
56
  "@rightkit/legal-ui": [
56
57
  "0.1.0"
@@ -105,7 +106,8 @@
105
106
  "0.2.94",
106
107
  "0.2.95",
107
108
  "0.2.96",
108
- "0.2.97"
109
+ "0.2.97",
110
+ "0.2.98"
109
111
  ],
110
112
  "@rightkit/qa": [
111
113
  "0.1.0",