@volter/world-runtime 3.0.164 → 3.0.165
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/src/catalog.js +6 -1
- package/dist/src/init.js +1 -1
- package/package.json +1 -1
- package/src/catalog.ts +5 -1
- package/src/init.ts +1 -1
package/dist/src/catalog.js
CHANGED
|
@@ -85,7 +85,10 @@ export function checkoutCatalog(root) {
|
|
|
85
85
|
};
|
|
86
86
|
}
|
|
87
87
|
export function installedCatalog(root, options = {}) {
|
|
88
|
-
|
|
88
|
+
// An explicit empty selection needs no package discovery or publisher choice.
|
|
89
|
+
const twins = options.vendors?.length === 0
|
|
90
|
+
? new Map()
|
|
91
|
+
: new Map([...installedVendorPacks(root, options)].filter(([, dir]) => packCli(dir) !== undefined));
|
|
89
92
|
return {
|
|
90
93
|
kind: 'installed',
|
|
91
94
|
root: resolve(root),
|
|
@@ -152,6 +155,8 @@ export function packFactsFile(dir) {
|
|
|
152
155
|
export function resolveCatalog(root, options = {}) {
|
|
153
156
|
const resolved = resolve(root);
|
|
154
157
|
const installed = installedCatalog(resolved, options);
|
|
158
|
+
if (options.vendors?.length === 0)
|
|
159
|
+
return installed;
|
|
155
160
|
const repo = packRepository(resolved);
|
|
156
161
|
const catalog = repo === undefined ? installed : mergedCatalog([checkoutCatalog(repo), installed]);
|
|
157
162
|
for (const vendor of catalog.vendors()) {
|
package/dist/src/init.js
CHANGED
|
@@ -682,7 +682,7 @@ export function planWorldInit(name, repoPath, options = {}) {
|
|
|
682
682
|
const catalog = new Set(catalogSource.vendors());
|
|
683
683
|
// the catalog index's defaults (the installed `@volter/twin-catalog`), which name the twin to install for a vendor
|
|
684
684
|
// this catalog lacks
|
|
685
|
-
const indexDir = findInstalledPackage(root, CATALOG_INDEX_PACKAGE);
|
|
685
|
+
const indexDir = options.vendors?.length === 0 ? undefined : findInstalledPackage(root, CATALOG_INDEX_PACKAGE);
|
|
686
686
|
// A pack's starters, copied VISIBLY into the world dir: the author's to edit or delete (copy = ownership; never
|
|
687
687
|
// baked into the pack). Its handlers starter is the answering turns its own life scripts (journeys/scenario.json, the
|
|
688
688
|
// World's handler format, its faults left out); its default data is src/semantics/seed.ts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/world-runtime",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.165",
|
|
4
4
|
"description": "World configs for twins: boot named local runtimes, allocate ports, generate world.env/instance.json, and run apps against fake-key twin worlds.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"twin",
|
package/src/catalog.ts
CHANGED
|
@@ -99,7 +99,10 @@ export function checkoutCatalog(root: string): Catalog {
|
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
export function installedCatalog(root: string, options: { sources?: Readonly<Record<string, string>>; vendors?: readonly string[] } = {}): Catalog {
|
|
102
|
-
|
|
102
|
+
// An explicit empty selection needs no package discovery or publisher choice.
|
|
103
|
+
const twins = options.vendors?.length === 0
|
|
104
|
+
? new Map<string, string>()
|
|
105
|
+
: new Map([...installedVendorPacks(root, options)].filter(([, dir]) => packCli(dir) !== undefined));
|
|
103
106
|
return {
|
|
104
107
|
kind: 'installed',
|
|
105
108
|
root: resolve(root),
|
|
@@ -159,6 +162,7 @@ export function packFactsFile(dir: string): string | undefined {
|
|
|
159
162
|
export function resolveCatalog(root: string, options: { sources?: Readonly<Record<string, string>>; vendors?: readonly string[]; mayBeEmpty?: boolean } = {}): Catalog {
|
|
160
163
|
const resolved = resolve(root);
|
|
161
164
|
const installed = installedCatalog(resolved, options);
|
|
165
|
+
if (options.vendors?.length === 0) return installed;
|
|
162
166
|
const repo = packRepository(resolved);
|
|
163
167
|
const catalog = repo === undefined ? installed : mergedCatalog([checkoutCatalog(repo), installed]);
|
|
164
168
|
for (const vendor of catalog.vendors()) {
|
package/src/init.ts
CHANGED
|
@@ -905,7 +905,7 @@ export function planWorldInit(name: string, repoPath: string, options: InitOptio
|
|
|
905
905
|
const catalog = new Set(catalogSource.vendors());
|
|
906
906
|
// the catalog index's defaults (the installed `@volter/twin-catalog`), which name the twin to install for a vendor
|
|
907
907
|
// this catalog lacks
|
|
908
|
-
const indexDir = findInstalledPackage(root, CATALOG_INDEX_PACKAGE);
|
|
908
|
+
const indexDir = options.vendors?.length === 0 ? undefined : findInstalledPackage(root, CATALOG_INDEX_PACKAGE);
|
|
909
909
|
// A pack's starters, copied VISIBLY into the world dir: the author's to edit or delete (copy = ownership; never
|
|
910
910
|
// baked into the pack). Its handlers starter is the answering turns its own life scripts (journeys/scenario.json, the
|
|
911
911
|
// World's handler format, its faults left out); its default data is src/semantics/seed.ts.
|