@secondlayer/cli 3.3.2 → 3.4.0
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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@secondlayer/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "CLI for subgraphs and blockchain indexing on Stacks",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@inquirer/prompts": "^8.2.0",
|
|
45
45
|
"@secondlayer/bundler": "^0.3.1",
|
|
46
|
-
"@secondlayer/sdk": "^3.
|
|
47
|
-
"@secondlayer/shared": "^4.
|
|
46
|
+
"@secondlayer/sdk": "^3.2.0",
|
|
47
|
+
"@secondlayer/shared": "^4.2.0",
|
|
48
48
|
"@secondlayer/stacks": "^2.0.0",
|
|
49
49
|
"@secondlayer/subgraphs": "^1.2.0",
|
|
50
50
|
"@biomejs/js-api": "^0.7.0",
|
|
@@ -9,8 +9,8 @@ durable-execution product; it's separate from anything Secondlayer runs.
|
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
bun install
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
bunx wrangler login
|
|
13
|
+
bunx wrangler dev
|
|
14
14
|
```
|
|
15
15
|
|
|
16
16
|
`wrangler dev` spins up a local runtime. Your subscription URL should
|
|
@@ -20,12 +20,15 @@ point at Cloudflare's API:
|
|
|
20
20
|
https://api.cloudflare.com/client/v4/accounts/{ACCOUNT_ID}/workflows/{{NAME}}/instances
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
Provision the subscription with bearer auth:
|
|
24
24
|
|
|
25
|
-
```
|
|
26
|
-
{
|
|
25
|
+
```bash
|
|
26
|
+
sl create subscription {{NAME}} --runtime cloudflare --auth-token <CF_API_TOKEN>
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
+
You can also patch an existing subscription with
|
|
30
|
+
`sl subscriptions update {{NAME}} --auth-token <CF_API_TOKEN>`.
|
|
31
|
+
|
|
29
32
|
The token must have `Workflows: Edit` scope.
|
|
30
33
|
|
|
31
34
|
## Signature verification
|
|
@@ -37,5 +40,5 @@ key if you want idempotent replay handling.
|
|
|
37
40
|
## Deploy
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
|
-
|
|
43
|
+
bunx wrangler deploy
|
|
41
44
|
```
|
|
@@ -7,7 +7,7 @@ A Trigger.dev v3 task that receives subgraph events via the
|
|
|
7
7
|
|
|
8
8
|
```bash
|
|
9
9
|
bun install
|
|
10
|
-
|
|
10
|
+
bunx trigger.dev@latest init # follow prompts
|
|
11
11
|
bun run dev
|
|
12
12
|
```
|
|
13
13
|
|
|
@@ -18,12 +18,15 @@ Secondlayer subscription URL should point at:
|
|
|
18
18
|
https://api.trigger.dev/api/v1/tasks/{{TASK_ID}}/trigger
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
Provision the subscription with bearer auth:
|
|
22
22
|
|
|
23
|
-
```
|
|
24
|
-
{
|
|
23
|
+
```bash
|
|
24
|
+
sl create subscription {{NAME}} --runtime trigger --auth-token tr_secret_abc...
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
You can also patch an existing subscription with
|
|
28
|
+
`sl subscriptions update {{NAME}} --auth-token tr_secret_abc...`.
|
|
29
|
+
|
|
27
30
|
## Signature verification
|
|
28
31
|
|
|
29
32
|
Trigger authenticates requests with the bearer token — there's no separate
|
|
@@ -32,4 +35,4 @@ needed.
|
|
|
32
35
|
|
|
33
36
|
## Deploy
|
|
34
37
|
|
|
35
|
-
Run `
|
|
38
|
+
Run `bunx trigger.dev@latest deploy` to push to Trigger Cloud.
|