dappbooster 3.1.0 → 3.1.5
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 +25 -1
- package/readme.md +111 -2
- package/dist/components/steps/CloneRepo/Commands.d.ts +0 -12
- package/dist/components/steps/CloneRepo/Commands.js +0 -16
- package/dist/components/steps/Install/CustomInstallation.d.ts +0 -16
- package/dist/components/steps/Install/CustomInstallation.js +0 -26
- package/dist/components/steps/Install/FullInstallation.d.ts +0 -7
- package/dist/components/steps/Install/FullInstallation.js +0 -8
- package/dist/components/steps/Install/InstallAllPackages.d.ts +0 -7
- package/dist/components/steps/Install/InstallAllPackages.js +0 -7
package/package.json
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dappbooster",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.5",
|
|
4
|
+
"description": "Agent-friendly dAppBooster installer that scaffolds Web3 dApps via TUI or non-interactive CLI/CI.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dappbooster",
|
|
7
|
+
"dapp",
|
|
8
|
+
"web3",
|
|
9
|
+
"blockchain",
|
|
10
|
+
"ethereum",
|
|
11
|
+
"evm",
|
|
12
|
+
"scaffolding",
|
|
13
|
+
"starter",
|
|
14
|
+
"template",
|
|
15
|
+
"cli",
|
|
16
|
+
"installer",
|
|
17
|
+
"generator",
|
|
18
|
+
"tui",
|
|
19
|
+
"non-interactive",
|
|
20
|
+
"ci",
|
|
21
|
+
"agent",
|
|
22
|
+
"automation"
|
|
23
|
+
],
|
|
4
24
|
"license": "MIT",
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/BootNodeDev/dAppBoosterInstallScript"
|
|
28
|
+
},
|
|
5
29
|
"bin": "dist/cli.js",
|
|
6
30
|
"type": "module",
|
|
7
31
|
"engines": {
|
package/readme.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dAppBooster installer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Agent-friendly installer for [dAppBooster](https://dappbooster.dev/) that scaffolds Web3 dApps via TUI or non-interactive CLI/CI with JSON output.
|
|
4
4
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
@@ -17,6 +17,115 @@ pnpm dlx dappbooster
|
|
|
17
17
|
|
|
18
18
|
dAppBooster documentation: https://docs.dappbooster.dev/
|
|
19
19
|
|
|
20
|
+
## Agent / CI quickstart
|
|
21
|
+
|
|
22
|
+
Use `--info` to discover features, then run a non-interactive install that returns JSON.
|
|
23
|
+
|
|
24
|
+
```shell
|
|
25
|
+
pnpm dlx dappbooster --info
|
|
26
|
+
pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Agent / non-interactive / CI mode
|
|
30
|
+
|
|
31
|
+
The installer supports a non-interactive mode for CI pipelines and AI agents. It activates automatically when stdout is not a TTY, or explicitly with the `--ni` flag.
|
|
32
|
+
|
|
33
|
+
### Discover available features
|
|
34
|
+
|
|
35
|
+
```shell
|
|
36
|
+
pnpm dlx dappbooster --info
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"features": {
|
|
42
|
+
"demo": {
|
|
43
|
+
"description": "Component demos and example pages",
|
|
44
|
+
"default": true
|
|
45
|
+
},
|
|
46
|
+
"subgraph": {
|
|
47
|
+
"description": "TheGraph subgraph integration",
|
|
48
|
+
"default": true,
|
|
49
|
+
"postInstall": [
|
|
50
|
+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
|
|
51
|
+
"Run pnpm subgraph-codegen from the project folder"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"typedoc": {
|
|
55
|
+
"description": "TypeDoc API documentation generation",
|
|
56
|
+
"default": true
|
|
57
|
+
},
|
|
58
|
+
"vocs": {
|
|
59
|
+
"description": "Vocs documentation site",
|
|
60
|
+
"default": true
|
|
61
|
+
},
|
|
62
|
+
"husky": {
|
|
63
|
+
"description": "Git hooks with Husky, lint-staged, and commitlint",
|
|
64
|
+
"default": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"modes": {
|
|
68
|
+
"full": "Install all features",
|
|
69
|
+
"custom": "Choose features individually"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Full install
|
|
75
|
+
|
|
76
|
+
```shell
|
|
77
|
+
pnpm dlx dappbooster --ni --name my_dapp --mode full
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"success": true,
|
|
83
|
+
"projectName": "my_dapp",
|
|
84
|
+
"mode": "full",
|
|
85
|
+
"features": ["demo", "subgraph", "typedoc", "vocs", "husky"],
|
|
86
|
+
"path": "/absolute/path/to/my_dapp",
|
|
87
|
+
"postInstall": [
|
|
88
|
+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
|
|
89
|
+
"Run pnpm subgraph-codegen from the project folder"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Custom install with selected features
|
|
95
|
+
|
|
96
|
+
```shell
|
|
97
|
+
pnpm dlx dappbooster --ni --name my_dapp --mode custom --features demo,subgraph
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
```json
|
|
101
|
+
{
|
|
102
|
+
"success": true,
|
|
103
|
+
"projectName": "my_dapp",
|
|
104
|
+
"mode": "custom",
|
|
105
|
+
"features": ["demo", "subgraph"],
|
|
106
|
+
"path": "/absolute/path/to/my_dapp",
|
|
107
|
+
"postInstall": [
|
|
108
|
+
"Provide your own API key for PUBLIC_SUBGRAPHS_API_KEY in .env.local",
|
|
109
|
+
"Run pnpm subgraph-codegen from the project folder"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Error handling
|
|
115
|
+
|
|
116
|
+
Errors return structured JSON with a non-zero exit code:
|
|
117
|
+
|
|
118
|
+
```shell
|
|
119
|
+
pnpm dlx dappbooster --ni --mode full
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"success": false,
|
|
125
|
+
"error": "Missing required flag: --name"
|
|
126
|
+
}
|
|
127
|
+
```
|
|
128
|
+
|
|
20
129
|
## Development
|
|
21
130
|
|
|
22
131
|
Clone the repo
|
|
@@ -41,4 +150,4 @@ node cli.js
|
|
|
41
150
|
|
|
42
151
|
## Releasing new versions to NPM
|
|
43
152
|
|
|
44
|
-
New releases are automatically uploaded to NPM using GitHub actions.
|
|
153
|
+
New releases are automatically uploaded to NPM using GitHub actions.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
interface Props {
|
|
3
|
-
projectName: string;
|
|
4
|
-
onCompletion: () => void;
|
|
5
|
-
}
|
|
6
|
-
/**
|
|
7
|
-
* Executes all the commands to clone the dAppBooster repository.
|
|
8
|
-
* @param projectName
|
|
9
|
-
* @param onCompletion
|
|
10
|
-
*/
|
|
11
|
-
declare const Commands: FC<Props>;
|
|
12
|
-
export default Commands;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import * as process from 'node:process';
|
|
4
|
-
import { Box, Text } from 'ink';
|
|
5
|
-
import { Script, Spawn } from 'ink-spawn';
|
|
6
|
-
import { repoUrl } from '../../../constants/config.js';
|
|
7
|
-
/**
|
|
8
|
-
* Executes all the commands to clone the dAppBooster repository.
|
|
9
|
-
* @param projectName
|
|
10
|
-
* @param onCompletion
|
|
11
|
-
*/
|
|
12
|
-
const Commands = ({ projectName, onCompletion }) => {
|
|
13
|
-
const projectFolder = join(process.cwd(), projectName);
|
|
14
|
-
return (_jsx(Box, { flexDirection: 'column', gap: 0, children: _jsxs(Script, { children: [_jsxs(Box, { columnGap: 1, children: [_jsx(Text, { color: 'whiteBright', children: "Cloning dAppBooster in" }), _jsx(Text, { italic: true, children: projectName })] }), _jsx(Spawn, { shell: true, silent: true, successText: 'Done!', failureText: `Failed to clone the project, check if a folder called "${projectName}" already exists and your read/write permissions...`, runningText: 'Working...', command: "git", args: ['clone', '--depth', '1', '--no-checkout', repoUrl, projectName] }), _jsx(Text, { color: 'whiteBright', children: "Fetching tags" }), _jsx(Spawn, { shell: true, cwd: projectFolder, silent: true, command: 'git', args: ['fetch', '--tags'], runningText: 'Working...', successText: 'Done!', failureText: 'Error...' }), _jsx(Text, { color: 'whiteBright', children: "Checking out latest tag" }), _jsx(Spawn, { shell: true, cwd: projectFolder, command: "git", args: ['checkout $(git describe --tags `git rev-list --tags --max-count=1`)'], successText: "Done!", failureText: 'Error...' }), _jsx(Text, { color: 'whiteBright', children: "Removing .git folder" }), _jsx(Spawn, { shell: true, cwd: projectFolder, command: "rm", args: ['-rf', '.git'], successText: "Done!", failureText: 'Error...' }), _jsx(Text, { color: 'whiteBright', children: "Initializing Git repository" }), _jsx(Spawn, { shell: true, cwd: projectFolder, command: "git", args: ['init'], successText: "Done!", failureText: 'Error...', onCompletion: onCompletion })] }) }));
|
|
15
|
-
};
|
|
16
|
-
export default Commands;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { FC } from 'react';
|
|
2
|
-
import type { MultiSelectItem } from '../../../types/types.js';
|
|
3
|
-
interface Props {
|
|
4
|
-
onCompletion: () => void;
|
|
5
|
-
projectFolder: string;
|
|
6
|
-
selectedFeatures?: Array<MultiSelectItem>;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Performs a custom installation based on the selected features: basically we tell `pnpm` what
|
|
10
|
-
* features to remove (everything's included in package.json by default to simplify things)
|
|
11
|
-
* @param onCompletion
|
|
12
|
-
* @param selectedFeatures
|
|
13
|
-
* @param projectFolder
|
|
14
|
-
*/
|
|
15
|
-
declare const CustomInstallation: FC<Props>;
|
|
16
|
-
export default CustomInstallation;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Box, Text } from 'ink';
|
|
3
|
-
import { Script, Spawn } from 'ink-spawn';
|
|
4
|
-
import { getPackages } from '../../../utils/utils.js';
|
|
5
|
-
import InstallAllPackages from './InstallAllPackages.js';
|
|
6
|
-
/**
|
|
7
|
-
* Performs a custom installation based on the selected features: basically we tell `pnpm` what
|
|
8
|
-
* features to remove (everything's included in package.json by default to simplify things)
|
|
9
|
-
* @param onCompletion
|
|
10
|
-
* @param selectedFeatures
|
|
11
|
-
* @param projectFolder
|
|
12
|
-
*/
|
|
13
|
-
const CustomInstallation = ({ onCompletion, selectedFeatures, projectFolder }) => {
|
|
14
|
-
// Collects the packages to remove based on the selected features and makes
|
|
15
|
-
// a string out of them so that we can pass it to `pnpm remove` command.
|
|
16
|
-
const packagesToRemove = [
|
|
17
|
-
...getPackages('subgraph', selectedFeatures),
|
|
18
|
-
...getPackages('typedoc', selectedFeatures),
|
|
19
|
-
...getPackages('vocs', selectedFeatures),
|
|
20
|
-
...getPackages('husky', selectedFeatures),
|
|
21
|
-
]
|
|
22
|
-
.join(' ')
|
|
23
|
-
.trim();
|
|
24
|
-
return (_jsx(Box, { flexDirection: 'column', gap: 0, children: !packagesToRemove ? (_jsx(Script, { children: _jsx(InstallAllPackages, { projectFolder: projectFolder, onCompletion: onCompletion }) })) : (_jsxs(Script, { children: [_jsx(Text, { color: 'whiteBright', children: "Installing packages" }), _jsx(Spawn, { shell: true, cwd: projectFolder, silent: true, command: 'pnpm', args: ['remove', packagesToRemove], runningText: 'Working...', successText: 'Done!', failureText: 'Error...' }), _jsx(Text, { color: 'whiteBright', children: "Executing post-install scripts" }), _jsx(Spawn, { shell: true, cwd: projectFolder, silent: true, command: 'pnpm', args: ['run', 'postinstall'], runningText: 'Working...', successText: 'Done!', failureText: 'Error...', onCompletion: onCompletion })] })) }));
|
|
25
|
-
};
|
|
26
|
-
export default CustomInstallation;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Box } from 'ink';
|
|
3
|
-
import { Script } from 'ink-spawn';
|
|
4
|
-
import InstallAllPackages from './InstallAllPackages.js';
|
|
5
|
-
const FullInstallation = ({ onCompletion, projectFolder }) => {
|
|
6
|
-
return (_jsx(Box, { flexDirection: 'column', gap: 0, children: _jsx(Script, { children: _jsx(InstallAllPackages, { projectFolder: projectFolder, onCompletion: onCompletion }) }) }));
|
|
7
|
-
};
|
|
8
|
-
export default FullInstallation;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Text } from 'ink';
|
|
3
|
-
import { Spawn } from 'ink-spawn';
|
|
4
|
-
const InstallAllPackages = ({ projectFolder, onCompletion }) => {
|
|
5
|
-
return (_jsxs(_Fragment, { children: [_jsx(Text, { color: 'whiteBright', children: "Installing packages" }), _jsx(Spawn, { shell: true, cwd: projectFolder, silent: true, command: 'pnpm', args: ['i'], runningText: 'Working...', successText: 'Done!', failureText: 'Error...', onCompletion: onCompletion })] }));
|
|
6
|
-
};
|
|
7
|
-
export default InstallAllPackages;
|