@alipay/alipay-aipay 1.7.7 → 1.7.9
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 +2 -2
- package/package.json +3 -3
- package/skill/VERSION +1 -1
- package/skill/references/normal/json/policy-rules.json +1 -1
- package/skill/references/normal/scripts/open_official_url.sh +4 -2
- package/skill/references/normal/scripts/render_customer_message.mjs +4 -2
- package/skill/references/normal/scripts/self_update.mjs +6 -7
- package/skill/references/normal/scripts/windows/bootstrap-node.ps1 +0 -2
- package/skill-pre/VERSION +1 -1
- package/skill-pre/references/integration/flow.md +3 -3
- package/skill-pre/references/integration/modules/checklist.md +2 -2
- package/skill-pre/references/integration/modules/sandbox/a2m-sandbox-test.md +2 -2
- package/skill-pre/references/integration/modules/sandbox/sandbox-setup-guide.md +7 -7
- package/skill-pre/references/integration/modules/scripts/sandbox_config.sh +4 -10
- package/skill-pre/references/normal/conversation-telemetry.md +1 -1
- package/skill-pre/references/normal/full-process-routing.md +2 -1
- package/skill-pre/references/normal/scripts/runtime.mjs +6 -6
- package/skill-pre/references/normal/scripts/self_update.mjs +6 -7
- package/skill-pre/references/normal/scripts/telemetry.mjs +4 -4
- package/skill-pre/references/normal/scripts/windows/access-native.mjs +3 -0
- package/skill-pre/references/normal/scripts/windows/architecture.mjs +2 -30
- package/skill-pre/references/normal/scripts/windows/bootstrap-node.ps1 +1 -3
- package/skill-pre/references/normal/scripts/windows/git-discovery.mjs +7 -3
- package/skill-pre/references/normal/scripts/windows/git-install.mjs +3 -4
- package/skill-pre/references/normal/scripts/windows/host.mjs +31 -0
- package/skill-pre/references/normal/scripts/windows/preflight.mjs +27 -18
- package/skill-pre/references/normal/scripts/windows/prepare.mjs +3 -3
- package/skill-pre/references/normal/scripts/windows/python-execution.mjs +6 -6
- package/skill-pre/references/normal/scripts/windows/python-runtime.mjs +4 -4
- package/skill-pre/references/normal/scripts/windows/routing.mjs +11 -7
- package/skill-pre/references/normal/scripts/windows/shell_helpers.sh +2 -2
- package/skill-pre/references/normal/scripts/windows/winget.mjs +1 -1
- package/skill-pre/references/normal/windows-environment.md +15 -15
- package/skill-pre/references/onboarding/modules/authorization.md +1 -1
- package/skill-pre/references/onboarding/modules/scripts/app.sh +5 -5
- package/skill-pre/references/onboarding/modules/scripts/ar_sign_apply.sh +1 -1
- package/skill-pre/references/onboarding/modules/scripts/auth.sh +5 -5
- package/skill-pre/references/runtime-entry.md +1 -1
- package/skill-pre/references/normal/scripts/windows/acl-native.mjs +0 -3
- package/skill-pre/references/normal/scripts/windows/acl.mjs +0 -41
- package/skill-pre/references/normal/scripts/windows/architecture.ps1 +0 -55
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Read OS facts instead of inherited process environment variables. The native
|
|
2
|
-
# machine from IsWow64Process2 distinguishes ARM64 even under x64 emulation.
|
|
3
|
-
function Get-AipayApiArchitecture {
|
|
4
|
-
if (-not ('AipayArchitecture.Native' -as [type])) {
|
|
5
|
-
Add-Type -TypeDefinition @'
|
|
6
|
-
using System;
|
|
7
|
-
using System.Runtime.InteropServices;
|
|
8
|
-
namespace AipayArchitecture {
|
|
9
|
-
public static class Native {
|
|
10
|
-
[DllImport("kernel32.dll", SetLastError = true)]
|
|
11
|
-
[return: MarshalAs(UnmanagedType.Bool)]
|
|
12
|
-
public static extern bool IsWow64Process2(IntPtr process, out ushort processMachine, out ushort nativeMachine);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
'@ -ErrorAction Stop
|
|
16
|
-
}
|
|
17
|
-
[UInt16]$processMachine = 0
|
|
18
|
-
[UInt16]$nativeMachine = 0
|
|
19
|
-
if (-not [AipayArchitecture.Native]::IsWow64Process2([IntPtr](-1), [ref]$processMachine, [ref]$nativeMachine)) {
|
|
20
|
-
throw 'ARCHITECTURE_CHECK_FAILED'
|
|
21
|
-
}
|
|
22
|
-
switch ($nativeMachine) {
|
|
23
|
-
0x8664 { return 'x64' }
|
|
24
|
-
0xAA64 { return 'arm64' }
|
|
25
|
-
0x014C { return 'ia32' }
|
|
26
|
-
0x01C4 { return 'arm' }
|
|
27
|
-
0x0200 { return 'ia64' }
|
|
28
|
-
default { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
function Get-AipayNativeArchitecture {
|
|
33
|
-
if ([Environment]::OSVersion.Platform -ne [PlatformID]::Win32NT) { throw 'UNSUPPORTED_PLATFORM' }
|
|
34
|
-
try { return Get-AipayApiArchitecture } catch {
|
|
35
|
-
# Older Windows or policy-restricted Add-Type: use the built-in CIM
|
|
36
|
-
# provider once. Never relax policy, install a tool, or infer from env.
|
|
37
|
-
}
|
|
38
|
-
try {
|
|
39
|
-
$processors = @(Get-CimInstance -ClassName Win32_Processor -OperationTimeoutSec 5 -ErrorAction Stop)
|
|
40
|
-
if ($processors.Count -eq 0) { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
41
|
-
$values = @($processors | ForEach-Object {
|
|
42
|
-
if ($null -eq $_.Architecture) { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
43
|
-
[string]$_.Architecture
|
|
44
|
-
} | Select-Object -Unique)
|
|
45
|
-
if ($values.Count -ne 1) { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
46
|
-
switch ($values[0]) {
|
|
47
|
-
'9' { return 'x64' }
|
|
48
|
-
'12' { return 'arm64' }
|
|
49
|
-
'0' { return 'ia32' }
|
|
50
|
-
'5' { return 'arm' }
|
|
51
|
-
'6' { return 'ia64' }
|
|
52
|
-
default { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
53
|
-
}
|
|
54
|
-
} catch { throw 'ARCHITECTURE_CHECK_FAILED' }
|
|
55
|
-
}
|