@workflow/astro 5.0.0-beta.0 → 5.0.0-beta.2

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 CHANGED
@@ -1,3 +1,3 @@
1
1
  # workflow/astro
2
2
 
3
- The docs have moved! Refer to them [here](https://useworkflow.dev/)
3
+ The docs have moved! Refer to them [here](https://workflow-sdk.dev/)
@@ -1 +1 @@
1
- {"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAEL,WAAW,EACX,uBAAuB,EACvB,sBAAsB,EACtB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,MAAM,eAAe,GAAG;IACtB;QACE,GAAG,EAAE,qCAAqC;QAC1C,IAAI,EAAE,+BAA+B;KACtC;IACD;QACE,GAAG,EAAE,qCAAqC;QAC1C,IAAI,EAAE,+BAA+B;KACtC;IACD;QACE,GAAG,EAAE,iDAAiD;QACtD,IAAI,EAAE,0CAA0C;KACjD;CACF,CAAC;AAEF,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;QACE,KAAK,CAAC;YACJ,IAAI,EAAE,CAAC,WAAW,EAAE,eAAe,CAAC;YACpC,WAAW,EAAE,OAAgB;YAC7B,eAAe,EAAE,EAAE,EAAE,iBAAiB;YACtC,mBAAmB,EAAE,EAAE,EAAE,iBAAiB;YAC1C,iBAAiB,EAAE,EAAE,EAAE,iBAAiB;YACxC,UAAU,EAAE,OAAO,CAAC,GAAG,EAAE;YACzB,eAAe,EAAE,GAAG,EAAE,sDAAsD;SAC7E,CAAC,CAAC;IACL,CAAC;IAEQ,KAAK,CAAC,KAAK;QAClB,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAA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,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAC/D,CAAC;CACF","sourcesContent":["import { mkdir, readFile, writeFile } from 'node:fs/promises';\nimport { join, resolve } from 'node:path';\nimport {\n type AstroConfig,\n BaseBuilder,\n createBaseBuilderConfig,\n NORMALIZE_REQUEST_CODE,\n VercelBuildOutputAPIBuilder,\n} from '@workflow/builders';\n\nconst WORKFLOW_ROUTES = [\n {\n src: '^/\\\\.well-known/workflow/v1/flow/?$',\n dest: '/.well-known/workflow/v1/flow',\n },\n {\n src: '^/\\\\.well-known/workflow/v1/step/?$',\n dest: '/.well-known/workflow/v1/step',\n },\n {\n src: '^/\\\\.well-known/workflow/v1/webhook/([^/]+?)/?$',\n dest: '/.well-known/workflow/v1/webhook/[token]',\n },\n];\n\nexport class LocalBuilder extends BaseBuilder {\n constructor() {\n super({\n dirs: ['src/pages', 'src/workflows'],\n buildTarget: 'astro' as const,\n stepsBundlePath: '', // unused in base\n workflowsBundlePath: '', // unused in base\n webhookBundlePath: '', // unused in base\n workingDir: process.cwd(),\n debugFilePrefix: '_', // Prefix with underscore so Astro ignores debug files\n });\n }\n\n override async build(): Promise<void> {\n const pagesDir = resolve(this.config.workingDir, 'src/pages');\n const workflowGeneratedDir = join(pagesDir, '.well-known/workflow/v1');\n\n // Ensure output directories exist\n await mkdir(workflowGeneratedDir, { recursive: true });\n\n // Add .gitignore to exclude generated files from version control\n if (process.env.VERCEL_DEPLOYMENT_ID === undefined) {\n await writeFile(join(workflowGeneratedDir, '.gitignore'), '*');\n }\n\n // Get workflow and step files to bundle\n const inputFiles = await this.getInputFiles();\n const tsconfigPath = await this.findTsConfigPath();\n\n const options = {\n inputFiles,\n workflowGeneratedDir,\n tsconfigPath,\n };\n\n // Generate the three Astro route handlers\n const stepsManifest = await this.buildStepsRoute(options);\n const workflowsManifest = await this.buildWorkflowsRoute(options);\n await this.buildWebhookRoute({ workflowGeneratedDir });\n\n // Merge manifests from both bundles\n const manifest = {\n steps: { ...stepsManifest.steps, ...workflowsManifest.steps },\n workflows: {\n ...stepsManifest.workflows,\n ...workflowsManifest.workflows,\n },\n classes: { ...stepsManifest.classes, ...workflowsManifest.classes },\n };\n\n // Generate unified manifest\n const workflowBundlePath = join(workflowGeneratedDir, 'flow.js');\n const manifestJson = await this.createManifest({\n workflowBundlePath,\n manifestDir: workflowGeneratedDir,\n manifest,\n });\n\n // Expose manifest as a public HTTP route when WORKFLOW_PUBLIC_MANIFEST=1\n // Astro maps `foo.json.js` to the URL `/foo.json`\n if (this.shouldExposePublicManifest && manifestJson) {\n await writeFile(\n join(workflowGeneratedDir, 'manifest.json.js'),\n `export function GET() {\n return new Response(${JSON.stringify(manifestJson)}, {\n headers: { \"content-type\": \"application/json\" },\n });\n}\n\nexport const prerender = false;\\n`\n );\n }\n }\n\n private async buildStepsRoute({\n inputFiles,\n workflowGeneratedDir,\n tsconfigPath,\n }: {\n inputFiles: string[];\n workflowGeneratedDir: string;\n tsconfigPath?: string;\n }) {\n // Create steps route: .well-known/workflow/v1/step.js\n const stepsRouteFile = join(workflowGeneratedDir, 'step.js');\n const { manifest } = await this.createStepsBundle({\n format: 'esm',\n inputFiles,\n outfile: stepsRouteFile,\n externalizeNonSteps: true,\n tsconfigPath,\n });\n\n let stepsRouteContent = await readFile(stepsRouteFile, 'utf-8');\n\n // Normalize request, needed for preserving request through astro\n stepsRouteContent = stepsRouteContent.replace(\n /export\\s*\\{\\s*stepEntrypoint\\s+as\\s+POST\\s*\\}\\s*;?$/m,\n `${NORMALIZE_REQUEST_CODE}\nexport const POST = async ({request}) => {\n const normalRequest = await normalizeRequest(request);\n return stepEntrypoint(normalRequest);\n}\n\nexport const prerender = false;`\n );\n await writeFile(stepsRouteFile, stepsRouteContent);\n\n return manifest;\n }\n\n private async buildWorkflowsRoute({\n inputFiles,\n workflowGeneratedDir,\n tsconfigPath,\n }: {\n inputFiles: string[];\n workflowGeneratedDir: string;\n tsconfigPath?: string;\n }) {\n // Create workflows route: .well-known/workflow/v1/flow.js\n const workflowsRouteFile = join(workflowGeneratedDir, 'flow.js');\n const { manifest } = await this.createWorkflowsBundle({\n format: 'esm',\n outfile: workflowsRouteFile,\n bundleFinalOutput: false,\n inputFiles,\n tsconfigPath,\n });\n\n let workflowsRouteContent = await readFile(workflowsRouteFile, 'utf-8');\n\n // Normalize request, needed for preserving request through astro\n workflowsRouteContent = workflowsRouteContent.replace(\n /export const POST = workflowEntrypoint\\(workflowCode\\);?$/m,\n `${NORMALIZE_REQUEST_CODE}\nexport const POST = async ({request}) => {\n const normalRequest = await normalizeRequest(request);\n return workflowEntrypoint(workflowCode)(normalRequest);\n}\n\nexport const prerender = false;`\n );\n await writeFile(workflowsRouteFile, workflowsRouteContent);\n\n return manifest;\n }\n\n private async buildWebhookRoute({\n workflowGeneratedDir,\n }: {\n workflowGeneratedDir: string;\n }) {\n // Create webhook route: .well-known/workflow/v1/webhook/[token].js\n const webhookRouteFile = join(workflowGeneratedDir, 'webhook/[token].js');\n\n await this.createWebhookBundle({\n outfile: webhookRouteFile,\n bundle: false,\n });\n\n // Post-process the generated file to wrap with Astro request converter\n let webhookRouteContent = await readFile(webhookRouteFile, 'utf-8');\n\n // Update handler signature to accept token as parameter\n webhookRouteContent = webhookRouteContent.replace(\n /async function handler\\(request\\) \\{[\\s\\S]*?const token = decodeURIComponent\\(pathParts\\[pathParts\\.length - 1\\]\\);/,\n `async function handler(request, token) {`\n );\n\n // Remove the URL parsing code since we get token from params\n webhookRouteContent = webhookRouteContent.replace(\n /const url = new URL\\(request\\.url\\);[\\s\\S]*?const pathParts = url\\.pathname\\.split\\('\\/'\\);[\\s\\S]*?\\n/,\n ''\n );\n\n // Normalize request, needed for preserving request through astro\n webhookRouteContent = webhookRouteContent.replace(\n /export const GET = handler;\\nexport const POST = handler;\\nexport const PUT = handler;\\nexport const PATCH = handler;\\nexport const DELETE = handler;\\nexport const HEAD = handler;\\nexport const OPTIONS = handler;/,\n `${NORMALIZE_REQUEST_CODE}\nconst createHandler = (method) => async ({ request, params, platform }) => {\n const normalRequest = await normalizeRequest(request);\n const response = await handler(normalRequest, params.token);\n return response;\n};\n\nexport const GET = createHandler('GET');\nexport const POST = createHandler('POST');\nexport const PUT = createHandler('PUT');\nexport const PATCH = createHandler('PATCH');\nexport const DELETE = createHandler('DELETE');\nexport const HEAD = createHandler('HEAD');\nexport const OPTIONS = createHandler('OPTIONS');\n\nexport const prerender = false;`\n );\n\n await writeFile(webhookRouteFile, webhookRouteContent);\n }\n}\n\nexport class VercelBuilder extends VercelBuildOutputAPIBuilder {\n constructor(config?: Partial<AstroConfig>) {\n const workingDir = config?.workingDir || process.cwd();\n super({\n ...createBaseBuilderConfig({\n workingDir,\n dirs: ['src/pages', 'src/workflows'],\n runtime: config?.runtime,\n }),\n buildTarget: 'vercel-build-output-api',\n debugFilePrefix: '_',\n });\n }\n\n override async build(): Promise<void> {\n const configPath = join(\n this.config.workingDir,\n '.vercel/output/config.json'\n );\n\n // The config output by astro\n const config = JSON.parse(await readFile(configPath, 'utf-8'));\n\n // Filter out existing workflow routes (wrong `dest` mapping)\n config.routes = config.routes.filter(\n (route: { src?: string; dest: string }) =>\n !route.src?.includes('.well-known/workflow')\n );\n\n // Find the index right after the \"filesystem\" handler and \"continue: true\" routes\n let insertIndex = config.routes.findIndex(\n (route: any) => route.handle === 'filesystem'\n );\n\n // Move past any routes with \"continue: true\" (like _astro cache headers)\n while (\n insertIndex < config.routes.length - 1 &&\n config.routes[insertIndex + 1]?.continue === true\n ) {\n insertIndex++;\n }\n\n // Insert workflow routes right after\n config.routes.splice(insertIndex + 1, 0, ...WORKFLOW_ROUTES);\n\n // Bundles workflows for vercel\n await super.build();\n\n // Use old astro config with updated routes\n await writeFile(configPath, JSON.stringify(config, null, 2));\n }\n}\n"]}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,QAAQ,EAAE,MAAM,aAAa,CAAC","sourcesContent":["export { workflowPlugin as workflow } from './plugin.js';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,UAAU,cAAc;IAC5B,MAAM,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC;IACnC,MAAM,OAAO,GAAG,gBAAgB,EAAE,CAAC;IAEnC,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE;YACL,oBAAoB,EAAE,KAAK,EAAE,EAC3B,YAAY,GACyB,EAAE,EAAE;gBACzC,oBAAoB;gBACpB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;oBACtC,IAAI,CAAC;wBACH,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;oBACxB,CAAC;oBAAC,OAAO,UAAU,EAAE,CAAC;wBACpB,yEAAyE;wBACzE,2DAA2D;wBAC3D,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,UAAU,CAAC,CAAC;wBAC/D,MAAM,UAAU,CAAC;oBACnB,CAAC;gBACH,CAAC;gBACD,YAAY,CAAC;oBACX,IAAI,EAAE;wBACJ,OAAO,EAAE;4BACP,uBAAuB,EAAE;4BACzB,mEAAmE;4BACnE,uBAAuB,CAAC;gCACtB,OAAO;gCACP,OAAO;6BACR,CAAQ;yBACV;qBACF;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uBAAuB,CAAC;gCACtB,OAAO;gCACP,OAAO;6BACR,CAAQ;yBACV;qBACF;iBACF,CAAC,CAAC;YACL,CAAC;YACD,kBAAkB,EAAE,KAAK,IAAI,EAAE;gBAC7B,IAAI,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,CAAC;oBACrC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC;oBAC1C,MAAM,aAAa,CAAC,KAAK,EAAE,CAAC;gBAC9B,CAAC;YACH,CAAC;SACF;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { createBuildQueue } from '@workflow/builders';\nimport { workflowTransformPlugin } from '@workflow/rollup';\nimport { workflowHotUpdatePlugin } from '@workflow/vite';\nimport type { AstroIntegration, HookParameters } from 'astro';\nimport { LocalBuilder, VercelBuilder } from './builder.js';\n\nexport function workflowPlugin(): AstroIntegration {\n const builder = new LocalBuilder();\n const enqueue = createBuildQueue();\n\n return {\n name: 'workflow:astro',\n hooks: {\n 'astro:config:setup': async ({\n updateConfig,\n }: HookParameters<'astro:config:setup'>) => {\n // Use local builder\n if (!process.env.VERCEL_DEPLOYMENT_ID) {\n try {\n await builder.build();\n } catch (buildError) {\n // Build might fail due to invalid workflow files or missing dependencies\n // Log the error and rethrow to properly propagate to Astro\n console.error('Build failed during config setup:', buildError);\n throw buildError;\n }\n }\n updateConfig({\n vite: {\n plugins: [\n workflowTransformPlugin(),\n // Cast needed due to Astro using a different internal Vite version\n workflowHotUpdatePlugin({\n builder,\n enqueue,\n }) as any,\n ],\n },\n });\n },\n 'astro:build:done': async () => {\n if (process.env.VERCEL_DEPLOYMENT_ID) {\n const vercelBuilder = new VercelBuilder();\n await vercelBuilder.build();\n }\n },\n },\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workflow/astro",
3
- "version": "5.0.0-beta.0",
3
+ "version": "5.0.0-beta.2",
4
4
  "description": "Astro integration for Workflow SDK",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -23,10 +23,10 @@
23
23
  "@swc/core": "1.15.3",
24
24
  "exsolve": "^1.0.8",
25
25
  "pathe": "^2.0.3",
26
- "@workflow/builders": "5.0.0-beta.0",
27
- "@workflow/rollup": "5.0.0-beta.0",
28
- "@workflow/swc-plugin": "5.0.0-beta.0",
29
- "@workflow/vite": "5.0.0-beta.0"
26
+ "@workflow/builders": "5.0.0-beta.2",
27
+ "@workflow/rollup": "5.0.0-beta.2",
28
+ "@workflow/swc-plugin": "5.0.0-beta.2",
29
+ "@workflow/vite": "5.0.0-beta.2"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "22.19.0",