@nyex/nyex 0.1.2-beta.1 → 0.1.2-beta.2

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/bin/nyex.js +6 -2
  2. package/package.json +1 -1
package/bin/nyex.js CHANGED
@@ -141,7 +141,11 @@ function verifyBinaryIntegrity({ expectedPackage, binPath, shaPath }) {
141
141
  throw err;
142
142
  }
143
143
 
144
- const expected = fs.readFileSync(shaPath, "utf8").trim().toLowerCase();
144
+ // Support both checksum formats:
145
+ // <sha256>
146
+ // <sha256> nyex.exe
147
+ const expectedRaw = fs.readFileSync(shaPath, "utf8").trim().toLowerCase();
148
+ const expected = expectedRaw.split(/\s+/)[0];
145
149
  const actual = crypto
146
150
  .createHash("sha256")
147
151
  .update(fs.readFileSync(binPath))
@@ -171,7 +175,7 @@ function verifyBinaryIntegrity({ expectedPackage, binPath, shaPath }) {
171
175
  "NYEX binary integrity check failed. Refusing to execute nyex.exe.",
172
176
  "",
173
177
  `Binary: ${binPath}`,
174
- `Expected: ${expected}`,
178
+ `Expected: ${expectedRaw}`,
175
179
  `Actual: ${actual}`,
176
180
  "",
177
181
  "Remediation:",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nyex/nyex",
3
- "version": "0.1.2-beta.1",
3
+ "version": "0.1.2-beta.2",
4
4
  "description": "Nyex CLI (private beta)",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://nyex.ai",