@aifabrix/builder 2.44.4 → 2.44.5
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/jest.projects.js +20 -15
- package/lib/api/types/wizard.types.js +2 -1
- package/lib/cli/setup-app.help.js +1 -1
- package/lib/cli/setup-app.test-commands.js +9 -5
- package/lib/cli/setup-infra.js +6 -2
- package/lib/cli/setup-utility.js +19 -0
- package/lib/commands/repair-rbac.js +25 -2
- package/lib/commands/repair.js +1 -17
- package/lib/commands/test-e2e-external.js +4 -3
- package/lib/commands/up-common.js +25 -0
- package/lib/commands/wizard-core.js +53 -11
- package/lib/commands/wizard-entity-selection.js +71 -14
- package/lib/commands/wizard-headless.js +5 -2
- package/lib/commands/wizard-helpers.js +13 -1
- package/lib/commands/wizard.js +208 -60
- package/lib/generator/wizard-prompts.js +7 -1
- package/lib/generator/wizard.js +34 -0
- package/lib/schema/wizard-config.schema.json +1 -1
- package/lib/utils/external-readme.js +47 -3
- package/lib/utils/urls-local-registry.js +52 -10
- package/package.json +1 -1
- package/templates/applications/miso-controller/env.template +6 -6
- package/templates/external-system/README.md.hbs +58 -31
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
- `deploy.js` – Deploy script for the integration
|
|
21
21
|
- `wizard.yaml` – Wizard configuration (if created via wizard)
|
|
22
22
|
|
|
23
|
-
Optional: `{{rbacOptionalFile}}` – Roles and permissions merged into the system when
|
|
23
|
+
Optional: `{{rbacOptionalFile}}` – Roles and permissions merged into the system when
|
|
24
|
+
present.
|
|
24
25
|
|
|
25
26
|
## Quick Start
|
|
26
27
|
|
|
27
28
|
Login to your controller
|
|
29
|
+
|
|
28
30
|
```bash
|
|
29
|
-
aifabrix auth config --set-controller
|
|
31
|
+
aifabrix auth config --set-controller URL --set-environment dev
|
|
30
32
|
aifabrix login
|
|
31
33
|
```
|
|
32
34
|
|
|
@@ -45,22 +47,25 @@ Edit files in `integration/{{appName}}/`:
|
|
|
45
47
|
- **Authentication**: `{{systemKey}}-system{{fileExt}}` (auth type, credentials placeholders)
|
|
46
48
|
- **Field mappings**: `{{systemKey}}-datasource-*{{fileExt}}` (dimensions, attributes, operations)
|
|
47
49
|
- **Credential and configuration**: `env.template` (security settings and configuration variables)
|
|
48
|
-
|
|
49
50
|
{{#if secretPaths}}{{#if secretPaths.length}}
|
|
51
|
+
|
|
50
52
|
### Secrets
|
|
51
53
|
|
|
52
54
|
Secrets are resolved from `.aifabrix` or key vault. Set them with:
|
|
53
55
|
|
|
54
56
|
```bash
|
|
55
57
|
{{#each secretPaths}}
|
|
56
|
-
aifabrix secret set {{path}}
|
|
58
|
+
aifabrix secret set {{path}} VALUE # {{description}}
|
|
57
59
|
{{/each}}
|
|
58
60
|
```
|
|
59
61
|
{{/if}}{{/if}}
|
|
60
62
|
|
|
61
63
|
### 3. Validate configuration (local only)
|
|
62
64
|
|
|
63
|
-
`aifabrix validate` runs **on your machine**: it loads files under
|
|
65
|
+
`aifabrix validate` runs **on your machine**: it loads files under
|
|
66
|
+
`integration/{{appName}}/`, checks them against the application and
|
|
67
|
+
external-system / external-datasource JSON schemas, and runs related manifest rules.
|
|
68
|
+
It does **not** call the dataplane or any other remote API.
|
|
64
69
|
|
|
65
70
|
```bash
|
|
66
71
|
aifabrix validate {{appName}}
|
|
@@ -70,19 +75,23 @@ Use this before upload or deploy to catch structural and policy errors early.
|
|
|
70
75
|
|
|
71
76
|
### 4. Repair Deployment Manifest
|
|
72
77
|
|
|
73
|
-
**Run repair regularly.** It keeps naming conventions, filenames, and the deployment
|
|
78
|
+
**Run repair regularly.** It keeps naming conventions, filenames, and the deployment
|
|
79
|
+
manifest aligned with AI Fabrix platform best practices. Use it after editing
|
|
80
|
+
datasources, env.template, or system config—and run it often to catch drift early.
|
|
74
81
|
|
|
75
82
|
```bash
|
|
76
83
|
aifabrix repair {{appName}}
|
|
77
84
|
```
|
|
78
85
|
|
|
79
86
|
Options:
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
|
|
88
|
+
- `--auth METHOD` — Set authentication method (`oauth2`, `aad`, `apikey`, `basic`,
|
|
89
|
+
`queryParam`, `oidc`, `hmac`, `none`); updates system file and env.template
|
|
90
|
+
- `--dry-run` — Report changes only; do not write
|
|
91
|
+
- `--rbac` — Ensure RBAC permissions per datasource and add default Admin/Reader roles if none exist
|
|
92
|
+
- `--expose` — Set `exposed.attributes` on each datasource to all `fieldMappings.attributes` keys
|
|
93
|
+
- `--sync` — Add default sync section to datasources that lack it
|
|
94
|
+
- `--test` — Generate `testPayload.payloadTemplate` and `testPayload.expectedResult` from attributes
|
|
86
95
|
|
|
87
96
|
### 5. Upload to dataplane
|
|
88
97
|
|
|
@@ -93,12 +102,16 @@ aifabrix upload {{appName}}
|
|
|
93
102
|
## Testing
|
|
94
103
|
|
|
95
104
|
| Command | Where it runs | Calls dataplane? |
|
|
96
|
-
|
|
105
|
+
| --- | --- | --- |
|
|
97
106
|
| `aifabrix validate {{appName}}` | Local (schemas / files) | No |
|
|
98
107
|
| `aifabrix test {{appName}}` | Local (manifest / payload checks) | No |
|
|
99
|
-
| `aifabrix test-integration {{appName}}
|
|
108
|
+
| `aifabrix test-integration {{appName}}` | Auth + dataplane | Yes |
|
|
109
|
+
| `aifabrix test-e2e {{appName}}` | Auth + dataplane | Yes |
|
|
110
|
+
| Datasource `test` / `test-integration` / `test-e2e` | Auth + dataplane | Yes |
|
|
100
111
|
|
|
101
|
-
So: **validate** (and **`test`**) stay offline; **all integration and E2E test
|
|
112
|
+
So: **validate** (and **`test`**) stay offline; **all integration and E2E test
|
|
113
|
+
commands** exercise the system **via the API** (after login and a reachable
|
|
114
|
+
dataplane).
|
|
102
115
|
|
|
103
116
|
### Local checks (no API)
|
|
104
117
|
|
|
@@ -120,14 +133,16 @@ aifabrix test-e2e {{appName}}
|
|
|
120
133
|
```
|
|
121
134
|
|
|
122
135
|
Options:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
136
|
+
|
|
137
|
+
- `-e`, `--env ENV` — Environment: `dev`, `tst`, or `pro` (builder: dev/tst for container)
|
|
138
|
+
- `-v`, `--verbose` — Show detailed step output and poll progress
|
|
139
|
+
- `-d`, `--debug` — Include debug output and write log to `integration/{{appName}}/logs/`
|
|
140
|
+
- `--no-async` — Use sync mode (no polling); single POST per datasource
|
|
127
141
|
|
|
128
142
|
### E2E tests per datasource
|
|
129
143
|
|
|
130
|
-
To run a full E2E test for a single datasource (config, credential, sync, data,
|
|
144
|
+
To run a full E2E test for a single datasource (config, credential, sync, data,
|
|
145
|
+
CIP), use `aifabrix datasource test-e2e` with the datasource key and app:
|
|
131
146
|
|
|
132
147
|
{{#if hasDatasources}}
|
|
133
148
|
```bash
|
|
@@ -140,25 +155,37 @@ aifabrix datasource test-e2e {{datasourceKey}} --app {{../appName}}
|
|
|
140
155
|
{{/if}}
|
|
141
156
|
|
|
142
157
|
Options:
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
158
|
+
|
|
159
|
+
- `-a`, `--app {{appName}}` — App key (default: resolve from cwd if inside `integration/{{appName}}/`)
|
|
160
|
+
- `-e`, `--env ENV` — Environment: `dev`, `tst`, or `pro`
|
|
161
|
+
- `-v`, `--verbose` — Show detailed step output and poll progress
|
|
162
|
+
- `-d`, `--debug` — Include debug output and write log to `integration/{{appName}}/logs/`
|
|
163
|
+
- `--no-run-scenarios` — Skip expanding `testPayload.scenarios` in capacity step
|
|
164
|
+
- `--no-cleanup` — Disable cleanup after test (body cleanup: false)
|
|
165
|
+
- `--primary-key-value VALUE` — Primary key value or path to JSON file (e.g.
|
|
166
|
+
`@pk.json`) for body `primaryKeyValue`
|
|
167
|
+
- `--no-async` — Use sync mode (no polling); single POST, no asyncRun
|
|
151
168
|
|
|
152
169
|
## Deployment
|
|
153
170
|
|
|
154
|
-
Deploy via miso-controller pipeline (same as regular apps). Auth and controller
|
|
171
|
+
Deploy via miso-controller pipeline (same as regular apps). Auth and controller
|
|
172
|
+
come from `aifabrix login` and `aifabrix auth config`:
|
|
155
173
|
|
|
156
174
|
```bash
|
|
157
175
|
aifabrix deploy {{appName}}
|
|
158
176
|
```
|
|
159
177
|
|
|
178
|
+
## Delete
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
aifabrix delete {{appName}}
|
|
182
|
+
```
|
|
183
|
+
|
|
160
184
|
## Troubleshooting
|
|
161
185
|
|
|
162
|
-
- **Local validation errors**: Run `aifabrix validate {{appName}}` (and
|
|
163
|
-
|
|
186
|
+
- **Local validation errors**: Run `aifabrix validate {{appName}}` (and
|
|
187
|
+
`aifabrix test {{appName}}`) — these only inspect files on disk, not the dataplane.
|
|
188
|
+
- **Deployment / auth**: Run
|
|
189
|
+
`aifabrix auth config --set-controller URL --set-environment ENV` and
|
|
190
|
+
`aifabrix login` before `aifabrix deploy`.
|
|
164
191
|
- **File not found**: Run commands from the project root (where `package.json` and `integration/` live).
|