@project-ajax/create 0.0.33 → 0.0.35
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/package.json +3 -2
- package/template/.gitignore +3 -0
- package/template/AGENTS.md +26 -0
- package/template/CLAUDE.md +26 -0
- package/template/README.md +18 -0
- package/template/package.json +1 -5
- package/template/src/index.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@project-ajax/create",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.35",
|
|
4
4
|
"description": "Initialize a new Notion Project Ajax extensions repo.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-ajax": "dist/index.js"
|
|
@@ -23,7 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"files": [
|
|
25
25
|
"dist/",
|
|
26
|
-
"template/"
|
|
26
|
+
"template/",
|
|
27
|
+
"template/.gitignore"
|
|
27
28
|
],
|
|
28
29
|
"dependencies": {
|
|
29
30
|
"@inquirer/prompts": "^8.0.1",
|
package/template/AGENTS.md
CHANGED
|
@@ -165,6 +165,32 @@ worker.sync("tasksSync", {
|
|
|
165
165
|
- `npx workers auth login [--env=dev]`: connect to a Notion workspace.
|
|
166
166
|
- `npx workers deploy`: build and publish capabilities.
|
|
167
167
|
- `npx workers exec <capability>`: run a sync or tool.
|
|
168
|
+
- `npx workers pack`: create a tarball; uses Git when available (respects `.gitignore`), always skips `node_modules`, `dist`, `workers.json`, `workers.*.json`, `.env`, and `.env.*`, and works in non-git repos.
|
|
169
|
+
|
|
170
|
+
## Debugging & Monitoring Runs
|
|
171
|
+
Use `npx workers runs` to inspect run history and logs.
|
|
172
|
+
|
|
173
|
+
**List recent runs:**
|
|
174
|
+
```shell
|
|
175
|
+
npx workers runs list
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Get logs for a specific run:**
|
|
179
|
+
```shell
|
|
180
|
+
npx workers runs logs <runId>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Get logs for the latest run (any capability):**
|
|
184
|
+
```shell
|
|
185
|
+
npx workers runs list --plain | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Get logs for the latest run of a specific capability:**
|
|
189
|
+
```shell
|
|
190
|
+
npx workers runs list --plain | grep tasksSync | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The `--plain` flag outputs tab-separated values without formatting, making it easy to pipe to other commands.
|
|
168
194
|
|
|
169
195
|
## Coding Style & Naming Conventions
|
|
170
196
|
- TypeScript with `strict` enabled; keep types explicit when shaping I/O.
|
package/template/CLAUDE.md
CHANGED
|
@@ -165,6 +165,32 @@ worker.sync("tasksSync", {
|
|
|
165
165
|
- `npx workers auth login [--env=dev]`: connect to a Notion workspace.
|
|
166
166
|
- `npx workers deploy`: build and publish capabilities.
|
|
167
167
|
- `npx workers exec <capability>`: run a sync or tool.
|
|
168
|
+
- `npx workers pack`: create a tarball; uses Git when available (respects `.gitignore`), always skips `node_modules`, `dist`, `workers.json`, `workers.*.json`, `.env`, and `.env.*`, and works in non-git repos.
|
|
169
|
+
|
|
170
|
+
## Debugging & Monitoring Runs
|
|
171
|
+
Use `npx workers runs` to inspect run history and logs.
|
|
172
|
+
|
|
173
|
+
**List recent runs:**
|
|
174
|
+
```shell
|
|
175
|
+
npx workers runs list
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
**Get logs for a specific run:**
|
|
179
|
+
```shell
|
|
180
|
+
npx workers runs logs <runId>
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Get logs for the latest run (any capability):**
|
|
184
|
+
```shell
|
|
185
|
+
npx workers runs list --plain | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Get logs for the latest run of a specific capability:**
|
|
189
|
+
```shell
|
|
190
|
+
npx workers runs list --plain | grep tasksSync | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
The `--plain` flag outputs tab-separated values without formatting, making it easy to pipe to other commands.
|
|
168
194
|
|
|
169
195
|
## Coding Style & Naming Conventions
|
|
170
196
|
- TypeScript with `strict` enabled; keep types explicit when shaping I/O.
|
package/template/README.md
CHANGED
|
@@ -340,6 +340,12 @@ List recent runs:
|
|
|
340
340
|
npx workers runs list
|
|
341
341
|
```
|
|
342
342
|
|
|
343
|
+
Use `--plain` for machine-readable tab-separated output:
|
|
344
|
+
|
|
345
|
+
```shell
|
|
346
|
+
npx workers runs list --plain
|
|
347
|
+
```
|
|
348
|
+
|
|
343
349
|
### `npx workers runs logs`
|
|
344
350
|
Fetch logs for a run:
|
|
345
351
|
|
|
@@ -347,6 +353,18 @@ Fetch logs for a run:
|
|
|
347
353
|
npx workers runs logs <runId>
|
|
348
354
|
```
|
|
349
355
|
|
|
356
|
+
Get logs for the latest run (any capability):
|
|
357
|
+
|
|
358
|
+
```shell
|
|
359
|
+
npx workers runs list --plain | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
Get logs for the latest run of a specific capability:
|
|
363
|
+
|
|
364
|
+
```shell
|
|
365
|
+
npx workers runs list --plain | grep tasksSync | head -n1 | cut -f1 | xargs npx workers runs logs
|
|
366
|
+
```
|
|
367
|
+
|
|
350
368
|
### `npx workers bundle download`
|
|
351
369
|
Download the deployed bundle:
|
|
352
370
|
|
package/template/package.json
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@project-ajax/template",
|
|
3
3
|
"version": "0.0.0",
|
|
4
|
-
"main": "dist/index.js",
|
|
5
4
|
"private": true,
|
|
6
5
|
"scripts": {
|
|
7
6
|
"build": "tsc",
|
|
8
|
-
"check": "tsc --noEmit"
|
|
9
|
-
"dev": "tsx --watch src/index.ts",
|
|
10
|
-
"start": "node dist/index.js",
|
|
11
|
-
"bump-sdk": "npm install @project-ajax/sdk@latest"
|
|
7
|
+
"check": "tsc --noEmit"
|
|
12
8
|
},
|
|
13
9
|
"engines": {
|
|
14
10
|
"node": ">=22.0.0",
|
package/template/src/index.ts
CHANGED
|
@@ -67,7 +67,7 @@ worker.sync("tasksSync", {
|
|
|
67
67
|
|
|
68
68
|
// Optional: How often the sync should run. Defaults to "continuous".
|
|
69
69
|
// Use intervals like "30m", "1h", "1d" (min: 1m, max: 7d)
|
|
70
|
-
schedule: "
|
|
70
|
+
schedule: "5m",
|
|
71
71
|
|
|
72
72
|
// Sync mode:
|
|
73
73
|
// - "replace": Each sync cycle returns the complete dataset. After hasMore:false,
|
|
@@ -89,7 +89,10 @@ worker.sync("tasksSync", {
|
|
|
89
89
|
{ name: "In Progress", color: "blue" },
|
|
90
90
|
{ name: "Todo", color: "default" },
|
|
91
91
|
]),
|
|
92
|
-
Project: Schema.relation("projectsSync"
|
|
92
|
+
Project: Schema.relation("projectsSync", {
|
|
93
|
+
twoWay: true,
|
|
94
|
+
relatedPropertyName: "Tasks",
|
|
95
|
+
}),
|
|
93
96
|
},
|
|
94
97
|
},
|
|
95
98
|
|