@naseej/blox 1.3.1 → 1.3.2

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/run.js +24 -2
  2. package/package.json +1 -1
package/dist/run.js CHANGED
@@ -31,7 +31,7 @@ var option = (flags, description) => {
31
31
  };
32
32
 
33
33
  // package.json
34
- var version = "1.3.1";
34
+ var version = "1.3.2";
35
35
 
36
36
  // src/commands/add/index.ts
37
37
  var import_fs_extra8 = __toESM(require("fs-extra"));
@@ -1064,7 +1064,29 @@ async function updateFromRemote({ name, source = "", ignore: ignore2 = [], dir =
1064
1064
  const errorMessage = `${e}`;
1065
1065
  if (errorMessage.includes("error:")) {
1066
1066
  await deletePatchFile();
1067
- console.log(`${e}`.replace("error:", fmt.red("error:")));
1067
+ console.log(errorMessage.replace("error:", fmt.red("error:")));
1068
+ if (errorMessage.includes("does not exist in index")) {
1069
+ logWarningSection(
1070
+ "These files has changes in remote but were deleted:",
1071
+ [
1072
+ fmt.cyan(
1073
+ JSON.stringify(
1074
+ [
1075
+ ...errorMessage.matchAll(
1076
+ /error: (.*): does not exist in index/g
1077
+ )
1078
+ ].map((m) => m[1]),
1079
+ null,
1080
+ 2
1081
+ )
1082
+ ),
1083
+ "Try to",
1084
+ `1- temporarily to .blox ignore property for ${name}`,
1085
+ "2- commit it and try again",
1086
+ "3- remove it after update"
1087
+ ].join("\n\n")
1088
+ );
1089
+ }
1068
1090
  throw new Error("Failed to apply changes.");
1069
1091
  }
1070
1092
  hasMergeConflicts = errorMessage.includes("with conflicts");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naseej/blox",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "blox cli",
5
5
  "bin": {
6
6
  "blox": "./bin/run"