dsh-workbench-tasks 5.13.1 → 5.13.2
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/lib/client.js +1 -1
- package/lib/infra/sync.js +11 -7
- package/package.json +3 -3
package/lib/client.js
CHANGED
|
@@ -13239,7 +13239,7 @@ var require_timeline_view = __commonJS({
|
|
|
13239
13239
|
var TimelineView = require_timeline_view()({ React, COPY, injectCss, statusInfo, configClient, CFG_FALLBACK, TaskItem, EditModal, DoneModal, TimelineModal, CreateModal });
|
|
13240
13240
|
host.registerAddon({
|
|
13241
13241
|
id: "wb-addon-tasks",
|
|
13242
|
-
version: "5.13.
|
|
13242
|
+
version: "5.13.2",
|
|
13243
13243
|
icon: ICONS["list-checks"],
|
|
13244
13244
|
// 贡献声明写在 registerAddon 里:卸载任务插件时宿主按 addonId 一起撤销,
|
|
13245
13245
|
// 不会在邮件里留一个渲染即报错的孤儿按钮。
|
package/lib/infra/sync.js
CHANGED
|
@@ -160,8 +160,12 @@ export function reconcileTaskTree(remoteRows, localRows) {
|
|
|
160
160
|
/**
|
|
161
161
|
* 工作区关联的行级同步:id 由 workspace_id + ":" + task_id 决定,
|
|
162
162
|
* 校验不通过直接阻断本轮同步,避免多设备合并出找不到父行的半行。
|
|
163
|
+
*
|
|
164
|
+
* 宿主 normalizeIncoming 的入参是上下文 `{db,row,local}`,不是行本身
|
|
165
|
+
* (见 packages/shell/src/sync/sync-incoming.ts:58-59),必须解构出 row,
|
|
166
|
+
* 否则 workspace_id / task_id 永远是 undefined,整表关联会被全量拒绝。
|
|
163
167
|
*/
|
|
164
|
-
function normalizeWorkspaceLink(row) {
|
|
168
|
+
function normalizeWorkspaceLink({ row }) {
|
|
165
169
|
const workspaceId = String(row.workspace_id || row.workspaceId || '').trim();
|
|
166
170
|
const taskId = String(row.task_id || row.taskId || '').trim();
|
|
167
171
|
if (!workspaceId || !taskId) {
|
|
@@ -179,12 +183,12 @@ function normalizeWorkspaceLink(row) {
|
|
|
179
183
|
|
|
180
184
|
export const taskSync = {
|
|
181
185
|
tables: [
|
|
182
|
-
{ name: "task",
|
|
183
|
-
{ name: "task_timeline",
|
|
184
|
-
{ name: "task_timeline_link",
|
|
185
|
-
{ name: "task_workspace"
|
|
186
|
-
{ name: "task_workspace_link",
|
|
187
|
-
{ name: "task_node",
|
|
186
|
+
{ name: "task", normalizeIncoming: normalizeTimelineTask, afterApply: afterTimelineTask },
|
|
187
|
+
{ name: "task_timeline", afterApply: afterTimelineEntity },
|
|
188
|
+
{ name: "task_timeline_link", normalizeIncoming: normalizeTimelineLink, afterApply: afterTimelineLink },
|
|
189
|
+
{ name: "task_workspace" },
|
|
190
|
+
{ name: "task_workspace_link", normalizeIncoming: normalizeWorkspaceLink },
|
|
191
|
+
{ name: "task_node", strategy: "whole", reconcile: reconcileTaskTree },
|
|
188
192
|
// 配置方案已交给宿主统一配置中心(host_config_scheme),由宿主自己决定同步策略,本域不再声明。
|
|
189
193
|
],
|
|
190
194
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-workbench-tasks",
|
|
3
|
-
"version": "5.13.
|
|
3
|
+
"version": "5.13.2",
|
|
4
4
|
"description": "个人工作台任务插件:任务树、优先级、截止日、时间线与重启",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"id": "wb-addon-tasks",
|
|
18
18
|
"title": "任务",
|
|
19
19
|
"description": "任务树 + 统计/记录/时间线/工作区四个视图:紧急/已关闭/已开启/已完成/总览,可按标签筛选,附统计报表;配置项由宿主统一配置中心渲染",
|
|
20
|
-
"version": "5.13.
|
|
20
|
+
"version": "5.13.2",
|
|
21
21
|
"minShell": "0.21.0",
|
|
22
22
|
"tables": [
|
|
23
23
|
"task",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"./package.json": "./package.json"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"dsh-workbench-host": "^0.30.
|
|
94
|
+
"dsh-workbench-host": "^0.30.2"
|
|
95
95
|
},
|
|
96
96
|
"dsh": {
|
|
97
97
|
"bundle": {
|