dsh-film 0.5.2 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client/client.js CHANGED
@@ -1,5 +1,5 @@
1
1
  window.__ModuleLoader__.load({
2
- id: "dsh-film-studio",
2
+ id: "dsh-film",
3
3
  factory: (require) => {
4
4
  var module = { exports: {} };
5
5
  var exports = module.exports;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-film",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "VibeDev 影视工作台:在 DeepSeek Harness 和 VibeDev 的右侧栏打开画布式影视工作台(剧本、分镜画布、图片/视频/音频生成、剪辑成片),模型与费用统一走 VibeDev 账号 · VibeDev Film: a canvas film workbench in the right sidebar of DeepSeek Harness and VibeDev (script, storyboard canvas, image/video/audio generation, editing), with every model and charge through the VibeDev account",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -68,6 +68,18 @@ for (const [what, path] of [['Film 入口', entry], ['Bun 运行时', runtime],
68
68
  }
69
69
  if (missing) process.exit(1)
70
70
 
71
+ // The Host loads the client half under the package name and waits for a registration with exactly
72
+ // that id; any other id never activates and the whole web boot fails (dsh-film 0.5.0–0.5.2).
73
+ if (existsSync(join(packageDirectory, 'client/client.js'))) {
74
+ const packageName = JSON.parse(readFileSync(join(packageDirectory, 'package.json'), 'utf8')).name
75
+ const registered = /^window\.__ModuleLoader__\.load\(\{\s*id: "([^"]+)"/.exec(readFileSync(join(packageDirectory, 'client/client.js'), 'utf8'))?.[1]
76
+ if (registered !== packageName) {
77
+ console.error(`✗ 客户端注册 id 是 "${registered ?? '(没有)'}",包名是 "${packageName}":宿主按包名加载,界面会启动失败`)
78
+ process.exit(1)
79
+ }
80
+ console.log(`✓ 客户端按包名注册:${packageName}`)
81
+ }
82
+
71
83
  // The page's own entry files must exist. A stale index.html pointing at a bundle
72
84
  // that is no longer there is a blank page, and it is exactly what a half-written
73
85
  // install produced once — so this is checked before the server is even started.