zinkee 0.1.4 → 0.1.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/.claude/settings.local.json +16 -0
- package/AGENTS.md +1 -0
- package/README.md +52 -16
- package/dist/index.js +4258 -465
- package/dist/index.js.map +1 -1
- package/docs/cli-contract.md +41 -0
- package/docs/npm-release.md +95 -0
- package/docs/superpowers/plans/2026-03-24-zinkee-cli-implementation.md +837 -0
- package/docs/superpowers/plans/2026-03-25-cli-backend-error-contract.md +503 -0
- package/docs/superpowers/plans/2026-03-26-display-freeform-create.md +389 -0
- package/docs/superpowers/specs/2026-03-24-zinkee-cli-backend-blockers.md +172 -0
- package/docs/superpowers/specs/2026-03-24-zinkee-cli-design.md +1576 -0
- package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-checklist.md +215 -0
- package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-design.md +492 -0
- package/docs/superpowers/specs/2026-03-24-zinkee-cli-e2e-status.md +307 -0
- package/package.json +1 -1
- package/src/api/logs.ts +34 -0
- package/src/cli-examples.ts +7 -0
- package/src/command-registry.ts +7 -0
- package/src/commands/logs.test.ts +123 -0
- package/src/commands/logs.ts +159 -0
- package/src/commands/schemas.test.ts +93 -6
- package/src/index.test.ts +11 -6
- package/src/parsers/expressions.test.ts +75 -30
- package/src/parsers/expressions.ts +21 -4
- package/src/program.ts +2 -0
- package/src/utils/examples.test.ts +194 -8
- package/src/utils/examples.ts +3520 -156
- package/src/utils/schema-fields.ts +571 -86
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(npm test *)",
|
|
5
|
+
"Bash(npm run *)",
|
|
6
|
+
"Bash(pnpm typecheck *)",
|
|
7
|
+
"Bash(pnpm test *)",
|
|
8
|
+
"Bash(npx tsc *)",
|
|
9
|
+
"Read(//home/guillermo/dev/z2-backend/api/src/main/java/com/zinkee/api/domain/model/v2/log/**)",
|
|
10
|
+
"Read(//home/guillermo/dev/z2-backend/**)",
|
|
11
|
+
"Bash(grep *)",
|
|
12
|
+
"Bash(npx vitest *)",
|
|
13
|
+
"Bash(npx tsx *)"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
}
|
package/AGENTS.md
CHANGED
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Implemented command groups:
|
|
|
12
12
|
- `records`
|
|
13
13
|
- `files`
|
|
14
14
|
- `comments`
|
|
15
|
+
- `logs`
|
|
15
16
|
- `navigation`
|
|
16
17
|
- `teamspace`
|
|
17
18
|
- `displays`
|
|
@@ -35,6 +36,10 @@ npm run typecheck
|
|
|
35
36
|
npm test
|
|
36
37
|
```
|
|
37
38
|
|
|
39
|
+
## Publishing
|
|
40
|
+
|
|
41
|
+
Release steps for npm are documented in [docs/npm-release.md](docs/npm-release.md).
|
|
42
|
+
|
|
38
43
|
## Configuration
|
|
39
44
|
|
|
40
45
|
The CLI uses a TOML config file:
|
|
@@ -133,43 +138,62 @@ zinkee schemas fields create projects --type autoincremental --slug code --label
|
|
|
133
138
|
zinkee schemas fields create projects --type member --slug owner --label "Owner"
|
|
134
139
|
```
|
|
135
140
|
|
|
136
|
-
Valid types: `text`, `number`, `date`, `file`, `autoincremental`, `member`, `option`, `reference`, `formula`.
|
|
141
|
+
Valid types: `text`, `number`, `date`, `file`, `autoincremental`, `member`, `option`, `reference`, `formula`, `schedule`.
|
|
137
142
|
|
|
138
|
-
Complex types require `--raw`:
|
|
143
|
+
Complex types require `--raw`. The JSON `type` uses the backend ClassName (`TextField`, `OptionField`, …) and type-specific fields go inside `config`:
|
|
139
144
|
|
|
140
145
|
```bash
|
|
141
146
|
# Option field
|
|
142
147
|
zinkee schemas fields create projects --raw '{
|
|
143
|
-
"type":"
|
|
144
|
-
"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
"type":"OptionField","slug":"status","label":"Status",
|
|
149
|
+
"config":{
|
|
150
|
+
"options":[
|
|
151
|
+
{"id":1,"name":"Open","color":"default"},
|
|
152
|
+
{"id":2,"name":"In Progress","color":"primary"},
|
|
153
|
+
{"id":3,"name":"Done","color":"success"}
|
|
154
|
+
]
|
|
155
|
+
}
|
|
149
156
|
}'
|
|
150
157
|
|
|
151
158
|
# Reference field (targetSchema and targetDisplayField must be UUIDs)
|
|
152
159
|
zinkee schemas fields create tasks --raw '{
|
|
153
|
-
"type":"
|
|
154
|
-
"
|
|
155
|
-
|
|
156
|
-
|
|
160
|
+
"type":"ReferenceField","slug":"project","label":"Project",
|
|
161
|
+
"config":{
|
|
162
|
+
"targetSchema":"<schema-uuid>",
|
|
163
|
+
"targetDisplayField":"<field-uuid>",
|
|
164
|
+
"deleteBehavior":"SET_NULL"
|
|
165
|
+
}
|
|
157
166
|
}'
|
|
158
167
|
|
|
159
168
|
# Formula field (use formulaText, not expression)
|
|
160
169
|
zinkee schemas fields create projects --raw '{
|
|
161
|
-
"type":"
|
|
162
|
-
"
|
|
170
|
+
"type":"FormulaField","slug":"code","label":"Code",
|
|
171
|
+
"config":{
|
|
172
|
+
"formulaText":"concat(\"PRJ-\", <_id-field-uuid>)"
|
|
173
|
+
}
|
|
174
|
+
}'
|
|
175
|
+
|
|
176
|
+
# Schedule field (frequency: monthly | daily). Bound to one NumberField (referenceField)
|
|
177
|
+
# and two DateField UUIDs (beginning/ending). Cannot be required.
|
|
178
|
+
zinkee schemas fields create projects --raw '{
|
|
179
|
+
"type":"ScheduleField","slug":"recurrence","label":"Recurrence",
|
|
180
|
+
"config":{
|
|
181
|
+
"referenceField":"<number-field-uuid>",
|
|
182
|
+
"beginningPeriodField":"<date-field-uuid>",
|
|
183
|
+
"endingPeriodField":"<date-field-uuid>",
|
|
184
|
+
"frequency":"monthly"
|
|
185
|
+
}
|
|
163
186
|
}'
|
|
164
187
|
```
|
|
165
188
|
|
|
166
189
|
### Update field config
|
|
167
190
|
|
|
168
|
-
Config properties must be wrapped inside a `config` key:
|
|
191
|
+
PATCH bodies are flat (no `set` / `unset` wrapper). Config properties must be wrapped inside a `config` key:
|
|
169
192
|
|
|
170
193
|
```bash
|
|
171
194
|
# Number formatting
|
|
172
195
|
zinkee schemas fields update projects budget --raw '{
|
|
196
|
+
"type":"NumberField",
|
|
173
197
|
"config":{
|
|
174
198
|
"defaultValue":"0",
|
|
175
199
|
"formatOptions":{
|
|
@@ -181,11 +205,12 @@ zinkee schemas fields update projects budget --raw '{
|
|
|
181
205
|
|
|
182
206
|
# Date formatting
|
|
183
207
|
zinkee schemas fields update projects start-date --raw '{
|
|
208
|
+
"type":"DateField",
|
|
184
209
|
"config":{"formatOptions":{"format":"date","dateFormat":"L","showTime":false}}
|
|
185
210
|
}'
|
|
186
211
|
|
|
187
212
|
# Text type (valid values: NORMAL, LONG)
|
|
188
|
-
zinkee schemas fields update projects description --raw '{"config":{"textType":"LONG"}}'
|
|
213
|
+
zinkee schemas fields update projects description --raw '{"type":"TextField","config":{"textType":"LONG"}}'
|
|
189
214
|
```
|
|
190
215
|
|
|
191
216
|
### Formula syntax
|
|
@@ -274,6 +299,17 @@ zinkee comments list <schema-slug> <record-uuid>
|
|
|
274
299
|
|
|
275
300
|
---
|
|
276
301
|
|
|
302
|
+
## Logs
|
|
303
|
+
|
|
304
|
+
Returns the change history for a record. Only populated for schemas with `auditable: true`.
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
zinkee logs list <schema-slug> <record-uuid>
|
|
308
|
+
zinkee --json logs list <schema-slug> <record-uuid>
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
277
313
|
## Navigation
|
|
278
314
|
|
|
279
315
|
Organize schemas into database folders.
|