@secondlayer/cli 14.3.0 → 15.0.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/README.md +9 -17
- package/dist/cli.js +1532 -4012
- package/dist/cli.js.map +18 -30
- package/dist/index.d.ts +26 -237
- package/dist/index.js +127 -335
- package/dist/index.js.map +7 -8
- package/package.json +9 -14
- package/dist/core/plugin-manager.d.ts +0 -268
- package/dist/core/plugin-manager.js +0 -396
- package/dist/core/plugin-manager.js.map +0 -13
- package/dist/plugins/index.d.ts +0 -338
- package/dist/plugins/index.js +0 -1755
- package/dist/plugins/index.js.map +0 -26
package/README.md
CHANGED
|
@@ -214,8 +214,8 @@ secondlayer codegen contracts --watch # regenerate on .clar / config / Clarine
|
|
|
214
214
|
Where the types come from matters. A bare `.clar` path is read as source, and
|
|
215
215
|
source only declares argument, map, and data-var types — a function's return
|
|
216
216
|
type comes out of Clarity's type checker, so it generates as `any`. A deployed
|
|
217
|
-
contract id or
|
|
218
|
-
|
|
217
|
+
contract id or `clarinet: true` (below) carries a real ABI, so returns are
|
|
218
|
+
exact too. Prefer those where you can.
|
|
219
219
|
|
|
220
220
|
Config-driven:
|
|
221
221
|
|
|
@@ -227,18 +227,16 @@ secondlayer codegen contracts # regenerates from the config
|
|
|
227
227
|
```typescript
|
|
228
228
|
// secondlayer.config.ts
|
|
229
229
|
import { defineConfig } from "@secondlayer/cli"
|
|
230
|
-
import { clarinet, react } from "@secondlayer/cli/plugins"
|
|
231
230
|
|
|
232
231
|
export default defineConfig({
|
|
233
232
|
out: "src/generated.ts",
|
|
234
|
-
|
|
233
|
+
clarinet: true, // or { path, include, exclude, includeRequirements }
|
|
235
234
|
})
|
|
236
235
|
```
|
|
237
236
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
| `react()` | Typed React Query hooks |
|
|
237
|
+
`clarinet: true` loads ABIs from your Clarinet project via simnet, including
|
|
238
|
+
`[project.requirements]` dependency contracts (`includeRequirements: false`
|
|
239
|
+
to opt out). Skips silently when `Clarinet.toml` is missing.
|
|
242
240
|
|
|
243
241
|
Clarinet tests: `getContract` with `@secondlayer/stacks/simnet`.
|
|
244
242
|
|
|
@@ -261,16 +259,10 @@ await makeContractCall({
|
|
|
261
259
|
const supply = await token.vars.totalSupply.get()
|
|
262
260
|
```
|
|
263
261
|
|
|
264
|
-
##
|
|
265
|
-
|
|
266
|
-
Local-dev periphery: still functional, hidden from `secondlayer --help`, no further
|
|
267
|
-
investment — may be removed in a future major. `secondlayer subgraphs
|
|
268
|
-
create/deploy` against your own instance is the supported path.
|
|
262
|
+
## Local development
|
|
269
263
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
- `secondlayer local db ...` — local source DB inspection
|
|
273
|
-
- `secondlayer devnet connect/down/status/logs` — Clarinet devnet integration
|
|
264
|
+
`secondlayer setup` brings up a self-hosted stack. For Clarinet, use
|
|
265
|
+
`secondlayer devnet connect` / `status` / `logs` / `down` (and `devnet faucet`).
|
|
274
266
|
|
|
275
267
|
## Docs
|
|
276
268
|
|