create-blocklet 0.9.28 → 0.9.29

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/index.js CHANGED
@@ -9,7 +9,7 @@ import ora from 'ora';
9
9
  import prompts from 'prompts';
10
10
  import { fileURLToPath } from 'url';
11
11
  import { argv, cd, chalk, fs, path, YAML } from 'zx';
12
- import { echoBrand, echoDocument } from './lib/arcblock.js';
12
+ import { echoBrand, printResourceMessage } from './lib/arcblock.js';
13
13
  import { getBlockletDidList } from './lib/did.js';
14
14
  import { initGitRepo } from './lib/git.js';
15
15
  import { getUser } from './lib/index.js';
@@ -270,97 +270,126 @@ async function init() {
270
270
  const transferName = defaultProjectName.replace('.', '-');
271
271
 
272
272
  try {
273
- result = await prompts(
274
- [
275
- {
276
- type: isValidName(defaultProjectName) && targetDir && !['.', './'].includes(targetDir) ? null : 'text',
277
- name: 'projectName',
278
- message: 'Project name:',
279
- initial: transferName,
280
- onState: (state) => {
281
- projectName = state.value.trim() || transferName;
273
+ const enableE2E = argv.e2e;
274
+ if (enableE2E) {
275
+ result = {
276
+ enableE2E: argv.e2e,
277
+ mainBlocklet: argv.mainBlocklet || null,
278
+ templateNames: argv.template.split(','),
279
+ overwrite: argv.overwrite || false,
280
+ packageName: argv.packageName,
281
+ authorName: argv.authorName,
282
+ authorEmail: argv.authorEmail,
283
+ packageManager: argv.packageManager,
284
+ };
285
+ } else {
286
+ result = await prompts(
287
+ [
288
+ {
289
+ type: isValidName(defaultProjectName) && targetDir && !['.', './'].includes(targetDir) ? null : 'text',
290
+ name: 'projectName',
291
+ message: 'Project name:',
292
+ initial: transferName,
293
+ onState: (state) => {
294
+ projectName = state.value.trim() || transferName;
295
+ },
282
296
  },
283
- },
284
- {
285
- type: () => (!fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'confirm'),
286
- name: 'overwrite',
287
- message: () =>
288
- `${
289
- ['.', './'].includes(targetDir) ? 'Current directory' : `Target directory "${targetDir}"`
290
- } is not empty. Remove existing files and continue?`,
291
- },
292
- {
293
- type: (_, { overwrite } = {}) => {
294
- if (overwrite === false) {
295
- throw new Error(`${red('✖')} Operation cancelled`);
296
- }
297
- return null;
297
+ {
298
+ type: () => (!fs.existsSync(targetDir) || isEmpty(targetDir) ? null : 'confirm'),
299
+ name: 'overwrite',
300
+ message: () =>
301
+ `${
302
+ ['.', './'].includes(targetDir) ? 'Current directory' : `Target directory "${targetDir}"`
303
+ } is not empty. Remove existing files and continue?`,
298
304
  },
299
- name: 'overwriteChecker',
300
- },
301
- {
302
- type: () => (isValidPackageName(projectName) ? null : 'text'),
303
- name: 'packageName',
304
- message: 'Package name:',
305
- initial: () => toValidPackageName(projectName) || defaultProjectName,
306
- validate: (dir) => isValidPackageName(dir) || 'Invalid package.json name',
307
- },
308
- ...(inputTemplateName
309
- ? []
310
- : [
311
- {
312
- type: 'autocompleteMultiselect',
313
- name: 'templateNames',
314
- message: 'Choose one or more blocklet templates:',
315
- choices: templates.map((template) => {
316
- const templateColor = template.color;
317
- return {
318
- title: templateColor(template.display),
319
- value: template.name,
320
- };
321
- }),
322
- min: 1,
323
- suggest: (input, choices) => Promise.resolve(choices.filter((i) => i.title.includes(input))),
324
- },
325
- {
326
- type: (templateNames = []) => {
327
- return templateNames.length > 1 ? 'select' : null;
328
- },
329
- name: 'mainBlocklet',
330
- message: 'Please choose the main blocklet',
331
- //
332
- choices: (templateNames = []) =>
333
- templateNames.map((templateName) => {
334
- const template = templates.find((x) => x.name === templateName);
305
+ {
306
+ type: (_, { overwrite } = {}) => {
307
+ if (overwrite === false) {
308
+ throw new Error(`${red('✖')} Operation cancelled`);
309
+ }
310
+ return null;
311
+ },
312
+ name: 'overwriteChecker',
313
+ },
314
+ {
315
+ type: () => (isValidPackageName(projectName) ? null : 'text'),
316
+ name: 'packageName',
317
+ message: 'Package name:',
318
+ initial: () => toValidPackageName(projectName) || defaultProjectName,
319
+ validate: (dir) => isValidPackageName(dir) || 'Invalid package.json name',
320
+ },
321
+ ...(inputTemplateName
322
+ ? []
323
+ : [
324
+ {
325
+ type: 'autocompleteMultiselect',
326
+ name: 'templateNames',
327
+ message: 'Choose templates:',
328
+ choices: templates.map((template) => {
329
+ const templateColor = template.color;
335
330
  return {
336
- title: template.display,
331
+ title: templateColor(template.display),
337
332
  value: template.name,
338
333
  };
339
334
  }),
340
- initial: 1,
341
- },
342
- ]),
343
- {
344
- type: 'text',
345
- name: 'authorName',
346
- message: 'Author name:',
347
- initial: authorInfo?.name || '',
348
- validate: (name) => (name ? true : 'Author name is required'),
349
- },
335
+ min: 1,
336
+ suggest: (input, choices) => Promise.resolve(choices.filter((i) => i.title.includes(input))),
337
+ optionsPerPage: templates.length,
338
+ hint: '- Press the Space bar to select, and the Enter key to submit.',
339
+ },
340
+ {
341
+ type: (templateNames = []) => {
342
+ return templateNames.length > 1 ? 'select' : null;
343
+ },
344
+ name: 'mainBlocklet',
345
+ message: 'Please choose the main blocklet',
346
+ //
347
+ choices: (templateNames = []) =>
348
+ templateNames.map((templateName) => {
349
+ const template = templates.find((x) => x.name === templateName);
350
+ return {
351
+ title: template.display,
352
+ value: template.name,
353
+ };
354
+ }),
355
+ initial: 1,
356
+ },
357
+ ]),
358
+ {
359
+ type: 'text',
360
+ name: 'authorName',
361
+ message: 'Author name:',
362
+ initial: authorInfo?.name || '',
363
+ validate: (name) => (name ? true : 'Author name is required'),
364
+ },
365
+ {
366
+ type: 'text',
367
+ name: 'authorEmail',
368
+ message: 'Author email:',
369
+ initial: authorInfo?.email || '',
370
+ validate: (email) => (email ? true : 'Author email is required'),
371
+ },
372
+ {
373
+ type: async () => {
374
+ const isInstalled = await checkServerInstalled();
375
+ return isInstalled ? null : 'select';
376
+ },
377
+ name: 'packageManager',
378
+ message: 'Select package manager to install @blocklet/cli:',
379
+ choices: [
380
+ { title: 'npm', value: 'npm' },
381
+ { title: 'yarn', value: 'yarn' },
382
+ { title: 'pnpm', value: 'pnpm' },
383
+ ],
384
+ },
385
+ ],
350
386
  {
351
- type: 'text',
352
- name: 'authorEmail',
353
- message: 'Author email:',
354
- initial: authorInfo?.email || '',
355
- validate: (email) => (email ? true : 'Author email is required'),
356
- },
357
- ],
358
- {
359
- onCancel: () => {
360
- throw new Error(`${red('✖')} Operation cancelled`);
387
+ onCancel: () => {
388
+ throw new Error(`${red('')} Operation cancelled`);
389
+ },
361
390
  },
362
- },
363
- );
391
+ );
392
+ }
364
393
  } catch (cancelled) {
365
394
  console.error(cancelled.message);
366
395
  return;
@@ -374,16 +403,28 @@ async function init() {
374
403
  packageName,
375
404
  authorName,
376
405
  authorEmail,
406
+ packageManager,
377
407
  } = result;
378
408
 
379
- await echoDocument();
380
-
381
- const root = path.join(cwd, targetDir || projectName || packageName);
409
+ const projectRoot = path.join(cwd, targetDir || projectName || packageName);
382
410
 
383
411
  if (overwrite) {
384
- emptyDir(root);
385
- } else if (!fs.existsSync(root)) {
386
- fs.mkdirSync(root);
412
+ emptyDir(projectRoot);
413
+ } else if (!fs.existsSync(projectRoot)) {
414
+ fs.mkdirSync(projectRoot);
415
+ }
416
+
417
+ if (!(await checkServerInstalled())) {
418
+ const installCommand =
419
+ packageManager === 'yarn' ? 'yarn global add @blocklet/cli' : `${packageManager} install -g @blocklet/cli`;
420
+ console.log(`Use ${installCommand} to install @blocklet/cli...`);
421
+ try {
422
+ execSync(installCommand, { stdio: 'inherit' });
423
+ console.log(chalk.green('Successfully installed @blocklet/cli'));
424
+ } catch (error) {
425
+ console.error(red(`Error installing @blocklet/cli: ${error.message}`));
426
+ console.log(`Please try to install manually: ${chalk.cyan(installCommand)}`);
427
+ }
387
428
  }
388
429
 
389
430
  const checkSpinner = ora({
@@ -393,11 +434,10 @@ async function init() {
393
434
  const isServerInstalled = await checkServerInstalled();
394
435
  const isSatisfiedVersion = await checkSatisfiedVersion();
395
436
  const isServerRunning = await checkServerRunning();
396
- checkSpinner.succeed('Done');
397
-
398
- console.log(`\nScaffolding project in ${cyan(root)}`);
437
+ checkSpinner.succeed('🚀 Checking blocklet server runtime environment successfully!');
399
438
 
400
439
  const scaffoldSpinner = ora('Creating project...\n').start();
440
+
401
441
  // name 是用户输入的项目名称
402
442
  let name = projectName || packageName || targetDir;
403
443
  if (['.', './'].includes(name)) {
@@ -411,7 +451,7 @@ async function init() {
411
451
  const monorepoDir = path.join(__dirname, 'templates', 'monorepo');
412
452
  const monorepoFiles = fs.readdirSync(monorepoDir);
413
453
  for (const file of monorepoFiles) {
414
- const targetPath = path.join(root, renameFiles[file] || file);
454
+ const targetPath = path.join(projectRoot, renameFiles[file] || file);
415
455
  copy(path.join(monorepoDir, file), targetPath);
416
456
  }
417
457
  }
@@ -483,8 +523,8 @@ async function init() {
483
523
  }
484
524
 
485
525
  const targetPath = renameFiles[file]
486
- ? path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
487
- : path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
526
+ ? path.join(projectRoot, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
527
+ : path.join(projectRoot, mainBlocklet ? `blocklets/${templateName}` : '', file);
488
528
 
489
529
  copy(path.join(commonDir, file), targetPath);
490
530
  }
@@ -498,12 +538,12 @@ async function init() {
498
538
  }
499
539
  // 如果选择了多个模板,每个子 package 中的 bump-version.mjs 文件
500
540
  if (mainBlocklet) {
501
- fs.removeSync(path.join(root, `blocklets/${templateName}`, 'scripts/bump-version.mjs'));
541
+ fs.removeSync(path.join(projectRoot, `blocklets/${templateName}`, 'scripts/bump-version.mjs'));
502
542
  }
503
543
  })();
504
544
 
505
545
  // merge readme
506
- mergeReadme(templateName, root, !!mainBlocklet);
546
+ mergeReadme(templateName, projectRoot, !!mainBlocklet);
507
547
 
508
548
  modifyPackage(
509
549
  (pkg) => {
@@ -579,9 +619,11 @@ async function init() {
579
619
  await patchDid();
580
620
  }
581
621
 
582
- scaffoldSpinner.succeed('✨ Done. Now run:\n');
622
+ scaffoldSpinner.succeed('✨ Creating project successfully!');
623
+
624
+ console.log(`✔ 🔨 Scaffolding project in ${cyan(projectRoot)}`);
583
625
 
584
- const related = path.relative(cwd, root);
626
+ const projectRelativePath = path.relative(cwd, projectRoot);
585
627
 
586
628
  // const pkgManager =
587
629
  // // eslint-disable-next-line no-nested-ternary
@@ -607,7 +649,7 @@ async function init() {
607
649
  const yes = false;
608
650
  let hasStart = false;
609
651
 
610
- await initGitRepo(root);
652
+ await initGitRepo(projectRoot);
611
653
 
612
654
  let defaultAgent = 'pnpm';
613
655
  const agentList = ['npm', 'yarn', 'pnpm'];
@@ -633,7 +675,7 @@ async function init() {
633
675
  }
634
676
  defaultAgent = agent;
635
677
 
636
- await cd(root);
678
+ await cd(projectRoot);
637
679
  execSync(`${agent} install`, { stdio: 'inherit' });
638
680
  if (isServerInstalled && isServerRunning && isSatisfiedVersion) {
639
681
  console.log(
@@ -656,45 +698,45 @@ async function init() {
656
698
  // 未安装 blocklet server
657
699
  console.log(red('To run the blocklet, you need a running blocklet server instance on local machine.'), '\n');
658
700
  console.log(`Checkout ${green('README.md')} for more usage instructions.`);
659
- console.log('Now you should run:', '\n');
660
- console.log(cyan(`${defaultAgent} install -g @blocklet/cli`));
661
- console.log(cyan('blocklet server start -a'));
701
+ console.log(`${chalk.bold('👉 Now you should run: \n')}`);
702
+ console.log(cyan(` ${defaultAgent} install -g @blocklet/cli`));
703
+ console.log(cyan(' blocklet server start -a'));
662
704
  } else if (!isSatisfiedVersion) {
663
705
  // 已安装 blocklet server,但版本不满足
664
706
  console.log(red('Your blocklet server version is outdate, please update it to the latest version.'));
665
- console.log('Now you should run:', '\n');
707
+ console.log(`${chalk.bold('👉 Now you should run: \n')}`);
666
708
  if (isServerRunning) {
667
709
  // blocklet server 已经启动
668
710
  const serverPath = await getServerDirectory();
669
- console.log(cyan(`cd ${serverPath}`));
670
- console.log(cyan('blocklet server stop'));
671
- console.log(cyan(`${defaultAgent} install -g @blocklet/cli`));
672
- console.log(cyan('blocklet server start'));
711
+ console.log(cyan(` cd ${serverPath}`));
712
+ console.log(cyan(' blocklet server stop'));
713
+ console.log(cyan(` ${defaultAgent} install -g @blocklet/cli`));
714
+ console.log(cyan(' blocklet server start'));
673
715
  } else {
674
716
  // blocklet server 未启动
675
717
  // TODO: 如何获取未启动的 blocklet server 实例目录?
676
- console.log(cyan(`${defaultAgent} install -g @blocklet/cli`));
677
- console.log(cyan('blocklet server start -a'));
718
+ console.log(cyan(` ${defaultAgent} install -g @blocklet/cli`));
719
+ console.log(cyan(' blocklet server start -a'));
678
720
  }
679
721
  } else if (!isServerRunning) {
680
722
  // 已经安装 blocklet server,且版本满足,并且 blocklet server 未启动
681
- console.log(red('You need to start your blocklet server before develop this blocklet.'));
682
- console.log('Now you should run:', '\n');
723
+ console.log(`${chalk.bold('👉 Now you should run: \n')}`);
683
724
  // TODO: 如何获取未启动的 blocklet server 实例目录?
684
- console.log(cyan('blocklet server start -a'));
725
+ console.log(cyan(' blocklet server start -a'));
685
726
  }
686
727
 
687
728
  if (!hasStart) {
688
729
  // console.log(dim('\n start it later by:\n'));
689
- if (root !== cwd) console.log(blue(`cd ${bold(related)}`));
730
+ if (projectRoot !== cwd) console.log(blue(` cd ${bold(projectRelativePath)}`));
690
731
  if (mainBlocklet) {
691
- console.log(blue('npm run init'));
732
+ console.log(blue(' npm run init'));
692
733
  } else {
693
- console.log(blue(`${defaultAgent === 'yarn' ? 'yarn' : `${defaultAgent} install`}`));
694
- console.log(cyan('blocklet dev'));
734
+ console.log(blue(` ${defaultAgent === 'yarn' ? 'yarn' : `${defaultAgent} install`}`));
735
+ console.log(cyan(' blocklet dev'));
695
736
  }
696
737
 
697
- console.log('\n', `Find more usage in ${green('README.md')}`, '\n');
738
+ console.log('');
739
+ printResourceMessage(projectRoot);
698
740
  }
699
741
  } catch (cancelled) {
700
742
  console.error(cancelled.message);
@@ -703,8 +745,8 @@ async function init() {
703
745
  // inside functions
704
746
  function write(file, content, templateDir, templateName) {
705
747
  const targetPath = renameFiles[file]
706
- ? path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
707
- : path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
748
+ ? path.join(projectRoot, mainBlocklet ? `blocklets/${templateName}` : '', renameFiles[file])
749
+ : path.join(projectRoot, mainBlocklet ? `blocklets/${templateName}` : '', file);
708
750
  if (content) {
709
751
  fs.writeFileSync(targetPath, content);
710
752
  } else {
@@ -712,7 +754,7 @@ async function init() {
712
754
  }
713
755
  }
714
756
  function read(file, templateName) {
715
- const targetPath = path.join(root, mainBlocklet ? `blocklets/${templateName}` : '', file);
757
+ const targetPath = path.join(projectRoot, mainBlocklet ? `blocklets/${templateName}` : '', file);
716
758
  if (fs.existsSync(targetPath)) {
717
759
  return fs.readFileSync(targetPath, 'utf8');
718
760
  }
package/lib/arcblock.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import figlet from 'figlet';
2
2
  import terminalLink from 'terminal-link';
3
3
  import gradient from 'gradient-string';
4
- import { chalk, echo } from 'zx';
5
-
6
- const { green } = chalk;
4
+ import { echo, chalk } from 'zx';
5
+ import { join } from 'path';
7
6
 
8
7
  export function echoBrand({ version = '' }) {
9
8
  let msg;
@@ -24,14 +23,21 @@ export function echoBrand({ version = '' }) {
24
23
  });
25
24
  });
26
25
  }
27
- export function echoDocument() {
28
- const url = 'https://www.arcblock.io/docs/blocklet-developer';
29
- let msg;
26
+
27
+ export const printResourceMessage = (projectRoot) => {
28
+ const docsUrl = 'https://www.arcblock.io/docs/blocklet-developer';
29
+ const communityUrl = 'https://community.arcblock.io/';
30
+
31
+ console.log(chalk.bold('📚 Resources: \n'));
32
+ const readmeLink = join(projectRoot, 'README.md');
30
33
  if (terminalLink.isSupported) {
31
- msg = green(terminalLink(`Documentation: ${url}`, url));
34
+ console.log(` 📖 Quick Start: ${terminalLink(readmeLink, join('file://', readmeLink))}`);
35
+ console.log(` 🔗 Documentation: ${terminalLink(`${docsUrl}`, docsUrl)} (with code examples)`);
36
+ console.log(` 💬 Community: ${terminalLink(`${communityUrl}`, communityUrl)} (get expert help)`);
32
37
  } else {
33
- msg = green(`Check documentation in here: ${url}`);
38
+ console.log(` 📖 Quick Start: ${readmeLink}`);
39
+ console.log(` 🔗 Documentation: ${docsUrl} (with code examples)`);
40
+ console.log(` 💬 Community: ${communityUrl} (get expert help)`);
34
41
  }
35
- echo('\n', msg, '\n');
36
- return msg;
37
- }
42
+ console.log();
43
+ };
package/lib/server.js CHANGED
@@ -3,11 +3,15 @@ import semver from 'semver';
3
3
  import { BLOCKLET_COMMAND } from './constant.js';
4
4
 
5
5
  export async function getServerVersion() {
6
+ const defaultVersion = '0.0.0';
6
7
  try {
8
+ if (!(await checkServerInstalled())) {
9
+ return defaultVersion;
10
+ }
7
11
  const { stdout: output } = await $`${BLOCKLET_COMMAND} --version`;
8
12
  return output.trim();
9
13
  } catch (e) {
10
- return '0.0.0';
14
+ return defaultVersion;
11
15
  }
12
16
  }
13
17
 
@@ -65,7 +69,14 @@ export async function getServerDirectory() {
65
69
  }
66
70
 
67
71
  export async function getUserInfo() {
72
+ const defaultValue = {
73
+ name: '',
74
+ email: '',
75
+ };
68
76
  try {
77
+ if (!(await checkServerInstalled())) {
78
+ return defaultValue;
79
+ }
69
80
  const { stdout: name } = await $`${BLOCKLET_COMMAND} config get name`;
70
81
  const { stdout: email } = await $`${BLOCKLET_COMMAND} config get email`;
71
82
  return {
@@ -73,9 +84,6 @@ export async function getUserInfo() {
73
84
  email: await trimServerOutputVersion(email?.trim()),
74
85
  };
75
86
  } catch {
76
- return {
77
- name: '',
78
- email: '',
79
- };
87
+ return defaultValue;
80
88
  }
81
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-blocklet",
3
- "version": "0.9.28",
3
+ "version": "0.9.29",
4
4
  "exports": "./index.js",
5
5
  "type": "module",
6
6
  "repository": "git@github.com:blocklet/create-blocklet.git",
@@ -97,7 +97,7 @@
97
97
  "typescript": "^5.7.2",
98
98
  "vite": "^5.4.11",
99
99
  "vite-node": "^2.1.8",
100
- "vite-plugin-blocklet": "^0.9.28",
100
+ "vite-plugin-blocklet": "^0.9.29",
101
101
  "vite-plugin-require": "^1.2.14",
102
102
  "vite-plugin-svgr": "^4.3.0",
103
103
  "vite-tsconfig-paths": "^4.3.2",
@@ -77,7 +77,7 @@
77
77
  "rimraf": "^5.0.10",
78
78
  "simple-git-hooks": "^2.11.1",
79
79
  "vite": "^5.4.14",
80
- "vite-plugin-blocklet": "^0.9.28",
80
+ "vite-plugin-blocklet": "^0.9.29",
81
81
  "vite-plugin-svgr": "^4.3.0",
82
82
  "zx": "^8.3.2"
83
83
  },
@@ -53,10 +53,11 @@
53
53
  "simple-git-hooks": "^2.11.1",
54
54
  "vite": "^5.4.14",
55
55
  "vite-node": "^2.1.9",
56
- "vite-plugin-blocklet": "^0.9.28",
56
+ "vite-plugin-blocklet": "^0.9.29",
57
57
  "vite-plugin-require": "^1.2.14",
58
58
  "vite-plugin-svgr": "^4.3.0",
59
- "zx": "^8.3.2"
59
+ "zx": "^8.3.2",
60
+ "cross-env": "^7.0.3"
60
61
  },
61
62
  "lint-staged": {
62
63
  "*.{mjs,js,jsx,ts,tsx}": [
@@ -98,7 +98,7 @@
98
98
  "ts-node": "^10.9.2",
99
99
  "typescript": "^5.7.3",
100
100
  "vite": "^5.4.14",
101
- "vite-plugin-blocklet": "^0.9.28",
101
+ "vite-plugin-blocklet": "^0.9.29",
102
102
  "vite-plugin-svgr": "^4.3.0",
103
103
  "zx": "^8.3.2"
104
104
  },
@@ -71,7 +71,7 @@
71
71
  "rimraf": "^5.0.10",
72
72
  "simple-git-hooks": "^2.11.1",
73
73
  "vite": "^5.4.14",
74
- "vite-plugin-blocklet": "^0.9.28",
74
+ "vite-plugin-blocklet": "^0.9.29",
75
75
  "vite-plugin-svgr": "^4.3.0",
76
76
  "zx": "^8.3.2"
77
77
  },
@@ -81,7 +81,7 @@
81
81
  "ts-node": "^10.9.2",
82
82
  "typescript": "^5.7.3",
83
83
  "vite": "^5.4.14",
84
- "vite-plugin-blocklet": "^0.9.28",
84
+ "vite-plugin-blocklet": "^0.9.29",
85
85
  "vite-plugin-svgr": "^4.3.0",
86
86
  "zx": "^8.3.2"
87
87
  },
@@ -71,7 +71,7 @@
71
71
  "rimraf": "^5.0.10",
72
72
  "simple-git-hooks": "^2.11.1",
73
73
  "vite": "^5.4.14",
74
- "vite-plugin-blocklet": "^0.9.28",
74
+ "vite-plugin-blocklet": "^0.9.29",
75
75
  "vite-plugin-svgr": "^4.3.0",
76
76
  "zx": "^8.3.2"
77
77
  },
@@ -52,7 +52,7 @@
52
52
  "rimraf": "^5.0.10",
53
53
  "simple-git-hooks": "^2.11.1",
54
54
  "vite": "^5.4.14",
55
- "vite-plugin-blocklet": "^0.9.28",
55
+ "vite-plugin-blocklet": "^0.9.29",
56
56
  "vite-plugin-svgr": "^4.3.0",
57
57
  "zx": "^8.3.2"
58
58
  },
@@ -36,7 +36,7 @@
36
36
  "rimraf": "^5.0.10",
37
37
  "simple-git-hooks": "^2.11.1",
38
38
  "vite": "^5.4.14",
39
- "vite-plugin-blocklet": "^0.9.28",
39
+ "vite-plugin-blocklet": "^0.9.29",
40
40
  "vite-plugin-solid": "^2.11.2",
41
41
  "zx": "^8.3.2"
42
42
  },
@@ -32,7 +32,7 @@
32
32
  "simple-git-hooks": "^2.11.1",
33
33
  "solid-js": "^1.9.4",
34
34
  "vite": "^5.4.14",
35
- "vite-plugin-blocklet": "^0.9.28",
35
+ "vite-plugin-blocklet": "^0.9.29",
36
36
  "vite-plugin-solid": "^2.11.2",
37
37
  "zx": "^8.3.2"
38
38
  },
@@ -4,6 +4,9 @@ import { createBlockletPlugin } from 'vite-plugin-blocklet';
4
4
 
5
5
  export default defineConfig(() => {
6
6
  return {
7
+ server: {
8
+ host: true,
9
+ },
7
10
  plugins: [solidPlugin(), createBlockletPlugin()],
8
11
  build: {
9
12
  target: 'esnext',
@@ -44,8 +44,9 @@
44
44
  "simple-git-hooks": "^2.11.1",
45
45
  "svelte": "^4.2.19",
46
46
  "vite": "^5.4.14",
47
- "vite-plugin-blocklet": "^0.9.28",
48
- "zx": "^8.3.2"
47
+ "vite-plugin-blocklet": "^0.9.29",
48
+ "zx": "^8.3.2",
49
+ "nodemon": "^3.1.9"
49
50
  },
50
51
  "lint-staged": {
51
52
  "*.{mjs,js,svelte}": [
@@ -16,6 +16,7 @@
16
16
  "bump-version": "zx --quiet scripts/bump-version.mjs"
17
17
  },
18
18
  "devDependencies": {
19
+ "@sveltejs/vite-plugin-svelte": "^3.0.1",
19
20
  "@trivago/prettier-plugin-sort-imports": "^4.3.0",
20
21
  "bumpp": "^9.11.1",
21
22
  "lint-staged": "^15.4.3",
@@ -25,7 +26,7 @@
25
26
  "simple-git-hooks": "^2.11.1",
26
27
  "svelte": "^4.2.19",
27
28
  "vite": "^5.4.14",
28
- "vite-plugin-blocklet": "^0.9.28",
29
+ "vite-plugin-blocklet": "^0.9.29",
29
30
  "zx": "^8.3.2"
30
31
  },
31
32
  "lint-staged": {
@@ -5,6 +5,9 @@ import { createBlockletPlugin } from 'vite-plugin-blocklet';
5
5
  // https://vitejs.dev/config/
6
6
  export default defineConfig(() => {
7
7
  return {
8
+ server: {
9
+ host: true,
10
+ },
8
11
  plugins: [
9
12
  svelte(),
10
13
  createBlockletPlugin({
@@ -96,7 +96,7 @@
96
96
  "ts-node": "^10.9.2",
97
97
  "typescript": "^5.7.3",
98
98
  "vite": "^5.4.14",
99
- "vite-plugin-blocklet": "^0.9.28",
99
+ "vite-plugin-blocklet": "^0.9.29",
100
100
  "vite-plugin-svgr": "^4.3.0",
101
101
  "zx": "^8.3.2"
102
102
  },
@@ -49,7 +49,7 @@
49
49
  "rimraf": "^5.0.10",
50
50
  "simple-git-hooks": "^2.11.1",
51
51
  "vite": "^5.4.14",
52
- "vite-plugin-blocklet": "^0.9.28",
52
+ "vite-plugin-blocklet": "^0.9.29",
53
53
  "vue": "^3.5.13",
54
54
  "zx": "^8.3.2"
55
55
  },
@@ -30,7 +30,7 @@
30
30
  "rimraf": "^5.0.10",
31
31
  "simple-git-hooks": "^2.11.1",
32
32
  "vite": "^5.4.14",
33
- "vite-plugin-blocklet": "^0.9.28",
33
+ "vite-plugin-blocklet": "^0.9.29",
34
34
  "vue": "^3.5.13",
35
35
  "zx": "^8.3.2"
36
36
  },
@@ -39,7 +39,7 @@
39
39
  "taze": "^0.16.9",
40
40
  "typescript": "^5.7.3",
41
41
  "vite": "^5.4.14",
42
- "vite-plugin-blocklet": "^0.9.28",
42
+ "vite-plugin-blocklet": "^0.9.29",
43
43
  "vue-tsc": "^2.2.2",
44
44
  "zx": "^8.3.2"
45
45
  },
@@ -48,7 +48,7 @@
48
48
  "rimraf": "^5.0.10",
49
49
  "simple-git-hooks": "^2.11.1",
50
50
  "vite": "^5.4.14",
51
- "vite-plugin-blocklet": "^0.9.28",
51
+ "vite-plugin-blocklet": "^0.9.29",
52
52
  "vue": "^2.7.16",
53
53
  "zx": "^8.3.2"
54
54
  },
@@ -30,7 +30,7 @@
30
30
  "rimraf": "^5.0.10",
31
31
  "simple-git-hooks": "^2.11.1",
32
32
  "vite": "^5.4.14",
33
- "vite-plugin-blocklet": "^0.9.28",
33
+ "vite-plugin-blocklet": "^0.9.29",
34
34
  "vue": "^2.7.16",
35
35
  "zx": "^8.3.2"
36
36
  },