node v2 cli support (#36309)
This commit is contained in:
parent
27e1692848
commit
a1b274e6f8
75 changed files with 1502 additions and 367 deletions
4
packages/core/src/image/photon-wasm.bun.ts
Normal file
4
packages/core/src/image/photon-wasm.bun.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
// @ts-ignore Bun embeds static file imports when compiling the CLI.
|
||||
import photonWasm from "@silvia-odwyer/photon-node/photon_rs_bg.wasm" with { type: "file" }
|
||||
|
||||
export default photonWasm
|
||||
4
packages/core/src/image/photon-wasm.node.ts
Normal file
4
packages/core/src/image/photon-wasm.node.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
import { createRequire } from "node:module"
|
||||
|
||||
export default process.env.OPENCODE_PHOTON_WASM_PATH ??
|
||||
createRequire(import.meta.url).resolve("@silvia-odwyer/photon-node/photon_rs_bg.wasm")
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
// @ts-ignore Bun's static file import is embedded by `bun build --compile`; some consumers also declare *.wasm.
|
||||
import photonWasm from "@silvia-odwyer/photon-node/photon_rs_bg.wasm" with { type: "file" }
|
||||
import photonWasm from "#photon-wasm"
|
||||
import { Effect } from "effect"
|
||||
import path from "node:path"
|
||||
import { fileURLToPath } from "node:url"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue