@naseej/blox 0.1.19 → 0.1.20

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 +19 -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.19";
34
+ var version = "0.1.20";
35
35
 
36
36
  // src/commands/add/index.ts
37
37
  var import_fs_extra7 = __toESM(require("fs-extra"));
@@ -191,8 +191,15 @@ var getLatestCommit = async (rev, cwd = ".") => {
191
191
  });
192
192
  return commit.replace(/\n/g, "");
193
193
  };
194
- var createPatch = async (fromCommit, toCommit, outputPath) => {
195
- return $("git", ["diff", fromCommit, toCommit, ">", outputPath]);
194
+ var createPatch = async (fromCommit, toCommit, outputPath, ignore = []) => {
195
+ return $("git", [
196
+ "diff",
197
+ fromCommit,
198
+ toCommit,
199
+ ">",
200
+ outputPath,
201
+ ...ignore.map((file) => `':!${file}'`)
202
+ ]);
196
203
  };
197
204
  var getChangesLog = async (fromCommit, toCommit) => {
198
205
  let changes = "";
@@ -451,7 +458,7 @@ var textList = async (opts) => {
451
458
  };
452
459
 
453
460
  // src/services/updater.ts
454
- async function updateFromRemote(name, source = "", destPath = ".") {
461
+ async function updateFromRemote(name, source = "", ignore = [], destPath = ".") {
455
462
  debug("Updating from remote");
456
463
  import_fs_extra6.default.ensureDirSync(appPaths.temp);
457
464
  await git.updateRemote(name, source);
@@ -463,7 +470,7 @@ async function updateFromRemote(name, source = "", destPath = ".") {
463
470
  return;
464
471
  }
465
472
  const patchFilePath = import_node_path6.default.join(destPath, "diff.patch");
466
- await git.createPatch(fromCommit, toCommit, patchFilePath);
473
+ await git.createPatch(fromCommit, toCommit, patchFilePath, ignore);
467
474
  const changes = await git.getChangesLog(fromCommit, toCommit);
468
475
  const deletePatchFile = async () => {
469
476
  if (!isDebugMode()) {
@@ -500,7 +507,7 @@ async function updateAPP(templateInfo) {
500
507
  error("Selected template not available, try to sync registries");
501
508
  return;
502
509
  }
503
- await updateFromRemote(templateInfo.name, template.source);
510
+ await updateFromRemote(templateInfo.name, template.source, templateInfo.ignore);
504
511
  });
505
512
  }
506
513
  var updatedBlocks = /* @__PURE__ */ new Set();
@@ -515,7 +522,12 @@ async function updateBlock(block, blocks) {
515
522
  error("Selected block not available, try to sync registries", false);
516
523
  return;
517
524
  }
518
- await updateFromRemote(block, blockInfo.source, import_node_path7.default.join(blocksDir, block));
525
+ await updateFromRemote(
526
+ block,
527
+ blockInfo.source,
528
+ blockInfo.ignore,
529
+ import_node_path7.default.join(blocksDir, block)
530
+ );
519
531
  updatedBlocks.add(block);
520
532
  });
521
533
  for (const dep of blockInfo?.dependencies || []) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naseej/blox",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "blox cli",
5
5
  "bin": {
6
6
  "blox": "./bin/run"