render-workflows-dart 0.8.2 → 0.8.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.3
4
+
5
+ Documentation only, but it needs a release: npm serves a README from the
6
+ archive, so 0.8.2's registry page still taught `render-dart build`.
7
+
8
+ Every command in the docs, in the example `npm` scripts, and in the build's own
9
+ log lines now reads `render-workflows-dart`. One name to learn, and it is the
10
+ one you install. `render-dart` remains a second bin, documented as an alias, so
11
+ nothing that already exists breaks.
12
+
3
13
  ## 0.8.2
4
14
 
5
15
  **Renamed to `render-workflows-dart`.** `render-dart` said neither which Render
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # render-workflows-dart
2
2
 
3
3
  > **Renamed.** This package was `render-dart` up to 0.8.1 and is
4
- > `render-workflows-dart` from 0.8.2. The `render-dart` command still works, so
5
- > an existing project only changes one line:
4
+ > `render-workflows-dart` from 0.8.2. The old `render-dart` command still works
5
+ > as an alias, so an existing project only changes one line:
6
6
  >
7
7
  > ```diff
8
8
  > - "render-dart": "^0.8.1"
@@ -26,7 +26,7 @@ no built-in way to use Dart: tasks are defined with Render's own SDK, which is
26
26
  available for **TypeScript and Python** only. Their docs say SDKs for more
27
27
  languages are planned.
28
28
 
29
- `render-dart` provides first class dart language support, without reaching for Docker (which
29
+ `render-workflows-dart` provides first class dart language support, without reaching for Docker (which
30
30
  would cost API provisioning and local development). It can compile Dart **two
31
31
  ways**:
32
32
 
@@ -48,7 +48,7 @@ access to render's apis (neither are required to use this one):
48
48
 
49
49
  | | |
50
50
  | --- | --- |
51
- | `render-dart` (this) | **Writing** tasks in Dart |
51
+ | `render-workflows-dart` (this) | **Writing** tasks in Dart |
52
52
  | [`render_workflows`](https://pub.dev/packages/render_workflows) | **Running** workflows/tasks — start, watch, cancel, fan out |
53
53
  | [`render_api`](https://pub.dev/packages/render_api) | **Managing** the services — create, deploy, inspect |
54
54
 
@@ -91,7 +91,7 @@ template that does not work is a test failure rather than a surprise.
91
91
  ## Coding agents
92
92
 
93
93
  Agents never read `node_modules`, so nothing shipped inside this package
94
- reaches one helping in your project. `render-dart init` therefore writes an
94
+ reaches one helping in your project. `render-workflows-dart init` therefore writes an
95
95
  `AGENTS.md` (and a `CLAUDE.md` pointing at it) **into the project it creates**,
96
96
  covering the traps, when to reach for a native task, and how to get at a
97
97
  database.
@@ -146,7 +146,7 @@ render workflows create --name my-workflow --repo <url> \
146
146
  --run-command "node index.js"
147
147
  ```
148
148
 
149
- No Dart is needed on Render's builder — `render-dart build` fetches a pinned
149
+ No Dart is needed on Render's builder — `render-workflows-dart build` fetches a pinned
150
150
  SDK when none is present.
151
151
 
152
152
  > Blueprints (`render.yaml`) do not support Workflows, so provisioning is via
@@ -156,11 +156,11 @@ SDK when none is present.
156
156
 
157
157
  | | |
158
158
  | --- | --- |
