@blocklet/pages-kit-block-studio 0.5.5 → 0.5.7

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.
@@ -22,7 +22,8 @@ async function buildLib(options) {
22
22
  const multiMode = process.argv.includes('--multi') || process.env.BLOCK_MULTI === 'true';
23
23
  const blocks = allBlocks.filter((name) => !filterModules || filterModules.includes(name || ''));
24
24
  if (!blocks.length) {
25
- console.log(chalk_1.default.yellow('No blocks founds'));
25
+ console.log(chalk_1.default.yellow('No components founds, please check has any component been selected'));
26
+ throw new Error('No components founds, please check has any component been selected');
26
27
  return;
27
28
  }
28
29
  // Clean up the lib directory
@@ -72,8 +72,8 @@ initResourceRouter.get('/', async (_req, res) => {
72
72
  resources: [
73
73
  {
74
74
  id: allTag,
75
- name: 'All Blocks',
76
- description: 'Select All Blocks',
75
+ name: 'All Components',
76
+ description: 'Select All Components',
77
77
  images: [],
78
78
  url: '',
79
79
  children: resources,
@@ -91,6 +91,9 @@ initResourceRouter.post('/', async (req, res) => {
91
91
  currentBuildProcess.kill();
92
92
  currentBuildProcess = null;
93
93
  }
94
+ if (componentIds.length === 0) {
95
+ throw new Error('No components founds, please check has any component been selected');
96
+ }
94
97
  // Execute build command with filtered components
95
98
  const buildProcess = spawn('pnpm', ['run', 'build-lib'], {
96
99
  stdio: 'inherit',