cc-safety-net 2.4.3 → 2.4.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.
- package/README.md +1 -1
- package/dist/amp/cc-safety-net/index.ts +41 -41
- package/dist/api.js +1 -1
- package/dist/bin/hook.js +40 -40
- package/dist/chunks/index-q7q195qc.js +2 -0
- package/dist/chunks/{index-sp43p448.js → index-sxtcjq8b.js} +2 -2
- package/dist/chunks/index-vas3sm16.js +45 -0
- package/dist/cli.js +29 -29
- package/dist/index.js +1 -1
- package/dist/openclaw/cc-safety-net/index.js +41 -41
- package/dist/openclaw/cc-safety-net/openclaw.plugin.json +1 -1
- package/dist/openclaw/cc-safety-net/package.json +1 -1
- package/dist/pi/index.js +2 -2
- package/package.json +2 -2
- package/dist/chunks/index-26getn55.js +0 -45
- package/dist/chunks/index-p4h81vth.js +0 -2
package/dist/api.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{te,c,ce,d,p,W}from"./chunks/index-
|
|
1
|
+
import{te,c,ce,d,p,W}from"./chunks/index-vas3sm16.js";import{isAbsolute as r,resolve as n}from"node:path";function w(e){if(typeof e!=="object"||e===null)throw TypeError("checkCommand requires an input object with command and cwd");if(typeof e.command!=="string"||e.command.trim()==="")throw TypeError("command must be a non-empty string");if(typeof e.cwd!=="string"||e.cwd.trim()===""||!r(e.cwd))throw TypeError("cwd must be an absolute directory path");let o=n(e.cwd);if(!ce(o))return{kind:"deny",reason:te};return a(t(d("library-api",{command:e.command},{kind:"command",shell:"auto"},{configCwd:o,executionCwd:o},e.command)))}function t(e){try{return W(e,{environment:c()}).decision}catch(o){if(!(o instanceof p))throw o;return o.evaluation.decision}}function a(e){if(e.kind==="allow")return{kind:"allow"};return{kind:"deny",reason:e.reason,...e.ruleId===void 0?{}:{ruleId:e.ruleId}}}export{w as checkCommand};
|