Repository navigation
fix(desktop): 机构远程访问配置未传到远控插件(关联 #228) - #231
Merged
freedomkk-qfeng merged 2 commits intoOct 26, 2026
Merged
Conversation
…undle Since remote access ships as its own npm bundle, its entry comes from the bundle's patch, not composition.json, so remoteAccess from the desktop configuration was dropped without a word. The relay is now a row of its own in the product patch, which reaches the bundle whether it came with the product or was installed by the user. Saved preferences are now also rebased when a product row appears or goes, so a configuration update that adds, withdraws or replaces the relay reaches a computer whose user has already saved the plugin's settings, and withdrawn defaults do not linger as personal ones.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
桌面配置里的
remoteAccess(机构中继和登录,可写在eduwork.jsonc或随签名配置更新下发)一直没有传到远控插件,也没有任何报错。原因:
product-profile.mjs只把它写给composition.json里登记的eduwork-remote-access。从公版 0.4.8 起,远控改为可选 npm 插件,入口由插件包自带的 patch 插入,不在composition.json里,所以这项配置被丢掉了。#192 的单测手动往composition.json里加了这一行,绕过了这个情况,所以没有发现。机构版排除预装、由用户自行安装插件时,配置也同样到不了插件。改动
product-profile.mjs:配置了remoteAccess时,在产品 patch 里单独写一行eduwork-remote-access,内容为organization。原生 profile 中,生成的产品 bundle 总是排在最后,所以无论插件是随产品安装还是用户自行安装,这一行都会作用在插件插入的入口上。用户仍需自己在设置里开启远程访问。在应用运行中才安装插件的,重启后机构中继生效。native-profile.mjs:以前只有新旧两版产品 bundle 都有某一行时,才会把用户保存的配置按新默认值重新合并。现在这一行新出现或被撤掉时,也会重新合并:验证
node --test dsh-host/test/*.test.mjs:178 个通过,18 个跳过(需要完整运行时)。新加的两个测试,不加修复都会失败:writeNativeProfile写入机构中继后启动,插件状态显示出机构中继;关联 #228。