mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 23:51:20 -08:00
refactor(dash): [PKG-DASH-03] adapt SDK generations and own menu lifecycles
This commit is contained in:
1 parent
762cc63431
commit
7de04573b6
24 files changed
+2107
-533
No files matched your search
@@ -22,6 +22,7 @@ export async function dashImplementations() {
|
||||
const { release } = baseline
|
||||
const archive = await ensureArchive(release)
|
||||
const implementations = [{ name: 'source', sdk: 5, factory: (await loadPackage(release.name)).default }]
|
||||
implementations.push({ name: 'source-v4', sdk: 4, factory: implementations[0].factory })
|
||||
const historicalFile = `packages/${release.name}/dist/artplayer-plugin-dash-control.js`
|
||||
const historical = execFileSync('git', ['show', `${baseline.sourceCommit}:${historicalFile}`])
|
||||
assert.equal(hash(historical.toString().replace(/\r\n/g, '\n')), baseline.source[historicalFile])
|
||||
@@ -34,7 +35,9 @@ export async function dashImplementations() {
|
||||
}
|
||||
for (const filename of (process.env.ARTPLAYER_TEST_DASH || '').split(path.delimiter).filter(Boolean)) {
|
||||
const bytes = fs.readFileSync(filename)
|
||||
implementations.push({ name: `artifact-${path.basename(filename)}`, sdk: 5, factory: await factoryFromBytes(bytes, filename.endsWith('.mjs')) })
|
||||
const factory = await factoryFromBytes(bytes, filename.endsWith('.mjs'))
|
||||
for (const sdk of [4, 5])
|
||||
implementations.push({ name: `artifact-${path.basename(filename)}-v${sdk}`, sdk, factory })
|
||||
}
|
||||
return implementations
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user