@srcroot/ui 0.0.24 → 0.0.25
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/dist/index.js +12 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1031,10 +1031,19 @@ async function add(components, options) {
|
|
|
1031
1031
|
const comp = REGISTRY[name];
|
|
1032
1032
|
const targetPath = path2.join(componentsDir, comp.file);
|
|
1033
1033
|
if (fs2.existsSync(targetPath) && !options.overwrite) {
|
|
1034
|
-
|
|
1035
|
-
|
|
1034
|
+
spinner.stop();
|
|
1035
|
+
const { overwrite } = await prompts2({
|
|
1036
|
+
type: "confirm",
|
|
1037
|
+
name: "overwrite",
|
|
1038
|
+
message: `${chalk2.cyan(comp.file)} already exists. Overwrite?`,
|
|
1039
|
+
initial: false
|
|
1040
|
+
});
|
|
1041
|
+
if (!overwrite) {
|
|
1042
|
+
spinner.info(`Skipped ${chalk2.cyan(comp.file)}`);
|
|
1043
|
+
spinner.start("Adding components...");
|
|
1044
|
+
continue;
|
|
1036
1045
|
}
|
|
1037
|
-
|
|
1046
|
+
spinner.start("Adding components...");
|
|
1038
1047
|
}
|
|
1039
1048
|
const registryPath = path2.resolve(__dirname3, "..", "registry", comp.file);
|
|
1040
1049
|
if (!fs2.existsSync(registryPath)) {
|