@bluelibs/runner-dev 6.2.0 → 6.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 +131 -12
- package/dist/cli/generators/initUtils.js +1 -1
- package/dist/cli/generators/initUtils.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/README.md.js +17 -4
- package/dist/cli/generators/scaffold/templates/README.md.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/index.d.ts +2 -1
- package/dist/cli/generators/scaffold/templates/index.js +5 -3
- package/dist/cli/generators/scaffold/templates/index.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/package.json.d.ts +7 -2
- package/dist/cli/generators/scaffold/templates/package.json.js +7 -2
- package/dist/cli/generators/scaffold/templates/package.json.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/src/app.test.ts.d.ts +1 -0
- package/dist/cli/generators/scaffold/templates/src/app.test.ts.js +29 -0
- package/dist/cli/generators/scaffold/templates/src/app.test.ts.js.map +1 -0
- package/dist/cli/generators/scaffold/templates/src/app.ts.d.ts +1 -0
- package/dist/cli/generators/scaffold/templates/src/app.ts.js +15 -0
- package/dist/cli/generators/scaffold/templates/src/app.ts.js.map +1 -0
- package/dist/cli/generators/scaffold/templates/src/main.ts.js +3 -10
- package/dist/cli/generators/scaffold/templates/src/main.ts.js.map +1 -1
- package/dist/cli/generators/scaffold/templates/tsconfig.json.d.ts +4 -2
- package/dist/cli/generators/scaffold/templates/tsconfig.json.js +4 -2
- package/dist/cli/generators/scaffold/templates/tsconfig.json.js.map +1 -1
- package/dist/cli/generators/scaffold.js +2 -1
- package/dist/cli/generators/scaffold.js.map +1 -1
- package/dist/cli.js +0 -0
- package/dist/docs/packageDocs.d.ts +16 -0
- package/dist/docs/packageDocs.js +107 -0
- package/dist/docs/packageDocs.js.map +1 -0
- package/dist/exportDocs.d.ts +10 -0
- package/dist/exportDocs.js +98 -0
- package/dist/exportDocs.js.map +1 -0
- package/dist/generated/resolvers-types.d.ts +126 -178
- package/dist/index.d.ts +4 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/env.d.ts +5 -0
- package/dist/mcp/env.js +30 -1
- package/dist/mcp/env.js.map +1 -1
- package/dist/mcp/help.d.ts +8 -1
- package/dist/mcp/help.js +30 -4
- package/dist/mcp/help.js.map +1 -1
- package/dist/mcp/http.js +10 -0
- package/dist/mcp/http.js.map +1 -1
- package/dist/mcp/projectOverview.js +13 -4
- package/dist/mcp/projectOverview.js.map +1 -1
- package/dist/mcp/snapshot.d.ts +22 -0
- package/dist/mcp/snapshot.js +344 -0
- package/dist/mcp/snapshot.js.map +1 -0
- package/dist/mcp/tools/graphql.mutation.js +4 -1
- package/dist/mcp/tools/graphql.mutation.js.map +1 -1
- package/dist/mcp/tools/graphql.ping.js +1 -1
- package/dist/mcp/tools/graphql.ping.js.map +1 -1
- package/dist/mcp/tools/graphql.query.js +1 -1
- package/dist/mcp/tools/graphql.query.js.map +1 -1
- package/dist/mcp/tools/help.read.js +7 -5
- package/dist/mcp/tools/help.read.js.map +1 -1
- package/dist/mcp/tools/help.runner.js +3 -1
- package/dist/mcp/tools/help.runner.js.map +1 -1
- package/dist/mcp/tools/help.runnerDev.js +4 -4
- package/dist/mcp/tools/help.runnerDev.js.map +1 -1
- package/dist/mcp.js +4 -9
- package/dist/mcp.js.map +1 -1
- package/dist/resources/docsPayload.d.ts +33 -0
- package/dist/resources/docsPayload.js +174 -0
- package/dist/resources/docsPayload.js.map +1 -0
- package/dist/resources/docsUiAssets.d.ts +27 -0
- package/dist/resources/docsUiAssets.js +150 -0
- package/dist/resources/docsUiAssets.js.map +1 -0
- package/dist/resources/graphql-accumulator.resource.d.ts +1 -0
- package/dist/resources/graphql-accumulator.resource.js +30 -26
- package/dist/resources/graphql-accumulator.resource.js.map +1 -1
- package/dist/resources/live.resource.d.ts +0 -2
- package/dist/resources/live.resource.js +1 -5
- package/dist/resources/live.resource.js.map +1 -1
- package/dist/resources/models/Introspector.d.ts +17 -0
- package/dist/resources/models/Introspector.js +61 -28
- package/dist/resources/models/Introspector.js.map +1 -1
- package/dist/resources/models/durable.runtime.d.ts +1 -5
- package/dist/resources/models/durable.runtime.js +0 -33
- package/dist/resources/models/durable.runtime.js.map +1 -1
- package/dist/resources/models/durable.tools.d.ts +10 -0
- package/dist/resources/models/durable.tools.js +21 -0
- package/dist/resources/models/durable.tools.js.map +1 -1
- package/dist/resources/models/initializeFromStore.js +5 -5
- package/dist/resources/models/initializeFromStore.js.map +1 -1
- package/dist/resources/models/initializeFromStore.utils.d.ts +2 -2
- package/dist/resources/models/initializeFromStore.utils.js +399 -68
- package/dist/resources/models/initializeFromStore.utils.js.map +1 -1
- package/dist/resources/models/introspector.tools.js +88 -4
- package/dist/resources/models/introspector.tools.js.map +1 -1
- package/dist/resources/routeHandlers/createDocsServeHandler.js +13 -37
- package/dist/resources/routeHandlers/createDocsServeHandler.js.map +1 -1
- package/dist/resources/routeHandlers/getDocsData.d.ts +1 -6
- package/dist/resources/routeHandlers/getDocsData.js +10 -168
- package/dist/resources/routeHandlers/getDocsData.js.map +1 -1
- package/dist/resources/server.resource.js +0 -1
- package/dist/resources/server.resource.js.map +1 -1
- package/dist/resources/ui.static.js +4 -9
- package/dist/resources/ui.static.js.map +1 -1
- package/dist/schema/model.d.ts +21 -13
- package/dist/schema/model.js +14 -0
- package/dist/schema/model.js.map +1 -1
- package/dist/schema/query.js +3 -3
- package/dist/schema/query.js.map +1 -1
- package/dist/schema/types/AllType.js +2 -21
- package/dist/schema/types/AllType.js.map +1 -1
- package/dist/schema/types/DurableFlowTypes.d.ts +2 -0
- package/dist/schema/types/DurableFlowTypes.js +51 -1
- package/dist/schema/types/DurableFlowTypes.js.map +1 -1
- package/dist/schema/types/ErrorType.js +1 -3
- package/dist/schema/types/ErrorType.js.map +1 -1
- package/dist/schema/types/EventType.js +6 -19
- package/dist/schema/types/EventType.js.map +1 -1
- package/dist/schema/types/HookType.js +4 -16
- package/dist/schema/types/HookType.js.map +1 -1
- package/dist/schema/types/ResourceType.js +60 -23
- package/dist/schema/types/ResourceType.js.map +1 -1
- package/dist/schema/types/TaskLikeCommon.js +2 -2
- package/dist/schema/types/TaskLikeCommon.js.map +1 -1
- package/dist/schema/types/TaskType.js +12 -31
- package/dist/schema/types/TaskType.js.map +1 -1
- package/dist/schema/types/index.d.ts +0 -1
- package/dist/schema/types/index.js +1 -10
- package/dist/schema/types/index.js.map +1 -1
- package/dist/schema/types/middleware/UsageTypes.d.ts +1 -0
- package/dist/schema/types/middleware/UsageTypes.js +16 -5
- package/dist/schema/types/middleware/UsageTypes.js.map +1 -1
- package/dist/schema/types/middleware/common.js +2 -2
- package/dist/schema/types/middleware/common.js.map +1 -1
- package/dist/ui/.vite/manifest.json +2 -2
- package/dist/ui/assets/docs-DaF8dCiE.css +1 -0
- package/dist/ui/assets/docs-DgcoUGlF.js +261 -0
- package/dist/ui/assets/docs-DgcoUGlF.js.map +1 -0
- package/dist/ui/docs/favicon.ico +0 -0
- package/dist/utils/lane-resources.d.ts +69 -0
- package/dist/utils/lane-resources.js +145 -0
- package/dist/utils/lane-resources.js.map +1 -1
- package/dist/utils/runner-namespace.d.ts +1 -0
- package/dist/utils/runner-namespace.js +9 -0
- package/dist/utils/runner-namespace.js.map +1 -0
- package/dist/utils/schemaFormat.d.ts +6 -0
- package/dist/utils/schemaFormat.js +244 -0
- package/dist/utils/schemaFormat.js.map +1 -0
- package/dist/utils/system-namespace.d.ts +1 -0
- package/dist/utils/system-namespace.js +9 -0
- package/dist/utils/system-namespace.js.map +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +20 -4
- package/readmes/API_REFERENCE.md +352 -0
- package/readmes/COMPACT_GUIDE.md +254 -0
- package/skills/core/SKILL.md +27 -0
- package/skills/core/references/readmes/API_REFERENCE.md +352 -0
- package/skills/core/references/readmes/COMPACT_GUIDE.md +254 -0
- package/AI.md +0 -630
- package/dist/ui/assets/docs-CWJO6emS.css +0 -1
- package/dist/ui/assets/docs-Zej7hPlV.js +0 -302
- package/dist/ui/assets/docs-Zej7hPlV.js.map +0 -1
- package/readmes/runner-AI.md +0 -917
- package/readmes/runner-durable-workflows.md +0 -2247
- package/readmes/runner-full-guide.md +0 -6010
- package/readmes/runner-remote-lanes.md +0 -910
package/README.md
CHANGED
|
@@ -21,6 +21,9 @@ npm install -g @bluelibs/runner-dev
|
|
|
21
21
|
npx @bluelibs/runner-dev
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
For local `AGENTS.md`-style workflows, this repo now extracts Runner skills from `@bluelibs/runner` into `.agents/skills` via `npm-skills` on `postinstall`.
|
|
25
|
+
Runner-Dev also publishes its own skill from `skills/core`; keep `README.md`, `skills/core/SKILL.md`, and `skills/core/references/readmes/COMPACT_GUIDE.md` aligned when those docs change. The docs UI now includes a topology view for blast-radius and resource mindmap exploration.
|
|
26
|
+
|
|
24
27
|
```ts
|
|
25
28
|
import { r } from "@bluelibs/runner";
|
|
26
29
|
import { dev } from "@bluelibs/runner-dev";
|
|
@@ -41,6 +44,7 @@ const app = r
|
|
|
41
44
|
## What you get
|
|
42
45
|
|
|
43
46
|
- Fully-featured UI with AI assistance to explore your app, call tasks, emit events, diagnostics, logs and more.
|
|
47
|
+
- Static catalog export via `exportDocs(app, { output?, overwrite? })` for a standalone frozen docs site under `./runner-dev-catalog` by default.
|
|
44
48
|
- Overview tables across UI sections now include sortable and searchable columns (`ID`, `Title`, `Description`, `Used By`) with per-element usage counters.
|
|
45
49
|
- Overview tables now include `Visibility` (`Public`/`Private`) derived from Runner resource `isolate()` boundaries.
|
|
46
50
|
- Introspector: programmatic API to inspect tasks, hooks, resources, events, middleware, and diagnostics (including file paths, contents)
|
|
@@ -49,7 +53,7 @@ const app = r
|
|
|
49
53
|
- Resource introspection includes `subtree` governance summaries (middleware attachment counts and validator counts per branch).
|
|
50
54
|
- Resource introspection indicates whether a resource exposes a `cooldown()` hook for shutdown lifecycle.
|
|
51
55
|
- Isolation wildcard rules are clickable in the docs UI and open a modal showing matched resources with inline filtering when lists are large.
|
|
52
|
-
- Event introspection includes `transactional`, `parallel`, optional `eventLane { laneId
|
|
56
|
+
- Event introspection includes `transactional`, `parallel`, optional `eventLane { laneId }`, and optional `rpcLane { laneId }`.
|
|
53
57
|
- Task introspection includes optional `rpcLane { laneId }`.
|
|
54
58
|
- Tag pages distinguish between directly tagged elements and tag handlers (elements that depend on the tag id).
|
|
55
59
|
- Live: in-memory logs and event emissions
|
|
@@ -84,12 +88,19 @@ const app = r
|
|
|
84
88
|
|
|
85
89
|
## Runner 6.2 Migration Notes
|
|
86
90
|
|
|
87
|
-
- Built-in async contexts
|
|
88
|
-
- Built-in task middleware such as `cache`, `concurrency`, and `rateLimit` can partition internal state
|
|
91
|
+
- Built-in async contexts in 6.2 use `asyncContexts.tenant`; in Runner 6.3 they were renamed to `asyncContexts.identity`.
|
|
92
|
+
- Built-in task middleware such as `cache`, `concurrency`, and `rateLimit` can partition internal state via `tenantScope` in 6.2, and via `identityScope` from 6.3 onward.
|
|
89
93
|
- Lazy resource initialization now fails fast once shutdown begins; runner-dev will surface the new typed shutdown errors through normal error introspection.
|
|
90
94
|
- Subtree middleware conflicts now fail fast inside Runner instead of remaining a post-compose diagnostic concern.
|
|
91
95
|
- The internal framework root is now described as the synthetic framework root, with clearer internal `runner` and `system` namespace resources.
|
|
92
96
|
|
|
97
|
+
## Runner 6.3 Migration Notes
|
|
98
|
+
|
|
99
|
+
- Built-in identity moved from `asyncContexts.tenant` to `asyncContexts.identity`, and identity-aware middleware now uses `identityScope`.
|
|
100
|
+
- Hook introspection now resolves selector-based targets such as `subtreeOf(...)` and predicates through Runner's store API instead of relying on raw `hook.on` shapes.
|
|
101
|
+
- Event Lane routing now comes from `r.eventLane(...).applyTo([...])` instead of `tags.eventLane`, and Event Lane topology profiles use `consume: [{ lane, hooks?: { only } }]`.
|
|
102
|
+
- Runner now supports `run(app, { signal })`, `run(app, { identity })`, and `runtime.dispose({ force: true })`; runner-dev remains compatible with those lifecycle additions while avoiding deprecated lane-tag assumptions.
|
|
103
|
+
|
|
93
104
|
## Table of Contents
|
|
94
105
|
|
|
95
106
|
- [Quickstart Guide](#quickstart)
|
|
@@ -97,8 +108,8 @@ const app = r
|
|
|
97
108
|
- [CLI Tooling & Scaffolding](#cli-usage-direct)
|
|
98
109
|
- [Live Telemetry & Correlation](#live-telemetry)
|
|
99
110
|
- [Hot-Swapping Debugging System](#hot-swapping-debugging-system)
|
|
100
|
-
- [GraphQL API Examples](#
|
|
101
|
-
- [API Reference](API_REFERENCE.md)
|
|
111
|
+
- [GraphQL API Examples](#graphql-api-examples)
|
|
112
|
+
- [API Reference](readmes/API_REFERENCE.md)
|
|
102
113
|
- [Contributing & Local Dev](CONTRIBUTING.md)
|
|
103
114
|
|
|
104
115
|
## Quickstart
|
|
@@ -135,6 +146,87 @@ Inside the UI, you can:
|
|
|
135
146
|
- Inspect live logs and event emissions in real-time.
|
|
136
147
|
- View and edit files directly via the browser.
|
|
137
148
|
|
|
149
|
+
### Static Catalog Export
|
|
150
|
+
|
|
151
|
+
If you want the visual docs without running the project server, you can export a standalone static catalog directly from a built Runner app.
|
|
152
|
+
|
|
153
|
+
The recommended setup is a tiny script plus an npm command.
|
|
154
|
+
|
|
155
|
+
Create `scripts/export-docs.ts`:
|
|
156
|
+
|
|
157
|
+
```ts
|
|
158
|
+
// scripts/export-docs.ts
|
|
159
|
+
import { exportDocs } from "@bluelibs/runner-dev";
|
|
160
|
+
import { app } from "../src/app";
|
|
161
|
+
|
|
162
|
+
await exportDocs(app);
|
|
163
|
+
// Optional custom destination:
|
|
164
|
+
await exportDocs(app, {
|
|
165
|
+
output: "./artifacts/runner-dev-catalog",
|
|
166
|
+
overwrite: true,
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Add a package script:
|
|
171
|
+
|
|
172
|
+
```json
|
|
173
|
+
{
|
|
174
|
+
"scripts": {
|
|
175
|
+
"docs:export": "tsx scripts/export-docs.ts"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Then run:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
npm run docs:export
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
What gets written:
|
|
187
|
+
|
|
188
|
+
- `./runner-dev-catalog/index.html`
|
|
189
|
+
- `./runner-dev-catalog/snapshot.json`
|
|
190
|
+
- a standalone `index.html` with the docs payload, CSS, JS, and favicon embedded for direct opening
|
|
191
|
+
|
|
192
|
+
Output behavior:
|
|
193
|
+
|
|
194
|
+
- `exportDocs(app)` writes to `./runner-dev-catalog` by default
|
|
195
|
+
- the default `./runner-dev-catalog` destination is treated as a dedicated export folder and can be regenerated safely
|
|
196
|
+
- custom directories are protected by default; pass `overwrite: true` if you intentionally want to replace an existing non-empty directory
|
|
197
|
+
- `index.html` is standalone and can be opened directly over `file://`
|
|
198
|
+
- `snapshot.json` is still written as an auxiliary artifact for inspection, debugging, and snapshot-backed MCP, but the standalone HTML does not depend on it at runtime
|
|
199
|
+
|
|
200
|
+
What the exported catalog includes:
|
|
201
|
+
|
|
202
|
+
- overview
|
|
203
|
+
- topology
|
|
204
|
+
- tasks, resources, events, hooks, and middlewares
|
|
205
|
+
- tags, errors, async contexts, diagnostics, and markdown docs
|
|
206
|
+
|
|
207
|
+
What it intentionally does not include:
|
|
208
|
+
|
|
209
|
+
- live telemetry
|
|
210
|
+
- GraphQL server endpoints
|
|
211
|
+
- task or event execution
|
|
212
|
+
- swap or eval actions
|
|
213
|
+
- file-saving mutations
|
|
214
|
+
|
|
215
|
+
`exportDocs()` uses Runner's real dry-run path under the hood. In other words, it effectively does a `run(app, { dryRun: true })`, builds the in-memory docs snapshot from that composed Runner store, and emits a frozen catalog. It is not source-only static analysis, which is important both for accuracy and for understanding what code paths still participate during export.
|
|
216
|
+
|
|
217
|
+
This also works well as a CI artifact:
|
|
218
|
+
|
|
219
|
+
- generate the catalog during CI
|
|
220
|
+
- upload `./runner-dev-catalog` or `./artifacts/runner-dev-catalog` as a build artifact
|
|
221
|
+
- inspect the visual docs after the pipeline finishes without starting the app again
|
|
222
|
+
|
|
223
|
+
For local package work inside this repository, `npm run play:export` is the same idea wired to the reference commerce app used by `npm run play`:
|
|
224
|
+
|
|
225
|
+
```bash
|
|
226
|
+
npm run play:export
|
|
227
|
+
npm run play:export -- ./my-export-dir
|
|
228
|
+
```
|
|
229
|
+
|
|
138
230
|
Add it as an Model Context Protocol Server (for AIs) via normal socket:
|
|
139
231
|
|
|
140
232
|
```json
|
|
@@ -155,6 +247,23 @@ Add it as an Model Context Protocol Server (for AIs) via normal socket:
|
|
|
155
247
|
|
|
156
248
|
Then start your app as usual. The Dev GraphQL server will be available at http://localhost:1337/graphql.
|
|
157
249
|
|
|
250
|
+
For a frozen exported catalog, you can point MCP at the generated snapshot instead of a live endpoint:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"mcpServers": {
|
|
255
|
+
"mcp-graphql": {
|
|
256
|
+
"description": "MCP Server for an exported Runner Dev snapshot",
|
|
257
|
+
"command": "npx",
|
|
258
|
+
"args": ["@bluelibs/runner-dev", "mcp"],
|
|
259
|
+
"env": {
|
|
260
|
+
"SNAPSHOT_FILE": "./runner-dev-catalog/snapshot.json"
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
```
|
|
266
|
+
|
|
158
267
|
### CLI usage (MCP server)
|
|
159
268
|
|
|
160
269
|
After installing, you can start the MCP server from this package via stdio.
|
|
@@ -163,20 +272,22 @@ Using npx:
|
|
|
163
272
|
|
|
164
273
|
```bash
|
|
165
274
|
ENDPOINT=http://localhost:1337/graphql npx -y @bluelibs/runner-dev mcp
|
|
275
|
+
SNAPSHOT_FILE=./runner-dev-catalog/snapshot.json npx -y @bluelibs/runner-dev mcp
|
|
166
276
|
```
|
|
167
277
|
|
|
168
278
|
Optional environment variables:
|
|
169
279
|
|
|
280
|
+
- `SNAPSHOT_FILE=./runner-dev-catalog/snapshot.json` to serve MCP from an exported static snapshot instead of a live endpoint
|
|
170
281
|
- `ALLOW_MUTATIONS=true` to enable `graphql.mutation`
|
|
171
282
|
- `HEADERS='{"Authorization":"Bearer token"}'` to pass extra headers
|
|
172
283
|
|
|
173
284
|
Available tools once connected:
|
|
174
285
|
|
|
175
|
-
- `graphql.query` — run read-only queries
|
|
176
|
-
- `graphql.mutation` — run mutations (requires `ALLOW_MUTATIONS=true
|
|
286
|
+
- `graphql.query` — run read-only queries against the live endpoint or snapshot
|
|
287
|
+
- `graphql.mutation` — run mutations (requires `ALLOW_MUTATIONS=true`, live endpoint only)
|
|
177
288
|
- `graphql.introspect` — fetch schema
|
|
178
|
-
- `graphql.ping` —
|
|
179
|
-
- `project.overview` — dynamic Markdown overview aggregated from the
|
|
289
|
+
- `graphql.ping` — source check for the configured endpoint or snapshot
|
|
290
|
+
- `project.overview` — dynamic Markdown overview aggregated from the configured source
|
|
180
291
|
|
|
181
292
|
### CLI usage (direct)
|
|
182
293
|
|
|
@@ -188,6 +299,14 @@ Prerequisites:
|
|
|
188
299
|
- Alternatively, you can run queries in a new **dry‑run mode** with a TypeScript entry file (no server required).
|
|
189
300
|
- Build this package (or install it) so the binary is available.
|
|
190
301
|
|
|
302
|
+
Programmatic export is available even when you do not want a live server:
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
import { exportDocs } from "@bluelibs/runner-dev";
|
|
306
|
+
|
|
307
|
+
await exportDocs(app);
|
|
308
|
+
```
|
|
309
|
+
|
|
191
310
|
Help:
|
|
192
311
|
|
|
193
312
|
```bash
|
|
@@ -222,10 +341,10 @@ Examples:
|
|
|
222
341
|
|
|
223
342
|
```bash
|
|
224
343
|
# Create and auto-install dependencies, then run tests
|
|
225
|
-
new my-awesome-app --install --run-tests
|
|
344
|
+
runner-dev new my-awesome-app --install --run-tests
|
|
226
345
|
|
|
227
346
|
# Create and start the dev server immediately (blocks)
|
|
228
|
-
new my-awesome-app --install --run
|
|
347
|
+
runner-dev new my-awesome-app --install --run
|
|
229
348
|
```
|
|
230
349
|
|
|
231
350
|
Scaffold artifacts (resource | task | event | tag | taskMiddleware | resourceMiddleware):
|
|
@@ -374,7 +493,7 @@ Precedence:
|
|
|
374
493
|
|
|
375
494
|
## GraphQL API Examples
|
|
376
495
|
|
|
377
|
-
For a full list of types and fields, see the [API Reference](API_REFERENCE.md).
|
|
496
|
+
For a full list of types and fields, see the [API Reference](readmes/API_REFERENCE.md).
|
|
378
497
|
|
|
379
498
|
### Explore tasks and dependencies deeply
|
|
380
499
|
|
|
@@ -35,7 +35,7 @@ async function writeFile(filePath, content) {
|
|
|
35
35
|
await promises_1.default.writeFile(filePath, content, { encoding: "utf8" });
|
|
36
36
|
}
|
|
37
37
|
async function writeGitignore(targetDir) {
|
|
38
|
-
const content = `node_modules\n.
|
|
38
|
+
const content = `node_modules\n.env\ndist\n.agents/skills\n\n`;
|
|
39
39
|
await writeFile(path_1.default.join(targetDir, ".gitignore"), content);
|
|
40
40
|
}
|
|
41
41
|
async function runCommand(cmd, args, cwd) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initUtils.js","sourceRoot":"","sources":["../../../src/cli/generators/initUtils.ts"],"names":[],"mappings":";;;;;AAKA,wCAaC;AAED,8BAEC;AAED,8BAMC;AAED,8BAKC;AAED,wCAGC;AAED,gCAqBC;AAED,gCAmCC;AAtGD,4CAAoB;AACpB,2DAA8B;AAC9B,gDAAwB;AACxB,iDAAsC;AAE/B,KAAK,UAAU,cAAc,CAAC,GAAW;IAC9C,IAAI,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,OAAO,GAAG,MAAM,kBAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvB,MAAM,IAAI,KAAK,CACb,qBAAqB,cA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;YACX,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,QAAQ,CAAC;YACnB,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACX,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;YACzB,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gBACnC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;gBACpB,CAAC,EAAE,CAAC,CAAC,gBAAgB;YACvB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC,eAAe;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO;QACL,OAAO,EAAE,GAAG;QACZ,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE;YACxB,MAAM,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC3B,OAAO,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -4,7 +4,7 @@ exports.readme = readme;
|
|
|
4
4
|
function readme(projectName) {
|
|
5
5
|
return `# ${projectName}
|
|
6
6
|
|
|
7
|
-
Generated by \`runner-dev new\` for Runner 6.
|
|
7
|
+
Generated by \`runner-dev new\` for Runner 6.3.
|
|
8
8
|
|
|
9
9
|
## Quick start
|
|
10
10
|
|
|
@@ -12,28 +12,41 @@ Generated by \`runner-dev new\` for Runner 6.2.
|
|
|
12
12
|
- npm install
|
|
13
13
|
2. Start the dev server:
|
|
14
14
|
- npm run dev
|
|
15
|
+
3. Run the smoke checks:
|
|
16
|
+
- npm run qa
|
|
15
17
|
|
|
16
18
|
The server starts on http://localhost:1337
|
|
17
19
|
|
|
20
|
+
On install, the \`postinstall\` script runs \`npm-skills extract --skip-production --override\` via \`npm run skills:extract\`. The \`--skip-production\` flag keeps production installs clean while still extracting skills for local development.
|
|
21
|
+
|
|
18
22
|
- GraphQL endpoint: http://localhost:1337/graphql (how to query your guts and live telemetry)
|
|
19
23
|
- Voyager UI: http://localhost:1337/voyager (how the guts of your app look like)
|
|
20
24
|
- Project docs: http://localhost:1337/docs (beautiful docs with live telemetry and easy task and event dispatching)
|
|
21
25
|
|
|
22
|
-
## Runner 6.
|
|
26
|
+
## Runner 6.3 notes
|
|
23
27
|
|
|
24
28
|
- Runtime task and resource ids are structural, so user resource segments stay in canonical ids.
|
|
25
29
|
- \`resource.subtree(...)\` can compose multiple policies with an array.
|
|
26
30
|
- Built-in async context accessors support safe probes via \`tryUse()\` and \`has()\`.
|
|
27
|
-
- Built-in
|
|
31
|
+
- Built-in async identity now lives at \`asyncContexts.identity\`, and identity-aware middleware uses \`identityScope\`.
|
|
32
|
+
- Event Lane routing is defined with \`r.eventLane(...).applyTo([...])\`, and topology consume entries use \`{ lane, hooks?: { only } }\`.
|
|
28
33
|
- Subtree middleware conflicts now fail fast instead of silently deferring to local middleware.
|
|
29
34
|
|
|
30
35
|
## Scripts
|
|
31
36
|
|
|
32
|
-
- dev: Run with tsx watch
|
|
37
|
+
- dev: Run with tsx watch
|
|
33
38
|
- build: Type-check and emit to dist
|
|
34
39
|
- start: Run built app
|
|
35
40
|
- test: Run Vitest once
|
|
36
41
|
- test:watch: Run Vitest in watch mode
|
|
42
|
+
- qa: Run the minimal verification flow (\`build\` + \`test\`)
|
|
43
|
+
- skills:extract: Refresh extracted skills from installed packages
|
|
44
|
+
|
|
45
|
+
## Project layout
|
|
46
|
+
|
|
47
|
+
- \`src/app.ts\`: exported root Runner resource definition
|
|
48
|
+
- \`src/main.ts\`: executable entry point for local development
|
|
49
|
+
- \`src/app.test.ts\`: runtime smoke test
|
|
37
50
|
|
|
38
51
|
## Useful CLI commands
|
|
39
52
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"README.md.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/README.md.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"README.md.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/README.md.ts"],"names":[],"mappings":";;AAAA,wBAyDC;AAzDD,SAAgB,MAAM,CAAC,WAAmB;IACxC,OAAO,KAAK,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDxB,CAAC;AACF,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { packageJson } from "./package.json";
|
|
2
2
|
export { tsconfig } from "./tsconfig.json";
|
|
3
|
+
export { appTs } from "./src/app.ts";
|
|
3
4
|
export { mainTs } from "./src/main.ts";
|
|
4
|
-
export {
|
|
5
|
+
export { appTest } from "./src/app.test.ts";
|
|
5
6
|
export { readme } from "./README.md";
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.readme = exports.
|
|
3
|
+
exports.readme = exports.appTest = exports.mainTs = exports.appTs = exports.tsconfig = exports.packageJson = void 0;
|
|
4
4
|
var package_json_1 = require("./package.json");
|
|
5
5
|
Object.defineProperty(exports, "packageJson", { enumerable: true, get: function () { return package_json_1.packageJson; } });
|
|
6
6
|
var tsconfig_json_1 = require("./tsconfig.json");
|
|
7
7
|
Object.defineProperty(exports, "tsconfig", { enumerable: true, get: function () { return tsconfig_json_1.tsconfig; } });
|
|
8
|
+
var app_ts_1 = require("./src/app.ts");
|
|
9
|
+
Object.defineProperty(exports, "appTs", { enumerable: true, get: function () { return app_ts_1.appTs; } });
|
|
8
10
|
var main_ts_1 = require("./src/main.ts");
|
|
9
11
|
Object.defineProperty(exports, "mainTs", { enumerable: true, get: function () { return main_ts_1.mainTs; } });
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(exports, "
|
|
12
|
+
var app_test_ts_1 = require("./src/app.test.ts");
|
|
13
|
+
Object.defineProperty(exports, "appTest", { enumerable: true, get: function () { return app_test_ts_1.appTest; } });
|
|
12
14
|
var README_md_1 = require("./README.md");
|
|
13
15
|
Object.defineProperty(exports, "readme", { enumerable: true, get: function () { return README_md_1.readme; } });
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,iDAA2C;AAAlC,yGAAA,QAAQ,OAAA;AACjB,yCAAuC;AAA9B,iGAAA,MAAM,OAAA;AACf,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/index.ts"],"names":[],"mappings":";;;AAAA,+CAA6C;AAApC,2GAAA,WAAW,OAAA;AACpB,iDAA2C;AAAlC,yGAAA,QAAQ,OAAA;AACjB,uCAAqC;AAA5B,+FAAA,KAAK,OAAA;AACd,yCAAuC;AAA9B,iGAAA,MAAM,OAAA;AACf,iDAA4C;AAAnC,sGAAA,OAAO,OAAA;AAChB,yCAAqC;AAA5B,mGAAA,MAAM,OAAA"}
|
|
@@ -9,13 +9,18 @@ export declare function packageJson(projectName: string): {
|
|
|
9
9
|
readonly build: "tsc -p tsconfig.json";
|
|
10
10
|
readonly test: "vitest run";
|
|
11
11
|
readonly "test:watch": "vitest";
|
|
12
|
+
readonly qa: "npm run build && npm run test";
|
|
12
13
|
readonly "schema:sdl": "runner-dev schema sdl";
|
|
14
|
+
readonly "skills:extract": "npm-skills extract --skip-production --override";
|
|
15
|
+
readonly postinstall: "npm run skills:extract";
|
|
13
16
|
};
|
|
14
17
|
readonly dependencies: {
|
|
15
|
-
readonly "@bluelibs/runner": "^6.
|
|
18
|
+
readonly "@bluelibs/runner": "^6.4.0";
|
|
19
|
+
readonly "npm-skills": "^0.5.0";
|
|
16
20
|
};
|
|
17
21
|
readonly devDependencies: {
|
|
18
|
-
readonly "@bluelibs/runner-dev": "^6.
|
|
22
|
+
readonly "@bluelibs/runner-dev": "^6.4.0";
|
|
23
|
+
readonly "@types/node": "^20.0.0";
|
|
19
24
|
readonly typescript: "^5.6.3";
|
|
20
25
|
readonly tsx: "^4.20.5";
|
|
21
26
|
readonly vitest: "^3.2.4";
|
|
@@ -13,13 +13,18 @@ function packageJson(projectName) {
|
|
|
13
13
|
build: "tsc -p tsconfig.json",
|
|
14
14
|
test: "vitest run",
|
|
15
15
|
"test:watch": "vitest",
|
|
16
|
+
qa: "npm run build && npm run test",
|
|
16
17
|
"schema:sdl": "runner-dev schema sdl",
|
|
18
|
+
"skills:extract": "npm-skills extract --skip-production --override",
|
|
19
|
+
postinstall: "npm run skills:extract",
|
|
17
20
|
},
|
|
18
21
|
dependencies: {
|
|
19
|
-
"@bluelibs/runner": "^6.
|
|
22
|
+
"@bluelibs/runner": "^6.4.0",
|
|
23
|
+
"npm-skills": "^0.5.0",
|
|
20
24
|
},
|
|
21
25
|
devDependencies: {
|
|
22
|
-
"@bluelibs/runner-dev": "^6.
|
|
26
|
+
"@bluelibs/runner-dev": "^6.4.0",
|
|
27
|
+
"@types/node": "^20.0.0",
|
|
23
28
|
typescript: "^5.6.3",
|
|
24
29
|
tsx: "^4.20.5",
|
|
25
30
|
vitest: "^3.2.4",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"package.json.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/package.json.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"package.json.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/package.json.ts"],"names":[],"mappings":";;AAAA,kCA6BC;AA7BD,SAAgB,WAAW,CAAC,WAAmB;IAC7C,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,OAAO;QAChB,OAAO,EAAE,IAAI;QACb,IAAI,EAAE,UAAU;QAChB,OAAO,EAAE;YACP,GAAG,EAAE,uBAAuB;YAC5B,KAAK,EAAE,wCAAwC;YAC/C,KAAK,EAAE,sBAAsB;YAC7B,IAAI,EAAE,YAAY;YAClB,YAAY,EAAE,QAAQ;YACtB,EAAE,EAAE,+BAA+B;YACnC,YAAY,EAAE,uBAAuB;YACrC,gBAAgB,EAAE,iDAAiD;YACnE,WAAW,EAAE,wBAAwB;SACtC;QACD,YAAY,EAAE;YACZ,kBAAkB,EAAE,QAAQ;YAC5B,YAAY,EAAE,QAAQ;SACvB;QACD,eAAe,EAAE;YACf,sBAAsB,EAAE,QAAQ;YAChC,aAAa,EAAE,SAAS;YACxB,UAAU,EAAE,QAAQ;YACpB,GAAG,EAAE,SAAS;YACd,MAAM,EAAE,QAAQ;SACjB;KACO,CAAC;AACb,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function appTest(): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appTest = appTest;
|
|
4
|
+
function appTest() {
|
|
5
|
+
return `import { resources, run } from '@bluelibs/runner';
|
|
6
|
+
import { afterEach, describe, expect, it } from 'vitest';
|
|
7
|
+
import { app } from './app';
|
|
8
|
+
|
|
9
|
+
const runtimes: Array<{ dispose: () => Promise<void> }> = [];
|
|
10
|
+
|
|
11
|
+
afterEach(async () => {
|
|
12
|
+
while (runtimes.length > 0) {
|
|
13
|
+
await runtimes.pop()?.dispose();
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
describe('app', () => {
|
|
18
|
+
it('boots the runtime and exposes the dev docs endpoint', async () => {
|
|
19
|
+
const runtime = await run(app);
|
|
20
|
+
runtimes.push(runtime);
|
|
21
|
+
const store = await runtime.getResourceValue(resources.store);
|
|
22
|
+
|
|
23
|
+
expect(runtime).toBeDefined();
|
|
24
|
+
expect(store).toBe(runtime.store);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
`;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=app.test.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.test.ts.js","sourceRoot":"","sources":["../../../../../../src/cli/generators/scaffold/templates/src/app.test.ts.ts"],"names":[],"mappings":";;AAAA,0BAwBC;AAxBD,SAAgB,OAAO;IACrB,OAAO;;;;;;;;;;;;;;;;;;;;;;CAsBR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function appTs(projectName: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.appTs = appTs;
|
|
4
|
+
function appTs(projectName) {
|
|
5
|
+
return `import { r } from '@bluelibs/runner';
|
|
6
|
+
import { dev } from '@bluelibs/runner-dev';
|
|
7
|
+
|
|
8
|
+
export const app = r.resource('${projectName}')
|
|
9
|
+
.register([
|
|
10
|
+
dev.with({ port: 1337 }),
|
|
11
|
+
])
|
|
12
|
+
.build();
|
|
13
|
+
`;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=app.ts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.ts.js","sourceRoot":"","sources":["../../../../../../src/cli/generators/scaffold/templates/src/app.ts.ts"],"names":[],"mappings":";;AAAA,sBAUC;AAVD,SAAgB,KAAK,CAAC,WAAmB;IACvC,OAAO;;;iCAGwB,WAAW;;;;;CAK3C,CAAC;AACF,CAAC"}
|
|
@@ -2,19 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mainTs = mainTs;
|
|
4
4
|
function mainTs(projectName) {
|
|
5
|
-
return `import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
// Minimal Runner 6.2 app using a root resource and runner-dev's dev resource
|
|
9
|
-
const app = r.resource('${projectName}')
|
|
10
|
-
.register([
|
|
11
|
-
dev.with({ port: 1337 }),
|
|
12
|
-
])
|
|
13
|
-
.build();
|
|
5
|
+
return `import { run } from '@bluelibs/runner';
|
|
6
|
+
import { app } from './app';
|
|
14
7
|
|
|
15
8
|
run(app)
|
|
16
9
|
.then(({ logger }) => {
|
|
17
|
-
logger.info('
|
|
10
|
+
logger.info('${projectName} is running!');
|
|
18
11
|
})
|
|
19
12
|
.catch((err) => {
|
|
20
13
|
// eslint-disable-next-line no-console
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.ts.js","sourceRoot":"","sources":["../../../../../../src/cli/generators/scaffold/templates/src/main.ts.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"main.ts.js","sourceRoot":"","sources":["../../../../../../src/cli/generators/scaffold/templates/src/main.ts.ts"],"names":[],"mappings":";;AAAA,wBAcC;AAdD,SAAgB,MAAM,CAAC,WAAmB;IACxC,OAAO;;;;;mBAKU,WAAW;;;;;;;CAO7B,CAAC;AACF,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
export declare function tsconfig(): {
|
|
2
2
|
readonly compilerOptions: {
|
|
3
3
|
readonly target: "ESNext";
|
|
4
|
-
readonly module: "
|
|
5
|
-
readonly moduleResolution: "
|
|
4
|
+
readonly module: "CommonJS";
|
|
5
|
+
readonly moduleResolution: "node";
|
|
6
6
|
readonly strict: true;
|
|
7
|
+
readonly types: readonly ["node"];
|
|
7
8
|
readonly esModuleInterop: true;
|
|
8
9
|
readonly forceConsistentCasingInFileNames: true;
|
|
9
10
|
readonly declaration: true;
|
|
@@ -14,4 +15,5 @@ export declare function tsconfig(): {
|
|
|
14
15
|
readonly lib: readonly ["ESNext"];
|
|
15
16
|
};
|
|
16
17
|
readonly include: readonly ["src"];
|
|
18
|
+
readonly exclude: readonly ["src/**/*.test.ts"];
|
|
17
19
|
};
|
|
@@ -5,9 +5,10 @@ function tsconfig() {
|
|
|
5
5
|
return {
|
|
6
6
|
compilerOptions: {
|
|
7
7
|
target: "ESNext",
|
|
8
|
-
module: "
|
|
9
|
-
moduleResolution: "
|
|
8
|
+
module: "CommonJS",
|
|
9
|
+
moduleResolution: "node",
|
|
10
10
|
strict: true,
|
|
11
|
+
types: ["node"],
|
|
11
12
|
esModuleInterop: true,
|
|
12
13
|
forceConsistentCasingInFileNames: true,
|
|
13
14
|
declaration: true,
|
|
@@ -18,6 +19,7 @@ function tsconfig() {
|
|
|
18
19
|
lib: ["ESNext"],
|
|
19
20
|
},
|
|
20
21
|
include: ["src"],
|
|
22
|
+
exclude: ["src/**/*.test.ts"],
|
|
21
23
|
};
|
|
22
24
|
}
|
|
23
25
|
//# sourceMappingURL=tsconfig.json.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tsconfig.json.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/tsconfig.json.ts"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"tsconfig.json.js","sourceRoot":"","sources":["../../../../../src/cli/generators/scaffold/templates/tsconfig.json.ts"],"names":[],"mappings":";;AAAA,4BAoBC;AApBD,SAAgB,QAAQ;IACtB,OAAO;QACL,eAAe,EAAE;YACf,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,UAAU;YAClB,gBAAgB,EAAE,MAAM;YACxB,MAAM,EAAE,IAAI;YACZ,KAAK,EAAE,CAAC,MAAM,CAAC;YACf,eAAe,EAAE,IAAI;YACrB,gCAAgC,EAAE,IAAI;YACtC,WAAW,EAAE,IAAI;YACjB,MAAM,EAAE,MAAM;YACd,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,IAAI;YAClB,iBAAiB,EAAE,IAAI;YACvB,GAAG,EAAE,CAAC,QAAQ,CAAC;SAChB;QACD,OAAO,EAAE,CAAC,KAAK,CAAC;QAChB,OAAO,EAAE,CAAC,kBAAkB,CAAC;KACrB,CAAC;AACb,CAAC"}
|
|
@@ -37,8 +37,9 @@ async function scaffold(opts) {
|
|
|
37
37
|
await (0, initUtils_1.writeJson)(path_1.default.join(targetDir, "package.json"), templates.packageJson(projectName));
|
|
38
38
|
await (0, initUtils_1.writeJson)(path_1.default.join(targetDir, "tsconfig.json"), templates.tsconfig());
|
|
39
39
|
await (0, initUtils_1.ensureDir)(path_1.default.join(targetDir, "src"));
|
|
40
|
+
await (0, initUtils_1.writeFile)(path_1.default.join(targetDir, "src", "app.ts"), templates.appTs(projectName));
|
|
40
41
|
await (0, initUtils_1.writeFile)(path_1.default.join(targetDir, "src", "main.ts"), templates.mainTs(projectName));
|
|
41
|
-
await (0, initUtils_1.writeFile)(path_1.default.join(targetDir, "src", "
|
|
42
|
+
await (0, initUtils_1.writeFile)(path_1.default.join(targetDir, "src", "app.test.ts"), templates.appTest());
|
|
42
43
|
await (0, initUtils_1.writeFile)(path_1.default.join(targetDir, "README.md"), templates.readme(projectName));
|
|
43
44
|
await (0, initUtils_1.writeGitignore)(targetDir);
|
|
44
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../../src/cli/generators/scaffold.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../../src/cli/generators/scaffold.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,4BA8BC;AAvCD,gDAAwB;AACxB,2CAA8E;AAC9E,gEAAkD;AAO3C,KAAK,UAAU,QAAQ,CAAC,IAAqB;IAClD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,GAAG,IAAI,CAAC;IAExC,+CAA+C;IAE/C,yBAAyB;IACzB,MAAM,IAAA,qBAAS,EACb,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,EACpC,SAAS,CAAC,WAAW,CAAC,WAAW,CAAC,CACnC,CAAC;IACF,MAAM,IAAA,qBAAS,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,SAAS,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE7E,MAAM,IAAA,qBAAS,EAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC;IAC7C,MAAM,IAAA,qBAAS,EACb,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,EACrC,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,CAC7B,CAAC;IACF,MAAM,IAAA,qBAAS,EACb,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,SAAS,CAAC,EACtC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAC9B,CAAC;IACF,MAAM,IAAA,qBAAS,EACb,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,EAAE,aAAa,CAAC,EAC1C,SAAS,CAAC,OAAO,EAAE,CACpB,CAAC;IACF,MAAM,IAAA,qBAAS,EACb,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,EACjC,SAAS,CAAC,MAAM,CAAC,WAAW,CAAC,CAC9B,CAAC;IACF,MAAM,IAAA,0BAAc,EAAC,SAAS,CAAC,CAAC;AAClC,CAAC"}
|
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const RUNNER_FRAMEWORK_COMPACT_DOC_PATHS: readonly ["readmes/COMPACT_GUIDE.md"];
|
|
2
|
+
export declare const RUNNER_FRAMEWORK_COMPLETE_DOC_PATHS: readonly ["readmes/FULL_GUIDE.md"];
|
|
3
|
+
export declare class PackageDocNotFoundError extends Error {
|
|
4
|
+
readonly attemptedPaths: string[];
|
|
5
|
+
constructor(packageName: string, docPaths: readonly string[], attemptedPaths: string[]);
|
|
6
|
+
}
|
|
7
|
+
export declare function readPackageDoc(packageName: string, docPath?: string): Promise<{
|
|
8
|
+
packageName: string;
|
|
9
|
+
filePath: string;
|
|
10
|
+
content: string;
|
|
11
|
+
}>;
|
|
12
|
+
export declare function readFirstAvailablePackageDoc(packageName: string, docPaths: string[]): Promise<{
|
|
13
|
+
packageName: string;
|
|
14
|
+
filePath: string;
|
|
15
|
+
content: string;
|
|
16
|
+
}>;
|