diff --git a/alchemy.run.ts b/alchemy.run.ts index d670cd5..4d8b3c9 100644 --- a/alchemy.run.ts +++ b/alchemy.run.ts @@ -126,18 +126,18 @@ export default Alchemy.Stack( ); } // The initial access token that the production registration saved. - const production = IdentityHub.Client.read("SignInClient", { stage: "prod" }); + const production = IdentityHub.Client.read("HubClient", { stage: "prod" }); const development = yield* Convex.Deployment("Development", { project, type: "dev", name: selected, }).pipe(adopt(true)); const signIn = IdentityHub.Client.variables( - yield* IdentityHub.Client("SignInClient", { + yield* IdentityHub.Client("HubClient", { app: IDENTITY_HUB_APP, hub: HUB, connectors: ["google"], - redirectUri: Output.interpolate`${development.siteUrl}${HUB_CALLBACK_PATH}`, + redirectUris: [Output.interpolate`${development.siteUrl}${HUB_CALLBACK_PATH}`], deploymentType: "development", initialAccessToken: production.initialAccessToken, softwareVersion: commit, @@ -176,11 +176,13 @@ export default Alchemy.Stack( // wait for the push and does not change the address. A destroy leaves a production client on // the hub. const signIn = IdentityHub.Client.variables( - yield* IdentityHub.Client("SignInClient", { + yield* IdentityHub.Client("HubClient", { app: IDENTITY_HUB_APP, hub: HUB, connectors: ["google"], - redirectUri: Output.map(push.siteUrl, () => `${PRODUCTION_SITE_URL}${HUB_CALLBACK_PATH}`), + redirectUris: Output.map(push.siteUrl, () => [ + `${PRODUCTION_SITE_URL}${HUB_CALLBACK_PATH}`, + ]), deploymentType: "production", softwareVersion: commit, required: true, @@ -238,11 +240,11 @@ export default Alchemy.Stack( source: { path: "./convex", command: ["node", "./scripts/deploy-preview.ts"] }, }).pipe(adopt(true), Alchemy.RemovalPolicy.destroy()); const signIn = IdentityHub.Client.variables( - yield* IdentityHub.Client("SignInClient", { + yield* IdentityHub.Client("HubClient", { app: IDENTITY_HUB_APP, hub: HUB, connectors: ["google"], - redirectUri: Output.interpolate`${preview.siteUrl}${HUB_CALLBACK_PATH}`, + redirectUris: [Output.interpolate`${preview.siteUrl}${HUB_CALLBACK_PATH}`], deploymentType: "preview", softwareVersion: commit, required: true, diff --git a/docs/deploy.md b/docs/deploy.md index fe4bb33..ea7a24d 100644 --- a/docs/deploy.md +++ b/docs/deploy.md @@ -109,7 +109,7 @@ the pull request number: pnpm exec alchemy destroy --stage pr-123 --dry-run --no-input ``` -The plan deletes `Preview`, `SignInClient`, and `Site` and orphans `Project` and `PreviewComment`. +The plan deletes `Preview`, `HubClient`, and `Site` and orphans `Project` and `PreviewComment`. Orphaned resources remain on their providers but leave the stage state during an actual destroy. The dry run changes neither resources nor stage state. Keep previews for open pull requests. diff --git a/package.json b/package.json index 26b28cd..68a761e 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "@alchemy.run/cloudflare": "2.0.0-beta.85", "@alchemy.run/github": "2.0.0-beta.85", "@effect/platform-node": "4.1.2", - "@samebase/alchemy-convex": "0.38.0", + "@samebase/alchemy-convex": "0.39.1", "@types/node": "^24.19.2", "alchemy": "2.0.0-beta.85", "effect": "4.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 682ff9c..b4286ac 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -217,8 +217,8 @@ importers: specifier: 4.1.2 version: 4.1.2(effect@4.1.2)(redis@6.3.0) '@samebase/alchemy-convex': - specifier: 0.38.0 - version: 0.38.0(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(alchemy@2.0.0-beta.85(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(@types/react@19.3.0)(@voidzero-dev/vite-plus-core@1.3.0(@types/node@24.19.2)(esbuild@0.27.0)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.1))(effect@4.1.2)(ws@8.22.0))(convex@1.48.0(react@19.3.1))(effect@4.1.2) + specifier: 0.39.1 + version: 0.39.1(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(alchemy@2.0.0-beta.85(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(@types/react@19.3.0)(@voidzero-dev/vite-plus-core@1.3.0(@types/node@24.19.2)(esbuild@0.27.0)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.1))(effect@4.1.2)(ws@8.22.0))(convex@1.48.0(react@19.3.1))(effect@4.1.2) '@types/node': specifier: ^24.19.2 version: 24.19.2 @@ -2625,8 +2625,8 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@samebase/alchemy-convex@0.38.0': - resolution: {integrity: sha512-fkmxZueiEdMN4D0epMoyOVqtcbdhvoprZUJ3PrLUMjKTrD763PARO9ImmMBeH2S97L5ffHQASNJhm8oe9buVNw==} + '@samebase/alchemy-convex@0.39.1': + resolution: {integrity: sha512-KpCa1mMjO7I/K9kKvJS3Ftg3fPMn9XGU1NFU0mUdCfB+UojD0WpHL1/lSQC7zUYE8oO5TCYAcHyKTvzLr+91hg==} engines: {node: '>=22'} hasBin: true peerDependencies: @@ -8221,7 +8221,7 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@samebase/alchemy-convex@0.38.0(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(alchemy@2.0.0-beta.85(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(@types/react@19.3.0)(@voidzero-dev/vite-plus-core@1.3.0(@types/node@24.19.2)(esbuild@0.27.0)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.1))(effect@4.1.2)(ws@8.22.0))(convex@1.48.0(react@19.3.1))(effect@4.1.2)': + '@samebase/alchemy-convex@0.39.1(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(alchemy@2.0.0-beta.85(@effect/platform-node@4.1.2(effect@4.1.2)(redis@6.3.0))(@types/react@19.3.0)(@voidzero-dev/vite-plus-core@1.3.0(@types/node@24.19.2)(esbuild@0.27.0)(jiti@2.7.0)(typescript@7.0.2)(yaml@2.9.1))(effect@4.1.2)(ws@8.22.0))(convex@1.48.0(react@19.3.1))(effect@4.1.2)': dependencies: '@convex-dev/platform': 0.1.11 '@effect/platform-node': 4.1.2(effect@4.1.2)(redis@6.3.0)