@magnusekdahl/parallix 1.0.2 → 1.0.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.
- package/lib/core/verification.js +4 -4
- package/package.json +1 -1
package/lib/core/verification.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const { run } = require('./git');
|
|
1
|
+
const { git, run } = require('./git');
|
|
2
2
|
const { loadAdapterConfig } = require('./product-config');
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
|
|
@@ -49,7 +49,7 @@ function runVerificationGate(area, options = {}) {
|
|
|
49
49
|
return runFn('bash', ['-lc', command.replaceAll('{{area}}', effectiveArea)], { cwd: rootDir, stdio });
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
function readPublishedTreeState(rootDir = process.cwd(), { gitRunner =
|
|
52
|
+
function readPublishedTreeState(rootDir = process.cwd(), { gitRunner = git } = {}) {
|
|
53
53
|
const resolvedRoot = fs.realpathSync(rootDir);
|
|
54
54
|
const commitResult = gitRunner(['-C', resolvedRoot, 'rev-parse', 'HEAD']);
|
|
55
55
|
const treeResult = gitRunner(['-C', resolvedRoot, 'rev-parse', 'HEAD^{tree}']);
|
|
@@ -68,7 +68,7 @@ function readPublishedTreeState(rootDir = process.cwd(), { gitRunner = run } = {
|
|
|
68
68
|
|
|
69
69
|
function captureVerifiedTreeProof(area, rootDir = process.cwd(), options = {}) {
|
|
70
70
|
const {
|
|
71
|
-
gitRunner =
|
|
71
|
+
gitRunner = git,
|
|
72
72
|
runFn = run,
|
|
73
73
|
stdio = 'inherit'
|
|
74
74
|
} = options;
|
|
@@ -113,7 +113,7 @@ function captureVerifiedTreeProof(area, rootDir = process.cwd(), options = {}) {
|
|
|
113
113
|
};
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
function assertVerifiedTreeProof(proof, rootDir = process.cwd(), { gitRunner =
|
|
116
|
+
function assertVerifiedTreeProof(proof, rootDir = process.cwd(), { gitRunner = git } = {}) {
|
|
117
117
|
if (!proof || typeof proof !== 'object') {
|
|
118
118
|
return { ok: false, error: 'missing verification proof' };
|
|
119
119
|
}
|
package/package.json
CHANGED