create-zenbu-app 0.0.23 → 0.0.24
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.mjs
CHANGED
|
@@ -1251,6 +1251,28 @@ async function promptIconPath() {
|
|
|
1251
1251
|
if (!trimmed) return void 0;
|
|
1252
1252
|
return path.isAbsolute(trimmed) ? trimmed : path.resolve(process.cwd(), trimmed);
|
|
1253
1253
|
}
|
|
1254
|
+
const DESKTOP_PM_PRECEDENCE = [
|
|
1255
|
+
"pnpm",
|
|
1256
|
+
"bun",
|
|
1257
|
+
"yarn",
|
|
1258
|
+
"npm"
|
|
1259
|
+
];
|
|
1260
|
+
function pickDesktopPm(detected) {
|
|
1261
|
+
for (const candidate of DESKTOP_PM_PRECEDENCE) {
|
|
1262
|
+
if (candidate === "npm") return {
|
|
1263
|
+
type: "npm",
|
|
1264
|
+
version: detected.version,
|
|
1265
|
+
fallback: false
|
|
1266
|
+
};
|
|
1267
|
+
const v = probeVersion(candidate);
|
|
1268
|
+
if (v) return {
|
|
1269
|
+
type: candidate,
|
|
1270
|
+
version: v,
|
|
1271
|
+
fallback: false
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
return detected;
|
|
1275
|
+
}
|
|
1254
1276
|
async function runDesktopMode() {
|
|
1255
1277
|
p.intro("create-zenbu-app (desktop)");
|
|
1256
1278
|
let displayName;
|
|
@@ -1276,8 +1298,7 @@ async function runDesktopMode() {
|
|
|
1276
1298
|
const slugTemplate = "tailwind";
|
|
1277
1299
|
const templateDir = path.join(TEMPLATES_DIR, slugTemplate);
|
|
1278
1300
|
if (!fs.existsSync(templateDir)) bail(`No template found for configuration "${slugTemplate}".`);
|
|
1279
|
-
|
|
1280
|
-
if (pm.type === "npm") pm = await resolveNpmAmbiguity(pm, { yes });
|
|
1301
|
+
const pm = pickDesktopPm(detectPackageManager());
|
|
1281
1302
|
const log = createLogger({
|
|
1282
1303
|
slug,
|
|
1283
1304
|
verbose: desktopVerbose
|
package/package.json
CHANGED