@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 CHANGED
@@ -25,6 +25,4 @@ npm init @project-ajax -- --directory my-worker --project my-worker
25
25
 
26
26
  ### Scheduling
27
27
 
28
- Generated sync workers default to `continuous`, meaning the sync runs continuously/as fast as possible. To slow cadence, set `schedule` in `src/index.ts` to an interval like `30m`, `1h`, or `1d` (min `1m`, max `7d`), which runs the sync once per interval.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@project-ajax/create",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "description": "Initialize a new Notion Project Ajax extensions repo.",
5
5
  "bin": {
6
6
  "create-ajax": "dist/index.js"
@@ -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)
@@ -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)
@@ -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