@secondlayer/cli 3.3.2 → 3.5.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.2",
3
+ "version": "3.5.0",
4
4
  "description": "CLI for subgraphs and blockchain indexing on Stacks",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,11 +42,11 @@
42
42
  "license": "MIT",
43
43
  "dependencies": {
44
44
  "@inquirer/prompts": "^8.2.0",
45
- "@secondlayer/bundler": "^0.3.1",
46
- "@secondlayer/sdk": "^3.1.0",
47
- "@secondlayer/shared": "^4.1.1",
45
+ "@secondlayer/bundler": "^0.3.2",
46
+ "@secondlayer/sdk": "^3.2.0",
47
+ "@secondlayer/shared": "^4.2.0",
48
48
  "@secondlayer/stacks": "^2.0.0",
49
- "@secondlayer/subgraphs": "^1.2.0",
49
+ "@secondlayer/subgraphs": "^1.2.1",
50
50
  "@biomejs/js-api": "^0.7.0",
51
51
  "@biomejs/wasm-nodejs": "^1.9.0",
52
52
  "esbuild": "^0.19.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
- npx wrangler login
13
- npx wrangler dev
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
- With `auth_config`:
23
+ Provision the subscription with bearer auth:
24
24
 
25
- ```json
26
- { "authType": "bearer", "token": "<CF_API_TOKEN>" }
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
- npx wrangler deploy
43
+ bunx wrangler deploy
41
44
  ```
@@ -8,7 +8,7 @@
8
8
  "start": "bun src/index.ts"
9
9
  },
10
10
  "dependencies": {
11
- "@secondlayer/shared": "^3.0.0-beta.0",
11
+ "@secondlayer/shared": "^4.2.0",
12
12
  "hono": "^4.6.0"
13
13
  },
14
14
  "devDependencies": {
@@ -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
- npx trigger.dev@latest init # follow prompts
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
- Set the `TRIGGER_SECRET_KEY` on the subscription via `auth_config`:
21
+ Provision the subscription with bearer auth:
22
22
 
23
- ```json
24
- { "authType": "bearer", "token": "tr_secret_abc..." }
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 `npx trigger.dev deploy` to push to Trigger Cloud.
38
+ Run `bunx trigger.dev@latest deploy` to push to Trigger Cloud.