dappbooster 3.3.0 → 3.3.2
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.
|
@@ -9,7 +9,7 @@ const SubgraphWarningMessage = () => (_jsxs(Box, { flexDirection: 'column', rowG
|
|
|
9
9
|
const EvmPostInstallMessage = ({ projectName }) => (_jsxs(Box, { flexDirection: 'column', rowGap: 1, paddingBottom: 2, children: [_jsx(Text, { color: 'whiteBright', children: "To start development on your project:" }), _jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: ["1- Move into the project's folder with ", _jsxs(Text, { color: 'gray', children: ["cd ", projectName] })] }), _jsxs(Text, { children: ["2- Start the development server with ", _jsx(Text, { color: 'gray', children: "pnpm dev" })] })] }), _jsx(Text, { color: 'whiteBright', children: "More info:" }), _jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: ["- Check out ", _jsx(Text, { color: 'gray', children: ".env.local" }), " for more configurations."] }), _jsxs(Text, { children: ["- Read ", _jsx(Link, { url: "https://docs.dappbooster.dev", children: "the docs" }), " to know more about", ' ', _jsx(Text, { color: 'gray', children: "dAppBooster" }), "!"] }), _jsxs(Text, { children: ["- Report issues with this installer", ' ', _jsx(Link, { url: "https://github.com/BootNodeDev/dAppBoosterInstallScript/issues", children: "here" })] })] })] }));
|
|
10
10
|
const CantonPostInstallMessage = ({ projectName, features }) => {
|
|
11
11
|
const carpinchoEnabled = isFeatureSelected('carpincho', features);
|
|
12
|
-
return (_jsxs(Box, { flexDirection: 'column', rowGap: 1, paddingBottom: 2, children: [_jsx(Text, { color: 'whiteBright', children: "To start the Canton stack:" }), _jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: ["1- Move into the project's folder with ", _jsxs(Text, { color: 'gray', children: ["cd ", projectName] })] }), _jsxs(Text, { children: ["2- Configure canton-barebones: ", _jsx(Text, { color: 'gray', children: "canton-barebones/.env" }), " was created from the example \u2014 review it."] }), _jsxs(Text, { children: ["3-
|
|
12
|
+
return (_jsxs(Box, { flexDirection: 'column', rowGap: 1, paddingBottom: 2, children: [_jsx(Text, { color: 'whiteBright', children: "To start the Canton stack:" }), _jsxs(Box, { flexDirection: 'column', children: [_jsxs(Text, { children: ["1- Move into the project's folder with ", _jsxs(Text, { color: 'gray', children: ["cd ", projectName] })] }), _jsxs(Text, { children: ["2- Configure canton-barebones: ", _jsx(Text, { color: 'gray', children: "canton-barebones/.env" }), " was created from the example \u2014 review it."] }), _jsxs(Text, { children: ["3- Bring up the whole local stack with one command:", ' ', _jsx(Text, { color: 'gray', children: "./scripts/dev-stack.sh up" }), " (Docker must be running). Run", ' ', _jsx(Text, { color: 'gray', children: "./scripts/dev-stack.sh" }), " with no arguments for an interactive menu."] })] }), carpinchoEnabled && (_jsx(Box, { alignItems: 'center', borderColor: 'yellow', borderStyle: 'bold', flexDirection: 'column', justifyContent: 'center', padding: 1, children: _jsxs(Text, { color: 'yellow', children: [figures.info, " ", _jsx(Text, { bold: true, children: "Carpincho Wallet" }), ":", ' ', _jsx(Text, { color: 'gray', children: "./scripts/dev-stack.sh up" }), " also builds the extension and copies it to ", _jsx(Text, { color: 'gray', children: "~/Desktop/dist-extension" }), " \u2014 load it via", ' ', _jsx(Text, { color: 'gray', children: "chrome://extensions" }), " (Developer mode, Load unpacked)", ' ', figures.info] }) })), _jsxs(Box, { flexDirection: 'column', children: [_jsx(Text, { color: 'whiteBright', children: "Prefer to run the pieces by hand?" }), _jsxs(Text, { children: ["- Start the Canton stack with ", _jsx(Text, { color: 'gray', children: "npm run canton:up" }), ", then run the dapp frontend with ", _jsx(Text, { color: 'gray', children: "npm run app:dev" }), "."] }), carpinchoEnabled && (_jsxs(Text, { children: ["- Build the Carpincho extension with", ' ', _jsx(Text, { color: 'gray', children: "npm run carpincho:build:extension" }), " and load", ' ', _jsx(Text, { color: 'gray', children: "carpincho-wallet/dist-extension" }), " as an unpacked browser extension."] }))] }), _jsx(Text, { children: "See the Canton stack README inside the project for full instructions." })] }));
|
|
13
13
|
};
|
|
14
14
|
const PostInstall = ({ stack, installationConfig, projectName }) => {
|
|
15
15
|
const { selectedFeatures, installationType } = installationConfig;
|
package/dist/constants/config.js
CHANGED
|
@@ -67,8 +67,8 @@ export const stackDefinitions = {
|
|
|
67
67
|
removeAfterClone: [],
|
|
68
68
|
postInstall: [
|
|
69
69
|
'Review canton-barebones/.env (created from the example)',
|
|
70
|
-
'Run
|
|
71
|
-
'
|
|
70
|
+
'Run ./scripts/dev-stack.sh up to bring up the whole local stack in one command — Docker must be running (run ./scripts/dev-stack.sh with no arguments for an interactive menu)',
|
|
71
|
+
'Fallback — start each piece manually: npm run canton:up for the Canton stack, then npm run app:dev for the dapp frontend',
|
|
72
72
|
],
|
|
73
73
|
envFiles: [
|
|
74
74
|
{ from: 'canton-barebones/.env.example', to: 'canton-barebones/.env' },
|
|
@@ -101,8 +101,8 @@ export const stackDefinitions = {
|
|
|
101
101
|
default: true,
|
|
102
102
|
paths: ['carpincho-wallet'],
|
|
103
103
|
postInstall: [
|
|
104
|
-
'
|
|
105
|
-
'
|
|
104
|
+
'./scripts/dev-stack.sh up also builds the Carpincho extension and copies it to ~/Desktop/dist-extension (load it via chrome://extensions, Developer mode -> Load unpacked)',
|
|
105
|
+
'Fallback — build it manually with npm run carpincho:build:extension, then load carpincho-wallet/dist-extension as an unpacked browser extension',
|
|
106
106
|
],
|
|
107
107
|
},
|
|
108
108
|
llm: {
|
|
@@ -114,6 +114,24 @@ function scriptTargetsRemovedDir(command, removedDirs) {
|
|
|
114
114
|
const tokens = command.split(/\s+/);
|
|
115
115
|
return removedDirs.some((dir) => tokens.some((token) => token === dir || token.startsWith(`${dir}/`)));
|
|
116
116
|
}
|
|
117
|
+
function workspaceEntryRemoved(entry, removedDirs) {
|
|
118
|
+
return removedDirs.some((dir) => entry === dir || entry.startsWith(`${dir}/`));
|
|
119
|
+
}
|
|
120
|
+
// Drop workspaces entries pointing at a removed dir. Handles both the string[] and { packages }
|
|
121
|
+
// forms (other object keys preserved); mutates in place.
|
|
122
|
+
function pruneRemovedWorkspaces(packageJson, removedDirs) {
|
|
123
|
+
if (removedDirs.length === 0) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const { workspaces } = packageJson;
|
|
127
|
+
const keep = (entry) => !workspaceEntryRemoved(entry, removedDirs);
|
|
128
|
+
if (Array.isArray(workspaces)) {
|
|
129
|
+
packageJson.workspaces = workspaces.filter(keep);
|
|
130
|
+
}
|
|
131
|
+
else if (workspaces && Array.isArray(workspaces.packages)) {
|
|
132
|
+
workspaces.packages = workspaces.packages.filter(keep);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
117
135
|
function patchPackageJsonCanton(projectFolder, removedDirs, precommitRemoved) {
|
|
118
136
|
const packageJsonPath = resolve(projectFolder, 'package.json');
|
|
119
137
|
const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf8'));
|
|
@@ -125,6 +143,8 @@ function patchPackageJsonCanton(projectFolder, removedDirs, precommitRemoved) {
|
|
|
125
143
|
}
|
|
126
144
|
}
|
|
127
145
|
}
|
|
146
|
+
// Removed dirs also drop out of the workspaces array, else the manifest lists a missing dir.
|
|
147
|
+
pruneRemovedWorkspaces(packageJson, removedDirs);
|
|
128
148
|
// The husky tooling (prepare/commitlint scripts + husky/lint-staged/commitlint deps) only leaves
|
|
129
149
|
// with the pre-commit feature.
|
|
130
150
|
if (precommitRemoved) {
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -7,7 +7,7 @@ agents.
|
|
|
7
7
|
|
|
8
8
|
- **EVM** — the original [dAppBooster](https://dappbooster.dev/) for Ethereum, Polygon, Base, and
|
|
9
9
|
other EVM chains.
|
|
10
|
-
- **Canton** — [dAppBooster for Canton](https://dappbooster
|
|
10
|
+
- **Canton** — [dAppBooster for Canton](https://www.dappbooster.cc/): Daml
|
|
11
11
|
ledger, Carpincho wallet, off-chain services.
|
|
12
12
|
|
|
13
13
|
## Choose your stack
|
|
@@ -150,10 +150,19 @@ the "Removing a feature" guide in the generated `dapp/frontend/README.md` — th
|
|
|
150
150
|
deletes demo source itself.
|
|
151
151
|
|
|
152
152
|
The Canton scaffold uses **npm** (a property of the generated project, not this installer). After
|
|
153
|
-
install
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
153
|
+
install, review `canton-barebones/.env`, then bring the whole local stack up with a single command:
|
|
154
|
+
`./scripts/dev-stack.sh up` (Docker must be running). It starts the Canton + Postgres +
|
|
155
|
+
wallet-service containers, runs the health checks, builds and deploys the quickstart-counter DAR,
|
|
156
|
+
launches the dapp frontend (`:3012`), and — when `carpincho` is included — builds the Carpincho
|
|
157
|
+
extension and copies it to `~/Desktop/dist-extension` (load it via `chrome://extensions`, Developer
|
|
158
|
+
mode → Load unpacked). Run `./scripts/dev-stack.sh` with no arguments for an interactive arrow-key
|
|
159
|
+
menu; `mock-up` brings up a Docker-free mocked wallet-service + Carpincho web app, and `down` tears
|
|
160
|
+
everything back down.
|
|
161
|
+
|
|
162
|
+
Prefer to run the pieces by hand? The underlying npm scripts still work: `npm run canton:up` to
|
|
163
|
+
start the local Canton stack and `npm run app:dev` for the dapp frontend, and when `carpincho` is
|
|
164
|
+
included build the extension with `npm run carpincho:build:extension` and load
|
|
165
|
+
`carpincho-wallet/dist-extension` as an unpacked browser extension.
|
|
157
166
|
|
|
158
167
|
**What gets stripped:**
|
|
159
168
|
|
|
@@ -176,10 +185,10 @@ browser extension.
|
|
|
176
185
|
"path": "/absolute/path/to/my_canton_dapp",
|
|
177
186
|
"postInstall": [
|
|
178
187
|
"Review canton-barebones/.env (created from the example)",
|
|
179
|
-
"Run
|
|
180
|
-
"
|
|
181
|
-
"
|
|
182
|
-
"
|
|
188
|
+
"Run ./scripts/dev-stack.sh up to bring up the whole local stack in one command — Docker must be running (run ./scripts/dev-stack.sh with no arguments for an interactive menu)",
|
|
189
|
+
"Fallback — start each piece manually: npm run canton:up for the Canton stack, then npm run app:dev for the dapp frontend",
|
|
190
|
+
"./scripts/dev-stack.sh up also builds the Carpincho extension and copies it to ~/Desktop/dist-extension (load it via chrome://extensions, Developer mode -> Load unpacked)",
|
|
191
|
+
"Fallback — build it manually with npm run carpincho:build:extension, then load carpincho-wallet/dist-extension as an unpacked browser extension"
|
|
183
192
|
]
|
|
184
193
|
}
|
|
185
194
|
```
|