@naseej/blox 1.3.0 → 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.
- package/dist/run.js +26 -4
- 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.
|
|
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"));
|
|
@@ -980,7 +980,7 @@ var init2 = command("init").description("Init new app").alias("i").option("-n, -
|
|
|
980
980
|
const def = getTemplateDef(name);
|
|
981
981
|
await deletePattern(name, def.ignore);
|
|
982
982
|
await replacePlaceholders(name, { app: { name } });
|
|
983
|
-
updateCheckpoint(name, { commit: commit2 }, name);
|
|
983
|
+
updateCheckpoint(def.name, { commit: commit2 }, name);
|
|
984
984
|
await git.init(name);
|
|
985
985
|
task.stop(`App initialized in ${name}`);
|
|
986
986
|
await runTask("Run init script", async () => runInitScript(name || ""));
|
|
@@ -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(
|
|
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");
|
|
@@ -1179,7 +1201,7 @@ async function printChangeLog(startCheckpoints, endCheckpoints) {
|
|
|
1179
1201
|
if (fromCommit === toCommit) continue;
|
|
1180
1202
|
const changes = await git.getChangesLog(fromCommit, toCommit);
|
|
1181
1203
|
if (changes.trim() !== "") {
|
|
1182
|
-
allChanges.push(`${fmt.bold(fmt.
|
|
1204
|
+
allChanges.push(`${fmt.bold(fmt.bgYellowBright(name))}:
|
|
1183
1205
|
|
|
1184
1206
|
${changes}`);
|
|
1185
1207
|
}
|