myoperator-ui 0.0.197 → 0.0.198-beta.0

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 +5 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -11974,7 +11974,7 @@ async function add(components, options) {
11974
11974
  const installed = [];
11975
11975
  const dependencies = /* @__PURE__ */ new Set();
11976
11976
  const installedComponents = /* @__PURE__ */ new Set();
11977
- const installComponent = async (componentName) => {
11977
+ const installComponent = async (componentName, forceOverwrite = false) => {
11978
11978
  if (installedComponents.has(componentName)) {
11979
11979
  return;
11980
11980
  }
@@ -11986,7 +11986,7 @@ async function add(components, options) {
11986
11986
  if (component.internalDependencies && component.internalDependencies.length > 0) {
11987
11987
  spinner.text = `Installing dependencies for ${componentName}...`;
11988
11988
  for (const depName of component.internalDependencies) {
11989
- await installComponent(depName);
11989
+ await installComponent(depName, true);
11990
11990
  }
11991
11991
  }
11992
11992
  spinner.text = `Installing ${componentName}...`;
@@ -11994,7 +11994,7 @@ async function add(components, options) {
11994
11994
  for (const file of component.files) {
11995
11995
  const filePath = path2.join(targetDir, file.name);
11996
11996
  if (await fs2.pathExists(filePath)) {
11997
- if (!options.overwrite) {
11997
+ if (!options.overwrite && !forceOverwrite) {
11998
11998
  spinner.warn(`${file.name} already exists. Use --overwrite to replace.`);
11999
11999
  continue;
12000
12000
  }
@@ -13261,6 +13261,8 @@ async function sync(options) {
13261
13261
  const depExists = await fs6.pathExists(path6.join(depTargetDir, depMainFile));
13262
13262
  if (!depExists) {
13263
13263
  await installComponent(depName, "added");
13264
+ } else if (toUpdate.includes(depName) && !processedComponents.has(depName)) {
13265
+ await installComponent(depName, "updated");
13264
13266
  }
13265
13267
  }
13266
13268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "myoperator-ui",
3
- "version": "0.0.197",
3
+ "version": "0.0.198-beta.0",
4
4
  "description": "CLI for adding myOperator UI components to your project",
5
5
  "type": "module",
6
6
  "exports": "./dist/index.js",