@pina-rs/codama-renderer-cli 0.0.0 → 0.16.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 CHANGED
@@ -1,3 +1,23 @@
1
1
  # @pina-rs/codama-renderer-cli
2
2
 
3
- This is a placeholder release published by monochange to bootstrap trusted publishing.
3
+ Codama visitors that render command-line applications from program IDLs.
4
+
5
+ ## TypeScript (commander)
6
+
7
+ `renderVisitor` consumes a normalized Codama root node and emits a complete Node CLI package: one commander subcommand per instruction with typed flags, automatic PDA derivation through the generated `@solana/kit` client, a `fetch` command per state account, and shared RPC / keypair / send / simulate plumbing with https-only endpoint enforcement.
8
+
9
+ ```ts
10
+ import { renderVisitor } from "@pina-rs/codama-renderer-cli";
11
+ import { createFromJson } from "codama";
12
+
13
+ const codama = createFromJson(readFileSync("counter_program.json", "utf8"));
14
+ await codama.accept(
15
+ renderVisitor("./generated/counter-cli", {
16
+ clientImportPath: "../client/src/generated/index",
17
+ }),
18
+ );
19
+ ```
20
+
21
+ Run the result with `npx tsx src/main.ts --help`.
22
+
23
+ Dart (`args`) support renders `args`-package CLIs; the Rust (clap) renderer lives in the `pina_cli_renderer` crate of the Pina workspace.
package/package.json CHANGED
@@ -1 +1,50 @@
1
- {"description":"Placeholder package for @pina-rs/codama-renderer-cli","name":"@pina-rs/codama-renderer-cli","repository":"https://github.com/pina-rs/pina","version":"0.0.0"}
1
+ {
2
+ "name": "@pina-rs/codama-renderer-cli",
3
+ "version": "0.16.0",
4
+ "description": "Codama visitor that renders commander-based TypeScript CLI applications from program IDLs",
5
+ "license": "Apache-2.0",
6
+ "homepage": "https://pina.rs",
7
+ "bugs": {
8
+ "url": "https://github.com/pina-rs/pina/issues"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "git+https://github.com/pina-rs/pina.git",
13
+ "directory": "packages/codama-renderer-cli"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/types/index.d.ts",
19
+ "exports": {
20
+ "types": "./dist/types/index.d.ts",
21
+ "import": "./dist/index.js"
22
+ },
23
+ "files": [
24
+ "./dist",
25
+ "./README.md"
26
+ ],
27
+ "publishConfig": {
28
+ "access": "public",
29
+ "provenance": true
30
+ },
31
+ "scripts": {
32
+ "build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
33
+ "test": "pnpm test:types && pnpm test:unit",
34
+ "test:types": "tsc --noEmit",
35
+ "test:unit": "vitest run"
36
+ },
37
+ "dependencies": {
38
+ "codama": "^1.10.2"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^26.4.0",
42
+ "rimraf": "^6.1.3",
43
+ "tsup": "^8.5.1",
44
+ "typescript": "^7.0.2",
45
+ "vitest": "^4.1.11"
46
+ },
47
+ "engines": {
48
+ "node": ">=18"
49
+ }
50
+ }
package/CHANGELOG.md DELETED
@@ -1,3 +0,0 @@
1
- ## 0.0.0
2
-
3
- - Placeholder release.
package/LICENSE DELETED
@@ -1 +0,0 @@
1
- Placeholder package published by monochange. See the source repository for license terms.