@naseej/blox 1.2.2 → 1.2.3

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 +9 -17
  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.2.2";
34
+ var version = "1.2.3";
35
35
 
36
36
  // src/commands/add/index.ts
37
37
  var import_fs_extra8 = __toESM(require("fs-extra"));
@@ -351,11 +351,6 @@ var text = async (opts) => {
351
351
  checkIfCanceled(value);
352
352
  return value;
353
353
  };
354
- var confirm = async (opts) => {
355
- const value = await (0, import_prompts3.confirm)(opts);
356
- checkIfCanceled(value);
357
- return value;
358
- };
359
354
  var textList = async (opts) => {
360
355
  opts.message = `${opts.message} ${fmt.gray('(separated with ",")')}`;
361
356
  const value = await (0, import_prompts3.text)(opts);
@@ -1062,13 +1057,10 @@ async function updateFromRemote({ name, source = "", ignore: ignore2 = [], dir =
1062
1057
  hasMergeConflicts = errorMessage.includes("with conflicts");
1063
1058
  }
1064
1059
  if (hasMergeConflicts) {
1065
- const shouldContinue = await confirm({
1066
- message: "Please resolve conflicts and press yes to continue"
1060
+ await select({
1061
+ message: "Please resolve conflicts press enter",
1062
+ options: [{ value: true, label: "continue" }]
1067
1063
  });
1068
- if (!shouldContinue) {
1069
- await deletePatchFile();
1070
- throw new Error("Failed to solve conflicts");
1071
- }
1072
1064
  }
1073
1065
  if (changes.trim() !== "") {
1074
1066
  logWarningSection(
@@ -1106,6 +1098,7 @@ async function updateApp({
1106
1098
  ignore: templateDef.ignore
1107
1099
  });
1108
1100
  if (!toAppCommit) return;
1101
+ if (!templateDef.bases?.length) return;
1109
1102
  for (const block of usedBlocks) {
1110
1103
  const blockRegistryData = availableBlocks[block.name];
1111
1104
  if (!blockRegistryData) return;
@@ -1113,11 +1106,10 @@ async function updateApp({
1113
1106
  const blockPath = import_node_path10.default.join(blocksDir, block.name);
1114
1107
  const currentBloxFile = getBloxFile(blockPath);
1115
1108
  const remoteBloxFile = (await migrateOnRemote(block.name, toAppCommit, blockPath)).output[".blox"];
1116
- const blockFromCommit = currentBloxFile.checkpoints[block.name]?.commit;
1117
- const blockToCommit = remoteBloxFile.checkpoints[block.name]?.commit;
1118
- if (!blockFromCommit || !blockToCommit) continue;
1119
- if (blockFromCommit === blockToCommit) continue;
1120
- if (await git.isCommitOlder(blockFromCommit, blockToCommit)) {
1109
+ const blockFromCommit = currentBloxFile.checkpoints?.[block.name]?.commit;
1110
+ const blockToCommit = remoteBloxFile.checkpoints?.[block.name]?.commit;
1111
+ if (!blockToCommit || blockFromCommit === blockToCommit) continue;
1112
+ if (!blockFromCommit || await git.isCommitOlder(blockFromCommit, blockToCommit)) {
1121
1113
  saveBloxFile(remoteBloxFile, blockPath);
1122
1114
  } else {
1123
1115
  logWarningSection(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naseej/blox",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "blox cli",
5
5
  "bin": {
6
6
  "blox": "./bin/run"