assuremind 1.5.3 → 1.6.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 +3 -3
- package/dist/cli/index.js +129 -129
- package/dist/index.d.mts +137 -149
- package/dist/index.d.ts +137 -149
- package/dist/index.js +31 -31
- package/dist/index.mjs +32 -32
- package/docs/GETTING-STARTED.md +28 -12
- package/package.json +1 -1
- package/templates/docs/GETTING-STARTED.md +7 -6
- package/ui/dist/assets/index-6jqOR-Hh.js +1029 -0
- package/ui/dist/assets/index-BGDCUDyt.css +1 -0
- package/ui/dist/index.html +2 -2
- package/ui/dist/assets/index-CDdZfob4.css +0 -1
- package/ui/dist/assets/index-Dqfu_NfK.js +0 -1029
package/docs/GETTING-STARTED.md
CHANGED
|
@@ -377,26 +377,42 @@ npx assuremind apply-healing --yes
|
|
|
377
377
|
|
|
378
378
|
---
|
|
379
379
|
|
|
380
|
-
## 11. Use Test Variables
|
|
380
|
+
## 11. Use Test Variables (per-environment + CI secrets)
|
|
381
381
|
|
|
382
|
-
Variables let you avoid hardcoding credentials and URLs.
|
|
382
|
+
Variables let you avoid hardcoding credentials and URLs. Reference them in steps with double-braces:
|
|
383
383
|
|
|
384
|
-
```json
|
|
385
|
-
{
|
|
386
|
-
"BASE_URL": "http://localhost:3000",
|
|
387
|
-
"ADMIN_EMAIL": "admin@example.com",
|
|
388
|
-
"ADMIN_PASSWORD": { "value": "supersecret", "secret": true }
|
|
389
|
-
}
|
|
390
384
|
```
|
|
385
|
+
Enter "{{ADMIN_EMAIL}}" in the email field
|
|
386
|
+
Enter "{{ADMIN_PASSWORD}}" in the password field
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Environments
|
|
390
|
+
Projects define a set of environments — by default **DEV, TEST, STAGE, INT, PROD** — editable in **Settings → Environment** (add, rename, delete, and set a base URL per environment). The **active** environment determines which values and base URL a run uses (override per run with `--env <NAME>`).
|
|
391
391
|
|
|
392
|
-
|
|
392
|
+
### Per-environment values
|
|
393
|
+
In **Studio → Variables**, each variable can hold a different value **per environment**, plus a **Global (default)** that applies when an environment has no specific value. On disk this is plain JSON:
|
|
393
394
|
|
|
394
395
|
```
|
|
395
|
-
|
|
396
|
-
|
|
396
|
+
variables/global.json # defaults
|
|
397
|
+
variables/DEV.env.json # DEV overrides
|
|
398
|
+
variables/PROD.env.json # PROD overrides
|
|
397
399
|
```
|
|
398
400
|
|
|
399
|
-
|
|
401
|
+
```jsonc
|
|
402
|
+
// variables/global.json
|
|
403
|
+
{ "ADMIN_EMAIL": "admin@example.com",
|
|
404
|
+
"ADMIN_PASSWORD": { "value": "local_secret", "secret": true } }
|
|
405
|
+
|
|
406
|
+
// variables/PROD.env.json — overrides only for PROD
|
|
407
|
+
{ "ADMIN_PASSWORD": { "value": "prod_secret", "secret": true } }
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
### CI/CD secret overrides (highest priority)
|
|
411
|
+
At runtime, resolution is: **`process.env` → environment value → global default**. So if your pipeline injects a repository **secret** with the same key name (e.g. a GitHub Actions/GitLab secret `ADMIN_PASSWORD`), it **automatically overrides** the stored value — no file changes needed. Locally, with no such env var set, the stored value is used. This gives you one workflow that's safe locally and seamless in CI.
|
|
412
|
+
|
|
413
|
+
> Tip: keep real production secrets **out of the repo** — store a placeholder (or nothing) locally and inject the real value via CI secrets.
|
|
414
|
+
|
|
415
|
+
Manage all of this in the Studio → **Variables** page (environment grid) and **Settings → Environment**.
|
|
400
416
|
|
|
401
417
|
---
|
|
402
418
|
|
package/package.json
CHANGED
|
@@ -330,16 +330,17 @@ Enter "{{USERNAME}}" in the email field
|
|
|
330
330
|
Enter "{{PASSWORD}}" in the password field
|
|
331
331
|
```
|
|
332
332
|
|
|
333
|
-
**
|
|
334
|
-
- `variables/
|
|
335
|
-
- `variables/
|
|
336
|
-
- `variables/prod.env.json` — used with `--env prod`
|
|
333
|
+
**Per-environment values:** each variable can hold a different value per environment (default envs: **DEV, TEST, STAGE, INT, PROD**, editable in Settings → Environment), with a **Global (default)** fallback. On disk:
|
|
334
|
+
- `variables/global.json` — defaults
|
|
335
|
+
- `variables/DEV.env.json`, `variables/PROD.env.json`, … — per-environment overrides
|
|
337
336
|
|
|
338
337
|
```bash
|
|
339
|
-
npx assuremind run --all --env
|
|
338
|
+
npx assuremind run --all --env PROD
|
|
340
339
|
```
|
|
341
340
|
|
|
342
|
-
**
|
|
341
|
+
**CI/CD secret overrides:** at runtime, resolution is **`process.env` → environment value → global default**. If your pipeline injects a repository **secret** with the same key name (e.g. `PASSWORD`), it overrides the stored value automatically — no file changes. Locally (no such env var) the stored value is used.
|
|
342
|
+
|
|
343
|
+
**Manage via Studio:** the **Variables** page shows an environment grid (set a value per env + global); add/rename/delete environments in **Settings → Environment**.
|
|
343
344
|
|
|
344
345
|
---
|
|
345
346
|
|