mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-15 09:06:16 -08:00
test(ci): [CI-01] checkpoint installed audio and subtitle coverage
This commit is contained in:
1 parent
34e4136b43
commit
2d45135873
28 files changed
+5724
-37
No files matched your search
@@ -1,15 +1,14 @@
|
||||
import fs from 'node:fs'
|
||||
import process from 'node:process'
|
||||
import vm from 'node:vm'
|
||||
import { transform } from 'esbuild'
|
||||
import { verifyMultipleSubtitlesContract } from '../../refactor/scripts/multiple-subtitles-contract.mjs'
|
||||
import { readMember } from '../../refactor/scripts/releases.mjs'
|
||||
import { compilePackage } from './load.js'
|
||||
import { browserCandidate } from './browser-candidate.js'
|
||||
|
||||
export const subtitleVtt = text => `WEBVTT\n\n00:00.000 --> 00:02.000\n${text}\n`
|
||||
|
||||
export async function multipleSubtitlesCandidate() {
|
||||
return { name: 'candidate', version: 'candidate', code: process.env.ARTPLAYER_MULTIPLE_SUBTITLES_ARTIFACT ? fs.readFileSync(process.env.ARTPLAYER_MULTIPLE_SUBTITLES_ARTIFACT, 'utf8') : await compilePackage('artplayer-plugin-multiple-subtitles', 'umd') }
|
||||
return { name: 'candidate', version: 'candidate', ...await browserCandidate('artplayer-plugin-multiple-subtitles', process.env.ARTPLAYER_MULTIPLE_SUBTITLES_ARTIFACT) }
|
||||
}
|
||||
|
||||
export async function multipleSubtitlesHistorical() {
|
||||
|
||||
@@ -1,15 +1,17 @@
|
||||
import fs from 'node:fs'
|
||||
import assert from 'node:assert/strict'
|
||||
import process from 'node:process'
|
||||
import vm from 'node:vm'
|
||||
import { transform } from 'esbuild'
|
||||
import { readMember } from '../../refactor/scripts/releases.mjs'
|
||||
import { verifyVttThumbnailContract } from '../../refactor/scripts/vtt-thumbnail-contract.mjs'
|
||||
import { compilePackage } from './load.js'
|
||||
import { browserCandidate } from './browser-candidate.js'
|
||||
|
||||
export async function vttThumbnailCandidate() {
|
||||
if (process.env.ARTPLAYER_VTT_THUMBNAIL_BASELINE === '1')
|
||||
if (process.env.ARTPLAYER_VTT_THUMBNAIL_BASELINE === '1') {
|
||||
assert(!process.env.ARTPLAYER_BROWSER_ARTIFACTS, 'Installed VTT thumbnail checks cannot use the frozen workspace')
|
||||
return (await vttThumbnailHistorical()).find(item => item.name === 'frozen-workspace-js')
|
||||
return { name: 'candidate', profile: 'current', code: process.env.ARTPLAYER_VTT_THUMBNAIL_ARTIFACT ? fs.readFileSync(process.env.ARTPLAYER_VTT_THUMBNAIL_ARTIFACT, 'utf8') : await compilePackage('artplayer-plugin-vtt-thumbnail', 'umd') }
|
||||
}
|
||||
return { name: 'candidate', profile: 'current', ...await browserCandidate('artplayer-plugin-vtt-thumbnail', process.env.ARTPLAYER_VTT_THUMBNAIL_ARTIFACT) }
|
||||
}
|
||||
|
||||
export async function vttThumbnailHistorical() {
|
||||
|
||||
Reference in new issue
Block a user