@base44-preview/cli 0.0.14-pr.92.59cf482 → 0.0.15-pr.19.d9072f9

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.
Files changed (32) hide show
  1. package/README.md +8 -11
  2. package/bin/dev.cmd +2 -0
  3. package/bin/dev.js +20 -0
  4. package/bin/run.cmd +2 -0
  5. package/bin/run.js +20 -0
  6. package/dist/{cli/index.js → program.js} +7834 -8086
  7. package/dist/templates/backend-and-client/base44/app.jsonc.ejs +9 -0
  8. package/dist/templates/backend-only/base44/app.jsonc.ejs +9 -0
  9. package/package.json +15 -10
  10. package/dist/cli/templates/backend-and-client/base44/env.local.ejs +0 -9
  11. package/dist/cli/templates/backend-only/base44/env.local.ejs +0 -9
  12. /package/dist/{cli/templates → templates}/backend-and-client/.nvmrc +0 -0
  13. /package/dist/{cli/templates → templates}/backend-and-client/README.md +0 -0
  14. /package/dist/{cli/templates → templates}/backend-and-client/base44/config.jsonc.ejs +0 -0
  15. /package/dist/{cli/templates → templates}/backend-and-client/base44/entities/task.jsonc +0 -0
  16. /package/dist/{cli/templates → templates}/backend-and-client/components.json +0 -0
  17. /package/dist/{cli/templates → templates}/backend-and-client/index.html +0 -0
  18. /package/dist/{cli/templates → templates}/backend-and-client/jsconfig.json +0 -0
  19. /package/dist/{cli/templates → templates}/backend-and-client/package.json +0 -0
  20. /package/dist/{cli/templates → templates}/backend-and-client/postcss.config.js +0 -0
  21. /package/dist/{cli/templates → templates}/backend-and-client/src/App.jsx +0 -0
  22. /package/dist/{cli/templates → templates}/backend-and-client/src/api/base44Client.js.ejs +0 -0
  23. /package/dist/{cli/templates → templates}/backend-and-client/src/components/Base44Logo.jsx +0 -0
  24. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/button.jsx +0 -0
  25. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/checkbox.jsx +0 -0
  26. /package/dist/{cli/templates → templates}/backend-and-client/src/components/ui/input.jsx +0 -0
  27. /package/dist/{cli/templates → templates}/backend-and-client/src/index.css +0 -0
  28. /package/dist/{cli/templates → templates}/backend-and-client/src/main.jsx +0 -0
  29. /package/dist/{cli/templates → templates}/backend-and-client/tailwind.config.js +0 -0
  30. /package/dist/{cli/templates → templates}/backend-and-client/vite.config.js +0 -0
  31. /package/dist/{cli/templates → templates}/backend-only/base44/config.jsonc.ejs +0 -0
  32. /package/dist/{cli/templates → templates}/templates.json +0 -0
package/README.md CHANGED
@@ -79,7 +79,6 @@ Base44 projects are configured via a `config.jsonc` (or `config.json`) file in t
79
79
  ```jsonc
80
80
  // base44/config.jsonc
81
81
  {
82
- "id": "your-app-id", // Set after project creation
83
82
  "name": "My Project",
84
83
  "entitiesDir": "./entities", // Default: ./entities
85
84
  "functionsDir": "./functions", // Default: ./functions
@@ -89,17 +88,15 @@ Base44 projects are configured via a `config.jsonc` (or `config.json`) file in t
89
88
  }
90
89
  ```
91
90
 
92
- ### Environment Variables
91
+ ### App Configuration
93
92
 
94
- | Variable | Description | Default |
95
- |----------|-------------|---------|
96
- | `BASE44_CLIENT_ID` | Your app ID | - |
93
+ Your app ID is stored in a `.app.jsonc` file in the `base44/` directory. This file is created automatically when you run `base44 create` or `base44 link`:
97
94
 
98
- You can set these in a `.env.local` file in your `base44/` directory:
99
-
100
- ```bash
101
- # base44/.env.local
102
- BASE44_CLIENT_ID=your-app-id
95
+ ```jsonc
96
+ // base44/.app.jsonc
97
+ {
98
+ "id": "your-app-id"
99
+ }
103
100
  ```
104
101
 
105
102
  ## Project Structure
@@ -110,7 +107,7 @@ A typical Base44 project has this structure:
110
107
  my-project/
111
108
  ├── base44/
112
109
  │ ├── config.jsonc # Project configuration
113
- │ ├── .env.local # Environment variables (git-ignored)
110
+ │ ├── .app.jsonc # App ID (git-ignored)
114
111
  │ ├── entities/ # Entity schema files
115
112
  │ │ ├── user.jsonc
116
113
  │ │ └── product.jsonc
package/bin/dev.cmd ADDED
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ npx tsx "%~dp0\dev.js" %*
package/bin/dev.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env tsx
2
+ import { program, CLIExitError } from '../src/cli/program.ts';
3
+
4
+ try {
5
+ await program.parseAsync();
6
+ } catch (e) {
7
+ if (e instanceof CLIExitError) {
8
+ process.exit(e.code); // Clean exit, no stack trace
9
+ }
10
+ // Commander throws for --help and --version with exitCode 0
11
+ if (e?.code === 'commander.helpDisplayed' || e?.code === 'commander.version') {
12
+ process.exit(0);
13
+ }
14
+ // For other Commander errors, exit with the provided code
15
+ if (e?.exitCode !== undefined) {
16
+ process.exit(e.exitCode);
17
+ }
18
+ console.error(e);
19
+ process.exit(1);
20
+ }
package/bin/run.cmd ADDED
@@ -0,0 +1,2 @@
1
+ @echo off
2
+ node "%~dp0\run.js" %*
package/bin/run.js ADDED
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env node
2
+ import { program, CLIExitError } from '../dist/program.js';
3
+
4
+ try {
5
+ await program.parseAsync();
6
+ } catch (e) {
7
+ if (e instanceof CLIExitError) {
8
+ process.exit(e.code); // Clean exit, no stack trace
9
+ }
10
+ // Commander throws for --help and --version with exitCode 0
11
+ if (e?.code === 'commander.helpDisplayed' || e?.code === 'commander.version') {
12
+ process.exit(0);
13
+ }
14
+ // For other Commander errors, exit with the provided code
15
+ if (e?.exitCode !== undefined) {
16
+ process.exit(e.exitCode);
17
+ }
18
+ console.error(e);
19
+ process.exit(1);
20
+ }