@cxtms/cx-schema 1.8.1 → 1.9.0
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/README.md +34 -34
- package/dist/cli.js +2408 -177
- package/dist/cli.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/validator.d.ts +8 -0
- package/dist/validator.d.ts.map +1 -1
- package/dist/validator.js +54 -2
- package/dist/validator.js.map +1 -1
- package/dist/workflowValidator.d.ts +4 -0
- package/dist/workflowValidator.d.ts.map +1 -1
- package/dist/workflowValidator.js +28 -2
- package/dist/workflowValidator.js.map +1 -1
- package/package.json +2 -2
- package/schemas/components/appComponent.json +8 -0
- package/schemas/components/module.json +31 -2
- package/schemas/components/timelineGrid.json +4 -0
- package/schemas/schemas.json +12 -0
- package/schemas/workflows/tasks/authentication.json +26 -12
- package/schemas/workflows/workflow.json +0 -4
- package/scripts/postinstall.js +16 -13
- package/{.claude/skills/cx-core → skills/cxtms-developer}/SKILL.md +16 -14
- package/skills/cxtms-developer/ref-cli-auth.md +120 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-accounting.md +7 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-commodity.md +12 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-contact.md +10 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-geography.md +34 -1
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-order-sub.md +13 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-order.md +14 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-rate.md +8 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-shared.md +9 -0
- package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-warehouse.md +5 -0
- package/skills/cxtms-developer/ref-graphql-query.md +320 -0
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/SKILL.md +112 -37
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-data.md +7 -0
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-display.md +17 -0
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-forms.md +7 -1
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-interactive.md +11 -0
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-layout.md +11 -0
- package/{.claude/skills/cx-module → skills/cxtms-module-builder}/ref-components-specialized.md +50 -0
- package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/SKILL.md +139 -30
- package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-communication.md +8 -0
- package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-entity.md +43 -0
- package/skills/cxtms-workflow-builder/ref-expressions-ncalc.md +128 -0
- package/skills/cxtms-workflow-builder/ref-expressions-template.md +159 -0
- package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-flow.md +8 -1
- package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-other.md +9 -0
- package/templates/module-configuration.yaml +23 -89
- package/templates/module-form.yaml +3 -3
- package/templates/module-grid.yaml +3 -3
- package/templates/module-select.yaml +3 -3
- package/templates/module.yaml +3 -2
- package/templates/workflow-api-tracking.yaml +1 -1
- package/templates/workflow-basic.yaml +1 -1
- package/templates/workflow-document.yaml +1 -1
- package/templates/workflow-entity-trigger.yaml +1 -1
- package/templates/workflow-ftp-edi.yaml +1 -1
- package/templates/workflow-ftp-tracking.yaml +1 -1
- package/templates/workflow-mcp-tool.yaml +1 -1
- package/templates/workflow-public-api.yaml +1 -1
- package/templates/workflow-scheduled.yaml +1 -1
- package/templates/workflow-utility.yaml +1 -1
- package/templates/workflow-webhook.yaml +1 -1
- package/templates/workflow.yaml +1 -1
- package/.claude/skills/cx-workflow/ref-expressions.md +0 -272
- /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-job.md +0 -0
- /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-notification.md +0 -0
- /package/{.claude/skills/cx-core → skills/cxtms-developer}/ref-entity-organization.md +0 -0
- /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-accounting.md +0 -0
- /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-filetransfer.md +0 -0
- /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-query.md +0 -0
- /package/{.claude/skills/cx-workflow → skills/cxtms-workflow-builder}/ref-utilities.md +0 -0
package/README.md
CHANGED
|
@@ -29,19 +29,19 @@ npm install @cxtms/cx-schema
|
|
|
29
29
|
|
|
30
30
|
```bash
|
|
31
31
|
# Initialize a new project
|
|
32
|
-
npx
|
|
32
|
+
npx cxtms init
|
|
33
33
|
|
|
34
34
|
# Create a new module
|
|
35
|
-
npx
|
|
35
|
+
npx cxtms create module orders
|
|
36
36
|
|
|
37
37
|
# Create a new workflow
|
|
38
|
-
npx
|
|
38
|
+
npx cxtms create workflow invoice-processor
|
|
39
39
|
|
|
40
40
|
# Validate files
|
|
41
|
-
npx
|
|
41
|
+
npx cxtms modules/*.yaml workflows/*.yaml
|
|
42
42
|
|
|
43
43
|
# Generate validation report
|
|
44
|
-
npx
|
|
44
|
+
npx cxtms report modules/*.yaml --report report.html
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
## CLI Commands
|
|
@@ -51,14 +51,14 @@ npx cx-cli report modules/*.yaml --report report.html
|
|
|
51
51
|
Validate YAML file(s) against JSON Schema definitions.
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
cxtms [files...]
|
|
55
|
+
cxtms validate [files...]
|
|
56
56
|
|
|
57
57
|
# Examples
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
cxtms modules/orders-module.yaml
|
|
59
|
+
cxtms modules/*.yaml workflows/*.yaml
|
|
60
|
+
cxtms --verbose modules/orders-module.yaml
|
|
61
|
+
cxtms --format json modules/orders-module.yaml
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
### init
|
|
@@ -66,7 +66,7 @@ cx-cli --format json modules/orders-module.yaml
|
|
|
66
66
|
Initialize a new CX project with configuration files.
|
|
67
67
|
|
|
68
68
|
```bash
|
|
69
|
-
|
|
69
|
+
cxtms init
|
|
70
70
|
```
|
|
71
71
|
|
|
72
72
|
Creates:
|
|
@@ -81,11 +81,11 @@ Creates:
|
|
|
81
81
|
Create a new module or workflow from template.
|
|
82
82
|
|
|
83
83
|
```bash
|
|
84
|
-
|
|
84
|
+
cxtms create <type> <name>
|
|
85
85
|
|
|
86
86
|
# Examples
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
cxtms create module orders
|
|
88
|
+
cxtms create workflow invoice-generator
|
|
89
89
|
```
|
|
90
90
|
|
|
91
91
|
Generated files include:
|
|
@@ -98,12 +98,12 @@ Generated files include:
|
|
|
98
98
|
Generate validation report for multiple files.
|
|
99
99
|
|
|
100
100
|
```bash
|
|
101
|
-
|
|
101
|
+
cxtms report [files...] --report <output-file>
|
|
102
102
|
|
|
103
103
|
# Examples
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
104
|
+
cxtms report modules/*.yaml --report report.html
|
|
105
|
+
cxtms report workflows/*.yaml --report report.md
|
|
106
|
+
cxtms report modules/*.yaml workflows/*.yaml --report results.json
|
|
107
107
|
```
|
|
108
108
|
|
|
109
109
|
Report formats (auto-detected from extension):
|
|
@@ -116,13 +116,13 @@ Report formats (auto-detected from extension):
|
|
|
116
116
|
Display the JSON Schema definition for a component or task.
|
|
117
117
|
|
|
118
118
|
```bash
|
|
119
|
-
|
|
119
|
+
cxtms schema <name>
|
|
120
120
|
|
|
121
121
|
# Examples
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
cxtms schema form
|
|
123
|
+
cxtms schema dataGrid
|
|
124
|
+
cxtms schema workflow
|
|
125
|
+
cxtms schema foreach
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
### example
|
|
@@ -130,11 +130,11 @@ cx-cli schema foreach
|
|
|
130
130
|
Show example YAML for a component or task.
|
|
131
131
|
|
|
132
132
|
```bash
|
|
133
|
-
|
|
133
|
+
cxtms example <name>
|
|
134
134
|
|
|
135
135
|
# Examples
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
cxtms example form
|
|
137
|
+
cxtms example workflow
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
### list
|
|
@@ -142,9 +142,9 @@ cx-cli example workflow
|
|
|
142
142
|
List all available schemas for validation.
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
145
|
+
cxtms list
|
|
146
|
+
cxtms list --type module
|
|
147
|
+
cxtms list --type workflow
|
|
148
148
|
```
|
|
149
149
|
|
|
150
150
|
## CLI Options
|
|
@@ -298,11 +298,11 @@ Generated workflows include:
|
|
|
298
298
|
```yaml
|
|
299
299
|
- name: Validate YAML files
|
|
300
300
|
run: |
|
|
301
|
-
npx
|
|
301
|
+
npx cxtms --format compact modules/*.yaml workflows/*.yaml
|
|
302
302
|
|
|
303
303
|
- name: Generate validation report
|
|
304
304
|
run: |
|
|
305
|
-
npx
|
|
305
|
+
npx cxtms report modules/*.yaml workflows/*.yaml --report validation-report.html
|
|
306
306
|
|
|
307
307
|
- name: Upload report
|
|
308
308
|
uses: actions/upload-artifact@v3
|
|
@@ -316,7 +316,7 @@ Generated workflows include:
|
|
|
316
316
|
```yaml
|
|
317
317
|
validate:
|
|
318
318
|
script:
|
|
319
|
-
- npx
|
|
319
|
+
- npx cxtms --format json modules/*.yaml > validation-results.json
|
|
320
320
|
artifacts:
|
|
321
321
|
paths:
|
|
322
322
|
- validation-results.json
|
|
@@ -331,7 +331,7 @@ validate:
|
|
|
331
331
|
staged_files=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(yaml|yml)$')
|
|
332
332
|
|
|
333
333
|
if [ -n "$staged_files" ]; then
|
|
334
|
-
npx
|
|
334
|
+
npx cxtms --format compact $staged_files
|
|
335
335
|
if [ $? -ne 0 ]; then
|
|
336
336
|
echo "Validation failed. Please fix errors before committing."
|
|
337
337
|
exit 1
|