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

推荐订阅源

U
Unit 42
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
博客园_首页
IT之家
IT之家
The Cloudflare Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
酷 壳 – CoolShell
酷 壳 – CoolShell
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Y
Y Combinator Blog
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
美团技术团队
S
SegmentFault 最新的问题
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - 【当耐特】
小众软件
小众软件
有赞技术团队
有赞技术团队

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.