pnpm workspace -> npm packagesGenerate TypeScript Microservices: pnpm Workspace
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.
Run a complete TypeScript microservice example
pnpm packages, strict TypeScript, grpc-js and asynchronous Node.js execution.
The runnable TypeScript example contains business implementations as well as generated infrastructure. A new Designer archive provides extension points for your own business code.
Install Git, GNU Make, Docker with Compose v2, and the host toolchain required by the repository README. Run these commands from the example workspace root; make help lists the targets available in that version.
git clone https://github.com/gorundebug/tsexample.git
cd tsexample
make help
make init
make docker-up- Use the service README and generated configuration for endpoint addresses and example requests.
- When finished, make docker-down stops the stack while preserving its volumes.
- Continue with the visual design guide or safe regeneration.
TypeScript service directories
Important paths in each generated TypeScript service.
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/