@naseej/blox 0.1.23 → 0.1.24

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 +7 -7
  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 = "0.1.23";
34
+ var version = "0.1.24";
35
35
 
36
36
  // src/commands/add/index.ts
37
37
  var import_fs_extra7 = __toESM(require("fs-extra"));
@@ -171,7 +171,7 @@ var updateRemote = async (name, source, shellOptions = {}) => {
171
171
  });
172
172
  await $("git", ["fetch", name], { ...defaultShellOptions, ...shellOptions });
173
173
  };
174
- var readFileFromRemote = async (remote, file) => {
174
+ var readJsonFromRemote = async (remote, file) => {
175
175
  try {
176
176
  let content = "";
177
177
  await $("git", ["show", `${remote}/main:${file}`], {
@@ -262,7 +262,7 @@ var git = {
262
262
  getChangesLog,
263
263
  applyPatch,
264
264
  updateRemote,
265
- readFileFromRemote,
265
+ readJsonFromRemote,
266
266
  isCommitOlder
267
267
  };
268
268
 
@@ -489,7 +489,7 @@ var textList = async (opts) => {
489
489
  async function updateFromRemote(name, source = "", ignore = [], destPath = ".") {
490
490
  debug("Updating from remote");
491
491
  const basedOnInfo = getBasedOnInfo(destPath);
492
- const remoteBloxFile = await git.readFileFromRemote(name, ".blox");
492
+ const remoteBloxFile = await git.readJsonFromRemote(name, ".blox");
493
493
  for (const [baseName, baseInfo] of Object.entries(remoteBloxFile.bases || {})) {
494
494
  const baseFrom = basedOnInfo.bases?.[baseName]?.commit;
495
495
  const updateBase = () => {
@@ -545,7 +545,7 @@ async function updateFromRemote(name, source = "", ignore = [], destPath = ".")
545
545
  if (changes.trim() !== "") {
546
546
  logWarningSection(
547
547
  "These is the changes from last update, make sure to review for breaking changes",
548
- changes
548
+ changes.replace(/BREAKING CHANGE/gi, fmt.red("BREAKING CHANGE"))
549
549
  );
550
550
  }
551
551
  await deletePatchFile();
@@ -637,9 +637,9 @@ var addBlock = async (block, blocks) => {
637
637
  await git.unInit(blockPath);
638
638
  await replacePlaceholders(blockPath, {});
639
639
  saveBasedOnInfo({ commit }, blockPath);
640
- await runInitScript(blockPath);
641
640
  }
642
641
  );
642
+ await runTask("Run init script", async () => runInitScript(blockPath));
643
643
  } else {
644
644
  debug(`${block} already exists, will be updated`);
645
645
  await updateBlock(block, blocks);
@@ -731,8 +731,8 @@ var init2 = command("init").description("Init new app").alias("i").option("-n, -
731
731
  await replacePlaceholders(name, { app: { name } });
732
732
  updateBasedOnInfo({ commit }, name);
733
733
  await git.init(name);
734
- await runInitScript(name);
735
734
  task.stop(`App initialized in ${name}`);
735
+ await runTask("Run init script", async () => runInitScript(name || ""));
736
736
  } catch (e) {
737
737
  error(e);
738
738
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naseej/blox",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
4
4
  "description": "blox cli",
5
5
  "bin": {
6
6
  "blox": "./bin/run"