@supacloud/cli 0.87.1 → 0.90.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 +45 -15
- package/dist/index.js +584 -93
- package/dist/shared/tools/app-tools.d.ts +2 -0
- package/dist/shared/tools/application-schemas.d.ts +42 -5
- package/dist/shared/tools/application-tools.d.ts +8 -1
- package/dist/shared/tools/developer-experience-tools.d.ts +26 -0
- package/dist/shared/tools/developer-experience-tools.test.d.ts +1 -0
- package/package.json +7 -7
- package/skills/supacloud/references/command-map.md +4 -4
package/README.md
CHANGED
|
@@ -11,6 +11,22 @@ Registration accepts unknown boundary input, decodes it before invoking the
|
|
|
11
11
|
typed callback, and validates the callback's result. Private `src/shared` imports
|
|
12
12
|
are not supported.
|
|
13
13
|
|
|
14
|
+
## Project Setup and Environment Profiles
|
|
15
|
+
|
|
16
|
+
For an existing frontend, the shortest path is:
|
|
17
|
+
|
|
18
|
+
```sh
|
|
19
|
+
supacloud init
|
|
20
|
+
cp .env.supacloud.test.example .env.supacloud.test
|
|
21
|
+
supacloud env check
|
|
22
|
+
supacloud --env test deploy
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`init` creates `supacloud.json` and non-secret environment examples without
|
|
26
|
+
overwriting an existing project configuration. `env list` and `env check` are
|
|
27
|
+
local-only, redact credentials, and provide stable JSON with `--json` for CI or
|
|
28
|
+
AI tooling. The real `.env.supacloud.*` files are added to `.gitignore`.
|
|
29
|
+
|
|
14
30
|
## Application Starter
|
|
15
31
|
|
|
16
32
|
```sh
|
|
@@ -268,9 +284,13 @@ supacloud --env production deploy --confirm-production production-ref
|
|
|
268
284
|
Test and production use the same workflow. Production safety is enforced by the
|
|
269
285
|
CLI confirmation gate; immutable releases, configuration revisions, backups,
|
|
270
286
|
readiness, CAS activation, rollback artifacts and uncertain-result
|
|
271
|
-
reconciliation belong to SupaCloud.
|
|
272
|
-
|
|
273
|
-
|
|
287
|
+
reconciliation belong to SupaCloud. `SUPACLOUD_APPLICATION_CONFIGURATION_PATH`
|
|
288
|
+
and `SUPACLOUD_APPLICATION_CONFIGURATION_ID` are optional pins; when neither
|
|
289
|
+
is supplied, SupaCloud reuses the current configuration head for the selected
|
|
290
|
+
environment. A first deployment still requires a configuration revision to
|
|
291
|
+
exist on the platform. The application layer only supplies its build output and
|
|
292
|
+
optional configuration file; it does not implement backup, activation or
|
|
293
|
+
downgrade orchestration.
|
|
274
294
|
|
|
275
295
|
CLI requests (including `status`) default to `SUPACLOUD_TLS_VERIFY=false`, skipping HTTPS certificate verification so that
|
|
276
296
|
air-gapped installations using private or self-signed certificates work
|
|
@@ -616,41 +636,51 @@ reporting success. Management endpoint projection is checked before and after.
|
|
|
616
636
|
### Release scope rebinding and inspection
|
|
617
637
|
|
|
618
638
|
Release scopes bind deployment manifests (functions, migrations, web assets) to
|
|
619
|
-
an exact 40-character base commit SHA
|
|
620
|
-
|
|
621
|
-
|
|
639
|
+
an exact 40-character base commit SHA and one concrete deployment environment.
|
|
640
|
+
Old scope files without `targetEnvironmentId` are rejected and must be
|
|
641
|
+
regenerated. Test and production scopes may share the same source commit, but
|
|
642
|
+
they are separate environment-bound release identities.
|
|
622
643
|
|
|
623
644
|
```bash
|
|
624
|
-
# Rebind a single scope
|
|
625
|
-
supacloud release scope_rebind --file supacloud/fa/release-scopes/20260907-intake-p1-production.json
|
|
645
|
+
# Rebind a single environment-bound scope to latest git main (or origin/main)
|
|
646
|
+
supacloud release scope_rebind --file supacloud/fa/release-scopes/20260907-intake-p1-production.json --environment_id production
|
|
647
|
+
|
|
648
|
+
# Rebind multiple production files together
|
|
649
|
+
supacloud release scope_rebind --files "20260907-intake-p1-production.json,20260907-intake-p1-production-hotfix.json" --environment_id production
|
|
626
650
|
|
|
627
|
-
# Rebind
|
|
628
|
-
supacloud release scope_rebind --
|
|
651
|
+
# Rebind staging separately; a staging scope can never be rebound as production
|
|
652
|
+
supacloud release scope_rebind --task 20260907-intake-p1 --environment_id staging
|
|
629
653
|
|
|
630
654
|
# Rebind all scopes matching a task ID or filename prefix in standard directories
|
|
631
|
-
supacloud release scope_rebind --task 20260907-intake-p1
|
|
655
|
+
supacloud release scope_rebind --task 20260907-intake-p1 --environment_id production
|
|
632
656
|
|
|
633
657
|
# Specify an explicit base commit SHA or git ref
|
|
634
|
-
supacloud release scope_rebind --task 20260907-intake-p1 --base_commit origin/main
|
|
658
|
+
supacloud release scope_rebind --task 20260907-intake-p1 --base_commit origin/main --environment_id production
|
|
635
659
|
|
|
636
660
|
# Preview changes without modifying files
|
|
637
|
-
supacloud release scope_rebind --task 20260907-intake-p1 --dry_run
|
|
661
|
+
supacloud release scope_rebind --task 20260907-intake-p1 --environment_id production --dry_run
|
|
638
662
|
|
|
639
663
|
# Inspect scope status, SHA-256 hash, and alignment with git HEAD / origin/main
|
|
640
|
-
supacloud release scope_inspect --file 20260907-intake-p1-production.json
|
|
664
|
+
supacloud release scope_inspect --file 20260907-intake-p1-production.json --environment_id production
|
|
641
665
|
|
|
642
666
|
# Scaffold a new canonical release scope
|
|
643
667
|
supacloud release scope_create \
|
|
644
668
|
--file supacloud/fa/release-scopes/20260907-intake-p1.json \
|
|
645
669
|
--task FA-INTAKE-P1 \
|
|
646
670
|
--ref abc123 \
|
|
671
|
+
--environment_id production \
|
|
647
672
|
--functions "fa-api,fa-worker" \
|
|
648
673
|
--migrations "20260907120000_init"
|
|
649
674
|
```
|
|
650
675
|
|
|
651
676
|
Scope actions run locally without requiring Management API credentials. Files
|
|
652
677
|
are formatted canonically with 2 spaces and sorted keys, and the authoritative
|
|
653
|
-
`scope_sha256` checksum is recalculated automatically.
|
|
678
|
+
`scope_sha256` checksum is recalculated automatically. `scope_create` resolves
|
|
679
|
+
`origin/main` by default, so a new test or production scope is generated from
|
|
680
|
+
the current main baseline instead of reusing an older scope identity.
|
|
681
|
+
These commands are for release maintenance and audit workflows; customers do
|
|
682
|
+
not need to create or rebind a scope before running the one-command deployment
|
|
683
|
+
flow above.
|
|
654
684
|
|
|
655
685
|
The legacy `.env` fallback is unclassified and therefore does not enable the
|
|
656
686
|
production confirmation gate. Production automation must select a `prod` or
|