@marktiderman/genesis-cli 1.11.0 → 1.11.1
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 +1 -1
- package/dist/cli.js +23 -3
- package/dist/cli.js.map +1 -1
- package/dist/doctor.js +22 -2
- package/dist/doctor.js.map +1 -1
- package/dist/genesis-catalog.json +5 -5
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/dist/vite.js +22 -2
- package/dist/vite.js.map +1 -1
- package/package.json +2 -2
|
@@ -62,10 +62,10 @@
|
|
|
62
62
|
"version": "1.5.0"
|
|
63
63
|
},
|
|
64
64
|
"@marktiderman/genesis-extension": {
|
|
65
|
-
"version": "0.
|
|
65
|
+
"version": "0.2.0"
|
|
66
66
|
},
|
|
67
67
|
"@marktiderman/genesis-features": {
|
|
68
|
-
"version": "0.4.
|
|
68
|
+
"version": "0.4.1"
|
|
69
69
|
},
|
|
70
70
|
"@marktiderman/genesis-forms": {
|
|
71
71
|
"version": "0.9.2"
|
|
@@ -89,10 +89,10 @@
|
|
|
89
89
|
"version": "0.6.3"
|
|
90
90
|
},
|
|
91
91
|
"@marktiderman/genesis": {
|
|
92
|
-
"version": "0.9.
|
|
92
|
+
"version": "0.9.9"
|
|
93
93
|
},
|
|
94
94
|
"@marktiderman/genesis-cli": {
|
|
95
|
-
"version": "1.11.
|
|
95
|
+
"version": "1.11.1"
|
|
96
96
|
},
|
|
97
97
|
"@marktiderman/genesis-native": {
|
|
98
98
|
"version": "0.4.1",
|
|
@@ -379,7 +379,7 @@
|
|
|
379
379
|
"version": "0.3.1"
|
|
380
380
|
},
|
|
381
381
|
"@marktiderman/genesis-supabase": {
|
|
382
|
-
"version": "0.
|
|
382
|
+
"version": "0.6.0",
|
|
383
383
|
"blocks": {
|
|
384
384
|
"account": {
|
|
385
385
|
"feature": {
|
package/dist/index.js
CHANGED
|
@@ -3147,6 +3147,11 @@ var real = (p) => {
|
|
|
3147
3147
|
return p;
|
|
3148
3148
|
}
|
|
3149
3149
|
};
|
|
3150
|
+
var LOCKFILES = ["bun.lock", "bun.lockb", "package-lock.json", "npm-shrinkwrap.json", "yarn.lock", "pnpm-lock.yaml"];
|
|
3151
|
+
function nodeModulesOf(dir) {
|
|
3152
|
+
const parent = path14.dirname(dir);
|
|
3153
|
+
return path14.basename(parent).startsWith("@") ? path14.dirname(parent) : parent;
|
|
3154
|
+
}
|
|
3150
3155
|
function packagesIn(nodeModules) {
|
|
3151
3156
|
if (!existsSync(nodeModules)) return [];
|
|
3152
3157
|
const out = [];
|
|
@@ -3195,18 +3200,33 @@ function genesisInstalls(root) {
|
|
|
3195
3200
|
for (const r of roots) visit(r.dir, r.by, r.range);
|
|
3196
3201
|
while (queue.length) {
|
|
3197
3202
|
const { real: from, manifest, label } = queue.shift();
|
|
3198
|
-
const deps = { ...manifest.
|
|
3203
|
+
const deps = { ...manifest.optionalDependencies, ...manifest.dependencies };
|
|
3199
3204
|
for (const [name, range] of Object.entries(deps)) {
|
|
3200
3205
|
const dir = findPackageDir(from, name);
|
|
3201
3206
|
if (dir) visit(dir, label, range);
|
|
3202
3207
|
}
|
|
3208
|
+
for (const [name, range] of Object.entries(manifest.peerDependencies ?? {})) {
|
|
3209
|
+
if (name in deps) continue;
|
|
3210
|
+
const dir = peerOf(from, name);
|
|
3211
|
+
if (dir) visit(dir, label, range);
|
|
3212
|
+
}
|
|
3203
3213
|
}
|
|
3204
3214
|
};
|
|
3215
|
+
const peerOf = (from, name) => {
|
|
3216
|
+
const dir = findPackageDir(from, name);
|
|
3217
|
+
if (!dir) return null;
|
|
3218
|
+
if (!ownInstall || name in declared) return dir;
|
|
3219
|
+
const realDir = real(dir);
|
|
3220
|
+
if (realDir.startsWith(realRoot + path14.sep)) return dir;
|
|
3221
|
+
return nodeModulesOf(realDir) === nodeModulesOf(from) ? dir : null;
|
|
3222
|
+
};
|
|
3205
3223
|
const rootsOf = (deps, by) => Object.entries(deps).flatMap(([name, range]) => {
|
|
3206
3224
|
const dir = findPackageDir(root, name);
|
|
3207
3225
|
return dir ? [{ dir, by, ...range ? { range } : {} }] : [];
|
|
3208
3226
|
});
|
|
3209
3227
|
const app = readManifest(root);
|
|
3228
|
+
const ownInstall = LOCKFILES.some((f) => existsSync(path14.join(root, f)));
|
|
3229
|
+
const declared = { ...app?.devDependencies, ...app?.peerDependencies, ...app?.optionalDependencies, ...app?.dependencies };
|
|
3210
3230
|
const declaredDev = Object.entries(app?.devDependencies ?? {});
|
|
3211
3231
|
const runtimeDeps = {
|
|
3212
3232
|
...Object.fromEntries(declaredDev.filter(([n]) => !NON_SHIPPING.test(n))),
|
|
@@ -3225,7 +3245,7 @@ function genesisInstalls(root) {
|
|
|
3225
3245
|
}).map((dir) => ({ dir, by: "hoisted, not a direct dependency" }))
|
|
3226
3246
|
);
|
|
3227
3247
|
const devRoots = { ...devDeps };
|
|
3228
|
-
for (const tool of DEV_TOOLS) if (!(tool in devRoots)) devRoots[tool] = runtimeDeps[tool];
|
|
3248
|
+
for (const tool of DEV_TOOLS) if (!(tool in devRoots) && tool in runtimeDeps) devRoots[tool] = runtimeDeps[tool];
|
|
3229
3249
|
walk("dev", rootsOf(devRoots, "the app (dev)"));
|
|
3230
3250
|
for (const [key2, copy] of copies) {
|
|
3231
3251
|
const kinds = via.get(key2);
|