foldkit-plus 0.17.0 → 0.19.0
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/README.md +241 -28
- package/dist/cli.mjs +10930 -35
- package/dist/cli.mjs.map +1 -1
- package/dist/docs.d.mts +89 -0
- package/dist/docs.d.mts.map +1 -0
- package/dist/docs.mjs +290 -0
- package/dist/docs.mjs.map +1 -0
- package/dist/project.d.mts +45 -0
- package/dist/project.d.mts.map +1 -0
- package/dist/project.mjs +221 -0
- package/dist/project.mjs.map +1 -0
- package/dist/remote/filter.d.mts +1 -0
- package/dist/remote/filter.mjs +2 -0
- package/dist/remote/live.d.mts +1 -0
- package/dist/remote/live.mjs +2 -0
- package/dist/remote/outbox.d.mts +1 -0
- package/dist/remote/outbox.mjs +2 -0
- package/dist/remote/overlay.d.mts +1 -0
- package/dist/remote/overlay.mjs +2 -0
- package/dist/remote/persistence.d.mts +1 -0
- package/dist/remote/persistence.mjs +2 -0
- package/dist/remote/testing.d.mts +1 -0
- package/dist/remote/testing.mjs +2 -0
- package/dist/remote/why.d.mts +1 -0
- package/dist/remote/why.mjs +2 -0
- package/dist/setup.d.mts +45 -7
- package/dist/setup.d.mts.map +1 -1
- package/dist/setup.mjs +168 -25
- package/dist/setup.mjs.map +1 -1
- package/dist/testing/peer.d.mts +8 -0
- package/dist/testing/peer.d.mts.map +1 -0
- package/dist/testing/peer.mjs +19 -0
- package/dist/testing/peer.mjs.map +1 -0
- package/dist/testing/playwright.d.mts +84 -0
- package/dist/testing/playwright.d.mts.map +1 -0
- package/dist/testing/playwright.mjs +327 -0
- package/dist/testing/playwright.mjs.map +1 -0
- package/dist/testing/workers.d.mts +177 -0
- package/dist/testing/workers.d.mts.map +1 -0
- package/dist/testing/workers.mjs +593 -0
- package/dist/testing/workers.mjs.map +1 -0
- package/package.json +126 -59
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workers.mjs","names":["watch","watchFile"],"sources":["../../src/testing/workers.ts"],"sourcesContent":["/**\n * `foldkit-plus/testing/workers`: a Worker on a local workerd, configured by\n * its own Wrangler configuration.\n *\n * Wrangler's test harness reads the configuration, so bindings, the\n * compatibility date and flags, `.dev.vars` and D1 migrations mean here what\n * they mean to `wrangler deploy`. This module owns only what Wrangler cannot\n * know: the bundle. esbuild builds the entry with the workspace's source\n * condition into a directory of the stack's own, and the harness runs the\n * configuration with `main` pointed there.\n *\n * `wrangler`, `esbuild` and `@foldkit/vite-plugin` are optional peers of\n * `foldkit-plus`, loaded on the first call; Miniflare is read from Wrangler's\n * own copy, so the date check asks the runtime Wrangler starts.\n */\nimport { Option, Schema } from 'effect'\nimport type {\n BuildContext,\n BuildOptions,\n Loader,\n OnLoadArgs,\n OnLoadResult,\n OutputFile,\n Plugin,\n} from 'esbuild'\nimport type { TestHarness, WorkerHandle } from 'wrangler'\nimport { ChildProcess, spawn } from 'node:child_process'\nimport { subscribe, unsubscribe } from 'node:diagnostics_channel'\nimport { readFileSync, watch as watchFile, type FSWatcher } from 'node:fs'\nimport { mkdir, readFile, rm, writeFile } from 'node:fs/promises'\nimport { createInterface } from 'node:readline'\nimport { createRequire } from 'node:module'\nimport { tmpdir } from 'node:os'\nimport { basename, dirname, extname, join, relative, resolve } from 'node:path'\nimport { peer } from './peer.js'\n\nconst SUBPATH = 'testing/workers'\n\nconst wrangler = () => peer(SUBPATH, 'wrangler', () => import('wrangler'))\nconst esbuild = () => peer(SUBPATH, 'esbuild', () => import('esbuild'))\nconst foldkitVite = () =>\n peer(SUBPATH, '@foldkit/vite-plugin', () => import('@foldkit/vite-plugin'))\n\nexport interface StackOptions {\n /** The Worker's Wrangler configuration (`wrangler.toml`, `.json` or `.jsonc`). */\n readonly wrangler: string\n /** The source esbuild bundles into what `main` names. */\n readonly entry: string\n /**\n * Local values for vars the deployed Worker is given elsewhere. As a\n * function, of the origin the stack answers at: the Worker has them from\n * its first request (`origin => ({ ORIGIN: origin })`).\n */\n readonly vars?: Vars | ((origin: string) => Vars)\n /** Local values for secrets, over any in `.dev.vars`. */\n readonly secrets?: Readonly<Record<string, string>>\n /**\n * esbuild plugins for the bundle, the deploy's and the stack's alike. A\n * module one loads is branded with view identities as one read from disk is.\n */\n readonly plugins?: ReadonlyArray<Plugin>\n /**\n * The Vite root of the page the Worker renders; by default the folder of\n * the Wrangler configuration. Each view is named by its module's path from\n * here, as `@foldkit/vite-plugin` names the page's.\n */\n readonly pageRoot?: string\n /**\n * Whether each line the Worker writes to its console is printed here, by\n * its level, as it arrives (`'print'`, the default). `logs()` keeps them either way.\n */\n readonly console?: 'print' | 'quiet'\n}\n\ntype Vars = Readonly<Record<string, string>>\n\n/** A line the Worker wrote to its console. An `Error` logged carries its stack in `message`. */\nexport interface WorkerLog {\n /** As workerd names it: `debug`, `info`, `log`, `warn` or `error`. */\n readonly level: string\n readonly message: string\n readonly timestamp: number\n}\n\n/**\n * What a watched stack reports after each change to the bundle's sources or\n * to the Wrangler configuration.\n */\nexport interface WatchListener {\n /** The new Worker answers at the same origin, over the same storage. */\n readonly onSwap: () => void\n /**\n * The change was not swapped in, and the Worker running keeps answering\n * over the same storage. It did not build, built no code (as an entry saved\n * in place reads for a moment), did not start when tried on a workerd of\n * its own, or is a configuration the stack refuses. Or it was swapped in,\n * and a D1 migration then failed on the running database; the message says so.\n */\n readonly onRefused: (message: string) => void\n /**\n * A Worker that started when tried did not start in the stack. Wrangler's\n * harness tears its runtime down with it, storage included, so the stack\n * has stopped answering and watches no more: call `stop`, and start again.\n */\n readonly onStopped: (message: string) => void\n}\n\nexport interface Stack<Env> {\n /** Where the Worker answers over real HTTP. */\n readonly origin: string\n /**\n * The Worker's bindings, as the Worker sees them. A swap retires the ones\n * read before it (Miniflare's \"poisoned stub\"), so read them after.\n */\n readonly env: () => Promise<Env>\n /** A request straight to the Worker; an upgrade answers with its socket. */\n readonly dispatch: WorkerHandle['fetch']\n /**\n * Takes what the Worker wrote to its console since the last call, oldest\n * first. The lines come from workerd beside the response, not on it, so a\n * line written for a request may arrive after it: poll.\n */\n readonly logs: () => ReadonlyArray<WorkerLog>\n /**\n * Requests sent straight to the Worker, metered for `Cpu.budget` by how\n * long workerd's main thread runs, read from the operating system since\n * workerd reports no CPU (Linux and Windows). That counts the Worker's code\n * and what workerd does on the thread around it, D1's SQLite included,\n * which a deployed Worker's CPU time leaves out.\n */\n readonly cpu: CpuMeter\n /**\n * Rebuilds on every change to a file the bundle read, and rereads the\n * Wrangler configuration when it changes. Each change is first started on\n * a workerd of its own, then swapped in at the same origin, and the D1\n * migrations not yet applied are applied. D1, R2 and Durable Object storage stay.\n */\n readonly watch: (listener: WatchListener) => Promise<void>\n /**\n * Stops watching, stops workerd and removes the bundle's directory, each\n * even when one before it failed. A change not yet being tried swaps\n * nothing and reports nothing; one being tried finishes first. A second\n * call returns the first one's promise.\n */\n readonly stop: () => Promise<void>\n}\n\n/** What a meter answers: a `Response`, or Miniflare's own. */\nexport type CpuAnswer = Pick<Response, 'status' | 'arrayBuffer'>\n\n/** Answers requests, and reads how much CPU time the code answering them has spent. */\nexport interface CpuMeter {\n /** What a route given as a path is resolved against. */\n readonly origin: string\n readonly fetch: (request: Request) => Promise<CpuAnswer>\n /** Milliseconds of CPU time spent so far, from a fixed point of the meter's own. */\n readonly spent: () => Promise<number>\n}\n\n/**\n * A route `Cpu.budget` asks: a path or URL to `GET`, or a function making\n * a new request for each run, since a request's body is read once.\n */\nexport type CpuRoute = string | (() => Request)\n\n/** What one route cost, in milliseconds of CPU time. */\nexport interface CpuReading {\n readonly route: string\n /** The last response's status. */\n readonly status: number\n /** The route's first request in this call: in a fresh stack, a cold isolate's. */\n readonly cold: number\n /** The mean of the requests after the first. */\n readonly warm: number\n}\n\nexport interface CpuBudget {\n /** The routes, by the name a failure reports them with. */\n readonly routes: Readonly<Record<string, CpuRoute>>\n /** Milliseconds a warm request may spend. */\n readonly warm: number\n /** Milliseconds the first request may spend; unchecked when not given. */\n readonly cold?: number\n /** Requests after the first, each answered in full before the next; default 5. */\n readonly runs?: number\n}\n\n/** The processes spawned while a stack's harness starts or reloads; workerd among them. */\ninterface Spawned {\n readonly processes: Array<ChildProcess>\n /** Another stack spawned at the same time, so whose process is whose is unknown. */\n shared: boolean\n}\n\nconst collecting = new Set<Spawned>()\n\n// Named once spawned: Node publishes a process before it starts it.\nconst isWorkerd = (child: ChildProcess) =>\n typeof child.spawnfile === 'string' && /^workerd(\\.exe)?$/.test(basename(child.spawnfile))\n\n// Node publishes every `spawn` here, workerd's by Miniflare included; the\n// harness offers no other way to find the process.\nconst onSpawn = (message: unknown) => {\n if (typeof message !== 'object' || message === null || !('process' in message)) return\n const child = message.process\n if (!(child instanceof ChildProcess)) return\n for (const spawned of collecting) spawned.processes.push(child)\n}\n\n/** Runs `step`, adding the processes it spawns to `into`. */\nconst collect = async <A>(into: Spawned, step: () => Promise<A>): Promise<A> => {\n if (collecting.size === 0) subscribe('child_process', onSpawn)\n for (const other of collecting) other.shared = into.shared = true\n collecting.add(into)\n try {\n return await step()\n } finally {\n collecting.delete(into)\n if (collecting.size === 0) unsubscribe('child_process', onSpawn)\n }\n}\n\nconst isRunning = (child: ChildProcess) => child.exitCode === null && child.signalCode === null\n\n/** Milliseconds a Linux process's main thread has run, by the scheduler's nanoseconds. */\nconst linuxTime = async (pid: number): Promise<number> =>\n Number((await readFile(`/proc/${pid}/task/${pid}/schedstat`, 'utf8')).split(' ')[0]) / 1e6\n\n/**\n * Reads how long processes' main threads have run, where workerd runs\n * JavaScript. V8's helper threads, which collect garbage and compile beside\n * it, are left out: on a server-rendered page they added half as much again.\n */\ninterface CpuReader {\n readonly read: (pids: ReadonlyArray<number>) => Promise<number>\n readonly close: () => void\n}\n\nconst linuxReader = (): CpuReader => ({\n read: async pids => (await Promise.all(pids.map(linuxTime))).reduce((a, b) => a + b, 0),\n close: () => {},\n})\n\n/**\n * Windows has no `/proc`, and Node no call for another process's times, so\n * one PowerShell kept open answers each read: started per read, it takes\n * longer than the requests it measures. The main thread is the one that\n * started first. Windows adds to a thread's time a scheduler tick (15.6 ms)\n * at a time.\n */\nconst windowsReader = (): CpuReader => {\n const shell = spawn('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', '-'], {\n stdio: ['pipe', 'pipe', 'ignore'],\n windowsHide: true,\n })\n const waiting: Array<(line: Option.Option<string>) => void> = []\n createInterface({ input: shell.stdout }).on('line', line => waiting.shift()?.(Option.some(line)))\n // A shell that could not start, or ended, answers no read waiting on it.\n const ended = () => waiting.splice(0).forEach(answer => answer(Option.none()))\n shell.on('error', ended).on('exit', ended)\n return {\n read: pids =>\n new Promise((resolve, reject) => {\n waiting.push(line => {\n const ticks = Number(Option.getOrElse(line, () => ''))\n if (Option.isSome(line) && Number.isFinite(ticks)) resolve(ticks / 1e4)\n else\n reject(\n new Error(\n `workerd's CPU time could not be read: ${Option.getOrElse(line, () => 'PowerShell ended')}`,\n ),\n )\n })\n shell.stdin.write(\n `try { (@(${pids.join(',')}) | % { ([Diagnostics.Process]::GetProcessById($_).Threads | Sort-Object StartTime | Select-Object -First 1).TotalProcessorTime.Ticks } | Measure-Object -Sum).Sum } catch { \"$_\" }\\n`,\n )\n }),\n close: () => shell.kill(),\n }\n}\n\nconst readerFor = (): CpuReader => {\n if (process.platform === 'linux') return linuxReader()\n if (process.platform === 'win32') return windowsReader()\n throw new Error(\n `The stack reads workerd's CPU time on Linux and Windows, not ${process.platform}.`,\n )\n}\n\n/** The CPU meter over a stack's workerd processes, its reader made on the first read. */\nconst workerdMeter = (origin: string, dispatch: WorkerHandle['fetch'], spawned: Spawned) => {\n let reader = Option.none<CpuReader>()\n const meter: CpuMeter = {\n origin,\n // Straight to the Worker: over `origin` a second workerd, which proxies\n // what the harness serves, would spend time of its own on every request.\n fetch: async request =>\n dispatch(request.url, {\n method: request.method,\n headers: [...request.headers],\n ...(request.body === null ? {} : { body: await request.arrayBuffer() }),\n }),\n spent: async () => {\n if (spawned.shared)\n throw new Error(\n 'Another stack started in this process while this one did, so whose workerd is ' +\n \"whose is unknown: start stacks one at a time to read a stack's CPU.\",\n )\n const current = Option.getOrElse(reader, readerFor)\n reader = Option.some(current)\n return current.read(\n spawned.processes\n .filter(child => isWorkerd(child) && isRunning(child))\n .flatMap(child => (child.pid === undefined ? [] : [child.pid])),\n )\n },\n }\n return { meter, close: () => Option.map(reader, open => open.close()) }\n}\n\n/**\n * Asks each route once, then `runs` times more, one request at a time, each\n * response read in full, and reads what each cost. Throws listing every\n * reading when a route spends more than the budget, or answers a 5xx, whose\n * cost says nothing of the route's.\n */\nconst budget = async (\n meter: CpuMeter,\n { routes, warm, cold, runs = 5 }: CpuBudget,\n): Promise<ReadonlyArray<CpuReading>> => {\n if (!Number.isInteger(runs) || runs < 1)\n throw new Error(`Cpu.budget: runs must be a whole number from 1, not ${runs}.`)\n const requestOf = (route: CpuRoute) =>\n typeof route === 'string' ? new Request(new URL(route, meter.origin)) : route()\n const readings: Array<CpuReading> = []\n for (const [name, route] of Object.entries(routes)) {\n let status = 0\n const ask = async () => {\n const response = await meter.fetch(requestOf(route))\n await response.arrayBuffer()\n status = response.status\n if (status >= 500) throw new Error(`Cpu.budget: ${name} answered ${status}.`)\n }\n const start = await meter.spent()\n await ask()\n const first = await meter.spent()\n for (let run = 0; run < runs; run++) await ask()\n const end = await meter.spent()\n readings.push({ route: name, status, cold: first - start, warm: (end - first) / runs })\n }\n const over = readings.filter(\n reading => reading.warm > warm || (cold !== undefined && reading.cold > cold),\n )\n if (over.length > 0)\n throw new Error(\n `Over the CPU budget (warm ${warm} ms${cold === undefined ? '' : `, cold ${cold} ms`}): ` +\n `${over.map(reading => reading.route).join(', ')}\\n` +\n readings\n .map(\n reading =>\n ` ${reading.route}: cold ${reading.cold.toFixed(2)} ms, ` +\n `warm ${reading.warm.toFixed(2)} ms (status ${reading.status})`,\n )\n .join('\\n'),\n )\n return readings\n}\n\nconst pause = new Int32Array(new SharedArrayBuffer(4))\n\n/**\n * Milliseconds this thread has run. Linux books a running thread's time at\n * each scheduler tick (4 ms at 250 Hz), and `threadCpuUsage` reads that\n * book; a millisecond's sleep has the scheduler book the rest, and its own\n * count is in nanoseconds. Read synchronously, so on this thread rather\n * than the pool's.\n */\nconst threadTime = (): number => {\n if (process.platform === 'linux') {\n Atomics.wait(pause, 0, 0, 1)\n return Number(readFileSync('/proc/thread-self/schedstat', 'utf8').split(' ')[0]) / 1e6\n }\n const { user, system } = process.threadCpuUsage()\n return (user + system) / 1000\n}\n\n/**\n * A meter over `answer` run in this process, by this thread's CPU time: for\n * a Worker's handler Node can run (no D1 or other binding of workerd's),\n * whose work happens on the thread that awaits it.\n */\nconst inThread = (\n answer: (request: Request) => Promise<CpuAnswer>,\n origin = 'http://localhost',\n): CpuMeter => ({ origin, fetch: answer, spent: async () => threadTime() })\n\n/**\n * What a request costs in CPU time, which Miniflare neither limits nor\n * reports, while a deployed Worker fails past its plan's limit (error 1102).\n * `Cpu.budget` reads routes through a meter: a stack's `cpu`, or `Cpu.inThread`.\n */\nexport const Cpu = { budget, inThread } as const\n\n/**\n * The part of the configuration the stack reads itself. Wrangler validates\n * the whole of it when the harness loads it.\n */\nconst Config = Schema.Struct({\n main: Schema.String,\n compatibility_date: Schema.String,\n // The stack bundles; Wrangler bundling `main` again would deploy other code.\n no_bundle: Schema.Literal(true),\n d1_databases: Schema.optional(Schema.Array(Schema.Struct({ binding: Schema.String }))),\n})\n\n/**\n * The newest date the workerd Wrangler starts supports, from Wrangler's own\n * Miniflare: an application's own `miniflare` may be another release. Call it\n * after `wrangler()`, which says so when Wrangler is missing.\n */\nconst supportedDate = (): string => {\n const fromWrangler = createRequire(createRequire(import.meta.url).resolve('wrangler'))\n return Schema.decodeUnknownSync(Schema.Struct({ supportedCompatibilityDate: Schema.String }))(\n fromWrangler('miniflare'),\n ).supportedCompatibilityDate\n}\n\nconst readConfig = async (path: string) => {\n const { experimental_readRawConfig } = await wrangler()\n const { rawConfig: raw } = experimental_readRawConfig({ config: path })\n if ('env' in raw)\n throw new Error(`${path}: the local stack runs the top-level Worker; [env.*] is not read.`)\n const config = Schema.decodeUnknownSync(Config)(raw)\n // Miniflare would run a date it does not know at its own latest, with a\n // warning nobody reads, and the tests would pass on a runtime the deploy does not get.\n const supported = supportedDate()\n if (config.compatibility_date > supported)\n throw new Error(\n `${path} asks for compatibility_date ${config.compatibility_date}, but the installed ` +\n `workerd supports up to ${supported}. Move wrangler to a release that knows it.`,\n )\n return { raw, config }\n}\n\n// The modules Vite's view-identity transform reads, and the loader each is read with.\nconst scriptLoaders: Readonly<Record<string, Loader>> = {\n '.ts': 'ts',\n '.mts': 'ts',\n '.tsx': 'tsx',\n '.js': 'js',\n '.mjs': 'js',\n '.jsx': 'jsx',\n}\nconst SCRIPT = /\\.(?:ts|tsx|js|jsx|mts|mjs)$/\nconst scripts = new Set(Object.values(scriptLoaders))\n// Vite skips installed packages: Foldkit's own, whose brand would stamp every vnode as it is made.\nconst isPackaged = (path: string) => /[\\\\/]node_modules[\\\\/]/.test(path)\n\n/**\n * The plugins, with the Worker's views branded as `@foldkit/vite-plugin`\n * brands the page's build: each function's result named by its module's path\n * from `root`. Foldkit adopts a served element only where that name is the\n * one the browser's view gives it; unbranded, the Worker's page was rebuilt on\n * every hydration, silently in production (#412).\n *\n * Vite brands what any load returns, but esbuild takes the first `onLoad`\n * that answers, so each plugin's is wrapped and a module it loads (with\n * `pnpm mutate`'s edits, say) is branded too. `foldkit/brand` resolves from\n * `root`, as the page's does; a root that resolves none has no Foldkit page\n * to match, and the Worker is bundled as written.\n */\nconst viewIdentity = (root: string, plugins: ReadonlyArray<Plugin>): Array<Plugin> => {\n // Found at each build's start, so a watched stack sees Foldkit installed.\n let brand = Option.none<string>()\n const resolving = Symbol('foldkit/brand')\n const brands = ({ path, namespace }: OnLoadArgs) =>\n Option.isSome(brand) && namespace === 'file' && SCRIPT.test(path) && !isPackaged(path)\n /** `contents` branded, or none where nothing in them returns. */\n const branded = async (\n contents: string | Uint8Array,\n loader: Loader,\n path: string,\n ): Promise<Option.Option<string>> => {\n const { transform } = await esbuild()\n const { transformViewIdentity } = await foldkitVite()\n // The brand reads JavaScript, as Vite hands it over after its own TypeScript pass.\n const { code } = await transform(contents, { loader, sourcefile: path })\n return Option.fromNullOr(transformViewIdentity(code, path, root)).pipe(\n Option.map(result => result.code),\n )\n }\n const brandedResult = async (result: OnLoadResult, args: OnLoadArgs): Promise<OnLoadResult> => {\n const loader = result.loader ?? scriptLoaders[extname(args.path)]\n const { contents } = result\n if (!brands(args) || contents === undefined || loader === undefined || !scripts.has(loader))\n return result\n return Option.match(await branded(contents, loader, args.path), {\n onNone: () => result,\n onSome: contents => ({ ...result, contents, loader: 'js' }),\n })\n }\n const wrapped = (plugin: Plugin): Plugin => ({\n ...plugin,\n setup: build =>\n plugin.setup({\n ...build,\n onLoad: (options, load) =>\n build.onLoad(options, async args => {\n const result = await load(args)\n return result === null || result === undefined ? result : brandedResult(result, args)\n }),\n }),\n })\n return [\n {\n name: 'foldkit-view-identity',\n setup: build => {\n build.onStart(async () => {\n const found = await build.resolve('foldkit/brand', {\n kind: 'import-statement',\n resolveDir: root,\n pluginData: resolving,\n })\n brand = found.errors.length === 0 ? Option.some(found.path) : Option.none()\n })\n build.onResolve({ filter: /^foldkit\\/brand$/ }, args =>\n args.pluginData === resolving\n ? undefined\n : Option.match(brand, { onNone: () => undefined, onSome: path => ({ path }) }),\n )\n },\n },\n ...plugins.map(wrapped),\n {\n // Last: a module no plugin loaded, read from disk.\n name: 'foldkit-view-identity-load',\n setup: build =>\n build.onLoad({ filter: SCRIPT }, async args => {\n const loader = scriptLoaders[extname(args.path)]\n if (!brands(args) || loader === undefined) return undefined\n const code = await branded(await readFile(args.path), loader, args.path)\n return Option.match(code, {\n onNone: () => undefined,\n onSome: contents => ({ contents, loader: 'js' as const }),\n })\n }),\n },\n ]\n}\n\n/**\n * How the entry is bundled, for the stack and for `wrangler deploy`: the\n * script at `outfile`, and beside it any `.wasm` it imports, which `no_bundle`\n * Wrangler loads as a compiled module. `node:*` stays external for\n * `nodejs_compat`.\n */\nconst bundleOptions = (options: StackOptions, outfile: string) =>\n ({\n entryPoints: [options.entry],\n bundle: true,\n format: 'esm',\n platform: 'browser',\n conditions: ['foldkit-plus:source'],\n external: ['cloudflare:workers', 'node:*'],\n loader: { '.wasm': 'copy' },\n plugins: viewIdentity(\n resolve(options.pageRoot ?? dirname(options.wrangler)),\n options.plugins ?? [],\n ),\n outdir: dirname(outfile),\n entryNames: basename(outfile, '.js'),\n write: false,\n logLevel: 'silent',\n }) satisfies BuildOptions\n\ntype OutputFiles = ReadonlyArray<OutputFile>\n\nconst writeOutputs = async (\n files: ReadonlyArray<{ readonly path: string; readonly contents: Uint8Array }>,\n) => {\n for (const file of files) {\n await mkdir(dirname(file.path), { recursive: true })\n await writeFile(file.path, file.contents)\n }\n}\n\nconst identityOf = (files: OutputFiles) => files.map(file => `${file.path}:${file.hash}`).join()\n\n/** Node's console method for each level workerd writes; any other prints as a log. */\nconst printers = new Map<string, (line: string) => void>([\n ['debug', line => console.debug(line)],\n ['info', line => console.info(line)],\n ['warn', line => console.warn(line)],\n ['error', line => console.error(line)],\n])\n\nconst print = (log: WorkerLog) =>\n (printers.get(log.level) ?? (line => console.log(line)))(`[worker] ${log.message}`)\n\nconst errorText = (error: unknown) => (error instanceof Error ? error.message : String(error))\n\n/** Writes the bundle where `main` says, for `wrangler deploy`. */\nconst writeBundle = async (options: Omit<StackOptions, 'vars' | 'secrets'>): Promise<void> => {\n const { config } = await readConfig(options.wrangler)\n const outfile = resolve(dirname(options.wrangler), config.main)\n const { build } = await esbuild()\n await writeOutputs((await build(bundleOptions(options, outfile))).outputFiles)\n}\n\ntype Raw = Awaited<ReturnType<typeof readConfig>>['raw']\n\n/** What the stack runs: a configuration and a bundle, swapped in together. */\ninterface Running {\n readonly raw: Raw\n readonly config: typeof Config.Type\n readonly files: OutputFiles\n}\n\nconst migrate = async (worker: WorkerHandle, config: typeof Config.Type) => {\n for (const database of config.d1_databases ?? []) await worker.applyD1Migrations(database.binding)\n}\n\n/**\n * Starts the Worker with a fresh, migrated D1 for each `[[d1_databases]]`,\n * and empty R2 and Durable Object storage. Each call is a stack of its own,\n * so test files running side by side share nothing.\n */\nconst start = async <Env>(options: StackOptions): Promise<Stack<Env>> => {\n const { raw, config } = await readConfig(options.wrangler)\n const { build, context } = await esbuild()\n const { createTestHarness } = await wrangler()\n const directory = join(tmpdir(), `foldkit-workers-${crypto.randomUUID()}`)\n const outfile = join(directory, basename(config.main))\n // Where a change is started on a workerd of its own before the swap.\n const trialDirectory = join(directory, 'trial')\n const bundle = bundleOptions(options, outfile)\n // In memory: a source that does not build fails here, before anything exists to clean up.\n const first = (await build(bundle)).outputFiles\n\n const optionsFor = (raw: Raw, main: string, vars: Vars | undefined) => ({\n root: dirname(options.wrangler),\n workers: [{ config: { ...raw, main }, vars, secrets: options.secrets }],\n })\n const given = options.vars\n // Given here, or once the stack knows its origin.\n let vars = typeof given === 'function' ? undefined : given\n const harness: TestHarness = createTestHarness(optionsFor(raw, outfile, vars))\n const spawned: Spawned = { processes: [], shared: false }\n // Where a trial's workerd goes: collected only so that a stack starting beside it knows.\n const trials: Spawned = { processes: [], shared: false }\n let closeMeter = () => {}\n // The harness keeps workerd's console and offers no handler, so it is drained:\n // read and cleared in one synchronous step, nothing is read twice or missed.\n const kept: Array<WorkerLog> = []\n const drain = () => {\n const fresh = harness.getLogs()\n harness.clearLogs()\n if (options.console !== 'quiet') fresh.forEach(print)\n kept.push(...fresh)\n }\n const draining = setInterval(drain, 100)\n draining.unref()\n let watching = Option.none<Promise<BuildContext>>()\n let configWatcher = Option.none<FSWatcher>()\n let rereading = Option.none<ReturnType<typeof setTimeout>>()\n // Swaps run one at a time, in the order their changes arrived.\n let swaps: Promise<void> = Promise.resolve()\n let stopping = Option.none<Promise<void>>()\n const dispose = async (watcher: Promise<BuildContext>) => {\n // A context that never opened has nothing to dispose; its failure was the watch's to report.\n const opened = await watcher.then(Option.some, () => Option.none<BuildContext>())\n if (Option.isSome(opened)) await opened.value.dispose()\n }\n // Each step runs however the one before it ended: a step skipped leaves\n // workerd running, or the bundle's directory behind.\n const stopOnce = async () => {\n clearInterval(draining)\n closeMeter()\n Option.map(rereading, clearTimeout)\n Option.map(configWatcher, watcher => watcher.close())\n try {\n const watcher = watching\n watching = Option.none()\n // Waits for a rebuild in flight, whose step sees `stopping`.\n if (Option.isSome(watcher)) await dispose(watcher.value)\n await swaps\n } finally {\n try {\n await harness.close()\n } finally {\n // What the Worker wrote since the last drain, up to its end, is printed and kept.\n drain()\n await rm(directory, { recursive: true, force: true })\n }\n }\n }\n const stop = () =>\n Option.getOrElse(stopping, () => {\n const once = stopOnce()\n stopping = Option.some(once)\n return once\n })\n\n try {\n await writeOutputs(first)\n const { url } = await collect(spawned, () => harness.listen())\n // A reload at the same origin, as a swap is, before any request of the caller's.\n if (typeof given === 'function') {\n vars = given(url.origin)\n await collect(spawned, () => harness.update(optionsFor(raw, outfile, vars)))\n }\n const worker = harness.getWorker()\n const metered = workerdMeter(url.origin, worker.fetch, spawned)\n closeMeter = metered.close\n await migrate(worker, config)\n\n const watch = async (listener: WatchListener) => {\n if (Option.isSome(stopping)) throw new Error('This stack has stopped.')\n if (Option.isSome(watching)) throw new Error('This stack is already watching.')\n // None once a swap failed after its trial and took the runtime with it.\n let running = Option.some<Running>({ raw, config, files: first })\n\n /**\n * Starts `next` on a workerd of its own, then swaps it in. A Worker\n * that does not start is refused there, and the stack's harness, which\n * a failed update tears down with its storage, never sees it.\n */\n const swap = async (next: Running) => {\n try {\n await writeOutputs(\n next.files.map(file => ({\n path: join(trialDirectory, relative(directory, file.path)),\n contents: file.contents,\n })),\n )\n const trial = createTestHarness(\n optionsFor(next.raw, join(trialDirectory, basename(outfile)), vars),\n )\n try {\n await collect(trials, () => trial.listen())\n await migrate(trial.getWorker(), next.config)\n } finally {\n await trial.close()\n }\n } catch (error) {\n listener.onRefused(errorText(error))\n return\n }\n try {\n await writeOutputs(next.files)\n await collect(spawned, () => harness.update(optionsFor(next.raw, outfile, vars)))\n } catch (error) {\n running = Option.none()\n listener.onStopped(errorText(error))\n return\n }\n running = Option.some(next)\n try {\n await migrate(harness.getWorker(), next.config)\n } catch (error) {\n listener.onRefused(\n `The Worker was swapped in, but a migration failed: ${errorText(error)}`,\n )\n return\n }\n listener.onSwap()\n }\n /** Queues a swap of what `change` makes of the running stack, which may be none. */\n const enqueue = (change: (now: Running) => Promise<Option.Option<Running>>) => {\n const step = swaps.then(async () => {\n // A step that runs once `stop` began swaps nothing: `stop` waits for\n // it before closing the harness, so it would swap into a closing stack.\n if (Option.isNone(running) || Option.isSome(stopping)) return\n const next = await change(running.value)\n if (Option.isSome(next)) await swap(next.value)\n })\n // A listener that throws fails its own step, not the ones after it.\n swaps = step.catch(() => undefined)\n return step\n }\n\n const watcher = context({\n ...bundle,\n plugins: [\n ...bundle.plugins,\n {\n name: 'foldkit-swap',\n setup: build =>\n build.onEnd(result =>\n enqueue(async now => {\n if (result.errors.length > 0) {\n listener.onRefused(result.errors.map(error => error.text).join('\\n'))\n return Option.none()\n }\n const files = result.outputFiles ?? []\n // An editor saving in place empties the file before writing it, and a\n // rebuild can read it then; the write's own rebuild swaps.\n if (files.some(file => file.path === outfile && file.contents.length === 0)) {\n listener.onRefused(\n `${options.entry} bundles to no code, so no Worker could start.`,\n )\n return Option.none()\n }\n return identityOf(files) === identityOf(now.files)\n ? Option.none()\n : Option.some({ ...now, files })\n }),\n ),\n },\n ],\n })\n watching = Option.some(watcher)\n try {\n await (await watcher).watch()\n } catch (error) {\n // Not watching after all: `stop` must not wait on this context, nor a second `watch` be refused.\n if (Option.contains(watching, watcher)) {\n watching = Option.none()\n await dispose(watcher)\n }\n throw error\n }\n // A `stop` that began while the context opened would close no watcher made now.\n if (Option.isSome(stopping)) return\n\n const reread = () =>\n enqueue(async now => {\n const read = await readConfig(options.wrangler).then(Option.some, (error: unknown) => {\n listener.onRefused(errorText(error))\n return Option.none<Awaited<ReturnType<typeof readConfig>>>()\n })\n // A save that changed nothing the configuration says.\n return read.pipe(\n Option.filter(({ raw }) => JSON.stringify(raw) !== JSON.stringify(now.raw)),\n Option.map(({ raw, config }) => ({ ...now, raw, config })),\n )\n })\n // The directory, not the file: an editor that renames a temporary over the\n // file replaces what a file watcher watches.\n const name = basename(options.wrangler)\n configWatcher = Option.some(\n watchFile(dirname(options.wrangler), (_, changed) => {\n if (changed !== name) return\n // One reread for the burst of events a single save makes.\n Option.map(rereading, clearTimeout)\n rereading = Option.some(setTimeout(() => void reread(), 50))\n }).on('error', error =>\n listener.onRefused(`The configuration is no longer watched: ${errorText(error)}`),\n ),\n )\n }\n\n const env = () => harness.getWorker<Env>().getEnv()\n const logs = () => {\n drain()\n return kept.splice(0)\n }\n return {\n origin: url.origin,\n env,\n dispatch: worker.fetch,\n logs,\n cpu: metered.meter,\n watch,\n stop,\n }\n } catch (error) {\n // The start's failure is the one to report; a failure cleaning up after it would hide it.\n await stop().catch(() => undefined)\n throw error\n }\n}\n\n/**\n * The local Workers stack. `Stack.start` runs the Worker for tests and\n * development; `Stack.writeBundle` writes what `wrangler deploy` uploads,\n * bundled the same way.\n */\nexport const Stack = { start, writeBundle } as const\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAoCA,MAAM,UAAU;AAEhB,MAAM,iBAAiB,KAAK,SAAS,kBAAkB,OAAO,WAAW;AACzE,MAAM,gBAAgB,KAAK,SAAS,iBAAiB,OAAO,UAAU;AACtE,MAAM,oBACJ,KAAK,SAAS,8BAA8B,OAAO,uBAAuB;AAyJ5E,MAAM,6BAAa,IAAI,IAAa;AAGpC,MAAM,aAAa,UACjB,OAAO,MAAM,cAAc,YAAY,oBAAoB,KAAK,SAAS,MAAM,SAAS,CAAC;AAI3F,MAAM,WAAW,YAAqB;CACpC,IAAI,OAAO,YAAY,YAAY,YAAY,QAAQ,EAAE,aAAa,UAAU;CAChF,MAAM,QAAQ,QAAQ;CACtB,IAAI,EAAE,iBAAiB,eAAe;CACtC,KAAK,MAAM,WAAW,YAAY,QAAQ,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AAS,UAAU,UAAU,KAAK,CAAC;KACnC,OAAO,OAAO,KAA6C;IAC7D,CAAC,EAAA,CAEW,KACV,OAAO,QAAQ,EAAE,UAAU,KAAK,UAAU,GAAG,MAAM,KAAK,UAAU,IAAI,GAAG,CAAC,GAC1E,OAAO,KAAK,EAAE,KAAK,cAAc;KAAE,GAAG;KAAK;KAAK;IAAO,EAAE,CAC3D;GACF,CAAC;GAGH,MAAM,OAAO,SAAS,QAAQ,QAAQ;GACtC,gBAAgB,OAAO,KACrBC,MAAU,QAAQ,QAAQ,QAAQ,IAAI,GAAG,YAAY;IACnD,IAAI,YAAY,MAAM;IAEtB,OAAO,IAAI,WAAW,YAAY;IAClC,YAAY,OAAO,KAAK,iBAAiB,KAAK,OAAO,GAAG,EAAE,CAAC;GAC7D,CAAC,CAAC,CAAC,GAAG,UAAS,UACb,SAAS,UAAU,2CAA2C,UAAU,KAAK,GAAG,CAClF,CACF;EACF;EAEA,MAAM,YAAY,QAAQ,UAAe,CAAC,CAAC,OAAO;EAClD,MAAM,aAAa;GACjB,MAAM;GACN,OAAO,KAAK,OAAO,CAAC;EACtB;EACA,OAAO;GACL,QAAQ,IAAI;GACZ;GACA,UAAU,OAAO;GACjB;GACA,KAAK,QAAQ;GACb,OAAA;GACA;EACF;CACF,SAAS,OAAO;EAEd,MAAM,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;EAClC,MAAM;CACR;AACF;;;;;;AAOA,MAAa,QAAQ;CAAE;CAAO;AAAY"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "foldkit-plus",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Every Foldkit Plus package in one install,
|
|
3
|
+
"version": "0.19.0",
|
|
4
|
+
"description": "Every Foldkit Plus package in one install, `npx foldkit-plus setup`, which tells a coding agent how to start, and `npx foldkit-plus docs`, which answers from the installed docs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"foldkit",
|
|
7
7
|
"effect",
|
|
@@ -33,6 +33,16 @@
|
|
|
33
33
|
"types": "./dist/index.d.mts",
|
|
34
34
|
"import": "./dist/index.mjs"
|
|
35
35
|
},
|
|
36
|
+
"./testing/workers": {
|
|
37
|
+
"foldkit-plus:source": "./src/testing/workers.ts",
|
|
38
|
+
"types": "./dist/testing/workers.d.mts",
|
|
39
|
+
"import": "./dist/testing/workers.mjs"
|
|
40
|
+
},
|
|
41
|
+
"./testing/playwright": {
|
|
42
|
+
"foldkit-plus:source": "./src/testing/playwright.ts",
|
|
43
|
+
"types": "./dist/testing/playwright.d.mts",
|
|
44
|
+
"import": "./dist/testing/playwright.mjs"
|
|
45
|
+
},
|
|
36
46
|
"./agent": {
|
|
37
47
|
"foldkit-plus:source": "./src/agent.ts",
|
|
38
48
|
"types": "./dist/agent.d.mts",
|
|
@@ -433,11 +443,46 @@
|
|
|
433
443
|
"types": "./dist/remote.d.mts",
|
|
434
444
|
"import": "./dist/remote.mjs"
|
|
435
445
|
},
|
|
446
|
+
"./remote/filter": {
|
|
447
|
+
"foldkit-plus:source": "./src/remote/filter.ts",
|
|
448
|
+
"types": "./dist/remote/filter.d.mts",
|
|
449
|
+
"import": "./dist/remote/filter.mjs"
|
|
450
|
+
},
|
|
451
|
+
"./remote/live": {
|
|
452
|
+
"foldkit-plus:source": "./src/remote/live.ts",
|
|
453
|
+
"types": "./dist/remote/live.d.mts",
|
|
454
|
+
"import": "./dist/remote/live.mjs"
|
|
455
|
+
},
|
|
456
|
+
"./remote/outbox": {
|
|
457
|
+
"foldkit-plus:source": "./src/remote/outbox.ts",
|
|
458
|
+
"types": "./dist/remote/outbox.d.mts",
|
|
459
|
+
"import": "./dist/remote/outbox.mjs"
|
|
460
|
+
},
|
|
461
|
+
"./remote/overlay": {
|
|
462
|
+
"foldkit-plus:source": "./src/remote/overlay.ts",
|
|
463
|
+
"types": "./dist/remote/overlay.d.mts",
|
|
464
|
+
"import": "./dist/remote/overlay.mjs"
|
|
465
|
+
},
|
|
466
|
+
"./remote/persistence": {
|
|
467
|
+
"foldkit-plus:source": "./src/remote/persistence.ts",
|
|
468
|
+
"types": "./dist/remote/persistence.d.mts",
|
|
469
|
+
"import": "./dist/remote/persistence.mjs"
|
|
470
|
+
},
|
|
436
471
|
"./remote/port": {
|
|
437
472
|
"foldkit-plus:source": "./src/remote/port.ts",
|
|
438
473
|
"types": "./dist/remote/port.d.mts",
|
|
439
474
|
"import": "./dist/remote/port.mjs"
|
|
440
475
|
},
|
|
476
|
+
"./remote/testing": {
|
|
477
|
+
"foldkit-plus:source": "./src/remote/testing.ts",
|
|
478
|
+
"types": "./dist/remote/testing.d.mts",
|
|
479
|
+
"import": "./dist/remote/testing.mjs"
|
|
480
|
+
},
|
|
481
|
+
"./remote/why": {
|
|
482
|
+
"foldkit-plus:source": "./src/remote/why.ts",
|
|
483
|
+
"types": "./dist/remote/why.d.mts",
|
|
484
|
+
"import": "./dist/remote/why.mjs"
|
|
485
|
+
},
|
|
441
486
|
"./remote-drizzle": {
|
|
442
487
|
"foldkit-plus:source": "./src/remote-drizzle.ts",
|
|
443
488
|
"types": "./dist/remote-drizzle.d.mts",
|
|
@@ -580,55 +625,59 @@
|
|
|
580
625
|
"LICENSE"
|
|
581
626
|
],
|
|
582
627
|
"dependencies": {
|
|
583
|
-
"foldkit-agent": "0.8.
|
|
584
|
-
"foldkit-agent-
|
|
585
|
-
"foldkit-agent-mcp": "0.
|
|
586
|
-
"foldkit-
|
|
587
|
-
"foldkit-
|
|
588
|
-
"foldkit-
|
|
589
|
-
"foldkit-bundle-surface": "0.
|
|
590
|
-
"foldkit-cms": "0.
|
|
591
|
-
"foldkit-
|
|
592
|
-
"foldkit-
|
|
593
|
-
"foldkit-
|
|
594
|
-
"foldkit-
|
|
595
|
-
"foldkit-entity": "0.
|
|
596
|
-
"foldkit-
|
|
597
|
-
"foldkit-
|
|
598
|
-
"foldkit-
|
|
599
|
-
"foldkit-guard": "0.6.0",
|
|
628
|
+
"foldkit-agent-a2a": "0.8.0",
|
|
629
|
+
"foldkit-agent-webmcp": "0.9.0",
|
|
630
|
+
"foldkit-agent-mcp": "0.9.0",
|
|
631
|
+
"foldkit-builder": "0.5.0",
|
|
632
|
+
"foldkit-bundle": "0.10.0",
|
|
633
|
+
"foldkit-agent": "0.10.0",
|
|
634
|
+
"foldkit-bundle-surface": "0.6.0",
|
|
635
|
+
"foldkit-cms": "0.10.0",
|
|
636
|
+
"foldkit-composition": "0.5.0",
|
|
637
|
+
"foldkit-data-grid": "0.5.0",
|
|
638
|
+
"foldkit-durable": "0.11.0",
|
|
639
|
+
"foldkit-form": "0.10.0",
|
|
640
|
+
"foldkit-entity": "0.15.0",
|
|
641
|
+
"foldkit-guard": "0.8.0",
|
|
642
|
+
"foldkit-media": "0.5.0",
|
|
643
|
+
"foldkit-form-recipes": "0.3.0",
|
|
600
644
|
"foldkit-metadata": "0.1.0",
|
|
601
|
-
"foldkit-
|
|
602
|
-
"foldkit-
|
|
603
|
-
"foldkit-
|
|
604
|
-
"foldkit-mixins-
|
|
605
|
-
"foldkit-mixins-
|
|
606
|
-
"foldkit-mixins-
|
|
607
|
-
"foldkit-mixins-surface": "0.
|
|
608
|
-
"foldkit-mixins-
|
|
609
|
-
"foldkit-
|
|
610
|
-
"foldkit-
|
|
611
|
-
"foldkit-
|
|
612
|
-
"foldkit-
|
|
613
|
-
"foldkit-
|
|
614
|
-
"foldkit-richtext-
|
|
615
|
-
"foldkit-
|
|
616
|
-
"foldkit-
|
|
617
|
-
"foldkit-
|
|
618
|
-
"foldkit-
|
|
619
|
-
"foldkit-
|
|
645
|
+
"foldkit-mixins": "0.22.0",
|
|
646
|
+
"foldkit-crud": "0.13.0",
|
|
647
|
+
"foldkit-mirror": "0.8.0",
|
|
648
|
+
"foldkit-mixins-builder": "0.5.0",
|
|
649
|
+
"foldkit-mixins-crud": "0.11.0",
|
|
650
|
+
"foldkit-mixins-form": "0.12.0",
|
|
651
|
+
"foldkit-mixins-surface": "0.8.0",
|
|
652
|
+
"foldkit-mixins-richtext": "0.7.0",
|
|
653
|
+
"foldkit-mixins-data-grid": "0.4.0",
|
|
654
|
+
"foldkit-richtext": "0.7.0",
|
|
655
|
+
"foldkit-remote": "0.23.0",
|
|
656
|
+
"foldkit-primitives": "0.17.0",
|
|
657
|
+
"foldkit-remote-server": "0.20.0",
|
|
658
|
+
"foldkit-richtext-code": "0.4.0",
|
|
659
|
+
"foldkit-richtext-dom": "0.8.0",
|
|
660
|
+
"foldkit-richtext-markdown": "0.5.0",
|
|
661
|
+
"foldkit-site": "0.6.0",
|
|
662
|
+
"foldkit-surface": "0.12.0",
|
|
663
|
+
"foldkit-ssr": "0.10.0",
|
|
664
|
+
"foldkit-sync": "0.14.0"
|
|
620
665
|
},
|
|
621
666
|
"peerDependencies": {
|
|
622
|
-
"effect": "^4.
|
|
623
|
-
"foldkit": "^0.
|
|
624
|
-
"foldkit-
|
|
625
|
-
"
|
|
626
|
-
"
|
|
627
|
-
"
|
|
628
|
-
"foldkit-
|
|
629
|
-
"foldkit-
|
|
667
|
+
"effect": "^4.1.0",
|
|
668
|
+
"foldkit": "^0.170.0",
|
|
669
|
+
"@foldkit/vite-plugin": "^0.29.0",
|
|
670
|
+
"esbuild": "^0.28.0",
|
|
671
|
+
"playwright": "^1.64.0",
|
|
672
|
+
"wrangler": "^4.116.0",
|
|
673
|
+
"foldkit-auth": "^0.3.0",
|
|
674
|
+
"foldkit-agent-native": "^0.8.0",
|
|
675
|
+
"foldkit-react": "^0.6.0",
|
|
676
|
+
"foldkit-remote-drizzle": "^0.17.0",
|
|
630
677
|
"foldkit-react-codegen": "^0.3.0",
|
|
631
|
-
"foldkit-
|
|
678
|
+
"foldkit-mixins-ui": "^0.23.0",
|
|
679
|
+
"foldkit-cms-drizzle": "^0.8.0",
|
|
680
|
+
"foldkit-richtext-code-shiki": "^0.4.0"
|
|
632
681
|
},
|
|
633
682
|
"peerDependenciesMeta": {
|
|
634
683
|
"foldkit-agent-native": {
|
|
@@ -654,29 +703,47 @@
|
|
|
654
703
|
},
|
|
655
704
|
"foldkit-richtext-code-shiki": {
|
|
656
705
|
"optional": true
|
|
706
|
+
},
|
|
707
|
+
"@foldkit/vite-plugin": {
|
|
708
|
+
"optional": true
|
|
709
|
+
},
|
|
710
|
+
"esbuild": {
|
|
711
|
+
"optional": true
|
|
712
|
+
},
|
|
713
|
+
"playwright": {
|
|
714
|
+
"optional": true
|
|
715
|
+
},
|
|
716
|
+
"wrangler": {
|
|
717
|
+
"optional": true
|
|
657
718
|
}
|
|
658
719
|
},
|
|
659
720
|
"devDependencies": {
|
|
660
|
-
"
|
|
661
|
-
"foldkit": "0.
|
|
721
|
+
"@cloudflare/workers-types": "5.20261022.1",
|
|
722
|
+
"@foldkit/vite-plugin": "0.29.0",
|
|
723
|
+
"effect": "^4.1.1",
|
|
724
|
+
"esbuild": "0.28.2",
|
|
725
|
+
"foldkit": "0.170.0",
|
|
726
|
+
"playwright": "^1.64.1",
|
|
662
727
|
"tsdown": "^0.23.1",
|
|
663
728
|
"tsx": "^4.23.15",
|
|
664
729
|
"typescript": "7.0.2",
|
|
665
|
-
"
|
|
666
|
-
"
|
|
667
|
-
"foldkit-
|
|
668
|
-
"foldkit-
|
|
730
|
+
"vite": "8.3.5",
|
|
731
|
+
"wrangler": "4.116.0",
|
|
732
|
+
"foldkit-auth": "0.3.0",
|
|
733
|
+
"foldkit-agent-native": "0.8.0",
|
|
734
|
+
"foldkit-cms-drizzle": "0.8.0",
|
|
735
|
+
"foldkit-mixins-ui": "0.23.0",
|
|
736
|
+
"foldkit-react": "0.6.0",
|
|
669
737
|
"foldkit-react-codegen": "0.3.0",
|
|
670
|
-
"foldkit-
|
|
671
|
-
"foldkit-
|
|
672
|
-
"foldkit-richtext-code-shiki": "0.2.5"
|
|
738
|
+
"foldkit-richtext-code-shiki": "0.4.0",
|
|
739
|
+
"foldkit-remote-drizzle": "0.17.0"
|
|
673
740
|
},
|
|
674
741
|
"setup": {
|
|
675
|
-
"foldkit": "0.
|
|
676
|
-
"effect": "4.
|
|
742
|
+
"foldkit": "0.170.0",
|
|
743
|
+
"effect": "4.1.1"
|
|
677
744
|
},
|
|
678
745
|
"scripts": {
|
|
679
|
-
"build": "tsdown",
|
|
746
|
+
"build": "node ../../scripts/declarations.mjs . && tsdown && node ../../scripts/declared-any.mjs .",
|
|
680
747
|
"generate": "tsx scripts/generate.ts",
|
|
681
748
|
"typecheck": "tsc -b"
|
|
682
749
|
}
|