feat: publish av-tools 0.2.0
This commit is contained in:
@@ -16,6 +16,7 @@ const repositoryRoot = path.resolve(
|
||||
path.dirname(fileURLToPath(import.meta.url)),
|
||||
'..'
|
||||
);
|
||||
const reviewedCoreBuildId = '0.12.10-reviewed-stack5m.1';
|
||||
|
||||
function consumeValue(argumentsList, index, option) {
|
||||
const value = argumentsList[index + 1];
|
||||
@@ -179,12 +180,21 @@ export function inspectPortalHeaders(configuration) {
|
||||
'The config does not explicitly map `.wasm` to application/wasm; verify the pinned image mime.types response.'
|
||||
);
|
||||
}
|
||||
if (
|
||||
!configuration.includes('vendor/ffmpeg/0\\.12\\.10') &&
|
||||
!configuration.includes('vendor/ffmpeg/0.12.10')
|
||||
) {
|
||||
const immutableCoreRule = configuration
|
||||
.split(/\r?\n/u)
|
||||
.find(
|
||||
(line) =>
|
||||
/vendor\/ffmpeg\//iu.test(line) &&
|
||||
/ffmpeg-core/iu.test(line) &&
|
||||
/max-age=31536000/iu.test(line) &&
|
||||
/immutable/iu.test(line)
|
||||
);
|
||||
const supportsReviewedCore =
|
||||
immutableCoreRule !== undefined &&
|
||||
immutableCoreRule.replaceAll('\\', '').includes(reviewedCoreBuildId);
|
||||
if (!supportsReviewedCore) {
|
||||
warnings.push(
|
||||
'The config does not give versioned FFmpeg core assets an explicit immutable cache rule.'
|
||||
`The config does not give reviewed FFmpeg build ${reviewedCoreBuildId} an explicit immutable cache rule.`
|
||||
);
|
||||
}
|
||||
return { errors, warnings };
|
||||
@@ -229,11 +239,11 @@ async function verifyAssembly(output, appVersion, digest) {
|
||||
}
|
||||
for (const reference of [
|
||||
'./index.html',
|
||||
'./vendor/ffmpeg/0.12.10/st/ffmpeg-core.js',
|
||||
'./vendor/ffmpeg/0.12.10/st/ffmpeg-core.wasm',
|
||||
'./vendor/ffmpeg/0.12.10/mt/ffmpeg-core.js',
|
||||
'./vendor/ffmpeg/0.12.10/mt/ffmpeg-core.wasm',
|
||||
'./vendor/ffmpeg/0.12.10/mt/ffmpeg-core.worker.js',
|
||||
'./vendor/ffmpeg/0.12.10-reviewed-stack5m.1/st/ffmpeg-core.js',
|
||||
'./vendor/ffmpeg/0.12.10-reviewed-stack5m.1/st/ffmpeg-core.wasm',
|
||||
'./vendor/ffmpeg/0.12.10-reviewed-stack5m.1/mt/ffmpeg-core.js',
|
||||
'./vendor/ffmpeg/0.12.10-reviewed-stack5m.1/mt/ffmpeg-core.wasm',
|
||||
'./vendor/ffmpeg/0.12.10-reviewed-stack5m.1/mt/ffmpeg-core.worker.js',
|
||||
]) {
|
||||
const relative = reference.replace(/^\.\//, '');
|
||||
await requireRegularFile(
|
||||
|
||||
Reference in New Issue
Block a user