klaatcode-darwin-arm64 1.15.42 → 1.15.44
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/bin/klaatcode +0 -0
- package/package.json +1 -1
- package/postinstall.js +8 -4
package/bin/klaatcode
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/postinstall.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Runs automatically after `npm install` / `npm install -g klaatcode`.
|
|
3
|
-
// Strips the macOS quarantine xattr so Gatekeeper doesn't block the binary.
|
|
4
|
-
//
|
|
5
|
-
// (0x20000) which XFENCE requires. codesign --force destroys it.
|
|
3
|
+
// 1. Strips the macOS quarantine xattr so Gatekeeper doesn't block the binary.
|
|
4
|
+
// 2. Re-signs with a stable identifier so XFENCE can create persistent allow rules.
|
|
6
5
|
const { execSync } = require("child_process")
|
|
7
6
|
const path = require("path")
|
|
8
7
|
|
|
@@ -13,4 +12,9 @@ try {
|
|
|
13
12
|
} catch {
|
|
14
13
|
// quarantine attr may not exist — not an error
|
|
15
14
|
}
|
|
16
|
-
|
|
15
|
+
try {
|
|
16
|
+
execSync(`codesign --force --sign - --identifier com.klaatai.klaatcode "${bin}"`, { stdio: "pipe" })
|
|
17
|
+
} catch {
|
|
18
|
+
// codesign may not be available — not an error
|
|
19
|
+
}
|
|
20
|
+
console.log("klaatcode: postinstall complete (quarantine stripped, signed as com.klaatai.klaatcode)")
|