@carthooks/arcubase-cli 0.1.7 → 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/bundle/arcubase-admin.mjs +1042 -5056
- package/bundle/arcubase.mjs +1042 -5056
- package/dist/generated/command_registry.generated.d.ts +693 -2812
- package/dist/generated/command_registry.generated.d.ts.map +1 -1
- package/dist/generated/command_registry.generated.js +812 -4100
- package/dist/generated/type_index.generated.d.ts +8 -397
- package/dist/generated/type_index.generated.d.ts.map +1 -1
- package/dist/generated/type_index.generated.js +8 -403
- package/dist/generated/zod_registry.generated.d.ts +33 -261
- package/dist/generated/zod_registry.generated.d.ts.map +1 -1
- package/dist/generated/zod_registry.generated.js +36 -365
- package/dist/runtime/body_loader.d.ts.map +1 -1
- package/dist/runtime/body_loader.js +12 -0
- package/dist/runtime/command_registry.d.ts +3 -21
- package/dist/runtime/command_registry.d.ts.map +1 -1
- package/dist/runtime/command_registry.js +17 -23
- package/dist/runtime/execute.d.ts +3 -3
- package/dist/runtime/execute.d.ts.map +1 -1
- package/dist/runtime/execute.js +53 -157
- package/dist/runtime/http.js +1 -1
- package/dist/runtime/upload.js +3 -3
- package/dist/runtime/zod_registry.d.ts.map +1 -1
- package/dist/runtime/zod_registry.js +7 -24
- package/dist/tests/command_registry.test.js +81 -28
- package/dist/tests/execute_validation.test.js +175 -510
- package/dist/tests/help.test.js +39 -62
- package/dist/tests/upload.test.js +4 -4
- package/dist/tests/zod_registry.test.js +0 -10
- package/package.json +1 -1
- package/sdk-dist/docs/runtime-reference/README.md +20 -30
- package/sdk-dist/docs/runtime-reference/entity-schema/README.md +4 -5
- package/sdk-dist/docs/runtime-reference/entity-schema/linkto.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/query.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/relation.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/relationfield.md +3 -3
- package/sdk-dist/docs/runtime-reference/entity-schema/subform.md +2 -2
- package/sdk-dist/docs/runtime-reference/entity-schema.md +4 -4
- package/sdk-dist/docs/runtime-reference/examples/README.md +2 -2
- package/sdk-dist/docs/runtime-reference/examples/oms-01/README.md +12 -12
- package/sdk-dist/docs/runtime-reference/examples/oms-01/app-overview.md +1 -1
- package/sdk-dist/docs/runtime-reference/row-crud.md +11 -32
- package/sdk-dist/docs/runtime-reference/search-and-bulk-actions.md +16 -47
- package/sdk-dist/docs/runtime-reference/table-lifecycle.md +11 -27
- package/sdk-dist/docs/runtime-reference/uploads.md +1 -1
- package/sdk-dist/docs/runtime-reference/workflow/README.md +19 -0
- package/sdk-dist/generated/command_registry.generated.ts +814 -4102
- package/sdk-dist/generated/type_index.generated.ts +8 -403
- package/sdk-dist/generated/zod_registry.generated.ts +44 -500
- package/sdk-dist/types/app.ts +3 -10
- package/sdk-dist/types/common.ts +7 -0
- package/sdk-dist/types/global-action.ts +2 -1
- package/src/generated/command_registry.generated.ts +814 -4102
- package/src/generated/type_index.generated.ts +8 -403
- package/src/generated/zod_registry.generated.ts +44 -500
- package/src/runtime/body_loader.ts +11 -0
- package/src/runtime/command_registry.ts +22 -44
- package/src/runtime/execute.ts +58 -168
- package/src/runtime/http.ts +1 -1
- package/src/runtime/upload.ts +3 -3
- package/src/runtime/zod_registry.ts +7 -25
- package/src/tests/command_registry.test.ts +81 -31
- package/src/tests/execute_validation.test.ts +199 -640
- package/src/tests/help.test.ts +36 -69
- package/src/tests/upload.test.ts +4 -4
- package/src/tests/zod_registry.test.ts +0 -13
- package/sdk-dist/docs/runtime-reference/app-discovery.md +0 -68
|
@@ -14,9 +14,9 @@ Use this page for:
|
|
|
14
14
|
Use:
|
|
15
15
|
|
|
16
16
|
```bash
|
|
17
|
-
arcubase
|
|
17
|
+
arcubase row query \
|
|
18
18
|
--app-id <app_id> \
|
|
19
|
-
--
|
|
19
|
+
--table-id <table_id> \
|
|
20
20
|
--body-file query.json
|
|
21
21
|
```
|
|
22
22
|
|
|
@@ -83,9 +83,9 @@ Archived view requires both:
|
|
|
83
83
|
Command:
|
|
84
84
|
|
|
85
85
|
```bash
|
|
86
|
-
arcubase
|
|
86
|
+
arcubase row query \
|
|
87
87
|
--app-id <app_id> \
|
|
88
|
-
--
|
|
88
|
+
--table-id <table_id> \
|
|
89
89
|
--query-file archived-query.json \
|
|
90
90
|
--body-file archived-body.json
|
|
91
91
|
```
|
|
@@ -195,9 +195,9 @@ Rules:
|
|
|
195
195
|
Command:
|
|
196
196
|
|
|
197
197
|
```bash
|
|
198
|
-
arcubase
|
|
198
|
+
arcubase row selection-action \
|
|
199
199
|
--app-id <app_id> \
|
|
200
|
-
--
|
|
200
|
+
--table-id <table_id> \
|
|
201
201
|
--action query \
|
|
202
202
|
--body-file query-selection.json
|
|
203
203
|
```
|
|
@@ -235,9 +235,9 @@ Rules:
|
|
|
235
235
|
Command:
|
|
236
236
|
|
|
237
237
|
```bash
|
|
238
|
-
arcubase
|
|
238
|
+
arcubase row selection-action \
|
|
239
239
|
--app-id <app_id> \
|
|
240
|
-
--
|
|
240
|
+
--table-id <table_id> \
|
|
241
241
|
--action archive \
|
|
242
242
|
--body-file archive-selection.json
|
|
243
243
|
```
|
|
@@ -253,9 +253,9 @@ Rules:
|
|
|
253
253
|
Command:
|
|
254
254
|
|
|
255
255
|
```bash
|
|
256
|
-
arcubase
|
|
256
|
+
arcubase row selection-action \
|
|
257
257
|
--app-id <app_id> \
|
|
258
|
-
--
|
|
258
|
+
--table-id <table_id> \
|
|
259
259
|
--action batch_print \
|
|
260
260
|
--body-file batch-print-selection.json
|
|
261
261
|
```
|
|
@@ -280,9 +280,9 @@ Working shape:
|
|
|
280
280
|
Command:
|
|
281
281
|
|
|
282
282
|
```bash
|
|
283
|
-
arcubase
|
|
283
|
+
arcubase row bulk-update \
|
|
284
284
|
--app-id <app_id> \
|
|
285
|
-
--
|
|
285
|
+
--table-id <table_id> \
|
|
286
286
|
--body-file bulk-update.json
|
|
287
287
|
```
|
|
288
288
|
|
|
@@ -387,7 +387,7 @@ Get tags:
|
|
|
387
387
|
```bash
|
|
388
388
|
arcubase-admin entity-tags get-selection-tags \
|
|
389
389
|
--appId <app_id> \
|
|
390
|
-
--entityId <
|
|
390
|
+
--entityId <table_id> \
|
|
391
391
|
--body-file get-tags.json
|
|
392
392
|
```
|
|
393
393
|
|
|
@@ -409,7 +409,7 @@ Add tags:
|
|
|
409
409
|
```bash
|
|
410
410
|
arcubase-admin entity-tags batch-add-entity-tags \
|
|
411
411
|
--appId <app_id> \
|
|
412
|
-
--entityId <
|
|
412
|
+
--entityId <table_id> \
|
|
413
413
|
--body-file add-tags.json
|
|
414
414
|
```
|
|
415
415
|
|
|
@@ -432,7 +432,7 @@ Remove tags:
|
|
|
432
432
|
```bash
|
|
433
433
|
arcubase-admin entity-tags batch-remove-entity-tags \
|
|
434
434
|
--appId <app_id> \
|
|
435
|
-
--entityId <
|
|
435
|
+
--entityId <table_id> \
|
|
436
436
|
--body-file remove-tags.json
|
|
437
437
|
```
|
|
438
438
|
|
|
@@ -458,37 +458,6 @@ Rules:
|
|
|
458
458
|
|
|
459
459
|
## Invoke batch operator
|
|
460
460
|
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
```bash
|
|
464
|
-
arcubase entity invoke-entity-batch-operator \
|
|
465
|
-
--app-id <app_id> \
|
|
466
|
-
--entity-id <entity_id> \
|
|
467
|
-
--body-file invoke-batch-operator.json
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
Current writable shape:
|
|
471
|
-
|
|
472
|
-
```json
|
|
473
|
-
{
|
|
474
|
-
"id": "test-action-id",
|
|
475
|
-
"data": {
|
|
476
|
-
"action_id": "non-existent-action",
|
|
477
|
-
"policy_id": "",
|
|
478
|
-
"selection": {
|
|
479
|
-
"type": "ids",
|
|
480
|
-
"ids": [4000000127],
|
|
481
|
-
"length": 1
|
|
482
|
-
}
|
|
483
|
-
},
|
|
484
|
-
"params": {}
|
|
485
|
-
}
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
Rules:
|
|
489
|
-
|
|
490
|
-
- `id` is the frontend event id inside the custom action
|
|
491
|
-
- `data.action_id` is the custom action id
|
|
492
|
-
- `data.selection` is required
|
|
461
|
+
`invoke-batch-operator` is not part of the reset CLI white list.
|
|
493
462
|
- `params` is optional and should be an object
|
|
494
463
|
- if the entity has no matching custom action or event, the server returns an upstream error
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Use this page when the goal is:
|
|
4
4
|
|
|
5
|
-
- find the target app
|
|
6
5
|
- create an app
|
|
7
6
|
- create a table
|
|
8
7
|
- save the schema
|
|
@@ -10,12 +9,11 @@ Use this page when the goal is:
|
|
|
10
9
|
|
|
11
10
|
The successful path is command-first:
|
|
12
11
|
|
|
13
|
-
1.
|
|
14
|
-
2. create the
|
|
15
|
-
3.
|
|
16
|
-
4.
|
|
17
|
-
5.
|
|
18
|
-
6. probe rows with `query-entity`
|
|
12
|
+
1. create the app
|
|
13
|
+
2. create the entity shell
|
|
14
|
+
3. fetch the current shell
|
|
15
|
+
4. save the full schema
|
|
16
|
+
5. probe rows with `query-entity`
|
|
19
17
|
|
|
20
18
|
Do not stop at shell creation.
|
|
21
19
|
|
|
@@ -26,20 +24,6 @@ CLI phase split:
|
|
|
26
24
|
- the switch happens immediately after `admin-save-entity`
|
|
27
25
|
- do not use `arcubase-admin` for row insert or row query
|
|
28
26
|
|
|
29
|
-
## Step 0: identify the target app
|
|
30
|
-
|
|
31
|
-
Command:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
arcubase-admin app inventory
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Rules:
|
|
38
|
-
|
|
39
|
-
- always resolve the app first when the user refers to an existing app by name
|
|
40
|
-
- do not ask for `app_id` unless there is no match or more than one match
|
|
41
|
-
- do not ask for `entity_id` when creating a new table
|
|
42
|
-
|
|
43
27
|
## Step 1: create the app
|
|
44
28
|
|
|
45
29
|
Command:
|
|
@@ -91,7 +75,7 @@ Command:
|
|
|
91
75
|
```bash
|
|
92
76
|
arcubase-admin entity admin-get-entity-info \
|
|
93
77
|
--app-id <app_id> \
|
|
94
|
-
--
|
|
78
|
+
--table-id <table_id>
|
|
95
79
|
```
|
|
96
80
|
|
|
97
81
|
Use the returned shell as the base for `save-entity.json`.
|
|
@@ -110,7 +94,7 @@ Command:
|
|
|
110
94
|
```bash
|
|
111
95
|
arcubase-admin entity admin-save-entity \
|
|
112
96
|
--app-id <app_id> \
|
|
113
|
-
--
|
|
97
|
+
--table-id <table_id> \
|
|
114
98
|
--body-file save-entity.json
|
|
115
99
|
```
|
|
116
100
|
|
|
@@ -122,17 +106,17 @@ Read before writing `save-entity.json`:
|
|
|
122
106
|
|
|
123
107
|
After `admin-save-entity`, switch binaries:
|
|
124
108
|
|
|
125
|
-
- use `arcubase
|
|
126
|
-
- use `arcubase
|
|
109
|
+
- use `arcubase row create` for row insertion
|
|
110
|
+
- use `arcubase row query` for readiness and row reads
|
|
127
111
|
|
|
128
112
|
## Step 5: probe readiness
|
|
129
113
|
|
|
130
114
|
Command:
|
|
131
115
|
|
|
132
116
|
```bash
|
|
133
|
-
arcubase
|
|
117
|
+
arcubase row query \
|
|
134
118
|
--app-id <app_id> \
|
|
135
|
-
--
|
|
119
|
+
--table-id <table_id> \
|
|
136
120
|
--body-file query.json
|
|
137
121
|
```
|
|
138
122
|
|
|
@@ -6,7 +6,7 @@ The successful path is:
|
|
|
6
6
|
|
|
7
7
|
1. run `arcubase upload <local-file>`
|
|
8
8
|
2. use the returned JSON array directly as the field value
|
|
9
|
-
3. insert or update the row with `arcubase
|
|
9
|
+
3. insert or update the row with `arcubase row create` or `arcubase row update`
|
|
10
10
|
|
|
11
11
|
Do not construct `upload_id`, `assets_id`, or OSS form fields by hand.
|
|
12
12
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Workflow Runtime Reference
|
|
2
|
+
|
|
3
|
+
This directory is reserved for future workflow runtime docs.
|
|
4
|
+
|
|
5
|
+
It will follow the same single-path distribution model as entity schema docs:
|
|
6
|
+
|
|
7
|
+
- Development source of truth:
|
|
8
|
+
- `misc/packages/@carthooks/arcubase-cli/docs/runtime-reference/workflow/`
|
|
9
|
+
- Runtime location:
|
|
10
|
+
- `/opt/arcubase-sdk/docs/runtime-reference/workflow/`
|
|
11
|
+
- Distribution path:
|
|
12
|
+
- `sdk-dist/docs/runtime-reference/workflow/`
|
|
13
|
+
|
|
14
|
+
Expected coverage later:
|
|
15
|
+
|
|
16
|
+
- workflow configuration lifecycle
|
|
17
|
+
- real writable structure for nodes, edges, actions, and conditions
|
|
18
|
+
- integration points between workflow and entity schema
|
|
19
|
+
- common failure cases and debugging guidance
|