Code generation
pnpm workspace -> npm packagesTypeScript project
TypeScript generation creates independent npm packages joined by a root pnpm workspace.
When to use
Use this reference when generating, reviewing or operating a Service Architect project.
Behavior
- src/main.generated.ts starts a generated service package.
- src/internal/app and config contain runtime graph assembly and typed configuration.
- src/internal/functions holds preserved business code.
- test mirrors business functions and supplies ServiceLib test support.
- User-named Modules expose generated ESM entrypoints for the public types, functions and connector schemas assigned to them.
- Standalone package metadata and Compose/Docker files can be emitted for repository extraction.
TypeScript service directories
Important paths in each generated TypeScript service.
PathOwnershipDescription
package.jsonManagedPackage scripts, dependencies and ESM metadata.
src/main.generated.tsGeneratedService process entrypoint.
src/internal/app/GeneratedRuntime graph and connector construction.
src/internal/functions/PreservedBusiness operators and endpoint handlers.
test/functions/PreservedBusiness behavior tests.
tsconfig.json + tsconfig.test.jsonManagedProduction and test build graphs.
package.standalone.generated.jsonGeneratedMetadata for extracting an independent repository.
Dockerfile.standalone.generatedGeneratedStandalone multi-stage service image.
scripts/node-diagnostics.generated.mjsGeneratedDiagnostic reports and heap snapshots.
TypeScript service tree
<service-name>/
package.json + tsconfig.json
src/main.generated.ts
src/internal/app/ + functions/
test/functions/ + support/
scripts/
config/ + graph/ + docs/
grafana/ + helm/