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
5 changes: 5 additions & 0 deletions .changeset/dry-pears-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"liminal-util": patch
---

Add new alchemicals for platform worker usage.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- run: "git -c url.https://github.com/.insteadOf=git@github.com: submodule update --init konfik"
- uses: crosshatch/konfik/.github/actions/configure_environment@main
- run: pnpm build
- uses: crosshatch/konfik/.github/actions/alchemize@main
- uses: alchemy-run/alchemy-effect@main
with:
working-directory: docs
env:
Expand Down
2 changes: 1 addition & 1 deletion konfik
26 changes: 0 additions & 26 deletions liminal-util/alchemicals/GithubEnv.ts

This file was deleted.

6 changes: 2 additions & 4 deletions liminal-util/alchemicals/PrComment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@ import * as GitHub from "alchemy/GitHub"
import * as Output from "alchemy/Output"
import { Data, Effect, String } from "effect"

import { GithubEnv } from "./GithubEnv.ts"

export class NotInPrError extends Data.TaggedError("NotInPrError")<{}> {}

export const PrComment =
(resourceId: string) =>
<Args extends Array<any>>(template: TemplateStringsArray, ...args: Args) =>
Effect.gen(function* () {
const env = yield* GithubEnv
const env = yield* GitHub.GitHubEnv
if (env) {
const { owner, repository, pr } = env
if (pr) {
Expand All @@ -32,7 +30,7 @@ export const PrPreviewComment = Effect.fn(function* <R = never>({
readonly name: string
readonly url: string | undefined | Output.Output<string | undefined, R>
}) {
const env = yield* GithubEnv
const env = yield* GitHub.GitHubEnv
if (env) {
const { sha } = env
yield* PrComment("PreviewComment")`
Expand Down
7 changes: 7 additions & 0 deletions liminal-util/alchemicals/Prelude.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Stack } from "alchemy"
import { ConfigProvider, Effect } from "effect"

export const layer = ConfigProvider.layerAdd(
Stack.pipe(Effect.map(({ stage }) => ConfigProvider.fromUnknown({ ALCHEMY_STAGE: stage }))),
{ asPrimary: true },
)
11 changes: 9 additions & 2 deletions liminal-util/alchemicals/WorkerConfig.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import type { WorkerProps } from "alchemy/Cloudflare"
import { Stage } from "alchemy/Stage"
import { Stack } from "alchemy/Stack"
import { Effect } from "effect"

export const domain = (domain: string) =>
Stack.pipe(
Effect.map(({ stage }) =>
stage === "prod" ? prepends(domain) : stage.startsWith("staging-") ? prepends(`${stage}.${domain}`) : undefined,
),
)

export const WorkerConfig = Effect.fn(function* ({
domain,
assets,
}: {
readonly domain: string
readonly assets?: string | undefined
}) {
const stage = yield* Stage
const { stage } = yield* Stack
return {
observability: { enabled: true },
placement: { mode: "smart" },
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
"typescript": "catalog:",
"vitest": "catalog:"
},
"packageManager": "pnpm@11.11.0"
"packageManager": "pnpm@11.13.0"
}
3,184 changes: 2,073 additions & 1,111 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

37 changes: 19 additions & 18 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ allowBuilds:
esbuild: true
msgpackr-extract: true
sharp: true
vue-demi: true
workerd: true

allowUnusedPatches: true
Expand All @@ -24,48 +25,48 @@ patchedDependencies:
catalog:
"@changesets/changelog-github": ^0.7.0
"@changesets/cli": ^2.31.0
"@cloudflare/vitest-pool-workers": ^0.14.7
"@cloudflare/workers-types": ^4.20260414.1
"@cloudflare/vitest-pool-workers": ^0.18.4
"@cloudflare/workers-types": ^5.20260713.1
"@effect/ai-openai-compat": 4.0.0-beta.97
"@effect/atom-react": 4.0.0-beta.97
"@effect/language-service": ^0.86.6
"@effect/platform-browser": ^4.0.0-beta.97
"@effect/platform-node": ^4.0.0-beta.97
"@effect/sql-d1": ^4.0.0-beta.97
"@effect/platform-browser": 4.0.0-beta.97
"@effect/platform-node": 4.0.0-beta.97
"@effect/sql-d1": 4.0.0-beta.97
"@effect/sql-pg": 4.0.0-beta.97
"@effect/tsgo": 0.16.0
"@effect/vitest": 4.0.0-beta.97
"@oxlint/plugins": ^1.73.0
"@tailwindcss/vite": ^4.1.18
"@tanstack/react-router": ^1.159.4
"@tanstack/router-plugin": ^1.159.4
"@tailwindcss/vite": ^4.3.2
"@tanstack/react-router": ^1.170.18
"@tanstack/router-plugin": ^1.168.20
"@types/node": ^26.1.1
"@types/react": ^19.2.17
"@types/react-dom": ^19.2.3
"@vitejs/plugin-react": ^6.0.1
"@vitejs/plugin-react": ^6.0.3
"@vitest/browser": ^4.1.10
"@vitest/coverage-v8": ^4.1.10
"@vitest/expect": ^4.1.10
"@vitest/web-worker": ^4.1.10
asciify-engine: ^1.0.118
alchemy: https://pkg.ing/alchemy/bec01fd
alchemy: 2.0.0-beta.62
babel-plugin-react-compiler: ^1.0.0
drizzle-kit: 1.0.0-rc.4
drizzle-orm: 1.0.0-rc.4
effect: ^4.0.0-beta.97
effect: 4.0.0-beta.97
happy-dom: ^20.10.6
oxfmt: ^0.58.0
oxlint: ^1.73.0
playwright: ^1.61.1
react: ^19.2.5
react-dom: ^19.2.5
react: ^19.2.7
react-dom: ^19.2.7
tailwindcss: ^4.1.18
turbo: ^2.10.4
turbo: ^2.10.5
typescript: ^7.0.2
vite: ^8.1.2
vitest: 4.1.4
vocs: ^2.0.15
waku: 1.0.0-beta.3
vite: ^8.1.4
vitest: 4.1.10
vocs: 2.5.3
waku: 1.0.0-beta.6

overrides:
"@types/react": ^19.2.14
Expand Down
Loading