Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions alchemy.run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion docs/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 5 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading