@mutmutco/installer-launcher 0.1.12 → 0.1.13
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 +52 -0
- package/dist/acquisition-required.mjs +3 -0
- package/dist/launcher.js +523 -215
- package/dist/launcher.sea.cjs +538 -230
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -186,3 +186,55 @@ supported, so there is no `darwin-x64` leg): `npm ci`, install
|
|
|
186
186
|
`--run test/fixtures/run-hello.mjs a b`, write the `.sha256`,
|
|
187
187
|
and upload `launcher-<product>-<platform>-<arch>`. It is callable (`workflow_call`) and dispatchable,
|
|
188
188
|
and it is the only supported path to a real SEA binary — nothing is faked in this lane.
|
|
189
|
+
|
|
190
|
+
## Signed fresh acquisition
|
|
191
|
+
|
|
192
|
+
A signed `payload.json` can declare `acquisition` instead of implementing installation:
|
|
193
|
+
|
|
194
|
+
```json
|
|
195
|
+
{
|
|
196
|
+
"acquisition": {
|
|
197
|
+
"schema": 1,
|
|
198
|
+
"package": "@scope/product",
|
|
199
|
+
"archive": "product-1.2.3.tgz",
|
|
200
|
+
"platforms": ["win32-x64", "win32-arm64", "darwin-arm64"],
|
|
201
|
+
"convergeEntry": "dist/index.js",
|
|
202
|
+
"convergeArgs": ["install", "--from-shared-prefix", "$prefix", "--version", "$version"],
|
|
203
|
+
"rollbackEntry": "dist/index.js",
|
|
204
|
+
"rollbackArgs": ["install", "--rollback-shared-prefix", "$prefix", "--version", "$version"],
|
|
205
|
+
"runEntry": "dist/launcher-entry.js",
|
|
206
|
+
"repairArgs": ["--install-converge"]
|
|
207
|
+
},
|
|
208
|
+
"entry": ["$self", "--run", "acquisition-required.mjs"],
|
|
209
|
+
"verbs": ["start", "doctor"]
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
The archive and metadata must both be covered by the release signature. Entry paths are
|
|
214
|
+
package-relative; placeholders replace entire argv elements only. The launcher owns a pinned,
|
|
215
|
+
checksum-verified user-local Node 24.20.0/npm 12.0.2, local-archive project-prefix installation
|
|
216
|
+
with lifecycle scripts disabled, credential-free public npm resolution, and stable candidate
|
|
217
|
+
paths. Existing system Node/npm installations are unchanged. Updates acquire the selected
|
|
218
|
+
archive even when a previous product root exists. An unchanged update reuses its candidate and
|
|
219
|
+
runs `runEntry` with `repairArgs` for idempotent selected-product convergence; it never repeats
|
|
220
|
+
acquisition activation or reports ready from directory existence alone. Products own validation of their complete
|
|
221
|
+
release and their activation/host convergence through the declared commands.
|
|
222
|
+
|
|
223
|
+
Convergence runs the candidate entry directly with real Node, never SEA re-entry. Forwarding
|
|
224
|
+
also uses real Node so product grandchildren can use `process.execPath`. The consumer rollback
|
|
225
|
+
command must durably record prior/candidate selection before activation, compare-and-restore
|
|
226
|
+
under its own lock, restore absence for a fresh failed install, and succeed harmlessly if no
|
|
227
|
+
activation occurred. It must refuse to overwrite a newer concurrent product selection.
|
|
228
|
+
|
|
229
|
+
A flushed shared pending receipt precedes convergence. The launcher commits its selection
|
|
230
|
+
atomically only after convergence succeeds. On failure or interrupted startup it invokes the
|
|
231
|
+
consumer rollback before allowing another install or forwarding. Failed rollback stays pending.
|
|
232
|
+
A crash after shared commit completes the receipt instead of reverting the committed product.
|
|
233
|
+
Host registration is not atomic: failures can leave host references to retained candidates.
|
|
234
|
+
Candidates are deliberately retained until product-owned reference evidence can permit cleanup.
|
|
235
|
+
An orphan lock-recovery guard fails closed and needs operator diagnosis.
|
|
236
|
+
|
|
237
|
+
For already-shipped old launchers, copy the exact file exported by
|
|
238
|
+
`@mutmutco/installer-launcher/acquisition-required` into the signed payload as
|
|
239
|
+
`acquisition-required.mjs`, and declare the legacy entry above. Old launchers truthfully refuse
|
|
240
|
+
and instruct the user to rerun the public installer. New launchers use acquisition instead.
|