@yuandc/aica 0.1.86 → 0.1.87
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{execFileSync as
|
|
2
|
-
`)
|
|
1
|
+
import{execFileSync as s}from"node:child_process";const t="ACA_MACHINE_FS_UTF8:";function l(n,o={}){const c=["$ErrorActionPreference = 'Stop'","$acaMachineFsOutput = @(& {",n,'}) -join "`n"',"$acaMachineFsPayload = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($acaMachineFsOutput))",`$acaMachineFsBytes = [System.Text.Encoding]::ASCII.GetBytes('${t}' + $acaMachineFsPayload)`,"$acaMachineFsStream = [Console]::OpenStandardOutput()","$acaMachineFsStream.Write($acaMachineFsBytes, 0, $acaMachineFsBytes.Length)","$acaMachineFsStream.Flush()"].join(`
|
|
2
|
+
`),r=Buffer.from(c,"utf16le").toString("base64"),a=s("powershell.exe",["-NoLogo","-NoProfile","-NonInteractive","-EncodedCommand",r],{encoding:"utf8",windowsHide:!0,timeout:8e3,maxBuffer:4*1024*1024,env:{...process.env,...o}}).replace(/^\uFEFF/,"").trim(),e=a.startsWith(t)?a.slice(t.length):null;if(e===null||e.length%4!==0||!/^[A-Za-z0-9+/]*={0,2}$/.test(e))throw new Error("PowerShell 文件系统输出格式无效。");return new TextDecoder("utf-8",{fatal:!0}).decode(Buffer.from(e,"base64")).replace(/^\uFEFF/,"").trim()}export{l as execPowerShell};
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const o="0.1.
|
|
1
|
+
const o="0.1.87";export{o as AICA_VERSION};
|