@project-ajax/create 0.0.21 → 0.0.23

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
@@ -22,3 +22,9 @@ npm init @project-ajax -- --directory my-worker --project my-worker
22
22
 
23
23
  - `--directory`, `-d` - Path to the new worker project (default: `.`)
24
24
  - `--project`, `-p` - Project name (default: `my-worker`)
25
+
26
+ ### Scheduling
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@project-ajax/create",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Initialize a new Notion Project Ajax extensions repo.",
5
5
  "bin": {
6
6
  "create-ajax": "dist/index.js"
@@ -28,6 +28,10 @@ const sampleTasks = [
28
28
  export const tasksSync = sync({
29
29
  primaryKeyProperty: "Task ID",
30
30
 
31
+ // Optional: How often the sync should run. Defaults to "continuous".
32
+ // Use intervals like "30m", "1h", "1d" (min: 1m, max: 7d)
33
+ schedule: "continuous",
34
+
31
35
  // Optional: Set to true to delete pages that are not returned from sync executions.
32
36
  // By default (false), sync only creates and updates pages, never deletes them.
33
37
  // deleteUnreturnedPages: true,