@base44-preview/cli 0.0.25-pr.156.f6042c0 → 0.0.25-pr.156.f72e41e
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/bin/dev.js +4 -12
- package/bin/run.js +3 -32
- package/dist/index.js +27231 -23647
- package/package.json +5 -5
package/bin/dev.js
CHANGED
|
@@ -1,19 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
|
+
import { createProgram, runCLI } from "../src/cli/index.ts";
|
|
2
3
|
|
|
3
4
|
// Disable Clack spinners and animations in non-interactive environments.
|
|
4
5
|
// Clack only checks the CI env var, so we set it when stdin/stdout aren't TTYs.
|
|
5
6
|
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
6
|
-
process.env.CI =
|
|
7
|
+
process.env.CI = "true";
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
try {
|
|
12
|
-
await program.parseAsync();
|
|
13
|
-
} catch (error) {
|
|
14
|
-
if (error instanceof CLIExitError) {
|
|
15
|
-
process.exit(error.code);
|
|
16
|
-
}
|
|
17
|
-
console.error(error);
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
10
|
+
const program = createProgram();
|
|
11
|
+
await runCLI(program);
|
package/bin/run.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { createProgram, runCLI } from "../dist/index.js";
|
|
3
3
|
|
|
4
4
|
// Disable Clack spinners and animations in non-interactive environments.
|
|
5
5
|
// Clack only checks the CI env var, so we set it when stdin/stdout aren't TTYs.
|
|
@@ -7,34 +7,5 @@ if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
|
7
7
|
process.env.CI = "true";
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const posthogApiKey = process.env.POSTHOG_API_KEY;
|
|
13
|
-
if (posthogApiKey) {
|
|
14
|
-
errorReporter.initialize(posthogApiKey, process.env.POSTHOG_HOST);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
await program.parseAsync();
|
|
19
|
-
} catch (error) {
|
|
20
|
-
// Report the error to PostHog if it's not a controlled exit
|
|
21
|
-
if (!(error instanceof CLIExitError)) {
|
|
22
|
-
await errorReporter.captureException(error, {
|
|
23
|
-
command: process.argv.slice(2).join(" "),
|
|
24
|
-
node_version: process.version,
|
|
25
|
-
platform: process.platform,
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Ensure PostHog events are sent before exiting
|
|
30
|
-
await errorReporter.shutdown();
|
|
31
|
-
|
|
32
|
-
if (error instanceof CLIExitError) {
|
|
33
|
-
process.exit(error.code);
|
|
34
|
-
}
|
|
35
|
-
console.error(error);
|
|
36
|
-
process.exit(1);
|
|
37
|
-
} finally {
|
|
38
|
-
// Always shutdown error reporter on normal exit too
|
|
39
|
-
await errorReporter.shutdown();
|
|
40
|
-
}
|
|
10
|
+
const program = createProgram();
|
|
11
|
+
await runCLI(program);
|