mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
0f557d5ae4
* Statically inject workflow world target * Fix static world injection in host bundles * Fix static world injection gaps * Fix Vite Nitro server startup * Fix Nitro pg-native aliasing * Fix static world target CI gaps * Fix static world dev rebuild gaps * Avoid broad runtime alias in Nitro * Refresh Next dev route for step HMR * Externalize Nest target world * Use canary HMR rediscovery timeout * Bundle local world in Nest builds * Dedupe world target helpers and fix SvelteKit chunk patch guard
17 lines
522 B
TypeScript
17 lines
522 B
TypeScript
import { createWorld as createPostgresWorld } from '@workflow/world-postgres';
|
|
import { definePlugin } from 'nitro';
|
|
import { setWorld } from 'workflow/runtime';
|
|
|
|
// Start the Postgres World
|
|
// Needed since we test this in CI
|
|
export default definePlugin(async () => {
|
|
if (process.env.WORKFLOW_TARGET_WORLD === '@workflow/world-postgres') {
|
|
const world = await createPostgresWorld();
|
|
setWorld(world);
|
|
if (world.start) {
|
|
console.log('Starting World workers...');
|
|
await world.start();
|
|
}
|
|
}
|
|
});
|