create-three-blocks-starter 0.0.3 → 0.0.4

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.
Files changed (2) hide show
  1. package/bin/index.js +18 -0
  2. package/package.json +1 -1
package/bin/index.js CHANGED
@@ -204,6 +204,24 @@ async function main() {
204
204
  },
205
205
  });
206
206
 
207
+ {
208
+ const coreSpec = `@three-blocks/core@${channel === 'stable' ? 'latest' : channel}`;
209
+ console.log(`> Installing ${coreSpec} ...`);
210
+ const addArgs = hasPnpm ? ['add', '--save-exact', coreSpec] : ['install', '--save-exact', coreSpec];
211
+ const r = spawnSync(hasPnpm ? 'pnpm' : 'npm', addArgs, {
212
+ stdio: 'inherit',
213
+ cwd: targetDir,
214
+ env: {
215
+ ...process.env,
216
+ THREE_BLOCKS_SECRET_KEY: license,
217
+ THREE_BLOCKS_CHANNEL: channel,
218
+ },
219
+ });
220
+ if (r.status !== 0) {
221
+ console.log(`${yellow('⚠')} Warning: could not install @three-blocks/core (exit ${r.status}).`);
222
+ }
223
+ }
224
+
207
225
  // 6) Cleanup temp dir
208
226
  try { fs.rmSync(tmp, { recursive: true, force: true }); } catch {}
209
227
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-three-blocks-starter",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Create a new Three Blocks starter app",