hologit 0.41.8 → 0.41.10

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.
@@ -29,5 +29,5 @@ exports.handler = async function exportTree ({ treeish }) {
29
29
 
30
30
 
31
31
  // delete anything on disk and not in index
32
- await git.clean({ d: true, force: true });
32
+ await git.clean({ d: true, force: true, x: true });
33
33
  };
package/lib/Branch.js CHANGED
@@ -337,6 +337,8 @@ class Branch extends Configurable {
337
337
  }
338
338
  }
339
339
  continue;
340
+ } else if (!(afterLens in lenses)) {
341
+ throw new Error(`lens "${name}" defines after="${afterLens}", but it was not found in [${Object.keys(lenses)}]`);
340
342
  }
341
343
 
342
344
  edges.push([lenses[afterLens], lens]);
@@ -352,6 +354,8 @@ class Branch extends Configurable {
352
354
  }
353
355
  }
354
356
  continue;
357
+ } else if (!(beforeLens in lenses)) {
358
+ throw new Error(`lens "${name}" defines before="${beforeLens}", but it was not found in [${Object.keys(lenses)}]`);
355
359
  }
356
360
 
357
361
  edges.push([lens, lenses[beforeLens]]);
package/lib/Lens.js CHANGED
@@ -87,6 +87,10 @@ class Lens extends Configurable {
87
87
  const { input } = await this.getCachedConfig();
88
88
  const root = input.root == '.' ? inputRoot : await inputRoot.getSubtree(input.root);
89
89
 
90
+ if (!root) {
91
+ throw new Error(`Could not resolve path "${input.root}" within input tree ${await inputRoot.getHash()}`);
92
+ }
93
+
90
94
  // merge input root into tree with any filters applied
91
95
  const tree = this.workspace.getRepo().createTree();
92
96
  await tree.merge(root, {
package/lib/TreeObject.js CHANGED
@@ -66,6 +66,16 @@ class TreeObject {
66
66
  Object.seal(this);
67
67
  }
68
68
 
69
+ toString() {
70
+ let str = this.hash;
71
+
72
+ if (this.dirty) {
73
+ str += '(+pending changes)'
74
+ }
75
+
76
+ return str;
77
+ }
78
+
69
79
  async getHash () {
70
80
  if (!this.dirty) {
71
81
  return this.hash;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hologit",
3
- "version": "0.41.8",
3
+ "version": "0.41.10",
4
4
  "description": "Hologit automates the projection of layered composite file trees based on flat, declarative plans",
5
5
  "repository": "https://github.com/EmergencePlatform/hologit",
6
6
  "main": "lib/index.js",