@objectstack/cli 1.0.10 → 1.0.12
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/.turbo/turbo-build.log +14 -9
- package/CHANGELOG.md +24 -0
- package/README.md +132 -13
- package/dist/bin.js +1488 -178
- package/dist/index.d.ts +97 -1
- package/dist/index.js +1938 -5
- package/package.json +9 -9
- package/src/bin.ts +53 -6
- package/src/commands/compile.ts +66 -39
- package/src/commands/create.ts +15 -11
- package/src/commands/dev.ts +12 -16
- package/src/commands/doctor.ts +13 -9
- package/src/commands/generate.ts +297 -0
- package/src/commands/info.ts +111 -0
- package/src/commands/init.ts +313 -0
- package/src/commands/serve.ts +134 -48
- package/src/commands/studio.ts +40 -0
- package/src/commands/test.ts +2 -2
- package/src/commands/validate.ts +130 -0
- package/src/index.ts +9 -0
- package/src/utils/config.ts +78 -0
- package/src/utils/console.ts +319 -0
- package/src/utils/format.ts +261 -0
- package/test/commands.test.ts +26 -1
- package/tsup.config.ts +18 -9
- package/dist/bin.d.ts +0 -2
- package/dist/chunk-2YXVEYO7.js +0 -64
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,19 +1,24 @@
|
|
|
1
1
|
|
|
2
|
-
> @objectstack/cli@1.0.
|
|
2
|
+
> @objectstack/cli@1.0.12 build /home/runner/work/spec/spec/packages/cli
|
|
3
3
|
> tsup
|
|
4
4
|
|
|
5
|
-
[34mCLI[39m Building entry: src/bin.ts
|
|
5
|
+
[34mCLI[39m Building entry: src/bin.ts
|
|
6
|
+
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
|
+
[34mCLI[39m tsup v8.5.1
|
|
8
|
+
[34mCLI[39m Using tsup config: /home/runner/work/spec/spec/packages/cli/tsup.config.ts
|
|
9
|
+
[34mCLI[39m Building entry: src/index.ts
|
|
6
10
|
[34mCLI[39m Using tsconfig: tsconfig.json
|
|
7
11
|
[34mCLI[39m tsup v8.5.1
|
|
8
12
|
[34mCLI[39m Using tsup config: /home/runner/work/spec/spec/packages/cli/tsup.config.ts
|
|
9
13
|
[34mCLI[39m Target: es2022
|
|
14
|
+
[34mCLI[39m Target: es2022
|
|
15
|
+
[34mESM[39m Build start
|
|
10
16
|
[34mCLI[39m Cleaning output folder
|
|
11
17
|
[34mESM[39m Build start
|
|
12
|
-
[32mESM[39m [1mdist/
|
|
13
|
-
[32mESM[39m
|
|
14
|
-
[32mESM[39m [1mdist/
|
|
15
|
-
[32mESM[39m ⚡️ Build success in
|
|
18
|
+
[32mESM[39m [1mdist/index.js [22m[32m61.35 KB[39m
|
|
19
|
+
[32mESM[39m ⚡️ Build success in 88ms
|
|
20
|
+
[32mESM[39m [1mdist/bin.js [22m[32m63.96 KB[39m
|
|
21
|
+
[32mESM[39m ⚡️ Build success in 86ms
|
|
16
22
|
[34mDTS[39m Build start
|
|
17
|
-
[32mDTS[39m ⚡️ Build success in
|
|
18
|
-
[32mDTS[39m [1mdist/
|
|
19
|
-
[32mDTS[39m [1mdist/index.d.ts [22m[32m105.00 B[39m
|
|
23
|
+
[32mDTS[39m ⚡️ Build success in 4328ms
|
|
24
|
+
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.93 KB[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @objectstack/cli
|
|
2
2
|
|
|
3
|
+
## 1.0.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- chore: add Vercel deployment configs, simplify console runtime configuration
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @objectstack/spec@1.0.12
|
|
10
|
+
- @objectstack/core@1.0.12
|
|
11
|
+
- @objectstack/runtime@1.0.12
|
|
12
|
+
- @objectstack/objectql@1.0.12
|
|
13
|
+
- @objectstack/driver-memory@1.0.12
|
|
14
|
+
- @objectstack/plugin-hono-server@1.0.12
|
|
15
|
+
|
|
16
|
+
## 1.0.11
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- @objectstack/spec@1.0.11
|
|
21
|
+
- @objectstack/core@1.0.11
|
|
22
|
+
- @objectstack/objectql@1.0.11
|
|
23
|
+
- @objectstack/runtime@1.0.11
|
|
24
|
+
- @objectstack/driver-memory@1.0.11
|
|
25
|
+
- @objectstack/plugin-hono-server@1.0.11
|
|
26
|
+
|
|
3
27
|
## 1.0.10
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,24 +1,143 @@
|
|
|
1
1
|
# @objectstack/cli
|
|
2
2
|
|
|
3
|
-
Command Line Interface for
|
|
3
|
+
Command Line Interface for building metadata-driven applications with the ObjectStack Protocol.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -D @objectstack/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The CLI is available as `objectstack` or the shorter alias `os`.
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# Initialize a new project
|
|
17
|
+
os init my-app
|
|
18
|
+
|
|
19
|
+
# Generate metadata
|
|
20
|
+
os generate object task
|
|
21
|
+
os generate view task
|
|
22
|
+
os generate flow task
|
|
23
|
+
|
|
24
|
+
# Validate configuration
|
|
25
|
+
os validate
|
|
26
|
+
|
|
27
|
+
# Start development server
|
|
28
|
+
os dev
|
|
29
|
+
|
|
30
|
+
# Compile for production
|
|
31
|
+
os compile
|
|
32
|
+
```
|
|
4
33
|
|
|
5
34
|
## Commands
|
|
6
35
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
36
|
+
### Development
|
|
37
|
+
|
|
38
|
+
| Command | Description |
|
|
39
|
+
|---------|-------------|
|
|
40
|
+
| `os init [name]` | Initialize a new ObjectStack project in the current directory |
|
|
41
|
+
| `os dev [package]` | Start development mode with hot reload |
|
|
42
|
+
| `os serve [config]` | Start the ObjectStack server with plugin auto-detection |
|
|
43
|
+
|
|
44
|
+
### Build & Validate
|
|
45
|
+
|
|
46
|
+
| Command | Description |
|
|
47
|
+
|---------|-------------|
|
|
48
|
+
| `os compile [config]` | Compile configuration to a JSON artifact (`dist/objectstack.json`) |
|
|
49
|
+
| `os validate [config]` | Validate configuration against the ObjectStack Protocol schema |
|
|
50
|
+
| `os info [config]` | Display metadata summary (objects, fields, apps, agents, etc.) |
|
|
51
|
+
|
|
52
|
+
### Scaffolding
|
|
53
|
+
|
|
54
|
+
| Command | Description |
|
|
55
|
+
|---------|-------------|
|
|
56
|
+
| `os generate <type> <name>` | Generate metadata files (alias: `os g`) |
|
|
57
|
+
| `os create <type> [name]` | Create a new package/plugin/example from template |
|
|
58
|
+
|
|
59
|
+
Available generate types: `object`, `view`, `action`, `flow`, `agent`, `dashboard`, `app`
|
|
60
|
+
|
|
61
|
+
### Quality
|
|
62
|
+
|
|
63
|
+
| Command | Description |
|
|
64
|
+
|---------|-------------|
|
|
65
|
+
| `os test [files]` | Run Quality Protocol test scenarios against a running server |
|
|
66
|
+
| `os doctor` | Check development environment health |
|
|
13
67
|
|
|
14
68
|
## Configuration
|
|
15
69
|
|
|
16
|
-
The CLI looks for `objectstack.config.ts` in the current directory
|
|
70
|
+
The CLI looks for `objectstack.config.ts` (or `.js`, `.mjs`) in the current directory:
|
|
17
71
|
|
|
18
72
|
```typescript
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
73
|
+
import { defineStack } from '@objectstack/spec';
|
|
74
|
+
import * as objects from './src/objects';
|
|
75
|
+
|
|
76
|
+
export default defineStack({
|
|
77
|
+
manifest: {
|
|
78
|
+
id: 'com.example.my-app',
|
|
79
|
+
namespace: 'my_app',
|
|
80
|
+
version: '1.0.0',
|
|
81
|
+
type: 'app',
|
|
82
|
+
name: 'My App',
|
|
83
|
+
},
|
|
84
|
+
objects: Object.values(objects),
|
|
85
|
+
});
|
|
24
86
|
```
|
|
87
|
+
|
|
88
|
+
## CLI Options
|
|
89
|
+
|
|
90
|
+
### Global
|
|
91
|
+
|
|
92
|
+
- `-v, --version` — Show version number
|
|
93
|
+
- `-h, --help` — Show help
|
|
94
|
+
|
|
95
|
+
### `os init`
|
|
96
|
+
|
|
97
|
+
- `-t, --template <template>` — Template: `app` (default), `plugin`, `empty`
|
|
98
|
+
- `--no-install` — Skip dependency installation
|
|
99
|
+
|
|
100
|
+
### `os compile`
|
|
101
|
+
|
|
102
|
+
- `-o, --output <path>` — Output path (default: `dist/objectstack.json`)
|
|
103
|
+
- `--json` — Output compile result as JSON (for CI pipelines)
|
|
104
|
+
|
|
105
|
+
### `os validate`
|
|
106
|
+
|
|
107
|
+
- `--strict` — Treat warnings as errors
|
|
108
|
+
- `--json` — Output result as JSON
|
|
109
|
+
|
|
110
|
+
### `os serve`
|
|
111
|
+
|
|
112
|
+
- `-p, --port <port>` — Server port (default: `3000`)
|
|
113
|
+
- `--dev` — Run in development mode (load devPlugins, pretty logging)
|
|
114
|
+
- `--no-server` — Skip starting HTTP server plugin
|
|
115
|
+
|
|
116
|
+
### `os generate`
|
|
117
|
+
|
|
118
|
+
- `-d, --dir <directory>` — Override target directory
|
|
119
|
+
- `--dry-run` — Preview without writing files
|
|
120
|
+
|
|
121
|
+
### `os info`
|
|
122
|
+
|
|
123
|
+
- `--json` — Output as JSON
|
|
124
|
+
|
|
125
|
+
### `os doctor`
|
|
126
|
+
|
|
127
|
+
- `-v, --verbose` — Show fix suggestions for warnings
|
|
128
|
+
|
|
129
|
+
## Typical Workflow
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
os init # 1. Create project
|
|
133
|
+
os generate object customer # 2. Add a Customer object
|
|
134
|
+
os generate object order # 3. Add an Order object
|
|
135
|
+
os generate view customer # 4. Add a list view
|
|
136
|
+
os validate # 5. Validate everything
|
|
137
|
+
os dev # 6. Start dev server
|
|
138
|
+
os compile # 7. Build for production
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
Apache-2.0
|