@camstack/system 1.1.56 → 1.1.57
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 +10 -2
- package/dist/index.mjs +10 -2
- package/dist/kernel/addon-loader.d.ts +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2308,9 +2308,15 @@ var AddonLoader = class {
|
|
|
2308
2308
|
else i++;
|
|
2309
2309
|
}
|
|
2310
2310
|
/** Scan addons directory and load all addon packages.
|
|
2311
|
-
* Supports scoped layout: addons/@scope/package-name/
|
|
2312
|
-
|
|
2311
|
+
* Supports scoped layout: addons/@scope/package-name/
|
|
2312
|
+
*
|
|
2313
|
+
* `skipPackages` names scoped packages (e.g. `@camstack/system`) that the
|
|
2314
|
+
* caller loads from elsewhere — the single-copy model loads the framework
|
|
2315
|
+
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
2316
|
+
* the addons-dir `@camstack/system` must NOT be double-loaded here. */
|
|
2317
|
+
async loadFromDirectory(addonsDir, skipPackages = []) {
|
|
2313
2318
|
if (!node_fs.existsSync(addonsDir)) return;
|
|
2319
|
+
const skip = new Set(skipPackages);
|
|
2314
2320
|
const entries = node_fs.readdirSync(addonsDir, { withFileTypes: true });
|
|
2315
2321
|
for (const entry of entries) {
|
|
2316
2322
|
if (!isDirectoryEntry(entry, addonsDir)) continue;
|
|
@@ -2319,10 +2325,12 @@ var AddonLoader = class {
|
|
|
2319
2325
|
const scopeEntries = node_fs.readdirSync(scopeDir, { withFileTypes: true });
|
|
2320
2326
|
for (const scopeEntry of scopeEntries) {
|
|
2321
2327
|
if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
|
|
2328
|
+
if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
|
|
2322
2329
|
await this.tryLoadAddon(node_path.join(scopeDir, scopeEntry.name));
|
|
2323
2330
|
}
|
|
2324
2331
|
continue;
|
|
2325
2332
|
}
|
|
2333
|
+
if (skip.has(entry.name)) continue;
|
|
2326
2334
|
await this.tryLoadAddon(node_path.join(addonsDir, entry.name));
|
|
2327
2335
|
}
|
|
2328
2336
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -2300,9 +2300,15 @@ var AddonLoader = class {
|
|
|
2300
2300
|
else i++;
|
|
2301
2301
|
}
|
|
2302
2302
|
/** Scan addons directory and load all addon packages.
|
|
2303
|
-
* Supports scoped layout: addons/@scope/package-name/
|
|
2304
|
-
|
|
2303
|
+
* Supports scoped layout: addons/@scope/package-name/
|
|
2304
|
+
*
|
|
2305
|
+
* `skipPackages` names scoped packages (e.g. `@camstack/system`) that the
|
|
2306
|
+
* caller loads from elsewhere — the single-copy model loads the framework
|
|
2307
|
+
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
2308
|
+
* the addons-dir `@camstack/system` must NOT be double-loaded here. */
|
|
2309
|
+
async loadFromDirectory(addonsDir, skipPackages = []) {
|
|
2305
2310
|
if (!fs$17.existsSync(addonsDir)) return;
|
|
2311
|
+
const skip = new Set(skipPackages);
|
|
2306
2312
|
const entries = fs$17.readdirSync(addonsDir, { withFileTypes: true });
|
|
2307
2313
|
for (const entry of entries) {
|
|
2308
2314
|
if (!isDirectoryEntry(entry, addonsDir)) continue;
|
|
@@ -2311,10 +2317,12 @@ var AddonLoader = class {
|
|
|
2311
2317
|
const scopeEntries = fs$17.readdirSync(scopeDir, { withFileTypes: true });
|
|
2312
2318
|
for (const scopeEntry of scopeEntries) {
|
|
2313
2319
|
if (!isDirectoryEntry(scopeEntry, scopeDir)) continue;
|
|
2320
|
+
if (skip.has(`${entry.name}/${scopeEntry.name}`)) continue;
|
|
2314
2321
|
await this.tryLoadAddon(path$39.join(scopeDir, scopeEntry.name));
|
|
2315
2322
|
}
|
|
2316
2323
|
continue;
|
|
2317
2324
|
}
|
|
2325
|
+
if (skip.has(entry.name)) continue;
|
|
2318
2326
|
await this.tryLoadAddon(path$39.join(addonsDir, entry.name));
|
|
2319
2327
|
}
|
|
2320
2328
|
}
|
|
@@ -72,8 +72,13 @@ export declare class AddonLoader {
|
|
|
72
72
|
/** Forget any tracked failures for a given package — uninstall path. */
|
|
73
73
|
clearLoadFailures(packageName: string): void;
|
|
74
74
|
/** Scan addons directory and load all addon packages.
|
|
75
|
-
* Supports scoped layout: addons/@scope/package-name/
|
|
76
|
-
|
|
75
|
+
* Supports scoped layout: addons/@scope/package-name/
|
|
76
|
+
*
|
|
77
|
+
* `skipPackages` names scoped packages (e.g. `@camstack/system`) that the
|
|
78
|
+
* caller loads from elsewhere — the single-copy model loads the framework
|
|
79
|
+
* BUILTINS from the active closure, not the (now-inert) addons-dir copy, so
|
|
80
|
+
* the addons-dir `@camstack/system` must NOT be double-loaded here. */
|
|
81
|
+
loadFromDirectory(addonsDir: string, skipPackages?: readonly string[]): Promise<void>;
|
|
77
82
|
private tryLoadAddon;
|
|
78
83
|
/** Load addon from a specific directory (package.json + dist/) */
|
|
79
84
|
loadFromAddonDir(addonDir: string): Promise<void>;
|