create-actuate 0.3.0 → 0.4.1

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/dist/bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  scaffold
4
- } from "./chunk-YL5ZWOZQ.js";
4
+ } from "./chunk-QVLVAHZC.js";
5
5
 
6
6
  // src/bin.ts
7
7
  import { relative } from "path";
@@ -82,6 +82,10 @@ Before you call a change done:
82
82
  4. \`npx actuate deploy --dry-run\`, and only then \`npx actuate deploy\`: every deploy attempt
83
83
  counts against the monthly deploy budget, failed ones included.
84
84
 
85
+ Mark API keys and tokens in the config schema with \`secret(z.string())\` and set their values in the
86
+ dashboard (Config tab), not in \`actuate.config.json\`, which is committed. For \`actuate dev\`, put them
87
+ in \`.dev.vars\` (git-ignored) as \`ACTUATE_CONFIG={"apiKey":"..."}\`; it is merged over the file.
88
+
85
89
  \`npx actuate <command> --help\` explains each command; \`--json\` gives machine-readable output.
86
90
  Guide: https://actuate.run/docs/guides/best-practices/
87
91
  `;
package/dist/index.d.ts CHANGED
@@ -17,7 +17,7 @@ declare const HELLO_ACTUATOR = "import { defineActuator, z } from \"@actuate/sdk
17
17
  /** The hello starter's test: `actuate test` runs it with node:test, no other dependency needed. */
18
18
  declare const HELLO_TEST = "import { test } from \"node:test\";\nimport assert from \"node:assert/strict\";\nimport { testActuator } from \"@actuate/cli/testing\";\nimport actuator from \"./actuator.js\";\n\ntest(\"greets, sleeps, then follows up\", async () => {\n const t = testActuator(actuator);\n const run = await t.start({ name: \"Aina\" });\n assert.equal(run.status, \"WAITING\"); // asleep until the follow-up\n\n await t.advance(\"10 seconds\"); // the test clock: no real waiting\n assert.equal(t.run(run.runId).status, \"COMPLETED\");\n assert.deepEqual(t.rows(\"greetings\").map((r) => r.name), [\"Aina\"]);\n assert.deepEqual(t.logs(run.runId).map((l) => l.message), [\"Hello, Aina!\", \"Still there, Aina?\"]);\n // A budget: fails if a change makes this run cost more passes or rows.\n assert.deepEqual(t.usage(run.runId).passes, 2);\n assert.ok(t.usage(run.runId).rowsWritten <= 20);\n});\n\ntest(\"refuses an empty name before any code runs\", async () => {\n const t = testActuator(actuator);\n await assert.rejects(t.start({ name: \"\" }), /name/);\n});\n";
19
19
  /** For coding agents (and people): the commands that check an actuator before it is deployed. */
20
- declare const AGENTS_MD = "# Working on this actuator\n\nThis is an [Actuate](https://actuate.run) actuator: `actuator.ts` exports `defineActuator({ ... })`.\n`run` is replayed from the top after every sleep, wait and retry, so every side effect\n(provider calls, fetch, database writes, Date.now(), Math.random()) goes inside `ctx.step.do`.\n\nBefore you call a change done:\n\n1. `npx actuate check --platform`: replay safety, plus the hosted platform's deploy checks.\n2. `npx actuate test`: the tests (`*.test.ts`, written with `@actuate/cli/testing`). Add one\n for each behaviour you change; pin passes and rows written with `t.usage(runId)`.\n3. `npx actuate dev`, then `npx actuate run '{...}' --local` and `npx actuate logs <runId> --local`\n to try it by hand. Local runs get the platform's guards and show rows read and written.\n4. `npx actuate deploy --dry-run`, and only then `npx actuate deploy`: every deploy attempt\n counts against the monthly deploy budget, failed ones included.\n\n`npx actuate <command> --help` explains each command; `--json` gives machine-readable output.\nGuide: https://actuate.run/docs/guides/best-practices/\n";
20
+ declare const AGENTS_MD = "# Working on this actuator\n\nThis is an [Actuate](https://actuate.run) actuator: `actuator.ts` exports `defineActuator({ ... })`.\n`run` is replayed from the top after every sleep, wait and retry, so every side effect\n(provider calls, fetch, database writes, Date.now(), Math.random()) goes inside `ctx.step.do`.\n\nBefore you call a change done:\n\n1. `npx actuate check --platform`: replay safety, plus the hosted platform's deploy checks.\n2. `npx actuate test`: the tests (`*.test.ts`, written with `@actuate/cli/testing`). Add one\n for each behaviour you change; pin passes and rows written with `t.usage(runId)`.\n3. `npx actuate dev`, then `npx actuate run '{...}' --local` and `npx actuate logs <runId> --local`\n to try it by hand. Local runs get the platform's guards and show rows read and written.\n4. `npx actuate deploy --dry-run`, and only then `npx actuate deploy`: every deploy attempt\n counts against the monthly deploy budget, failed ones included.\n\nMark API keys and tokens in the config schema with `secret(z.string())` and set their values in the\ndashboard (Config tab), not in `actuate.config.json`, which is committed. For `actuate dev`, put them\nin `.dev.vars` (git-ignored) as `ACTUATE_CONFIG={\"apiKey\":\"...\"}`; it is merged over the file.\n\n`npx actuate <command> --help` explains each command; `--json` gives machine-readable output.\nGuide: https://actuate.run/docs/guides/best-practices/\n";
21
21
  declare function scaffoldFiles(name: string, actuatorSource: string, extra?: Record<string, string>): Record<string, string>;
22
22
  /** Create a new actuator project. Returns the absolute directory. */
23
23
  declare function scaffold(options: ScaffoldOptions): Promise<string>;
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  TEMPLATES_REPO,
7
7
  scaffold,
8
8
  scaffoldFiles
9
- } from "./chunk-YL5ZWOZQ.js";
9
+ } from "./chunk-QVLVAHZC.js";
10
10
  export {
11
11
  AGENTS_MD,
12
12
  HELLO_ACTUATOR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-actuate",
3
- "version": "0.3.0",
3
+ "version": "0.4.1",
4
4
  "description": "Scaffold an Actuate actuator: npm create actuate [dir] -- --template <name>",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",