@dsh-workbench/shared 1.0.1 → 1.1.0
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/dist/contract/protocol/bundle-install.d.ts +9 -1
- package/dist/contract/protocol/market-index.d.ts +1 -0
- package/dist/contract/protocol/market-index.js +1 -0
- package/dist/contract/unit-declaration.d.ts +11 -5
- package/dist/contract/unit-declaration.js +42 -12
- package/dist/contract/unit.d.ts +15 -1
- package/dist/contract/unit.js +8 -0
- package/dist/contract/workbench-contract.d.ts +1 -1
- package/dist/host/provision.d.ts +1 -1
- package/dist/host/provision.js +8 -2
- package/dist/host/supply-index.d.ts +4 -1
- package/dist/host/supply-index.js +18 -12
- package/dist/i18n/en.js +53 -32
- package/dist/i18n/index.d.ts +55 -34
- package/dist/i18n/zh.d.ts +54 -33
- package/dist/i18n/zh.js +54 -33
- package/dist/lib/dsh-client.d.ts +3 -1
- package/package.json +1 -1
- package/src/contract/__tests__/unit-declaration.test.ts +33 -1
- package/src/contract/protocol/bundle-install.ts +11 -1
- package/src/contract/protocol/market-index.ts +1 -0
- package/src/contract/unit-declaration.ts +52 -16
- package/src/contract/unit.ts +19 -1
- package/src/contract/workbench-contract.ts +3 -1
- package/src/host/__tests__/provision.test.ts +2 -0
- package/src/host/__tests__/supply-index.test.ts +42 -6
- package/src/host/provision.ts +6 -2
- package/src/host/supply-index.ts +40 -11
- package/src/i18n/en.ts +53 -32
- package/src/i18n/zh.ts +54 -33
- package/src/lib/dsh-client.ts +3 -1
- package/src/testing/__tests__/declaration.test.ts +6 -3
package/dist/i18n/zh.d.ts
CHANGED
|
@@ -137,15 +137,14 @@ export declare const zh: {
|
|
|
137
137
|
readonly 'panels.market.update': "更新";
|
|
138
138
|
readonly 'panels.market.swapSlow': "还没换上:可能网慢或没装上。再点一次「更新」;一直这样就把 dsh 重启一遍。";
|
|
139
139
|
readonly 'panels.market.removeSlow': "还没卸掉:可能网慢或卸载没走完。等一下再看;一直这样就把 dsh 重启一遍。";
|
|
140
|
-
readonly 'panels.market.updateNoChange': "
|
|
140
|
+
readonly 'panels.market.updateNoChange': "更新失败:还是 {from};源上最新是 {latest},可以再点一次「更新」。";
|
|
141
141
|
readonly 'panels.market.updateUnknownVersion': "(问不到)";
|
|
142
|
-
readonly 'panels.market.updateGone': "
|
|
143
|
-
readonly 'panels.market.updateRestored': "
|
|
142
|
+
readonly 'panels.market.updateGone': "更新失败:更新后找不到这个模块。";
|
|
143
|
+
readonly 'panels.market.updateRestored': "更新失败:更新后找不到新版本,已把 {version} 装回去。";
|
|
144
144
|
readonly 'panels.market.updateBehind': "装上了 {installed},但源上最新是 {latest} —— 没更到最新,可以再点一次。";
|
|
145
|
-
readonly 'panels.market.selfUpdateFailed': "
|
|
145
|
+
readonly 'panels.market.selfUpdateFailed': "工作台更新失败:{reason}";
|
|
146
146
|
readonly 'panels.market.selfUpdateUnknown': "外部进程没留下原因(看 ~/.dsh/workbench/self-update.log)";
|
|
147
|
-
readonly 'panels.market.selfUpdateRolledBack': "
|
|
148
|
-
readonly 'panels.market.selfUpdateNeedsMigrate': "工作台已更新。旧会话 / 项目不会自动并:先退出所有 dsh,再运行 dsh-workbench migrate(--force 可补并)。";
|
|
147
|
+
readonly 'panels.market.selfUpdateRolledBack': "工作台更新失败,已回滚到 {version}。";
|
|
149
148
|
readonly 'panels.market.uninstall': "卸载";
|
|
150
149
|
readonly 'panels.market.uninstallLabel': "卸载 {name}";
|
|
151
150
|
readonly 'panels.market.installing': "正在安装…";
|
|
@@ -167,9 +166,27 @@ export declare const zh: {
|
|
|
167
166
|
readonly 'panels.market.empty': "暂无可用模块";
|
|
168
167
|
readonly 'panels.market.sectionPlugins': "已安装 opencli 插件";
|
|
169
168
|
readonly 'panels.market.moduleOutdated': "有新版";
|
|
169
|
+
readonly 'panels.market.updateNeedsWorkbench': "新版本要先把工作台升级才能用";
|
|
170
|
+
readonly 'panels.market.updateIncompatible': "新版本和当前的工作台不匹配,暂时不能更新";
|
|
170
171
|
readonly 'panels.market.moduleRefused': "模块版本与工作台不匹配,暂时无法使用";
|
|
171
172
|
readonly 'panels.market.moduleRestartHint': "重启后生效";
|
|
172
173
|
readonly 'panels.market.pendingRestart': "重启后生效";
|
|
174
|
+
readonly 'panels.market.pendingFollowUp': "旧数据待迁移";
|
|
175
|
+
readonly 'panels.market.migrationHint': "旧会话和项目还没搬过来";
|
|
176
|
+
readonly 'panels.market.migrateAction': "迁移旧数据";
|
|
177
|
+
readonly 'panels.market.migrating': "正在迁移…";
|
|
178
|
+
readonly 'panels.market.migrateConfirmTitle': "迁移旧数据?";
|
|
179
|
+
readonly 'panels.market.migrateConfirmDetail': "先退出 dsh web / Desktop。迁移只补缺、不覆盖;旧目录保留。";
|
|
180
|
+
readonly 'panels.market.migrateConfirmAck': "我已经退出 dsh web / Desktop";
|
|
181
|
+
readonly 'panels.market.migrateConfirmYes': "开始迁移";
|
|
182
|
+
readonly 'panels.market.migrateDone': "迁移完成:补了 {added} 个项目;重启工作台和 dsh web 后出现。";
|
|
183
|
+
readonly 'panels.market.dismissFollowUp': "不再提醒";
|
|
184
|
+
readonly 'panels.market.dismissing': "正在收起…";
|
|
185
|
+
readonly 'panels.market.dismissFollowUpTitle': "不再提醒这件事?";
|
|
186
|
+
readonly 'panels.market.dismissFollowUpDetail': "提示会从模块市场收起,但不会迁移或删除旧数据。旧会话和项目仍留在旧目录,新版本里看不到;以后需要时仍可运行 dsh-workbench migrate。";
|
|
187
|
+
readonly 'panels.market.dismissFollowUpAck': "我知道旧数据不会自动出现";
|
|
188
|
+
readonly 'panels.market.dismissFollowUpYes': "不再提醒";
|
|
189
|
+
readonly 'panels.market.dismissed': "已不再提醒;旧数据仍在旧目录,需要时仍可运行 dsh-workbench migrate。";
|
|
173
190
|
readonly 'panels.market.workbenchName': "工作台";
|
|
174
191
|
readonly 'panels.market.pluginBroken': "这份插件装坏了:认不出它是什么。可以先卸载,再让 agent 按包名重装一次。";
|
|
175
192
|
readonly 'panels.market.restartNeeded': "新版装好了,重启一次才生效。";
|
|
@@ -253,7 +270,7 @@ export declare const zh: {
|
|
|
253
270
|
readonly 'panels.market.add.exampleTitle': "示例";
|
|
254
271
|
readonly 'panels.market.add.exampleFill': "填入示例";
|
|
255
272
|
readonly 'panels.market.add.registryLabel': "安装源";
|
|
256
|
-
readonly 'panels.market.add.registryProfile': "
|
|
273
|
+
readonly 'panels.market.add.registryProfile': "这份工作台配的源";
|
|
257
274
|
readonly 'panels.market.add.registryPnpm': "pnpm 自己配的源";
|
|
258
275
|
readonly 'panels.market.add.check': "预检";
|
|
259
276
|
readonly 'panels.market.add.checking': "正在预检…";
|
|
@@ -274,12 +291,16 @@ export declare const zh: {
|
|
|
274
291
|
readonly 'panels.market.tabs': "模块市场的两个面";
|
|
275
292
|
readonly 'panels.tab.discover': "发现";
|
|
276
293
|
readonly 'panels.discover.loading': "正在读取索引";
|
|
294
|
+
readonly 'panels.discover.slowHint': "读取较慢:如有授权提示,先完成它,或换一个索引源。";
|
|
277
295
|
readonly 'panels.discover.lead': "从索引源浏览模块;装上就能用。";
|
|
278
296
|
readonly 'panels.discover.addSource': "添加";
|
|
279
297
|
readonly 'panels.discover.addingSource': "正在添加…";
|
|
280
298
|
readonly 'panels.discover.addFirstSource': "添加索引源";
|
|
281
299
|
readonly 'panels.discover.removeSource': "移除";
|
|
282
300
|
readonly 'panels.discover.removeSourceNamed': "移除 {url}";
|
|
301
|
+
readonly 'panels.discover.useSource': "使用";
|
|
302
|
+
readonly 'panels.discover.useSourceNamed': "使用 {label}";
|
|
303
|
+
readonly 'panels.discover.sourceCurrent': "当前使用";
|
|
283
304
|
readonly 'panels.discover.refresh': "刷新";
|
|
284
305
|
readonly 'panels.discover.search': "搜索模块";
|
|
285
306
|
readonly 'panels.discover.all': "全部";
|
|
@@ -291,8 +312,8 @@ export declare const zh: {
|
|
|
291
312
|
readonly 'panels.discover.sourcePlaceholder': "https://example.com/index.json 或 git@git.example.com:wb/market.git";
|
|
292
313
|
readonly 'panels.discover.sourceRef': "分支";
|
|
293
314
|
readonly 'panels.discover.sourcePath': "索引文件";
|
|
294
|
-
readonly 'panels.discover.sourceLocal': "
|
|
295
|
-
readonly 'panels.discover.sourceLocalHint': "
|
|
315
|
+
readonly 'panels.discover.sourceLocal': "本地副本目录(可选)";
|
|
316
|
+
readonly 'panels.discover.sourceLocalHint': "不填就放到 ~/.dsh/workbench/market-index/。";
|
|
296
317
|
readonly 'panels.discover.save': "保存并刷新";
|
|
297
318
|
readonly 'panels.discover.cancel': "取消";
|
|
298
319
|
readonly 'panels.discover.retry': "重试";
|
|
@@ -305,9 +326,9 @@ export declare const zh: {
|
|
|
305
326
|
readonly 'panels.discover.missingIndex': "仓库里还没有索引文件 {path}";
|
|
306
327
|
readonly 'panels.discover.initTitle': "把这个仓库初始化成模块市场索引?";
|
|
307
328
|
readonly 'panels.discover.initCta': "初始化成市场索引";
|
|
308
|
-
readonly 'panels.discover.initWhat': "会在 {branch} 分支写 market.json 与 README.md
|
|
329
|
+
readonly 'panels.discover.initWhat': "会在 {branch} 分支写 market.json 与 README.md,提交一次并推上去;之后从这个工作台发布的模块会把打包好的文件提交到 packages/<unit>/。仓库的写权限归它的所有者。";
|
|
309
330
|
readonly 'panels.discover.initBranch': "分支";
|
|
310
|
-
readonly 'panels.discover.initBranchHint': "
|
|
331
|
+
readonly 'panels.discover.initBranchHint': "索引和打包文件都发到这个分支;空仓库会新建它。";
|
|
311
332
|
readonly 'panels.discover.initBranchBad': "分支名只能用字母、数字、点、下划线、斜杠或短横线";
|
|
312
333
|
readonly 'panels.discover.initOk': "初始化";
|
|
313
334
|
readonly 'panels.discover.initBusy': "正在初始化…";
|
|
@@ -411,11 +432,11 @@ export declare const zh: {
|
|
|
411
432
|
readonly 'panels.market.add.doneApplied': "装好了,已经生效。";
|
|
412
433
|
readonly 'panels.market.add.doneRestart': "装好了,重启一次才生效。";
|
|
413
434
|
readonly 'panels.market.add.restartWhy': "为什么这一版要重启:{reason}";
|
|
414
|
-
readonly 'panels.market.add.restartWhy.no-hmr': "
|
|
435
|
+
readonly 'panels.market.add.restartWhy.no-hmr': "这份配置只在启动时读一次,改了得重启";
|
|
415
436
|
readonly 'panels.market.add.restartWhy.package-moved': "某个已经装着的包换到了新的目录,或者这一下换掉了 dsh 自己提供的那份";
|
|
416
437
|
readonly 'panels.market.add.restartWhy.host-module': "这一下动到了 dsh 自己加载的模块";
|
|
417
|
-
readonly 'panels.market.add.restartWhy.unmanaged-plugin': "
|
|
418
|
-
readonly 'panels.market.add.restartWhy.module-comparison': "dsh
|
|
438
|
+
readonly 'panels.market.add.restartWhy.unmanaged-plugin': "这一下动到了没登记过、正在运行的插件";
|
|
439
|
+
readonly 'panels.market.add.restartWhy.module-comparison': "dsh 没法确认正在跑的插件就是这台机器上装好的那一份";
|
|
419
440
|
readonly 'panels.market.add.cancelled': "已取消。";
|
|
420
441
|
readonly 'panels.market.add.failed': "没成功:{reason}";
|
|
421
442
|
readonly 'panels.market.add.removed': "已经移除了。";
|
|
@@ -425,10 +446,10 @@ export declare const zh: {
|
|
|
425
446
|
readonly 'panels.market.add.removedRestart': "卸掉了,重启一次才彻底生效。";
|
|
426
447
|
readonly 'panels.market.add.remove': "移除它";
|
|
427
448
|
readonly 'panels.market.add.problem.invalidSpec': "这个写法不认:不能是空的,也不能以横杠开头。";
|
|
428
|
-
readonly 'panels.market.add.problem.alreadyInstalled': "
|
|
449
|
+
readonly 'panels.market.add.problem.alreadyInstalled': "这个包已经在这份工作台里了(要换版本请带上 @版本)。";
|
|
429
450
|
readonly 'panels.market.add.problem.notFound': "源上没有这个包。换个包名或版本再试。";
|
|
430
451
|
readonly 'panels.market.add.problem.notAPackage': "这个位置没有包。选一个包含 package.json 的目录。";
|
|
431
|
-
readonly 'panels.market.add.problem.notABundle': "它是一个 npm 包,但不是 dsh
|
|
452
|
+
readonly 'panels.market.add.problem.notABundle': "它是一个 npm 包,但不是 dsh 插件包(dsh 在里面找不到该加载什么)。";
|
|
432
453
|
readonly 'panels.market.add.problem.network': "源连不上。检查网络后重试。";
|
|
433
454
|
readonly 'panels.market.add.problem.unknown': "预检没通过(原因未知)。展开安装详情看原始输出,或重试。";
|
|
434
455
|
readonly 'panels.market.add.reason.invalidSpec': "写法不认";
|
|
@@ -436,7 +457,7 @@ export declare const zh: {
|
|
|
436
457
|
readonly 'panels.market.add.reason.notBundle': "它不是一个 dsh 插件包";
|
|
437
458
|
readonly 'panels.market.add.reason.notRemovable': "它是安装自带的组合包,不能卸";
|
|
438
459
|
readonly 'panels.market.add.reason.bundleInUse': "还有东西在用它,卸不掉";
|
|
439
|
-
readonly 'panels.market.add.reason.stopProfile': "
|
|
460
|
+
readonly 'panels.market.add.reason.stopProfile': "这份配置改了要重启,得先停掉工作台";
|
|
440
461
|
readonly 'panels.market.add.reason.staleApproval': "要允许的安装脚本已经变了,重新来一次";
|
|
441
462
|
readonly 'panels.market.add.reason.operationError': "pnpm 执行出错(详情见安装输出)";
|
|
442
463
|
readonly 'panels.market.add.reason.buildBlocked': "pnpm 拦下了安装脚本";
|
|
@@ -459,15 +480,15 @@ export declare const zh: {
|
|
|
459
480
|
readonly 'blocker.market.open': "去模块市场";
|
|
460
481
|
readonly 'blocker.login.title': "需要登录 {platform}";
|
|
461
482
|
readonly 'blocker.login.titleGeneric': "需要登录";
|
|
462
|
-
readonly 'blocker.login.hint': "
|
|
483
|
+
readonly 'blocker.login.hint': "工作台借你浏览器里的登录状态;登录一次就行,之后不用再登。";
|
|
463
484
|
readonly 'blocker.login.go': "去登录";
|
|
464
485
|
readonly 'blocker.login.manual': "在终端执行该插件的登录命令(见插件的文档),按提示完成登录后重试。";
|
|
465
486
|
readonly 'blocker.forbidden.title': "没有权限访问 {platform}";
|
|
466
487
|
readonly 'blocker.forbidden.titleGeneric': "没有权限";
|
|
467
488
|
readonly 'blocker.forbidden.hint': "账号已登录,但没有这个项目/仓库的权限;申请之后再试。";
|
|
468
489
|
readonly 'blocker.forbidden.open': "打开权限页";
|
|
469
|
-
readonly 'blocker.timeout.hint': "
|
|
470
|
-
readonly 'blocker.exec.hint': "确认 opencli
|
|
490
|
+
readonly 'blocker.timeout.hint': "后台浏览器没起来,重试一次通常就好。";
|
|
491
|
+
readonly 'blocker.exec.hint': "确认 opencli 已经装好、在终端里能直接运行(which opencli)。";
|
|
471
492
|
readonly 'blocker.unknown.title': "出了点问题";
|
|
472
493
|
readonly 'panels.reading': "正在读取面板配置…";
|
|
473
494
|
readonly 'panels.cardBroken': "这个模块起不来:{unit}({reason})";
|
|
@@ -481,7 +502,7 @@ export declare const zh: {
|
|
|
481
502
|
readonly 'env.elapsed': "已等待 {seconds} 秒";
|
|
482
503
|
readonly 'env.stepFailed.install': "装不上";
|
|
483
504
|
readonly 'env.stepFailed.path': "装了但还找不到";
|
|
484
|
-
readonly 'env.stepFailed.shell': "
|
|
505
|
+
readonly 'env.stepFailed.shell': "连不上命令行";
|
|
485
506
|
readonly 'env.toolchain.ok': "正常";
|
|
486
507
|
readonly 'env.toolchain.warn': "还没完全准备好";
|
|
487
508
|
readonly 'env.opencli.ok': "已就绪";
|
|
@@ -498,10 +519,10 @@ export declare const zh: {
|
|
|
498
519
|
readonly 'env.fix.title': "怎么解决";
|
|
499
520
|
readonly 'env.fix.why': "工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。";
|
|
500
521
|
readonly 'env.fix.whyPath': "后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。";
|
|
501
|
-
readonly 'env.fix.whyShell': "
|
|
522
|
+
readonly 'env.fix.whyShell': "工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。";
|
|
502
523
|
readonly 'env.fix.step': "在终端里运行下面这条命令,装好之后点「重试」:";
|
|
503
524
|
readonly 'env.fix.stepPath': "新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。";
|
|
504
|
-
readonly 'env.fix.stepShell': "重启一次工作台(或 dsh
|
|
525
|
+
readonly 'env.fix.stepShell': "重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。";
|
|
505
526
|
readonly 'env.fix.permission': "权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。";
|
|
506
527
|
readonly 'env.fix.network': "网络不通:检查网络或代理设置后重试。";
|
|
507
528
|
readonly 'env.fix.details': "详细输出(排障用)";
|
|
@@ -530,9 +551,9 @@ export declare const zh: {
|
|
|
530
551
|
readonly 'env.warm.done': "已就绪({n} 个站点)";
|
|
531
552
|
readonly 'env.warm.short': "这次没提前连上 —— 不影响用,第一次取数会自己补";
|
|
532
553
|
readonly 'env.unit.failed': "这个模块起不来";
|
|
533
|
-
readonly 'env.unit.failedHint': "
|
|
534
|
-
readonly 'env.unit.unchecked': "
|
|
535
|
-
readonly 'env.unit.uncheckedHint': "
|
|
554
|
+
readonly 'env.unit.failedHint': "它自己启动时报了错,别的模块不受影响。";
|
|
555
|
+
readonly 'env.unit.unchecked': "检测不了:拿不到命令行";
|
|
556
|
+
readonly 'env.unit.uncheckedHint': "不是这个模块的问题,是工作台拿不到命令行 —— 重启一次工作台再试。";
|
|
536
557
|
readonly 'adapterSet.not-configured': "没配置适配器集合,用默认的。";
|
|
537
558
|
readonly 'adapterSet.no-profile': "找不到 profile,没法加载适配器集合;先用默认的。";
|
|
538
559
|
readonly 'adapterSet.malformed': "适配器集合要写包名(如 @acme/adapters-set);先用默认的。";
|
|
@@ -575,7 +596,7 @@ export declare const zh: {
|
|
|
575
596
|
readonly 'sidebarEdition.official': "官方";
|
|
576
597
|
readonly 'sidebarEdition.officialHint': "跟 dsh 官方一致、最稳:搜索、视图选项、显示更多、归档、添加工作区都齐,升级也不等我们适配。想省心就选它。";
|
|
577
598
|
readonly 'sidebarEdition.custom': "自定义";
|
|
578
|
-
readonly 'sidebarEdition.customHint': "
|
|
599
|
+
readonly 'sidebarEdition.customHint': "为多项目工作流做的:项目下拉一屏一个项目,会话按最近更新排,名字自动滚动、两侧渐隐,工坊 DIY 新会话。项目多时更顺手。";
|
|
579
600
|
readonly 'sidebarEdition.saving': "配置中…";
|
|
580
601
|
readonly 'sidebarEdition.reloadRequired': "已写入。刷新页面后生效(不用重启工作台)。";
|
|
581
602
|
readonly 'sidebarEdition.reload': "刷新页面";
|
|
@@ -604,25 +625,25 @@ export declare const zh: {
|
|
|
604
625
|
readonly 'record.act.halt': "停";
|
|
605
626
|
readonly 'approval.record.site': "站点";
|
|
606
627
|
readonly 'approval.record.what': "录制功能";
|
|
607
|
-
readonly 'approval.record.lands': "
|
|
628
|
+
readonly 'approval.record.lands': "保存到";
|
|
608
629
|
readonly 'approval.record.noUrl': "没给站点地址(这次会被当场拒)";
|
|
609
630
|
readonly 'approval.record.oneAction': "一次操作";
|
|
610
631
|
readonly 'approval.record.noSwitch': "录完不会替你切回来(左栏底部会亮一条状态)";
|
|
611
|
-
readonly 'approval.longTask.what': "
|
|
612
|
-
readonly 'approval.longTask.signal': "停了只是让工作台发出中断信号 ——
|
|
632
|
+
readonly 'approval.longTask.what': "要停的那次任务";
|
|
633
|
+
readonly 'approval.longTask.signal': "停了只是让工作台发出中断信号 —— 这次任务怎么收尾由模块自己负责";
|
|
613
634
|
readonly 'approval.publish.module': "模块";
|
|
614
635
|
readonly 'approval.publish.target': "目标";
|
|
615
636
|
readonly 'approval.publish.version': "版本";
|
|
616
637
|
readonly 'approval.publish.author': "作者";
|
|
617
|
-
readonly 'approval.publish.authorMissing': "
|
|
638
|
+
readonly 'approval.publish.authorMissing': "未署名";
|
|
618
639
|
readonly 'approval.publish.registry': "源";
|
|
619
640
|
readonly 'approval.publish.repo': "仓库";
|
|
620
641
|
readonly 'approval.publish.branch': "分支";
|
|
621
642
|
readonly 'approval.publish.defaultBranch': "默认分支";
|
|
622
|
-
readonly 'approval.publish.artifacts': "
|
|
643
|
+
readonly 'approval.publish.artifacts': "打包文件";
|
|
623
644
|
readonly 'approval.publish.index': "索引";
|
|
624
645
|
readonly 'approval.publish.commits': "提交";
|
|
625
|
-
readonly 'approval.publish.twoCommits': "
|
|
646
|
+
readonly 'approval.publish.twoCommits': "打包文件 + market.json 两次提交,一次推送";
|
|
626
647
|
readonly 'approval.publish.reading': "读取中…";
|
|
627
648
|
readonly 'approval.publish.changelog': "{version} 的更新日志";
|
|
628
649
|
readonly 'approval.publish.changelogMissing': "这一版还没有更新日志({version}),发布会被拦下";
|
package/dist/i18n/zh.js
CHANGED
|
@@ -129,15 +129,14 @@ export const zh = {
|
|
|
129
129
|
'panels.market.update': '更新',
|
|
130
130
|
'panels.market.swapSlow': '还没换上:可能网慢或没装上。再点一次「更新」;一直这样就把 dsh 重启一遍。',
|
|
131
131
|
'panels.market.removeSlow': '还没卸掉:可能网慢或卸载没走完。等一下再看;一直这样就把 dsh 重启一遍。',
|
|
132
|
-
'panels.market.updateNoChange': '
|
|
132
|
+
'panels.market.updateNoChange': '更新失败:还是 {from};源上最新是 {latest},可以再点一次「更新」。',
|
|
133
133
|
'panels.market.updateUnknownVersion': '(问不到)',
|
|
134
|
-
'panels.market.updateGone': '
|
|
135
|
-
'panels.market.updateRestored': '
|
|
134
|
+
'panels.market.updateGone': '更新失败:更新后找不到这个模块。',
|
|
135
|
+
'panels.market.updateRestored': '更新失败:更新后找不到新版本,已把 {version} 装回去。',
|
|
136
136
|
'panels.market.updateBehind': '装上了 {installed},但源上最新是 {latest} —— 没更到最新,可以再点一次。',
|
|
137
|
-
'panels.market.selfUpdateFailed': '
|
|
137
|
+
'panels.market.selfUpdateFailed': '工作台更新失败:{reason}',
|
|
138
138
|
'panels.market.selfUpdateUnknown': '外部进程没留下原因(看 ~/.dsh/workbench/self-update.log)',
|
|
139
|
-
'panels.market.selfUpdateRolledBack': '
|
|
140
|
-
'panels.market.selfUpdateNeedsMigrate': '工作台已更新。旧会话 / 项目不会自动并:先退出所有 dsh,再运行 dsh-workbench migrate(--force 可补并)。',
|
|
139
|
+
'panels.market.selfUpdateRolledBack': '工作台更新失败,已回滚到 {version}。',
|
|
141
140
|
'panels.market.uninstall': '卸载',
|
|
142
141
|
'panels.market.uninstallLabel': '卸载 {name}',
|
|
143
142
|
'panels.market.installing': '正在安装…',
|
|
@@ -159,9 +158,27 @@ export const zh = {
|
|
|
159
158
|
'panels.market.empty': '暂无可用模块',
|
|
160
159
|
'panels.market.sectionPlugins': '已安装 opencli 插件',
|
|
161
160
|
'panels.market.moduleOutdated': '有新版',
|
|
161
|
+
'panels.market.updateNeedsWorkbench': '新版本要先把工作台升级才能用',
|
|
162
|
+
'panels.market.updateIncompatible': '新版本和当前的工作台不匹配,暂时不能更新',
|
|
162
163
|
'panels.market.moduleRefused': '模块版本与工作台不匹配,暂时无法使用',
|
|
163
164
|
'panels.market.moduleRestartHint': '重启后生效',
|
|
164
165
|
'panels.market.pendingRestart': '重启后生效',
|
|
166
|
+
'panels.market.pendingFollowUp': '旧数据待迁移',
|
|
167
|
+
'panels.market.migrationHint': '旧会话和项目还没搬过来',
|
|
168
|
+
'panels.market.migrateAction': '迁移旧数据',
|
|
169
|
+
'panels.market.migrating': '正在迁移…',
|
|
170
|
+
'panels.market.migrateConfirmTitle': '迁移旧数据?',
|
|
171
|
+
'panels.market.migrateConfirmDetail': '先退出 dsh web / Desktop。迁移只补缺、不覆盖;旧目录保留。',
|
|
172
|
+
'panels.market.migrateConfirmAck': '我已经退出 dsh web / Desktop',
|
|
173
|
+
'panels.market.migrateConfirmYes': '开始迁移',
|
|
174
|
+
'panels.market.migrateDone': '迁移完成:补了 {added} 个项目;重启工作台和 dsh web 后出现。',
|
|
175
|
+
'panels.market.dismissFollowUp': '不再提醒',
|
|
176
|
+
'panels.market.dismissing': '正在收起…',
|
|
177
|
+
'panels.market.dismissFollowUpTitle': '不再提醒这件事?',
|
|
178
|
+
'panels.market.dismissFollowUpDetail': '提示会从模块市场收起,但不会迁移或删除旧数据。旧会话和项目仍留在旧目录,新版本里看不到;以后需要时仍可运行 dsh-workbench migrate。',
|
|
179
|
+
'panels.market.dismissFollowUpAck': '我知道旧数据不会自动出现',
|
|
180
|
+
'panels.market.dismissFollowUpYes': '不再提醒',
|
|
181
|
+
'panels.market.dismissed': '已不再提醒;旧数据仍在旧目录,需要时仍可运行 dsh-workbench migrate。',
|
|
165
182
|
'panels.market.workbenchName': '工作台',
|
|
166
183
|
'panels.market.pluginBroken': '这份插件装坏了:认不出它是什么。可以先卸载,再让 agent 按包名重装一次。',
|
|
167
184
|
'panels.market.restartNeeded': '新版装好了,重启一次才生效。',
|
|
@@ -245,7 +262,7 @@ export const zh = {
|
|
|
245
262
|
'panels.market.add.exampleTitle': '示例',
|
|
246
263
|
'panels.market.add.exampleFill': '填入示例',
|
|
247
264
|
'panels.market.add.registryLabel': '安装源',
|
|
248
|
-
'panels.market.add.registryProfile': '
|
|
265
|
+
'panels.market.add.registryProfile': '这份工作台配的源',
|
|
249
266
|
'panels.market.add.registryPnpm': 'pnpm 自己配的源',
|
|
250
267
|
'panels.market.add.check': '预检',
|
|
251
268
|
'panels.market.add.checking': '正在预检…',
|
|
@@ -266,12 +283,16 @@ export const zh = {
|
|
|
266
283
|
'panels.market.tabs': '模块市场的两个面',
|
|
267
284
|
'panels.tab.discover': '发现',
|
|
268
285
|
'panels.discover.loading': '正在读取索引',
|
|
286
|
+
'panels.discover.slowHint': '读取较慢:如有授权提示,先完成它,或换一个索引源。',
|
|
269
287
|
'panels.discover.lead': '从索引源浏览模块;装上就能用。',
|
|
270
288
|
'panels.discover.addSource': '添加',
|
|
271
289
|
'panels.discover.addingSource': '正在添加…',
|
|
272
290
|
'panels.discover.addFirstSource': '添加索引源',
|
|
273
291
|
'panels.discover.removeSource': '移除',
|
|
274
292
|
'panels.discover.removeSourceNamed': '移除 {url}',
|
|
293
|
+
'panels.discover.useSource': '使用',
|
|
294
|
+
'panels.discover.useSourceNamed': '使用 {label}',
|
|
295
|
+
'panels.discover.sourceCurrent': '当前使用',
|
|
275
296
|
'panels.discover.refresh': '刷新',
|
|
276
297
|
'panels.discover.search': '搜索模块',
|
|
277
298
|
'panels.discover.all': '全部',
|
|
@@ -283,8 +304,8 @@ export const zh = {
|
|
|
283
304
|
'panels.discover.sourcePlaceholder': 'https://example.com/index.json 或 git@git.example.com:wb/market.git',
|
|
284
305
|
'panels.discover.sourceRef': '分支',
|
|
285
306
|
'panels.discover.sourcePath': '索引文件',
|
|
286
|
-
'panels.discover.sourceLocal': '
|
|
287
|
-
'panels.discover.sourceLocalHint': '
|
|
307
|
+
'panels.discover.sourceLocal': '本地副本目录(可选)',
|
|
308
|
+
'panels.discover.sourceLocalHint': '不填就放到 ~/.dsh/workbench/market-index/。',
|
|
288
309
|
'panels.discover.save': '保存并刷新',
|
|
289
310
|
'panels.discover.cancel': '取消',
|
|
290
311
|
'panels.discover.retry': '重试',
|
|
@@ -297,9 +318,9 @@ export const zh = {
|
|
|
297
318
|
'panels.discover.missingIndex': '仓库里还没有索引文件 {path}',
|
|
298
319
|
'panels.discover.initTitle': '把这个仓库初始化成模块市场索引?',
|
|
299
320
|
'panels.discover.initCta': '初始化成市场索引',
|
|
300
|
-
'panels.discover.initWhat': '会在 {branch} 分支写 market.json 与 README.md
|
|
321
|
+
'panels.discover.initWhat': '会在 {branch} 分支写 market.json 与 README.md,提交一次并推上去;之后从这个工作台发布的模块会把打包好的文件提交到 packages/<unit>/。仓库的写权限归它的所有者。',
|
|
301
322
|
'panels.discover.initBranch': '分支',
|
|
302
|
-
'panels.discover.initBranchHint': '
|
|
323
|
+
'panels.discover.initBranchHint': '索引和打包文件都发到这个分支;空仓库会新建它。',
|
|
303
324
|
'panels.discover.initBranchBad': '分支名只能用字母、数字、点、下划线、斜杠或短横线',
|
|
304
325
|
'panels.discover.initOk': '初始化',
|
|
305
326
|
'panels.discover.initBusy': '正在初始化…',
|
|
@@ -403,11 +424,11 @@ export const zh = {
|
|
|
403
424
|
'panels.market.add.doneApplied': '装好了,已经生效。',
|
|
404
425
|
'panels.market.add.doneRestart': '装好了,重启一次才生效。',
|
|
405
426
|
'panels.market.add.restartWhy': '为什么这一版要重启:{reason}',
|
|
406
|
-
'panels.market.add.restartWhy.no-hmr': '
|
|
427
|
+
'panels.market.add.restartWhy.no-hmr': '这份配置只在启动时读一次,改了得重启',
|
|
407
428
|
'panels.market.add.restartWhy.package-moved': '某个已经装着的包换到了新的目录,或者这一下换掉了 dsh 自己提供的那份',
|
|
408
429
|
'panels.market.add.restartWhy.host-module': '这一下动到了 dsh 自己加载的模块',
|
|
409
|
-
'panels.market.add.restartWhy.unmanaged-plugin': '
|
|
410
|
-
'panels.market.add.restartWhy.module-comparison': 'dsh
|
|
430
|
+
'panels.market.add.restartWhy.unmanaged-plugin': '这一下动到了没登记过、正在运行的插件',
|
|
431
|
+
'panels.market.add.restartWhy.module-comparison': 'dsh 没法确认正在跑的插件就是这台机器上装好的那一份',
|
|
411
432
|
'panels.market.add.cancelled': '已取消。',
|
|
412
433
|
'panels.market.add.failed': '没成功:{reason}',
|
|
413
434
|
'panels.market.add.removed': '已经移除了。',
|
|
@@ -417,10 +438,10 @@ export const zh = {
|
|
|
417
438
|
'panels.market.add.removedRestart': '卸掉了,重启一次才彻底生效。',
|
|
418
439
|
'panels.market.add.remove': '移除它',
|
|
419
440
|
'panels.market.add.problem.invalidSpec': '这个写法不认:不能是空的,也不能以横杠开头。',
|
|
420
|
-
'panels.market.add.problem.alreadyInstalled': '
|
|
441
|
+
'panels.market.add.problem.alreadyInstalled': '这个包已经在这份工作台里了(要换版本请带上 @版本)。',
|
|
421
442
|
'panels.market.add.problem.notFound': '源上没有这个包。换个包名或版本再试。',
|
|
422
443
|
'panels.market.add.problem.notAPackage': '这个位置没有包。选一个包含 package.json 的目录。',
|
|
423
|
-
'panels.market.add.problem.notABundle': '它是一个 npm 包,但不是 dsh
|
|
444
|
+
'panels.market.add.problem.notABundle': '它是一个 npm 包,但不是 dsh 插件包(dsh 在里面找不到该加载什么)。',
|
|
424
445
|
'panels.market.add.problem.network': '源连不上。检查网络后重试。',
|
|
425
446
|
'panels.market.add.problem.unknown': '预检没通过(原因未知)。展开安装详情看原始输出,或重试。',
|
|
426
447
|
'panels.market.add.reason.invalidSpec': '写法不认',
|
|
@@ -428,7 +449,7 @@ export const zh = {
|
|
|
428
449
|
'panels.market.add.reason.notBundle': '它不是一个 dsh 插件包',
|
|
429
450
|
'panels.market.add.reason.notRemovable': '它是安装自带的组合包,不能卸',
|
|
430
451
|
'panels.market.add.reason.bundleInUse': '还有东西在用它,卸不掉',
|
|
431
|
-
'panels.market.add.reason.stopProfile': '
|
|
452
|
+
'panels.market.add.reason.stopProfile': '这份配置改了要重启,得先停掉工作台',
|
|
432
453
|
'panels.market.add.reason.staleApproval': '要允许的安装脚本已经变了,重新来一次',
|
|
433
454
|
'panels.market.add.reason.operationError': 'pnpm 执行出错(详情见安装输出)',
|
|
434
455
|
'panels.market.add.reason.buildBlocked': 'pnpm 拦下了安装脚本',
|
|
@@ -451,15 +472,15 @@ export const zh = {
|
|
|
451
472
|
'blocker.market.open': '去模块市场',
|
|
452
473
|
'blocker.login.title': '需要登录 {platform}',
|
|
453
474
|
'blocker.login.titleGeneric': '需要登录',
|
|
454
|
-
'blocker.login.hint': '
|
|
475
|
+
'blocker.login.hint': '工作台借你浏览器里的登录状态;登录一次就行,之后不用再登。',
|
|
455
476
|
'blocker.login.go': '去登录',
|
|
456
477
|
'blocker.login.manual': '在终端执行该插件的登录命令(见插件的文档),按提示完成登录后重试。',
|
|
457
478
|
'blocker.forbidden.title': '没有权限访问 {platform}',
|
|
458
479
|
'blocker.forbidden.titleGeneric': '没有权限',
|
|
459
480
|
'blocker.forbidden.hint': '账号已登录,但没有这个项目/仓库的权限;申请之后再试。',
|
|
460
481
|
'blocker.forbidden.open': '打开权限页',
|
|
461
|
-
'blocker.timeout.hint': '
|
|
462
|
-
'blocker.exec.hint': '确认 opencli
|
|
482
|
+
'blocker.timeout.hint': '后台浏览器没起来,重试一次通常就好。',
|
|
483
|
+
'blocker.exec.hint': '确认 opencli 已经装好、在终端里能直接运行(which opencli)。',
|
|
463
484
|
'blocker.unknown.title': '出了点问题',
|
|
464
485
|
'panels.reading': '正在读取面板配置…',
|
|
465
486
|
'panels.cardBroken': '这个模块起不来:{unit}({reason})',
|
|
@@ -473,7 +494,7 @@ export const zh = {
|
|
|
473
494
|
'env.elapsed': '已等待 {seconds} 秒',
|
|
474
495
|
'env.stepFailed.install': '装不上',
|
|
475
496
|
'env.stepFailed.path': '装了但还找不到',
|
|
476
|
-
'env.stepFailed.shell': '
|
|
497
|
+
'env.stepFailed.shell': '连不上命令行',
|
|
477
498
|
'env.toolchain.ok': '正常',
|
|
478
499
|
'env.toolchain.warn': '还没完全准备好',
|
|
479
500
|
'env.opencli.ok': '已就绪',
|
|
@@ -490,10 +511,10 @@ export const zh = {
|
|
|
490
511
|
'env.fix.title': '怎么解决',
|
|
491
512
|
'env.fix.why': '工作台用它自己那份后台工具(与你在终端里那套分开装,互不影响),这台机器上还没装好它。',
|
|
492
513
|
'env.fix.whyPath': '后台工具装上了,但当前环境还找不到它 —— 通常是 PATH 或终端会话的问题。',
|
|
493
|
-
'env.fix.whyShell': '
|
|
514
|
+
'env.fix.whyShell': '工作台拿不到这台机器的命令行,所以取不了数据 —— 这一步你装不了,需要有人处理后台环境。',
|
|
494
515
|
'env.fix.step': '在终端里运行下面这条命令,装好之后点「重试」:',
|
|
495
516
|
'env.fix.stepPath': '新开一个终端窗口(或确认 npm 的全局 bin 目录在 PATH 里),然后点「重试」。',
|
|
496
|
-
'env.fix.stepShell': '重启一次工作台(或 dsh
|
|
517
|
+
'env.fix.stepShell': '重启一次工作台(或 dsh);如果反复出现,说明工作台还是拿不到命令行。',
|
|
497
518
|
'env.fix.permission': '权限不够:在命令前加 sudo 重跑,或先把 npm 的全局目录配到你的用户目录。',
|
|
498
519
|
'env.fix.network': '网络不通:检查网络或代理设置后重试。',
|
|
499
520
|
'env.fix.details': '详细输出(排障用)',
|
|
@@ -522,9 +543,9 @@ export const zh = {
|
|
|
522
543
|
'env.warm.done': '已就绪({n} 个站点)',
|
|
523
544
|
'env.warm.short': '这次没提前连上 —— 不影响用,第一次取数会自己补',
|
|
524
545
|
'env.unit.failed': '这个模块起不来',
|
|
525
|
-
'env.unit.failedHint': '
|
|
526
|
-
'env.unit.unchecked': '
|
|
527
|
-
'env.unit.uncheckedHint': '
|
|
546
|
+
'env.unit.failedHint': '它自己启动时报了错,别的模块不受影响。',
|
|
547
|
+
'env.unit.unchecked': '检测不了:拿不到命令行',
|
|
548
|
+
'env.unit.uncheckedHint': '不是这个模块的问题,是工作台拿不到命令行 —— 重启一次工作台再试。',
|
|
528
549
|
'adapterSet.not-configured': '没配置适配器集合,用默认的。',
|
|
529
550
|
'adapterSet.no-profile': '找不到 profile,没法加载适配器集合;先用默认的。',
|
|
530
551
|
'adapterSet.malformed': '适配器集合要写包名(如 @acme/adapters-set);先用默认的。',
|
|
@@ -567,7 +588,7 @@ export const zh = {
|
|
|
567
588
|
'sidebarEdition.official': '官方',
|
|
568
589
|
'sidebarEdition.officialHint': '跟 dsh 官方一致、最稳:搜索、视图选项、显示更多、归档、添加工作区都齐,升级也不等我们适配。想省心就选它。',
|
|
569
590
|
'sidebarEdition.custom': '自定义',
|
|
570
|
-
'sidebarEdition.customHint': '
|
|
591
|
+
'sidebarEdition.customHint': '为多项目工作流做的:项目下拉一屏一个项目,会话按最近更新排,名字自动滚动、两侧渐隐,工坊 DIY 新会话。项目多时更顺手。',
|
|
571
592
|
'sidebarEdition.saving': '配置中…',
|
|
572
593
|
'sidebarEdition.reloadRequired': '已写入。刷新页面后生效(不用重启工作台)。',
|
|
573
594
|
'sidebarEdition.reload': '刷新页面',
|
|
@@ -596,25 +617,25 @@ export const zh = {
|
|
|
596
617
|
'record.act.halt': '停',
|
|
597
618
|
'approval.record.site': '站点',
|
|
598
619
|
'approval.record.what': '录制功能',
|
|
599
|
-
'approval.record.lands': '
|
|
620
|
+
'approval.record.lands': '保存到',
|
|
600
621
|
'approval.record.noUrl': '没给站点地址(这次会被当场拒)',
|
|
601
622
|
'approval.record.oneAction': '一次操作',
|
|
602
623
|
'approval.record.noSwitch': '录完不会替你切回来(左栏底部会亮一条状态)',
|
|
603
|
-
'approval.longTask.what': '
|
|
604
|
-
'approval.longTask.signal': '停了只是让工作台发出中断信号 ——
|
|
624
|
+
'approval.longTask.what': '要停的那次任务',
|
|
625
|
+
'approval.longTask.signal': '停了只是让工作台发出中断信号 —— 这次任务怎么收尾由模块自己负责',
|
|
605
626
|
'approval.publish.module': '模块',
|
|
606
627
|
'approval.publish.target': '目标',
|
|
607
628
|
'approval.publish.version': '版本',
|
|
608
629
|
'approval.publish.author': '作者',
|
|
609
|
-
'approval.publish.authorMissing': '
|
|
630
|
+
'approval.publish.authorMissing': '未署名',
|
|
610
631
|
'approval.publish.registry': '源',
|
|
611
632
|
'approval.publish.repo': '仓库',
|
|
612
633
|
'approval.publish.branch': '分支',
|
|
613
634
|
'approval.publish.defaultBranch': '默认分支',
|
|
614
|
-
'approval.publish.artifacts': '
|
|
635
|
+
'approval.publish.artifacts': '打包文件',
|
|
615
636
|
'approval.publish.index': '索引',
|
|
616
637
|
'approval.publish.commits': '提交',
|
|
617
|
-
'approval.publish.twoCommits': '
|
|
638
|
+
'approval.publish.twoCommits': '打包文件 + market.json 两次提交,一次推送',
|
|
618
639
|
'approval.publish.reading': '读取中…',
|
|
619
640
|
'approval.publish.changelog': '{version} 的更新日志',
|
|
620
641
|
'approval.publish.changelogMissing': '这一版还没有更新日志({version}),发布会被拦下',
|
package/dist/lib/dsh-client.d.ts
CHANGED
|
@@ -121,11 +121,13 @@ export interface DshSlots {
|
|
|
121
121
|
onMutate?(callback: (name: string) => void): () => void;
|
|
122
122
|
}
|
|
123
123
|
/**
|
|
124
|
-
* dsh
|
|
124
|
+
* dsh 的语言服务:按命名空间注册字典,再取回那个命名空间的文案函数;
|
|
125
|
+
* `resolveText` 按当前语言取一份字面量(字符串原样返回,映射按语言回退链取)。
|
|
125
126
|
*/
|
|
126
127
|
export interface DshLocale {
|
|
127
128
|
register(namespace: string, dictionaries: Record<string, Record<string, string>>): () => void;
|
|
128
129
|
bind(namespace: string): Translate;
|
|
130
|
+
resolveText?(text: string | Readonly<Record<string, string | undefined>>): string;
|
|
129
131
|
}
|
|
130
132
|
/**
|
|
131
133
|
* dsh 的布局服务:选面板、开关左栏、开合右栏;右栏宽度经可选的 panels 写。
|
package/package.json
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { unitTitleKey } from '../unit.js';
|
|
2
3
|
import { declarationProblemsOf, readDeclaration } from '../unit-declaration.js';
|
|
3
4
|
|
|
4
5
|
const declared = (tools: unknown) => ({
|
|
5
|
-
apiVersion:
|
|
6
|
+
apiVersion: 3,
|
|
6
7
|
unit: 'demo',
|
|
8
|
+
title: { zh: '演示', en: 'Demo' },
|
|
7
9
|
card: null,
|
|
8
10
|
tools,
|
|
9
11
|
host: { inject: [] },
|
|
@@ -50,3 +52,33 @@ describe('清单里的工具声明', () => {
|
|
|
50
52
|
expect(read.manifest?.tools).toEqual([{ name: 'workbench_demo_sync', writes: true }]);
|
|
51
53
|
});
|
|
52
54
|
});
|
|
55
|
+
|
|
56
|
+
describe('清单里的名字(v3 起名字在顶层,是字面量)', () => {
|
|
57
|
+
it('中英各一份,都有就过', () => {
|
|
58
|
+
expect(declarationProblemsOf('@t/demo', declared([]))).toEqual([]);
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
it('少一门 / 空串 → 红,点名那一门', () => {
|
|
62
|
+
expect(declarationProblemsOf('@t/demo', { ...declared([]), title: { zh: '演示' } }).join('\n')).toMatch(
|
|
63
|
+
/title\.en/,
|
|
64
|
+
);
|
|
65
|
+
expect(
|
|
66
|
+
declarationProblemsOf('@t/demo', { ...declared([]), title: { zh: '演示', en: ' ' } }).join('\n'),
|
|
67
|
+
).toMatch(/title\.en 要是非空字符串/);
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
it('★ v2 的老写法(card.titleKey)被点名,并给出迁移提示', () => {
|
|
71
|
+
const v2 = { ...declared([]), apiVersion: 2, card: { titleKey: 'demo.cardTitle', order: 7 } };
|
|
72
|
+
expect(declarationProblemsOf('@t/demo', v2).join('\n')).toMatch(/v3 把卡片标题挪成了顶层/);
|
|
73
|
+
const keyOnly = { ...declared([]), card: { titleKey: 'demo.cardTitle', order: 7 } };
|
|
74
|
+
expect(declarationProblemsOf('@t/demo', keyOnly).join('\n')).toMatch(/不认的键/);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('★ 清单里的名字键由外壳合成:模块不用写、也别想写', () => {
|
|
78
|
+
const read = readDeclaration('@t/demo', { ...declared([]), card: { order: 7 } });
|
|
79
|
+
|
|
80
|
+
expect(read.problems).toEqual([]);
|
|
81
|
+
expect(read.manifest?.title).toEqual({ zh: '演示', en: 'Demo' });
|
|
82
|
+
expect(read.manifest?.card).toEqual({ titleKey: unitTitleKey('demo'), order: 7 });
|
|
83
|
+
});
|
|
84
|
+
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { UnitTitle } from '../unit.js';
|
|
2
|
+
|
|
1
3
|
export const BUNDLE_REGISTRIES_ROUTE = 'bundle-registries';
|
|
2
4
|
|
|
3
5
|
export const BUNDLE_INSPECT_ROUTE = 'bundle-inspect';
|
|
@@ -80,7 +82,6 @@ export interface WorkbenchSelfUpdate {
|
|
|
80
82
|
readonly version?: string;
|
|
81
83
|
readonly at?: string;
|
|
82
84
|
readonly tail?: string;
|
|
83
|
-
readonly migration?: 'needed';
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
export const RESTART_REASONS = [
|
|
@@ -175,11 +176,15 @@ export interface BundleCancellationPayload {
|
|
|
175
176
|
readonly cancellation: BundleCancellation | null;
|
|
176
177
|
}
|
|
177
178
|
|
|
179
|
+
export type ModuleUpdateBlock = 'needs-workbench' | 'incompatible';
|
|
180
|
+
|
|
178
181
|
export interface ModuleVersion {
|
|
179
182
|
readonly unit: string;
|
|
180
183
|
readonly pkg: string;
|
|
181
184
|
readonly installed: string;
|
|
185
|
+
readonly title?: UnitTitle;
|
|
182
186
|
readonly latest?: string;
|
|
187
|
+
readonly latestBlocked?: ModuleUpdateBlock;
|
|
183
188
|
readonly local?: boolean;
|
|
184
189
|
readonly refused?: readonly string[];
|
|
185
190
|
}
|
|
@@ -190,6 +195,11 @@ export interface WorkbenchVersion {
|
|
|
190
195
|
readonly latest?: string;
|
|
191
196
|
readonly running?: string;
|
|
192
197
|
readonly local?: boolean;
|
|
198
|
+
readonly followUp?: {
|
|
199
|
+
readonly id: string;
|
|
200
|
+
readonly kind: 'data-migration';
|
|
201
|
+
readonly hard: boolean;
|
|
202
|
+
};
|
|
193
203
|
}
|
|
194
204
|
|
|
195
205
|
export interface ModuleVersionsPayload {
|
|
@@ -4,6 +4,7 @@ export const MARKET_DISCOVER_ROUTE = 'panels/market-discover';
|
|
|
4
4
|
export const MARKET_DOC_ROUTE = 'panels/market-doc';
|
|
5
5
|
export const MARKET_PUBLISH_PREVIEW_ROUTE = 'panels/market-publish-preview';
|
|
6
6
|
export const MARKET_SOURCES_RESOURCE = 'market-sources';
|
|
7
|
+
export const MARKET_SOURCES_ROUTE = 'panels/market-sources';
|
|
7
8
|
export const MARKET_WORKBENCH_LABEL = 'workbench';
|
|
8
9
|
|
|
9
10
|
export type MarketSourceKind = 'http' | 'git';
|