@bluelibs/runner 5.2.1 → 5.4.0
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 +54 -1
- package/dist/browser/index.cjs +977 -800
- package/dist/browser/index.cjs.map +1 -1
- package/dist/browser/index.mjs +975 -801
- package/dist/browser/index.mjs.map +1 -1
- package/dist/edge/index.cjs +977 -800
- package/dist/edge/index.cjs.map +1 -1
- package/dist/edge/index.mjs +975 -801
- package/dist/edge/index.mjs.map +1 -1
- package/dist/node/node.cjs +1994 -2056
- package/dist/node/node.cjs.map +1 -1
- package/dist/node/node.mjs +1990 -2010
- package/dist/node/node.mjs.map +1 -1
- package/dist/types/definers/builders/error/fluent-builder.interface.d.ts +6 -0
- package/dist/types/definers/builders/error/index.d.ts +10 -1
- package/dist/types/definers/builders/error/types.d.ts +2 -0
- package/dist/types/definers/builders/event/utils.d.ts +1 -4
- package/dist/types/definers/builders/hook/utils.d.ts +1 -4
- package/dist/types/definers/builders/middleware/utils.d.ts +1 -4
- package/dist/types/definers/builders/resource/utils.d.ts +1 -4
- package/dist/types/definers/builders/shared/mergeUtils.d.ts +5 -0
- package/dist/types/definers/builders/task/utils.d.ts +1 -4
- package/dist/types/definers/builders/utils.d.ts +1 -1
- package/dist/types/definers/defineError.d.ts +5 -3
- package/dist/types/defs.d.ts +1 -0
- package/dist/types/errors.d.ts +20 -21
- package/dist/types/globals/resources/tunnel/protocol.d.ts +3 -0
- package/dist/types/models/DependencyProcessor.d.ts +1 -1
- package/dist/types/models/MiddlewareManager.d.ts +2 -2
- package/dist/types/models/RunResult.d.ts +1 -1
- package/dist/types/models/Store.d.ts +15 -13
- package/dist/types/models/StoreRegistry.d.ts +19 -16
- package/dist/types/models/middleware/ResourceMiddlewareComposer.d.ts +2 -2
- package/dist/types/models/utils/buildDependencyGraph.d.ts +12 -0
- package/dist/types/models/utils/dependencyStrategies.d.ts +15 -0
- package/dist/types/models/utils/disposeOrder.d.ts +7 -0
- package/dist/types/node/durable/core/DurableResource.d.ts +24 -9
- package/dist/types/node/durable/core/DurableService.d.ts +15 -9
- package/dist/types/node/durable/core/interfaces/service.d.ts +27 -19
- package/dist/types/node/durable/core/interfaces/store.d.ts +1 -1
- package/dist/types/node/durable/core/managers/ExecutionManager.d.ts +34 -4
- package/dist/types/node/durable/core/managers/ScheduleManager.d.ts +5 -3
- package/dist/types/node/durable/core/managers/TaskRegistry.d.ts +5 -5
- package/dist/types/node/durable/core/managers/WaitManager.d.ts +1 -1
- package/dist/types/node/durable/core/resource.d.ts +5 -5
- package/dist/types/node/durable/index.d.ts +1 -0
- package/dist/types/node/durable/resources/memoryDurableResource.d.ts +5 -5
- package/dist/types/node/durable/resources/redisDurableResource.d.ts +5 -5
- package/dist/types/node/durable/tags/durableWorkflow.tag.d.ts +19 -0
- package/dist/types/node/exposure/requestContext.d.ts +1 -1
- package/dist/types/node/exposure/resource.d.ts +7 -7
- package/dist/types/node/http/http-mixed-client.factory.resource.d.ts +1 -1
- package/dist/types/node/http/http-smart-client.factory.resource.d.ts +1 -1
- package/dist/types/node/node.d.ts +1 -184
- package/dist/types/platform/adapters/edge.d.ts +17 -0
- package/dist/types/platform/adapters/universal-generic.d.ts +3 -0
- package/dist/types/platform/index.d.ts +1 -0
- package/dist/types/platform/types.d.ts +7 -1
- package/dist/types/public.d.ts +6 -1
- package/dist/types/testing.d.ts +0 -1
- package/dist/types/tools/LockableMap.d.ts +20 -0
- package/dist/types/types/error.d.ts +22 -1
- package/dist/types/types/resource.d.ts +2 -4
- package/dist/types/types/symbols.d.ts +3 -3
- package/dist/types/types/tagged.d.ts +18 -0
- package/dist/types/types/task.d.ts +1 -1
- package/dist/ui/assets/index-Bo7Gi6Vq.js +141 -0
- package/dist/ui/assets/index-Y_9aLumt.css +1 -0
- package/dist/ui/index.html +2 -3
- package/dist/universal/index.cjs +977 -800
- package/dist/universal/index.cjs.map +1 -1
- package/dist/universal/index.mjs +975 -801
- package/dist/universal/index.mjs.map +1 -1
- package/package.json +1 -2
- package/readmes/AI.md +59 -12
- package/dist/ui/assets/index-2cb8f39f.js +0 -141
- package/dist/ui/assets/index-b1f988bf.css +0 -1
- /package/dist/types/{tunnels → tools}/buildUniversalManifest.d.ts +0 -0
- /package/dist/types/{processHooks.d.ts → tools/processShutdownHooks.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -79,6 +79,7 @@ await runtime.runTask(createUser, { name: "Ada", email: "ada@example.com" });
|
|
|
79
79
|
| [API Documentation](https://bluelibs.github.io/runner/) | Docs | TypeDoc-generated reference |
|
|
80
80
|
| [AI-Friendly Docs](./readmes/AI.md) | Docs | Compact summary (<5000 tokens) |
|
|
81
81
|
| [Full Guide](./readmes/FULL_GUIDE.md) | Docs | Complete documentation (composed) |
|
|
82
|
+
| [Support & Release Policy](./readmes/ENTERPRISE.md) | Docs | Support windows and deprecation |
|
|
82
83
|
| [Design Documents](https://github.com/bluelibs/runner/tree/main/readmes) | Docs | Architecture notes and deep dives |
|
|
83
84
|
| [Example: Express + OpenAPI + SQLite](https://github.com/bluelibs/runner/tree/main/examples/express-openapi-sqlite) | Example | REST API with OpenAPI specification |
|
|
84
85
|
| [Example: Fastify + MikroORM + PostgreSQL](https://github.com/bluelibs/runner/tree/main/examples/fastify-mikroorm) | Example | Full-stack application with ORM |
|
|
@@ -96,6 +97,7 @@ await runtime.runTask(createUser, { name: "Ada", email: "ada@example.com" });
|
|
|
96
97
|
- **Need Node-only capabilities**: See [Durable Workflows](./readmes/DURABLE_WORKFLOWS.md)
|
|
97
98
|
- **Need remote execution**: See [HTTP Tunnels](./readmes/TUNNELS.md) (expose from Node.js, call from any `fetch` runtime)
|
|
98
99
|
- **Care about portability**: Read [Multi-Platform Architecture](./readmes/MULTI_PLATFORM.md)
|
|
100
|
+
- **Planning upgrades**: See [Support & Release Policy](./readmes/ENTERPRISE.md)
|
|
99
101
|
- **Want the complete guide**: Read [FULL_GUIDE.md](./readmes/FULL_GUIDE.md)
|
|
100
102
|
- **Want the short version**: Read [AI.md](./readmes/AI.md)
|
|
101
103
|
|
|
@@ -109,6 +111,21 @@ await runtime.runTask(createUser, { name: "Ada", email: "ada@example.com" });
|
|
|
109
111
|
| Tunnels client (`createExposureFetch`) | Full | Full | Full | Requires `fetch` |
|
|
110
112
|
| Tunnels server (`@bluelibs/runner/node`) | Full | None | None | Exposes tasks/events over HTTP |
|
|
111
113
|
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Prerequisites
|
|
117
|
+
|
|
118
|
+
Use these minimums before starting:
|
|
119
|
+
|
|
120
|
+
| Requirement | Minimum | Notes |
|
|
121
|
+
| --------------- | ------------------------ | -------------------------------------------------------------------------- |
|
|
122
|
+
| Node.js | `18.x` | Enforced by `package.json#engines.node` |
|
|
123
|
+
| TypeScript | `5.6+` (recommended) | Required for typed DX and examples in this repository |
|
|
124
|
+
| Package manager | npm / pnpm / yarn / bun | Examples use npm, but any modern package manager works |
|
|
125
|
+
| `fetch` runtime | Built-in or polyfilled | Required for tunnel clients (`createExposureFetch`, universal HTTP client) |
|
|
126
|
+
|
|
127
|
+
If you use the Node-only package (`@bluelibs/runner/node`) for durable workflows or exposure, stay on a supported Node LTS line.
|
|
128
|
+
|
|
112
129
|
---
|
|
113
130
|
## Your First 5 Minutes
|
|
114
131
|
|
|
@@ -127,6 +144,8 @@ That's it. Now let's get you to a first successful run.
|
|
|
127
144
|
|
|
128
145
|
This is the fastest way to run the TypeScript example at the top of this README:
|
|
129
146
|
|
|
147
|
+
0. Confirm prerequisites from [Prerequisites](#prerequisites) (Node `18+`, TypeScript `5.6+` recommended)
|
|
148
|
+
|
|
130
149
|
1. Install dependencies:
|
|
131
150
|
|
|
132
151
|
```bash
|
|
@@ -141,12 +160,41 @@ npm i -D typescript tsx
|
|
|
141
160
|
npx tsx index.ts
|
|
142
161
|
```
|
|
143
162
|
|
|
144
|
-
**That
|
|
163
|
+
**That's it!** You now have a working `Runtime` and you can execute tasks with `runtime.runTask(...)`.
|
|
145
164
|
|
|
146
165
|
> **Tip:** If you prefer an end-to-end example with HTTP, OpenAPI, and persistence, jump to the examples below.
|
|
147
166
|
|
|
148
167
|
---
|
|
149
168
|
|
|
169
|
+
## Runner Dev Tools Quick Start
|
|
170
|
+
|
|
171
|
+
`@bluelibs/runner-dev` gives you CLI scaffolding and runtime introspection.
|
|
172
|
+
|
|
173
|
+
1. Install (or run without install):
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
npm install -g @bluelibs/runner-dev
|
|
177
|
+
# or
|
|
178
|
+
npx @bluelibs/runner-dev --help
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
2. Three common commands:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Scaffold a new Runner project
|
|
185
|
+
runner-dev new my-app --install
|
|
186
|
+
|
|
187
|
+
# Query tasks from a local TypeScript entry file (dry-run mode)
|
|
188
|
+
runner-dev query 'query { tasks { id } }' --entry-file ./src/main.ts
|
|
189
|
+
|
|
190
|
+
# Inspect a running app via GraphQL endpoint
|
|
191
|
+
ENDPOINT=http://localhost:1337/graphql runner-dev overview --details 10
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
For full CLI and Dev UI docs, see [Runner Dev Tools](https://github.com/bluelibs/runner-dev).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
150
198
|
## Real-World Examples
|
|
151
199
|
|
|
152
200
|
- [Express + OpenAPI + SQLite](./examples/express-openapi-sqlite/README.md)
|
|
@@ -168,6 +216,11 @@ npx tsx index.ts
|
|
|
168
216
|
- **Node-only features**:
|
|
169
217
|
- [Durable Workflows](./readmes/DURABLE_WORKFLOWS.md)
|
|
170
218
|
- [HTTP Tunnels](./readmes/TUNNELS.md)
|
|
219
|
+
- **Releases and upgrades**:
|
|
220
|
+
- [GitHub Releases](https://github.com/bluelibs/runner/releases)
|
|
221
|
+
- [Support & Release Policy](./readmes/ENTERPRISE.md)
|
|
222
|
+
- **Operational baseline**:
|
|
223
|
+
- [Production Readiness Checklist](./readmes/FULL_GUIDE.md#production-readiness-checklist)
|
|
171
224
|
- **Multi-platform architecture**: Read [MULTI_PLATFORM.md](./readmes/MULTI_PLATFORM.md)
|
|
172
225
|
|
|
173
226
|
---
|