@my-life-buddies/cli-refinewidget 0.0.0-stage → 0.37.0-dev.2

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.
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["<define:__BUDDY_CLI_LANE_BUILD__>", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/build-target.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/platform/npm.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/npm-registry.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/platform/support.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/platform/open.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/platform/windows.ts", "../../../../../../../Users/tonghao/.codex/worktrees/widget-style-cli/cli/packages/cli-core/src/platform/private-files.ts"],
4
+ "sourcesContent": ["{\"schemaVersion\":1,\"id\":\"refinewidgetstyles\",\"origin\":\"https://buddies-refinewidgetstyles.devops.sl.sit.xiaohongshu.com\",\"command\":\"buddy-cli-refinewidget\",\"runtimePackage\":\"@my-life-buddies/buddy-runtime-refinewidget\",\"runtimeTag\":\"dev\",\"runtimePrerelease\":\"dev\",\"avatarPackage\":\"@my-life-buddies/avatar-creator-skill\",\"creatorPackage\":\"@my-life-buddies/buddy-creator-skill\",\"skillTag\":\"latest\",\"skillPrerelease\":\"stable\",\"sourceVersion\":\"0.37.0-dev.2\",\"distribution\":\"npm\",\"packageName\":\"@my-life-buddies/cli-refinewidget\",\"version\":\"0.37.0-dev.2\",\"validationScope\":\"windows-candidate\"}", "/** Replaced only by the local lane builder. Runtime environment variables cannot select a target. */\nexport interface LaneBuild {\n readonly schemaVersion: 1;\n readonly id: string;\n readonly origin: string;\n readonly command: string;\n readonly distribution: \"local\" | \"npm\";\n readonly packageName: string;\n readonly runtimePackage: string;\n readonly runtimeTag: \"dev\";\n readonly runtimePrerelease: string;\n readonly avatarPackage: string;\n readonly creatorPackage: string;\n readonly skillTag: \"dev\" | \"latest\";\n readonly skillPrerelease: \"dev\" | \"stable\";\n readonly sourceVersion: string;\n readonly version: string;\n readonly validationScope: \"mac-config-only\" | \"windows-candidate\";\n}\ndeclare const __BUDDY_CLI_LANE_BUILD__: LaneBuild | undefined;\n\nexport const LANE_BUILD: Readonly<LaneBuild> | undefined = typeof __BUDDY_CLI_LANE_BUILD__ === \"undefined\"\n ? undefined : Object.freeze(__BUDDY_CLI_LANE_BUILD__);\nexport const CLI_COMMAND_NAME = LANE_BUILD?.command ?? \"buddy-cli-sit\";\nexport const CLI_PACKAGE_NAME = LANE_BUILD?.packageName ?? \"@my-life-buddies/cli\";\nexport const CLI_AUTO_UPDATE_AVAILABLE = !LANE_BUILD || LANE_BUILD.distribution === \"npm\";\nexport const CLI_WINDOWS_SETUP_AVAILABLE = !LANE_BUILD\n || (LANE_BUILD.distribution === \"npm\" && LANE_BUILD.validationScope === \"windows-candidate\");\nexport const CLI_MAC_SETUP_AVAILABLE = !LANE_BUILD\n || (LANE_BUILD.distribution === \"npm\" && LANE_BUILD.validationScope === \"windows-candidate\");\nexport const CLI_MAC_INSTALL_COMMAND = `npx --yes --registry=https://registry.npmjs.org/ --@my-life-buddies:registry=https://registry.npmjs.org/ --package=${CLI_PACKAGE_NAME}@dev ${CLI_COMMAND_NAME} setup`;\n// CMD runs npm's native shim even when pasted into PowerShell with Restricted policy.\n// No interpolated user paths or shell-specific environment assignments at this boundary.\nexport const CLI_WINDOWS_INSTALL_COMMAND = `cmd /d /c \"npx --yes --registry=https://registry.npmjs.org/ --@my-life-buddies:registry=https://registry.npmjs.org/ --package=${CLI_PACKAGE_NAME}@dev ${CLI_COMMAND_NAME} setup\"`;\nexport const PLATFORM_ORIGIN = LANE_BUILD?.origin ?? \"https://buddies.sit.dots.chat\";\nexport const RUNTIME_PACKAGE_NAME = LANE_BUILD?.runtimePackage ?? \"@my-life-buddies/buddy-runtime\";\nexport const RUNTIME_DIST_TAG = LANE_BUILD?.runtimeTag ?? \"dev\";\nexport const RUNTIME_SOURCE_LABEL = LANE_BUILD ? `${RUNTIME_PACKAGE_NAME} \u7684 npm ${RUNTIME_DIST_TAG}` : \"npm dev\";\nexport const AVATAR_PACKAGE_NAME = LANE_BUILD?.avatarPackage ?? \"@my-life-buddies/avatar-creator-skill\";\nexport const CREATOR_PACKAGE_NAME = LANE_BUILD?.creatorPackage ?? \"@my-life-buddies/buddy-creator-skill\";\nexport const SKILL_DIST_TAG = LANE_BUILD?.skillTag ?? \"latest\";\nexport const SKILL_VERSION_POLICY = LANE_BUILD?.skillPrerelease ?? \"stable\";\nexport const CREATOR_SOURCE_LABEL = LANE_BUILD ? `${CREATOR_PACKAGE_NAME} \u7684\u516C\u5171 npm ${SKILL_DIST_TAG}` : \"\u516C\u5171 npm latest\";\nexport const CLI_UPDATE_GUIDANCE = CLI_AUTO_UPDATE_AVAILABLE\n ? `\u6B63\u5E38\u547D\u4EE4\u5148\u8054\u7F51\u68C0\u67E5 ${CLI_PACKAGE_NAME} \u7684 dev \u7248\u672C\uFF0C\u65E7\u7248\u81EA\u52A8\u66F4\u65B0\u540E\u7EE7\u7EED\u6267\u884C\uFF1B\u5931\u8D25\u65F6\u505C\u6B62\u3002\u5E2E\u52A9\u3001--version \u548C dev stop \u79BB\u7EBF\u53EF\u7528\u3002\u53EF\u7528 ${CLI_COMMAND_NAME} update --check \u68C0\u67E5\u7248\u672C\uFF0C\u6216 ${CLI_COMMAND_NAME} update \u5355\u72EC\u66F4\u65B0\u3002`\n : \"\u672C\u5730\u6CF3\u9053\u6D4B\u8BD5\u5236\u54C1\u5DF2\u7981\u7528\u81EA\u52A8\u66F4\u65B0\u3001update \u548C setup\uFF1B\u66F4\u6362\u7248\u672C\u987B\u91CD\u65B0\u5B89\u88C5\u540C\u6CF3\u9053\u6D4B\u8BD5\u5236\u54C1\u3002\";\n\n/** A copied executable or mixed install must not silently acquire a different target identity. */\nexport function assertBuildManifest(manifest: { name?: unknown; version?: unknown; private?: unknown; bin?: unknown; buddyCliLane?: unknown; os?: unknown }, platform: NodeJS.Platform = process.platform, version = LANE_BUILD?.version): void {\n if (!LANE_BUILD) {\n if (manifest.buddyCliLane !== undefined) throw new Error(\"\u6CF3\u9053\u5236\u54C1\u4E0E\u6267\u884C\u5165\u53E3\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5\u5B8C\u6574\u6D4B\u8BD5\u5236\u54C1\u3002\");\n return;\n }\n // An npm update may change the version, but must retain the executable's target identity.\n const expected = LANE_BUILD.distribution === \"npm\" ? { ...LANE_BUILD, version, sourceVersion: version } : LANE_BUILD;\n const actual = manifest.buddyCliLane;\n if (!actual || typeof actual !== \"object\" || Array.isArray(actual)\n || Object.keys(actual).length !== Object.keys(LANE_BUILD).length\n || Object.entries(expected).some(([key, value]) => (actual as Record<string, unknown>)[key] !== value)\n || manifest.name !== CLI_PACKAGE_NAME || manifest.version !== expected.version\n || (LANE_BUILD.distribution === \"local\" ? manifest.private !== true : manifest.private !== undefined)\n || !manifest.bin || typeof manifest.bin !== \"object\"\n || Object.keys(manifest.bin).length !== 1\n || (manifest.bin as Record<string, unknown>)[LANE_BUILD.command] !== \"dist/bin/buddy.js\") {\n throw new Error(\"\u6CF3\u9053\u5236\u54C1\u6807\u8BC6\u3001\u7248\u672C\u6216\u5165\u53E3\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5\u5B8C\u6574\u6D4B\u8BD5\u5236\u54C1\uFF1B\u4E0D\u4F1A\u5207\u56DE\u516C\u5171 SIT\u3002\");\n }\n if (LANE_BUILD.validationScope === \"mac-config-only\" && platform !== \"darwin\") {\n throw new Error(\"\u6B64\u6CF3\u9053\u5236\u54C1\u4EC5\u652F\u6301 macOS\uFF08mac-config-only\uFF09\uFF1B\u7F3A\u5C11 Windows \u539F\u751F\u5236\u54C1\uFF0C\u5F3A\u5236\u5B89\u88C5\u4E5F\u4E0D\u80FD\u4F5C\u4E3A Windows \u5019\u9009\u8FD0\u884C\u3002\");\n }\n if (LANE_BUILD.distribution === \"npm\" && LANE_BUILD.validationScope === \"mac-config-only\"\n && JSON.stringify(manifest.os) !== JSON.stringify([\"darwin\"])) throw new Error(\"macOS \u6CF3\u9053 npm \u5236\u54C1\u7684 os \u5FC5\u987B\u4EC5\u4E3A darwin\u3002\");\n if (LANE_BUILD.distribution === \"npm\" && LANE_BUILD.validationScope === \"windows-candidate\"\n && JSON.stringify(manifest.os) !== JSON.stringify([\"darwin\", \"win32\"])) throw new Error(\"\u53CC\u5E73\u53F0\u6CF3\u9053 npm \u5236\u54C1\u7684 os \u5FC5\u987B\u4E3A darwin\u3001win32\u3002\");\n}\n", "import { execFile } from \"node:child_process\";\nimport { readFile, realpath, stat } from \"node:fs/promises\";\nimport { delimiter, dirname, isAbsolute, join, resolve } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nexport { npmPackageManifest } from \"../npm-registry.js\";\n\nconst execute = promisify(execFile);\nexport interface NpmExecutionOptions {\n cwd: string;\n signal?: AbortSignal;\n timeout: number;\n env?: NodeJS.ProcessEnv;\n maxBuffer?: number;\n}\nexport interface NpmDiscoveryOptions {\n execPath?: string;\n env?: NodeJS.ProcessEnv;\n platform?: NodeJS.Platform;\n}\n\n/** Locate npm belonging to this Node installation; never execute a shell shim. */\nexport async function resolveNpmEntry(options: NpmDiscoveryOptions = {}): Promise<{ node: string; entry: string }> {\n const node = options.execPath ?? process.execPath;\n const env = options.env ?? process.env;\n const platform = options.platform ?? process.platform;\n const realNode = await realpath(node);\n const candidates = new Set<string>();\n // npm/npx provide the actual Node used to launch the lifecycle command.\n if (env.npm_execpath && env.npm_node_execpath && isAbsolute(env.npm_execpath)) {\n try {\n if (await realpath(env.npm_node_execpath) === realNode) {\n candidates.add(join(dirname(await realpath(env.npm_execpath)), \"npm-cli.js\"));\n }\n } catch { /* Continue with verified installation locations. */ }\n }\n for (const bin of new Set([dirname(node), dirname(realNode)])) {\n candidates.add(join(bin, \"node_modules\", \"npm\", \"bin\", \"npm-cli.js\"));\n candidates.add(resolve(bin, \"..\", \"lib\", \"node_modules\", \"npm\", \"bin\", \"npm-cli.js\"));\n }\n const pathKey = Object.keys(env).find(key => key.toLowerCase() === \"path\");\n const paths = (env[pathKey ?? \"PATH\"] ?? \"\").split(platform === \"win32\" ? \";\" : delimiter);\n for (const directory of paths) {\n if (!directory || !isAbsolute(directory)) continue;\n try {\n if (await realpath(join(directory, platform === \"win32\" ? \"node.exe\" : \"node\")) !== realNode) continue;\n if (platform === \"win32\") candidates.add(join(directory, \"node_modules\", \"npm\", \"bin\", \"npm-cli.js\"));\n else candidates.add(await realpath(join(directory, \"npm\")));\n } catch { /* A different Node or an incomplete PATH entry is not a fallback. */ }\n }\n for (const candidate of candidates) {\n try {\n const entry = await realpath(candidate);\n const root = dirname(dirname(entry));\n const manifest = JSON.parse(await readFile(join(root, \"package.json\"), \"utf8\"));\n if (manifest.name !== \"npm\" || manifest.bin?.npm !== \"bin/npm-cli.js\") continue;\n if (await realpath(join(root, manifest.bin.npm)) !== entry || !(await stat(entry)).isFile()) continue;\n return { node, entry };\n } catch { /* Try the next location, never a bare npm command. */ }\n }\n throw new Error(\"\u627E\u4E0D\u5230\u4E0E\u5F53\u524D Node.js \u5B89\u88C5\u5339\u914D\u7684 npm \u5165\u53E3\u3002\u8BF7\u4FEE\u590D\u6216\u91CD\u65B0\u5B89\u88C5\u5F53\u524D Node.js\uFF0C\u518D\u91CD\u8BD5\uFF1B\u672A\u8C03\u7528\u5176\u4ED6 Node \u7684 npm\u3002\");\n}\n\n/** All arguments remain separate, including Unicode and shell metacharacters in paths. */\nexport async function runNpm(args: readonly string[], options: NpmExecutionOptions): Promise<{ stdout: string; stderr: string }> {\n options.signal?.throwIfAborted();\n const npm = await resolveNpmEntry({ env: options.env });\n return execute(npm.node, [npm.entry, ...args], {\n ...options, encoding: \"utf8\", maxBuffer: options.maxBuffer ?? 4 * 1024 * 1024,\n shell: false, windowsHide: true,\n });\n}\n", "const REGISTRY = \"https://registry.npmjs.org/\";\n\n/** Resolve tags and exact releases from the same document npm uses for installs. */\nexport async function npmPackageManifest(name: string, selector: string, options: {\n fetch?: typeof globalThis.fetch;\n signal?: AbortSignal;\n timeoutMs?: number;\n} = {}): Promise<Record<string, any>> {\n options.signal?.throwIfAborted();\n const timeout = AbortSignal.timeout(options.timeoutMs ?? 10_000);\n const signal = options.signal ? AbortSignal.any([options.signal, timeout]) : timeout;\n const response = await (options.fetch ?? globalThis.fetch)(`${REGISTRY}${encodeURIComponent(name)}`, {\n signal, headers: { Accept: \"application/json\" }, redirect: \"error\",\n });\n if (!response.ok) throw new Error(`npm HTTP ${response.status}`);\n const text = await response.text();\n if (text.length > 8 * 1024 * 1024) throw new Error(\"npm \u5143\u6570\u636E\u8FC7\u5927\");\n const metadata = JSON.parse(text);\n if (metadata?.name !== name) throw new Error(\"npm \u8FD4\u56DE\u7684\u5305\u540D\u4E0D\u5339\u914D\");\n const version = Object.hasOwn(metadata[\"dist-tags\"] ?? {}, selector) ? metadata[\"dist-tags\"][selector] : selector;\n const manifest = typeof version === \"string\" && Object.hasOwn(metadata.versions ?? {}, version)\n ? metadata.versions[version] : undefined;\n if (!manifest || manifest.name !== name || manifest.version !== version) {\n throw new Error(`npm ${selector} \u672A\u8FD4\u56DE\u6B64\u5305\u7684\u51C6\u786E\u7248\u672C`);\n }\n return manifest;\n}\n", "import { machine, release, version } from \"node:os\";\n\nexport class UnsupportedDeveloperPlatformError extends Error {\n constructor(readonly platform: NodeJS.Platform, message?: string) {\n super(message ?? `\u642D\u642D CLI \u652F\u6301 macOS\u3001Windows 10 22H2 x64 \u548C Windows 11 x64/ARM64\uFF0C\u5F53\u524D\u7CFB\u7EDF\u662F ${platform}\u3002`);\n this.name = \"UnsupportedDeveloperPlatformError\";\n }\n}\n\nexport interface DeveloperHostInfo {\n arch?: string;\n osRelease?: string;\n osVersion?: string;\n hostMachine?: string;\n nodeVersion?: string;\n}\n\n/** Check the actual process architecture separately from the host processor. */\nexport function assertSupportedDeveloperPlatform(platform: NodeJS.Platform = process.platform, info: DeveloperHostInfo = {}): void {\n const arch = info.arch ?? process.arch;\n if (![\"darwin\", \"win32\"].includes(platform)) throw new UnsupportedDeveloperPlatformError(platform);\n if (![\"x64\", \"arm64\"].includes(arch)) {\n throw new UnsupportedDeveloperPlatformError(platform, `\u642D\u642D CLI \u9700\u8981 x64 \u6216 ARM64 Node.js\uFF0C\u5F53\u524D\u8FDB\u7A0B\u67B6\u6784\u662F ${arch}\u3002`);\n }\n const node = info.nodeVersion ?? process.versions.node;\n if (!/^\\d+\\./u.test(node) || Number(node.split(\".\")[0]) < 24) {\n throw new UnsupportedDeveloperPlatformError(platform, \"\u642D\u642D CLI \u9700\u8981 Node.js 24 \u6216\u66F4\u9AD8\u7248\u672C\u3002\");\n }\n if (platform === \"darwin\") return;\n const osRelease = info.osRelease ?? release();\n const osVersion = info.osVersion ?? version();\n const [major, minor, build] = osRelease.split(\".\").map(Number);\n if (major !== 10 || minor !== 0 || !Number.isSafeInteger(build) || build! < 19045 || /Server|LTSC|LTSB/iu.test(osVersion)) {\n throw new UnsupportedDeveloperPlatformError(platform, `\u642D\u642D CLI \u9700\u8981 Windows 10 22H2\uFF0819045\uFF09\u6216 Windows 11 \u684C\u9762\u7CFB\u7EDF\uFF0C\u5F53\u524D\u7248\u672C\u662F ${osRelease}\u3002`);\n }\n const host = (info.hostMachine ?? machine()).toLowerCase();\n if (arch === \"arm64\" && build! < 22000 || /^(arm64|aarch64)$/u.test(host) && arch !== \"arm64\") {\n throw new UnsupportedDeveloperPlatformError(platform, \"Windows ARM64 \u9700\u8981 Windows 11 \u548C\u539F\u751F ARM64 Node.js\uFF0C\u8BF7\u5B89\u88C5\u5339\u914D\u7684 Node.js \u7248\u672C\u3002\");\n }\n}\n", "import { spawn } from \"node:child_process\";\nimport { posix, win32 } from \"node:path\";\n\nimport { windowsOperation, type WindowsCommand, type WindowsCommandRunner } from \"./windows.js\";\n\nexport interface OpenExternalTargetOptions {\n readonly platform?: NodeJS.Platform;\n readonly env?: NodeJS.ProcessEnv;\n readonly runner?: WindowsCommandRunner;\n}\n\nfunction externalTarget(target: string | URL, platform: NodeJS.Platform): string {\n const value = target instanceof URL ? target.href : target;\n if (!value || /[\\u0000-\\u001f\\u007f]/u.test(value)) throw new TypeError(\"\u53EA\u80FD\u6253\u5F00 HTTP(S) \u5730\u5740\u6216\u672C\u5730\u6587\u4EF6\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002\");\n if (platform === \"win32\"\n ? /^[A-Za-z]:[\\\\/]/u.test(value) && win32.isAbsolute(value)\n : value.startsWith(\"/\") && !value.startsWith(\"//\") && posix.isAbsolute(value)) return value;\n let url: URL;\n try { url = new URL(value); } catch { throw new TypeError(\"\u53EA\u80FD\u6253\u5F00 HTTP(S) \u5730\u5740\u6216\u672C\u5730\u6587\u4EF6\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002\"); }\n if (url.protocol !== \"http:\" && url.protocol !== \"https:\") throw new TypeError(\"\u53EA\u80FD\u6253\u5F00 HTTP(S) \u5730\u5740\u6216\u672C\u5730\u6587\u4EF6\u7684\u7EDD\u5BF9\u8DEF\u5F84\u3002\");\n return url.href;\n}\n\nasync function runMacOpen(command: WindowsCommand): Promise<{ code: number; stdout: string; stderr: string }> {\n return await new Promise((resolve, reject) => {\n const child = spawn(command.command, [...command.args], { shell: false, stdio: \"ignore\" });\n child.once(\"error\", reject);\n child.once(\"close\", code => resolve({ code: code ?? 1, stdout: \"\", stderr: \"\" }));\n });\n}\n\n/** Open a validated URL or local file without interpreting the target as shell code. */\nexport async function openExternalTarget(target: string | URL, options: OpenExternalTargetOptions = {}): Promise<void> {\n const platform = options.platform ?? process.platform;\n if (platform !== \"darwin\" && platform !== \"win32\") throw new Error(\"\u6253\u5F00\u6D4F\u89C8\u5668\u6216\u6587\u4EF6\u4EC5\u652F\u6301 macOS \u548C Windows\u3002\");\n const value = externalTarget(target, platform);\n if (platform === \"win32\") {\n await windowsOperation({ operation: \"open\", target: value }, { runner: options.runner, env: options.env });\n return;\n }\n const result = await (options.runner ?? runMacOpen)({ command: \"open\", args: [value] });\n if (result.code !== 0) throw new Error(\"\u65E0\u6CD5\u6253\u5F00\u6D4F\u89C8\u5668\u6216\u6587\u4EF6\uFF0C\u8BF7\u624B\u52A8\u6253\u5F00\u7EC8\u7AEF\u4E2D\u663E\u793A\u7684\u5730\u5740\u6216\u8DEF\u5F84\u3002\");\n}\n", "import { spawn } from \"node:child_process\";\nimport { win32 } from \"node:path\";\n\nexport interface WindowsCommand { command: string; args: readonly string[]; input?: string; env?: NodeJS.ProcessEnv }\nexport interface WindowsCommandResult { code: number; stdout: string; stderr: string }\nexport type WindowsCommandRunner = (command: WindowsCommand) => Promise<WindowsCommandResult>;\n\n// This script is constant. Paths, URLs and secrets travel only through UTF-8 stdin.\nconst SCRIPT = String.raw`\n$ErrorActionPreference = 'Stop'\n[Console]::InputEncoding = New-Object System.Text.UTF8Encoding($false)\n[Console]::OutputEncoding = New-Object System.Text.UTF8Encoding($false)\n$sid = [Security.Principal.WindowsIdentity]::GetCurrent().User\nfunction PathAttributes([string]$path) {\n try { return [IO.File]::GetAttributes($path) }\n catch [IO.FileNotFoundException] { return $null }\n catch [IO.DirectoryNotFoundException] { return $null }\n}\nfunction SafePath([string]$path) {\n if ($path -notmatch '^[A-Za-z]:[\\\\/]' -or $path -match '[\\x00-\\x1f\\x7f]' -or $path.Substring(2).Contains(':')) { throw 'INVALID_PATH' }\n $full = [IO.Path]::GetFullPath($path)\n $drive = New-Object IO.DriveInfo([IO.Path]::GetPathRoot($full))\n if ($drive.DriveType -eq [IO.DriveType]::Network) { throw 'NETWORK_PATH' }\n $part = $full\n while ($part) {\n $attributes = PathAttributes $part\n if ($null -ne $attributes -and ($attributes -band [IO.FileAttributes]::ReparsePoint) -ne 0) { throw 'LINK_PATH' }\n if ($part -eq [IO.Path]::GetPathRoot($part)) { break }\n $parent = [IO.Path]::GetDirectoryName($part.TrimEnd('\\'))\n if ($parent -eq $part) { break }; $part = $parent\n }\n return $full\n}\nfunction PrivateAcl([bool]$directory) {\n if ($directory) { $acl = New-Object Security.AccessControl.DirectorySecurity }\n else { $acl = New-Object Security.AccessControl.FileSecurity }\n $acl.SetOwner($sid); $acl.SetAccessRuleProtection($true, $false)\n if ($directory) {\n $rule = New-Object Security.AccessControl.FileSystemAccessRule($sid, 'FullControl', 'ContainerInherit,ObjectInherit', 'None', 'Allow')\n } else { $rule = New-Object Security.AccessControl.FileSystemAccessRule($sid, 'FullControl', 'Allow') }\n $acl.AddAccessRule($rule); return $acl\n}\nfunction CheckOwner([string]$path) {\n $acl = Get-Acl -LiteralPath $path\n if ($acl.GetOwner([Security.Principal.SecurityIdentifier]).Value -ne $sid.Value) { throw 'FOREIGN_OWNER' }\n return $acl\n}\nfunction CheckFileLinks([string]$path) {\n $attributes = PathAttributes $path\n if ($null -eq $attributes -or ($attributes -band [IO.FileAttributes]::Directory) -ne 0) { return }\n if (!('BuddyPrivateFileInfo' -as [type])) {\n Add-Type -TypeDefinition @'\nusing System;\nusing System.IO;\nusing System.Runtime.InteropServices;\nusing Microsoft.Win32.SafeHandles;\npublic static class BuddyPrivateFileInfo {\n [StructLayout(LayoutKind.Sequential)]\n private struct Info {\n public uint Attributes;\n public System.Runtime.InteropServices.ComTypes.FILETIME Created, Accessed, Written;\n public uint Volume, SizeHigh, SizeLow, Links, IndexHigh, IndexLow;\n }\n [DllImport(\"kernel32.dll\", SetLastError = true)]\n private static extern bool GetFileInformationByHandle(SafeFileHandle file, out Info info);\n public static uint Links(string path) {\n using (var file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete)) {\n Info info;\n if (!GetFileInformationByHandle(file.SafeFileHandle, out info)) throw new IOException(\"FILE_INFO_FAILED\");\n return info.Links;\n }\n }\n public static string State(string path) {\n using (var file = new FileStream(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite | FileShare.Delete)) {\n Info info, after;\n if (!GetFileInformationByHandle(file.SafeFileHandle, out info) || info.Links != 1) throw new IOException(\"FILE_INFO_FAILED\");\n byte[] digest;\n using (var hash = System.Security.Cryptography.SHA256.Create()) digest = hash.ComputeHash(file);\n if (!GetFileInformationByHandle(file.SafeFileHandle, out after) || after.Links != 1 || info.SizeHigh != after.SizeHigh || info.SizeLow != after.SizeLow\n || !info.Written.Equals(after.Written)) throw new IOException(\"CONCURRENT_CHANGE\");\n return info.Volume + \":\" + info.IndexHigh + \":\" + info.IndexLow + \":\" + BitConverter.ToString(digest);\n }\n }\n}\n'@\n }\n if ([BuddyPrivateFileInfo]::Links($path) -ne 1) { throw 'LINK_PATH' }\n}\nfunction CheckPrivate([string]$path) {\n $path = SafePath $path\n if ($null -eq (PathAttributes $path)) { throw 'ENOENT' }\n CheckFileLinks $path\n $acl = CheckOwner $path\n if (!$acl.AreAccessRulesProtected) { throw 'UNSAFE_ACL' }\n $allowed = $false\n foreach ($rule in $acl.GetAccessRules($true, $true, [Security.Principal.SecurityIdentifier])) {\n if ($rule.AccessControlType -eq 'Allow') {\n if ($rule.IdentityReference.Value -ne $sid.Value) { throw 'UNSAFE_ACL' }\n if (($rule.FileSystemRights -band [Security.AccessControl.FileSystemRights]::FullControl) -eq [Security.AccessControl.FileSystemRights]::FullControl) { $allowed = $true }\n }\n }\n if (!$allowed) { throw 'UNSAFE_ACL' }\n}\nfunction PrivateDirectory([string]$path) {\n $path = SafePath $path\n $attributes = PathAttributes $path\n if ($null -ne $attributes) {\n if (($attributes -band [IO.FileAttributes]::Directory) -eq 0) { throw 'INVALID_PATH' }\n $null = CheckOwner $path\n [IO.Directory]::SetAccessControl($path, (PrivateAcl $true))\n } else {\n $parent = [IO.Path]::GetDirectoryName($path)\n if ($null -eq (PathAttributes $parent)) { PrivateDirectory $parent }\n $null = [IO.Directory]::CreateDirectory($path, (PrivateAcl $true))\n }\n CheckPrivate $path\n}\nfunction AtomicPrivateWrite([string]$path, [byte[]]$bytes) {\n $path = SafePath $path\n $attributes = PathAttributes $path\n if ($null -ne $attributes) {\n if (($attributes -band [IO.FileAttributes]::Directory) -ne 0) { throw 'INVALID_PATH' }\n $null = CheckOwner $path; CheckFileLinks $path\n }\n $temporary = $path + '.' + [Guid]::NewGuid().ToString('N') + '.tmp'\n $stream = $null\n try {\n $stream = New-Object IO.FileStream($temporary, [IO.FileMode]::CreateNew, [Security.AccessControl.FileSystemRights]::Write, [IO.FileShare]::None, 4096, [IO.FileOptions]::WriteThrough, (PrivateAcl $false))\n $stream.Write($bytes, 0, $bytes.Length); $stream.Flush($true); $stream.Dispose(); $stream = $null\n $null = SafePath $path\n if ($null -ne (PathAttributes $path)) {\n $null = CheckOwner $path; CheckFileLinks $path\n # Replace preserves the destination ACL, so secure it before replacement.\n [IO.File]::SetAccessControl($path, (PrivateAcl $false))\n # PowerShell 5.1 binds $null to an empty string for this .NET parameter.\n $before = [BuddyPrivateFileInfo]::State($path)\n $replacement = [BuddyPrivateFileInfo]::State($temporary)\n for ($attempt = 0; ; $attempt++) {\n try { [IO.File]::Replace($temporary, $path, [System.Management.Automation.Language.NullString]::Value); break }\n catch {\n # Only 1175 guarantees both original names remain. Never retry 1176/1177.\n if ($_.Exception.GetBaseException().HResult -ne -2147023721 -or $attempt -ge 4) { throw }\n Start-Sleep -Milliseconds (25 * (1 -shl $attempt))\n CheckPrivate $path; CheckPrivate $temporary\n if ([BuddyPrivateFileInfo]::State($path) -cne $before -or [BuddyPrivateFileInfo]::State($temporary) -cne $replacement) { throw 'CONCURRENT_CHANGE' }\n }\n }\n } else { [IO.File]::Move($temporary, $path) }\n CheckPrivate $path\n } finally {\n if ($stream) { $stream.Dispose() }\n [IO.File]::Delete($temporary)\n }\n}\nfunction Credential($request) {\n if ([string]$request.scope -cnotmatch '^[a-f0-9]{64}$') { throw 'INVALID_SCOPE' }\n $directory = SafePath $request.directory\n $application = [IO.Path]::GetDirectoryName($directory)\n $path = Join-Path $directory ($request.scope + '.json')\n $null = SafePath $path\n if ($request.operation -eq 'credential-save') { PrivateDirectory $application; PrivateDirectory $directory }\n elseif ($null -eq (PathAttributes $directory)) { return $null }\n if (((PathAttributes $directory) -band [IO.FileAttributes]::Directory) -eq 0) { throw 'INVALID_PATH' }\n CheckPrivate $directory\n CheckPrivate $application\n $attributes = PathAttributes $path\n if ($null -ne $attributes -and ($attributes -band [IO.FileAttributes]::Directory) -ne 0) { throw 'INVALID_PATH' }\n if ($request.operation -eq 'credential-clear') {\n if ($null -ne $attributes) { CheckPrivate $path; [IO.File]::Delete($path) }\n return $null\n }\n Add-Type -AssemblyName System.Security\n $entropy = [Convert]::FromBase64String($request.entropy)\n if ($request.operation -eq 'credential-save') {\n $plain = [Convert]::FromBase64String($request.data)\n if ($plain.Length -eq 0 -or $plain.Length -gt 32768) { throw 'CREDENTIAL_CORRUPT' }\n $encrypted = [Security.Cryptography.ProtectedData]::Protect($plain, $entropy, [Security.Cryptography.DataProtectionScope]::CurrentUser)\n $record = @{version=1; scope=$request.scope; ciphertext=[Convert]::ToBase64String($encrypted)} | ConvertTo-Json -Compress\n AtomicPrivateWrite $path ([Text.Encoding]::UTF8.GetBytes($record))\n return $null\n }\n if ($null -eq $attributes) { return $null }\n CheckPrivate $path\n if ((Get-Item -LiteralPath $path).Length -gt 65536) { throw 'CREDENTIAL_CORRUPT' }\n try {\n $record = (New-Object Text.UTF8Encoding($false, $true)).GetString([IO.File]::ReadAllBytes($path)) | ConvertFrom-Json\n if ($record.version -ne 1 -or $record.scope -cne $request.scope -or !($record.ciphertext -is [string])) { throw 'CREDENTIAL_CORRUPT' }\n $plain = [Security.Cryptography.ProtectedData]::Unprotect([Convert]::FromBase64String($record.ciphertext), $entropy, [Security.Cryptography.DataProtectionScope]::CurrentUser)\n if ($plain.Length -eq 0 -or $plain.Length -gt 32768) { throw 'CREDENTIAL_CORRUPT' }\n return [Convert]::ToBase64String($plain)\n } catch { throw 'CREDENTIAL_CORRUPT' }\n}\nfunction PrependUserPath([string]$old, [string]$path) {\n $target = $path.TrimEnd('\\')\n $entries = @($old -split ';' | Where-Object { $_ -and $_.Trim().Trim('\"').TrimEnd('\\', '/').Replace('/', '\\') -ine $target })\n return ((@($path) + $entries) -join ';')\n}\ntry {\n $request = [Console]::In.ReadToEnd() | ConvertFrom-Json\n $value = $null\n switch ($request.operation) {\n 'private-directory' { PrivateDirectory $request.path }\n 'private-check' { CheckPrivate $request.path }\n 'safe-path' { $null = SafePath $request.path }\n 'private-write' { AtomicPrivateWrite $request.path ([Convert]::FromBase64String($request.data)) }\n 'credential-save' { $value = Credential $request }\n 'credential-load' { $value = Credential $request }\n 'credential-clear' { $value = Credential $request }\n 'open' {\n $start = New-Object Diagnostics.ProcessStartInfo\n $start.FileName = [string]$request.target; $start.UseShellExecute = $true\n $null = [Diagnostics.Process]::Start($start)\n }\n 'user-path' {\n $path = SafePath $request.path\n if ($path.Contains(';')) { throw 'INVALID_PATH' }\n $old = [Environment]::GetEnvironmentVariable('Path', 'User')\n [Environment]::SetEnvironmentVariable('Path', (PrependUserPath $old $path), 'User')\n try {\n Add-Type -TypeDefinition @'\nusing System;\nusing System.Runtime.InteropServices;\npublic static class BuddyEnvironmentNotify {\n [DllImport(\"user32.dll\", CharSet = CharSet.Unicode, SetLastError = true)]\n public static extern IntPtr SendMessageTimeout(IntPtr window, uint message, UIntPtr wParam, string lParam, uint flags, uint timeout, out UIntPtr result);\n}\n'@\n $broadcastResult = [UIntPtr]::Zero\n $notified = [BuddyEnvironmentNotify]::SendMessageTimeout([IntPtr]65535, 26, [UIntPtr]::Zero, 'Environment', 34, 1000, [ref]$broadcastResult)\n if ($notified -eq [IntPtr]::Zero) { throw 'ENVIRONMENT_BROADCAST_FAILED' }\n } catch { throw 'ENVIRONMENT_BROADCAST_FAILED' }\n }\n default { throw 'INVALID_OPERATION' }\n }\n [Console]::Out.Write((@{ok=$true; value=$value} | ConvertTo-Json -Compress))\n} catch {\n $code = if ($_.Exception.Message -eq 'ENOENT') { 'ENOENT' } elseif ($_.Exception.Message -eq 'CREDENTIAL_CORRUPT') { 'EBADMSG' } elseif ($_.Exception.Message -eq 'ENVIRONMENT_BROADCAST_FAILED') { 'ERELOGIN' } else { 'EPERM' }\n # Exception text can contain input. Never send it to logs or the terminal.\n [Console]::Out.Write((@{ok=$false; code=$code} | ConvertTo-Json -Compress)); exit 1\n}\n`;\n\nexport function windowsCommand(request: Record<string, unknown>, env: NodeJS.ProcessEnv = process.env): WindowsCommand {\n if (request.operation === \"user-path\" && (typeof request.path !== \"string\" || request.path.includes(\";\"))) {\n throw new Error(\"Windows PATH \u76EE\u5F55\u4E0D\u80FD\u5305\u542B\u5206\u53F7\uFF0C\u8BF7\u9009\u62E9\u6709\u6548\u7684\u672C\u5730\u5B89\u88C5\u76EE\u5F55\u3002\");\n }\n // This constant helper's here-strings are C#, so indentation, blank lines and\n // PowerShell comments can be omitted without spending CreateProcessW's budget.\n const script = SCRIPT.replace(/^[ \\t]+/gmu, \"\").replace(/^#.*\\r?\\n/gmu, \"\").replace(/^\\r?\\n/gmu, \"\");\n return windowsScriptCommand(script, request, env);\n}\n\n/** Keep platform helpers constant; pass all variable data through UTF-8 stdin. */\nexport function windowsScriptCommand(script: string, request: Record<string, unknown>, env: NodeJS.ProcessEnv = process.env): WindowsCommand {\n const systemRoot = Object.entries(env).find(([key, value]) => key.toLowerCase() === \"systemroot\" && value)?.[1];\n if (!systemRoot || !/^[A-Za-z]:[\\\\/]/u.test(systemRoot)) throw new Error(\"\u65E0\u6CD5\u5B9A\u4F4D Windows PowerShell\uFF0C\u8BF7\u68C0\u67E5 SystemRoot\u3002\");\n const powershellHome = win32.join(systemRoot, \"System32\", \"WindowsPowerShell\", \"v1.0\");\n // The helper runs Windows PowerShell 5.1, even when the caller is hosted by\n // PowerShell 7. Never let its Security cmdlets resolve from host/user modules.\n // Windows environment names are case-insensitive; retaining another spelling\n // lets Node choose the wrong value when constructing the child environment.\n const helperEnv = Object.fromEntries(Object.entries(env).filter(([key]) => ![\"psmodulepath\", \"systemroot\"].includes(key.toLowerCase())));\n helperEnv.SystemRoot = systemRoot;\n helperEnv.PSModulePath = win32.join(powershellHome, \"Modules\");\n const command: WindowsCommand = {\n command: win32.join(powershellHome, \"powershell.exe\"),\n args: [\"-NoLogo\", \"-NoProfile\", \"-NonInteractive\", \"-EncodedCommand\", Buffer.from(script, \"utf16le\").toString(\"base64\")],\n input: JSON.stringify(request),\n env: helperEnv,\n };\n // CreateProcessW allows 32767 UTF-16 code units including the terminator.\n // Budget for quoting/escaping as well as the executable, leaving 2767 units spare.\n const commandLineBound = 1 + [command.command, ...command.args].reduce((size, part) => size + part.length + (part.match(/[\\\\\"]/gu)?.length ?? 0) + 3, 0);\n if (commandLineBound > 30000) throw new Error(\"Windows \u7CFB\u7EDF\u64CD\u4F5C\u547D\u4EE4\u8D85\u51FA\u5B89\u5168\u957F\u5EA6\uFF0C\u8BF7\u66F4\u65B0\u6216\u4FEE\u590D CLI \u5B89\u88C5\u3002\");\n return command;\n}\n\nexport async function runWindowsCommand(command: WindowsCommand): Promise<WindowsCommandResult> {\n return await new Promise((resolve, reject) => {\n const child = spawn(command.command, [...command.args], { shell: false, windowsHide: true, env: command.env, stdio: [\"pipe\", \"pipe\", \"pipe\"] });\n const output: Buffer[] = []; let size = 0; let failure: Error | undefined;\n const timer = setTimeout(() => { failure = new Error(\"Windows \u7CFB\u7EDF\u64CD\u4F5C\u8D85\u65F6\uFF0C\u8BF7\u68C0\u67E5 PowerShell \u662F\u5426\u88AB\u7CFB\u7EDF\u7B56\u7565\u963B\u6B62\u3002\"); child.kill(); }, 15_000);\n child.stdout.on(\"data\", (chunk: Buffer) => { size += chunk.length; if (size > 2 * 1024 * 1024) { failure = new Error(\"Windows \u7CFB\u7EDF\u64CD\u4F5C\u8FD4\u56DE\u8FC7\u591A\u6570\u636E\u3002\"); child.kill(); } else output.push(chunk); });\n child.stderr.resume();\n child.stdin.on(\"error\", () => undefined);\n child.once(\"error\", () => { clearTimeout(timer); reject(new Error(\"\u65E0\u6CD5\u8FD0\u884C Windows PowerShell\uFF0C\u8BF7\u68C0\u67E5\u7CFB\u7EDF\u7B56\u7565\u3002\")); });\n child.once(\"close\", code => { clearTimeout(timer); if (failure) reject(failure); else resolve({ code: code ?? 1, stdout: Buffer.concat(output).toString(\"utf8\"), stderr: \"\" }); });\n child.stdin.end(command.input, \"utf8\");\n });\n}\n\nexport async function windowsOperation(request: Record<string, unknown>, options: { runner?: WindowsCommandRunner; env?: NodeJS.ProcessEnv } = {}): Promise<unknown> {\n const command = windowsCommand(request, options.env);\n let result: WindowsCommandResult;\n try { result = await (options.runner ?? runWindowsCommand)(command); }\n catch (cause) {\n if (request.operation === \"user-path\") throw new Error(\"\u65E0\u6CD5\u786E\u8BA4\u7528\u6237 PATH \u66F4\u65B0\u4E0E\u684C\u9762\u901A\u77E5\u662F\u5426\u5B8C\u6210\uFF1B\u8BF7\u91CD\u65B0\u767B\u5F55 Windows \u540E\u68C0\u67E5 CLI\uFF0C\u4ECD\u4E0D\u53EF\u7528\u65F6\u91CD\u65B0\u8FD0\u884C setup\u3002\");\n throw cause;\n }\n let response: { ok?: boolean; value?: unknown; code?: string };\n try { response = JSON.parse(result.stdout.replace(/^\\uFEFF/u, \"\")); } catch { response = {}; }\n if (result.code !== 0 || response.ok !== true) {\n if (response.code === \"ERELOGIN\") throw Object.assign(new Error(\"\u7528\u6237 PATH \u5DF2\u4FDD\u5B58\uFF0C\u4F46\u672A\u80FD\u901A\u77E5 Windows \u684C\u9762\uFF1B\u8BF7\u91CD\u65B0\u767B\u5F55 Windows \u540E\u4F7F\u7528 CLI\u3002\"), { code: \"ERELOGIN\" });\n throw Object.assign(new Error(\"Windows \u5B89\u5168\u64CD\u4F5C\u5931\u8D25\uFF0C\u8BF7\u68C0\u67E5\u5F53\u524D\u7528\u6237\u7684\u6587\u4EF6\u6743\u9650\u548C PowerShell \u7CFB\u7EDF\u7B56\u7565\u3002\"), { code: response.code === \"ENOENT\" || response.code === \"EBADMSG\" ? response.code : \"EPERM\" });\n }\n return response.value;\n}\n", "import { constants } from \"node:fs\";\nimport { chmod, lstat, mkdir, open, rename, unlink } from \"node:fs/promises\";\nimport { randomUUID } from \"node:crypto\";\nimport { isAbsolute } from \"node:path\";\nimport { windowsOperation } from \"./windows.js\";\n\n/** Windows checks every ancestor for reparse points; POSIX rejects a linked target. */\nexport async function assertUnlinkedPath(path: string): Promise<void> {\n if (!isAbsolute(path)) throw new Error(\"\u79C1\u5BC6\u6587\u4EF6\u5FC5\u987B\u4F7F\u7528\u7EDD\u5BF9\u8DEF\u5F84\u3002\");\n if (process.platform === \"win32\") await windowsOperation({ operation: \"safe-path\", path });\n const stat = await lstat(path).catch(cause => { if (cause.code !== \"ENOENT\") throw cause; return undefined; });\n if (stat && (stat.isSymbolicLink() || stat.isFile() && stat.nlink !== 1)) throw new Error(\"\u79C1\u5BC6\u6587\u4EF6\u4E0D\u80FD\u4F7F\u7528\u7B26\u53F7\u94FE\u63A5\u3001\u76EE\u5F55\u8054\u63A5\u6216\u786C\u94FE\u63A5\u3002\");\n}\n\nexport async function assertPrivatePath(path: string): Promise<void> {\n await assertUnlinkedPath(path);\n const stat = await lstat(path);\n if (!stat.isFile() && !stat.isDirectory()) throw new Error(\"\u79C1\u5BC6\u8DEF\u5F84\u5FC5\u987B\u662F\u666E\u901A\u6587\u4EF6\u6216\u76EE\u5F55\u3002\");\n if (process.platform === \"win32\") await windowsOperation({ operation: \"private-check\", path });\n else if (stat.uid !== process.getuid?.() || (stat.mode & 0o077) !== 0) throw new Error(\"\u79C1\u5BC6\u8DEF\u5F84\u5FC5\u987B\u5F52\u5F53\u524D\u7528\u6237\u6240\u6709\uFF0C\u4E14\u4EC5\u5F53\u524D\u7528\u6237\u53EF\u8BBF\u95EE\u3002\");\n}\n\nexport async function ensurePrivateDirectory(path: string): Promise<void> {\n await assertUnlinkedPath(path);\n if (process.platform === \"win32\") await windowsOperation({ operation: \"private-directory\", path });\n else {\n await mkdir(path, { recursive: true, mode: 0o700 });\n const stat = await lstat(path);\n if (!stat.isDirectory() || stat.uid !== process.getuid?.()) throw new Error(\"\u79C1\u5BC6\u76EE\u5F55\u4E0D\u5C5E\u4E8E\u5F53\u524D\u7528\u6237\u3002\");\n await chmod(path, 0o700);\n }\n await assertPrivatePath(path);\n}\n\n/** Create with restricted access before writing any bytes, then atomically replace. */\nexport async function writePrivateFile(path: string, data: string | Uint8Array): Promise<void> {\n await assertUnlinkedPath(path);\n if (process.platform === \"win32\") {\n await windowsOperation({ operation: \"private-write\", path, data: Buffer.from(data).toString(\"base64\") });\n } else {\n const temporary = `${path}.${randomUUID()}.tmp`;\n let file;\n try {\n file = await open(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600);\n await file.writeFile(data); await file.sync(); await file.close(); file = undefined;\n await assertUnlinkedPath(path);\n await rename(temporary, path);\n } finally { await file?.close(); await unlink(temporary).catch(cause => { if (cause.code !== \"ENOENT\") throw cause; }); }\n }\n await assertPrivatePath(path);\n}\n"],
5
+ "mappings": ";AAAA,4CAAC,eAAgB,GAAE,IAAK,sBAAqB,QAAS,oEAAmE,SAAU,0BAAyB,gBAAiB,+CAA8C,YAAa,OAAM,mBAAoB,OAAM,eAAgB,yCAAwC,gBAAiB,wCAAuC,UAAW,UAAS,iBAAkB,UAAS,eAAgB,gBAAe,cAAe,OAAM,aAAc,qCAAoC,SAAU,gBAAe,iBAAkB,oBAAmB;;;ACqBpkB,IAAM,aAA8C,OAAO,wCAA6B,cAC3F,SAAY,OAAO,OAAO,mCAAwB;AAC/C,IAAM,mBAAmB,YAAY,WAAW;AAChD,IAAM,mBAAmB,YAAY,eAAe;AACpD,IAAM,4BAA4B,CAAC,cAAc,WAAW,iBAAiB;AAC7E,IAAM,8BAA8B,CAAC,cACtC,WAAW,i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