@supatype/cli 0.9.0 → 0.9.1
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 +360 -0
- package/dist/app/proxy-dev-app.d.ts +13 -3
- package/dist/app/proxy-dev-app.d.ts.map +1 -1
- package/dist/app/proxy-dev-app.js +58 -62
- package/dist/app/proxy-dev-app.js.map +1 -1
- package/dist/auth-providers.d.ts +5 -4
- package/dist/auth-providers.d.ts.map +1 -1
- package/dist/auth-providers.js +3 -12
- package/dist/auth-providers.js.map +1 -1
- package/dist/build-spawn.d.ts +35 -0
- package/dist/build-spawn.d.ts.map +1 -0
- package/dist/build-spawn.js +75 -0
- package/dist/build-spawn.js.map +1 -0
- package/dist/cli-version-embedded.js +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -1
- package/dist/cloud-credentials.d.ts.map +1 -1
- package/dist/cloud-credentials.js +3 -1
- package/dist/cloud-credentials.js.map +1 -1
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +6 -4
- package/dist/commands/admin.js.map +1 -1
- package/dist/commands/adopt.js +1 -1
- package/dist/commands/adopt.js.map +1 -1
- package/dist/commands/build.d.ts +29 -0
- package/dist/commands/build.d.ts.map +1 -0
- package/dist/commands/build.js +69 -0
- package/dist/commands/build.js.map +1 -0
- package/dist/commands/cache.d.ts.map +1 -1
- package/dist/commands/cache.js +5 -0
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/db.d.ts.map +1 -1
- package/dist/commands/db.js +46 -23
- package/dist/commands/db.js.map +1 -1
- package/dist/commands/deploy.d.ts +14 -0
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/deploy.js +67 -52
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +23 -19
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/diff.d.ts +3 -0
- package/dist/commands/diff.d.ts.map +1 -1
- package/dist/commands/diff.js +28 -34
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +1 -1
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/functions.d.ts.map +1 -1
- package/dist/commands/functions.js +21 -16
- package/dist/commands/functions.js.map +1 -1
- package/dist/commands/init.d.ts +10 -3
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +127 -57
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/internal.d.ts.map +1 -1
- package/dist/commands/internal.js +27 -7
- package/dist/commands/internal.js.map +1 -1
- package/dist/commands/introspect.d.ts.map +1 -1
- package/dist/commands/introspect.js +3 -0
- package/dist/commands/introspect.js.map +1 -1
- package/dist/commands/keys-print.d.ts +20 -0
- package/dist/commands/keys-print.d.ts.map +1 -0
- package/dist/commands/keys-print.js +47 -0
- package/dist/commands/keys-print.js.map +1 -0
- package/dist/commands/keys.d.ts.map +1 -1
- package/dist/commands/keys.js +16 -12
- package/dist/commands/keys.js.map +1 -1
- package/dist/commands/link-helpers.d.ts.map +1 -1
- package/dist/commands/link-helpers.js +27 -5
- package/dist/commands/link-helpers.js.map +1 -1
- package/dist/commands/migrate.d.ts +5 -2
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +34 -36
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/pull.d.ts.map +1 -1
- package/dist/commands/pull.js +6 -5
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +27 -18
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/rename.js +1 -1
- package/dist/commands/rename.js.map +1 -1
- package/dist/commands/seed.d.ts +2 -11
- package/dist/commands/seed.d.ts.map +1 -1
- package/dist/commands/seed.js +11 -38
- package/dist/commands/seed.js.map +1 -1
- package/dist/commands/self-host.d.ts.map +1 -1
- package/dist/commands/self-host.js +74 -12
- package/dist/commands/self-host.js.map +1 -1
- package/dist/commands/sso.d.ts +26 -0
- package/dist/commands/sso.d.ts.map +1 -0
- package/dist/commands/sso.js +362 -0
- package/dist/commands/sso.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +25 -8
- package/dist/commands/status.js.map +1 -1
- package/dist/component-launch.d.ts.map +1 -1
- package/dist/component-launch.js +2 -1
- package/dist/component-launch.js.map +1 -1
- package/dist/compose-db-roles.d.ts +4 -4
- package/dist/compose-db-roles.d.ts.map +1 -1
- package/dist/compose-db-roles.js +11 -10
- package/dist/compose-db-roles.js.map +1 -1
- package/dist/compose-engine-run.d.ts +9 -2
- package/dist/compose-engine-run.d.ts.map +1 -1
- package/dist/compose-engine-run.js +30 -13
- package/dist/compose-engine-run.js.map +1 -1
- package/dist/compose-services.d.ts +18 -0
- package/dist/compose-services.d.ts.map +1 -1
- package/dist/compose-services.js +47 -22
- package/dist/compose-services.js.map +1 -1
- package/dist/config-mailer-env.d.ts +27 -0
- package/dist/config-mailer-env.d.ts.map +1 -0
- package/dist/config-mailer-env.js +47 -0
- package/dist/config-mailer-env.js.map +1 -0
- package/dist/db-rows.d.ts +3 -2
- package/dist/db-rows.d.ts.map +1 -1
- package/dist/db-rows.js +19 -4
- package/dist/db-rows.js.map +1 -1
- package/dist/dev-compose.d.ts +62 -7
- package/dist/dev-compose.d.ts.map +1 -1
- package/dist/dev-compose.js +202 -151
- package/dist/dev-compose.js.map +1 -1
- package/dist/dev-ports.d.ts +6 -4
- package/dist/dev-ports.d.ts.map +1 -1
- package/dist/dev-ports.js +80 -46
- package/dist/dev-ports.js.map +1 -1
- package/dist/dev-schema-watch.d.ts +8 -2
- package/dist/dev-schema-watch.d.ts.map +1 -1
- package/dist/dev-schema-watch.js +24 -13
- package/dist/dev-schema-watch.js.map +1 -1
- package/dist/dev-session.d.ts +13 -2
- package/dist/dev-session.d.ts.map +1 -1
- package/dist/dev-session.js +22 -5
- package/dist/dev-session.js.map +1 -1
- package/dist/dev-shutdown.d.ts.map +1 -1
- package/dist/dev-shutdown.js +4 -1
- package/dist/dev-shutdown.js.map +1 -1
- package/dist/diff-access.d.ts +10 -0
- package/dist/diff-access.d.ts.map +1 -0
- package/dist/diff-access.js +69 -0
- package/dist/diff-access.js.map +1 -0
- package/dist/diff-output.d.ts.map +1 -1
- package/dist/diff-output.js +2 -1
- package/dist/diff-output.js.map +1 -1
- package/dist/docker-exec.d.ts.map +1 -1
- package/dist/docker-exec.js +4 -4
- package/dist/docker-exec.js.map +1 -1
- package/dist/docker-runtime.d.ts +8 -2
- package/dist/docker-runtime.d.ts.map +1 -1
- package/dist/docker-runtime.js +64 -23
- package/dist/docker-runtime.js.map +1 -1
- package/dist/engine-answers.d.ts +2 -1
- package/dist/engine-answers.d.ts.map +1 -1
- package/dist/engine-answers.js +11 -0
- package/dist/engine-answers.js.map +1 -1
- package/dist/engine-client.d.ts +20 -0
- package/dist/engine-client.d.ts.map +1 -1
- package/dist/engine-client.js +9 -8
- package/dist/engine-client.js.map +1 -1
- package/dist/engine-floor.d.ts +3 -2
- package/dist/engine-floor.d.ts.map +1 -1
- package/dist/engine-floor.js +2 -2
- package/dist/engine-floor.js.map +1 -1
- package/dist/engine-push-output.d.ts +8 -1
- package/dist/engine-push-output.d.ts.map +1 -1
- package/dist/engine-push-output.js +8 -1
- package/dist/engine-push-output.js.map +1 -1
- package/dist/env-file.d.ts +5 -0
- package/dist/env-file.d.ts.map +1 -1
- package/dist/env-file.js +51 -33
- package/dist/env-file.js.map +1 -1
- package/dist/env-lines.d.ts +3 -2
- package/dist/env-lines.d.ts.map +1 -1
- package/dist/env-lines.js +5 -2
- package/dist/env-lines.js.map +1 -1
- package/dist/env-value.d.ts +15 -0
- package/dist/env-value.d.ts.map +1 -0
- package/dist/env-value.js +34 -0
- package/dist/env-value.js.map +1 -0
- package/dist/error-message.d.ts +20 -0
- package/dist/error-message.d.ts.map +1 -1
- package/dist/error-message.js +42 -0
- package/dist/error-message.js.map +1 -1
- package/dist/frontend-env.d.ts +10 -2
- package/dist/frontend-env.d.ts.map +1 -1
- package/dist/frontend-env.js +24 -4
- package/dist/frontend-env.js.map +1 -1
- package/dist/frontend-values-linked.d.ts +22 -0
- package/dist/frontend-values-linked.d.ts.map +1 -0
- package/dist/frontend-values-linked.js +143 -0
- package/dist/frontend-values-linked.js.map +1 -0
- package/dist/frontend-values.d.ts +90 -0
- package/dist/frontend-values.d.ts.map +1 -0
- package/dist/frontend-values.js +208 -0
- package/dist/frontend-values.js.map +1 -0
- package/dist/functions-env-local.d.ts +13 -0
- package/dist/functions-env-local.d.ts.map +1 -0
- package/dist/functions-env-local.js +20 -0
- package/dist/functions-env-local.js.map +1 -0
- package/dist/generated/release-images.d.ts +4 -4
- package/dist/generated/release-images.js +2 -2
- package/dist/generated/release-images.js.map +1 -1
- package/dist/generated/typescript-libs.d.ts +4 -0
- package/dist/generated/typescript-libs.d.ts.map +1 -0
- package/dist/generated/typescript-libs.js +64 -0
- package/dist/generated/typescript-libs.js.map +1 -0
- package/dist/host-database.d.ts +10 -10
- package/dist/host-database.d.ts.map +1 -1
- package/dist/host-database.js +18 -15
- package/dist/host-database.js.map +1 -1
- package/dist/init-answers.d.ts +18 -0
- package/dist/init-answers.d.ts.map +1 -0
- package/dist/init-answers.js +46 -0
- package/dist/init-answers.js.map +1 -0
- package/dist/init-next-runtime-env.d.ts +30 -0
- package/dist/init-next-runtime-env.d.ts.map +1 -0
- package/dist/init-next-runtime-env.js +180 -0
- package/dist/init-next-runtime-env.js.map +1 -0
- package/dist/jwt.d.ts +5 -0
- package/dist/jwt.d.ts.map +1 -1
- package/dist/jwt.js +16 -0
- package/dist/jwt.js.map +1 -1
- package/dist/local-secrets.d.ts +22 -0
- package/dist/local-secrets.d.ts.map +1 -1
- package/dist/local-secrets.js +36 -0
- package/dist/local-secrets.js.map +1 -1
- package/dist/local-stack-guard.d.ts +37 -0
- package/dist/local-stack-guard.d.ts.map +1 -0
- package/dist/local-stack-guard.js +84 -0
- package/dist/local-stack-guard.js.map +1 -0
- package/dist/mailer-env.d.ts +4 -0
- package/dist/mailer-env.d.ts.map +1 -1
- package/dist/mailer-env.js +12 -1
- package/dist/mailer-env.js.map +1 -1
- package/dist/node-executable.d.ts +6 -0
- package/dist/node-executable.d.ts.map +1 -0
- package/dist/node-executable.js +43 -0
- package/dist/node-executable.js.map +1 -0
- package/dist/parent-watch.d.ts +8 -3
- package/dist/parent-watch.d.ts.map +1 -1
- package/dist/parent-watch.js +8 -3
- package/dist/parent-watch.js.map +1 -1
- package/dist/postgres-ctl.d.ts +2 -0
- package/dist/postgres-ctl.d.ts.map +1 -1
- package/dist/postgres-ctl.js +11 -5
- package/dist/postgres-ctl.js.map +1 -1
- package/dist/process-manager.d.ts +37 -5
- package/dist/process-manager.d.ts.map +1 -1
- package/dist/process-manager.js +127 -65
- package/dist/process-manager.js.map +1 -1
- package/dist/project-config.d.ts +27 -0
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +18 -0
- package/dist/project-config.js.map +1 -1
- package/dist/push-audit.d.ts +4 -1
- package/dist/push-audit.d.ts.map +1 -1
- package/dist/push-audit.js +33 -4
- package/dist/push-audit.js.map +1 -1
- package/dist/recorded-field-masking-tier.d.ts +2 -2
- package/dist/recorded-field-masking-tier.d.ts.map +1 -1
- package/dist/recorded-field-masking-tier.js +6 -6
- package/dist/recorded-field-masking-tier.js.map +1 -1
- package/dist/rename-journal.d.ts +1 -1
- package/dist/rename-journal.d.ts.map +1 -1
- package/dist/resolve-api-url.d.ts +2 -0
- package/dist/resolve-api-url.d.ts.map +1 -1
- package/dist/resolve-api-url.js +5 -1
- package/dist/resolve-api-url.js.map +1 -1
- package/dist/resolve-target.d.ts +16 -1
- package/dist/resolve-target.d.ts.map +1 -1
- package/dist/resolve-target.js +20 -11
- package/dist/resolve-target.js.map +1 -1
- package/dist/run-captured.d.ts +31 -0
- package/dist/run-captured.d.ts.map +1 -0
- package/dist/run-captured.js +36 -0
- package/dist/run-captured.js.map +1 -0
- package/dist/saml-config.d.ts +53 -0
- package/dist/saml-config.d.ts.map +1 -0
- package/dist/saml-config.js +177 -0
- package/dist/saml-config.js.map +1 -0
- package/dist/saml-key-rotation.d.ts +5 -0
- package/dist/saml-key-rotation.d.ts.map +1 -0
- package/dist/saml-key-rotation.js +26 -0
- package/dist/saml-key-rotation.js.map +1 -0
- package/dist/saml-sp-certificate.d.ts +15 -0
- package/dist/saml-sp-certificate.d.ts.map +1 -0
- package/dist/saml-sp-certificate.js +34 -0
- package/dist/saml-sp-certificate.js.map +1 -0
- package/dist/schema-reset.d.ts +41 -0
- package/dist/schema-reset.d.ts.map +1 -0
- package/dist/schema-reset.js +98 -0
- package/dist/schema-reset.js.map +1 -0
- package/dist/seed-child.d.ts +25 -0
- package/dist/seed-child.d.ts.map +1 -0
- package/dist/seed-child.js +61 -0
- package/dist/seed-child.js.map +1 -0
- package/dist/seed-runner.d.ts +3 -5
- package/dist/seed-runner.d.ts.map +1 -1
- package/dist/seed-runner.js +20 -42
- package/dist/seed-runner.js.map +1 -1
- package/dist/self-host-compose.d.ts +9 -1
- package/dist/self-host-compose.d.ts.map +1 -1
- package/dist/self-host-compose.js +47 -14
- package/dist/self-host-compose.js.map +1 -1
- package/dist/serial-runs.d.ts +7 -0
- package/dist/serial-runs.d.ts.map +1 -0
- package/dist/serial-runs.js +29 -0
- package/dist/serial-runs.js.map +1 -0
- package/dist/sso-admin.d.ts +114 -0
- package/dist/sso-admin.d.ts.map +1 -0
- package/dist/sso-admin.js +256 -0
- package/dist/sso-admin.js.map +1 -0
- package/dist/stack-engine.d.ts +28 -0
- package/dist/stack-engine.d.ts.map +1 -0
- package/dist/stack-engine.js +59 -0
- package/dist/stack-engine.js.map +1 -0
- package/dist/stack-exit-watch.d.ts +37 -0
- package/dist/stack-exit-watch.d.ts.map +1 -0
- package/dist/stack-exit-watch.js +70 -0
- package/dist/stack-exit-watch.js.map +1 -0
- package/dist/stack-setting-warnings.d.ts +8 -0
- package/dist/stack-setting-warnings.d.ts.map +1 -0
- package/dist/stack-setting-warnings.js +14 -0
- package/dist/stack-setting-warnings.js.map +1 -0
- package/dist/studio-dev-server.d.ts.map +1 -1
- package/dist/studio-dev-server.js +2 -1
- package/dist/studio-dev-server.js.map +1 -1
- package/dist/target-client.d.ts +12 -2
- package/dist/target-client.d.ts.map +1 -1
- package/dist/target-client.js +14 -1
- package/dist/target-client.js.map +1 -1
- package/dist/tsx-runner.d.ts +5 -0
- package/dist/tsx-runner.d.ts.map +1 -1
- package/dist/tsx-runner.js +16 -16
- package/dist/tsx-runner.js.map +1 -1
- package/dist/type-generation.d.ts +1 -1
- package/dist/type-generation.d.ts.map +1 -1
- package/dist/type-generation.js +2 -4
- package/dist/type-generation.js.map +1 -1
- package/dist/type-resolver.d.ts.map +1 -1
- package/dist/type-resolver.js +31 -12
- package/dist/type-resolver.js.map +1 -1
- package/dist/ui/clack-api.d.ts.map +1 -1
- package/dist/ui/clack-api.js +45 -23
- package/dist/ui/clack-api.js.map +1 -1
- package/dist/ui/components/LineInput.d.ts +26 -0
- package/dist/ui/components/LineInput.d.ts.map +1 -0
- package/dist/ui/components/LineInput.js +60 -0
- package/dist/ui/components/LineInput.js.map +1 -0
- package/dist/ui/flows/FlowApp.d.ts +3 -1
- package/dist/ui/flows/FlowApp.d.ts.map +1 -1
- package/dist/ui/flows/FlowApp.js +14 -5
- package/dist/ui/flows/FlowApp.js.map +1 -1
- package/dist/ui/flows/prompt-fields.d.ts +3 -1
- package/dist/ui/flows/prompt-fields.d.ts.map +1 -1
- package/dist/ui/flows/prompt-fields.js +10 -5
- package/dist/ui/flows/prompt-fields.js.map +1 -1
- package/dist/ui/flows/types.d.ts +5 -1
- package/dist/ui/flows/types.d.ts.map +1 -1
- package/dist/ui/runtime/command-chrome.d.ts.map +1 -1
- package/dist/ui/runtime/command-chrome.js +2 -0
- package/dist/ui/runtime/command-chrome.js.map +1 -1
- package/dist/ui/runtime/flow-transcript.d.ts +17 -0
- package/dist/ui/runtime/flow-transcript.d.ts.map +1 -0
- package/dist/ui/runtime/flow-transcript.js +38 -0
- package/dist/ui/runtime/flow-transcript.js.map +1 -0
- package/dist/ui/runtime/run-clack-flow.d.ts +7 -0
- package/dist/ui/runtime/run-clack-flow.d.ts.map +1 -1
- package/dist/ui/runtime/run-clack-flow.js +131 -17
- package/dist/ui/runtime/run-clack-flow.js.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,21 @@
|
|
|
4
4
|
|
|
5
5
|
### Breaking Changes
|
|
6
6
|
|
|
7
|
+
* **push, diff, seed and every command that reaches the local stack:** these commands no longer
|
|
8
|
+
start the local stack. On a Docker project with the stack stopped, `push`, `diff`, `adopt`,
|
|
9
|
+
`doctor`, `seed`, `migrate`, `migrations list`, `rollback`, `reset`, `introspect`, `pull` and
|
|
10
|
+
`admin` refuse before doing anything: "The local stack isn't running. Start it with
|
|
11
|
+
`supatype dev`, or `supatype self-host compose up -d` on a server, then run `supatype push`
|
|
12
|
+
again." (naming the command run). `seed` exits 2, the others 1. `push` used to start Postgres,
|
|
13
|
+
apply, then start the rest of the stack, and `diff` started Postgres and stopped it again. A
|
|
14
|
+
linked project, `--connection`, `connection` in the config and an external database are reached
|
|
15
|
+
as before, and a running stack behaves as before.
|
|
16
|
+
* **cache, functions:** `cache rest list`, `get`, `delete` and `flush`, and a local `functions invoke`
|
|
17
|
+
that no `functions serve` answers, refuse on a Docker project whose local stack is not running,
|
|
18
|
+
with the same message as `push` and the other commands that need the stack, naming the command
|
|
19
|
+
run, and exit 1. They reached the stopped stack's API and failed with `Cannot reach` or a
|
|
20
|
+
missing `SERVICE_ROLE_KEY`. An API address named by `SUPATYPE_URL` or `SUPATYPE_API_URL` in
|
|
21
|
+
`.env`, a linked project's `functions invoke`, and a native project are unaffected.
|
|
7
22
|
* **schema:** a `?` on a model field (`due?: string`) is refused, naming `Model.field` and saying to
|
|
8
23
|
write `Optional<>`. It read as nullable but compiled to a `NOT NULL` column.
|
|
9
24
|
* **generate:** `supatype generate --connection` is refused as an unknown option. Generate writes the
|
|
@@ -22,6 +37,80 @@
|
|
|
22
37
|
|
|
23
38
|
### Features
|
|
24
39
|
|
|
40
|
+
* **auth:** SAML single sign-on can be turned on from the config: `auth: { sso: { saml: { enabled: true } } }`,
|
|
41
|
+
with optional `allowEncryptedAssertions`, `relayStateValidity` (seconds), `rateLimitAssertion`
|
|
42
|
+
(assertions per 5 minutes) and `externalUrl`. `dev`, native `dev` and `self-host compose` pass the
|
|
43
|
+
`SUPATYPE_SAML_*` settings to the auth server, a `.env` value winning over each, and nothing while
|
|
44
|
+
SAML is off. The service provider's signing key is generated into `.env` as
|
|
45
|
+
`SUPATYPE_SAML_PRIVATE_KEY` (RSA 2048) the first time SAML is on and never replaced, since a new
|
|
46
|
+
key breaks every identity provider that trusts the old certificate. The compose file requires it
|
|
47
|
+
from `.env` and never holds it. A key written into the config is refused.
|
|
48
|
+
* **sso:** `supatype sso add <name>`, `list`, `show`, `update` and `remove` register SAML identity
|
|
49
|
+
providers (metadata URL or file, email domains, attribute mapping, NameID format) through the auth
|
|
50
|
+
server's admin API, on the local stack or a linked self-hosted deployment. A provider is addressed
|
|
51
|
+
by its name, stored as `resource_id`, and `update` changes it in place: deleting and adding a
|
|
52
|
+
provider again would leave every user who signed in through it without a way back in. `update`
|
|
53
|
+
keeps the NameID format unless told to change it. `add` warns when SAML is off.
|
|
54
|
+
* **sso:** `supatype sso info` prints the values an identity provider asks for: entity ID and
|
|
55
|
+
metadata URL, ACS URL, NameID formats, the `subject-id` attribute preferred to the NameID, and a
|
|
56
|
+
link to download the metadata XML.
|
|
57
|
+
* **sso:** `supatype sso rotate-key` writes `SUPATYPE_SAML_NEXT_PRIVATE_KEY` into `.env`, which the
|
|
58
|
+
server publishes beside the current key while identity providers take the new certificate;
|
|
59
|
+
`supatype sso rotate-key --promote` then makes it the current key, after saying what stops working
|
|
60
|
+
for an identity provider that has not updated. For a linked deployment it prints the steps to take
|
|
61
|
+
on the server.
|
|
62
|
+
* **sso:** `supatype sso verify-domain <name> <domain>` proves the project owns one of a provider's
|
|
63
|
+
domains: it prints the DNS TXT record to add (`_supatype-challenge.<domain>` and its token), asks
|
|
64
|
+
the auth server to check it, and says whether the domain is verified or what DNS answered instead,
|
|
65
|
+
exiting 1 until it is. Running it again checks again. `sso show` and `sso list` mark each domain
|
|
66
|
+
verified or not. On a dev stack a domain ending in `.supatype.test` counts as verified with no DNS
|
|
67
|
+
lookup.
|
|
68
|
+
* **self-host:** `supatype self-host compose up -d` creates the storage buckets the schema declares
|
|
69
|
+
and the first admin user once the stack answers, as `supatype dev` and a push to a running stack
|
|
70
|
+
do. A push no longer starts a stopped stack, so nothing else would have made them. A failure there
|
|
71
|
+
is a warning: the stack is up.
|
|
72
|
+
* **init:** a static app's `index.html` (and the page Vite builds it from) loads
|
|
73
|
+
`<script src="/supatype-env.js" vite-ignore></script>` in its head, so the built site takes the address and
|
|
74
|
+
anon key of whichever deployment serves it. Only where the committed config serves the app's
|
|
75
|
+
files; a proxied app's page is left as it was.
|
|
76
|
+
* **init:** in a Next.js App Router app, init writes `app/supatype-env.js/route.ts` (or under
|
|
77
|
+
`src/app`, and `route.js` without a `tsconfig.json`), which serves `/supatype-env.js` from
|
|
78
|
+
`@supatype/ssr/next` with the running server's `SUPATYPE_URL` and `SUPATYPE_ANON_KEY`, adds
|
|
79
|
+
`@supatype/ssr` to the app's dependencies, and loads the script first in the root layout's
|
|
80
|
+
`<body>` with `next/script`'s `beforeInteractive`. One `next build` then runs against any
|
|
81
|
+
deployment. A route or layout that already has it is left alone; a layout init cannot edit
|
|
82
|
+
safely (no single `<body>`, or a `Script` that is not `next/script`) is left as it is, and the two
|
|
83
|
+
lines to add are printed. A Pages Router app gets nothing written and the steps printed. A static
|
|
84
|
+
export (`output: "export"` in `next.config`, read as text) gets neither the route nor the script,
|
|
85
|
+
since `next build` cannot export a dynamic route; init says to build it with
|
|
86
|
+
`supatype build -- next build`, or to let Supatype hosting serve it.
|
|
87
|
+
* **dev, init, keys:** a local stack's values in `.env.development.local` now include
|
|
88
|
+
`SUPATYPE_URL` and `SUPATYPE_ANON_KEY` beside the frontend copies, so a Next.js app's
|
|
89
|
+
`/supatype-env.js` route and its server client find them in `next dev` instead of refusing with 503.
|
|
90
|
+
A deployment's values in `.env` still get only the frontend names. The CLI never loads
|
|
91
|
+
`.env.development.local` into its own environment, so `supatype build` does not take these as
|
|
92
|
+
values the host set.
|
|
93
|
+
* **client:** the generated client takes `url` and `anonKey` as `string | undefined` and, for one
|
|
94
|
+
missing, reads the page's `window.__SUPATYPE_ENV__` at its first request; with neither, that
|
|
95
|
+
request throws naming the variables to set, `supatype build` and the Next.js route, instead of
|
|
96
|
+
sending requests the gateway refuses. Creating the client never throws, so `next build` can
|
|
97
|
+
prerender a page that creates one at module scope.
|
|
98
|
+
* **diff:** every `supatype diff` ends with what `anon` (signed out) and `authenticated` (signed
|
|
99
|
+
in) may do on each model's table once the push applies, one line per table (`question read`,
|
|
100
|
+
`profile none`). A line the push changes shows what it is now as well
|
|
101
|
+
(`question none -> read`). The engine grants `anon` a privilege only where it can prove the rule
|
|
102
|
+
needs no login, so a rule meant to be public that leaves signed-out callers with `401 42501` is
|
|
103
|
+
seen before the push (issue 16). Printed also when there are no changes; an engine older than the
|
|
104
|
+
summary prints no block. Many-to-many junction tables are listed too, as `post_tags (link)`, and
|
|
105
|
+
a link whose end reads it through its own read rule says what it denies and why
|
|
106
|
+
(`none (read denied: an end's read rule reads this link table)`).
|
|
107
|
+
|
|
108
|
+
* **push:** prints the same access block before it applies or asks to confirm, in a terminal and
|
|
109
|
+
with `--yes` alike.
|
|
110
|
+
|
|
111
|
+
* **dev:** after a push applies, prints the access lines it changed (`question none -> read`),
|
|
112
|
+
and nothing when no line changed.
|
|
113
|
+
|
|
25
114
|
* **push:** `--run-hooks` fires after-hooks for the rows a push's own data migrations rewrite (column
|
|
26
115
|
conversions, block moves, kind changes). Without it they are skipped, as seeds are. Against an
|
|
27
116
|
engine whose capabilities do not list `run_hooks`, the push stops before anything is sent.
|
|
@@ -66,9 +155,269 @@
|
|
|
66
155
|
generates a secret when the shell's is unusable, and never exits mid-wizard over the keys.
|
|
67
156
|
* **keys, dev:** `NEXT_PUBLIC_SUPATYPE_ANON_KEY` is written beside the `VITE_`, `PUBLIC_` and
|
|
68
157
|
`EXPO_PUBLIC_` copies, and `NEXT_PUBLIC_SUPATYPE_URL` wherever the other URL copies are.
|
|
158
|
+
* **build:** `supatype build [--env <name>] [--allow-local] [-- <command...>]` runs the app's
|
|
159
|
+
production build (the package.json `build` script through the project's package manager, or the
|
|
160
|
+
command after `--`) with the deployment's API URL and anon key under every front-end name
|
|
161
|
+
(`VITE_`, `PUBLIC_`, `NEXT_PUBLIC_`, `EXPO_PUBLIC_`). Each value comes from the first of: the
|
|
162
|
+
environment (any of those names, or `SUPATYPE_URL` / `SUPATYPE_ANON_KEY`), so a host's own
|
|
163
|
+
settings win; for the anon key alone, the `/supatype-env.json` of the server the environment's
|
|
164
|
+
URL names, for CI that sets only the URL; the linked environment (Supatype Cloud's keys route, or
|
|
165
|
+
a self-hosted server's `/supatype-env.json`); a `.env` recording a deployment
|
|
166
|
+
(`PUBLIC_SUPATYPE_URL` or `API_EXTERNAL_URL`, and `ANON_KEY`). A server's address is fetched over
|
|
167
|
+
HTTPS only, unless it is local. A 404 there is reported as the address switched off
|
|
168
|
+
(`server.public_env: false`), and a 503 as a server not set up to publish its anon key, quoting
|
|
169
|
+
its reason on one line with anything shaped like a JWT withheld. An anon key from the link, a server or `.env` goes into the build
|
|
170
|
+
only when it is for the same deployment as the URL (compared by scheme, host and port, ignoring a
|
|
171
|
+
trailing slash and `/auth/v1`); otherwise the refusal says whose it is. The build does not start when either is missing, or when the address is local
|
|
172
|
+
unless `--allow-local` is passed, and the refusal lists every source it tried. Nothing is written
|
|
173
|
+
to a file, the service role key is never given to the build, and the exit code is the build's
|
|
174
|
+
own. A bare `supatype build` run from inside one (a package.json `"build": "supatype build"`) is
|
|
175
|
+
refused rather than running the build script again without end; a command after `--` still runs.
|
|
176
|
+
* **keys:** `supatype keys --print frontend [--env <name>] [--allow-local]` prints those same
|
|
177
|
+
front-end names and values as `NAME=value` lines, and nothing else on stdout, for a host's
|
|
178
|
+
settings or `$GITHUB_ENV`. Bare `--print` still prints the key pair. An unknown target is refused,
|
|
179
|
+
listing the valid ones, and `--env` or `--allow-local` without `--print frontend` is refused.
|
|
180
|
+
`keys --help` states the `--exp-years` default once.
|
|
181
|
+
* **config:** `server.public_env: false` renders `SUPATYPE_PUBLIC_ENV=false` into the server (self-host
|
|
182
|
+
and dev compose, and native dev), turning off its `/supatype-env.json` and `/supatype-env.js` for
|
|
183
|
+
an API-only project. Absent, the server's default (on) applies. A value that is not a boolean is
|
|
184
|
+
refused.
|
|
185
|
+
* **init:** the "When you're ready to deploy" steps build the app with `supatype build --env
|
|
186
|
+
production` once the deployment is linked, for Supatype Cloud and self-host.
|
|
69
187
|
|
|
70
188
|
### Bug Fixes
|
|
71
189
|
|
|
190
|
+
* **dev:** a save made by writing another file and renaming it over the schema is pushed. `sed -i`
|
|
191
|
+
saves were always missed on Linux, and an editor's safe write or a script's `mv` about one time in
|
|
192
|
+
three: the event named only the other file, which the watch ignored, so the database kept the old
|
|
193
|
+
schema and nothing said so. Any event in the schema folder now leads to a check of the schema
|
|
194
|
+
itself.
|
|
195
|
+
* **init, self-host compose, dev:** every project gets its own object-store login, generated into
|
|
196
|
+
`.env` as `SUPATYPE_OBJECT_STORE_ACCESS_KEY` and `SUPATYPE_OBJECT_STORE_SECRET_KEY`, and the compose
|
|
197
|
+
file reads it from there. Every stack shared the published pair `supatype` / `supatype-secret`,
|
|
198
|
+
which opens every file in every bucket past the bucket rules to anything that can reach port 8333.
|
|
199
|
+
A project still on that pair gets a new one on its next `dev` or `self-host compose up`; stored
|
|
200
|
+
files are kept.
|
|
201
|
+
* **self-host compose up and restart:** the mailer settings come from the committed config. `dev`
|
|
202
|
+
wrote them into `.env` from the config with `supatype.local.config.ts` over it, so production
|
|
203
|
+
started with dev's mail catcher as its SMTP host, and with dev's last autoconfirm after the config
|
|
204
|
+
turned email confirmations on. Values the CLI writes from the config are marked as its own and taken
|
|
205
|
+
out when the config stops giving them; a value written by hand is left.
|
|
206
|
+
* **init:** choosing SMTP asks for the host and port. `dev` and `self-host compose up` warn when the
|
|
207
|
+
provider is SMTP and no host is set, which made the server drop every email without a word.
|
|
208
|
+
* **functions new, functions env set:** `functions env set` in a project with no `functions/` folder
|
|
209
|
+
creates it, where it said "Setting FOO" and then failed with ENOENT. `init`, `functions new` and
|
|
210
|
+
`env set` create `functions/.env.local` the same way.
|
|
211
|
+
* **status:** on the local stack, the stack's services are listed after its functions, and `_shared`
|
|
212
|
+
is no longer listed as a function. The database line is the address a program on this machine
|
|
213
|
+
connects to, with the password shown as `***`, as `seed --status` shows it.
|
|
214
|
+
* **self-host compose up, every command in a terminal:** docker's output no longer goes straight to
|
|
215
|
+
the terminal while a command's screen is up. It landed in the screen being redrawn, and the notices
|
|
216
|
+
above it came out twice. It is kept and shown when docker fails, and what docker prints as its
|
|
217
|
+
answer, `ps`'s table say, goes into the command's log.
|
|
218
|
+
* **push, every command in a terminal:** a spinner's line stays above the lines its work logs.
|
|
219
|
+
`push` printed "Schema pushed." above "Applying schema via Docker Compose".
|
|
220
|
+
* **init:** the closing list of the secrets it generated names the object store's login.
|
|
221
|
+
* **login:** the saved Cloud session is created readable by its owner alone (600). It holds the
|
|
222
|
+
session's tokens. A project's `.env` is not: the stack's containers read it as another user, and an
|
|
223
|
+
owner-only `.env` stopped the server starting on a Linux host.
|
|
224
|
+
* **migrations list:** a push by an OS user with no git name says "(unverified)" once. The recorded
|
|
225
|
+
author now reads `nic (OS user)`, and the list adds whether it was verified.
|
|
226
|
+
* **every command in a terminal:** what a command logged stays on screen when it ends, once. The
|
|
227
|
+
command's chrome was cleared at the end and a short report went with it: `seed --status` showed
|
|
228
|
+
nothing in a terminal, only when piped. The last frame is now just the logged lines, and it is left
|
|
229
|
+
on screen.
|
|
230
|
+
* **every command in a terminal:** a command that fails and exits shows why. `types check` in a
|
|
231
|
+
project with no `tsconfig.json` printed its banner and exited 1 with no message, because the
|
|
232
|
+
process ended before the message was drawn.
|
|
233
|
+
* **every text prompt:** a pasted line that ends in a line break is submitted, where the break was
|
|
234
|
+
kept in the answer and drawn raw over the prompt's border. Backspaces sent in one burst erase.
|
|
235
|
+
* **reset:** drops the managed tables, applies the schema to the empty tables and runs the seeds
|
|
236
|
+
again, which `--no-seed` skips. It printed "Reset complete." and changed nothing: it pushed the
|
|
237
|
+
schema the database already had. Sign-ins, stored files, Studio members and SSO providers are kept;
|
|
238
|
+
`dev --reset-db` still wipes the whole database.
|
|
239
|
+
* **migrate, reset, rollback, migrations list, rename --prune, pull, deploy --local:** on the local
|
|
240
|
+
stack's own database these run the project's engine image, as `push`, `diff` and `seed` do. They
|
|
241
|
+
ran the engine binary cached on this machine, so with an engine image chosen, `migrate` wrote SQL
|
|
242
|
+
from the released engine that `push` no longer ran. A `--connection` to another database still
|
|
243
|
+
runs the binary here.
|
|
244
|
+
* **seed:** `supatype seed` and `npm run seed` work from the standalone binary on Windows. Every
|
|
245
|
+
seed file failed with "Cannot find module 'B:\~BUN\root\seed-ir.js'": the seed ran from a temp
|
|
246
|
+
file that could not import the CLI's own modules out of the binary. The binary now collects a
|
|
247
|
+
seed by running itself, as it already does to read the config. It also resolves packages from the
|
|
248
|
+
project's node_modules, which it could not do at all, so a seed builder's `@supatype/cli/seed`
|
|
249
|
+
import is found.
|
|
250
|
+
* **init:** a Kong port typed that another running Supatype stack holds gets one reason at every
|
|
251
|
+
prompt, "Port N is in use by another Supatype stack configured with it.". The first prompt said
|
|
252
|
+
it was configured for another stack and the next said it was in use on this machine.
|
|
253
|
+
* **envs:** `envs list` says when the default environment is not linked, and how to link it:
|
|
254
|
+
"Default: production (from supatype.config.ts environments, not linked: run supatype link --env
|
|
255
|
+
production)". No environment was starred and nothing said why.
|
|
256
|
+
* **sso:** `supatype sso info` prints the signing certificate from the server's own metadata. It
|
|
257
|
+
said "it lists no certificate" because it only read a `<X509Certificate>` with nothing after the
|
|
258
|
+
name, and the server writes `<X509Certificate xmlns="...">`.
|
|
259
|
+
* **init:** the reasons around the Kong port prompt can be read. A port typed that is in use is
|
|
260
|
+
asked for again with the reason above the question, and a port only a stopped Supatype stack is
|
|
261
|
+
configured with is taken only after a yes to "Use it anyway?". Both were logged between prompts,
|
|
262
|
+
and the next prompt's redraw wiped them before anyone could read them.
|
|
263
|
+
* **self-host:** `supatype self-host compose up` checks the ports the stack publishes before it
|
|
264
|
+
starts anything, and names the port, the service and how to see what holds it. Docker used to fail
|
|
265
|
+
on the port after starting some containers. A stack whose gateway never answers is now reported as
|
|
266
|
+
"started but is not serving", with exit 1; it said "The stack is up" and exited 0.
|
|
267
|
+
* **envs:** `supatype envs list` names the default commands actually use, and says when it comes
|
|
268
|
+
from `environments` in supatype.config.ts, which wins over `envs use`. `envs use` says so too when
|
|
269
|
+
the config names another environment, rather than "Default environment set". A command refused for
|
|
270
|
+
an environment that is not linked says when the config named it.
|
|
271
|
+
* **pull:** `supatype pull` no longer hangs at "Introspecting database...". The engine reads its
|
|
272
|
+
input from stdin when it is not given an input file, `introspect` is given none, and the CLI left
|
|
273
|
+
the engine's stdin open with nothing written to it. Every program the CLI runs for its output,
|
|
274
|
+
the host engine and each `docker` call (so the engine run by `compose run`), now gets a closed
|
|
275
|
+
stdin after any input it is sent.
|
|
276
|
+
* **adopt, doctor, pull and every command that reaches the local stack's database:** on a running
|
|
277
|
+
stack whose `db` container was stopped on its own, these refuse with the "local stack isn't
|
|
278
|
+
running" message, as `diff` and `push` do, and leave it stopped. `adopt` and `doctor` ran the
|
|
279
|
+
engine with `docker compose run`, which started `db` as its dependency, so `adopt` answered
|
|
280
|
+
"Nothing to adopt" with the database running again; `pull` went on to the stopped database and
|
|
281
|
+
printed nothing.
|
|
282
|
+
* **db check:** `supatype db check` in a project reads DATABASE_URL from the project's `.env`, as
|
|
283
|
+
every other command does; with only `.env` naming the database it said "No connection". It is for
|
|
284
|
+
a Postgres the project does not run, so a stopped local stack is no reason to refuse it. A refused
|
|
285
|
+
connection names the address it tried, never the password, and says to check that the database
|
|
286
|
+
is running and that the source of the URL names the right host and port; it printed only
|
|
287
|
+
`connect ECONNREFUSED 127.0.0.1:54329`. The `push` check of a database Supatype does not run,
|
|
288
|
+
and `doctor`'s after-hooks check, say it the same way.
|
|
289
|
+
* **dev:** on Windows, `supatype dev` no longer stops itself two seconds after starting in a shell
|
|
290
|
+
whose own parent had already exited (a window opened by `Start-Process`, by `start` from a script,
|
|
291
|
+
or by a terminal launcher that exits). It watches the shell's parent too, and counted one that was
|
|
292
|
+
gone from the start as the process that started dev exiting. Only an ancestor alive when dev
|
|
293
|
+
started counts now, so dev still stops when the script or agent that started it is killed.
|
|
294
|
+
* **dev:** the dashboard's `supatype` pane shows what a save did, as `dev --stream` prints it: the
|
|
295
|
+
change detected, applied or failed (with its hints), the access lines the save changed, and the
|
|
296
|
+
generated files written. It stayed at "Services running." through every save: the renderer took
|
|
297
|
+
the console over once the dashboard was drawn, and the pane's filter dropped the access lines
|
|
298
|
+
besides.
|
|
299
|
+
|
|
300
|
+
* **dev, push:** a stack service that exits while the CLI waits for the API gateway stops the wait.
|
|
301
|
+
With the server container exited on a fatal config error, `supatype dev` sat at `Waiting for API
|
|
302
|
+
gateway...` for 120 s, failed naming the gateway's health, and then removed the containers, so
|
|
303
|
+
the server's log was gone. The wait now watches `db`, `kong`, `server`, `realtime` and `storage`:
|
|
304
|
+
once one has exited it says which, with its exit code, and prints its last 30 log lines with the
|
|
305
|
+
project's secrets from `.env` and any connection string's password replaced by `***`, before the
|
|
306
|
+
stack is taken down. Either failure now ends dev's dashboard before printing, so what it prints
|
|
307
|
+
reaches the terminal.
|
|
308
|
+
* **init:** the admin email must be one address (an `@`, no spaces), and no answer init asks for,
|
|
309
|
+
typed or given as `--admin-email` or `--admin-password`, may hold a line break or other control
|
|
310
|
+
character. A pasted email with carriage returns in it went into `.env` as it was, so the server
|
|
311
|
+
read each piece as a line of its own, refused to start, and printed the lines that followed in its
|
|
312
|
+
log, the admin password among them. Init now refuses it before writing any file.
|
|
313
|
+
* **env files:** no command writes a value with a line break or other control character into `.env`,
|
|
314
|
+
`.env.development.local` or the functions' `.env.local`. It is refused, naming the key and the file
|
|
315
|
+
and never the value, and the file is left as it was.
|
|
316
|
+
* **init:** the runtime env script init puts in `index.html` carries `vite-ignore`, so `vite build`
|
|
317
|
+
no longer warns, on every build, `<script src="/supatype-env.js"> in "/index.html" can't be
|
|
318
|
+
bundled without type="module" attribute`. Vite leaves the tag in the built page, without the
|
|
319
|
+
attribute, and it still runs before the app's own script. A page init wrote before keeps its tag
|
|
320
|
+
and its warning until `vite-ignore` is added by hand.
|
|
321
|
+
* **build:** a server that answers 404 at `/supatype-env.json` is reported as having
|
|
322
|
+
`server.public_env` set to false or running a release too old to serve it, in place of "or is
|
|
323
|
+
older than the address".
|
|
324
|
+
* **dev, push, self-host:** a project that does not pin its own versions now runs schema-engine
|
|
325
|
+
v0.9.0 and server v2.3.0. The 0.9.0 CLI shipped still pinned to engine v0.8.0 and server v2.2.2,
|
|
326
|
+
so it missed four fixes those releases carry. An access rule built on
|
|
327
|
+
`In<"col", Rows<"table", "id", Where>>` with a login-free `Where` now grants `anon` the privilege
|
|
328
|
+
its policy needs, where an anonymous read or insert answered `401 42501 permission denied`.
|
|
329
|
+
`Default<JSON<string[]>, "[]">` now gives the column its default, where it created `jsonb NOT
|
|
330
|
+
NULL` with none and an insert that left it out failed with `23502`. A missing file with an
|
|
331
|
+
extension, such as `/assets/missing-abc.js`, answers `404`, not the app's `index.html` with
|
|
332
|
+
`200 text/html`. A signup with a password but no email or phone answers `400 validation_failed`,
|
|
333
|
+
not `anonymous_provider_disabled`, and never creates an anonymous user that drops the password.
|
|
334
|
+
The next push on an existing project adds the missing grants and defaults.
|
|
335
|
+
* **dev, init, keys:** the front end's copies of the API address and the anon key
|
|
336
|
+
(`VITE_SUPATYPE_URL`, `VITE_SUPATYPE_ANON_KEY` and their `PUBLIC_`, `NEXT_PUBLIC_` and
|
|
337
|
+
`EXPO_PUBLIC_` twins) for a local stack are written to `.env.development.local`, not `.env` or
|
|
338
|
+
`.env.local`, and removed from those two files. A production build read the local stack's
|
|
339
|
+
`http://localhost:<port>` address and key from `.env` and shipped them. A production build now
|
|
340
|
+
reads no anon key unless one is set for it: `supatype keys` writes the copies to `.env` only when
|
|
341
|
+
`.env` records a non-local `PUBLIC_SUPATYPE_URL` or `API_EXTERNAL_URL`, and `self-host compose
|
|
342
|
+
up` writes only `ANON_KEY` and `SERVICE_ROLE_KEY`. Shipped in 0.9.0 without an entry here.
|
|
343
|
+
* **init:** the `.gitignore` init writes no longer ignores `src/lib/supatype.ts` or
|
|
344
|
+
`src/types/supatype.d.ts`. Nothing has generated either path for some time, and apps write their
|
|
345
|
+
own client to `src/lib/supatype.ts`, so a commit left the client out without a word and a fresh
|
|
346
|
+
clone did not build. A project made by an earlier init still has the two lines under
|
|
347
|
+
`# Generated by supatype push (legacy paths...)`; delete them and `git add` the client.
|
|
348
|
+
* **diff:** `supatype diff` and `supatype push` against a local stack that is not running say
|
|
349
|
+
`Could not connect to http://localhost:<port>/platform/v1/...: connection refused. The local stack
|
|
350
|
+
is not running: start it with supatype dev, then run this again.` The compiled CLI said only
|
|
351
|
+
`Unable to connect. Is the computer able to access the url?` and the npm one `fetch failed`,
|
|
352
|
+
naming neither the address nor the fix. A linked server that refuses the connection is named the
|
|
353
|
+
same way, without the `supatype dev` advice. `supatype functions invoke` says `Cannot reach <url>`
|
|
354
|
+
under the compiled CLI too; it printed Bun's words instead.
|
|
355
|
+
* **dev:** stopping `supatype dev` no longer says `Docker is installed but the daemon is not
|
|
356
|
+
running` while Docker is up. The shutdown's `docker compose down` first asked the daemon whether
|
|
357
|
+
it was running, giving `docker info` 15 s; a Docker busy enough to be slower than that was
|
|
358
|
+
reported as stopped, and dev exited before `down` ran, leaving the exit hook's fallback to stop
|
|
359
|
+
the stack. Stopping a stack that was just running no longer asks: `down` runs at once, and says
|
|
360
|
+
so itself if Docker really is gone.
|
|
361
|
+
* **diff, push, dev, self-host:** a Docker that is slow to answer is no longer reported as not
|
|
362
|
+
running. `supatype diff`, straight after one that failed on a port clash, said `Docker is
|
|
363
|
+
installed but the daemon is not running` with `Docker did not answer within 15s`, while `docker
|
|
364
|
+
info` answered in under a second. A check that times out is now asked once more, and if Docker is
|
|
365
|
+
still silent the CLI says `Docker did not answer in time` and that it may be busy. "Not running"
|
|
366
|
+
is said only when the docker CLI reports it cannot connect; a paused Docker Desktop is called
|
|
367
|
+
paused, and any other `docker info` failure is shown as Docker printed it.
|
|
368
|
+
* **dev:** a proxy app whose start script is `vite` starts again. The compiled program ran
|
|
369
|
+
`vite.js` with itself rather than Node, so the app task exited with `error: unknown command
|
|
370
|
+
'<app>/node_modules/vite/bin/vite.js'`, was restarted for the rest of the session, and every app
|
|
371
|
+
route answered 502. `vite.js` for the app and for `overrides.studio`, and a `.js` entry named by
|
|
372
|
+
`overrides.realtime` or `overrides.storage`, now run with the `node` on PATH; with none there,
|
|
373
|
+
dev stops and says Node.js is needed. The dev log names the program it runs, where it used to
|
|
374
|
+
say `node vite.js` whatever ran (#28).
|
|
375
|
+
* **generate:** a `JSON<T>` column is typed as its `T` again in the generated types, augmentation
|
|
376
|
+
and client, as it was in 0.8.0. Since 0.9.0, npm runs the compiled CLI, which carried none of
|
|
377
|
+
TypeScript's lib files, so the schema reader knew no `Array` or `Record`: `JSON<string[]>` was
|
|
378
|
+
written as `{}` and `JSON<Record<string, number>>` as `Json`. The CLI now carries those files
|
|
379
|
+
(#27).
|
|
380
|
+
* **dev:** the dashboard's `app` pane shows the proxy app's output whole. A line that reached the
|
|
381
|
+
CLI in two reads was shown as two lines, a CRLF line kept its carriage return, and a line printed
|
|
382
|
+
twice in a row was dropped the second time, so repeated request errors showed once. An app that
|
|
383
|
+
crashed on every start showed its error after the first crash only, followed by nothing but
|
|
384
|
+
`process exited ... restarting` lines: each restart's identical error was taken for a repeat of
|
|
385
|
+
the run before. The same applies to Studio, realtime and the other processes dev runs, and to
|
|
386
|
+
`--stream`, where each line is written once.
|
|
387
|
+
|
|
388
|
+
Freeing the proxy app's port no longer freezes the dashboard. The port scan ran synchronously
|
|
389
|
+
before the app's first start and before every restart, and on Windows it took over ten seconds,
|
|
390
|
+
during which no process's output appeared. It now runs in the background, and the app is still
|
|
391
|
+
spawned only once the stale listener is killed. The scan also matches only a listener on exactly
|
|
392
|
+
the app's port: on Windows it also killed listeners on longer ports that started with the same
|
|
393
|
+
digits (5285 matched 52851), and on macOS and Linux it killed every process connected to the
|
|
394
|
+
port, a browser on the dev server included.
|
|
395
|
+
* **deploy:** the app's build is given the deployment's anon key, through the resolver `supatype
|
|
396
|
+
build` uses. It got the URL copies only, and those from the control plane's address rather than
|
|
397
|
+
the project's, so a deployed app rendered a blank page. A deploy whose build would get no URL or
|
|
398
|
+
anon key now stops before building, listing what it tried (`--allow-local` takes a local
|
|
399
|
+
address). The install and build steps run through cmd.exe on Windows, where `npm` and `pnpm` could
|
|
400
|
+
not be started without it.
|
|
401
|
+
|
|
402
|
+
* **init, dev:** Windows no longer asks to let `supatype` through its firewall. Checking whether a
|
|
403
|
+
port was free bound it on every address (`0.0.0.0`), which Windows treats as a program wanting
|
|
404
|
+
network access, and it remembers the answer per program file, so it asked again after every CLI
|
|
405
|
+
upgrade. The check now binds loopback only and connects to the port, which still finds a
|
|
406
|
+
listener on every address, the kind Docker Compose publishes.
|
|
407
|
+
* **npm, install:** the compiled `supatype` program no longer reads `.env`, `.env.local`,
|
|
408
|
+
`.env.development.local` or `bunfig.toml` from the directory it runs in. It loaded the project's
|
|
409
|
+
files into its own environment, which the CLI under Node never did, so the project's
|
|
410
|
+
`SERVICE_ROLE_KEY` sent `diff` and `push` to a local stack's API instead of its database, and a
|
|
411
|
+
`bunfig.toml` `preload` ran its code inside the CLI. The CLI reads the files it needs itself.
|
|
412
|
+
* **dev:** saving the schema no longer freezes the dev dashboard while the push runs. The engine's
|
|
413
|
+
push, its `parse` and `admin` runs, the compose engine run on a docker project, and the two `psql`
|
|
414
|
+
calls a docker push makes after it (the `auth.users` grant and reading the field-masking tier)
|
|
415
|
+
were all synchronous, so for as long as a push took no process's output appeared and the
|
|
416
|
+
dashboard did not redraw. They now run in the background, and so does asking git who is
|
|
417
|
+
pushing. Native dev also pushes one save at a time, as docker dev already did: a save made during
|
|
418
|
+
a push is pushed once that push is done. Every command that runs the engine runs it the same
|
|
419
|
+
way, with the same results and errors.
|
|
420
|
+
|
|
72
421
|
* **npm:** the CLI works in an app that installs React 19. npm hoisted the CLI's `ink` into the
|
|
73
422
|
app's `node_modules`, where it loaded the app's React rather than the CLI's own React 18, and
|
|
74
423
|
every command failed with `Cannot read properties of undefined (reading 'ReactCurrentOwner')`.
|
|
@@ -312,6 +661,17 @@
|
|
|
312
661
|
* **init:** `supatype init` uses an exported `SUPATYPE_KONG_PORT` as the project's gateway port, in
|
|
313
662
|
`.env` and in what it prints, and the wizard does not ask for one. It chose its own port, so `.env`
|
|
314
663
|
and the "API on" line named a port the stack, which binds the shell's, never listened on.
|
|
664
|
+
* **push:** a Docker push that applied the schema exits 0 when a step after it fails on the running
|
|
665
|
+
stack (its `up -d`, the gateway wait, the buckets or the first admin), warning `The schema was
|
|
666
|
+
applied, but a step after it failed` with the reason. A start that failed on a port another
|
|
667
|
+
program held made push exit 1 with the schema in.
|
|
668
|
+
* **push, diff, adopt, pull:** on a running stack these no longer run `docker compose up -d db`
|
|
669
|
+
before they reach its database. Every layout already publishes Postgres on the port the host
|
|
670
|
+
engine connects to, so the call had nothing to start, and could recreate the database container
|
|
671
|
+
when its definition had changed; with `overrides.engine` on a dev stack it could also move the dev
|
|
672
|
+
database port under a running database first. A running stack whose `db`
|
|
673
|
+
container has stopped is now refused with the "local stack isn't running" message rather than
|
|
674
|
+
having its database started.
|
|
315
675
|
|
|
316
676
|
|
|
317
677
|
## 0.7.0
|
|
@@ -7,12 +7,22 @@ import { type SupatypeProjectConfig } from "../project-config.js";
|
|
|
7
7
|
export declare function resolveProxyDevScript(config: SupatypeProjectConfig): string | null;
|
|
8
8
|
/** Port from app.upstream (e.g. http://localhost:5285 → 5285). */
|
|
9
9
|
export declare function portFromUpstream(config: SupatypeProjectConfig): number | null;
|
|
10
|
-
/**
|
|
11
|
-
|
|
10
|
+
/**
|
|
11
|
+
* The PIDs listening on `port` in `netstat -ano` output. Only the local address is matched, and
|
|
12
|
+
* all of it: `findstr :5285` also matched port 52851, and a connection to the port from elsewhere.
|
|
13
|
+
*/
|
|
14
|
+
export declare function netstatListeners(out: string, port: number): number[];
|
|
15
|
+
/**
|
|
16
|
+
* Free the upstream port and any stale app PID before spawning the app. Asynchronous: run
|
|
17
|
+
* synchronously, the port scan took ten seconds on Windows and froze the dashboard while it did.
|
|
18
|
+
* Rejects when the port could not be scanned.
|
|
19
|
+
*/
|
|
20
|
+
export declare function freeProxyDevPort(pidDir: string, port: number): Promise<void>;
|
|
12
21
|
/**
|
|
13
22
|
* When a package.json script only runs Vite, spawn node + vite.js directly.
|
|
14
23
|
* Avoids Windows shell shims (pnpm → bash → vite) that orphan the real server
|
|
15
|
-
* and break PID-based cleanup / auto-restart.
|
|
24
|
+
* and break PID-based cleanup / auto-restart. Throws when the compiled binary
|
|
25
|
+
* finds no Node to run vite.js with (see node-executable.ts).
|
|
16
26
|
*/
|
|
17
27
|
export declare function resolveViteDirectSpawn(appDir: string, script: string, scripts: Record<string, string> | undefined): {
|
|
18
28
|
bin: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-dev-app.d.ts","sourceRoot":"","sources":["../../src/app/proxy-dev-app.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"proxy-dev-app.d.ts","sourceRoot":"","sources":["../../src/app/proxy-dev-app.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,EAAE,cAAc,EAAW,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAyB,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AAIxF,qEAAqE;AACrE,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI,CAIlF;AAED,kEAAkE;AAClE,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,MAAM,GAAG,IAAI,CAW7E;AAqBD;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CASpE;AAYD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIlF;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAC1C;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAexD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,qBAAqB,EAC7B,MAAM,EAAE,MAAM,GACb,cAAc,GAAG,IAAI,CAyCvB"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Spawn the frontend dev server during `supatype dev` when app.mode is proxy.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
4
|
+
import { execFile } from "node:child_process";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { join } from "node:path";
|
|
7
7
|
import { detectPackageManager } from "./framework.js";
|
|
8
|
+
import { nodeExecutable } from "../node-executable.js";
|
|
8
9
|
import { parsePackageJson } from "../package-json.js";
|
|
9
10
|
import { appendDevTaskLog } from "../dev-session.js";
|
|
10
11
|
import { ProcessManager, readPid } from "../process-manager.js";
|
|
@@ -33,71 +34,68 @@ export function portFromUpstream(config) {
|
|
|
33
34
|
return null;
|
|
34
35
|
}
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
/** Runs a command without a shell or a console window, and resolves with its stdout. */
|
|
38
|
+
function runCommand(bin, args) {
|
|
39
|
+
return new Promise((resolve, reject) => {
|
|
40
|
+
execFile(bin, args, { encoding: "utf8", windowsHide: true }, (err, stdout) => {
|
|
41
|
+
if (err)
|
|
42
|
+
reject(err);
|
|
43
|
+
else
|
|
44
|
+
resolve(stdout);
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
async function killPidTree(pid) {
|
|
49
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
38
50
|
return;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
execSync(`taskkill /pid ${pid} /T /F`, { stdio: "ignore" });
|
|
42
|
-
}
|
|
43
|
-
else {
|
|
44
|
-
execSync(`kill -9 ${pid}`, { stdio: "ignore" });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
catch {
|
|
51
|
+
const [bin, args] = process.platform === "win32" ? ["taskkill", ["/pid", String(pid), "/T", "/F"]] : ["kill", ["-9", String(pid)]];
|
|
52
|
+
await runCommand(bin, args).catch(() => {
|
|
48
53
|
/* already gone */
|
|
49
|
-
}
|
|
54
|
+
});
|
|
50
55
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
catch {
|
|
66
|
-
/* already gone */
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
catch {
|
|
71
|
-
/* nothing listening */
|
|
72
|
-
}
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
try {
|
|
76
|
-
const out = execSync(`lsof -ti :${port}`, { encoding: "utf8" });
|
|
77
|
-
for (const pid of out.trim().split(/\s+/)) {
|
|
78
|
-
try {
|
|
79
|
-
execSync(`kill -9 ${pid}`, { stdio: "ignore" });
|
|
80
|
-
}
|
|
81
|
-
catch {
|
|
82
|
-
/* already gone */
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
/* nothing listening */
|
|
56
|
+
/**
|
|
57
|
+
* The PIDs listening on `port` in `netstat -ano` output. Only the local address is matched, and
|
|
58
|
+
* all of it: `findstr :5285` also matched port 52851, and a connection to the port from elsewhere.
|
|
59
|
+
*/
|
|
60
|
+
export function netstatListeners(out, port) {
|
|
61
|
+
const pids = new Set();
|
|
62
|
+
for (const line of out.split(/\r?\n/)) {
|
|
63
|
+
const [proto, local, , state, pid] = line.trim().split(/\s+/);
|
|
64
|
+
if (proto !== "TCP" || state !== "LISTENING" || !local?.endsWith(`:${port}`))
|
|
65
|
+
continue;
|
|
66
|
+
const n = Number(pid);
|
|
67
|
+
if (Number.isInteger(n) && n > 0)
|
|
68
|
+
pids.add(n);
|
|
88
69
|
}
|
|
70
|
+
return [...pids];
|
|
89
71
|
}
|
|
90
|
-
/**
|
|
91
|
-
|
|
72
|
+
/** The PIDs listening on `port`. `lsof` exits 1 when nothing is, which is not a failure. */
|
|
73
|
+
async function listenerPids(port) {
|
|
74
|
+
if (process.platform === "win32")
|
|
75
|
+
return netstatListeners(await runCommand("netstat", ["-ano"]), port);
|
|
76
|
+
const out = await runCommand("lsof", ["-ti", `:${port}`, "-sTCP:LISTEN"]).catch((err) => {
|
|
77
|
+
if (typeof err === "object" && err !== null && "code" in err && err.code === 1)
|
|
78
|
+
return "";
|
|
79
|
+
throw err;
|
|
80
|
+
});
|
|
81
|
+
return out.split(/\s+/).filter((pid) => pid !== "").map(Number);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Free the upstream port and any stale app PID before spawning the app. Asynchronous: run
|
|
85
|
+
* synchronously, the port scan took ten seconds on Windows and froze the dashboard while it did.
|
|
86
|
+
* Rejects when the port could not be scanned.
|
|
87
|
+
*/
|
|
88
|
+
export async function freeProxyDevPort(pidDir, port) {
|
|
92
89
|
const stalePid = readPid(pidDir, "app");
|
|
93
90
|
if (stalePid)
|
|
94
|
-
killPidTree(stalePid);
|
|
95
|
-
|
|
91
|
+
await killPidTree(stalePid);
|
|
92
|
+
await Promise.all((await listenerPids(port)).map(killPidTree));
|
|
96
93
|
}
|
|
97
94
|
/**
|
|
98
95
|
* When a package.json script only runs Vite, spawn node + vite.js directly.
|
|
99
96
|
* Avoids Windows shell shims (pnpm → bash → vite) that orphan the real server
|
|
100
|
-
* and break PID-based cleanup / auto-restart.
|
|
97
|
+
* and break PID-based cleanup / auto-restart. Throws when the compiled binary
|
|
98
|
+
* finds no Node to run vite.js with (see node-executable.ts).
|
|
101
99
|
*/
|
|
102
100
|
export function resolveViteDirectSpawn(appDir, script, scripts) {
|
|
103
101
|
const body = scripts?.[script]?.trim() ?? "";
|
|
@@ -111,7 +109,7 @@ export function resolveViteDirectSpawn(appDir, script, scripts) {
|
|
|
111
109
|
const viteJs = join(appDir, "node_modules", "vite", "bin", "vite.js");
|
|
112
110
|
if (!existsSync(viteJs))
|
|
113
111
|
return null;
|
|
114
|
-
return { bin:
|
|
112
|
+
return { bin: nodeExecutable(viteJs), args: [viteJs], shell: false };
|
|
115
113
|
}
|
|
116
114
|
/**
|
|
117
115
|
* Start the configured package.json script for proxy dev.
|
|
@@ -139,18 +137,16 @@ export function startProxyDevApp(cwd, config, pidDir) {
|
|
|
139
137
|
const bin = directVite?.bin ?? pm;
|
|
140
138
|
const args = directVite?.args ?? (pm === "yarn" ? [script] : ["run", script]);
|
|
141
139
|
const useShell = directVite ? false : process.platform === "win32";
|
|
142
|
-
appendDevTaskLog("app", "app",
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
if (upstreamPort)
|
|
146
|
-
freeProxyDevPort(pidDir, upstreamPort);
|
|
140
|
+
appendDevTaskLog("app", "app", `Proxy mode: running ${bin} ${args.join(" ")} (${appDir})`);
|
|
141
|
+
// Run by the manager before each spawn, so the scan never holds up the dashboard.
|
|
142
|
+
const freePort = upstreamPort ? () => freeProxyDevPort(pidDir, upstreamPort) : undefined;
|
|
147
143
|
const manager = new ProcessManager(bin, args, {
|
|
148
144
|
label: "app",
|
|
149
145
|
pidDir,
|
|
150
146
|
cwd: appDir,
|
|
151
147
|
colour: "\x1b[33m",
|
|
152
148
|
shell: useShell,
|
|
153
|
-
...(
|
|
149
|
+
...(freePort && { beforeStart: freePort, beforeRestart: freePort }),
|
|
154
150
|
});
|
|
155
151
|
manager.start();
|
|
156
152
|
return manager;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxy-dev-app.js","sourceRoot":"","sources":["../../src/app/proxy-dev-app.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAA8B,MAAM,sBAAsB,CAAA;AAExF,MAAM,wBAAwB,GAAG,OAAO,CAAA;AAExC,qEAAqE;AACrE,MAAM,UAAU,qBAAqB,CAAC,MAA6B;IACjE,IAAI,MAAM,CAAC,GAAG,EAAE,IAAI,K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