plugin-git-manager 1.1.3 → 1.1.6
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,7 +273,7 @@ async function runReview(app, args) {
|
|
|
273
273
|
db,
|
|
274
274
|
state: { currentUser: args.userId ? { id: args.userId } : null },
|
|
275
275
|
auth: { user: args.userId ? { id: args.userId } : { id: null } },
|
|
276
|
-
req: { headers: { "x-timezone": "
|
|
276
|
+
req: { headers: { "x-timezone": "+00:00", "x-locale": "en-US" } },
|
|
277
277
|
log: app.logger || console,
|
|
278
278
|
get(name) {
|
|
279
279
|
return this.req.headers[String(name).toLowerCase()];
|
package/dist/server/plugin.js
CHANGED
|
@@ -49,13 +49,13 @@ var pollerActions = __toESM(require("./actions/poller"));
|
|
|
49
49
|
var import_review = require("./actions/review");
|
|
50
50
|
var import_ai_tools = require("./ai-tools");
|
|
51
51
|
var import_poller = require("./poller");
|
|
52
|
-
var import_dayjs = __toESM(require("dayjs"));
|
|
53
|
-
var import_utc = __toESM(require("dayjs/plugin/utc"));
|
|
54
|
-
var import_timezone = __toESM(require("dayjs/plugin/timezone"));
|
|
55
|
-
import_dayjs.default.extend(import_utc.default);
|
|
56
|
-
import_dayjs.default.extend(import_timezone.default);
|
|
57
52
|
class PluginGitManagerServer extends import_server.Plugin {
|
|
58
53
|
async load() {
|
|
54
|
+
const dayjsLib = require("dayjs");
|
|
55
|
+
const utcPlugin = require("dayjs/plugin/utc");
|
|
56
|
+
const timezonePlugin = require("dayjs/plugin/timezone");
|
|
57
|
+
dayjsLib.extend(utcPlugin);
|
|
58
|
+
dayjsLib.extend(timezonePlugin);
|
|
59
59
|
await this.db.import({
|
|
60
60
|
directory: (0, import_path.resolve)(__dirname, "collections")
|
|
61
61
|
});
|
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.1.
|
|
6
|
+
"version": "1.1.6",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "dist/server/index.js",
|
|
9
9
|
"files": [
|
|
@@ -341,7 +341,7 @@ async function runReview(app: Application, args: RunReviewArgs) {
|
|
|
341
341
|
db,
|
|
342
342
|
state: { currentUser: args.userId ? { id: args.userId } : null },
|
|
343
343
|
auth: { user: args.userId ? { id: args.userId } : { id: null } },
|
|
344
|
-
req: { headers: { 'x-timezone': '
|
|
344
|
+
req: { headers: { 'x-timezone': '+00:00', 'x-locale': 'en-US' } },
|
|
345
345
|
log: app.logger || console,
|
|
346
346
|
get(name: string) {
|
|
347
347
|
return this.req.headers[String(name).toLowerCase()];
|
package/src/server/plugin.ts
CHANGED
|
@@ -8,16 +8,16 @@ import { recoverStuckReviews } from './actions/review';
|
|
|
8
8
|
import { registerGitReviewAiTools } from './ai-tools';
|
|
9
9
|
import { startPoller, stopPoller } from './poller';
|
|
10
10
|
|
|
11
|
-
// Ensure dayjs timezone + utc plugins are loaded globally to prevent 'm.startOf is not a function' errors
|
|
12
|
-
// when NocoBase core or plugin-ai try to parse dates or times asynchronously.
|
|
13
|
-
import dayjsLib from 'dayjs';
|
|
14
|
-
import utcPlugin from 'dayjs/plugin/utc';
|
|
15
|
-
import timezonePlugin from 'dayjs/plugin/timezone';
|
|
16
|
-
(dayjsLib as any).extend(utcPlugin);
|
|
17
|
-
(dayjsLib as any).extend(timezonePlugin);
|
|
18
11
|
|
|
19
12
|
export class PluginGitManagerServer extends Plugin {
|
|
20
13
|
async load() {
|
|
14
|
+
// Ensure dayjs timezone + utc plugins are loaded globally to prevent 'm.startOf is not a function' errors
|
|
15
|
+
const dayjsLib = require('dayjs');
|
|
16
|
+
const utcPlugin = require('dayjs/plugin/utc');
|
|
17
|
+
const timezonePlugin = require('dayjs/plugin/timezone');
|
|
18
|
+
dayjsLib.extend(utcPlugin);
|
|
19
|
+
dayjsLib.extend(timezonePlugin);
|
|
20
|
+
|
|
21
21
|
await this.db.import({
|
|
22
22
|
directory: resolve(__dirname, 'collections'),
|
|
23
23
|
});
|