Replies: 1 comment
|
Verified against // 0.1.2-alpha.1 — packages/settings/settings/src/index.ts:26
export function settingsNamespace(value: string): SettingsNamespace {
if (!NAMESPACE_PATTERN.test(value)) {
throw new TypeError(`settings namespace "${value}" must match ${String(NAMESPACE_PATTERN)}`)
}
return value as SettingsNamespace
}
register<T>(ns: SettingsNamespace, schema: z<T>, options?: SettingsRegisterOptions<T>): SettingsScope<T>It was removed by Current export surface (verified at alpha.4):
Migration for the plugin author (about one line):
Platform side (your acceptance criterion): the failure path is the vendored Cordis loader ( |
Uh oh!
There was an error while loading. Please reload this page.
一句话
启动 web profile 时,第三方插件
dsh-univer-office因 import 了@deepseek-ai/dsh-settings不存在的导出settingsNamespace,导致整棵插件树加载失败、进程崩溃、GUI 端口无法访问。复现步骤
dsh-univer-office(来源 GitHub/npm,非官方内置)。dsh web(本机:node --import tsx/esm apps/cli/src/bin.ts web)。实际结果
启动崩溃,报错如下:
预期结果
要么该插件被官方兼容(若
settingsNamespace曾在某版本存在),要么平台在加载第三方插件时给出更明确的版本不兼容提示(而不是整个 profile 崩溃、端口完全不可达)。环境
@deepseek-ai/dsh-settings@0.1.2-alpha.3SettingsProvider(default)、SettingsConflictError、redactSecrets;SettingsNamespace仅为类型导出,非运行时值。建议(可选)
plugin registry / 市场收录第三方插件时,能否增加"真实加载校验"步骤(至少校验被 import 的命名导出存在),避免收录的插件与当前平台版本不兼容时导致用户整树崩溃?
验收条件
All reactions