chore(runtime): upgrade DSH and bundled plugins for runtime-7.11

This commit is contained in:
2026-10-30 17:08:16 +08:00
parent 0389555d76
commit 169e1ffdc2
17 changed files with 70 additions and 44 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ import { pathToFileURL } from 'node:url';
export const target = 'import { createConverter } from "@deepseek-ai/libreoffice-kit";';
export function patchOffice(source, hostVersion, packageVersion) {
if (hostVersion !== '0.2.1-rc.3' || packageVersion !== '0.2.1-rc.3') throw new Error('unsupported Office preview version');
if (hostVersion !== '0.2.1-rc.5' || packageVersion !== '0.2.1-rc.5') throw new Error('unsupported Office preview version');
if (source.split(target).length !== 2) throw new Error('expected exactly one original converter import');
return source.replace(target, 'import { createConverter } from "./dsh-native-office.mjs";');
}