chore(runtime): upgrade DSH and bundled plugins for runtime-7.11
This commit is contained in:
@@ -5,12 +5,12 @@ import { createRequire } from 'node:module';
|
||||
import { patchClient } from './patch-chat-manager.mjs';
|
||||
|
||||
const root = '/usr/local/lib/dsh-mgr';
|
||||
const version = '1.5.18';
|
||||
const patchedVersion = '1.5.18-dsh-mgr.1';
|
||||
const version = '1.5.20';
|
||||
const patchedVersion = '1.5.20-dsh-mgr.1';
|
||||
const hostManifest = '/usr/local/lib/node_modules/@deepseek-ai/dsh/package.json';
|
||||
const destination = '/usr/local/lib/node_modules/@deepseek-ai/dsh/node_modules/dsh-chat-manager';
|
||||
const packages = [
|
||||
['dsh-chat-manager', version, 'https://registry.npmjs.org/dsh-chat-manager/-/dsh-chat-manager-1.5.18.tgz', 'kkGog/h162duGKjeSx5NgN/KRzsniIPXeUTTcAMyTM9ci0eA/KdORUpR8v/AqWPBNH/CAg3F1+OgXUpbI4vkLQ=='],
|
||||
['dsh-chat-manager', version, 'https://registry.npmjs.org/dsh-chat-manager/-/dsh-chat-manager-1.5.20.tgz', 'V/7N48lJioxBr2h+hmVnNoZB5jjoT/EGC6Pk8pSbNJveQoHye+zBj3tUX1Xf520YyopVk5fSVpt+aeCkBBVxdA=='],
|
||||
['clsx', '2.1.1', 'https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz', 'eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA=='],
|
||||
];
|
||||
mkdirSync(root, { recursive: true });
|
||||
@@ -30,7 +30,7 @@ const require = createRequire(hostManifest);
|
||||
const host = JSON.parse(readFileSync(hostManifest));
|
||||
const semver = createRequire('/usr/local/lib/node_modules/npm/package.json')('semver');
|
||||
for (const [name, range] of Object.entries(pkg.peerDependencies || {})) {
|
||||
// 1.5.18 retains this optional legacy peer but its runtime no longer imports it.
|
||||
// 1.5.20 retains this optional legacy peer but its runtime no longer imports it.
|
||||
if (name === '@deepseek-ai/dsh-invariants' && pkg.peerDependenciesMeta?.[name]?.optional) {
|
||||
for (const file of ['src/index.js', 'src/host/archive-manager.mjs', 'src/host/delete-session.mjs', 'lib/client.js']) {
|
||||
if (readFileSync(destination + '/' + file, 'utf8').includes(name)) throw new Error('legacy invariants peer is used again');
|
||||
@@ -38,11 +38,11 @@ for (const [name, range] of Object.entries(pkg.peerDependencies || {})) {
|
||||
continue;
|
||||
}
|
||||
if (name === 'react') {
|
||||
if (host.version !== '0.2.1-rc.3') throw new Error('unverified browser React host: ' + host.version);
|
||||
if (host.version !== '0.2.1-rc.5') throw new Error('unverified browser React host: ' + host.version);
|
||||
continue;
|
||||
}
|
||||
// New web hosts bundle this pure UI module in the browser bootstrap.
|
||||
if (['@deepseek-ai/dsh-client-ui-primitives', '@deepseek-ai/dsh-client-ui-slots'].includes(name) && host.version === '0.2.1-rc.3') {
|
||||
if (['@deepseek-ai/dsh-client-ui-primitives', '@deepseek-ai/dsh-client-ui-slots'].includes(name) && host.version === '0.2.1-rc.5') {
|
||||
const frontend = require.resolve('@deepseek-ai/dsh-web-frontend/package.json');
|
||||
const assets = frontend.slice(0, -'package.json'.length) + 'dist/assets';
|
||||
const frontendVersion = JSON.parse(readFileSync(frontend)).version;
|
||||
|
||||
Reference in New Issue
Block a user