@nocobase/app-plugin-releases 0.1.0-beta.2 → 0.1.0-beta.20
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/CHANGELOG.md +341 -0
- package/LICENSE.txt +129 -0
- package/README.md +91 -16
- package/dist/client/components/environment-form.d.ts +1 -1
- package/dist/client/components/environment-form.d.ts.map +1 -1
- package/dist/client/components/environment-form.js +9 -2
- package/dist/client/components/environment-form.js.map +1 -1
- package/dist/client/components/page-header.d.ts.map +1 -1
- package/dist/client/components/page-header.js +1 -1
- package/dist/client/components/page-header.js.map +1 -1
- package/dist/client/components/release-badges.d.ts.map +1 -1
- package/dist/client/components/release-badges.js +13 -1
- package/dist/client/components/release-badges.js.map +1 -1
- package/dist/client/components/route-overlay.d.ts +4 -1
- package/dist/client/components/route-overlay.d.ts.map +1 -1
- package/dist/client/components/route-overlay.js +32 -3
- package/dist/client/components/route-overlay.js.map +1 -1
- package/dist/client/components/runtime-policy-fields.d.ts +7 -1
- package/dist/client/components/runtime-policy-fields.d.ts.map +1 -1
- package/dist/client/components/runtime-policy-fields.js +19 -5
- package/dist/client/components/runtime-policy-fields.js.map +1 -1
- package/dist/client/components/runtime-state.d.ts +6 -0
- package/dist/client/components/runtime-state.d.ts.map +1 -0
- package/dist/client/components/runtime-state.js +67 -0
- package/dist/client/components/runtime-state.js.map +1 -0
- package/dist/client/components/shared-host.d.ts +20 -0
- package/dist/client/components/shared-host.d.ts.map +1 -0
- package/dist/client/components/shared-host.js +88 -0
- package/dist/client/components/shared-host.js.map +1 -0
- package/dist/client/components/ui/progress.d.ts +9 -0
- package/dist/client/components/ui/progress.d.ts.map +1 -0
- package/dist/client/components/ui/progress.js +20 -0
- package/dist/client/components/ui/progress.js.map +1 -0
- package/dist/client/components/use-route-overlay.d.ts +2 -9
- package/dist/client/components/use-route-overlay.d.ts.map +1 -1
- package/dist/client/components/use-route-overlay.js +5 -3
- package/dist/client/components/use-route-overlay.js.map +1 -1
- package/dist/client/components/variable-alerts.d.ts.map +1 -1
- package/dist/client/components/variable-alerts.js +6 -18
- package/dist/client/components/variable-alerts.js.map +1 -1
- package/dist/client/hooks/use-app-summary.d.ts +1 -1
- package/dist/client/hooks/use-app-summary.d.ts.map +1 -1
- package/dist/client/hooks/use-app-summary.js +4 -1
- package/dist/client/hooks/use-app-summary.js.map +1 -1
- package/dist/client/hooks/use-releases.d.ts +4 -1
- package/dist/client/hooks/use-releases.d.ts.map +1 -1
- package/dist/client/hooks/use-releases.js +6 -2
- package/dist/client/hooks/use-releases.js.map +1 -1
- package/dist/client/lib/app-state.d.ts +2 -2
- package/dist/client/lib/app-state.d.ts.map +1 -1
- package/dist/client/lib/app-state.js +10 -3
- package/dist/client/lib/app-state.js.map +1 -1
- package/dist/client/lib/errors.d.ts.map +1 -1
- package/dist/client/lib/errors.js +7 -0
- package/dist/client/lib/errors.js.map +1 -1
- package/dist/client/lib/format.d.ts +2 -0
- package/dist/client/lib/format.d.ts.map +1 -1
- package/dist/client/lib/format.js +7 -0
- package/dist/client/lib/format.js.map +1 -1
- package/dist/client/lib/paths.d.ts +5 -0
- package/dist/client/lib/paths.d.ts.map +1 -1
- package/dist/client/lib/paths.js +10 -0
- package/dist/client/lib/paths.js.map +1 -1
- package/dist/client/lib/permissions.d.ts +5 -0
- package/dist/client/lib/permissions.d.ts.map +1 -1
- package/dist/client/lib/permissions.js +8 -0
- package/dist/client/lib/permissions.js.map +1 -1
- package/dist/client/lib/runtime-state.d.ts +25 -0
- package/dist/client/lib/runtime-state.d.ts.map +1 -0
- package/dist/client/lib/runtime-state.js +58 -0
- package/dist/client/lib/runtime-state.js.map +1 -0
- package/dist/client/locales/de-DE.d.ts +5 -0
- package/dist/client/locales/de-DE.d.ts.map +1 -0
- package/dist/client/locales/de-DE.js +876 -0
- package/dist/client/locales/de-DE.js.map +1 -0
- package/dist/client/locales/en-US.d.ts +83 -9
- package/dist/client/locales/en-US.d.ts.map +1 -1
- package/dist/client/locales/en-US.js +80 -9
- package/dist/client/locales/en-US.js.map +1 -1
- package/dist/client/locales/es-ES.d.ts +5 -0
- package/dist/client/locales/es-ES.d.ts.map +1 -0
- package/dist/client/locales/es-ES.js +882 -0
- package/dist/client/locales/es-ES.js.map +1 -0
- package/dist/client/locales/fr-FR.d.ts +5 -0
- package/dist/client/locales/fr-FR.d.ts.map +1 -0
- package/dist/client/locales/fr-FR.js +882 -0
- package/dist/client/locales/fr-FR.js.map +1 -0
- package/dist/client/locales/id-ID.d.ts +5 -0
- package/dist/client/locales/id-ID.d.ts.map +1 -0
- package/dist/client/locales/id-ID.js +876 -0
- package/dist/client/locales/id-ID.js.map +1 -0
- package/dist/client/locales/index.d.ts.map +1 -1
- package/dist/client/locales/index.js +10 -0
- package/dist/client/locales/index.js.map +1 -1
- package/dist/client/locales/ja-JP.d.ts +5 -0
- package/dist/client/locales/ja-JP.d.ts.map +1 -0
- package/dist/client/locales/ja-JP.js +876 -0
- package/dist/client/locales/ja-JP.js.map +1 -0
- package/dist/client/locales/ko-KR.d.ts +5 -0
- package/dist/client/locales/ko-KR.d.ts.map +1 -0
- package/dist/client/locales/ko-KR.js +879 -0
- package/dist/client/locales/ko-KR.js.map +1 -0
- package/dist/client/locales/pt-BR.d.ts +5 -0
- package/dist/client/locales/pt-BR.d.ts.map +1 -0
- package/dist/client/locales/pt-BR.js +882 -0
- package/dist/client/locales/pt-BR.js.map +1 -0
- package/dist/client/locales/ru-RU.d.ts +5 -0
- package/dist/client/locales/ru-RU.d.ts.map +1 -0
- package/dist/client/locales/ru-RU.js +891 -0
- package/dist/client/locales/ru-RU.js.map +1 -0
- package/dist/client/locales/vi-VN.d.ts +5 -0
- package/dist/client/locales/vi-VN.d.ts.map +1 -0
- package/dist/client/locales/vi-VN.js +876 -0
- package/dist/client/locales/vi-VN.js.map +1 -0
- package/dist/client/locales/zh-CN.d.ts.map +1 -1
- package/dist/client/locales/zh-CN.js +83 -9
- package/dist/client/locales/zh-CN.js.map +1 -1
- package/dist/client/locales/zh-TW.d.ts +5 -0
- package/dist/client/locales/zh-TW.d.ts.map +1 -0
- package/dist/client/locales/zh-TW.js +876 -0
- package/dist/client/locales/zh-TW.js.map +1 -0
- package/dist/client/pages/app-page.d.ts.map +1 -1
- package/dist/client/pages/app-page.js +14 -8
- package/dist/client/pages/app-page.js.map +1 -1
- package/dist/client/pages/apps-outlet.d.ts +8 -0
- package/dist/client/pages/apps-outlet.d.ts.map +1 -0
- package/dist/client/pages/apps-outlet.js +9 -0
- package/dist/client/pages/apps-outlet.js.map +1 -0
- package/dist/client/pages/environment-page.d.ts.map +1 -1
- package/dist/client/pages/environment-page.js +112 -24
- package/dist/client/pages/environment-page.js.map +1 -1
- package/dist/client/pages/environments-page.d.ts +8 -3
- package/dist/client/pages/environments-page.d.ts.map +1 -1
- package/dist/client/pages/environments-page.js +58 -10
- package/dist/client/pages/environments-page.js.map +1 -1
- package/dist/client/pages/new-app-page.d.ts +2 -4
- package/dist/client/pages/new-app-page.d.ts.map +1 -1
- package/dist/client/pages/new-app-page.js +29 -19
- package/dist/client/pages/new-app-page.js.map +1 -1
- package/dist/client/pages/new-app-redirect.d.ts +7 -0
- package/dist/client/pages/new-app-redirect.d.ts.map +1 -0
- package/dist/client/pages/new-app-redirect.js +8 -0
- package/dist/client/pages/new-app-redirect.js.map +1 -0
- package/dist/client/pages/request-page.js +1 -1
- package/dist/client/pages.d.ts +6 -2
- package/dist/client/pages.d.ts.map +1 -1
- package/dist/client/pages.js +8 -4
- package/dist/client/pages.js.map +1 -1
- package/dist/client/routes.d.ts.map +1 -1
- package/dist/client/routes.js +37 -10
- package/dist/client/routes.js.map +1 -1
- package/dist/database/migrations/.manifest.json +10 -2
- package/dist/database/migrations/202610020001_rel_create_tables.js +1 -1
- package/dist/database/migrations/202610020001_rel_create_tables.js.map +1 -1
- package/dist/database/migrations/202610260002_rel_bound_artifact_keys.d.ts +4 -0
- package/dist/database/migrations/202610260002_rel_bound_artifact_keys.d.ts.map +1 -0
- package/dist/database/migrations/202610260002_rel_bound_artifact_keys.js +51 -0
- package/dist/database/migrations/202610260002_rel_bound_artifact_keys.js.map +1 -0
- package/dist/database/migrations/202611020001_rel_environment_purpose.d.ts +8 -0
- package/dist/database/migrations/202611020001_rel_environment_purpose.d.ts.map +1 -0
- package/dist/database/migrations/202611020001_rel_environment_purpose.js +30 -0
- package/dist/database/migrations/202611020001_rel_environment_purpose.js.map +1 -0
- package/dist/server/access/caller.d.ts +6 -0
- package/dist/server/access/caller.d.ts.map +1 -1
- package/dist/server/access/caller.js +36 -0
- package/dist/server/access/caller.js.map +1 -1
- package/dist/server/artifact-config.d.ts +9 -0
- package/dist/server/artifact-config.d.ts.map +1 -0
- package/dist/server/artifact-config.js +49 -0
- package/dist/server/artifact-config.js.map +1 -0
- package/dist/server/composition.d.ts +6 -0
- package/dist/server/composition.d.ts.map +1 -1
- package/dist/server/composition.js +7 -1
- package/dist/server/composition.js.map +1 -1
- package/dist/server/config.d.ts +18 -2
- package/dist/server/config.d.ts.map +1 -1
- package/dist/server/drivers/host/driver.d.ts +13 -2
- package/dist/server/drivers/host/driver.d.ts.map +1 -1
- package/dist/server/drivers/host/driver.js +427 -81
- package/dist/server/drivers/host/driver.js.map +1 -1
- package/dist/server/drivers/types.d.ts +79 -1
- package/dist/server/drivers/types.d.ts.map +1 -1
- package/dist/server/drivers/types.js +6 -0
- package/dist/server/drivers/types.js.map +1 -1
- package/dist/server/index.d.ts +1 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js.map +1 -1
- package/dist/server/locales/de-DE.d.ts +5 -0
- package/dist/server/locales/de-DE.d.ts.map +1 -0
- package/dist/server/locales/de-DE.js +133 -0
- package/dist/server/locales/de-DE.js.map +1 -0
- package/dist/server/locales/es-ES.d.ts +5 -0
- package/dist/server/locales/es-ES.d.ts.map +1 -0
- package/dist/server/locales/es-ES.js +133 -0
- package/dist/server/locales/es-ES.js.map +1 -0
- package/dist/server/locales/fr-FR.d.ts +5 -0
- package/dist/server/locales/fr-FR.d.ts.map +1 -0
- package/dist/server/locales/fr-FR.js +133 -0
- package/dist/server/locales/fr-FR.js.map +1 -0
- package/dist/server/locales/id-ID.d.ts +5 -0
- package/dist/server/locales/id-ID.d.ts.map +1 -0
- package/dist/server/locales/id-ID.js +133 -0
- package/dist/server/locales/id-ID.js.map +1 -0
- package/dist/server/locales/index.d.ts.map +1 -1
- package/dist/server/locales/index.js +10 -0
- package/dist/server/locales/index.js.map +1 -1
- package/dist/server/locales/ja-JP.d.ts +5 -0
- package/dist/server/locales/ja-JP.d.ts.map +1 -0
- package/dist/server/locales/ja-JP.js +133 -0
- package/dist/server/locales/ja-JP.js.map +1 -0
- package/dist/server/locales/ko-KR.d.ts +5 -0
- package/dist/server/locales/ko-KR.d.ts.map +1 -0
- package/dist/server/locales/ko-KR.js +133 -0
- package/dist/server/locales/ko-KR.js.map +1 -0
- package/dist/server/locales/pt-BR.d.ts +5 -0
- package/dist/server/locales/pt-BR.d.ts.map +1 -0
- package/dist/server/locales/pt-BR.js +133 -0
- package/dist/server/locales/pt-BR.js.map +1 -0
- package/dist/server/locales/ru-RU.d.ts +5 -0
- package/dist/server/locales/ru-RU.d.ts.map +1 -0
- package/dist/server/locales/ru-RU.js +133 -0
- package/dist/server/locales/ru-RU.js.map +1 -0
- package/dist/server/locales/vi-VN.d.ts +5 -0
- package/dist/server/locales/vi-VN.d.ts.map +1 -0
- package/dist/server/locales/vi-VN.js +133 -0
- package/dist/server/locales/vi-VN.js.map +1 -0
- package/dist/server/locales/zh-TW.d.ts +5 -0
- package/dist/server/locales/zh-TW.d.ts.map +1 -0
- package/dist/server/locales/zh-TW.js +133 -0
- package/dist/server/locales/zh-TW.js.map +1 -0
- package/dist/server/providers/releases.d.ts.map +1 -1
- package/dist/server/providers/releases.js +12 -5
- package/dist/server/providers/releases.js.map +1 -1
- package/dist/server/routes/api.d.ts +1 -1
- package/dist/server/routes/api.d.ts.map +1 -1
- package/dist/server/routes/api.js +120 -20
- package/dist/server/routes/api.js.map +1 -1
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +10 -2
- package/dist/server/routes/index.js.map +1 -1
- package/dist/server/routes/schemas.d.ts +7 -2
- package/dist/server/routes/schemas.d.ts.map +1 -1
- package/dist/server/routes/schemas.js +320 -89
- package/dist/server/routes/schemas.js.map +1 -1
- package/dist/server/services/environments.d.ts +2 -2
- package/dist/server/services/environments.d.ts.map +1 -1
- package/dist/server/services/environments.js +21 -1
- package/dist/server/services/environments.js.map +1 -1
- package/dist/server/services/releases.d.ts +69 -8
- package/dist/server/services/releases.d.ts.map +1 -1
- package/dist/server/services/releases.js +574 -128
- package/dist/server/services/releases.js.map +1 -1
- package/dist/server/services/validation.d.ts +2 -0
- package/dist/server/services/validation.d.ts.map +1 -1
- package/dist/server/services/validation.js +8 -0
- package/dist/server/services/validation.js.map +1 -1
- package/dist/server/tokens.d.ts +15 -2
- package/dist/server/tokens.d.ts.map +1 -1
- package/dist/server/tokens.js.map +1 -1
- package/dist/shared/releases.d.ts +94 -3
- package/dist/shared/releases.d.ts.map +1 -1
- package/dist/shared/releases.js +37 -0
- package/dist/shared/releases.js.map +1 -1
- package/package.json +18 -18
- package/dist/client/pages/apps-page.d.ts +0 -4
- package/dist/client/pages/apps-page.d.ts.map +0 -1
- package/dist/client/pages/apps-page.js +0 -116
- package/dist/client/pages/apps-page.js.map +0 -1
package/README.md
CHANGED
|
@@ -20,6 +20,63 @@ Environment credentials and registry passwords are sealed with the application's
|
|
|
20
20
|
|
|
21
21
|
Client: list `@nocobase/app-plugin-releases/client`. Pass `routes: false` and use `@nocobase/app-plugin-releases/client/pages` to place the pages yourself; otherwise they mount at `/releases` and `/release-environments` (paths are options), with an App's page at `:appId` (Overview, Deployments, Variables, Settings) and an environment's at `:environmentId` (Overview, Variables, Settings) below them, the tab in `?tab=`. An application that mounts the pages elsewhere provides `ReleasesPathsContext` (or wraps them with `withReleasesPaths`) so they link to one another.
|
|
22
22
|
|
|
23
|
+
## Shared Host capacity and rotation
|
|
24
|
+
|
|
25
|
+
`releases.host.memoryBudget` forwards live-admission settings to the in-process Host: `targetRatio` (0.7), `appMemoryMb` (320 MiB cold-start headroom), `reserveMb` (0, no extra OS/process reserve), optional `rssBudgetMb` (0 disables), `startupTimeoutMs` (120000) and `maxPendingStarts` (32). `baseMemoryMb` is accepted but ignored. The Host samples heap, RSS and available memory on each serialized cold start and never adds heap to RSS. `maxActiveApps` is an optional manual count ceiling; deployed/stopped records do not occupy it. The 320 MiB startup headroom covers measured non-first cold-start peaks of 284 MiB heap and 293 MiB RSS. The optional system reserve has not been measured on the target server; operators who need to protect the primary Studio process and database can explicitly set `releases.host.memoryBudget.reserveMb`, using the `available` column of `free -m` as a guide. These settings do not change the Node heap limit or Docker capacity.
|
|
26
|
+
|
|
27
|
+
A successful deployment (including the first) requests one rotation check, not an unconditional restart. Rotation becomes pending when recyclable churn exists and either `restartAfterChurn` is reached or live heap reaches `restartHeapRatio` (0.55 when count rotation is enabled; 0 disables memory triggering). Idle stops, dormancies, capacity stops and timed-out startups also count. The 0.55 heap line leaves room for another measured cold start with the observed heap limit. The batch guard includes durable outcome settlement, so replay cannot select an older release while the control plane is still saving success. Checks use the whole Host, including resident Apps and other environments. Startup, deployment operations and artifact cleanup always defer rotation. Before `restartMaxWaitMs` (300000), HTTP requests and WebSocket connections defer it too. At that limit, new revision loads pause and a child-side handshake gates incoming traffic with 503 and `Retry-After`; current responses may finish for `restartDrainMs` (30000), then remaining HTTP connections close and the process rotates. The old proxy target stays available during this request drain, and new deployment/start operations wait for the handoff. The supervisor has its own `restartDrainMs` shutdown allowance for cleanup and sockets after the request drain. Failed desired-set replays retry in the background on the existing check interval (60000), including when automatic rotation is disabled; cancel, progress and status remain available during recovery. Mutations wait for an already running replay to settle before submission, so an older desired set cannot overwrite a newer deployment. A failed replay does not trigger another foreground attempt or prevent a repair deployment. During process restart and the initial desired-set recovery triggered by child readiness, the local proxy target remains unavailable until that recovery settles, including automatic child restarts. A failed environment does not gate the entire Host, and all environments are attempted even if one cannot restore; background retries and explicit environment restores do not suspend healthy traffic. The stable application listener responds with 503 and `Retry-After: 2`; connection-refused/reset races also receive retryable responses. Production preview origins should stay pointed directly at the Host port to isolate them from the control plane's routes. Their front proxy must translate upstream connection failures into 503 with Retry-After while the child is down; do not point that origin at the control-plane listener. On-demand Apps restore stopped and resident Apps restore running.
|
|
28
|
+
|
|
29
|
+
A capacity-rejected deployment may wait for one shared rotation and retry admission once. Its wait is bounded by the maximum wait, request drain, shutdown allowance and one check interval, and can be cancelled. The Host permits `retryCapacity` only for recorded failures with `APP_CAPACITY_EXCEEDED`; successful operations stay deduplicated. If no reclaimable content exists, rotation cannot complete safely, or admission still fails, the result remains a retryable capacity failure. Existing version preflight refuses an update before stopping its runtime when there is already insufficient memory. Health checks still must pass for deployment success.
|
|
30
|
+
|
|
31
|
+
The environments page shows each shared Host once, below the list, as a capacity card: how many Apps run or start against its `maxActiveApps` limit (a failed App holds nothing and is not counted), its heap and process memory as totals of the whole process, and whether it is to restart or restarting (`GET /api/releases/hosts`, requiring the `rel.environments` `read` setting; an environment's restore error only reaches those who manage environments). Its counts are the whole Host's, every environment on it included. Its footer splits those Apps by environment (`environments[].running`), each linking to the environment's page filtered to its running and starting Apps (`?runtimeState=running&runtimeState=starting`), which lists only the Apps the reader may view. There is no separate Apps list: an environment's page lists its Apps with each one's runtime state — why it holds a slot, what its start waits for, its error and last visit on hover, focus or a tap — and filters them by runtime state (`?runtimeState=`, repeatable, kept in the address; `GET /api/releases/apps?environmentId=&runtimeState=`, applied before the page is cut, 100 a page with further pages in the address, `?page=`). The Apps path (`/releases` by default) has no page of its own and leads to the environments. The Apps route opens with the Apps page grant (`page:rel-apps`). The environments open to either that grant or the `rel.environments` `read` setting, as the server reads environments for either: a route names a single grant, so theirs declares none (`authz: 'skip'`, its menu entry shown to every signed-in user) and the page turns away anyone with neither. An environment's Apps section and Create App need the Apps grants; the Variables tab, the connection check, managing environments and the capacity card keep requiring the setting. An App's page mentions its Host only while the Host affects it — the App waits for a slot, memory or a restart, the Host restarted and could not put it back (`runtime.unrestored`, set per App by the driver), or the Host restarts or is to restart — in one line, linking to the Host's card for those who may read the environments page.
|
|
32
|
+
|
|
33
|
+
## Artifact storage
|
|
34
|
+
|
|
35
|
+
`releases.artifact` accepts either a complete disk configuration or `{ disk: <name>, prefix?: <prefix> }`. A reference selects the named disk from the application's final `drive.disks` configuration; it never falls back to `drive.default`. Only `disk` and `prefix` are allowed in a reference: configure drivers, credentials and other storage options on the disk itself. The referenced disk is validated by `@nocobase/drive` with the same rules as any other disk, so options the driver defaults, such as `forcePathStyle` and `supportsACL` on S3, may be omitted. The referenced disk must have `visibility: private`: release archives carry server code and configuration templates, and on a public disk who can read them is decided by the storage itself, such as an S3 bucket policy when the disk has no ACL support, rather than by this plugin's permission checks, so a public disk is rejected at startup.
|
|
36
|
+
|
|
37
|
+
```yaml
|
|
38
|
+
drive:
|
|
39
|
+
default: local
|
|
40
|
+
disks:
|
|
41
|
+
local:
|
|
42
|
+
driver: fs
|
|
43
|
+
location: storage/files
|
|
44
|
+
visibility: private
|
|
45
|
+
oss:
|
|
46
|
+
driver: s3
|
|
47
|
+
bucket: release-archives
|
|
48
|
+
region: auto
|
|
49
|
+
endpoint: https://s3.example.com
|
|
50
|
+
forcePathStyle: true
|
|
51
|
+
supportsACL: false
|
|
52
|
+
visibility: private
|
|
53
|
+
credentials: {} # Uses the S3 default credential provider chain.
|
|
54
|
+
releases:
|
|
55
|
+
artifact:
|
|
56
|
+
disk: oss
|
|
57
|
+
prefix: releases
|
|
58
|
+
dataDir: storage/releases
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Use `disk: local` to store archives on the filesystem. A prefix is relative to the disk root: `releases` stores new uploads and promoted archives at `releases/<appId>/<releaseId>.tar.gz` on both filesystem and S3 disks. Omit `prefix` or set it to an empty string to use the root; repeated `/` characters are collapsed into one, so `releases//archives` is `releases/archives`, and trailing `/` characters are removed. Absolute paths, backslashes, `.` or `..` path segments and control characters are rejected. The complete artifact key, including the prefix, must fit the database limit of 172 characters; uploads and promotions reject longer keys before writing files. A prefix organizes files; it is not a permission boundary.
|
|
62
|
+
|
|
63
|
+
Existing complete configurations continue to work:
|
|
64
|
+
|
|
65
|
+
```yaml
|
|
66
|
+
releases:
|
|
67
|
+
artifact:
|
|
68
|
+
driver: fs
|
|
69
|
+
location: storage/artifacts
|
|
70
|
+
visibility: private
|
|
71
|
+
dataDir: storage/releases
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The plugin copies referenced disk configuration without changing `drive.disks`. Both managed Hosts receive the resolved complete configuration; prefixes are applied only when generating new artifact keys. Changing the prefix on the same disk leaves existing records and files in place: old releases still deploy, roll back, promote and delete using their recorded keys. Changing the disk requires the operator to migrate existing files. Invalid references fail before services or Hosts are initialized, and configuration errors never include credentials.
|
|
75
|
+
|
|
76
|
+
Applications composing services directly with `createReleases({ config, drive, ... })` pass the final `AppDriveConfig` as the optional `drive` argument when `config.artifact` references a named disk. Existing callers with a complete artifact disk configuration need no changes.
|
|
77
|
+
|
|
78
|
+
Drive also accepts synchronous driver factories in `drive.disks`, but release artifact references require serializable disk configuration objects for the Hosts. Referencing a factory fails before Host initialization without invoking the factory. Configure an object disk for release artifacts; factories remain available for application file storage.
|
|
79
|
+
|
|
23
80
|
## CI and API keys with a scope
|
|
24
81
|
|
|
25
82
|
The plugin has no keys of its own. The API is authenticated by the application, which accepts a person's session or an API key, and opts into scoped keys (`auth.required({ scopedKeys: true })`). A request made with a scoped key (or any key of a service account) carries the key's `KeyScope` on its identity, and `callerOf` turns it into a `key` caller: its permissions are cut down to what the scope covers, and the Apps it reaches to the ones the scope picked (`keyScope.objects('rel.apps')`), for listing as well as every App check.
|
|
@@ -30,17 +87,17 @@ The plugin has no keys of its own. The API is authenticated by the application,
|
|
|
30
87
|
|
|
31
88
|
Everything is under `/api/releases` and follows the application's HTTP API rules: `{ data }`, lists as `{ data, meta }`, and failures in the standard error body with domain `releases` and a stable `reason` (`APP_NOT_FOUND`, `CONFIRMATION_REQUIRED`, …). A route refuses a caller who may not use it at all (`403`) before it reads the input, and the input is checked against a schema (`400 INVALID_INPUT`, domain `app`, unknown body fields included) before the services check the record.
|
|
32
89
|
|
|
33
|
-
| Resource | Routes
|
|
34
|
-
| ------------------- |
|
|
35
|
-
| Caller | `GET /me`
|
|
36
|
-
| Drivers | `GET /drivers` (`meta.total`)
|
|
37
|
-
| Environments | `GET`, `POST /environments`; `GET`, `PATCH`, `DELETE /environments/:environmentId`; `POST /environments/check` (unsaved settings), `POST /environments/:environmentId/check`
|
|
38
|
-
| Registries | the same under `/registries`, `/registries/check` and `/registries/:registryId/check`
|
|
39
|
-
| Apps | `GET /apps` (`q`, `environmentId`, `label=key=value`, `page`, `pageSize`), `POST /apps`; `GET`, `PATCH`, `DELETE /apps/:appId?confirm=<appId>`; `POST /apps/:appId/{start,stop,restart}`; `GET`, `PUT /apps/:appId/config`
|
|
40
|
-
| Variables | `GET /environments/:environmentId/variables`, `PUT`, `DELETE …/variables/:name`; `GET /environments/:environmentId/declaredVariables`; `GET /apps/:appId/variables` (`releaseId`), `PUT`, `DELETE /apps/:appId/variables/:name` (`scope`); `GET /apps/:appId/releases/:releaseId/variables`; `GET /apps/:appId/initialAdmin`, `POST /apps/:appId/initialAdmin/dismiss`
|
|
41
|
-
| Releases | `GET /apps/:appId/releases` (paged), `POST /apps/:appId/releases` (the archive as the body: `201`, `202` when it also deploys, `200` when it is a release already uploaded), `GET`, `PATCH /apps/:appId/releases/:releaseId`, `GET …/configTemplate`, `POST …/promote`, `POST /apps/:appId/imageReleases`, `POST /apps/:appId/uploadTickets`
|
|
42
|
-
| Deployments | `POST /apps/:appId/deploy` and `/rollback` (`202` with the deployment), `GET /apps/:appId/deployments` (paged), `GET /apps/:appId/deployments/:deploymentId`, `GET /apps/:appId/logs` and `GET /apps/:appId/deployments/:deploymentId/logs` (`pageToken`, `q`, `level`, `source`, `since`, `until`, `fromStart`; entries as `data`, `meta.nextPageToken` to read on from)
|
|
43
|
-
| Deployment requests | `GET /deploymentRequests` (`appId`, `status`, `awaitingMe`, paged), `POST /apps/:appId/deploymentRequests`, `GET /deploymentRequests/:requestId`, `POST /deploymentRequests/:requestId/{approve,reject,cancel}`
|
|
90
|
+
| Resource | Routes |
|
|
91
|
+
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
92
|
+
| Caller | `GET /me` |
|
|
93
|
+
| Drivers | `GET /drivers` (`meta.total`) |
|
|
94
|
+
| Environments | `GET`, `POST /environments`; `GET`, `PATCH`, `DELETE /environments/:environmentId`; `POST /environments/check` (unsaved settings), `POST /environments/:environmentId/check` |
|
|
95
|
+
| Registries | the same under `/registries`, `/registries/check` and `/registries/:registryId/check` |
|
|
96
|
+
| Apps | `GET /apps` (`q`, `environmentId`, `label=key=value`, `page`, `pageSize`), `POST /apps`; `GET`, `PATCH`, `DELETE /apps/:appId?confirm=<appId>`; `POST /apps/:appId/{start,stop,restart}`; `GET`, `PUT /apps/:appId/config` |
|
|
97
|
+
| Variables | `GET /environments/:environmentId/variables`, `PUT`, `DELETE …/variables/:name`; `GET /environments/:environmentId/declaredVariables`; `GET /apps/:appId/variables` (`releaseId`), `PUT`, `DELETE /apps/:appId/variables/:name` (`scope`); `GET /apps/:appId/releases/:releaseId/variables`; `GET /apps/:appId/initialAdmin`, `POST /apps/:appId/initialAdmin/dismiss` |
|
|
98
|
+
| Releases | `GET /apps/:appId/releases` (paged), `POST /apps/:appId/releases` (the archive as the body: `201`, `202` when it also deploys, `200` when it is a release already uploaded), `GET`, `PATCH /apps/:appId/releases/:releaseId`, `GET …/archive` (an archive release's `.tar.gz`, `<appId>-<version>.tar.gz` with its SHA-256 in `X-Artifact-Sha256`; `RELEASE_HAS_NO_ARCHIVE` for an image release), `GET …/configTemplate`, `POST …/promote`, `POST /apps/:appId/imageReleases`, `POST /apps/:appId/uploadTickets` |
|
|
99
|
+
| Deployments | `POST /apps/:appId/deploy` and `/rollback` (`202` with the deployment), `GET /apps/:appId/deployments` (paged), `GET /apps/:appId/deployments/:deploymentId`, `GET /apps/:appId/logs` and `GET /apps/:appId/deployments/:deploymentId/logs` (`pageToken`, `q`, `level`, `source`, `since`, `until`, `fromStart`; entries as `data`, `meta.nextPageToken` to read on from) |
|
|
100
|
+
| Deployment requests | `GET /deploymentRequests` (`appId`, `status`, `awaitingMe`, paged), `POST /apps/:appId/deploymentRequests`, `GET /deploymentRequests/:requestId`, `POST /deploymentRequests/:requestId/{approve,reject,cancel}` |
|
|
44
101
|
|
|
45
102
|
`check` is a fixed segment beside environment and registry IDs, so neither may be called `check`.
|
|
46
103
|
|
|
@@ -57,6 +114,8 @@ A release is one of two kinds (`kind`):
|
|
|
57
114
|
- `archive`: the `.tar.gz` a CI job built and uploaded (`POST /apps/:appId/releases`, `acme release upload`), identified by its checksum, plus the commit and build it came from when the upload says so (`x-release-source-commit`, `x-release-build`). In-process environments run it.
|
|
58
115
|
- `image`: an OCI image a CI job built and pushed to a registry, registered by digest with `POST /apps/:appId/imageReleases` (`{ version, ref, digest, platform?, sourceCommit?, build?, labels? }`, `acme release image`). It needs `upload` on the App, so a CI key that may upload may register too. Docker environments run it, pulled by digest. Registering the same digest again answers its release (`reused`); an image for another platform joins the image release of the same version; another digest for a platform the release has is refused (`IMAGE_CONFLICT`), because a release's image never changes. Its images are recorded in `relReleaseArtifacts`, and the release reads answer them as `artifacts`.
|
|
59
116
|
|
|
117
|
+
An archive release is downloaded with `GET /apps/:appId/releases/:releaseId/archive` (`view` on the App; `acme release download --out .`), so a self-hosted production server runs the same bytes a test environment ran. An assembling application that lists many Apps reads their runtime with `releases.summarizeApps(appIds)`, one status call per environment, instead of one `getApp` each.
|
|
118
|
+
|
|
60
119
|
A promoted release carries its source's images, and an image registered later reaches the releases promoted from it, so staging and production run the same digest. Each deployment records what it ran (`DeploymentView.artifact`): `tarball` for the archive in process, `image` with the digest it pulled. A deployment the environment cannot run is refused before it starts: an archive in a Docker environment, or an image release without an image in the environment's registry (`IMAGE_REQUIRED`), and an image release in an in-process environment (`ARCHIVE_REQUIRED`).
|
|
61
120
|
|
|
62
121
|
Image registries (`/registries`, behind `rel.environments`: read lists them, manage changes them) are any OCI Distribution registry: an address, the namespace release images go under, and a write-only pull credential. The username is kept in the clear, the password sealed with the application's secrets service (`secrets.keys`), as an environment's credentials are; `secretKeys` says whether it is set and `secretChanges` replaces (a value) or removes (`null`) it. `POST /registries/check` tries unsaved settings and `POST /registries/:registryId/check` stored ones: `/v2/` anonymously, then the credential with Basic authentication or a token from the realm a Bearer challenge names. CI pushes with its own credentials; nothing here pushes. An environment names the registry it pulls from (`registryId`); for a driver with `capabilities.images`, a deployment hands the driver the release's images in that registry with its pull credentials (`AppDeploymentSpec.images`, `registryAuth`), and the driver reports what it ran (`DeploymentEvent.artifact`).
|
|
@@ -69,13 +128,13 @@ Each App has a runtime policy (`activation`, `idleStopMinutes`, `dormantAfterHou
|
|
|
69
128
|
- `idleStopMinutes` stops the App after that many minutes without a request; the next request starts it again (a browser gets a short "starting" page that refreshes itself, API calls wait). `null` never stops it.
|
|
70
129
|
- `dormantAfterHours` (fractions allowed, at least one minute) makes it dormant after that long without a request: stopped, with its unpacked release removed while its record, releases, configuration and data stay; the next request prepares it again from the stored release. It must be longer than the idle stop. `null` never does.
|
|
71
130
|
|
|
72
|
-
An App created without `idleStopMinutes` or `dormantAfterHours` takes its environment's `defaultIdleStopMinutes` and `defaultDormantAfterHours` (null: never), and an environment holds at most `maxApps` Apps.
|
|
131
|
+
An App created without `idleStopMinutes` or `dormantAfterHours` takes its environment's `defaultIdleStopMinutes` and `defaultDormantAfterHours` (null: never), and an environment holds at most `maxApps` Apps. Each environment has a `purpose`, `preview` (pull request previews) or `test`, set when it is created (`test` by default) and editable; the plugin behaves the same for both, and an application groups its environments by it. The environments list answers each one's `appCount`, and `EnvironmentsSettings` takes a `title` and `description` for an application that names the page in its own words.
|
|
73
132
|
|
|
74
|
-
A changed policy reaches the runtime without restarting the App. The App summary's `runtime.state` adds `starting` and `dormant`, and `runtime.lastAccessedAt` tells when it was last requested. A driver declares `capabilities.onDemand` when it honours the policy; the local Host driver does, and on other drivers the policy is stored but the App keeps running. Removing an App and its data is always an explicit `DELETE`, never a timer: Apps do not expire. Stops and dormancies count towards the Host's `restartAfterChurn`, which
|
|
133
|
+
A changed policy reaches the runtime without restarting the App. The App summary's `runtime.state` adds `starting` and `dormant`, and `runtime.lastAccessedAt` tells when it was last requested. A driver declares `capabilities.onDemand` when it honours the policy; the local Host driver does, and on other drivers the policy is stored but the App keeps running. Removing an App and its data is always an explicit `DELETE`, never a timer: Apps do not expire. Stops and dormancies count towards the Host's `restartAfterChurn`, which protects requests, startup and deployment work on all Apps sharing the Host; the Host settings `sweepIntervalSeconds`, `activationHoldMs` and `activationWaitMs` tune how often timers are checked and how long requests wait for a starting App.
|
|
75
134
|
|
|
76
|
-
Labels are opaque to the plugin. An assembling application that adds labels of its own may provide `ReleasesSystemLabelsContext` (client) with `explain(key, value)`;
|
|
135
|
+
Labels are opaque to the plugin. An assembling application that adds labels of its own may provide `ReleasesSystemLabelsContext` (client) with `explain(key, value)`; an App's page then leaves those labels out (showing the application's `Summary`, below, in their place), its Settings tab shows them read-only with the explanation on hover, and editing the others keeps them. The create and upload dialogs and an App's Settings tab edit labels as rows of a name and a value under "Advanced (optional)".
|
|
77
136
|
|
|
78
|
-
Create App opens over
|
|
137
|
+
Create App opens over an environment's page at `apps/new` (`ReleasesNewAppPage`), for those with the `rel.apps/create` grant, and creates the App in that environment. Create App's old address below the Apps path, `new` (`ReleasesNewAppRedirect`), leads to the environment its `?environmentId=` names, or to the environments; an App may not be called `new` or `requests`. A deployment request opens as a dialog (`ReleasesRequestPage`) over its App's page at `:appId/requests/:requestId`, and below the Apps path at `requests/:requestId` for older links. An App's pending request (there is at most one) is the first row of its deployments, on the Overview and the Deployments tab, with Review for an approver and View for anyone else; an approver also sees a one-line notice under the App's header. The dialog says what would run where and who asked, and an approver adds an optional comment and approves or rejects there; the comment is the decision note the requester is told. An environment's Apps mark an App with a pending request "Pending approval" beside its state. An application that builds Apps from something of its own may say where an App comes from by providing `ReleasesAppOriginContext` (client) with an `Origin` component, which the App's Overview renders under its details, and optionally a `Summary` component, a one-line description lists and the App's header show in place of its system labels; each renders nothing for an App it does not know. The assembling application uses them to name the repository that builds the App, and a preview's pull request.
|
|
79
138
|
|
|
80
139
|
Such an application may also say what deleting an App affects beyond the plugin's records by providing `ReleasesDeleteAppImpactContext` (client) with an `Impact` component, given the App's ID. The Delete App confirmation shows it under its own description; the component loads and words what it needs and renders nothing when nothing uses the App. The plugin's `app.removed` event is where the application then cleans up after the App.
|
|
81
140
|
|
|
@@ -97,7 +156,7 @@ Which variables an App has is declared by its most recent build: its newest rele
|
|
|
97
156
|
|
|
98
157
|
Each deployment resolves them, strongest first: the App's value, the environment's, then the App's `config.yml` (which a variable would override at runtime), what the plugin generates, and the build's defaults. A required variable nothing supplies refuses the deployment, a rollback, a deployment request when it is made and when it is approved, and an upload that would deploy (the release is kept) with `VARIABLES_MISSING` (`400`), naming the variables in `metadata.variables` with the App's `appId` and `environmentId`, so a client can link to both places a value can be set. The plugin generates what the manifest lets it: a secret with `generate` (`SECRETS_KEYS`, `AUTH_SECRET`, `SESSION_SECRET`) once, kept as the App's value (`generated`), instead of writing it into `config.yml`; `APP_PUBLIC_ORIGIN` from the App's URL (one under a path of this application takes its `app.publicOrigin`); `APP_SAMPLE_DATA=true` on a first deployment where the environment has `sampleDataOnFirstDeploy`; and on a first deployment whose administrator password nothing names (the example's `admin123` counts as none), `INITIAL_ADMIN_PASSWORD`. The deployment keeps what it ran with, sealed, and gives it to the driver (`AppDeploymentSpec.env`): the Host hands it to the in-process App's scope, the Docker Host to the container after its own fixed variables. Its log names the variables and their sources, never a value. `AppSummary.variables.changed` tells that a value changed since (one read only on the first start does not count); deploying the release again applies it.
|
|
99
158
|
|
|
100
|
-
The generated first administrator is sealed on the deployment: `GET /apps/:appId/initialAdmin` answers it to a person who may deploy the App (agents and keys are refused, and it is not a CLI command) until someone saves it (`POST …/initialAdmin/dismiss`) or
|
|
159
|
+
The generated first administrator is sealed on the deployment: `GET /apps/:appId/initialAdmin` answers it to a person who may deploy the App (agents and keys are refused, and it is not a CLI command) until someone saves it (`POST …/initialAdmin/dismiss`) or the App is removed. Nothing else is shown again.
|
|
101
160
|
|
|
102
161
|
## Deploying previews
|
|
103
162
|
|
|
@@ -117,3 +176,19 @@ The in-process Host runs App code under preview, so it never holds Docker access
|
|
|
117
176
|
## Deployments that outlive the process
|
|
118
177
|
|
|
119
178
|
A Host records each deployment's outcome under its deployment ID in an operation log that outlives the Host process (`host.controlDir`). At startup the plugin asks each environment's session for the `operation` of every deployment still marked `deploying`, records what the Host reports (one that finished while this application restarted succeeds and becomes the App's current deployment), and only then sends the environment its desired set; one the Host never saw is marked interrupted. A Host child that is told to stop lets a deployment under way finish and record its outcome first. Docker containers keep running while their Host restarts, and the Host adopts them again. Readers of Apps and deployments wait up to five seconds at startup for all of this.
|
|
179
|
+
|
|
180
|
+
## Atomic application-owned App initialization
|
|
181
|
+
|
|
182
|
+
Applications calling `releases.releases.createApp(caller, input, { initialize })` may initialize their own App-linked records in the same database transaction as App creation. The optional callback receives a public `DatabaseConnection` and the created App ID. Write application-owned records through that connection; do not perform network calls, emit events, or write plugin-owned tables in the callback. A callback failure rolls back App creation and its writes, and `app.created` is emitted only after the transaction commits. The existing two-argument call remains supported.
|
|
183
|
+
|
|
184
|
+
## Deployment queue and cancellation
|
|
185
|
+
|
|
186
|
+
A Host executes deployments serially. New deployments replace older queued deployments of the same App; running deployments continue. Queued history and App badges show the number of operations ahead, and deployment logs record queue changes before resolving starts. Queue positions are transient and are not database state.
|
|
187
|
+
|
|
188
|
+
`POST /api/releases/apps/{appId}/deployments/{deploymentId}/cancel` requires the App's deploy permission and is exposed as `deploy cancel <app> <deployment>`. The deployment row menu offers the same operation. Queued cancellation completes immediately; a running deployment reports `cancelling` until its current step and cleanup finish, then `cancelled`. Cancellation closes before switching. Repeated cancellation is safe. Drivers may provide `cancel` and `progress`; a driver without cancellation support returns `CANCELLATION_UNSUPPORTED` once work has been submitted.
|
|
189
|
+
|
|
190
|
+
The `deployment.cancelled` event reports cancellation separately from failure, and an approved request settles as cancelled with its deployment. Applications consuming deployment outcomes must handle this event if they track preview progress. A restart does not replay interrupted queued deployments: their error explicitly asks for redeployment. See [Host isolation measurements](../../app/app-host/docs/deployment-performance.md) for the protocol, costs and verification method.
|
|
191
|
+
|
|
192
|
+
## Diagnostic upload context
|
|
193
|
+
|
|
194
|
+
An assembling application may provide `ReleasesAccess.securityLogContextOf(context)` to attach trusted diagnostic fields from its authenticated request to upload, image registration, promotion and ticket issuance security logs. The callback must not read identity from request headers or upload input. It grants no permissions and changes no release records or log retention settings. A legacy upload ticket's completion log includes `ticketId` so it can be correlated with its issuing log without adding stored audit state.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type DriverSummary, type EnvironmentRecord } from '../../shared/releases.js';
|
|
3
3
|
/**
|
|
4
4
|
* Adding an environment starts by choosing its driver, each with its title and one line on what it does; then its
|
|
5
5
|
* name, the driver's form (or JSON for a driver without one) and the deployment policy. Editing skips the choice: an
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-form.d.ts","sourceRoot":"","sources":["../../../client/components/environment-form.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"environment-form.d.ts","sourceRoot":"","sources":["../../../client/components/environment-form.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAGf,OAAO,EAEL,KAAK,aAAa,EAIlB,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AA8ElC;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,OAAO,EACP,UAAU,EACV,MAAM,EACN,QAAQ,EACR,MAAiB,GAClB,EAAE;IACD,QAAQ,CAAC,WAAW,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAC;IAC3C,QAAQ,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;IAC5B,gFAAgF;IAChF,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;CACrC,GAAG,YAAY,CA6hBf"}
|
|
@@ -8,6 +8,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
8
8
|
import { useTranslation } from '@nocobase/i18n/client';
|
|
9
9
|
import { useState, } from 'react';
|
|
10
10
|
import { ACCESS_NAMESPACE } from '../../shared/access.js';
|
|
11
|
+
import { ENVIRONMENT_PURPOSES, } from '../../shared/releases.js';
|
|
11
12
|
import { decodeDriverForm, encodeDriverForm, } from '../driver-forms/mapping.js';
|
|
12
13
|
import { useConnectionCheck } from '../hooks/use-connection-check.js';
|
|
13
14
|
import { useDriverForms } from '../hooks/use-driver-forms.js';
|
|
@@ -76,6 +77,7 @@ export function EnvironmentForm({ environment, drivers, driverName, onDone, onCa
|
|
|
76
77
|
const [publicUrl, setPublicUrl] = useState(environment?.publicUrl ?? '');
|
|
77
78
|
const [isProtected, setIsProtected] = useState(environment?.protected ?? false);
|
|
78
79
|
const [approvers, setApprovers] = useState(environment?.approvers ?? []);
|
|
80
|
+
const [purpose, setPurpose] = useState(environment?.purpose ?? 'test');
|
|
79
81
|
const [sampleData, setSampleData] = useState(environment?.sampleDataOnFirstDeploy ?? false);
|
|
80
82
|
// Limits and the runtime policy of the Apps created here without their own (empty: none).
|
|
81
83
|
const [appLimits, setAppLimits] = useState(() => ({
|
|
@@ -194,6 +196,7 @@ export function EnvironmentForm({ environment, drivers, driverName, onDone, onCa
|
|
|
194
196
|
defaultIdleStopMinutes: numberOrNull(appLimits.idle),
|
|
195
197
|
defaultDormantAfterHours: numberOrNull(appLimits.dormant),
|
|
196
198
|
sampleDataOnFirstDeploy: sampleData,
|
|
199
|
+
purpose,
|
|
197
200
|
...(runsImages ? { registryId } : {}),
|
|
198
201
|
};
|
|
199
202
|
if (environment)
|
|
@@ -228,10 +231,14 @@ export function EnvironmentForm({ environment, drivers, driverName, onDone, onCa
|
|
|
228
231
|
? t('ui.environments.addWith', {
|
|
229
232
|
driver: driver ? driverName(driver) : '',
|
|
230
233
|
})
|
|
231
|
-
: t('ui.environments.add') }), _jsx(DialogDescription, { children: t('ui.environments.formDescription') })] })) : null, _jsx("form", { id: 'rel-environment', className: inDialog ? DIALOG_BODY_CLASS : 'min-w-0', onSubmit: (event) => void submit(event), children: _jsxs(FieldGroup, { children: [_jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.basics') }), _jsxs("div", { className: 'grid gap-4 sm:grid-cols-2', children: [_jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: 'rel-env-name', children: t('ui.environments.name') }), _jsx(Input, { id: 'rel-env-name', value: name, required: true, autoFocus: true, placeholder: t('ui.environments.namePlaceholder'), onChange: (event) => setName(event.target.value) })] }), _jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: 'rel-env-id', children: t('ui.environments.id') }), _jsx(Input, { id: 'rel-env-id', value: id, required: true, className: 'font-mono', placeholder: 'staging', disabled: Boolean(environment), onChange: (event) => setId(event.target.value) }), _jsx(FieldDescription, { children: t('ui.environments.idHint') })] }),
|
|
234
|
+
: t('ui.environments.add') }), _jsx(DialogDescription, { children: t('ui.environments.formDescription') })] })) : null, _jsx("form", { id: 'rel-environment', className: inDialog ? DIALOG_BODY_CLASS : 'min-w-0', onSubmit: (event) => void submit(event), children: _jsxs(FieldGroup, { children: [_jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.basics') }), _jsxs("div", { className: 'grid gap-4 sm:grid-cols-2', children: [_jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: 'rel-env-name', children: t('ui.environments.name') }), _jsx(Input, { id: 'rel-env-name', value: name, required: true, autoFocus: true, placeholder: t('ui.environments.namePlaceholder'), onChange: (event) => setName(event.target.value) })] }), _jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: 'rel-env-id', children: t('ui.environments.id') }), _jsx(Input, { id: 'rel-env-id', value: id, required: true, className: 'font-mono', placeholder: 'staging', disabled: Boolean(environment), onChange: (event) => setId(event.target.value) }), _jsx(FieldDescription, { children: t('ui.environments.idHint') })] }), _jsxs(Field, { className: 'sm:col-span-2', children: [_jsx(FieldLabel, { id: 'rel-env-purpose-label', children: t('ui.environments.purpose') }), _jsx(RadioGroup, { value: purpose, onValueChange: (next) => {
|
|
235
|
+
const found = ENVIRONMENT_PURPOSES.find((item) => item === next);
|
|
236
|
+
if (found)
|
|
237
|
+
setPurpose(found);
|
|
238
|
+
}, "aria-labelledby": 'rel-env-purpose-label', className: 'flex flex-wrap gap-4', "data-slot": 'environment-purpose', children: ENVIRONMENT_PURPOSES.map((item) => (_jsxs(Field, { orientation: 'horizontal', className: 'w-auto', children: [_jsx(RadioGroupItem, { id: `rel-env-purpose-${item}`, value: item }), _jsx(FieldLabel, { htmlFor: `rel-env-purpose-${item}`, className: 'font-normal', children: t(`ui.environments.purposes.${item}`) })] }, item))) }), _jsx(FieldDescription, { children: t('ui.environments.purposeHint') })] }), drivers.length > 1 ? (_jsxs(Field, { children: [_jsx(FieldLabel, { children: t('ui.environments.driver') }), _jsxs("div", { className: 'flex min-h-8 items-center gap-2 text-sm', children: [_jsx("span", { className: 'font-medium', children: driver ? driverName(driver) : '—' }), !environment ? (_jsx(Button, { type: 'button', size: 'sm', variant: 'link', className: 'px-0', onClick: () => setStep('driver'), children: t('ui.environments.changeDriver') })) : null] })] })) : null, showPublicUrl ? (_jsxs(Field, { children: [_jsx(FieldLabel, { htmlFor: 'rel-env-url', children: t('ui.environments.publicUrl') }), _jsx(Input, { id: 'rel-env-url', value: publicUrl, className: 'font-mono', placeholder: 'https://preview.example.com/{appId}/', onChange: (event) => setPublicUrl(event.target.value) })] })) : null] })] }), form && driverState ? (_jsx(DriverSettings, { part: 'main', form: form, state: driverState, onChange: (next) => {
|
|
232
239
|
setDriverState(next);
|
|
233
240
|
connection.reset();
|
|
234
|
-
}, secretKeys: environment?.secretKeys ?? [], facts: summary?.facts ?? null, errors: fieldErrors, variants: variants })) : (_jsx(JsonSettings, { config: config, onConfig: setConfig, secret: secret, onSecret: setSecret, hasSecret: environment?.hasSecret ?? false, invalid: invalid })), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.policy') }), _jsx(FieldDescription, { children: t('ui.environments.policyDescription') }), _jsxs(FieldGroup, { className: 'gap-3', children: [check('rel-env-protected', t('ui.environments.protected'), t('ui.environments.protectedHint'), isProtected, setIsProtected), isProtected ? (_jsxs(Field, { className: 'pl-6', children: [_jsx(FieldLabel, { htmlFor: 'rel-env-approvers', children: t('ui.environments.approvers') }), _jsx(PeoplePicker, { id: 'rel-env-approvers', value: approvers, placeholder: t('ui.environments.approversPlaceholder'), onChange: setApprovers }), _jsx(FieldDescription, { children: t('ui.environments.approversHint') })] })) : null] })] }), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.appDefaults') }), _jsx(FieldDescription, { children: t('ui.environments.appDefaultsDescription') }), _jsx("div", { className: 'grid gap-3 sm:grid-cols-3', children: [
|
|
241
|
+
}, secretKeys: environment?.secretKeys ?? [], facts: summary?.facts ?? null, errors: fieldErrors, variants: variants })) : (_jsx(JsonSettings, { config: config, onConfig: setConfig, secret: secret, onSecret: setSecret, hasSecret: environment?.hasSecret ?? false, invalid: invalid })), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.policy') }), _jsx(FieldDescription, { children: t('ui.environments.policyDescription') }), _jsxs(FieldGroup, { className: 'gap-3', children: [check('rel-env-protected', t('ui.environments.protected'), t('ui.environments.protectedHint'), isProtected, setIsProtected), isProtected ? (_jsxs(Field, { className: 'pl-6', children: [_jsx(FieldLabel, { htmlFor: 'rel-env-approvers', children: t('ui.environments.approvers') }), _jsx(PeoplePicker, { id: 'rel-env-approvers', value: approvers, placeholder: t('ui.environments.approversPlaceholder'), onChange: setApprovers }), _jsx(FieldDescription, { children: t('ui.environments.approversHint') })] })) : null] })] }), _jsxs(FieldSet, { children: [_jsx(FieldLegend, { children: t('ui.environments.appDefaults') }), _jsx(FieldDescription, { children: t('ui.environments.appDefaultsDescription') }), _jsx("div", { className: 'grid items-end gap-3 sm:grid-cols-3', children: [
|
|
235
242
|
['maxApps', 'rel-env-max-apps', 'ui.environments.maxApps'],
|
|
236
243
|
['idle', 'rel-env-idle', 'ui.environments.defaultIdle'],
|
|
237
244
|
[
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"environment-form.js","sourceRoot":"","sources":["../../../client/components/environment-form.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,QAAQ,GAIT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAQ1D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GAEjB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,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C1B,EAAE,EAAE,gBAAgB;4CACpB,IAAI,EAAE,IAAI,CAAC,IAAI;yCAChB,CAAC,GACD,IACM,IACT,IArBH,IAAI,CAAC,IAAI,CAsBH,CACd,CAAC;QACJ,CAAC,CAAC,GACS,CACd,CAAC;AACJ,CAAC;AAED,uDAAuD;AACvD,SAAS,UAAU,CAAC,KAAgC;IAClD,OAAO,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,6GAA6G;AAC7G,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC"}
|
|
1
|
+
{"version":3,"file":"environment-form.js","sourceRoot":"","sources":["../../../client/components/environment-form.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EACL,QAAQ,GAIT,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EACL,oBAAoB,GAOrB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,EAChB,gBAAgB,GAEjB,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,0BAA0B,CA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C;AAED,6GAA6G;AAC7G,SAAS,YAAY,CAAC,KAAa;IACjC,OAAO,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../client/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,KAAK,GACN,EAAE,eAAe,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../../client/components/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,yFAAyF;IACzF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;CAC9B;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,KAAK,GACN,EAAE,eAAe,GAAG,YAAY,CAkBhC"}
|
|
@@ -5,6 +5,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
* actions vertically centred on the right with the one primary action last.
|
|
6
6
|
*/
|
|
7
7
|
export function PageHeader({ actions, description, title, }) {
|
|
8
|
-
return (_jsxs("header", { className: 'flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between', children: [_jsxs("div", { className: 'min-w-0', children: [_jsx("h1", { className: 'font-heading text-2xl font-semibold tracking-tight', children: title }), description ? (_jsx("p", { className: 'mt-1.5
|
|
8
|
+
return (_jsxs("header", { className: 'flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between', children: [_jsxs("div", { className: 'min-w-0 flex-1', children: [_jsx("h1", { className: 'font-heading text-2xl font-semibold tracking-tight', children: title }), description ? (_jsx("p", { className: 'mt-1.5 text-sm text-muted-foreground', children: description })) : null] }), actions ? (_jsx("div", { className: 'flex flex-wrap items-center gap-2 sm:shrink-0 sm:flex-nowrap', children: actions })) : null] }));
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=page-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../../client/components/page-header.tsx"],"names":[],"mappings":";AASA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,KAAK,GACW;IAChB,OAAO,CACL,kBAAQ,SAAS,EAAC,oEAAoE,aACpF,eAAK,SAAS,EAAC,
|
|
1
|
+
{"version":3,"file":"page-header.js","sourceRoot":"","sources":["../../../client/components/page-header.tsx"],"names":[],"mappings":";AASA;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,OAAO,EACP,WAAW,EACX,KAAK,GACW;IAChB,OAAO,CACL,kBAAQ,SAAS,EAAC,oEAAoE,aACpF,eAAK,SAAS,EAAC,gBAAgB,aAC7B,aAAI,SAAS,EAAC,oDAAoD,YAC/D,KAAK,GACH,EACJ,WAAW,CAAC,CAAC,CAAC,CACb,YAAG,SAAS,EAAC,sCAAsC,YAAE,WAAW,GAAK,CACtE,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,OAAO,CAAC,CAAC,CAAC,CACT,cAAK,SAAS,EAAC,8DAA8D,YAC1E,OAAO,GACJ,CACP,CAAC,CAAC,CAAC,IAAI,IACD,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-badges.d.ts","sourceRoot":"","sources":["../../../client/components/release-badges.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"release-badges.d.ts","sourceRoot":"","sources":["../../../client/components/release-badges.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AA0BnE,4GAA4G;AAC5G,wBAAgB,aAAa,CAAC,EAC5B,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,OAAO,EAAE,UAAU,CAAC;CAC9B,GAAG,YAAY,CAsBf;AAkBD,sFAAsF;AACtF,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,OAAO,GACR,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,GAAG,YAAY,CAOf;AAED,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EAAE,WAAmB,GAC/B,EAAE;IACD,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,YAAY,GAAG,IAAI,CAItB;AAED,kHAAkH;AAClH,wBAAgB,eAAe,CAAC,EAC9B,IAAI,EACJ,SAAS,EAAE,WAAmB,GAC/B,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B,GAAG,YAAY,CA0Bf;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EACzB,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CACnD,GAAG,YAAY,CA0Bf;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,YAAY,CAmCf;AAED,kHAAkH;AAClH,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,GAAG,YAAY,GAAG,IAAI,CAWtB"}
|
|
@@ -16,9 +16,14 @@ const APP_STATE_TONE = {
|
|
|
16
16
|
pending: 'blue',
|
|
17
17
|
starting: 'blue',
|
|
18
18
|
deploying: 'blue',
|
|
19
|
+
queued: 'grey',
|
|
20
|
+
cancelling: 'amber',
|
|
19
21
|
stopped: 'grey',
|
|
20
22
|
stoppedOnDemand: 'grey',
|
|
21
23
|
dormant: 'violet',
|
|
24
|
+
waitingCapacity: 'amber',
|
|
25
|
+
waitingMemory: 'amber',
|
|
26
|
+
waitingRecycle: 'amber',
|
|
22
27
|
failed: 'red',
|
|
23
28
|
unknown: 'grey',
|
|
24
29
|
};
|
|
@@ -28,10 +33,17 @@ export function AppStateBadge({ summary, }) {
|
|
|
28
33
|
const state = appStateOf(summary);
|
|
29
34
|
return (_jsx(Tag, { tone: APP_STATE_TONE[state] ?? 'grey', dot: true, title: summary.runtime.error
|
|
30
35
|
? messageText(t, summary.runtime.error)
|
|
31
|
-
: undefined, children:
|
|
36
|
+
: undefined, children: state === 'queued' && summary.pendingDeployment?.queueAhead != null
|
|
37
|
+
? t('ui.deployments.queueAhead', {
|
|
38
|
+
ahead: summary.pendingDeployment.queueAhead,
|
|
39
|
+
})
|
|
40
|
+
: ['queued', 'cancelling'].includes(state)
|
|
41
|
+
? t(`ui.deployments.statuses.${state}`)
|
|
42
|
+
: t(`ui.state.${state}`) }));
|
|
32
43
|
}
|
|
33
44
|
const STATUS_TONE = {
|
|
34
45
|
queued: 'grey',
|
|
46
|
+
cancelling: 'amber',
|
|
35
47
|
deploying: 'blue',
|
|
36
48
|
succeeded: 'green',
|
|
37
49
|
failed: 'red',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-badges.js","sourceRoot":"","sources":["../../../client/components/release-badges.tsx"],"names":[],"mappings":";AAAA,yGAAyG;AACzG,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAqB,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAa,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1E,MAAM,cAAc,GAAmC;IACrD,OAAO,EAAE,OAAO;IAChB,OAAO,EAAE,MAAM;IACf,QAAQ,EAAE,MAAM;IAChB,SAAS,EAAE,MAAM;IACjB,OAAO,EAAE,MAAM;IACf,eAAe,EAAE,MAAM;IACvB,OAAO,EAAE,QAAQ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Aa,YAEvB,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,GAAI,GACpC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -14,8 +14,11 @@ export interface RouteOverlayProps {
|
|
|
14
14
|
/**
|
|
15
15
|
* The shared implementation of `RouteDialog` and `RouteDrawer`: a modal that is open for as long as its route matches,
|
|
16
16
|
* and closes by navigating away from it. Route registration stays with the application.
|
|
17
|
+
*
|
|
18
|
+
* On a route that declares a `dialog` or `drawer` presentation the application has already opened the panel; this
|
|
19
|
+
* component then configures that panel through the shared host context instead of opening a second one.
|
|
17
20
|
*/
|
|
18
|
-
export declare function RouteOverlay(
|
|
21
|
+
export declare function RouteOverlay(props: RouteOverlayProps & {
|
|
19
22
|
readonly drawer?: boolean;
|
|
20
23
|
}): ReactElement;
|
|
21
24
|
//# sourceMappingURL=route-overlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-overlay.d.ts","sourceRoot":"","sources":["../../../client/components/route-overlay.tsx"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4B,KAAK,EAAE,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"route-overlay.d.ts","sourceRoot":"","sources":["../../../client/components/route-overlay.tsx"],"names":[],"mappings":"AAGA,OAAO,EAQL,KAAK,YAAY,EACjB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AACf,OAAO,EAA4B,KAAK,EAAE,EAAE,MAAM,cAAc,CAAC;AAkBjE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,CAAC;IAC5B,gGAAgG;IAChG,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;IACtB,+GAA+G;IAC/G,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AASD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAC1B,KAAK,EAAE,iBAAiB,GAAG;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GACvD,YAAY,CAOd"}
|
|
@@ -6,8 +6,8 @@ import { createContext, useCallback, useContext, useLayoutEffect, useMemo, useRe
|
|
|
6
6
|
import { useLocation, useNavigate } from 'react-router';
|
|
7
7
|
import { Button } from './ui/button.js';
|
|
8
8
|
import { Dialog, DialogClose, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, } from './ui/dialog.js';
|
|
9
|
+
import { RouteOverlayContext, RouteOverlayHostContext, } from '@nocobase/app-client/route-containers';
|
|
9
10
|
import { cn } from 'cn';
|
|
10
|
-
import { RouteOverlayContext } from './use-route-overlay.js';
|
|
11
11
|
// Lets an overlay rendered through another overlay's outlet return focus into
|
|
12
12
|
// the enclosing panel. Two overlays reached by one URL mount in the same
|
|
13
13
|
// commit, so the nested one never observes the parent panel taking focus and
|
|
@@ -16,11 +16,37 @@ const ParentPopupContext = createContext(null);
|
|
|
16
16
|
/**
|
|
17
17
|
* The shared implementation of `RouteDialog` and `RouteDrawer`: a modal that is open for as long as its route matches,
|
|
18
18
|
* and closes by navigating away from it. Route registration stays with the application.
|
|
19
|
+
*
|
|
20
|
+
* On a route that declares a `dialog` or `drawer` presentation the application has already opened the panel; this
|
|
21
|
+
* component then configures that panel through the shared host context instead of opening a second one.
|
|
19
22
|
*/
|
|
20
|
-
export function RouteOverlay(
|
|
23
|
+
export function RouteOverlay(props) {
|
|
24
|
+
const host = useContext(RouteOverlayHostContext);
|
|
25
|
+
return host ? (_jsx(HostedRouteOverlay, { host: host, ...props })) : (_jsx(RouteOverlayFrame, { ...props }));
|
|
26
|
+
}
|
|
27
|
+
function HostedRouteOverlay({ host, children, drawer: _drawer, ...config }) {
|
|
28
|
+
// Runs after every render so the host shows this render's footer and guard. The host drops the configuration
|
|
29
|
+
// itself once the page is gone, so there is no cleanup that a recheck hiding the page could run.
|
|
30
|
+
useLayoutEffect(() => {
|
|
31
|
+
host.configure(config);
|
|
32
|
+
});
|
|
33
|
+
return (_jsx(RouteOverlayHostContext.Provider, { value: null, children: children }));
|
|
34
|
+
}
|
|
35
|
+
function RouteOverlayFrame({ title, description, children, footer, closeTo, beforeClose, className, drawer = false, }) {
|
|
21
36
|
const { t } = useTranslation();
|
|
22
37
|
const parentPopup = useContext(ParentPopupContext);
|
|
23
38
|
const popupRef = useRef(null);
|
|
39
|
+
const [portal, setPortal] = useState(null);
|
|
40
|
+
// A parent route's Activity can stop at its first DOM element, while this portal lives outside that element.
|
|
41
|
+
// Base UI creates the portal after mount, so track the actual node before connecting its visibility lifecycle.
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
if (!portal)
|
|
44
|
+
return;
|
|
45
|
+
portal.style.removeProperty('display');
|
|
46
|
+
return () => {
|
|
47
|
+
portal.style.display = 'none';
|
|
48
|
+
};
|
|
49
|
+
}, [portal]);
|
|
24
50
|
const previousFocusRef = useRef(null);
|
|
25
51
|
useLayoutEffect(() => {
|
|
26
52
|
previousFocusRef.current =
|
|
@@ -41,6 +67,7 @@ export function RouteOverlay({ title, description, children, footer, closeTo, be
|
|
|
41
67
|
pendingRef.current = null;
|
|
42
68
|
return () => {
|
|
43
69
|
generationRef.current += 1;
|
|
70
|
+
setClosingLocation(null);
|
|
44
71
|
};
|
|
45
72
|
}, [location]);
|
|
46
73
|
const close = useCallback(() => {
|
|
@@ -50,6 +77,8 @@ export function RouteOverlay({ title, description, children, footer, closeTo, be
|
|
|
50
77
|
setClosingLocation(location);
|
|
51
78
|
const request = Promise.resolve()
|
|
52
79
|
.then(async () => {
|
|
80
|
+
if (generationRef.current !== requestGeneration)
|
|
81
|
+
return;
|
|
53
82
|
const allowed = beforeClose ? await beforeClose() : true;
|
|
54
83
|
if (allowed && generationRef.current === requestGeneration) {
|
|
55
84
|
await navigate(closeTo ?? { pathname: '..', search: location.search, hash: '' }, { relative: 'route', replace: true });
|
|
@@ -70,7 +99,7 @@ export function RouteOverlay({ title, description, children, footer, closeTo, be
|
|
|
70
99
|
void close().catch((error) => {
|
|
71
100
|
console.error('Failed to close route overlay', error);
|
|
72
101
|
});
|
|
73
|
-
}, children: _jsxs(DialogPortal, { children: [_jsx(DialogOverlay, { forceRender: true }), _jsxs(DialogPrimitive.Popup, { ref: popupRef, finalFocus: () => {
|
|
102
|
+
}, children: _jsxs(DialogPortal, { ref: setPortal, children: [_jsx(DialogOverlay, { forceRender: true }), _jsxs(DialogPrimitive.Popup, { ref: popupRef, finalFocus: () => {
|
|
74
103
|
const previous = previousFocusRef.current;
|
|
75
104
|
if (parentPopup?.current) {
|
|
76
105
|
return previous?.isConnected &&
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-overlay.js","sourceRoot":"","sources":["../../../client/components/route-overlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,WAAW,EAAW,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"route-overlay.js","sourceRoot":"","sources":["../../../client/components/route-overlay.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,eAAe,EACf,OAAO,EACP,MAAM,EACN,QAAQ,GAIT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,WAAW,EAAE,WAAW,EAAW,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EACL,MAAM,EACN,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,WAAW,GACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,mBAAmB,EACnB,uBAAuB,GAExB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,IAAI,CAAC;AAcxB,8EAA8E;AAC9E,yEAAyE;AACzE,6EAA6E;AAC7E,gDAAgD;AAChD,MAAM,kBAAkB,GACtB,aAAa,CAA0C,IAAI,CAAC,CAAC;AAE/D;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAC1B,KAAwD;IAExD,MAAM,IAAI,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IACjD,OAAO,IAAI,CAAC,CAAC,CAAC,CACZ,KAAC,kBAAkB,IAAC,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAC9C,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,OAAK,KAAK,GAAI,CACjC,CAAC;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,MAAM,EAAE,OAAO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