@lumerahq/cli 0.13.0 → 0.13.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/dist/index.js
CHANGED
|
@@ -210,22 +210,22 @@ async function main() {
|
|
|
210
210
|
switch (command) {
|
|
211
211
|
// Resource commands
|
|
212
212
|
case "plan":
|
|
213
|
-
await import("./resources-
|
|
213
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.plan(args.slice(1)));
|
|
214
214
|
break;
|
|
215
215
|
case "apply":
|
|
216
|
-
await import("./resources-
|
|
216
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.apply(args.slice(1)));
|
|
217
217
|
break;
|
|
218
218
|
case "pull":
|
|
219
|
-
await import("./resources-
|
|
219
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.pull(args.slice(1)));
|
|
220
220
|
break;
|
|
221
221
|
case "destroy":
|
|
222
|
-
await import("./resources-
|
|
222
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.destroy(args.slice(1)));
|
|
223
223
|
break;
|
|
224
224
|
case "list":
|
|
225
|
-
await import("./resources-
|
|
225
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.list(args.slice(1)));
|
|
226
226
|
break;
|
|
227
227
|
case "show":
|
|
228
|
-
await import("./resources-
|
|
228
|
+
await import("./resources-PKLA2XDG.js").then((m) => m.show(args.slice(1)));
|
|
229
229
|
break;
|
|
230
230
|
// Development
|
|
231
231
|
case "dev":
|
|
@@ -18,8 +18,19 @@ import {
|
|
|
18
18
|
// src/commands/resources.ts
|
|
19
19
|
import pc from "picocolors";
|
|
20
20
|
import prompts from "prompts";
|
|
21
|
+
import { execFileSync, execSync } from "child_process";
|
|
21
22
|
import { existsSync, readdirSync, readFileSync, writeFileSync, mkdirSync } from "fs";
|
|
22
23
|
import { join, resolve } from "path";
|
|
24
|
+
function detectPackageManager() {
|
|
25
|
+
for (const pm of ["bun", "pnpm", "yarn", "npm"]) {
|
|
26
|
+
try {
|
|
27
|
+
execFileSync(pm, ["--version"], { stdio: "ignore" });
|
|
28
|
+
return pm;
|
|
29
|
+
} catch {
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return "npm";
|
|
33
|
+
}
|
|
23
34
|
function showPlanHelp() {
|
|
24
35
|
console.log(`
|
|
25
36
|
${pc.dim("Usage:")}
|
|
@@ -711,9 +722,9 @@ async function applyApp(args) {
|
|
|
711
722
|
const apiUrl = getApiUrl();
|
|
712
723
|
if (!skipBuild) {
|
|
713
724
|
console.log(pc.dim(" Building..."));
|
|
714
|
-
const { execSync } = await import("child_process");
|
|
715
725
|
try {
|
|
716
|
-
|
|
726
|
+
const pm = detectPackageManager();
|
|
727
|
+
execSync(`${pm} run build`, { cwd: projectRoot, stdio: "inherit" });
|
|
717
728
|
} catch {
|
|
718
729
|
throw new Error("Build failed");
|
|
719
730
|
}
|