Update car monitor asset reload and telemetry

This commit is contained in:
seo committed 2026-08-12 21:35:21 +09:00
1 parent 6f965f8f3e
commit 5d75ad81bd
8 files changed
+4334 -4366

No files matched your search

+2 -3
View File
@@ -59,12 +59,11 @@ $assets = [];
foreach (collect_asset_files($root, $scanRoots) as $fullPath) {
$relativePath = ltrim(str_replace($rootPath ?: $root, '', $fullPath), DIRECTORY_SEPARATOR);
$fileHash = is_readable($fullPath) ? (hash_file('sha256', $fullPath) ?: 'hash-failed') : 'unreadable';
$fileVersion = (string)filemtime($fullPath) . '-' . substr($fileHash, 0, 10);
$publicPath = '/car/' . str_replace(DIRECTORY_SEPARATOR, '/', $relativePath);
$fileVersion = substr($fileHash, 0, 16);
$publicPath = '/custom/car/' . str_replace(DIRECTORY_SEPARATOR, '/', $relativePath);
$fingerprints[] = implode('|', [
ltrim($publicPath, '/'),
(string)filesize($fullPath),
(string)filemtime($fullPath),
$fileHash,
]);
$assets[$publicPath] = $fileVersion;