159
- | `render-dart build` | Compile `tasks.dart` to `build/tasks.js`, skipping if fresh |
160
- | `render-dart dev` | Build, then start Render's local task server |
161
- | `render-dart init [dir] [--template <name>]` | Scaffold a new project from an [example](#examples-which-are-also-templates) |
162
- | `render-dart dart` | Which Dart this project will use, and why |
163
- | `render-dart dart --list` | Every version the archive offers |
159
+ | `render-workflows-dart build` | Compile `tasks.dart` to `build/tasks.js`, skipping if fresh |
160
+ | `render-workflows-dart dev` | Build, then start Render's local task server |
161
+ | `render-workflows-dart init [dir] [--template <name>]` | Scaffold a new project from an [example](#examples-which-are-also-templates) |
162
+ | `render-workflows-dart dart` | Which Dart this project will use, and why |
163
+ | `render-workflows-dart dart --list` | Every version the archive offers |
164
164
 
165
165
  `--template` takes any directory name under
166
166
  [`examples/`](examples) — `default` (the default), `http`, `native`,
@@ -211,8 +211,8 @@ for varying a build without a commit — Render's dashboard sets those — and
211
211
  `package.json` for the answer that should travel with the project:
212
212
 
213
213
  ```bash
214
- npx render-dart build --dart-version 3.12.2
215
- RENDER_DART_VERSION=3.12.2 npx render-dart build
214
+ npx render-workflows-dart build --dart-version 3.12.2
215
+ RENDER_DART_VERSION=3.12.2 npx render-workflows-dart build
216
216
  ```
217
217
 
218
218
  ```json
@@ -225,8 +225,8 @@ keeps building when the archive is unreachable; an alias is resolved against
225
225
  the archive on each build, which is the point of asking for one.
226
226
 
227
227
  ```bash
228
- npx render-dart dart # what this project will use, and why
229
- npx render-dart dart --list # 176 stable releases, newest first
228
+ npx render-workflows-dart dart # what this project will use, and why
229
+ npx render-workflows-dart dart --list # 176 stable releases, newest first
230
230
  ```
231
231
 
232
232
  **A pin set explicitly wins over a Dart already on `PATH`.** If they differ, the
@@ -256,7 +256,7 @@ check happened.
256
256
 
257
257
  ## Using pub.dev packages
258
258
 
259
- Add them to `pubspec.yaml` as normal; `render-dart build` runs `dart pub get`
259
+ Add them to `pubspec.yaml` as normal; `render-workflows-dart build` runs `dart pub get`
260
260
  for you. What works is determined by dart2js, not by Render:
261
261
 
262
262
  | | Works? | |
@@ -268,7 +268,7 @@ for you. What works is determined by dart2js, not by Render:
268
268
  **`dart:io` is the trap.** dart2js compiles it without complaint and then
269
269
  throws `Unsupported operation` at runtime — so a task using it deploys cleanly
270
270
  and fails on its first real run, potentially burning up to the task timeout
271
- first. `render-dart build` therefore refuses to build a project that imports
271
+ first. `render-workflows-dart build` therefore refuses to build a project that imports
272
272
  `dart:io` directly, and tells you what to use instead. Conditional imports
273
273
  (`if (dart.library.io)`) are left alone, and `allowDartIo` opts out.
274
274
 
@@ -394,7 +394,7 @@ ranked.
394
394
  | Extra artefact | none | a binary, built during the deploy |
395
395
 
396
396
  **Reach for wasm when the package already has one.** `forge2d` and
397
- `rust_crypto` both do, and `render-dart` resolves their modules without
397
+ `rust_crypto` both do, and `render-workflows-dart` resolves their modules without
398
398
  configuration. Nothing is spawned and nothing is compiled.
399
399
 
400
400
  **Reach for native when there is no wasm build, when the work needs I/O or
@@ -475,7 +475,7 @@ import 'native/tools.dart';
475
475
  task('inspect', (args) async => await inspect(args[0]! as String));
476
476
  ```
477
477
 
478
- `render-dart build` generates `native/tools.dart` as a conditional export:
478
+ `render-workflows-dart build` generates `native/tools.dart` as a conditional export:
479
479
 
480
480
  ```dart
481
481
  export 'tools.stub.dart' if (dart.library.io) 'tools_impl.dart';
@@ -23,7 +23,7 @@ reality; making them the same thing means every template is one you can run.
23
23
  ```bash
24
24
  cd http
25
25
  npm install
26
- npx render-dart dev
26
+ npx render-workflows-dart dev
27
27
  ```
28
28
 
29
29
  Then, in another terminal:
@@ -1,7 +1,7 @@
1
1
  # default
2
2
 
3
3
  The Workflows basics, with no dependencies beyond the SDK. This is what
4
- `render-dart init` produces with no `--template`.
4
+ `render-workflows-dart init` produces with no `--template`.
5
5
 
6
6
  | Task | Shows |
7
7
  | --- | --- |
@@ -10,7 +10,7 @@ The Workflows basics, with no dependencies beyond the SDK. This is what
10
10
  | `flaky` | Retry policy, and a failure reaching Render with its real message |
11
11
 
12
12
  ```bash
13
- npm install && npx render-dart dev
13
+ npm install && npx render-workflows-dart dev
14
14
  render workflows start sumSquares --local --input='[[2, 3, 4]]' # 29
15
15
  ```
16
16
 
@@ -1,2 +1,2 @@
1
1
  // Render runs this as the start command.
2
- require('render-dart/runtime').runTasks('./build/tasks.js');
2
+ require('render-workflows-dart/runtime').runTasks('./build/tasks.js');
@@ -3,13 +3,13 @@
3
3
  "version": "0.1.0",
4
4
  "private": true,
5
5
  "scripts": {
6
- "build": "render-dart build",
6
+ "build": "render-workflows-dart build",
7
7
  "start": "node index.js",
8
- "dev": "render-dart dev"
8
+ "dev": "render-workflows-dart dev"
9
9
  },
10
10
  "dependencies": {
11
11
  "@renderinc/sdk": "^0.6.0",
12
- "render-dart": "^0.7.1"
12
+ "render-workflows-dart": "^0.8.2"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">=18"
@@ -14,7 +14,7 @@ why the build refuses a direct `dart:io` import.
14
14
  | `fetchMany` | Overlapping requests — I/O concurrency needs no extra cores |
15
15
 
16
16
  ```bash
17
- npm install && npx render-dart dev
17
+ npm install && npx render-workflows-dart dev
18
18
  render workflows start fetchRepo --local --input='["dart-lang/sdk"]'
19
19
  ```
20
20
 
@@ -1,2 +1,2 @@
1
1
  // Render runs this as the start command.
2
- require('render-dart/runtime').runTasks('./build/tasks.js');
2
+ require('render-workflows-dart/runtime').runTasks('./build/tasks.js');
@@ -4,13 +4,13 @@
4
4
  "private": true,
5
5
  "description": "Calling external APIs from a Render Workflows task written in Dart",
6
6
  "scripts": {
7
- "build": "render-dart build",
7
+ "build": "render-workflows-dart build",
8
8
  "start": "node index.js",
9
- "dev": "render-dart dev"
9
+ "dev": "render-workflows-dart dev"
10
10
  },
11
11
  "dependencies": {
12
12
  "@renderinc/sdk": "^0.6.0",
13
- "render-dart": "^0.7.1"
13
+ "render-workflows-dart": "^0.8.2"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=18"
@@ -14,7 +14,7 @@ networking.
14
14
  | `runElsewhere` | Starting a task in another workflow and waiting for it |
15
15
 
16
16
  ```bash
17
- npm install && npx render-dart dev
17
+ npm install && npx render-workflows-dart dev
18
18
  render workflows start auditDatabases --local --input='[]'
19
19
  render workflows start runElsewhere --local \
20
20
  --input='["some-workflow/someTask", [7]]'
@@ -1,2 +1,2 @@
1
1
  // Render runs this as the start command.
2
- require('render-dart/runtime').runTasks('./build/tasks.js');
2
+ require('render-workflows-dart/runtime').runTasks('./build/tasks.js');
@@ -4,13 +4,13 @@
4
4
  "private": true,
5
5
  "description": "A Render Workflows task that uses Render's own API and Workflows SDKs",
6
6
  "scripts": {
7
- "build": "render-dart build",
7
+ "build": "render-workflows-dart build",
8
8
  "start": "node index.js",
9
- "dev": "render-dart dev"
9
+ "dev": "render-workflows-dart dev"
10
10
  },
11
11
  "dependencies": {
12
12
  "@renderinc/sdk": "^0.6.0",
13
- "render-dart": "^0.7.1"
13
+ "render-workflows-dart": "^0.8.2"
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=18"
@@ -14,7 +14,7 @@ nothing at the call site says it is native.
14
14
  | `parallelHash` | Isolates across cores, timed against the sequential version |
15
15
 
16
16
  ```bash
17
- npm install && npx render-dart dev
17
+ npm install && npx render-workflows-dart dev
18
18
  render workflows start parallelHash --local --input='[["a","b","c","d","e","f","g","h"]]'
19
19
  ```
20
20
 
@@ -1,2 +1,2 @@
1
1
  // Render runs this as the start command.
2
- require('render-dart/runtime').runTasks('./build/tasks.js');
2
+ require('render-workflows-dart/runtime').runTasks('./build/tasks.js');
@@ -4,13 +4,13 @@
4
4
  "private": true,
5
5
  "description": "dart:io, dart:ffi and parallel isolates from a Render Workflows task",
6
6
  "scripts": {
7
- "build": "render-dart build",
7
+ "build": "render-workflows-dart build",
8
8
  "start": "node index.js",
9
- "dev": "render-dart dev"
9
+ "dev": "render-workflows-dart dev"
10
10
  },
11
11
  "dependencies": {
12
12
  "@renderinc/sdk": "^0.6.0",
13
- "render-dart": "^0.7.1"
13
+ "render-workflows-dart": "^0.8.2"
14
14
  },
15
15
  "renderDart": {
16
16
  "native": [
@@ -34,7 +34,7 @@ dart pub get && dart run bin/seed.dart
34
34
 
35
35
  cd ..
36
36
  export DATABASE_URL=<external connection string>
37
- npm install && npx render-dart dev
37
+ npm install && npx render-workflows-dart dev
38
38
  render workflows start widgetStats --local --input='[]'
39
39
  ```
40
40
 
@@ -1,2 +1,2 @@
1
1
  // Render runs this as the start command.
2
- require('render-dart/runtime').runTasks('./build/tasks.js');
2
+ require('render-workflows-dart/runtime').runTasks('./build/tasks.js');
@@ -4,13 +4,13 @@
4
4
  "private": true,
5
5
  "description": "Reading and writing Render Postgres from a Dart workflow task",
6
6
  "scripts": {
7
- "build": "render-dart build",
7
+ "build": "render-workflows-dart build",
8
8
  "start": "node index.js",
9
- "dev": "render-dart dev"
9
+ "dev": "render-workflows-dart dev"
10
10
  },
11
11
  "dependencies": {
12
12
  "@renderinc/sdk": "^0.6.0",
13
- "render-dart": "^0.7.1"
13
+ "render-workflows-dart": "^0.8.2"
14
14
  },
15
15
  "renderDart": {
16
16
  "native": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "render-workflows-dart",
3
- "version": "0.8.2",
3
+ "version": "0.8.3",
4
4
  "description": "Unofficial: write Render Workflows tasks in Dart, compiled to JavaScript. Not affiliated with or endorsed by Render.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/runtime/AGENTS.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Working in this project
2
2
 
3
3
  Render Workflows tasks written in Dart, built by
4
- [`render-dart`](https://github.com/timmaffett/render_workflows_dart).
4
+ [`render-workflows-dart`](https://github.com/timmaffett/render_workflows_dart).
5
5
 
6
6
  Task bodies are compiled to JavaScript with `dart compile js` and registered
7
7
  through Render's official `@renderinc/sdk` on the `node` runtime. Where
@@ -10,16 +10,16 @@ JavaScript is not enough, a task calls into Dart compiled natively.
10
10
  ## Commands
11
11
 
12
12
  ```bash
13
- npx render-dart build # compile; --force skips the freshness check
14
- npx render-dart dev # build, then start Render's local task server
15
- npx render-dart dart # which Dart this project uses, and why
13
+ npx render-workflows-dart build # compile; --force skips the freshness check
14
+ npx render-workflows-dart dev # build, then start Render's local task server
15
+ npx render-workflows-dart dart # which Dart this project uses, and why
16
16
  render workflows tasks list --local
17
17
  render workflows start <task> --local --input='[1, 2]'
18
18
  ```
19
19
 
20
20
  No Dart installation is needed. If one is on `PATH` the build uses it;
21
21
  otherwise an SDK is fetched into `node_modules`. Either way the build prints
22
- which version it used and where it came from, so `render-dart dart` is only
22
+ which version it used and where it came from, so `render-workflows-dart dart` is only
23
23
  needed before building.
24
24
 
25
25
  To pin a version, put it in `package.json` — that is the form that travels
@@ -106,7 +106,7 @@ single-threaded.
106
106
  pub.dev marks it `runtime:native-aot` with no `runtime:web`. So a database
107
107
  needs a native task, holding the connection open with `worker: true`.
108
108
 
109
- `render-dart init db --template postgres` scaffolds a working version, seeder
109
+ `render-workflows-dart init db --template postgres` scaffolds a working version, seeder
110
110
  included.
111
111
 
112
112
  The connection string belongs in `DATABASE_URL` on the service, set to the
package/src/cli.js CHANGED
@@ -18,9 +18,9 @@ const { compile, findDartIoImports, isFresh, pubGet } = require('./toolchain/com
18
18
  const { nativeEntries, buildNative, writeGeneratedIgnores } = require('./toolchain/native');
19
19
  const { generate, ensureRuntimeFile } = require('./toolchain/generate');
20
20
 
21
- const log = (m) => console.log(`[render-dart] ${m}`);
21
+ const log = (m) => console.log(`[render-workflows-dart] ${m}`);
22
22
  const fail = (m) => {
23
- console.error(`[render-dart] ${m}`);
23
+ console.error(`[render-workflows-dart] ${m}`);
24
24
  process.exit(1);
25
25
  };
26
26
 
package/src/runtime.js CHANGED
@@ -89,7 +89,7 @@ globalThis.__callTask = (name, args) => {
89
89
  */
90
90
  globalThis.__start = () =>
91
91
  startTaskServer().catch((e) => {
92
- console.error('[render-dart] task failed:', e && e.message ? e.message : e);
92
+ console.error('[render-workflows-dart] task failed:', e && e.message ? e.message : e);
93
93
  process.exit(1);
94
94
  });
95
95