@jskit-ai/jskit-cli 0.2.130 → 0.2.132
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/jskit-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.132",
|
|
4
4
|
"description": "Bundle and package orchestration CLI for JSKIT apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"test": "node --test"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@jskit-ai/jskit-catalog": "0.1.
|
|
24
|
-
"@jskit-ai/kernel": "0.1.
|
|
25
|
-
"@jskit-ai/shell-web": "0.1.
|
|
23
|
+
"@jskit-ai/jskit-catalog": "0.1.127",
|
|
24
|
+
"@jskit-ai/kernel": "0.1.119",
|
|
25
|
+
"@jskit-ai/shell-web": "0.1.118",
|
|
26
26
|
"@vue/compiler-sfc": "^3.5.29",
|
|
27
27
|
"ts-morph": "^28.0.0",
|
|
28
28
|
"yaml": "^2.8.3"
|
|
@@ -483,7 +483,8 @@ async function loadAppCiContext(appRoot) {
|
|
|
483
483
|
await hydratePackageRegistryFromInstalledNodeModules({
|
|
484
484
|
appRoot,
|
|
485
485
|
packageRegistry,
|
|
486
|
-
seedPackageIds: Object.keys(ensureObject(lock.installedPackages))
|
|
486
|
+
seedPackageIds: Object.keys(ensureObject(lock.installedPackages)),
|
|
487
|
+
preferInstalledDescriptors: true
|
|
487
488
|
});
|
|
488
489
|
return {
|
|
489
490
|
lockPath,
|
|
@@ -268,7 +268,8 @@ async function resolveInstalledNodeModulePackageEntry({ appRoot, packageId }) {
|
|
|
268
268
|
async function hydratePackageRegistryFromInstalledNodeModules({
|
|
269
269
|
appRoot,
|
|
270
270
|
packageRegistry,
|
|
271
|
-
seedPackageIds = []
|
|
271
|
+
seedPackageIds = [],
|
|
272
|
+
preferInstalledDescriptors = false
|
|
272
273
|
}) {
|
|
273
274
|
const queue = ensureArray(seedPackageIds)
|
|
274
275
|
.map((value) => String(value || "").trim())
|
|
@@ -283,19 +284,23 @@ async function hydratePackageRegistryFromInstalledNodeModules({
|
|
|
283
284
|
visited.add(packageId);
|
|
284
285
|
|
|
285
286
|
let packageEntry = packageRegistry.get(packageId);
|
|
286
|
-
|
|
287
|
+
const shouldResolveInstalledDescriptor =
|
|
288
|
+
!packageEntry ||
|
|
289
|
+
(preferInstalledDescriptors && packageEntry.sourceType !== "app-local-package");
|
|
290
|
+
if (shouldResolveInstalledDescriptor) {
|
|
287
291
|
const resolvedEntry = await resolveInstalledNodeModulePackageEntry({
|
|
288
292
|
appRoot,
|
|
289
293
|
packageId
|
|
290
294
|
});
|
|
291
|
-
if (!resolvedEntry) {
|
|
295
|
+
if (!resolvedEntry && !packageEntry) {
|
|
292
296
|
continue;
|
|
293
297
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
298
|
+
if (resolvedEntry) {
|
|
299
|
+
packageRegistry.set(resolvedEntry.packageId, resolvedEntry);
|
|
300
|
+
packageEntry = resolvedEntry;
|
|
301
|
+
if (resolvedEntry.packageId !== packageId && !visited.has(resolvedEntry.packageId)) {
|
|
302
|
+
queue.push(resolvedEntry.packageId);
|
|
303
|
+
}
|
|
299
304
|
}
|
|
300
305
|
}
|
|
301
306
|
|