@camstack/system 1.2.246 → 1.2.248
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/dist/index.js +26 -0
- package/dist/index.mjs +26 -0
- package/dist/kernel/addon-installer.d.ts +20 -0
- package/dist/kernel/addon-manifest.d.ts +11 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4499,6 +4499,32 @@ var AddonInstaller = class AddonInstaller {
|
|
|
4499
4499
|
* into `addonsDir/<pkg>/`. The Electron bundled-addons path
|
|
4500
4500
|
* uses this so the runtime owns its on-disk copy.
|
|
4501
4501
|
*/
|
|
4502
|
+
/**
|
|
4503
|
+
* Re-install one addon from the running server closure.
|
|
4504
|
+
*
|
|
4505
|
+
* The closure carries a copy of every addon it declares as a dependency, and
|
|
4506
|
+
* NOTHING loads an addon from there — `AddonLoader` reads the addon root and
|
|
4507
|
+
* only the addon root, on every role. So those copies are transport, and
|
|
4508
|
+
* this is the only thing that moves them into the place that runs code.
|
|
4509
|
+
*
|
|
4510
|
+
* Without it a server update advances the closure and changes nothing: six
|
|
4511
|
+
* addons on the hub were behind by up to nineteen versions on 2026-09-17,
|
|
4512
|
+
* each frozen at whenever somebody last ran `camstack deploy`.
|
|
4513
|
+
*
|
|
4514
|
+
* WHICH addons deserve this is not decided here — see `planAddonRealignment`,
|
|
4515
|
+
* which needs two gates because a version comparison alone would overwrite a
|
|
4516
|
+
* deliberate deploy. This only carries out a decision already made.
|
|
4517
|
+
*/
|
|
4518
|
+
async realignFromClosure(packageName, closureDir) {
|
|
4519
|
+
const targetDir = node_path.join(this.addonsDir, packageName);
|
|
4520
|
+
const result = await this.installLocal(packageName, closureDir);
|
|
4521
|
+
await node_fs.promises.writeFile(node_path.join(targetDir, ".install-source"), "closure");
|
|
4522
|
+
this.manifest.upsert(result.name, {
|
|
4523
|
+
version: result.version,
|
|
4524
|
+
source: "closure"
|
|
4525
|
+
});
|
|
4526
|
+
return result;
|
|
4527
|
+
}
|
|
4502
4528
|
async installLocal(packageName, sourceDir) {
|
|
4503
4529
|
const pkgView = readPackageJson(node_path.join(sourceDir, "package.json"));
|
|
4504
4530
|
if (!pkgView) throw new Error(`Invalid package.json at ${sourceDir}`);
|
package/dist/index.mjs
CHANGED
|
@@ -4492,6 +4492,32 @@ var AddonInstaller = class AddonInstaller {
|
|
|
4492
4492
|
* into `addonsDir/<pkg>/`. The Electron bundled-addons path
|
|
4493
4493
|
* uses this so the runtime owns its on-disk copy.
|
|
4494
4494
|
*/
|
|
4495
|
+
/**
|
|
4496
|
+
* Re-install one addon from the running server closure.
|
|
4497
|
+
*
|
|
4498
|
+
* The closure carries a copy of every addon it declares as a dependency, and
|
|
4499
|
+
* NOTHING loads an addon from there — `AddonLoader` reads the addon root and
|
|
4500
|
+
* only the addon root, on every role. So those copies are transport, and
|
|
4501
|
+
* this is the only thing that moves them into the place that runs code.
|
|
4502
|
+
*
|
|
4503
|
+
* Without it a server update advances the closure and changes nothing: six
|
|
4504
|
+
* addons on the hub were behind by up to nineteen versions on 2026-09-17,
|
|
4505
|
+
* each frozen at whenever somebody last ran `camstack deploy`.
|
|
4506
|
+
*
|
|
4507
|
+
* WHICH addons deserve this is not decided here — see `planAddonRealignment`,
|
|
4508
|
+
* which needs two gates because a version comparison alone would overwrite a
|
|
4509
|
+
* deliberate deploy. This only carries out a decision already made.
|
|
4510
|
+
*/
|
|
4511
|
+
async realignFromClosure(packageName, closureDir) {
|
|
4512
|
+
const targetDir = path$39.join(this.addonsDir, packageName);
|
|
4513
|
+
const result = await this.installLocal(packageName, closureDir);
|
|
4514
|
+
await fs$17.promises.writeFile(path$39.join(targetDir, ".install-source"), "closure");
|
|
4515
|
+
this.manifest.upsert(result.name, {
|
|
4516
|
+
version: result.version,
|
|
4517
|
+
source: "closure"
|
|
4518
|
+
});
|
|
4519
|
+
return result;
|
|
4520
|
+
}
|
|
4495
4521
|
async installLocal(packageName, sourceDir) {
|
|
4496
4522
|
const pkgView = readPackageJson(path$39.join(sourceDir, "package.json"));
|
|
4497
4523
|
if (!pkgView) throw new Error(`Invalid package.json at ${sourceDir}`);
|
|
@@ -290,6 +290,26 @@ export declare class AddonInstaller {
|
|
|
290
290
|
* into `addonsDir/<pkg>/`. The Electron bundled-addons path
|
|
291
291
|
* uses this so the runtime owns its on-disk copy.
|
|
292
292
|
*/
|
|
293
|
+
/**
|
|
294
|
+
* Re-install one addon from the running server closure.
|
|
295
|
+
*
|
|
296
|
+
* The closure carries a copy of every addon it declares as a dependency, and
|
|
297
|
+
* NOTHING loads an addon from there — `AddonLoader` reads the addon root and
|
|
298
|
+
* only the addon root, on every role. So those copies are transport, and
|
|
299
|
+
* this is the only thing that moves them into the place that runs code.
|
|
300
|
+
*
|
|
301
|
+
* Without it a server update advances the closure and changes nothing: six
|
|
302
|
+
* addons on the hub were behind by up to nineteen versions on 2026-09-17,
|
|
303
|
+
* each frozen at whenever somebody last ran `camstack deploy`.
|
|
304
|
+
*
|
|
305
|
+
* WHICH addons deserve this is not decided here — see `planAddonRealignment`,
|
|
306
|
+
* which needs two gates because a version comparison alone would overwrite a
|
|
307
|
+
* deliberate deploy. This only carries out a decision already made.
|
|
308
|
+
*/
|
|
309
|
+
realignFromClosure(packageName: string, closureDir: string): Promise<{
|
|
310
|
+
name: string;
|
|
311
|
+
version: string;
|
|
312
|
+
}>;
|
|
293
313
|
private installLocal;
|
|
294
314
|
/**
|
|
295
315
|
* Symlink `addonsDir/<pkg>` at the workspace source dir. Dev-only.
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* `closure` — re-aligned from the running `@camstack/server` closure at boot.
|
|
3
|
+
*
|
|
4
|
+
* Distinct from `bundled`, which is the copy an Electron app shipped with and
|
|
5
|
+
* seeds ONCE. A `closure` install is a refresh of a copy that was already
|
|
6
|
+
* there, and naming it separately is what lets an operator tell "I deployed
|
|
7
|
+
* this" from "the server update brought it" — the distinction the six stale
|
|
8
|
+
* copies of 2026-09-17 had no way to express, all of them reading `upload`
|
|
9
|
+
* because each HAD been a deliberate deploy, once. See D518.
|
|
10
|
+
*/
|
|
11
|
+
export type AddonInstallSource = 'npm' | 'local' | 'upload' | 'bundled' | 'seed' | 'closure';
|
|
2
12
|
export interface AddonManifestEntry {
|
|
3
13
|
/** Full pkg name, e.g. `@camstack/addon-pipeline`. */
|
|
4
14
|
name: string;
|