(
manifest: NativeAssetManifest,
options: NativeAssetOptions = {},
)
| 156 | } |
| 157 | |
| 158 | export function getNativeAssetCacheRoot( |
| 159 | manifest: NativeAssetManifest, |
| 160 | options: NativeAssetOptions = {}, |
| 161 | ): string { |
| 162 | const version = sanitizeSegment(options.version ?? KIMI_BUILD_INFO.version ?? 'dev'); |
| 163 | const manifestHash = sha256(JSON.stringify(manifest)); |
| 164 | return join( |
| 165 | getNativeCacheBase(options), |
| 166 | 'native', |
| 167 | version, |
| 168 | sanitizeSegment(manifest.target), |
| 169 | manifestHash, |
| 170 | ); |
| 171 | } |
| 172 | |
| 173 | function readFileSha256(path: string): string | null { |
| 174 | try { |
no test coverage detected