惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
博客园_首页
G
Google Developers Blog
博客园 - 【当耐特】
美团技术团队
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
小众软件
小众软件
博客园 - 司徒正美
雷峰网
雷峰网
T
Tailwind CSS Blog
V
V2EX
博客园 - 三生石上(FineUI控件)
F
Fortinet All Blogs
罗磊的独立博客
量子位
P
Proofpoint News Feed
Microsoft Azure Blog
Microsoft Azure Blog
月光博客
月光博客
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog

Workflow SDK Documentation

Patterns for Defining Tools Human-in-the-Loop Building Durable AI Agents Queueing User Messages Resumable Streams Sleep, Suspense, and Scheduling Streaming Updates from Tools API Reference Workflow Globals Changelog Resilient run start Cookbook Building a World Deploying Astro Express Fastify Hono Getting Started NestJS Next.js Nitro Nuxt Python SvelteKit Vite corrupted-event-log fetch-in-workflow hook-conflict Errors
NestLocalBuilder
2026-06-12 · via Workflow SDK Documentation

Builder that compiles workflow files into bundles for NestJS apps.

Builder that scans a NestJS project for workflow files and compiles them into the step, workflow, and webhook bundles plus a manifest. WorkflowModule.forRoot() creates and runs one automatically on startup — instantiate it yourself only when you need to build bundles outside the module lifecycle (e.g. a custom build script for production with skipBuild).

import { NestLocalBuilder } from "workflow/nest"; 

const builder = new NestLocalBuilder({
  dirs: ["src"],
});

await builder.build(); 

console.log(`Workflow bundles written to ${builder.outDir}`);

Constructor

new NestLocalBuilder(options?) creates a builder for the given options.

Parameters

ParameterTypeDescription
optionsNestBuilderOptionsOptional. Configures the workflow build.

NestBuilderOptions

OptionTypeDefaultDescription
workingDirstringprocess.cwd()Working directory for the NestJS application.
dirsstring[]['src']Directories to scan for workflow files.
outDirstring'.nestjs/workflow' (relative to workingDir)Output directory for generated workflow bundles.
watchbooleanfalseEnable watch mode for development.
moduleType'es6' | 'commonjs''es6'SWC module compilation type. When 'commonjs', the builder rewrites externalized imports in the steps bundle to use require() via createRequire, avoiding ESM/CJS named-export interop issues with SWC's output.
distDirstring'dist'Directory where NestJS compiles .ts source files to .js (relative to workingDir). Used when moduleType is 'commonjs' to resolve compiled file paths. Should match the outDir in your tsconfig.json.

Methods

build()

Builds the workflow bundles. Writes steps.mjs, workflows.mjs, webhook.mjs, and manifest.json to the output directory (plus a .gitignore covering the generated files when not deploying to Vercel). Returns Promise<void>.

Properties

outDir

Read-only getter that returns the output directory for generated workflow bundles — the outDir option as passed, or the default .nestjs/workflow resolved against workingDir.

Returns

The constructor returns a NestLocalBuilder instance.