tamperward 1.10.3 → 1.10.4

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/cli/index.js +6 -11
  2. package/package.json +1 -1
package/dist/cli/index.js CHANGED
@@ -2139,18 +2139,13 @@ function snapshotProtected(cwd, policy, prev) {
2139
2139
  }
2140
2140
  if (st.isDirectory()) walk(r);
2141
2141
  else if (st.isFile() && isProtected(r, policy)) {
2142
- const p = prev?.[r];
2143
- if (p && p.mtimeMs === st.mtimeMs && p.size === st.size && p.mode === st.mode) {
2144
- out2[r] = p;
2145
- } else {
2146
- let hash = "";
2147
- try {
2148
- hash = sha(readFileSync6(join6(cwd, r)));
2149
- } catch {
2150
- hash = "unreadable";
2151
- }
2152
- out2[r] = { hash, mode: st.mode, size: st.size, mtimeMs: st.mtimeMs };
2142
+ let hash = "";
2143
+ try {
2144
+ hash = sha(readFileSync6(join6(cwd, r)));
2145
+ } catch {
2146
+ hash = "unreadable";
2153
2147
  }
2148
+ out2[r] = { hash, mode: st.mode, size: st.size, mtimeMs: st.mtimeMs };
2154
2149
  }
2155
2150
  }
2156
2151
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tamperward",
3
- "version": "1.10.3",
3
+ "version": "1.10.4",
4
4
  "description": "The deterministic agent-integrity gate. One ruleset, evaluated on the actual diff/commands as a verdict, enforced everywhere a change can be made.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "hexrift",