@objectstack/cli 3.0.6 → 3.0.8
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 +2 -26
- package/CHANGELOG.md +27 -0
- package/README.md +98 -54
- package/bin/run-dev.js +5 -0
- package/bin/run.js +5 -0
- package/dist/bin.d.ts +11 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +12 -3767
- package/dist/bin.js.map +1 -0
- package/dist/commands/codemod/v2-to-v3.d.ts +10 -0
- package/dist/commands/codemod/v2-to-v3.d.ts.map +1 -0
- package/dist/commands/codemod/v2-to-v3.js +145 -0
- package/dist/commands/codemod/v2-to-v3.js.map +1 -0
- package/dist/commands/compile.d.ts +13 -0
- package/dist/commands/compile.d.ts.map +1 -0
- package/dist/commands/compile.js +91 -0
- package/dist/commands/compile.js.map +1 -0
- package/dist/commands/create.d.ts +91 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +259 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/dev.d.ts +14 -0
- package/dist/commands/dev.d.ts.map +1 -0
- package/dist/commands/dev.js +67 -0
- package/dist/commands/dev.js.map +1 -0
- package/dist/commands/diff.d.ts +16 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +239 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/doctor.d.ts +10 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +532 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/explain.d.ts +12 -0
- package/dist/commands/explain.d.ts.map +1 -0
- package/dist/commands/explain.js +368 -0
- package/dist/commands/explain.js.map +1 -0
- package/dist/commands/generate.d.ts +17 -0
- package/dist/commands/generate.d.ts.map +1 -0
- package/dist/commands/generate.js +833 -0
- package/dist/commands/generate.js.map +1 -0
- package/dist/commands/info.d.ts +12 -0
- package/dist/commands/info.d.ts.map +1 -0
- package/dist/commands/info.js +100 -0
- package/dist/commands/info.js.map +1 -0
- package/dist/commands/init.d.ts +22 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +295 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/lint.d.ts +13 -0
- package/dist/commands/lint.d.ts.map +1 -0
- package/dist/commands/lint.js +255 -0
- package/dist/commands/lint.js.map +1 -0
- package/dist/commands/plugin/add.d.ts +22 -0
- package/dist/commands/plugin/add.d.ts.map +1 -0
- package/dist/commands/plugin/add.js +93 -0
- package/dist/commands/plugin/add.js.map +1 -0
- package/dist/commands/plugin/info.d.ts +10 -0
- package/dist/commands/plugin/info.d.ts.map +1 -0
- package/dist/commands/plugin/info.js +65 -0
- package/dist/commands/plugin/info.js.map +1 -0
- package/dist/commands/plugin/list.d.ts +13 -0
- package/dist/commands/plugin/list.d.ts.map +1 -0
- package/dist/commands/plugin/list.js +78 -0
- package/dist/commands/plugin/list.js.map +1 -0
- package/dist/commands/plugin/remove.d.ts +20 -0
- package/dist/commands/plugin/remove.d.ts.map +1 -0
- package/dist/commands/plugin/remove.js +79 -0
- package/dist/commands/plugin/remove.js.map +1 -0
- package/dist/commands/serve.d.ts +15 -0
- package/dist/commands/serve.d.ts.map +1 -0
- package/dist/commands/serve.js +286 -0
- package/dist/commands/serve.js.map +1 -0
- package/dist/commands/studio.d.ts +19 -0
- package/dist/commands/studio.d.ts.map +1 -0
- package/dist/commands/studio.js +43 -0
- package/dist/commands/studio.js.map +1 -0
- package/dist/commands/test.d.ts +13 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +120 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/validate.d.ts +13 -0
- package/dist/commands/validate.d.ts.map +1 -0
- package/dist/commands/validate.js +115 -0
- package/dist/commands/validate.js.map +1 -0
- package/dist/index.d.ts +15 -114
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -2805
- package/dist/index.js.map +1 -0
- package/dist/utils/config.d.ts +21 -0
- package/dist/utils/config.d.ts.map +1 -0
- package/dist/utils/config.js +66 -0
- package/dist/utils/config.js.map +1 -0
- package/dist/utils/format.d.ts +52 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +202 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/plugin-helpers.d.ts +14 -0
- package/dist/utils/plugin-helpers.d.ts.map +1 -0
- package/dist/utils/plugin-helpers.js +40 -0
- package/dist/utils/plugin-helpers.js.map +1 -0
- package/dist/utils/studio.d.ts +58 -0
- package/dist/utils/studio.d.ts.map +1 -0
- package/dist/utils/studio.js +288 -0
- package/dist/utils/studio.js.map +1 -0
- package/package.json +33 -15
- package/src/bin.ts +11 -104
- package/src/commands/{codemod.ts → codemod/v2-to-v3.ts} +21 -28
- package/src/commands/compile.ts +31 -22
- package/src/commands/create.ts +29 -19
- package/src/commands/dev.ts +21 -10
- package/src/commands/diff.ts +28 -19
- package/src/commands/doctor.ts +17 -10
- package/src/commands/explain.ts +20 -10
- package/src/commands/generate.ts +81 -90
- package/src/commands/info.ts +20 -11
- package/src/commands/init.ts +32 -20
- package/src/commands/lint.ts +24 -14
- package/src/commands/plugin/add.ts +112 -0
- package/src/commands/plugin/info.ts +79 -0
- package/src/commands/plugin/list.ts +93 -0
- package/src/commands/plugin/remove.ts +97 -0
- package/src/commands/serve.ts +30 -20
- package/src/commands/studio.ts +21 -11
- package/src/commands/test.ts +21 -10
- package/src/commands/validate.ts +32 -22
- package/src/index.ts +20 -12
- package/src/utils/plugin-helpers.ts +37 -0
- package/src/utils/studio.ts +0 -1
- package/test/commands.test.ts +76 -37
- package/test/plugin-commands.test.ts +42 -160
- package/test/plugin.test.ts +19 -23
- package/tsconfig.build.json +18 -0
- package/bin/objectstack.js +0 -2
- package/dist/chunk-T2YN4AB7.js +0 -249
- package/dist/chunk-XNACYTC5.js +0 -251
- package/dist/config-FOXDQ5F7.js +0 -10
- package/dist/config-GBR54FKL.js +0 -11
- package/src/commands/plugin.ts +0 -372
- package/src/utils/plugin-commands.ts +0 -163
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
|
|
2
|
+
import { Args, Command, Flags } from '@oclif/core';
|
|
3
|
+
import chalk from 'chalk';
|
|
4
|
+
import { printHeader, printError, printInfo, printKV, } from '../utils/format.js';
|
|
5
|
+
const SCHEMAS = {
|
|
6
|
+
object: {
|
|
7
|
+
name: 'Object',
|
|
8
|
+
description: 'Defines a data entity in the ObjectStack data model. Objects contain fields, enable capabilities, and form the foundation of the metadata-driven platform.',
|
|
9
|
+
required: [
|
|
10
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
11
|
+
{ name: 'fields', type: 'Record<string, Field>', description: 'Map of field definitions' },
|
|
12
|
+
],
|
|
13
|
+
optional: [
|
|
14
|
+
{ name: 'label', type: 'string', description: 'Human-readable display name' },
|
|
15
|
+
{ name: 'pluralLabel', type: 'string', description: 'Plural display name' },
|
|
16
|
+
{ name: 'description', type: 'string', description: 'Documentation for the object' },
|
|
17
|
+
{ name: 'ownership', type: '"own" | "extend"', description: 'Whether this object is owned or extended' },
|
|
18
|
+
{ name: 'enable', type: 'ObjectCapabilities', description: 'Feature flags (trackHistory, apiEnabled, etc.)' },
|
|
19
|
+
{ name: 'icon', type: 'string', description: 'Icon identifier for UI display' },
|
|
20
|
+
],
|
|
21
|
+
example: `{
|
|
22
|
+
name: 'project_task',
|
|
23
|
+
label: 'Project Task',
|
|
24
|
+
fields: {
|
|
25
|
+
title: { type: 'text', label: 'Title', required: true },
|
|
26
|
+
status: { type: 'select', label: 'Status', options: ['open', 'closed'] },
|
|
27
|
+
assigned_to: { type: 'lookup', label: 'Assigned To', reference: 'user' },
|
|
28
|
+
},
|
|
29
|
+
enable: { trackHistory: true, apiEnabled: true },
|
|
30
|
+
}`,
|
|
31
|
+
related: ['field', 'view', 'flow', 'query'],
|
|
32
|
+
docsPath: 'data/object',
|
|
33
|
+
},
|
|
34
|
+
field: {
|
|
35
|
+
name: 'Field',
|
|
36
|
+
description: 'Defines a property on an Object. Fields have types that control validation, storage, and UI rendering.',
|
|
37
|
+
required: [
|
|
38
|
+
{ name: 'type', type: 'FieldType', description: 'Field data type (text, number, boolean, select, lookup, etc.)' },
|
|
39
|
+
],
|
|
40
|
+
optional: [
|
|
41
|
+
{ name: 'label', type: 'string', description: 'Human-readable display name' },
|
|
42
|
+
{ name: 'required', type: 'boolean', description: 'Whether the field is mandatory' },
|
|
43
|
+
{ name: 'multiple', type: 'boolean', description: 'Whether the field holds an array of values' },
|
|
44
|
+
{ name: 'defaultValue', type: 'any', description: 'Default value for new records' },
|
|
45
|
+
{ name: 'maxLength', type: 'number', description: 'Maximum character length (text fields)' },
|
|
46
|
+
{ name: 'reference', type: 'string', description: 'Target object name (lookup fields)' },
|
|
47
|
+
{ name: 'options', type: 'string[]', description: 'Available choices (select fields)' },
|
|
48
|
+
],
|
|
49
|
+
example: `{
|
|
50
|
+
type: 'text',
|
|
51
|
+
label: 'Email Address',
|
|
52
|
+
required: true,
|
|
53
|
+
maxLength: 255,
|
|
54
|
+
}`,
|
|
55
|
+
related: ['object', 'view', 'query'],
|
|
56
|
+
docsPath: 'data/field',
|
|
57
|
+
},
|
|
58
|
+
view: {
|
|
59
|
+
name: 'View',
|
|
60
|
+
description: 'Defines how data is displayed and interacted with. Views can be list views (grid, kanban, calendar) or form views (simple, tabbed, wizard).',
|
|
61
|
+
required: [
|
|
62
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
63
|
+
{ name: 'object', type: 'string', description: 'Target object to display' },
|
|
64
|
+
{ name: 'type', type: '"list" | "form"', description: 'View category' },
|
|
65
|
+
],
|
|
66
|
+
optional: [
|
|
67
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
68
|
+
{ name: 'layout', type: '"grid" | "kanban" | "calendar" | "gantt" | "simple" | "tabbed" | "wizard"', description: 'Layout style' },
|
|
69
|
+
{ name: 'columns', type: 'string[]', description: 'Visible fields for list views' },
|
|
70
|
+
{ name: 'filters', type: 'Filter[]', description: 'Default query filters' },
|
|
71
|
+
{ name: 'sort', type: 'SortConfig', description: 'Default sort configuration' },
|
|
72
|
+
],
|
|
73
|
+
example: `{
|
|
74
|
+
name: 'task_board',
|
|
75
|
+
object: 'project_task',
|
|
76
|
+
type: 'list',
|
|
77
|
+
label: 'Task Board',
|
|
78
|
+
layout: 'kanban',
|
|
79
|
+
columns: ['title', 'status', 'assigned_to'],
|
|
80
|
+
}`,
|
|
81
|
+
related: ['object', 'app', 'action', 'dashboard'],
|
|
82
|
+
docsPath: 'ui/view',
|
|
83
|
+
},
|
|
84
|
+
flow: {
|
|
85
|
+
name: 'Flow',
|
|
86
|
+
description: 'Visual logic orchestration for business processes. Flows can be auto-launched, screen-based, or scheduled.',
|
|
87
|
+
required: [
|
|
88
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
89
|
+
{ name: 'type', type: '"autolaunched" | "screen" | "schedule"', description: 'Trigger type' },
|
|
90
|
+
],
|
|
91
|
+
optional: [
|
|
92
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
93
|
+
{ name: 'description', type: 'string', description: 'Documentation for the flow' },
|
|
94
|
+
{ name: 'trigger', type: 'TriggerConfig', description: 'Event that starts the flow' },
|
|
95
|
+
{ name: 'steps', type: 'FlowStep[]', description: 'Sequence of actions' },
|
|
96
|
+
{ name: 'variables', type: 'Variable[]', description: 'Flow-scoped variables' },
|
|
97
|
+
],
|
|
98
|
+
example: `{
|
|
99
|
+
name: 'assign_on_create',
|
|
100
|
+
type: 'autolaunched',
|
|
101
|
+
label: 'Auto-Assign on Create',
|
|
102
|
+
trigger: { object: 'project_task', event: 'afterInsert' },
|
|
103
|
+
steps: [
|
|
104
|
+
{ type: 'assignment', field: 'assigned_to', value: '$currentUser' },
|
|
105
|
+
],
|
|
106
|
+
}`,
|
|
107
|
+
related: ['object', 'trigger', 'workflow', 'agent'],
|
|
108
|
+
docsPath: 'automation/flow',
|
|
109
|
+
},
|
|
110
|
+
agent: {
|
|
111
|
+
name: 'Agent',
|
|
112
|
+
description: 'Autonomous AI actor that can perform tasks using tools, instructions, and context from the ObjectStack data model.',
|
|
113
|
+
required: [
|
|
114
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
115
|
+
{ name: 'role', type: 'string', description: 'Agent purpose description' },
|
|
116
|
+
],
|
|
117
|
+
optional: [
|
|
118
|
+
{ name: 'instructions', type: 'string', description: 'System prompt / behavioral instructions' },
|
|
119
|
+
{ name: 'tools', type: 'ToolReference[]', description: 'Tools the agent can invoke' },
|
|
120
|
+
{ name: 'model', type: 'string', description: 'LLM model to use' },
|
|
121
|
+
{ name: 'objects', type: 'string[]', description: 'Objects the agent can access' },
|
|
122
|
+
{ name: 'temperature', type: 'number', description: 'Creativity parameter (0-1)' },
|
|
123
|
+
],
|
|
124
|
+
example: `{
|
|
125
|
+
name: 'support_agent',
|
|
126
|
+
role: 'Customer Support Assistant',
|
|
127
|
+
instructions: 'Help users resolve issues by searching the knowledge base.',
|
|
128
|
+
tools: [{ name: 'query', object: 'knowledge_article' }],
|
|
129
|
+
model: 'gpt-4o',
|
|
130
|
+
}`,
|
|
131
|
+
related: ['object', 'flow', 'query'],
|
|
132
|
+
docsPath: 'ai/agent',
|
|
133
|
+
},
|
|
134
|
+
app: {
|
|
135
|
+
name: 'App',
|
|
136
|
+
description: 'Application shell that groups navigation, branding, and views into a cohesive user experience.',
|
|
137
|
+
required: [
|
|
138
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
139
|
+
],
|
|
140
|
+
optional: [
|
|
141
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
142
|
+
{ name: 'description', type: 'string', description: 'App description' },
|
|
143
|
+
{ name: 'navigation', type: 'NavItem[]', description: 'Menu tree structure' },
|
|
144
|
+
{ name: 'logo', type: 'string', description: 'Logo URL or asset path' },
|
|
145
|
+
{ name: 'theme', type: 'string', description: 'Theme reference' },
|
|
146
|
+
{ name: 'defaultRoute', type: 'string', description: 'Landing page route' },
|
|
147
|
+
],
|
|
148
|
+
example: `{
|
|
149
|
+
name: 'project_manager',
|
|
150
|
+
label: 'Project Manager',
|
|
151
|
+
navigation: [
|
|
152
|
+
{ type: 'object', object: 'project_task', label: 'Tasks' },
|
|
153
|
+
{ type: 'dashboard', dashboard: 'project_overview', label: 'Overview' },
|
|
154
|
+
],
|
|
155
|
+
}`,
|
|
156
|
+
related: ['view', 'dashboard', 'action', 'object'],
|
|
157
|
+
docsPath: 'ui/app',
|
|
158
|
+
},
|
|
159
|
+
query: {
|
|
160
|
+
name: 'Query',
|
|
161
|
+
description: 'Declarative data retrieval definition used for fetching and filtering records from objects.',
|
|
162
|
+
required: [
|
|
163
|
+
{ name: 'object', type: 'string', description: 'Target object to query' },
|
|
164
|
+
],
|
|
165
|
+
optional: [
|
|
166
|
+
{ name: 'fields', type: 'string[]', description: 'Fields to select' },
|
|
167
|
+
{ name: 'filters', type: 'Filter[]', description: 'Where conditions' },
|
|
168
|
+
{ name: 'sort', type: 'SortConfig[]', description: 'Order by configuration' },
|
|
169
|
+
{ name: 'limit', type: 'number', description: 'Maximum records to return' },
|
|
170
|
+
{ name: 'offset', type: 'number', description: 'Pagination offset' },
|
|
171
|
+
],
|
|
172
|
+
example: `{
|
|
173
|
+
object: 'project_task',
|
|
174
|
+
fields: ['title', 'status', 'assigned_to'],
|
|
175
|
+
filters: [{ field: 'status', operator: 'eq', value: 'open' }],
|
|
176
|
+
sort: [{ field: 'created_at', direction: 'desc' }],
|
|
177
|
+
limit: 50,
|
|
178
|
+
}`,
|
|
179
|
+
related: ['object', 'field', 'view'],
|
|
180
|
+
docsPath: 'data/query',
|
|
181
|
+
},
|
|
182
|
+
dashboard: {
|
|
183
|
+
name: 'Dashboard',
|
|
184
|
+
description: 'Grid-layout container for widgets that display aggregated data, charts, and key metrics.',
|
|
185
|
+
required: [
|
|
186
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
187
|
+
],
|
|
188
|
+
optional: [
|
|
189
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
190
|
+
{ name: 'widgets', type: 'Widget[]', description: 'Dashboard widget definitions' },
|
|
191
|
+
{ name: 'layout', type: 'GridLayout', description: 'Widget positioning' },
|
|
192
|
+
{ name: 'refreshInterval', type: 'number', description: 'Auto-refresh interval in seconds' },
|
|
193
|
+
],
|
|
194
|
+
example: `{
|
|
195
|
+
name: 'project_overview',
|
|
196
|
+
label: 'Project Overview',
|
|
197
|
+
widgets: [
|
|
198
|
+
{ type: 'chart', object: 'project_task', groupBy: 'status' },
|
|
199
|
+
{ type: 'metric', object: 'project_task', aggregate: 'count' },
|
|
200
|
+
],
|
|
201
|
+
}`,
|
|
202
|
+
related: ['app', 'view', 'object'],
|
|
203
|
+
docsPath: 'ui/dashboard',
|
|
204
|
+
},
|
|
205
|
+
action: {
|
|
206
|
+
name: 'Action',
|
|
207
|
+
description: 'User-triggered operation such as a button click, URL redirect, or screen flow launch.',
|
|
208
|
+
required: [
|
|
209
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
210
|
+
{ name: 'type', type: '"button" | "url" | "flow" | "api"', description: 'Action type' },
|
|
211
|
+
],
|
|
212
|
+
optional: [
|
|
213
|
+
{ name: 'label', type: 'string', description: 'Display text' },
|
|
214
|
+
{ name: 'icon', type: 'string', description: 'Button icon' },
|
|
215
|
+
{ name: 'object', type: 'string', description: 'Target object context' },
|
|
216
|
+
{ name: 'flow', type: 'string', description: 'Flow to launch (for flow actions)' },
|
|
217
|
+
{ name: 'url', type: 'string', description: 'Target URL (for url actions)' },
|
|
218
|
+
{ name: 'confirmation', type: 'string', description: 'Confirmation dialog message' },
|
|
219
|
+
],
|
|
220
|
+
example: `{
|
|
221
|
+
name: 'close_task',
|
|
222
|
+
type: 'flow',
|
|
223
|
+
label: 'Close Task',
|
|
224
|
+
object: 'project_task',
|
|
225
|
+
flow: 'close_task_flow',
|
|
226
|
+
confirmation: 'Are you sure you want to close this task?',
|
|
227
|
+
}`,
|
|
228
|
+
related: ['flow', 'view', 'app'],
|
|
229
|
+
docsPath: 'ui/action',
|
|
230
|
+
},
|
|
231
|
+
workflow: {
|
|
232
|
+
name: 'Workflow',
|
|
233
|
+
description: 'State machine and approval process that governs record lifecycle transitions.',
|
|
234
|
+
required: [
|
|
235
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
236
|
+
{ name: 'object', type: 'string', description: 'Target object' },
|
|
237
|
+
],
|
|
238
|
+
optional: [
|
|
239
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
240
|
+
{ name: 'states', type: 'State[]', description: 'Defined workflow states' },
|
|
241
|
+
{ name: 'transitions', type: 'Transition[]', description: 'Allowed state transitions' },
|
|
242
|
+
{ name: 'approvers', type: 'ApproverConfig', description: 'Approval chain configuration' },
|
|
243
|
+
],
|
|
244
|
+
example: `{
|
|
245
|
+
name: 'task_approval',
|
|
246
|
+
object: 'project_task',
|
|
247
|
+
label: 'Task Approval',
|
|
248
|
+
states: ['draft', 'pending', 'approved', 'rejected'],
|
|
249
|
+
transitions: [
|
|
250
|
+
{ from: 'draft', to: 'pending', action: 'submit' },
|
|
251
|
+
{ from: 'pending', to: 'approved', action: 'approve' },
|
|
252
|
+
{ from: 'pending', to: 'rejected', action: 'reject' },
|
|
253
|
+
],
|
|
254
|
+
}`,
|
|
255
|
+
related: ['object', 'flow', 'action'],
|
|
256
|
+
docsPath: 'automation/workflow',
|
|
257
|
+
},
|
|
258
|
+
trigger: {
|
|
259
|
+
name: 'Trigger',
|
|
260
|
+
description: 'Event-driven automation hook that fires when specific data events occur on an object.',
|
|
261
|
+
required: [
|
|
262
|
+
{ name: 'name', type: 'string (snake_case)', description: 'Machine name identifier' },
|
|
263
|
+
{ name: 'object', type: 'string', description: 'Target object to monitor' },
|
|
264
|
+
{ name: 'event', type: '"beforeInsert" | "afterInsert" | "beforeUpdate" | "afterUpdate" | "beforeDelete" | "afterDelete"', description: 'Event type' },
|
|
265
|
+
],
|
|
266
|
+
optional: [
|
|
267
|
+
{ name: 'label', type: 'string', description: 'Display name' },
|
|
268
|
+
{ name: 'condition', type: 'FilterExpression', description: 'Conditional guard' },
|
|
269
|
+
{ name: 'flow', type: 'string', description: 'Flow to execute' },
|
|
270
|
+
{ name: 'async', type: 'boolean', description: 'Whether to execute asynchronously' },
|
|
271
|
+
],
|
|
272
|
+
example: `{
|
|
273
|
+
name: 'task_created_notify',
|
|
274
|
+
object: 'project_task',
|
|
275
|
+
event: 'afterInsert',
|
|
276
|
+
label: 'Notify on Task Creation',
|
|
277
|
+
flow: 'send_task_notification',
|
|
278
|
+
async: true,
|
|
279
|
+
}`,
|
|
280
|
+
related: ['object', 'flow', 'workflow'],
|
|
281
|
+
docsPath: 'automation/trigger',
|
|
282
|
+
},
|
|
283
|
+
};
|
|
284
|
+
// ─── Command ────────────────────────────────────────────────────────
|
|
285
|
+
export default class Explain extends Command {
|
|
286
|
+
static description = 'Display human-readable explanation of an ObjectStack schema';
|
|
287
|
+
static args = {
|
|
288
|
+
schema: Args.string({ description: 'Schema name (e.g., object, field, view, flow, agent, app)', required: false }),
|
|
289
|
+
};
|
|
290
|
+
static flags = {
|
|
291
|
+
json: Flags.boolean({ description: 'Output as JSON' }),
|
|
292
|
+
};
|
|
293
|
+
async run() {
|
|
294
|
+
const { args, flags } = await this.parse(Explain);
|
|
295
|
+
const schemaName = args.schema;
|
|
296
|
+
// ── No argument: list all schemas ──
|
|
297
|
+
if (!schemaName) {
|
|
298
|
+
if (flags.json) {
|
|
299
|
+
console.log(JSON.stringify({
|
|
300
|
+
schemas: Object.entries(SCHEMAS).map(([key, s]) => ({
|
|
301
|
+
name: key,
|
|
302
|
+
description: s.description,
|
|
303
|
+
})),
|
|
304
|
+
}, null, 2));
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
printHeader('Available Schemas');
|
|
308
|
+
console.log('');
|
|
309
|
+
for (const [key, schema] of Object.entries(SCHEMAS)) {
|
|
310
|
+
const desc = schema.description;
|
|
311
|
+
console.log(` ${chalk.bold.cyan(key.padEnd(12))} ${chalk.dim(desc.length > 70 ? desc.slice(0, 70) + '...' : desc)}`);
|
|
312
|
+
}
|
|
313
|
+
console.log('');
|
|
314
|
+
printInfo(`Run ${chalk.white('objectstack explain <schema>')} for details.`);
|
|
315
|
+
console.log('');
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
// ── Lookup schema ──
|
|
319
|
+
const schema = SCHEMAS[schemaName.toLowerCase()];
|
|
320
|
+
if (!schema) {
|
|
321
|
+
if (flags.json) {
|
|
322
|
+
console.log(JSON.stringify({ error: `Unknown schema: ${schemaName}` }));
|
|
323
|
+
process.exit(1);
|
|
324
|
+
}
|
|
325
|
+
printError(`Unknown schema: "${schemaName}"`);
|
|
326
|
+
console.log('');
|
|
327
|
+
printInfo(`Available schemas: ${Object.keys(SCHEMAS).join(', ')}`);
|
|
328
|
+
console.log('');
|
|
329
|
+
process.exit(1);
|
|
330
|
+
}
|
|
331
|
+
// ── JSON output ──
|
|
332
|
+
if (flags.json) {
|
|
333
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
334
|
+
return;
|
|
335
|
+
}
|
|
336
|
+
// ── Pretty output ──
|
|
337
|
+
printHeader(`Schema: ${schema.name}`);
|
|
338
|
+
console.log('');
|
|
339
|
+
console.log(` ${schema.description}`);
|
|
340
|
+
// Required properties
|
|
341
|
+
console.log('');
|
|
342
|
+
console.log(chalk.bold(' Required Properties:'));
|
|
343
|
+
for (const prop of schema.required) {
|
|
344
|
+
console.log(` ${chalk.green(prop.name.padEnd(18))} ${chalk.dim(prop.type.padEnd(30))} ${prop.description}`);
|
|
345
|
+
}
|
|
346
|
+
// Optional properties
|
|
347
|
+
if (schema.optional.length > 0) {
|
|
348
|
+
console.log('');
|
|
349
|
+
console.log(chalk.bold(' Optional Properties:'));
|
|
350
|
+
for (const prop of schema.optional) {
|
|
351
|
+
console.log(` ${chalk.yellow(prop.name.padEnd(18))} ${chalk.dim(prop.type.padEnd(30))} ${prop.description}`);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
// Example
|
|
355
|
+
console.log('');
|
|
356
|
+
console.log(chalk.bold(' Example:'));
|
|
357
|
+
for (const line of schema.example.split('\n')) {
|
|
358
|
+
console.log(chalk.dim(` ${line}`));
|
|
359
|
+
}
|
|
360
|
+
// Related schemas
|
|
361
|
+
console.log('');
|
|
362
|
+
printKV(' Related', schema.related.map((r) => chalk.cyan(r)).join(', '));
|
|
363
|
+
// Documentation link
|
|
364
|
+
printKV(' Docs', `https://objectstack.dev/docs/${schema.docsPath}`);
|
|
365
|
+
console.log('');
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
//# sourceMappingURL=explain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explain.js","sourceRoot":"","sources":["../../src/commands/explain.ts"],"names":[],"mappings":"AAAA,yEAAyE;AAEzE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,WAAW,EAEX,UAAU,EACV,SAAS,EACT,OAAO,GACR,MAAM,oBAAoB,CAAC;AAc5B,MAAM,OAAO,GAA+B;IAC1C,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,4JAA4J;QACzK,QAAQ,EAAE;YACR,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,EAAE,yBAAyB,EAAE;YACrF,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,0BAA0B,EAAE;SAC3F;QACD,QAAQ,EAAE;YACR,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,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,EAAE,CAAC,CAAC;IAClB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class Generate extends Command {
|
|
3
|
+
static description: string;
|
|
4
|
+
static aliases: string[];
|
|
5
|
+
static args: {
|
|
6
|
+
type: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
7
|
+
name: import("@oclif/core/interfaces").Arg<string | undefined, Record<string, unknown>>;
|
|
8
|
+
};
|
|
9
|
+
static flags: {
|
|
10
|
+
dir: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
12
|
+
output: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
format: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
};
|
|
15
|
+
run(): Promise<void>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=generate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/commands/generate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAQ,OAAO,EAAS,MAAM,aAAa,CAAC;AAg2BnD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,OAAO;IAC3C,OAAgB,WAAW,SAAiD;IAE5E,OAAgB,OAAO,WAAS;IAEhC,OAAgB,IAAI;;;MAGlB;IAEF,OAAgB,KAAK;;;;;MAKnB;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAwC3B"}
|