@supatype/cli 0.1.6 → 0.1.9
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/.turbo/turbo-build.log +1 -1
- package/.turbo/turbo-test.log +152 -102
- package/.turbo/turbo-typecheck.log +1 -1
- package/LICENSE +202 -0
- package/deno.d.ts +52 -0
- package/dist/app/framework.js +1 -1
- package/dist/app/framework.js.map +1 -1
- package/dist/augmentation-generator.d.ts +22 -0
- package/dist/augmentation-generator.d.ts.map +1 -1
- package/dist/augmentation-generator.js +19 -5
- package/dist/augmentation-generator.js.map +1 -1
- package/dist/binary-cache.d.ts +42 -6
- package/dist/binary-cache.d.ts.map +1 -1
- package/dist/binary-cache.js +76 -44
- package/dist/binary-cache.js.map +1 -1
- package/dist/cache-clean.d.ts +15 -0
- package/dist/cache-clean.d.ts.map +1 -0
- package/dist/cache-clean.js +76 -0
- package/dist/cache-clean.js.map +1 -0
- package/dist/cache-pins.d.ts +51 -0
- package/dist/cache-pins.d.ts.map +1 -0
- package/dist/cache-pins.js +184 -0
- package/dist/cache-pins.js.map +1 -0
- package/dist/cli-artifacts.d.ts +32 -0
- package/dist/cli-artifacts.d.ts.map +1 -0
- package/dist/cli-artifacts.js +49 -0
- package/dist/cli-artifacts.js.map +1 -0
- package/dist/cli-install-method.d.ts +27 -0
- package/dist/cli-install-method.d.ts.map +1 -0
- package/dist/cli-install-method.js +78 -0
- package/dist/cli-install-method.js.map +1 -0
- package/dist/cli-package-version.d.ts +1 -1
- package/dist/cli-package-version.d.ts.map +1 -1
- package/dist/cli-package-version.js +6 -1
- package/dist/cli-package-version.js.map +1 -1
- package/dist/cli-standalone.d.ts +13 -4
- package/dist/cli-standalone.d.ts.map +1 -1
- package/dist/cli-standalone.js +86 -31
- package/dist/cli-standalone.js.map +1 -1
- package/dist/cli-version-embedded.d.ts +10 -0
- package/dist/cli-version-embedded.d.ts.map +1 -0
- package/dist/cli-version-embedded.js +13 -0
- package/dist/cli-version-embedded.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/cloud-credentials.d.ts +34 -0
- package/dist/cloud-credentials.d.ts.map +1 -0
- package/dist/cloud-credentials.js +139 -0
- package/dist/cloud-credentials.js.map +1 -0
- package/dist/commands/add.js +1 -1
- package/dist/commands/add.js.map +1 -1
- package/dist/commands/admin.d.ts +11 -0
- package/dist/commands/admin.d.ts.map +1 -1
- package/dist/commands/admin.js +123 -21
- 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/app.js +2 -2
- package/dist/commands/app.js.map +1 -1
- package/dist/commands/cache.d.ts +1 -1
- package/dist/commands/cache.d.ts.map +1 -1
- package/dist/commands/cache.js +69 -73
- package/dist/commands/cache.js.map +1 -1
- package/dist/commands/cloud.d.ts.map +1 -1
- package/dist/commands/cloud.js +32 -8
- package/dist/commands/cloud.js.map +1 -1
- package/dist/commands/db.d.ts +3 -2
- package/dist/commands/db.d.ts.map +1 -1
- package/dist/commands/db.js +149 -3
- package/dist/commands/db.js.map +1 -1
- package/dist/commands/deploy.d.ts +9 -9
- package/dist/commands/deploy.js +12 -12
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/dev.d.ts +3 -3
- package/dist/commands/dev.d.ts.map +1 -1
- package/dist/commands/dev.js +63 -23
- package/dist/commands/dev.js.map +1 -1
- package/dist/commands/doctor.d.ts +28 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +60 -3
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/engine.d.ts +1 -1
- package/dist/commands/engine.js +1 -1
- package/dist/commands/functions.d.ts +7 -0
- package/dist/commands/functions.d.ts.map +1 -1
- package/dist/commands/functions.js +45 -11
- package/dist/commands/functions.js.map +1 -1
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +5 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/hooks.d.ts +12 -0
- package/dist/commands/hooks.d.ts.map +1 -0
- package/dist/commands/hooks.js +118 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +64 -30
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/internal.d.ts +6 -0
- package/dist/commands/internal.d.ts.map +1 -0
- package/dist/commands/internal.js +22 -0
- package/dist/commands/internal.js.map +1 -0
- package/dist/commands/link-helpers.d.ts.map +1 -1
- package/dist/commands/link-helpers.js +8 -2
- package/dist/commands/link-helpers.js.map +1 -1
- package/dist/commands/login.d.ts +7 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +110 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +1 -1
- package/dist/commands/migrate.js +5 -5
- package/dist/commands/migrate.js.map +1 -1
- package/dist/commands/pg.d.ts +1 -1
- package/dist/commands/pg.js +1 -1
- package/dist/commands/plugins.js +1 -1
- package/dist/commands/plugins.js.map +1 -1
- package/dist/commands/pull.js +2 -2
- package/dist/commands/pull.js.map +1 -1
- package/dist/commands/push.d.ts.map +1 -1
- package/dist/commands/push.js +110 -7
- package/dist/commands/push.js.map +1 -1
- package/dist/commands/self-host.d.ts +1 -1
- package/dist/commands/self-host.js +1 -1
- package/dist/commands/self-update.d.ts +3 -2
- package/dist/commands/self-update.d.ts.map +1 -1
- package/dist/commands/self-update.js +31 -16
- package/dist/commands/self-update.js.map +1 -1
- package/dist/commands/status.d.ts +1 -1
- package/dist/commands/update.d.ts +1 -1
- package/dist/commands/update.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +19 -4
- package/dist/config.js.map +1 -1
- package/dist/db-preflight.d.ts +78 -0
- package/dist/db-preflight.d.ts.map +1 -0
- package/dist/db-preflight.js +452 -0
- package/dist/db-preflight.js.map +1 -0
- package/dist/dev-compose.d.ts +4 -4
- package/dist/dev-compose.d.ts.map +1 -1
- package/dist/dev-compose.js +143 -88
- package/dist/dev-compose.js.map +1 -1
- package/dist/dev-log-filter.d.ts +1 -1
- package/dist/dev-log-filter.d.ts.map +1 -1
- package/dist/dev-log-filter.js +1 -1
- package/dist/dev-log-filter.js.map +1 -1
- package/dist/dev-ports.d.ts +2 -2
- package/dist/dev-ports.d.ts.map +1 -1
- package/dist/dev-ports.js +2 -2
- package/dist/dev-ports.js.map +1 -1
- package/dist/dev-session.d.ts +5 -5
- package/dist/dev-session.d.ts.map +1 -1
- package/dist/dev-session.js +6 -6
- package/dist/dev-session.js.map +1 -1
- package/dist/dev-shutdown.d.ts +5 -5
- package/dist/dev-shutdown.d.ts.map +1 -1
- package/dist/dev-shutdown.js +7 -7
- package/dist/dev-shutdown.js.map +1 -1
- package/dist/dev-task-colors.d.ts +1 -1
- package/dist/dev-task-colors.d.ts.map +1 -1
- package/dist/dev-task-colors.js +1 -1
- package/dist/dev-task-colors.js.map +1 -1
- package/dist/docker-postgres.d.ts +5 -5
- package/dist/docker-postgres.d.ts.map +1 -1
- package/dist/docker-postgres.js +5 -5
- package/dist/docker-postgres.js.map +1 -1
- package/dist/docker-runtime.d.ts +2 -2
- package/dist/docker-runtime.d.ts.map +1 -1
- package/dist/docker-runtime.js +5 -5
- package/dist/docker-runtime.js.map +1 -1
- package/dist/engine-client.d.ts +1 -1
- package/dist/engine-client.js +3 -3
- package/dist/engine-client.js.map +1 -1
- package/dist/engine-push-output.js +1 -1
- package/dist/engine-push-output.js.map +1 -1
- package/dist/ensure-binary.d.ts.map +1 -1
- package/dist/ensure-binary.js +17 -0
- package/dist/ensure-binary.js.map +1 -1
- package/dist/ensure-component-binaries.js +1 -1
- package/dist/ensure-component-binaries.js.map +1 -1
- package/dist/env-file.d.ts +40 -2
- package/dist/env-file.d.ts.map +1 -1
- package/dist/env-file.js +132 -11
- package/dist/env-file.js.map +1 -1
- package/dist/field-masking-tier.d.ts +50 -0
- package/dist/field-masking-tier.d.ts.map +1 -0
- package/dist/field-masking-tier.js +91 -0
- package/dist/field-masking-tier.js.map +1 -0
- package/dist/functions-deno-types.d.ts +24 -0
- package/dist/functions-deno-types.d.ts.map +1 -0
- package/dist/functions-deno-types.js +155 -0
- package/dist/functions-deno-types.js.map +1 -0
- package/dist/functions-router-gen.js +1 -1
- package/dist/gitignore.d.ts +2 -2
- package/dist/gitignore.d.ts.map +1 -1
- package/dist/gitignore.js +3 -3
- package/dist/gitignore.js.map +1 -1
- package/dist/hook-upload.d.ts +30 -0
- package/dist/hook-upload.d.ts.map +1 -0
- package/dist/hook-upload.js +86 -0
- package/dist/hook-upload.js.map +1 -0
- package/dist/hooks-generator.d.ts +8 -0
- package/dist/hooks-generator.d.ts.map +1 -0
- package/dist/hooks-generator.js +332 -0
- package/dist/hooks-generator.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/init-project-detect.d.ts +1 -1
- package/dist/init-project-detect.d.ts.map +1 -1
- package/dist/init-project-detect.js +1 -1
- package/dist/init-project-detect.js.map +1 -1
- package/dist/link.d.ts +4 -0
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +2 -0
- package/dist/link.js.map +1 -1
- package/dist/local-secrets.d.ts +71 -0
- package/dist/local-secrets.d.ts.map +1 -0
- package/dist/local-secrets.js +100 -0
- package/dist/local-secrets.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +20 -0
- package/dist/main.js.map +1 -0
- package/dist/model-hooks.d.ts +73 -0
- package/dist/model-hooks.d.ts.map +1 -0
- package/dist/model-hooks.js +211 -0
- package/dist/model-hooks.js.map +1 -0
- package/dist/pgbouncer-userlist.d.ts +1 -1
- package/dist/pgbouncer-userlist.d.ts.map +1 -1
- package/dist/pgbouncer-userlist.js +2 -2
- package/dist/pgbouncer-userlist.js.map +1 -1
- package/dist/postgres-ctl.d.ts +12 -1
- package/dist/postgres-ctl.d.ts.map +1 -1
- package/dist/postgres-ctl.js +28 -5
- package/dist/postgres-ctl.js.map +1 -1
- package/dist/process-manager.d.ts +2 -2
- package/dist/process-manager.d.ts.map +1 -1
- package/dist/process-manager.js +4 -4
- package/dist/process-manager.js.map +1 -1
- package/dist/project-config.d.ts +122 -2
- package/dist/project-config.d.ts.map +1 -1
- package/dist/project-config.js +150 -1
- package/dist/project-config.js.map +1 -1
- package/dist/pull-utils.d.ts +2 -2
- package/dist/pull-utils.d.ts.map +1 -1
- package/dist/pull-utils.js +4 -4
- package/dist/pull-utils.js.map +1 -1
- package/dist/realtime-launch.js +1 -1
- package/dist/realtime-launch.js.map +1 -1
- package/dist/release-pins.d.ts +1 -1
- package/dist/release-pins.js +2 -2
- package/dist/release-pins.js.map +1 -1
- package/dist/resolve-api-url.js +1 -1
- package/dist/resolve-api-url.js.map +1 -1
- package/dist/resolve-target.d.ts +4 -0
- package/dist/resolve-target.d.ts.map +1 -1
- package/dist/resolve-target.js +69 -73
- package/dist/resolve-target.js.map +1 -1
- package/dist/rest-cache-admin.js +2 -2
- package/dist/rest-cache-admin.js.map +1 -1
- package/dist/runtime-routes.d.ts +1 -1
- package/dist/runtime-routes.js +1 -1
- package/dist/schema-ast-v2.d.ts +5 -4
- package/dist/schema-ast-v2.d.ts.map +1 -1
- package/dist/schema-ast-v2.js +5 -3
- package/dist/schema-ast-v2.js.map +1 -1
- package/dist/schema-push-lock.d.ts.map +1 -1
- package/dist/schema-push-lock.js +43 -16
- package/dist/schema-push-lock.js.map +1 -1
- package/dist/scripts/postinstall.d.ts +1 -1
- package/dist/scripts/postinstall.js +1 -1
- package/dist/self-host-compose.d.ts +26 -2
- package/dist/self-host-compose.d.ts.map +1 -1
- package/dist/self-host-compose.js +305 -73
- package/dist/self-host-compose.js.map +1 -1
- package/dist/service-role-check.d.ts +21 -0
- package/dist/service-role-check.d.ts.map +1 -0
- package/dist/service-role-check.js +85 -0
- package/dist/service-role-check.js.map +1 -0
- package/dist/storage-provision.d.ts +1 -1
- package/dist/storage-provision.js +3 -3
- package/dist/storage-provision.js.map +1 -1
- package/dist/studio-dev-server.d.ts +1 -1
- package/dist/studio-dev-server.d.ts.map +1 -1
- package/dist/systemd.d.ts +1 -1
- package/dist/systemd.js +1 -1
- package/dist/target-client.d.ts +17 -0
- package/dist/target-client.d.ts.map +1 -1
- package/dist/target-client.js +69 -17
- package/dist/target-client.js.map +1 -1
- package/dist/tsx-runner.js +1 -1
- package/dist/tsx-runner.js.map +1 -1
- package/dist/type-extractor.d.ts.map +1 -1
- package/dist/type-extractor.js +738 -34
- package/dist/type-extractor.js.map +1 -1
- package/dist/type-resolver.js +1 -1
- package/dist/type-resolver.js.map +1 -1
- package/dist/ui/brand.d.ts +1 -1
- package/dist/ui/brand.js +1 -1
- package/dist/ui/components/LogoWordmark.d.ts +1 -1
- package/dist/ui/components/LogoWordmark.d.ts.map +1 -1
- package/dist/ui/components/LogoWordmark.js +1 -1
- package/dist/ui/components/LogoWordmark.js.map +1 -1
- package/dist/ui/components/SelectField.js +1 -1
- package/dist/ui/components/SelectField.js.map +1 -1
- package/dist/ui/confirm.d.ts +1 -1
- package/dist/ui/confirm.js +1 -1
- package/dist/ui/fatal.d.ts +1 -1
- package/dist/ui/fatal.d.ts.map +1 -1
- package/dist/ui/fatal.js +1 -1
- package/dist/ui/fatal.js.map +1 -1
- package/dist/ui/flows/prompt-fields.js +1 -1
- package/dist/ui/flows/prompt-fields.js.map +1 -1
- package/dist/ui/interactive.d.ts +1 -1
- package/dist/ui/interactive.d.ts.map +1 -1
- package/dist/ui/interactive.js +1 -1
- package/dist/ui/interactive.js.map +1 -1
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/progress.js +1 -1
- package/dist/ui/runtime/command-chrome.js +2 -2
- package/dist/ui/runtime/command-chrome.js.map +1 -1
- package/dist/ui/runtime/run-clack-flow.js +1 -1
- package/dist/ui/runtime/run-clack-flow.js.map +1 -1
- package/dist/ui/runtime/stdin-after-ink.d.ts.map +1 -1
- package/dist/ui/runtime/stdin-after-ink.js +4 -2
- package/dist/ui/runtime/stdin-after-ink.js.map +1 -1
- package/dist/ui/theme.d.ts +1 -1
- package/dist/ui/theme.js +1 -1
- package/dist/valkey-sidecar.d.ts +1 -1
- package/dist/valkey-sidecar.d.ts.map +1 -1
- package/dist/valkey-sidecar.js +2 -2
- package/dist/valkey-sidecar.js.map +1 -1
- package/package.json +6 -2
- package/scripts/build-release-artifacts.sh +112 -0
- package/scripts/generate-homebrew-formula.mjs +123 -0
- package/scripts/mirror-deno-release.sh +1 -1
- package/src/TYPE-RESOLUTION.md +31 -31
- package/src/app/framework.ts +1 -1
- package/src/augmentation-generator.ts +19 -6
- package/src/binary-cache.ts +94 -47
- package/src/cache-clean.ts +81 -0
- package/src/cache-pins.ts +243 -0
- package/src/cli-artifacts.ts +65 -0
- package/src/cli-install-method.ts +87 -0
- package/src/cli-package-version.ts +5 -1
- package/src/cli-standalone.ts +116 -34
- package/src/cli-version-embedded.ts +12 -0
- package/src/cli.ts +7 -1
- package/src/cloud-credentials.ts +183 -0
- package/src/commands/add.ts +1 -1
- package/src/commands/admin.ts +142 -27
- package/src/commands/adopt.ts +1 -1
- package/src/commands/app.ts +2 -2
- package/src/commands/cache.ts +92 -77
- package/src/commands/cloud.ts +32 -8
- package/src/commands/db.ts +164 -3
- package/src/commands/deploy.ts +12 -12
- package/src/commands/dev.ts +72 -23
- package/src/commands/doctor.ts +69 -3
- package/src/commands/engine.ts +1 -1
- package/src/commands/functions.ts +47 -10
- package/src/commands/generate.ts +5 -1
- package/src/commands/hooks.ts +138 -0
- package/src/commands/init.ts +65 -31
- package/src/commands/internal.ts +23 -0
- package/src/commands/link-helpers.ts +9 -2
- package/src/commands/login.ts +127 -0
- package/src/commands/logs.ts +1 -1
- package/src/commands/migrate.ts +5 -5
- package/src/commands/pg.ts +1 -1
- package/src/commands/plugins.ts +1 -1
- package/src/commands/pull.ts +2 -2
- package/src/commands/push.ts +124 -7
- package/src/commands/self-host.ts +1 -1
- package/src/commands/self-update.ts +41 -19
- package/src/commands/status.ts +1 -1
- package/src/commands/update.ts +1 -1
- package/src/config.ts +23 -4
- package/src/db-preflight.ts +575 -0
- package/src/dev-compose.ts +158 -89
- package/src/dev-log-filter.ts +1 -1
- package/src/dev-ports.ts +3 -3
- package/src/dev-session.ts +6 -6
- package/src/dev-shutdown.ts +8 -8
- package/src/dev-task-colors.ts +1 -1
- package/src/docker-postgres.ts +6 -6
- package/src/docker-runtime.ts +5 -5
- package/src/engine-client.ts +3 -3
- package/src/engine-push-output.ts +1 -1
- package/src/ensure-binary.ts +20 -0
- package/src/ensure-component-binaries.ts +1 -1
- package/src/env-file.ts +157 -11
- package/src/field-masking-tier.ts +107 -0
- package/src/functions-deno-types.ts +188 -0
- package/src/functions-router-gen.ts +1 -1
- package/src/gitignore.ts +3 -3
- package/src/hook-upload.ts +107 -0
- package/src/hooks-generator.ts +352 -0
- package/src/index.ts +1 -1
- package/src/init-project-detect.ts +1 -1
- package/src/link.ts +7 -0
- package/src/local-secrets.ts +104 -0
- package/src/main.ts +20 -0
- package/src/model-hooks.ts +260 -0
- package/src/pgbouncer-userlist.ts +2 -2
- package/src/postgres-ctl.ts +32 -5
- package/src/process-manager.ts +4 -4
- package/src/project-config.ts +237 -3
- package/src/pull-utils.ts +4 -4
- package/src/realtime-launch.ts +1 -1
- package/src/release-pins.ts +2 -2
- package/src/resolve-api-url.ts +1 -1
- package/src/resolve-target.ts +113 -68
- package/src/rest-cache-admin.ts +2 -2
- package/src/runtime-routes.ts +2 -2
- package/src/schema-ast-v2.ts +8 -5
- package/src/schema-push-lock.ts +56 -17
- package/src/scripts/postinstall.ts +1 -1
- package/src/self-host-compose.ts +348 -72
- package/src/service-role-check.ts +111 -0
- package/src/storage-provision.ts +3 -3
- package/src/studio-dev-server.ts +1 -1
- package/src/systemd.ts +1 -1
- package/src/target-client.ts +105 -18
- package/src/tsx-runner.ts +1 -1
- package/src/type-extractor.ts +885 -30
- package/src/type-resolver.ts +1 -1
- package/src/ui/README.md +1 -1
- package/src/ui/brand.ts +1 -1
- package/src/ui/components/LogoWordmark.tsx +1 -1
- package/src/ui/components/SelectField.tsx +1 -1
- package/src/ui/confirm.ts +1 -1
- package/src/ui/fatal.ts +1 -1
- package/src/ui/flows/prompt-fields.tsx +1 -1
- package/src/ui/interactive.ts +1 -1
- package/src/ui/progress.ts +1 -1
- package/src/ui/runtime/command-chrome.ts +2 -2
- package/src/ui/runtime/run-clack-flow.tsx +1 -1
- package/src/ui/runtime/stdin-after-ink.ts +4 -2
- package/src/ui/theme.ts +1 -1
- package/src/valkey-sidecar.ts +2 -2
- package/tests/access-composition.test.ts +667 -0
- package/tests/admin-studio-membership.test.ts +121 -0
- package/tests/api-schemas.test.ts +83 -0
- package/tests/archive-name-alias.test.ts +42 -0
- package/tests/augmentation-generator.test.ts +28 -0
- package/tests/cache-clean.test.ts +206 -0
- package/tests/cli-help.test.ts +11 -2
- package/tests/cli-install-method.test.ts +66 -0
- package/tests/command-chrome-coverage.test.ts +31 -26
- package/tests/command-chrome-wrap.test.ts +1 -0
- package/tests/db-preflight.test.ts +72 -0
- package/tests/doctor-render.test.ts +62 -0
- package/tests/doctor-service-role.test.ts +55 -0
- package/tests/engine-push-output.test.ts +1 -1
- package/tests/env-file.test.ts +121 -0
- package/tests/external-database-compose.test.ts +184 -0
- package/tests/external-database-config.test.ts +154 -0
- package/tests/field-masking-tier.test.ts +184 -0
- package/tests/functions-deno-types.test.ts +197 -0
- package/tests/homebrew-formula.test.ts +100 -0
- package/tests/hook-upload.test.ts +125 -0
- package/tests/hooks-generator.test.ts +212 -0
- package/tests/init.test.ts +5 -2
- package/tests/keys.test.ts +8 -2
- package/tests/local-secrets.test.ts +92 -0
- package/tests/model-hooks.test.ts +322 -0
- package/tests/runtime-contract.test.ts +113 -1
- package/tests/service-role-check.test.ts +109 -0
- package/tests/service-role-routes.test.ts +51 -0
- package/tests/storage-provision.test.ts +1 -1
- package/tests/target-client-refresh.test.ts +94 -0
- package/tests/type-extractor.test.ts +187 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vitest.config.ts +7 -1
- package/scripts/build-release-bundle.mjs +0 -27
- package/tests/engine-distribution.test.ts +0 -418
package/dist/ui/progress.d.ts
CHANGED
package/dist/ui/progress.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Progress UI for one-shot commands
|
|
2
|
+
* Progress UI for one-shot commands, Ink spinner inside command chrome.
|
|
3
3
|
*/
|
|
4
4
|
import { getActiveFlowApi } from "./runtime/flow-session.js";
|
|
5
5
|
import { isInteractive } from "./interactive.js";
|
|
@@ -73,8 +73,8 @@ export async function runCommandChrome(fn) {
|
|
|
73
73
|
export function isCommandChromeActive() {
|
|
74
74
|
return getActiveFlowApi() !== null;
|
|
75
75
|
}
|
|
76
|
-
/** Commands that mount their own Ink UI
|
|
77
|
-
const WIZARD_COMMAND_PATHS = new Set(["dev", "init", "link"]);
|
|
76
|
+
/** Commands that mount their own Ink UI, do not wrap with command chrome. */
|
|
77
|
+
const WIZARD_COMMAND_PATHS = new Set(["dev", "init", "link", "login", "_postinstall"]);
|
|
78
78
|
/** Prefixes for subcommands that call `runClackFlow` internally. */
|
|
79
79
|
const WIZARD_COMMAND_PREFIXES = ["add "];
|
|
80
80
|
/** Long-running or stdio-inherit commands where chrome would fight subprocess output. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-chrome.js","sourceRoot":"","sources":["../../../src/ui/runtime/command-chrome.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AACjD,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,SAAS,GACV,MAAM,yBAAyB,CAAA;AAEhC,SAAS,sBAAsB,CAAC,GAAa;IAC3C,MAAM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AG,MAAM,CACrB,KAAC,gBAAgB,IACf,GAAG,EAAE,GAA0C,EAC/C,UAAU,EAAE,CAAC,KAAK,EAAE,EAAE;gBACpB,WAAW,CAAC,QAAQ,CAAC,CAAA;gBACrB,OAAO,CAAC,KAAU,CAAC,CAAA;YACrB,CAAC,EACD,OAAO,EAAE,CAAC,GAAG,EAAE,EAAE;gBACf,WAAW,CAAC,QAAQ,CAAC,CAAA;gBACrB,MAAM,CAAC,GAAG,CAAC,CAAA;YACb,CAAC,GACD,EACF,EAAE,YAAY,EAAE,KAAK,EAAE,CACxB,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,QAAkB;IACrC,IAAI,CAAC;QACH,QAAQ,CAAC,KAAK,EAAE,CAAA;IAClB,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;IAC1C,CAAC;IACD,QAAQ,CAAC,OAAO,EAAE,CAAA;IAClB,QAAQ,CAAC,OAAO,EAAE,CAAA;IAClB,oBAAoB,EAAE,CAAA;AACxB,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-after-ink.d.ts","sourceRoot":"","sources":["../../../src/ui/runtime/stdin-after-ink.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,wBAAgB,oBAAoB,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"stdin-after-ink.d.ts","sourceRoot":"","sources":["../../../src/ui/runtime/stdin-after-ink.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,wBAAgB,oBAAoB,IAAI,IAAI,CAkB3C"}
|
|
@@ -8,9 +8,11 @@ export function restoreStdinAfterInk() {
|
|
|
8
8
|
stdin.setRawMode?.(false);
|
|
9
9
|
}
|
|
10
10
|
catch {
|
|
11
|
-
// ignore
|
|
11
|
+
// ignore: stdin may already be restored
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
// Pause so one-shot Ink flows (cache list, keys, …) can exit; resume() would keep the
|
|
14
|
+
// process alive waiting for stdin on Windows Git Bash / MINGW64.
|
|
15
|
+
stdin.pause();
|
|
14
16
|
process.stdout.write("\n");
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=stdin-after-ink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdin-after-ink.js","sourceRoot":"","sources":["../../../src/ui/runtime/stdin-after-ink.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAM;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,KAGrB,CAAA;IAED,IAAI,CAAC;QACH,IAAI,KAAK,CAAC,KAAK;YAAE,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,
|
|
1
|
+
{"version":3,"file":"stdin-after-ink.js","sourceRoot":"","sources":["../../../src/ui/runtime/stdin-after-ink.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,UAAU,oBAAoB;IAClC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK;QAAE,OAAM;IAEhC,MAAM,KAAK,GAAG,OAAO,CAAC,KAGrB,CAAA;IAED,IAAI,CAAC;QACH,IAAI,KAAK,CAAC,KAAK;YAAE,KAAK,CAAC,UAAU,EAAE,CAAC,KAAK,CAAC,CAAA;IAC5C,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;IAC1C,CAAC;IAED,sFAAsF;IACtF,iEAAiE;IACjE,KAAK,CAAC,KAAK,EAAE,CAAA;IACb,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;AAC5B,CAAC"}
|
package/dist/ui/theme.d.ts
CHANGED
package/dist/ui/theme.js
CHANGED
package/dist/valkey-sidecar.d.ts
CHANGED
|
@@ -12,6 +12,6 @@ export interface ValkeySidecarResult {
|
|
|
12
12
|
*/
|
|
13
13
|
export declare function ensureValkeySidecar(projectName: string): ValkeySidecarResult;
|
|
14
14
|
export declare function stopValkeySidecar(containerName: string | null): void;
|
|
15
|
-
/** @internal Test helper
|
|
15
|
+
/** @internal Test helper: probe without subprocess. */
|
|
16
16
|
export declare function probeTcp(host: string, port: number): Promise<boolean>;
|
|
17
17
|
//# sourceMappingURL=valkey-sidecar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valkey-sidecar.d.ts","sourceRoot":"","sources":["../src/valkey-sidecar.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4CH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,CAgD5E;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAGpE;AAED,
|
|
1
|
+
{"version":3,"file":"valkey-sidecar.d.ts","sourceRoot":"","sources":["../src/valkey-sidecar.ts"],"names":[],"mappings":"AAAA;;GAEG;AA4CH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,aAAa,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,OAAO,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,mBAAmB,CAgD5E;AAED,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAGpE;AAED,uDAAuD;AACvD,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAarE"}
|
package/dist/valkey-sidecar.js
CHANGED
|
@@ -68,7 +68,7 @@ export function ensureValkeySidecar(projectName) {
|
|
|
68
68
|
}
|
|
69
69
|
sleepMs(100);
|
|
70
70
|
}
|
|
71
|
-
console.warn("[supatype] ⚠ Valkey sidecar started but not reachable yet
|
|
71
|
+
console.warn("[supatype] ⚠ Valkey sidecar started but not reachable yet, cache may bypass initially.");
|
|
72
72
|
return { addr, containerName: name, started: true };
|
|
73
73
|
}
|
|
74
74
|
export function stopValkeySidecar(containerName) {
|
|
@@ -76,7 +76,7 @@ export function stopValkeySidecar(containerName) {
|
|
|
76
76
|
return;
|
|
77
77
|
spawnSync("docker", ["rm", "-f", containerName], { stdio: "ignore" });
|
|
78
78
|
}
|
|
79
|
-
/** @internal Test helper
|
|
79
|
+
/** @internal Test helper: probe without subprocess. */
|
|
80
80
|
export function probeTcp(host, port) {
|
|
81
81
|
return new Promise((resolve) => {
|
|
82
82
|
const s = createConnection({ host, port });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"valkey-sidecar.js","sourceRoot":"","sources":["../src/valkey-sidecar.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;AAE3C,MAAM,YAAY,GAAG,WAAW,CAAA;AAChC,MAAM,YAAY,GAAG,IAAI,CAAA;AACzB,MAAM,KAAK,GAAG,wBAAwB,CAAA;AAEtC,SAAS,aAAa,CAAC,WAAmB;IACxC,MAAM,IAAI,GAAG,WAAW,CAAC,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA;IACrE,OAAO,uBAAuB,IAAI,EAAE,CAAA;AACtC,CAAC;AAED,SAAS,eAAe;IACtB,MAAM,CAAC,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAA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D,MAAM,UAAU,QAAQ,CAAC,IAAY,EAAE,IAAY;IACjD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,MAAM,CAAC,GAAG,gBAAgB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAA;QAC1C,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,EAAE;YACrB,CAAC,CAAC,OAAO,EAAE,CAAA;YACX,OAAO,CAAC,IAAI,CAAC,CAAA;QACf,CAAC,CAAC,CAAA;QACF,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAA;QACrC,UAAU,CAAC,GAAG,EAAE;YACd,CAAC,CAAC,OAAO,EAAE,CAAA;YACX,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC,EAAE,GAAG,CAAC,CAAA;IACT,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supatype/cli",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.1.9",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"description": "Supatype CLI: schema push, introspect, generate",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"bin": {
|
|
7
8
|
"supatype": "./bin/supatype.js"
|
|
@@ -16,6 +17,9 @@
|
|
|
16
17
|
"./seed": {
|
|
17
18
|
"import": "./dist/seed.js",
|
|
18
19
|
"types": "./dist/seed.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./deno": {
|
|
22
|
+
"types": "./deno.d.ts"
|
|
19
23
|
}
|
|
20
24
|
},
|
|
21
25
|
"dependencies": {
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
#
|
|
3
|
+
# Compile the standalone CLI for every published target and package it for the CDN.
|
|
4
|
+
#
|
|
5
|
+
# Usage: build-release-artifacts.sh <version> <output-dir>
|
|
6
|
+
#
|
|
7
|
+
# Requires a built `dist/` (pnpm --filter @supatype/cli build) and Bun on PATH. Bun cross
|
|
8
|
+
# compiles, so one Linux runner produces every target.
|
|
9
|
+
#
|
|
10
|
+
# Kept as a script rather than inlined in the workflow so it can be run locally: the release
|
|
11
|
+
# path had four defects that had never executed, and a workflow-only build cannot be tested
|
|
12
|
+
# without cutting a tag.
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
OUT_DIR="${2:?usage: build-release-artifacts.sh <version> <output-dir>}"
|
|
16
|
+
|
|
17
|
+
CLI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
18
|
+
|
|
19
|
+
PKG_VERSION="$(node -p "require('$CLI_DIR/package.json').version")"
|
|
20
|
+
|
|
21
|
+
# Defaults to the version set-version.mjs already wrote, so the label cannot disagree with the
|
|
22
|
+
# version compiled into the binary.
|
|
23
|
+
VERSION="${1:-$PKG_VERSION}"
|
|
24
|
+
|
|
25
|
+
# Publishing v1.2.3 while the binary answers something else is not a cosmetic mismatch:
|
|
26
|
+
# self-update compares its own version against cli/latest.json, so a binary that under-reports
|
|
27
|
+
# re-downloads itself on every run. Stamping is what set-version.mjs does, and the release
|
|
28
|
+
# workflow runs it before this script.
|
|
29
|
+
if [ "$VERSION" != "$PKG_VERSION" ]; then
|
|
30
|
+
echo "error: asked to publish v${VERSION}, but packages/cli/package.json says v${PKG_VERSION}." >&2
|
|
31
|
+
echo " Run 'node scripts/set-version.mjs ${VERSION}' first so the binary reports it." >&2
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
|
|
35
|
+
# Static entry, not bin/supatype.js: see the comment in src/main.ts.
|
|
36
|
+
ENTRY="$CLI_DIR/dist/main.js"
|
|
37
|
+
if [ ! -f "$ENTRY" ]; then
|
|
38
|
+
echo "error: $ENTRY is missing. Run 'pnpm --filter @supatype/cli build' first." >&2
|
|
39
|
+
exit 1
|
|
40
|
+
fi
|
|
41
|
+
|
|
42
|
+
# name bun target
|
|
43
|
+
ALL_TARGETS=(
|
|
44
|
+
"linux-amd64 bun-linux-x64"
|
|
45
|
+
"linux-arm64 bun-linux-arm64"
|
|
46
|
+
"linux-amd64-musl bun-linux-x64-musl"
|
|
47
|
+
"linux-arm64-musl bun-linux-arm64-musl"
|
|
48
|
+
"darwin-amd64 bun-darwin-x64"
|
|
49
|
+
"darwin-arm64 bun-darwin-arm64"
|
|
50
|
+
"windows-amd64 bun-windows-x64"
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
# ONLY=linux-amd64 builds a single target. The round-trip test uses it to exercise the whole
|
|
54
|
+
# publish-and-install contract in seconds rather than compiling seven binaries.
|
|
55
|
+
TARGETS=()
|
|
56
|
+
for entry in "${ALL_TARGETS[@]}"; do
|
|
57
|
+
read -r n _ <<<"$entry"
|
|
58
|
+
if [ -z "${ONLY:-}" ] || [ "$n" = "$ONLY" ]; then TARGETS+=("$entry"); fi
|
|
59
|
+
done
|
|
60
|
+
if [ ${#TARGETS[@]} -eq 0 ]; then
|
|
61
|
+
echo "error: ONLY='${ONLY:-}' matched no target." >&2
|
|
62
|
+
exit 1
|
|
63
|
+
fi
|
|
64
|
+
|
|
65
|
+
# A leftover archive from a previous run, or from a different version, would otherwise be
|
|
66
|
+
# checksummed and published alongside this version's, since the workflow uploads the whole
|
|
67
|
+
# directory.
|
|
68
|
+
if [ -d "$OUT_DIR" ] && [ -n "$(ls -A "$OUT_DIR" 2>/dev/null)" ]; then
|
|
69
|
+
echo "error: $OUT_DIR is not empty. Remove it first so nothing stale is published." >&2
|
|
70
|
+
exit 1
|
|
71
|
+
fi
|
|
72
|
+
mkdir -p "$OUT_DIR"
|
|
73
|
+
|
|
74
|
+
work="$(mktemp -d)"
|
|
75
|
+
trap 'rm -rf "$work"' EXIT
|
|
76
|
+
mkdir -p "$work/stage"
|
|
77
|
+
|
|
78
|
+
echo "==> packaging supatype CLI v${VERSION}"
|
|
79
|
+
|
|
80
|
+
produced=()
|
|
81
|
+
for entry in "${TARGETS[@]}"; do
|
|
82
|
+
read -r name target <<<"$entry"
|
|
83
|
+
|
|
84
|
+
# Windows is the only target that needs an .exe suffix and a zip. Everything else is a
|
|
85
|
+
# tarball. Both facts follow from the platform, so neither is a column in the table above.
|
|
86
|
+
case "$name" in
|
|
87
|
+
windows-*) exe="supatype.exe"; archive="supatype-cli-${name}.zip" ;;
|
|
88
|
+
*) exe="supatype"; archive="supatype-cli-${name}.tar.gz" ;;
|
|
89
|
+
esac
|
|
90
|
+
|
|
91
|
+
# The executable inside the archive is always called `supatype`, whatever the archive is
|
|
92
|
+
# named, so install.sh and Homebrew need no per-platform knowledge.
|
|
93
|
+
bun build "$ENTRY" --compile --target="$target" --outfile "$work/stage/$exe" >/dev/null
|
|
94
|
+
|
|
95
|
+
case "$archive" in
|
|
96
|
+
*.zip) ( cd "$work/stage" && zip -q "$OUT_DIR/$archive" "$exe" ) ;;
|
|
97
|
+
*) tar -czf "$OUT_DIR/$archive" -C "$work/stage" "$exe" ;;
|
|
98
|
+
esac
|
|
99
|
+
rm -f "$work/stage/$exe"
|
|
100
|
+
|
|
101
|
+
produced+=("$archive")
|
|
102
|
+
printf ' %-22s %s\n' "$name" "$(du -h "$OUT_DIR/$archive" | cut -f1)"
|
|
103
|
+
done
|
|
104
|
+
|
|
105
|
+
# Hashes exactly what this run produced, rather than globbing the directory: publishing a
|
|
106
|
+
# checksum for a file this run did not build is the same mistake as a fresh checksum beside a
|
|
107
|
+
# stale archive, which is what broke `supatype dev` on macOS after the postgres v17.2.2
|
|
108
|
+
# release. Bare names, because that is how install.sh and Homebrew refer to them.
|
|
109
|
+
( cd "$OUT_DIR" && sha256sum "${produced[@]}" > checksums.sha256 )
|
|
110
|
+
|
|
111
|
+
echo "==> checksums.sha256"
|
|
112
|
+
sed 's/^/ /' "$OUT_DIR/checksums.sha256"
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Generate Formula/supatype.rb for the supatype/homebrew-tap repository.
|
|
4
|
+
*
|
|
5
|
+
* Usage:
|
|
6
|
+
* node packages/cli/scripts/generate-homebrew-formula.mjs 0.1.8 /path/to/artifacts
|
|
7
|
+
*
|
|
8
|
+
* The artifacts directory is what build-release-artifacts.sh produced, so it holds the
|
|
9
|
+
* per-platform archives and the checksums.sha256 covering them. Hashes are read from that
|
|
10
|
+
* manifest rather than recomputed: the manifest is the signed record of what was published,
|
|
11
|
+
* and hashing the files again would let a formula disagree with the release it describes.
|
|
12
|
+
*
|
|
13
|
+
* Homebrew on Linux is glibc, so the -musl archives are not referenced here.
|
|
14
|
+
*
|
|
15
|
+
* Optional env:
|
|
16
|
+
* HOMEBREW_FORMULA_OUT: output path (default: ./Formula/supatype.rb relative to cwd)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs"
|
|
20
|
+
import { dirname, join } from "node:path"
|
|
21
|
+
|
|
22
|
+
const PLATFORMS = [
|
|
23
|
+
{ id: "darwin-arm64", os: "macos", arch: "arm" },
|
|
24
|
+
{ id: "darwin-amd64", os: "macos", arch: "intel" },
|
|
25
|
+
{ id: "linux-arm64", os: "linux", arch: "arm" },
|
|
26
|
+
{ id: "linux-amd64", os: "linux", arch: "intel" },
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
const CDN = "https://releases.supatype.com/cli"
|
|
30
|
+
|
|
31
|
+
function usage() {
|
|
32
|
+
console.error(`Usage: ${process.argv[1]} <version> <artifacts-dir>`)
|
|
33
|
+
process.exit(1)
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const version = process.argv[2]?.trim()
|
|
37
|
+
const artifactsDir = process.argv[3]?.trim()
|
|
38
|
+
if (!version || !artifactsDir) usage()
|
|
39
|
+
|
|
40
|
+
const outPath =
|
|
41
|
+
process.env.HOMEBREW_FORMULA_OUT?.trim() ||
|
|
42
|
+
join(process.cwd(), "Formula", "supatype.rb")
|
|
43
|
+
|
|
44
|
+
const manifestPath = join(artifactsDir, "checksums.sha256")
|
|
45
|
+
if (!existsSync(manifestPath)) {
|
|
46
|
+
console.error(`Missing ${manifestPath}. Run build-release-artifacts.sh first.`)
|
|
47
|
+
process.exit(1)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// `<hash> <name>`, or `<hash> *<name>` when the publisher used binary mode.
|
|
51
|
+
const hashes = new Map()
|
|
52
|
+
for (const line of readFileSync(manifestPath, "utf8").split("\n")) {
|
|
53
|
+
const [hash, rawName] = line.trim().split(/\s+/)
|
|
54
|
+
if (hash && rawName) hashes.set(rawName.replace(/^\*/, ""), hash)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const archives = {}
|
|
58
|
+
for (const { id } of PLATFORMS) {
|
|
59
|
+
const name = `supatype-cli-${id}.tar.gz`
|
|
60
|
+
const hash = hashes.get(name)
|
|
61
|
+
if (!hash) {
|
|
62
|
+
console.error(`No checksum for ${name} in ${manifestPath}.`)
|
|
63
|
+
console.error(`Manifest lists: ${[...hashes.keys()].join(", ")}`)
|
|
64
|
+
process.exit(1)
|
|
65
|
+
}
|
|
66
|
+
archives[id] = { name, hash }
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function urlBlock(arch, id) {
|
|
70
|
+
const indent = " "
|
|
71
|
+
const onArch = arch === "arm" ? "on_arm" : "on_intel"
|
|
72
|
+
return `${indent}${onArch} do
|
|
73
|
+
${indent} url "${CDN}/v${version}/${archives[id].name}"
|
|
74
|
+
${indent} sha256 "${archives[id].hash}"
|
|
75
|
+
${indent}end`
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const blocksFor = (os) =>
|
|
79
|
+
PLATFORMS.filter((p) => p.os === os).map((p) => urlBlock(p.arch, p.id)).join("\n")
|
|
80
|
+
|
|
81
|
+
// Every archive holds one executable called `supatype`, whatever the archive is named, so the
|
|
82
|
+
// install step needs no per-platform knowledge. Homebrew unpacks the tarball before `install`
|
|
83
|
+
// runs, which is why this no longer renames a per-platform file.
|
|
84
|
+
const formula = `# typed: false
|
|
85
|
+
# frozen_string_literal: true
|
|
86
|
+
|
|
87
|
+
# AUTO-GENERATED by packages/cli/scripts/generate-homebrew-formula.mjs: do not edit manually.
|
|
88
|
+
# Regenerated on each v* release by supatype/.github/workflows/cli-release.yml and pushed here.
|
|
89
|
+
|
|
90
|
+
class Supatype < Formula
|
|
91
|
+
desc "Type-first platform for PostgreSQL"
|
|
92
|
+
homepage "https://supatype.com"
|
|
93
|
+
version "${version}"
|
|
94
|
+
license "Apache-2.0"
|
|
95
|
+
|
|
96
|
+
on_macos do
|
|
97
|
+
${blocksFor("macos")}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
on_linux do
|
|
101
|
+
${blocksFor("linux")}
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def install
|
|
105
|
+
bin.install "supatype"
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def post_install
|
|
109
|
+
system bin/"supatype", "_postinstall"
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
test do
|
|
113
|
+
assert_match version.to_s, shell_output("#{bin}/supatype --version", 0)
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
`
|
|
117
|
+
|
|
118
|
+
mkdirSync(dirname(outPath), { recursive: true })
|
|
119
|
+
writeFileSync(outPath, formula, "utf8")
|
|
120
|
+
console.log(`Wrote ${outPath} for v${version}`)
|
|
121
|
+
for (const { id } of PLATFORMS) {
|
|
122
|
+
console.log(` ${archives[id].name} ${archives[id].hash.slice(0, 16)}...`)
|
|
123
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# mirror-deno-release.sh
|
|
2
|
+
# mirror-deno-release.sh: Download official Deno release zips and rename to Supatype CDN layout.
|
|
3
3
|
#
|
|
4
4
|
# Output binaries (cwd or $OUT_DIR):
|
|
5
5
|
# deno-linux-amd64, deno-linux-arm64, deno-darwin-amd64, deno-darwin-arm64, deno-windows-amd64.exe
|
package/src/TYPE-RESOLUTION.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Type Resolution in the Schema Extractor
|
|
2
2
|
|
|
3
|
-
`type-extractor.ts` converts TypeScript type definitions into `ExtractedSchemaAst
|
|
3
|
+
`type-extractor.ts` converts TypeScript type definitions into `ExtractedSchemaAst`,
|
|
4
4
|
the JSON handed to the engine binary for SQL generation and client type output.
|
|
5
5
|
|
|
6
6
|
This document explains how type names are resolved, what patterns are supported,
|
|
@@ -12,24 +12,24 @@ and how the three-tier fallback chain works.
|
|
|
12
12
|
|
|
13
13
|
The extractor uses the TypeScript **parser only** (`ts.createSourceFile`), not the
|
|
14
14
|
full type checker. This is fast and requires no `tsconfig.json`, but it means the
|
|
15
|
-
extractor only sees raw source text
|
|
15
|
+
extractor only sees raw source text, it cannot evaluate what a type alias resolves to.
|
|
16
16
|
|
|
17
17
|
The consequence is that any indirection breaks resolution:
|
|
18
18
|
|
|
19
19
|
```typescript
|
|
20
|
-
// Works
|
|
20
|
+
// Works: extractor sees "Optional" literally
|
|
21
21
|
type Post = Model<{ email: Optional<Email> }>
|
|
22
22
|
|
|
23
|
-
// Previously broken
|
|
23
|
+
// Previously broken: extractor sees "Nullable", not "Optional"
|
|
24
24
|
type Nullable<T> = Optional<T>
|
|
25
25
|
type Post = Model<{ email: Nullable<Email> }>
|
|
26
26
|
|
|
27
|
-
// Previously broken
|
|
27
|
+
// Previously broken: import rename
|
|
28
28
|
import { Optional as Maybe } from "@supatype/types"
|
|
29
29
|
type Post = Model<{ email: Maybe<Email> }>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Failures were silent
|
|
32
|
+
Failures were silent: unknown types fell through to `{ kind: "text", pgType: "TEXT" }`
|
|
33
33
|
instead of throwing an error.
|
|
34
34
|
|
|
35
35
|
---
|
|
@@ -40,18 +40,18 @@ Every type name encountered in a field definition is resolved through three tier
|
|
|
40
40
|
in order. The first tier to succeed wins. If all three fail, an error is thrown.
|
|
41
41
|
|
|
42
42
|
```
|
|
43
|
-
Tier 1
|
|
44
|
-
Tier 2
|
|
45
|
-
Tier 3
|
|
43
|
+
Tier 1: syntactic switch instant inline primitives and modifiers by name
|
|
44
|
+
Tier 2: alias registry instant user-defined type aliases, import renames
|
|
45
|
+
Tier 3: TypeScript checker ~300ms† conditional types, mapped types
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
† Tier 3 is **lazy
|
|
48
|
+
† Tier 3 is **lazy**, the `ts.Program` and `TypeChecker` are only created the first
|
|
49
49
|
time a conditional or mapped type is encountered. Schemas that use only tiers 1 and 2
|
|
50
50
|
pay no cost.
|
|
51
51
|
|
|
52
52
|
---
|
|
53
53
|
|
|
54
|
-
## Tier 1
|
|
54
|
+
## Tier 1: Syntactic Switch
|
|
55
55
|
|
|
56
56
|
The existing behaviour. The extractor walks the type reference chain and matches
|
|
57
57
|
names exactly against a hardcoded switch:
|
|
@@ -71,12 +71,12 @@ This covers all types used inline with their canonical names.
|
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
74
|
-
## Tier 2
|
|
74
|
+
## Tier 2: Alias Registry
|
|
75
75
|
|
|
76
76
|
Built once at startup from all source files loaded by `loadSchemaSourceFiles`.
|
|
77
77
|
Covers two sub-cases:
|
|
78
78
|
|
|
79
|
-
### 2a
|
|
79
|
+
### 2a: Type alias declarations
|
|
80
80
|
|
|
81
81
|
Any `type X = ...` that is not a `Model<>` declaration is indexed by name:
|
|
82
82
|
|
|
@@ -103,7 +103,7 @@ type B = Optional<Email>
|
|
|
103
103
|
Cycle detection via a `resolving: Set<string>` guard prevents infinite loops and
|
|
104
104
|
throws a descriptive error instead.
|
|
105
105
|
|
|
106
|
-
### 2b
|
|
106
|
+
### 2b: Import renames
|
|
107
107
|
|
|
108
108
|
Explicit `as` renames in import statements are indexed per file:
|
|
109
109
|
|
|
@@ -123,17 +123,17 @@ the current file. `Maybe` becomes `Optional`, `MaybeNull` becomes `Nullable`
|
|
|
123
123
|
into the source file set and their aliases are available in the registry.
|
|
124
124
|
|
|
125
125
|
Only relative specifiers (`.`-prefixed) are followed. Bare specifiers and scoped
|
|
126
|
-
packages (`@supatype/types`, `node_modules/*`) are not loaded
|
|
126
|
+
packages (`@supatype/types`, `node_modules/*`) are not loaded, their exported
|
|
127
127
|
names are already covered by the tier 1 switch.
|
|
128
128
|
|
|
129
129
|
---
|
|
130
130
|
|
|
131
|
-
## Tier 3
|
|
131
|
+
## Tier 3: TypeScript Checker
|
|
132
132
|
|
|
133
133
|
Required for types that cannot be evaluated syntactically:
|
|
134
134
|
|
|
135
|
-
- **Conditional types**: `T extends U ? A : B
|
|
136
|
-
- **Mapped types**: `{ [K in keyof T]: F<T[K]> }
|
|
135
|
+
- **Conditional types**: `T extends U ? A : B`, requires evaluating the constraint
|
|
136
|
+
- **Mapped types**: `{ [K in keyof T]: F<T[K]> }`, requires enumerating `keyof T`
|
|
137
137
|
|
|
138
138
|
### How it works
|
|
139
139
|
|
|
@@ -147,7 +147,7 @@ Required for types that cannot be evaluated syntactically:
|
|
|
147
147
|
3. `checker.getTypeAtLocation(programNode)` resolves the type fully.
|
|
148
148
|
|
|
149
149
|
4. `checker.typeToString(type, ..., TypeFormatFlags.UseAliasDefinedOutsideCurrentScope)`
|
|
150
|
-
converts it back to a string with **alias names preserved
|
|
150
|
+
converts it back to a string with **alias names preserved**, so `Optional<Email>`
|
|
151
151
|
stays as `Optional<Email>` rather than expanding to the underlying branded
|
|
152
152
|
intersection type.
|
|
153
153
|
|
|
@@ -160,7 +160,7 @@ Required for types that cannot be evaluated syntactically:
|
|
|
160
160
|
|
|
161
161
|
- A field type is directly a conditional or mapped expression
|
|
162
162
|
- A tier 2 alias body contains a conditional or mapped type (detected by
|
|
163
|
-
`needsChecker()` before text substitution is attempted
|
|
163
|
+
`needsChecker()` before text substitution is attempted, the original node,
|
|
164
164
|
which has valid source positions, is passed to the checker instead)
|
|
165
165
|
- The `Model<>` fields argument is a mapped type alias:
|
|
166
166
|
```typescript
|
|
@@ -175,40 +175,40 @@ Required for types that cannot be evaluated syntactically:
|
|
|
175
175
|
## What Is Supported
|
|
176
176
|
|
|
177
177
|
```typescript
|
|
178
|
-
// Tier 1
|
|
178
|
+
// Tier 1: inline, canonical names
|
|
179
179
|
email: Optional<Email>
|
|
180
180
|
slug: Unique<Slug<"title">>
|
|
181
181
|
id: PrimaryKey<UUID>
|
|
182
182
|
|
|
183
|
-
// Tier 2a
|
|
183
|
+
// Tier 2a: simple alias
|
|
184
184
|
type Nullable<T> = Optional<T>
|
|
185
185
|
type UniqueSlug = Unique<Slug<"title">>
|
|
186
186
|
email: Nullable<Email>
|
|
187
187
|
slug: UniqueSlug
|
|
188
188
|
|
|
189
|
-
// Tier 2a
|
|
189
|
+
// Tier 2a: multi-hop
|
|
190
190
|
type A = B
|
|
191
191
|
type B = Nullable<Email>
|
|
192
192
|
email: A
|
|
193
193
|
|
|
194
|
-
// Tier 2b
|
|
194
|
+
// Tier 2b: import rename of primitive
|
|
195
195
|
import { Optional as Maybe } from "@supatype/types"
|
|
196
196
|
email: Maybe<Email>
|
|
197
197
|
|
|
198
|
-
// Tier 2b
|
|
198
|
+
// Tier 2b: import rename of local alias
|
|
199
199
|
import { Nullable as MaybeNull } from "./field-types"
|
|
200
200
|
email: MaybeNull<Email>
|
|
201
201
|
|
|
202
|
-
// Tier 2b
|
|
202
|
+
// Tier 2b: cross-file alias (no rename)
|
|
203
203
|
// helpers.ts: export type Nullable<T> = Optional<T>
|
|
204
204
|
import { Nullable } from "./helpers"
|
|
205
205
|
email: Nullable<Email>
|
|
206
206
|
|
|
207
|
-
// Tier 3
|
|
207
|
+
// Tier 3: conditional type
|
|
208
208
|
type NullableStr<T> = T extends string ? Optional<T> : T
|
|
209
209
|
email: NullableStr<Email>
|
|
210
210
|
|
|
211
|
-
// Tier 3
|
|
211
|
+
// Tier 3: mapped type as fields object
|
|
212
212
|
type AllOptional<T> = { [K in keyof T]: Optional<T[K]> }
|
|
213
213
|
type Post = Model<AllOptional<{ email: Email; name: Text }>>
|
|
214
214
|
```
|
|
@@ -225,10 +225,10 @@ import { SomeHelper } from "some-library"
|
|
|
225
225
|
// symbols only available in node_modules (other than @supatype/types)
|
|
226
226
|
|
|
227
227
|
// TypeScript utility types used as field types
|
|
228
|
-
email: NonNullable<string> // error
|
|
228
|
+
email: NonNullable<string> // error, not a @supatype/types primitive
|
|
229
229
|
|
|
230
230
|
// Namespace-qualified names
|
|
231
|
-
email: Types.Optional<Email> // error
|
|
231
|
+
email: Types.Optional<Email> // error, only identifier references are resolved
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
---
|
|
@@ -290,5 +290,5 @@ type CheckerContext = {
|
|
|
290
290
|
## Adding a New Tier 1 Primitive
|
|
291
291
|
|
|
292
292
|
When a new type is added to `@supatype/types`, add a `case` to the `switch` in
|
|
293
|
-
`parseScalarType`. No other changes are needed
|
|
293
|
+
`parseScalarType`. No other changes are needed, tier 2 and tier 3 handle
|
|
294
294
|
aliases and compositions of it automatically.
|
package/src/app/framework.ts
CHANGED
|
@@ -41,7 +41,7 @@ const FRAMEWORK_DETECTION: Array<{ dep: string; framework: AppFramework }> = [
|
|
|
41
41
|
{ dep: "@remix-run/react", framework: "remix-spa" },
|
|
42
42
|
{ dep: "@sveltejs/kit", framework: "sveltekit" },
|
|
43
43
|
{ dep: "nuxt", framework: "nuxt" },
|
|
44
|
-
// Vite last
|
|
44
|
+
// Vite last: many frameworks use Vite under the hood
|
|
45
45
|
{ dep: "vite", framework: "vite" },
|
|
46
46
|
]
|
|
47
47
|
|