dsh-supermesh 0.0.3 → 0.0.4

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/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as project, c as shell, d as singlet, f as setting, g as db, h as channelProxyEnvironment, i as archive, l as inbox, m as DSH_PLUGIN_HOME, n as server, o as worktree, p as defineService, r as worker$1, s as devops, t as channel, u as session } from "./channel-eDqcOvFj.js";
1
+ import { a as project, c as shell, d as singlet, f as setting, g as db, h as channelProxyEnvironment, i as archive, l as inbox, m as DSH_PLUGIN_HOME, n as server, o as worktree, p as defineService, r as worker$1, s as devops, t as channel, u as session } from "./channel-C1d93AhN.js";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { dirname, join, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
@@ -417,7 +417,7 @@ function* answerLines(body) {
417
417
  }
418
418
  }
419
419
  // src/channel/_shared/ci.ts
420
- /** 分支 CI 变更落成 ciWatch、ci 话题、触发与项目通知。silent 为真时首轮不打扰。 */
420
+ /** 分支 CI 变更落成 ciWatch、ci 话题与触发;只有订阅了这条话题的票才收到通知。 */
421
421
  async function notifyBranchCi(input) {
422
422
  const { row: watch } = await db.ciWatch.recordRevision({
423
423
  id: `${input.channel}:${input.ref}`,
@@ -457,17 +457,22 @@ async function notifyBranchCi(input) {
457
457
  at: now(),
458
458
  ref: input.head
459
459
  });
460
- await db.inbox.enqueue({
461
- id: `${triggerId}:project:${input.projectId}`,
462
- type: "project",
463
- origin: "system",
464
- kind: "notice",
465
- projectId: input.projectId,
466
- triggerId,
467
- threadId,
468
- title: input.message,
469
- message: input.message
470
- });
460
+ for (const ticketId of await db.ticketThread.listTicketIds(threadId)) {
461
+ const ticket = await db.ticket.findById(ticketId);
462
+ if (!ticket || ["done", "cancelled"].includes(ticket.status)) continue;
463
+ await db.inbox.enqueue({
464
+ id: `${triggerId}:ticket:${ticketId}`,
465
+ type: "project",
466
+ origin: "system",
467
+ kind: "notice",
468
+ projectId: ticket.projectId,
469
+ ticketId,
470
+ triggerId,
471
+ threadId,
472
+ title: input.message,
473
+ message: input.message
474
+ });
475
+ }
471
476
  }
472
477
  // src/channel/github/service/resource.ts
473
478
  const resource$1 = defineService({
@@ -0,0 +1 @@
1
+ export { c as shell } from "./channel-C1d93AhN.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-supermesh",
3
3
  "type": "module",
4
- "version": "0.0.3",
4
+ "version": "0.0.4",
5
5
  "description": "把 GitHub / GitLab 的 issue、PR 与评论变成任务,交给各自 worktree 里的 Worker 改代码、开 PR,再由上级代理验收收尾。",
6
6
  "author": "Hairy <wwu710632@gmail.com>",
7
7
  "license": "MIT",
@@ -1 +0,0 @@
1
- export { c as shell } from "./channel-eDqcOvFj.js";