@happlyui/cli 1.0.0 → 1.0.1

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/dist/index.js +10 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -191561,8 +191561,11 @@ async function add(components, options) {
191561
191561
  }
191562
191562
  process.exit(1);
191563
191563
  }
191564
+ const requestedNames = new Set(components);
191564
191565
  const existingFiles = [];
191566
+ const skippableDeps = new Set;
191565
191567
  for (const item of items) {
191568
+ const isExplicit = requestedNames.has(item.name);
191566
191569
  for (const file of item.files) {
191567
191570
  const fileType = file.type || item.type;
191568
191571
  let fileName = path6.basename(file.path);
@@ -191573,7 +191576,11 @@ async function add(components, options) {
191573
191576
  }
191574
191577
  const targetPath = getComponentPath(item.name, fileType, config, fileName);
191575
191578
  if (componentExists(cwd, targetPath)) {
191576
- existingFiles.push(targetPath);
191579
+ if (isExplicit) {
191580
+ existingFiles.push(targetPath);
191581
+ } else {
191582
+ skippableDeps.add(targetPath);
191583
+ }
191577
191584
  }
191578
191585
  }
191579
191586
  }
@@ -191605,6 +191612,8 @@ async function add(components, options) {
191605
191612
  }
191606
191613
  }
191607
191614
  const targetPath = getComponentPath(item.name, fileType, config, fileName);
191615
+ if (skippableDeps.has(targetPath))
191616
+ continue;
191608
191617
  const transformedContent = transformComponent(file, config);
191609
191618
  await writeComponentFile(cwd, targetPath, transformedContent);
191610
191619
  writtenFiles.push(targetPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happlyui/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Add HapplyUI components to your project",
5
5
  "type": "module",
6
6
  "bin": {