@project-ajax/create 0.0.31 → 0.0.33
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 +1 -3
- package/package.json +1 -1
- package/template/AGENTS.md +1 -1
- package/template/CLAUDE.md +1 -1
- package/template/README.md +8 -2
package/README.md
CHANGED
|
@@ -25,6 +25,4 @@ npm init @project-ajax -- --directory my-worker --project my-worker
|
|
|
25
25
|
|
|
26
26
|
### Scheduling
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
This can be useful for minding rate limits.
|
|
28
|
+
Sync workers default to running every 30 minutes. To change the cadence, set `schedule` in `src/index.ts` to an interval like `15m`, `1h`, or `1d` (min `1m`, max `7d`), or `continuous` to run as fast as possible.
|
package/package.json
CHANGED
package/template/AGENTS.md
CHANGED
|
@@ -49,7 +49,7 @@ worker.oauth("googleAuth", { name: "my-google-auth", provider: "google" });
|
|
|
49
49
|
### Sync
|
|
50
50
|
#### Strategy and Pagination
|
|
51
51
|
|
|
52
|
-
Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts at a scheduled trigger and ends when an execution returns `hasMore: false`.
|
|
52
|
+
Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts at a scheduled trigger and ends when an execution returns `hasMore: false`. By default, syncs run every 30 minutes. Set `schedule` to an interval like `"15m"`, `"1h"`, `"1d"` (min `"1m"`, max `"7d"`), or `"continuous"` to run as fast as possible.
|
|
53
53
|
|
|
54
54
|
- Always use pagination, when available. Returning too many changes in one execution will fail. Start with batch sizes of ~100 changes.
|
|
55
55
|
- `mode=replace` is simpler, and fine for smaller syncs (<10k)
|
package/template/CLAUDE.md
CHANGED
|
@@ -49,7 +49,7 @@ worker.oauth("googleAuth", { name: "my-google-auth", provider: "google" });
|
|
|
49
49
|
### Sync
|
|
50
50
|
#### Strategy and Pagination
|
|
51
51
|
|
|
52
|
-
Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts at a scheduled trigger and ends when an execution returns `hasMore: false`.
|
|
52
|
+
Syncs run in a "sync cycle": a back-to-back chain of `execute` calls that starts at a scheduled trigger and ends when an execution returns `hasMore: false`. By default, syncs run every 30 minutes. Set `schedule` to an interval like `"15m"`, `"1h"`, `"1d"` (min `"1m"`, max `"7d"`), or `"continuous"` to run as fast as possible.
|
|
53
53
|
|
|
54
54
|
- Always use pagination, when available. Returning too many changes in one execution will fail. Start with batch sizes of ~100 changes.
|
|
55
55
|
- `mode=replace` is simpler, and fine for smaller syncs (<10k)
|
package/template/README.md
CHANGED
|
@@ -13,7 +13,7 @@ single `Worker` instance.
|
|
|
13
13
|
## Quickstart
|
|
14
14
|
|
|
15
15
|
```shell
|
|
16
|
-
npm init @project-ajax
|
|
16
|
+
npm init @project-ajax@latest
|
|
17
17
|
# choose a folder, then:
|
|
18
18
|
cd my-worker
|
|
19
19
|
npm install
|
|
@@ -37,7 +37,7 @@ npx workers exec tasksSync
|
|
|
37
37
|
|
|
38
38
|
- Worker: The Node/TypeScript program you deploy, defined in `src/index.ts`.
|
|
39
39
|
- Capability: A named sync, tool, automation, or OAuth definition registered on a worker.
|
|
40
|
-
- Secret: A key/value stored with `npx workers secrets`, exposed as environment variables (for example, `process.env.SECRET_NAME`).
|
|
40
|
+
- Secret: A key/value stored with `npx workers secrets`, exposed as environment variables (for example, `process.env.SECRET_NAME`). Use `KEY=VALUE` pairs when setting secrets.
|
|
41
41
|
|
|
42
42
|
## Build a Worker
|
|
43
43
|
|
|
@@ -299,6 +299,12 @@ Store secrets for runtime access:
|
|
|
299
299
|
npx workers secrets set API_KEY=my-secret
|
|
300
300
|
```
|
|
301
301
|
|
|
302
|
+
You can pass multiple secrets and quote values that contain spaces or `=`:
|
|
303
|
+
|
|
304
|
+
```shell
|
|
305
|
+
npx workers secrets set FOO=bar BAZ="qux" ASDF="x=y" GREETING="hello world"
|
|
306
|
+
```
|
|
307
|
+
|
|
302
308
|
### `npx workers secrets list`
|
|
303
309
|
List secret keys:
|
|
304
310
|
|