@ic-reactor/cli 0.0.0-dev
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 +267 -0
- package/dist/index.js +1709 -0
- package/package.json +56 -0
- package/schema.json +56 -0
package/package.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ic-reactor/cli",
|
|
3
|
+
"version": "0.0.0-dev",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "CLI tool to generate shadcn-style React hooks for ICP canisters",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"ic-reactor": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsup src/index.ts --format esm --clean --no-splitting",
|
|
13
|
+
"dev": "tsup src/index.ts --format esm --watch --no-splitting",
|
|
14
|
+
"typecheck": "tsc --noEmit"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"internet-computer",
|
|
18
|
+
"icp",
|
|
19
|
+
"dfinity",
|
|
20
|
+
"react",
|
|
21
|
+
"cli",
|
|
22
|
+
"codegen"
|
|
23
|
+
],
|
|
24
|
+
"author": "Behrad Deylami",
|
|
25
|
+
"license": "MIT",
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "git+https://github.com/B3Pay/ic-reactor.git",
|
|
29
|
+
"directory": "packages/cli"
|
|
30
|
+
},
|
|
31
|
+
"bugs": {
|
|
32
|
+
"url": "https://github.com/B3Pay/ic-reactor/issues"
|
|
33
|
+
},
|
|
34
|
+
"homepage": "https://github.com/B3Pay/ic-reactor#readme",
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@clack/prompts": "^0.9.1",
|
|
37
|
+
"@icp-sdk/core": "^5.0.0",
|
|
38
|
+
"commander": "^13.1.0",
|
|
39
|
+
"picocolors": "^1.1.1"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node": "^22.10.5",
|
|
43
|
+
"tsup": "^8.3.5",
|
|
44
|
+
"typescript": "~5.6.3"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=18"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"schema.json"
|
|
52
|
+
],
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/schema.json
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"title": "IC Reactor CLI Configuration",
|
|
4
|
+
"description": "Configuration file for @ic-reactor/cli",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "JSON Schema reference"
|
|
10
|
+
},
|
|
11
|
+
"outDir": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "Output directory for generated hooks (relative to project root)",
|
|
14
|
+
"default": "src/canisters"
|
|
15
|
+
},
|
|
16
|
+
"canisters": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"description": "Canister configurations",
|
|
19
|
+
"additionalProperties": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"properties": {
|
|
22
|
+
"didFile": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Path to the .did file (relative to project root)"
|
|
25
|
+
},
|
|
26
|
+
"clientManagerPath": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Import path to the client manager (relative from generated hooks)",
|
|
29
|
+
"default": "../../lib/client"
|
|
30
|
+
},
|
|
31
|
+
"useDisplayReactor": {
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "Use DisplayReactor for automatic type transformations (bigint → string, etc.)",
|
|
34
|
+
"default": true
|
|
35
|
+
},
|
|
36
|
+
"canisterId": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "Optional fixed canister ID (defaults to environment-based resolution)"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"required": ["didFile"]
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"generatedHooks": {
|
|
45
|
+
"type": "object",
|
|
46
|
+
"description": "Tracks which methods have generated hooks (managed by CLI)",
|
|
47
|
+
"additionalProperties": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"required": ["outDir", "canisters"]
|
|
56
|
+
}
|