@octo-cyber/log-analysis 0.5.0 → 0.5.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/dist/controllers/log-analysis.controller.js +4 -4
- package/dist/controllers/log-analysis.controller.js.map +1 -1
- package/dist/controllers/retention-rule.controller.js +7 -7
- package/dist/controllers/retention-rule.controller.js.map +1 -1
- package/dist/entities/operation-log.entity.js +8 -8
- package/dist/entities/retention-rule.entity.js +2 -2
- package/dist/schemas/log-analysis.schema.d.ts +62 -62
- package/package.json +12 -1
|
@@ -52,24 +52,24 @@ let LogAnalysisController = class LogAnalysisController {
|
|
|
52
52
|
};
|
|
53
53
|
exports.LogAnalysisController = LogAnalysisController;
|
|
54
54
|
__decorate([
|
|
55
|
-
(0, core_1.Post)('/'),
|
|
55
|
+
(0, core_1.Post)('/', { summary: '创建' }),
|
|
56
56
|
__metadata("design:type", Function),
|
|
57
57
|
__metadata("design:paramtypes", [Object, Object]),
|
|
58
58
|
__metadata("design:returntype", Promise)
|
|
59
59
|
], LogAnalysisController.prototype, "write", null);
|
|
60
60
|
__decorate([
|
|
61
|
-
(0, core_1.Get)('/'),
|
|
61
|
+
(0, core_1.Get)('/', { summary: '列表查询' }),
|
|
62
62
|
__metadata("design:type", Function),
|
|
63
63
|
__metadata("design:paramtypes", [Object, Object]),
|
|
64
64
|
__metadata("design:returntype", Promise)
|
|
65
65
|
], LogAnalysisController.prototype, "findLogs", null);
|
|
66
66
|
__decorate([
|
|
67
|
-
(0, core_1.Get)('/stats'),
|
|
67
|
+
(0, core_1.Get)('/stats', { summary: '统计' }),
|
|
68
68
|
__metadata("design:type", Function),
|
|
69
69
|
__metadata("design:paramtypes", [Object, Object]),
|
|
70
70
|
__metadata("design:returntype", Promise)
|
|
71
71
|
], LogAnalysisController.prototype, "getStats", null);
|
|
72
72
|
exports.LogAnalysisController = LogAnalysisController = __decorate([
|
|
73
|
-
(0, core_1.Controller)('/api/v1/logs')
|
|
73
|
+
(0, core_1.Controller)('/api/v1/logs', { name: 'Logs Logs', tags: ["Logs"] })
|
|
74
74
|
], LogAnalysisController);
|
|
75
75
|
//# sourceMappingURL=log-analysis.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"log-analysis.controller.js","sourceRoot":"","sources":["../../src/controllers/log-analysis.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAA+F;AAC/F,6EAAqE;AACrE,2EAAmE;AACnE,8EAAmF;AAG5E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,IAAY,MAAM;QAChB,OAAO,gBAAS,CAAC,GAAG,CAAC,wCAAgB,CAAC,CAAC;IACzC,CAAC;IAED,IAAY,KAAK;QACf,OAAO,gBAAS,CAAC,GAAG,CAAC,sCAAe,CAAC,CAAC;IACxC,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,KAAK,CAAC,GAAY,EAAE,GAAa;QACrC,MAAM,GAAG,GAAG,IAAA,mBAAY,EAAC,uCAAc,EAAE,GAAG,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"log-analysis.controller.js","sourceRoot":"","sources":["../../src/controllers/log-analysis.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAA+F;AAC/F,6EAAqE;AACrE,2EAAmE;AACnE,8EAAmF;AAG5E,IAAM,qBAAqB,GAA3B,MAAM,qBAAqB;IAChC,IAAY,MAAM;QAChB,OAAO,gBAAS,CAAC,GAAG,CAAC,wCAAgB,CAAC,CAAC;IACzC,CAAC;IAED,IAAY,KAAK;QACf,OAAO,gBAAS,CAAC,GAAG,CAAC,sCAAe,CAAC,CAAC;IACxC,CAAC;IAED;;;OAGG;IAEG,AAAN,KAAK,CAAC,KAAK,CAAC,GAAY,EAAE,GAAa;QACrC,MAAM,GAAG,GAAG,IAAA,mBAAY,EAAC,uCAAc,EAAE,GAAG,CAAC,IAAI,CAA4D,CAAC;QAC9G,MAAM,GAAG,GAAG,MAAM,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I,EAAC,GAAG,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;;;kDAK5B;AAOK;IADL,IAAA,UAAG,EAAC,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;;;;qDAK7B;AAOK;IADL,IAAA,UAAG,EAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;;;;qDAMhC;gCAzCU,qBAAqB;IADjC,IAAA,iBAAU,EAAC,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;GACrD,qBAAqB,CA0CjC"}
|
|
@@ -56,42 +56,42 @@ let RetentionRuleController = class RetentionRuleController {
|
|
|
56
56
|
};
|
|
57
57
|
exports.RetentionRuleController = RetentionRuleController;
|
|
58
58
|
__decorate([
|
|
59
|
-
(0, core_1.Get)('/'),
|
|
59
|
+
(0, core_1.Get)('/', { summary: '列表查询' }),
|
|
60
60
|
__metadata("design:type", Function),
|
|
61
61
|
__metadata("design:paramtypes", [Object, Object]),
|
|
62
62
|
__metadata("design:returntype", Promise)
|
|
63
63
|
], RetentionRuleController.prototype, "findAll", null);
|
|
64
64
|
__decorate([
|
|
65
|
-
(0, core_1.Get)('/:id'),
|
|
65
|
+
(0, core_1.Get)('/:id', { summary: '详情查询' }),
|
|
66
66
|
__metadata("design:type", Function),
|
|
67
67
|
__metadata("design:paramtypes", [Object, Object]),
|
|
68
68
|
__metadata("design:returntype", Promise)
|
|
69
69
|
], RetentionRuleController.prototype, "findOne", null);
|
|
70
70
|
__decorate([
|
|
71
|
-
(0, core_1.Post)('/'),
|
|
71
|
+
(0, core_1.Post)('/', { summary: '创建' }),
|
|
72
72
|
__metadata("design:type", Function),
|
|
73
73
|
__metadata("design:paramtypes", [Object, Object]),
|
|
74
74
|
__metadata("design:returntype", Promise)
|
|
75
75
|
], RetentionRuleController.prototype, "create", null);
|
|
76
76
|
__decorate([
|
|
77
|
-
(0, core_1.Put)('/:id'),
|
|
77
|
+
(0, core_1.Put)('/:id', { summary: '更新' }),
|
|
78
78
|
__metadata("design:type", Function),
|
|
79
79
|
__metadata("design:paramtypes", [Object, Object]),
|
|
80
80
|
__metadata("design:returntype", Promise)
|
|
81
81
|
], RetentionRuleController.prototype, "update", null);
|
|
82
82
|
__decorate([
|
|
83
|
-
(0, core_1.Delete)('/:id'),
|
|
83
|
+
(0, core_1.Delete)('/:id', { summary: '删除' }),
|
|
84
84
|
__metadata("design:type", Function),
|
|
85
85
|
__metadata("design:paramtypes", [Object, Object]),
|
|
86
86
|
__metadata("design:returntype", Promise)
|
|
87
87
|
], RetentionRuleController.prototype, "remove", null);
|
|
88
88
|
__decorate([
|
|
89
|
-
(0, core_1.Post)('/apply'),
|
|
89
|
+
(0, core_1.Post)('/apply', { summary: '创建' }),
|
|
90
90
|
__metadata("design:type", Function),
|
|
91
91
|
__metadata("design:paramtypes", [Object, Object]),
|
|
92
92
|
__metadata("design:returntype", Promise)
|
|
93
93
|
], RetentionRuleController.prototype, "apply", null);
|
|
94
94
|
exports.RetentionRuleController = RetentionRuleController = __decorate([
|
|
95
|
-
(0, core_1.Controller)('/api/v1/log-retention-rules')
|
|
95
|
+
(0, core_1.Controller)('/api/v1/log-retention-rules', { name: 'Log Retention Rules Log Retention Rules', tags: ["Log Retention Rules"] })
|
|
96
96
|
], RetentionRuleController);
|
|
97
97
|
//# sourceMappingURL=retention-rule.controller.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retention-rule.controller.js","sourceRoot":"","sources":["../../src/controllers/retention-rule.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAA4G;AAC5G,qFAA6E;AAC7E,8EAAyG;AAGlG,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,IAAY,OAAO;QACjB,OAAO,gBAAS,CAAC,GAAG,CAAC,gDAAoB,CAAC,CAAC;IAC7C,CAAC;IAED,sCAAsC;IAEhC,AAAN,KAAK,CAAC,OAAO,CAAC,IAAa,EAAE,GAAa;QACxC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3C,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,CAAC;IAED,0CAA0C;IAEpC,AAAN,KAAK,CAAC,OAAO,CAAC,GAAY,EAAE,GAAa;QACvC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,kBAAW,CAAC,KAAK,CAAC,yBAAyB,EAAE,GAAG,CAAC,CAAC,CAAC;YACxE,OAAO;QACT,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,kBAAW,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,uCAAuC;IAEjC,AAAN,KAAK,CAAC,MAAM,CAAC,GAAY,EAAE,GAAa;QACtC,MAAM,GAAG,GAAG,IAAA,mBAAY,EAAC,kDAAyB,EAAE,GAAG,CAAC,IAAI,
|
|
1
|
+
{"version":3,"file":"retention-rule.controller.js","sourceRoot":"","sources":["../../src/controllers/retention-rule.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,2CAA4G;AAC5G,qFAA6E;AAC7E,8EAAyG;AAGlG,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,IAAY,OAAO;QACjB,OAAO,gBAAS,CAAC,GAAG,CAAC,gDAAoB,CAAC,CAAC;IAC7C,CAAC;IAED,sCAAsC;IAEhC,AAAN,KAAK,CAAC,OAAO,CAAC,IAAa,EAAE,GAAa;QACxC,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAA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nDU,uBAAuB;IADnC,IAAA,iBAAU,EAAC,6BAA6B,EAAE,EAAE,IAAI,EAAE,yCAAyC,EAAE,IAAI,EAAE,CAAC,qBAAqB,CAAC,EAAE,CAAC;GACjH,uBAAuB,CAoDnC"}
|
|
@@ -65,11 +65,11 @@ __decorate([
|
|
|
65
65
|
__decorate([
|
|
66
66
|
(0, core_1.Index)(),
|
|
67
67
|
(0, core_1.Column)({ type: 'integer', name: 'user_id', nullable: true }),
|
|
68
|
-
__metadata("design:type",
|
|
68
|
+
__metadata("design:type", Object)
|
|
69
69
|
], OperationLog.prototype, "userId", void 0);
|
|
70
70
|
__decorate([
|
|
71
71
|
(0, core_1.Column)({ type: 'varchar', length: 128, name: 'username', nullable: true }),
|
|
72
|
-
__metadata("design:type",
|
|
72
|
+
__metadata("design:type", Object)
|
|
73
73
|
], OperationLog.prototype, "username", void 0);
|
|
74
74
|
__decorate([
|
|
75
75
|
(0, core_1.Index)(),
|
|
@@ -87,23 +87,23 @@ __decorate([
|
|
|
87
87
|
], OperationLog.prototype, "description", void 0);
|
|
88
88
|
__decorate([
|
|
89
89
|
(0, core_1.Column)({ type: 'varchar', length: 512, name: 'request_path', nullable: true }),
|
|
90
|
-
__metadata("design:type",
|
|
90
|
+
__metadata("design:type", Object)
|
|
91
91
|
], OperationLog.prototype, "requestPath", void 0);
|
|
92
92
|
__decorate([
|
|
93
93
|
(0, core_1.Column)({ type: 'varchar', length: 16, name: 'request_method', nullable: true }),
|
|
94
|
-
__metadata("design:type",
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
95
|
], OperationLog.prototype, "requestMethod", void 0);
|
|
96
96
|
__decorate([
|
|
97
97
|
(0, core_1.Column)({ type: 'varchar', length: 256, name: 'resource_id', nullable: true }),
|
|
98
|
-
__metadata("design:type",
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
99
|
], OperationLog.prototype, "resourceId", void 0);
|
|
100
100
|
__decorate([
|
|
101
101
|
(0, core_1.Column)({ type: 'varchar', length: 64, name: 'resource_type', nullable: true }),
|
|
102
|
-
__metadata("design:type",
|
|
102
|
+
__metadata("design:type", Object)
|
|
103
103
|
], OperationLog.prototype, "resourceType", void 0);
|
|
104
104
|
__decorate([
|
|
105
105
|
(0, core_1.Column)({ type: 'varchar', length: 64, name: 'ip', nullable: true }),
|
|
106
|
-
__metadata("design:type",
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
107
|
], OperationLog.prototype, "ip", void 0);
|
|
108
108
|
__decorate([
|
|
109
109
|
(0, core_1.Index)(),
|
|
@@ -112,7 +112,7 @@ __decorate([
|
|
|
112
112
|
], OperationLog.prototype, "level", void 0);
|
|
113
113
|
__decorate([
|
|
114
114
|
(0, core_1.Column)({ type: 'text', name: 'metadata', nullable: true }),
|
|
115
|
-
__metadata("design:type",
|
|
115
|
+
__metadata("design:type", Object)
|
|
116
116
|
], OperationLog.prototype, "metadata", void 0);
|
|
117
117
|
__decorate([
|
|
118
118
|
(0, core_1.Index)(),
|
|
@@ -38,11 +38,11 @@ __decorate([
|
|
|
38
38
|
], RetentionRule.prototype, "name", void 0);
|
|
39
39
|
__decorate([
|
|
40
40
|
(0, core_1.Column)({ type: 'varchar', length: 64, name: 'module', nullable: true }),
|
|
41
|
-
__metadata("design:type",
|
|
41
|
+
__metadata("design:type", Object)
|
|
42
42
|
], RetentionRule.prototype, "module", void 0);
|
|
43
43
|
__decorate([
|
|
44
44
|
(0, core_1.Column)({ type: 'varchar', length: 32, name: 'action', nullable: true }),
|
|
45
|
-
__metadata("design:type",
|
|
45
|
+
__metadata("design:type", Object)
|
|
46
46
|
], RetentionRule.prototype, "action", void 0);
|
|
47
47
|
__decorate([
|
|
48
48
|
(0, core_1.Column)({ type: 'integer', name: 'retention_days', default: 90 }),
|
|
@@ -14,31 +14,31 @@ export declare const WriteLogSchema: z.ZodObject<{
|
|
|
14
14
|
level: z.ZodDefault<z.ZodNativeEnum<typeof LogLevel>>;
|
|
15
15
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
metadata?: Record<string, unknown
|
|
17
|
+
module: string;
|
|
18
|
+
action: LogAction;
|
|
19
|
+
description: string;
|
|
20
|
+
level: LogLevel;
|
|
21
|
+
userId?: number | undefined;
|
|
22
|
+
username?: string | undefined;
|
|
23
|
+
requestPath?: string | undefined;
|
|
24
|
+
requestMethod?: string | undefined;
|
|
25
|
+
resourceId?: string | undefined;
|
|
26
|
+
resourceType?: string | undefined;
|
|
27
|
+
ip?: string | undefined;
|
|
28
|
+
metadata?: Record<string, unknown> | undefined;
|
|
29
29
|
}, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
requestPath?: string;
|
|
36
|
-
requestMethod?: string;
|
|
37
|
-
resourceId?: string;
|
|
38
|
-
resourceType?: string;
|
|
39
|
-
ip?: string;
|
|
40
|
-
level?: LogLevel;
|
|
41
|
-
metadata?: Record<string, unknown
|
|
30
|
+
module: string;
|
|
31
|
+
action: LogAction;
|
|
32
|
+
description: string;
|
|
33
|
+
userId?: number | undefined;
|
|
34
|
+
username?: string | undefined;
|
|
35
|
+
requestPath?: string | undefined;
|
|
36
|
+
requestMethod?: string | undefined;
|
|
37
|
+
resourceId?: string | undefined;
|
|
38
|
+
resourceType?: string | undefined;
|
|
39
|
+
ip?: string | undefined;
|
|
40
|
+
level?: LogLevel | undefined;
|
|
41
|
+
metadata?: Record<string, unknown> | undefined;
|
|
42
42
|
}>;
|
|
43
43
|
export type WriteLogDto = z.infer<typeof WriteLogSchema>;
|
|
44
44
|
export declare const QueryLogSchema: z.ZodObject<{
|
|
@@ -52,25 +52,25 @@ export declare const QueryLogSchema: z.ZodObject<{
|
|
|
52
52
|
page: z.ZodDefault<z.ZodNumber>;
|
|
53
53
|
pageSize: z.ZodDefault<z.ZodNumber>;
|
|
54
54
|
}, "strip", z.ZodTypeAny, {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
page: number;
|
|
56
|
+
pageSize: number;
|
|
57
|
+
userId?: number | undefined;
|
|
58
|
+
module?: string | undefined;
|
|
59
|
+
action?: LogAction | undefined;
|
|
60
|
+
level?: LogLevel | undefined;
|
|
61
|
+
keyword?: string | undefined;
|
|
62
|
+
startDate?: string | undefined;
|
|
63
|
+
endDate?: string | undefined;
|
|
64
64
|
}, {
|
|
65
|
-
userId?: number;
|
|
66
|
-
module?: string;
|
|
67
|
-
action?: LogAction;
|
|
68
|
-
level?: LogLevel;
|
|
69
|
-
keyword?: string;
|
|
70
|
-
startDate?: string;
|
|
71
|
-
endDate?: string;
|
|
72
|
-
page?: number;
|
|
73
|
-
pageSize?: number;
|
|
65
|
+
userId?: number | undefined;
|
|
66
|
+
module?: string | undefined;
|
|
67
|
+
action?: LogAction | undefined;
|
|
68
|
+
level?: LogLevel | undefined;
|
|
69
|
+
keyword?: string | undefined;
|
|
70
|
+
startDate?: string | undefined;
|
|
71
|
+
endDate?: string | undefined;
|
|
72
|
+
page?: number | undefined;
|
|
73
|
+
pageSize?: number | undefined;
|
|
74
74
|
}>;
|
|
75
75
|
export type QueryLogDto = z.infer<typeof QueryLogSchema>;
|
|
76
76
|
export declare const CreateRetentionRuleSchema: z.ZodObject<{
|
|
@@ -80,17 +80,17 @@ export declare const CreateRetentionRuleSchema: z.ZodObject<{
|
|
|
80
80
|
retentionDays: z.ZodNumber;
|
|
81
81
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
82
82
|
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
name
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
name: string;
|
|
84
|
+
retentionDays: number;
|
|
85
|
+
enabled: boolean;
|
|
86
|
+
module?: string | null | undefined;
|
|
87
|
+
action?: LogAction | null | undefined;
|
|
88
88
|
}, {
|
|
89
|
-
name
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
enabled?: boolean;
|
|
89
|
+
name: string;
|
|
90
|
+
retentionDays: number;
|
|
91
|
+
module?: string | null | undefined;
|
|
92
|
+
action?: LogAction | null | undefined;
|
|
93
|
+
enabled?: boolean | undefined;
|
|
94
94
|
}>;
|
|
95
95
|
export type CreateRetentionRuleDto = z.infer<typeof CreateRetentionRuleSchema>;
|
|
96
96
|
export declare const UpdateRetentionRuleSchema: z.ZodObject<{
|
|
@@ -100,17 +100,17 @@ export declare const UpdateRetentionRuleSchema: z.ZodObject<{
|
|
|
100
100
|
retentionDays: z.ZodOptional<z.ZodNumber>;
|
|
101
101
|
enabled: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
102
102
|
}, "strip", z.ZodTypeAny, {
|
|
103
|
-
name?: string;
|
|
104
|
-
module?: string;
|
|
105
|
-
action?: LogAction;
|
|
106
|
-
retentionDays?: number;
|
|
107
|
-
enabled?: boolean;
|
|
103
|
+
name?: string | undefined;
|
|
104
|
+
module?: string | null | undefined;
|
|
105
|
+
action?: LogAction | null | undefined;
|
|
106
|
+
retentionDays?: number | undefined;
|
|
107
|
+
enabled?: boolean | undefined;
|
|
108
108
|
}, {
|
|
109
|
-
name?: string;
|
|
110
|
-
module?: string;
|
|
111
|
-
action?: LogAction;
|
|
112
|
-
retentionDays?: number;
|
|
113
|
-
enabled?: boolean;
|
|
109
|
+
name?: string | undefined;
|
|
110
|
+
module?: string | null | undefined;
|
|
111
|
+
action?: LogAction | null | undefined;
|
|
112
|
+
retentionDays?: number | undefined;
|
|
113
|
+
enabled?: boolean | undefined;
|
|
114
114
|
}>;
|
|
115
115
|
export type UpdateRetentionRuleDto = z.infer<typeof UpdateRetentionRuleSchema>;
|
|
116
116
|
//# sourceMappingURL=log-analysis.schema.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octo-cyber/log-analysis",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Octo log-analysis module — operation log recording, querying, and statistical analysis",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -79,6 +79,17 @@
|
|
|
79
79
|
"registry": "https://registry.npmjs.org/"
|
|
80
80
|
},
|
|
81
81
|
"license": "MIT",
|
|
82
|
+
"repository": {
|
|
83
|
+
"type": "git",
|
|
84
|
+
"url": "https://github.com/jefflower/octo-log-analysis.git"
|
|
85
|
+
},
|
|
86
|
+
"publishMeta": {
|
|
87
|
+
"repository": "jefflower/octo-log-analysis",
|
|
88
|
+
"branch": "main",
|
|
89
|
+
"commitHash": "b7f085f60d04102011ee5b94a84b501086d35ea0",
|
|
90
|
+
"publishedAt": "2026-03-27T15:36:14.622Z",
|
|
91
|
+
"publishedFrom": "monorepo:packages/log-analysis"
|
|
92
|
+
},
|
|
82
93
|
"scripts": {
|
|
83
94
|
"build": "tsc -p tsconfig.build.json",
|
|
84
95
|
"dev": "tsc -p tsconfig.build.json --watch",
|