plugin-git-manager 1.0.11 → 1.1.1

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.
@@ -273,6 +273,7 @@ async function runReview(app, args) {
273
273
  db,
274
274
  state: { currentUser: args.userId ? { id: args.userId } : null },
275
275
  req: { headers: { "x-timezone": "UTC", "x-locale": "en-US" } },
276
+ log: app.logger || console,
276
277
  get(name) {
277
278
  return this.req.headers[String(name).toLowerCase()];
278
279
  },
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
2
2
  export default _default;
@@ -1,2 +1,2 @@
1
- declare const _default: any;
1
+ declare const _default: import("@nocobase/database").CollectionOptions;
2
2
  export default _default;
@@ -79,6 +79,18 @@ class PluginGitManagerServer extends import_server.Plugin {
79
79
  pollerStatus: pollerActions.pollerStatus
80
80
  }
81
81
  });
82
+ this.app.use(async (ctx, next) => {
83
+ if (ctx.logger && ctx.logger.warn) {
84
+ const originalWarn = ctx.logger.warn.bind(ctx.logger);
85
+ ctx.logger.warn = (message, ...args) => {
86
+ if (typeof message === "string" && message.includes("[Workflow") && message.includes("collection") && message.includes("not found")) {
87
+ return ctx.logger;
88
+ }
89
+ return originalWarn(message, ...args);
90
+ };
91
+ }
92
+ return next();
93
+ });
82
94
  (0, import_ai_tools.registerGitReviewAiTools)(this.app);
83
95
  this.app.on("afterStart", () => {
84
96
  (0, import_review.recoverStuckReviews)(this.app).catch(
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Git Manager",
4
4
  "displayName.zh-CN": "Git 管理器",
5
5
  "description": "Manage Git repositories with PAT authentication - pull, push, fetch, diff, file browsing",
6
- "version": "1.0.11",
6
+ "version": "1.1.1",
7
7
  "license": "Apache-2.0",
8
8
  "main": "dist/server/index.js",
9
9
  "files": [
@@ -341,6 +341,7 @@ async function runReview(app: Application, args: RunReviewArgs) {
341
341
  db,
342
342
  state: { currentUser: args.userId ? { id: args.userId } : null },
343
343
  req: { headers: { 'x-timezone': 'UTC', 'x-locale': 'en-US' } },
344
+ log: app.logger || console,
344
345
  get(name: string) {
345
346
  return this.req.headers[String(name).toLowerCase()];
346
347
  },
@@ -40,6 +40,25 @@ export class PluginGitManagerServer extends Plugin {
40
40
  },
41
41
  });
42
42
 
43
+ // Suppress noisy workflow pre-action/post-action warnings for custom resources
44
+ this.app.use(async (ctx, next) => {
45
+ if (ctx.logger && ctx.logger.warn) {
46
+ const originalWarn = ctx.logger.warn.bind(ctx.logger);
47
+ ctx.logger.warn = (message: any, ...args: any[]) => {
48
+ if (
49
+ typeof message === 'string' &&
50
+ message.includes('[Workflow') &&
51
+ message.includes('collection') &&
52
+ message.includes('not found')
53
+ ) {
54
+ return ctx.logger;
55
+ }
56
+ return originalWarn(message, ...args);
57
+ };
58
+ }
59
+ return next();
60
+ });
61
+
43
62
  registerGitReviewAiTools(this.app);
44
63
 
45
64
  this.app.on('afterStart', () => {