@fdm-monster/server 2.0.0 → 2.0.3

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.
Files changed (92) hide show
  1. package/.env.template +2 -0
  2. package/.yarn/install-state.gz +0 -0
  3. package/README.md +22 -3
  4. package/RELEASE_NOTES.MD +38 -0
  5. package/dist/constants/authorization.constants.js +12 -3
  6. package/dist/constants/authorization.constants.js.map +1 -1
  7. package/dist/constants/server-settings.constants.js +4 -2
  8. package/dist/constants/server-settings.constants.js.map +1 -1
  9. package/dist/container.js +2 -0
  10. package/dist/container.js.map +1 -1
  11. package/dist/container.tokens.js +1 -0
  12. package/dist/container.tokens.js.map +1 -1
  13. package/dist/controllers/file-storage.controller.js +90 -19
  14. package/dist/controllers/file-storage.controller.js.map +1 -1
  15. package/dist/controllers/printer-maintenance-log.controller.js +174 -0
  16. package/dist/controllers/printer-maintenance-log.controller.js.map +1 -0
  17. package/dist/controllers/settings.controller.js +70 -2
  18. package/dist/controllers/settings.controller.js.map +1 -1
  19. package/dist/controllers/slicer-compat.controller.js +4 -0
  20. package/dist/controllers/slicer-compat.controller.js.map +1 -1
  21. package/dist/data-source.js +8 -8
  22. package/dist/data-source.js.map +1 -1
  23. package/dist/entities/index.js +4 -0
  24. package/dist/entities/index.js.map +1 -1
  25. package/dist/entities/print-job.entity.js +5 -1
  26. package/dist/entities/print-job.entity.js.map +1 -1
  27. package/dist/entities/printer-maintenance-log.entity.js +142 -0
  28. package/dist/entities/printer-maintenance-log.entity.js.map +1 -0
  29. package/dist/entities/printer.entity.js +2 -1
  30. package/dist/entities/printer.entity.js.map +1 -1
  31. package/dist/entities/settings.entity.js.map +1 -1
  32. package/dist/handlers/logging/file-logging.transport.js +2 -2
  33. package/dist/handlers/logging/file-logging.transport.js.map +1 -1
  34. package/dist/index.js +11 -5
  35. package/dist/index.js.map +1 -1
  36. package/dist/middleware/slicer-api-key.middleware.js +29 -0
  37. package/dist/middleware/slicer-api-key.middleware.js.map +1 -0
  38. package/dist/migrations/1767909428129-AddPrinterMaintenanceLog.js +52 -0
  39. package/dist/migrations/1767909428129-AddPrinterMaintenanceLog.js.map +1 -0
  40. package/dist/server.constants.js +13 -9
  41. package/dist/server.constants.js.map +1 -1
  42. package/dist/server.core.js +7 -4
  43. package/dist/server.core.js.map +1 -1
  44. package/dist/server.env.js +13 -32
  45. package/dist/server.env.js.map +1 -1
  46. package/dist/server.host.js +1 -1
  47. package/dist/server.host.js.map +1 -1
  48. package/dist/services/bambu/bambu-ftp.adapter.js +1 -1
  49. package/dist/services/bambu/bambu-ftp.adapter.js.map +1 -1
  50. package/dist/services/core/client-bundle.service.js +10 -11
  51. package/dist/services/core/client-bundle.service.js.map +1 -1
  52. package/dist/services/core/config.service.js +3 -5
  53. package/dist/services/core/config.service.js.map +1 -1
  54. package/dist/services/core/logs-manager.service.js +9 -10
  55. package/dist/services/core/logs-manager.service.js.map +1 -1
  56. package/dist/services/core/multer.service.js +2 -2
  57. package/dist/services/core/multer.service.js.map +1 -1
  58. package/dist/services/core/yaml.service.js +23 -3
  59. package/dist/services/core/yaml.service.js.map +1 -1
  60. package/dist/services/file-storage.service.js +4 -3
  61. package/dist/services/file-storage.service.js.map +1 -1
  62. package/dist/services/interfaces/printer-maintenance-log.dto.js +6 -0
  63. package/dist/services/interfaces/printer-maintenance-log.dto.js.map +1 -0
  64. package/dist/services/interfaces/printer.dto.js.map +1 -1
  65. package/dist/services/orm/printer-maintenance-log.service.js +151 -0
  66. package/dist/services/orm/printer-maintenance-log.service.js.map +1 -0
  67. package/dist/services/orm/printer.service.js +8 -2
  68. package/dist/services/orm/printer.service.js.map +1 -1
  69. package/dist/services/orm/settings.service.js +9 -2
  70. package/dist/services/orm/settings.service.js.map +1 -1
  71. package/dist/services/typeorm/typeorm.service.js +5 -5
  72. package/dist/services/typeorm/typeorm.service.js.map +1 -1
  73. package/dist/services/validators/printer-maintenance-log.validation.js +41 -0
  74. package/dist/services/validators/printer-maintenance-log.validation.js.map +1 -0
  75. package/dist/services/validators/printer-service.validation.js +2 -3
  76. package/dist/services/validators/printer-service.validation.js.map +1 -1
  77. package/dist/services/validators/settings-service.validation.js +23 -4
  78. package/dist/services/validators/settings-service.validation.js.map +1 -1
  79. package/dist/services/validators/yaml-service.validation.js +2 -0
  80. package/dist/services/validators/yaml-service.validation.js.map +1 -1
  81. package/dist/shared/runtime-settings.migration.js +10 -0
  82. package/dist/shared/runtime-settings.migration.js.map +1 -1
  83. package/dist/state/settings.store.js +38 -5
  84. package/dist/state/settings.store.js.map +1 -1
  85. package/dist/utils/env.utils.js +5 -4
  86. package/dist/utils/env.utils.js.map +1 -1
  87. package/dist/utils/fs.utils.js +37 -11
  88. package/dist/utils/fs.utils.js.map +1 -1
  89. package/dist/utils/swagger/swagger.js +1 -1
  90. package/dist/utils/swagger/swagger.js.map +1 -1
  91. package/install.sh +559 -0
  92. package/package.json +6 -6
@@ -0,0 +1,174 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PrinterMaintenanceLogController", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PrinterMaintenanceLogController;
9
+ }
10
+ });
11
+ const _awilixexpress = require("awilix-express");
12
+ const _serverconstants = require("../server.constants");
13
+ const _express = require("express");
14
+ const _authenticate = require("../middleware/authenticate");
15
+ const _authorizationconstants = require("../constants/authorization.constants");
16
+ const _printermaintenancelogservice = require("../services/orm/printer-maintenance-log.service");
17
+ const _loggerfactory = require("../handlers/logger-factory");
18
+ const _validators = require("../handlers/validators");
19
+ const _printermaintenancelogvalidation = require("../services/validators/printer-maintenance-log.validation");
20
+ const _paramconvertermiddleware = require("../middleware/param-converter.middleware");
21
+ function _ts_decorate(decorators, target, key, desc) {
22
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
24
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
25
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
26
+ }
27
+ function _ts_metadata(k, v) {
28
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
29
+ }
30
+ class PrinterMaintenanceLogController {
31
+ printerMaintenanceLogService;
32
+ logger;
33
+ constructor(loggerFactory, printerMaintenanceLogService){
34
+ this.printerMaintenanceLogService = printerMaintenanceLogService;
35
+ this.logger = loggerFactory(PrinterMaintenanceLogController.name);
36
+ }
37
+ async list(req, res) {
38
+ const query = await (0, _validators.validateInput)(req.query, _printermaintenancelogvalidation.getMaintenanceLogsQuerySchema);
39
+ const result = await this.printerMaintenanceLogService.list(query);
40
+ res.send({
41
+ logs: result.logs.map((log)=>this.printerMaintenanceLogService.toDto(log)),
42
+ total: result.total,
43
+ page: query.page,
44
+ pageSize: query.pageSize
45
+ });
46
+ }
47
+ async get(req, res) {
48
+ const logId = req.params.id;
49
+ const log = await this.printerMaintenanceLogService.get(logId);
50
+ res.send(this.printerMaintenanceLogService.toDto(log));
51
+ }
52
+ async getActiveByPrinterId(req, res) {
53
+ const printerId = req.params.printerId;
54
+ const log = await this.printerMaintenanceLogService.getActiveByPrinterId(printerId);
55
+ res.send(log ? this.printerMaintenanceLogService.toDto(log) : null);
56
+ }
57
+ async create(req, res) {
58
+ const data = await (0, _validators.validateInput)(req.body, _printermaintenancelogvalidation.createMaintenanceLogSchema);
59
+ const userId = req.user?.id ?? null;
60
+ const username = req.user?.username || "system";
61
+ const log = await this.printerMaintenanceLogService.create(data, userId, username);
62
+ res.send(this.printerMaintenanceLogService.toDto(log));
63
+ }
64
+ async complete(req, res) {
65
+ const logId = req.params.id;
66
+ const data = await (0, _validators.validateInput)(req.body, _printermaintenancelogvalidation.completeMaintenanceLogSchema);
67
+ const userId = req.user?.id ?? null;
68
+ const username = req.user?.username || "system";
69
+ const log = await this.printerMaintenanceLogService.complete(logId, data, userId, username);
70
+ res.send(this.printerMaintenanceLogService.toDto(log));
71
+ }
72
+ async delete(req, res) {
73
+ const logId = req.params.id;
74
+ await this.printerMaintenanceLogService.delete(logId);
75
+ res.send({
76
+ success: true
77
+ });
78
+ }
79
+ }
80
+ _ts_decorate([
81
+ (0, _awilixexpress.GET)(),
82
+ (0, _awilixexpress.route)("/"),
83
+ (0, _awilixexpress.before)([
84
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.List)
85
+ ]),
86
+ _ts_metadata("design:type", Function),
87
+ _ts_metadata("design:paramtypes", [
88
+ typeof _express.Request === "undefined" ? Object : _express.Request,
89
+ typeof _express.Response === "undefined" ? Object : _express.Response
90
+ ]),
91
+ _ts_metadata("design:returntype", Promise)
92
+ ], PrinterMaintenanceLogController.prototype, "list", null);
93
+ _ts_decorate([
94
+ (0, _awilixexpress.GET)(),
95
+ (0, _awilixexpress.route)("/:id"),
96
+ (0, _awilixexpress.before)([
97
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.Get),
98
+ (0, _paramconvertermiddleware.ParamId)("id")
99
+ ]),
100
+ _ts_metadata("design:type", Function),
101
+ _ts_metadata("design:paramtypes", [
102
+ typeof _express.Request === "undefined" ? Object : _express.Request,
103
+ typeof _express.Response === "undefined" ? Object : _express.Response
104
+ ]),
105
+ _ts_metadata("design:returntype", Promise)
106
+ ], PrinterMaintenanceLogController.prototype, "get", null);
107
+ _ts_decorate([
108
+ (0, _awilixexpress.GET)(),
109
+ (0, _awilixexpress.route)("/printer/:printerId/active"),
110
+ (0, _awilixexpress.before)([
111
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.Get),
112
+ (0, _paramconvertermiddleware.ParamId)("printerId")
113
+ ]),
114
+ _ts_metadata("design:type", Function),
115
+ _ts_metadata("design:paramtypes", [
116
+ typeof _express.Request === "undefined" ? Object : _express.Request,
117
+ typeof _express.Response === "undefined" ? Object : _express.Response
118
+ ]),
119
+ _ts_metadata("design:returntype", Promise)
120
+ ], PrinterMaintenanceLogController.prototype, "getActiveByPrinterId", null);
121
+ _ts_decorate([
122
+ (0, _awilixexpress.POST)(),
123
+ (0, _awilixexpress.route)("/"),
124
+ (0, _awilixexpress.before)([
125
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.Create)
126
+ ]),
127
+ _ts_metadata("design:type", Function),
128
+ _ts_metadata("design:paramtypes", [
129
+ typeof _express.Request === "undefined" ? Object : _express.Request,
130
+ typeof _express.Response === "undefined" ? Object : _express.Response
131
+ ]),
132
+ _ts_metadata("design:returntype", Promise)
133
+ ], PrinterMaintenanceLogController.prototype, "create", null);
134
+ _ts_decorate([
135
+ (0, _awilixexpress.POST)(),
136
+ (0, _awilixexpress.route)("/:id/complete"),
137
+ (0, _awilixexpress.before)([
138
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.Complete),
139
+ (0, _paramconvertermiddleware.ParamId)("id")
140
+ ]),
141
+ _ts_metadata("design:type", Function),
142
+ _ts_metadata("design:paramtypes", [
143
+ typeof _express.Request === "undefined" ? Object : _express.Request,
144
+ typeof _express.Response === "undefined" ? Object : _express.Response
145
+ ]),
146
+ _ts_metadata("design:returntype", Promise)
147
+ ], PrinterMaintenanceLogController.prototype, "complete", null);
148
+ _ts_decorate([
149
+ (0, _awilixexpress.DELETE)(),
150
+ (0, _awilixexpress.route)("/:id"),
151
+ (0, _awilixexpress.before)([
152
+ (0, _authenticate.permission)(_authorizationconstants.PERMS.PrinterMaintenanceLog.Delete),
153
+ (0, _paramconvertermiddleware.ParamId)("id")
154
+ ]),
155
+ _ts_metadata("design:type", Function),
156
+ _ts_metadata("design:paramtypes", [
157
+ typeof _express.Request === "undefined" ? Object : _express.Request,
158
+ typeof _express.Response === "undefined" ? Object : _express.Response
159
+ ]),
160
+ _ts_metadata("design:returntype", Promise)
161
+ ], PrinterMaintenanceLogController.prototype, "delete", null);
162
+ PrinterMaintenanceLogController = _ts_decorate([
163
+ (0, _awilixexpress.route)(_serverconstants.AppConstants.apiRoute + "/printer-maintenance-log"),
164
+ (0, _awilixexpress.before)([
165
+ (0, _authenticate.authenticate)()
166
+ ]),
167
+ _ts_metadata("design:type", Function),
168
+ _ts_metadata("design:paramtypes", [
169
+ typeof _loggerfactory.ILoggerFactory === "undefined" ? Object : _loggerfactory.ILoggerFactory,
170
+ typeof _printermaintenancelogservice.PrinterMaintenanceLogService === "undefined" ? Object : _printermaintenancelogservice.PrinterMaintenanceLogService
171
+ ])
172
+ ], PrinterMaintenanceLogController);
173
+
174
+ //# sourceMappingURL=printer-maintenance-log.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/controllers/printer-maintenance-log.controller.ts"],"names":["PrinterMaintenanceLogController","logger","loggerFactory","printerMaintenanceLogService","name","list","req","res","query","validateInput","getMaintenanceLogsQuerySchema","result","send","logs","map","log","toDto","total","page","pageSize","get","logId","params","id","getActiveByPrinterId","printerId","create","data","body","createMaintenanceLogSchema","userId","user","username","complete","completeMaintenanceLogSchema","delete","success","permission","PERMS","PrinterMaintenanceLog","List","Get","ParamId","Create","Complete","Delete","AppConstants","apiRoute","authenticate"],"mappings":";;;;+BAkBaA;;;eAAAA;;;+BAlBoC;iCACpB;yBACK;8BACO;wCACnB;8CACuB;+BACd;4BAED;iDAKvB;0CACiB;;;;;;;;;;AAIjB,MAAMA;;IACMC,OAAsB;IAEvC,YACEC,aAA6B,EAC7B,AAAiBC,4BAA0D,CAC3E;aADiBA,+BAAAA;QAEjB,IAAI,CAACF,MAAM,GAAGC,cAAcF,gCAAgCI,IAAI;IAClE;IAEA,MAGMC,KAAKC,GAAY,EAAEC,GAAa,EAAE;QACtC,MAAMC,QAAQ,MAAMC,IAAAA,yBAAa,EAACH,IAAIE,KAAK,EAAEE,8DAA6B;QAC1E,MAAMC,SAAS,MAAM,IAAI,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ialSettings(req, res) {
127
- const validatedInput = await (0, _validators.validateInput)(req.body, _settingsservicevalidation.credentialSettingUpdateSchema);
128
- await this.settingsStore.updateCredentialSettings(validatedInput);
127
+ const validatedInput = await (0, _validators.validateInput)(req.body, _settingsservicevalidation.credentialCoreSettingUpdateSchema);
128
+ await this.settingsStore.updateCoreCredentialSettings(validatedInput);
129
129
  res.send();
130
130
  }
131
131
  async updateTimeoutSettings(req, res) {
@@ -133,6 +133,26 @@ class SettingsController {
133
133
  const result = await this.settingsStore.updateTimeoutSettings(validatedInput);
134
134
  res.send(result);
135
135
  }
136
+ async getSlicerApiKey(req, res) {
137
+ const apiKey = this.settingsStore.getSlicerApiKey();
138
+ res.send({
139
+ slicerApiKey: apiKey
140
+ });
141
+ }
142
+ async regenerateSlicerApiKey(req, res) {
143
+ const newApiKey = await this.settingsStore.generateSlicerApiKey();
144
+ this.logger.log("Slicer API key regenerated");
145
+ res.send({
146
+ slicerApiKey: newApiKey
147
+ });
148
+ }
149
+ async deleteSlicerApiKey(req, res) {
150
+ await this.settingsStore.deleteSlicerApiKey();
151
+ this.logger.log("Slicer API key deleted");
152
+ res.send({
153
+ slicerApiKey: null
154
+ });
155
+ }
136
156
  }
137
157
  _ts_decorate([
138
158
  (0, _awilixexpress.GET)(),
@@ -294,6 +314,54 @@ _ts_decorate([
294
314
  ]),
295
315
  _ts_metadata("design:returntype", Promise)
296
316
  ], SettingsController.prototype, "updateTimeoutSettings", null);
317
+ _ts_decorate([
318
+ (0, _awilixexpress.GET)(),
319
+ (0, _awilixexpress.route)("/slicer-api-key"),
320
+ (0, _awilixexpress.before)([
321
+ (0, _authenticate.authorizeRoles)([
322
+ _authorizationconstants.ROLES.ADMIN
323
+ ]),
324
+ _demomiddleware.demoUserNotAllowed
325
+ ]),
326
+ _ts_metadata("design:type", Function),
327
+ _ts_metadata("design:paramtypes", [
328
+ typeof _express.Request === "undefined" ? Object : _express.Request,
329
+ typeof _express.Response === "undefined" ? Object : _express.Response
330
+ ]),
331
+ _ts_metadata("design:returntype", Promise)
332
+ ], SettingsController.prototype, "getSlicerApiKey", null);
333
+ _ts_decorate([
334
+ (0, _awilixexpress.POST)(),
335
+ (0, _awilixexpress.route)("/slicer-api-key/regenerate"),
336
+ (0, _awilixexpress.before)([
337
+ (0, _authenticate.authorizeRoles)([
338
+ _authorizationconstants.ROLES.ADMIN
339
+ ]),
340
+ _demomiddleware.demoUserNotAllowed
341
+ ]),
342
+ _ts_metadata("design:type", Function),
343
+ _ts_metadata("design:paramtypes", [
344
+ typeof _express.Request === "undefined" ? Object : _express.Request,
345
+ typeof _express.Response === "undefined" ? Object : _express.Response
346
+ ]),
347
+ _ts_metadata("design:returntype", Promise)
348
+ ], SettingsController.prototype, "regenerateSlicerApiKey", null);
349
+ _ts_decorate([
350
+ (0, _awilixexpress.DELETE)(),
351
+ (0, _awilixexpress.route)("/slicer-api-key"),
352
+ (0, _awilixexpress.before)([
353
+ (0, _authenticate.authorizeRoles)([
354
+ _authorizationconstants.ROLES.ADMIN
355
+ ]),
356
+ _demomiddleware.demoUserNotAllowed
357
+ ]),
358
+ _ts_metadata("design:type", Function),
359
+ _ts_metadata("design:paramtypes", [
360
+ typeof _express.Request === "undefined" ? Object : _express.Request,
361
+ typeof _express.Response === "undefined" ? Object : _express.Response
362
+ ]),
363
+ _ts_metadata("design:returntype", Promise)
364
+ ], SettingsController.prototype, "deleteSlicerApiKey", null);
297
365
  SettingsController = _ts_decorate([
298
366
  (0, _awilixexpress.route)(_serverconstants.AppConstants.apiRoute + "/settings"),
299
367
  (0, _awilixexpress.before)([
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/controllers/settings.controller.ts"],"names":["SettingsController","logger","loggerFactory","serverVersion","printerCache","printerService","settingsStore","printerThumbnailCache","name","getSettings","req","res","connection","clientIp","socket","remoteAddress","version","e","warn","settings","send","getSettingsSensitive","updateSentryDiagnosticsEnabled","enabled","validateInput","body","sentryDiagnosticsEnabledSchema","result","setSentryDiagnosticsEnabled","updateMoonrakerSupport","moonrakerSupportSchema","setExperimentalMoonrakerSupport","printers","listCachedPrinters","klipperPrinters","filter","p","printerType","MoonrakerType","printer","updateEnabled","id","updatePrusaLinkSupport","prusaLinkSupportSchema","setExperimentalPrusaLinkSupport","prusaLinkPrinters","PrusaLinkType","updateBambuSupport","bambuSupportSchema","setExperimentalBambuSupport","bambuPrinters","BambuType","updateFrontendSettings","validatedInput","frontendSettingsUpdateSchema","updateLoginRequiredSettings","loginRequired","loginRequiredSchema","setLoginRequired","updateRegistrationEnabledSettings","registrationEnabled","registrationEnabledSchema","setRegistrationEnabled","updateCredentialSettings","credentialSettingUpdateSchema","updateTimeoutSettings","timeoutSettingsUpdateSchema","authorizeRoles","ROLES","ADMIN","demoUserNotAllowed","AppConstants","apiRoute","authenticate"],"mappings":";;;;+BA2BaA;;;eAAAA;;;+BA3BkC;8BACF;iCAChB;wCACP;4BACQ;2CASvB;+BACuB;yBACI;+BACH;gCAEI;8BACN;qCAC2B;yCACxB;uCACM;mCACyB;;;;;;;;;;AAIxD,MAAMA;;;;;;IACMC,OAAsB;IAEvC,YACEC,aAA6B,EAC7B,AAAiBC,aAAqB,EACtC,AAAiBC,YAA0B,EAC3C,AAAiBC,cAA+B,EAChD,AAAiBC,aAA4B,EAC7C,AAAiBC,qBAA4C,CAC7D;aALiBJ,gBAAAA;aACAC,eAAAA;aACAC,iBAAAA;aACAC,gBAAAA;aACAC,wBAAAA;QAEjB,IAAI,CAACN,MAAM,GAAGC,cAAcF,mBAAmBQ,IAAI;IACrD;IAEA,MAEMC,YAAYC,GAAY,EAAEC,GAAa,EAAE;QAC7C,IAAIC;QACJ,IAAI;YACFA,aAAa;gBACXC,UAAUH,IAAII,MAAM,EAAEC;gBACtBC,SAAS,IAAI,CAACb,aAAa;YAC7B;QACF,EAAE,OAAOc,GAAG;YACV,IAAI,CAAChB,MAAM,CAACiB,IAAI,CAAC;QACnB;QACA,MAAMC,WAAW,IAAI,CAACb,aAAa,CAACG,WAAW;QAC/C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K;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;8BAzIrDC,6BAAY,CAACC,QAAQ,GAAG;;QACtBC,IAAAA,0BAAY"}
1
+ {"version":3,"sources":["../../src/controllers/settings.controller.ts"],"names":["SettingsController","logger","loggerFactory","serverVersion","printerCache","printerService","settingsStore","printerThumbnailCache","name","getSettings","req","res","connection","clientIp","socket","remoteAddress","version","e","warn","settings","send","getSettingsSensitive","updateSentryDiagnosticsEnabled","enabled","validateInput","body","sentryDiagnosticsEnabledSchema","result","setSentryDiagnosticsEnabled","updateMoonrakerSupport","moonrakerSupportSchema","setExperimentalMoonrakerSupport","printers","listCachedPrinters","klipperPrinters","filter","p","printerType","MoonrakerType","printer","updateEnabled","id","updatePrusaLinkSupport","prusaLinkSupportSchema","setExperimentalPrusaLinkSupport","prusaLinkPrinters","PrusaLinkType","updateBambuSupport","bambuSupportSchema","setExperimentalBambuSupport","bambuPrinters","BambuType","updateFrontendSettings","validatedInput","frontendSettingsUpdateSchema","updateLoginRequiredSettings","loginRequired","loginRequiredSchema","setLoginRequired","updateRegistrationEnabledSettings","registrationEnabled","registrationEnabledSchema","setRegistrationEnabled","updateCredentialSettings","credentialCoreSettingUpdateSchema","updateCoreCredentialSettings","updateTimeoutSettings","timeoutSettingsUpdateSchema","getSlicerApiKey","apiKey","slicerApiKey","regenerateSlicerApiKey","newApiKey","generateSlicerApiKey","log","deleteSlicerApiKey","authorizeRoles","ROLES","ADMIN","demoUserNotAllowed","AppConstants","apiRoute","authenticate"],"mappings":";;;;+BA2BaA;;;eAAAA;;;+BA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,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QAQjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;;;;QASjDH,IAAAA,4BAAc,EAAC;YAACC,6BAAK,CAACC,KAAK;SAAC;QAAGC,kCAAkB;;;;;;;;;;8BAnKrDC,6BAAY,CAACC,QAAQ,GAAG;;QACtBC,IAAAA,0BAAY"}
@@ -15,6 +15,7 @@ const _fileanalysisservice = require("../services/file-analysis.service");
15
15
  const _multerservice = require("../services/core/multer.service");
16
16
  const _loggerfactory = require("../handlers/logger-factory");
17
17
  const _serverconstants = require("../server.constants");
18
+ const _slicerapikeymiddleware = require("../middleware/slicer-api-key.middleware");
18
19
  function _ts_decorate(decorators, target, key, desc) {
19
20
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20
21
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -204,6 +205,9 @@ _ts_decorate([
204
205
  ], SlicerCompatController.prototype, "getServer", null);
205
206
  SlicerCompatController = _ts_decorate([
206
207
  (0, _awilixexpress.route)("/api"),
208
+ (0, _awilixexpress.before)([
209
+ (0, _slicerapikeymiddleware.slicerApiKeyAuth)()
210
+ ]),
207
211
  _ts_metadata("design:type", Function),
208
212
  _ts_metadata("design:paramtypes", [
209
213
  typeof _loggerfactory.ILoggerFactory === "undefined" ? Object : _loggerfactory.ILoggerFactory,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/controllers/slicer-compat.controller.ts"],"names":["SlicerCompatController","logger","loggerFactory","fileStorageService","fileAnalysisService","multerService","name","getVersion","req","res","send","api","server","text","uploadFile","files","acceptedExtensions","AppConstants","defaultAcceptedGcodeExtensions","defaultAcceptedBambuExtensions","multerLoadFileAsync","length","status","error","file","print","body","select","log","originalname","fileHash","calculateFileHash","path","fileStorageId","saveFile","filePath","getFilePath","metadata","thumbnails","analysisResult","analyzeFile","thumbnailMetadata","saveThumbnails","saveMetadata","analysisError","clearUploadedFile","e","local","origin","refs","resource","download","done","_fdmMonster","analyzed","Object","keys","thumbnailCount","printTime","gcodePrintTimeSeconds","filament","filamentUsedGrams","listFiles","listAllFiles","knownFiles","map","_originalFileName","fileName","type","typePath","fileFormat","gcodeAnalysis","estimatedPrintTime","tool0","filamentUsedMm","volume","filamentUsedCm3","undefined","date","Math","floor","createdAt","getTime","size","fileSize","free","total","getServer","version","safemode"],"mappings":";;;;+BAiBaA;;;eAAAA;;;+BAjBoB;yBACC;oCACC;qCACC;+BACN;+BACC;iCAEF;;;;;;;;;;AAUtB,MAAMA;;;;IACMC,OAAsB;IAEvC,YACEC,aAA6B,EAC7B,AAAiBC,kBAAsC,EACvD,AAAiBC,mBAAwC,EACzD,AAAiBC,aAA4B,CAC7C;aAHiBF,qBAAAA;aACAC,sBAAAA;aACAC,gBAAAA;QAEjB,IAAI,CAACJ,MAAM,GAAGC,cAAcF,uBAAuBM,IAAI;IACzD;IAMA,MAEMC,WAAWC,GAAY,EAAEC,GAAa,EAAE;QAC5CA,IAAIC,IAAI,CAAC;YACPC,KAAK;YACLC,QAAQ;YACRC,MAAM;QACR;IACF;IASA,MAEMC,WAAWN,GAAY,EAAEC,GAAa,EAAE;QAC5C,IAAIM;QAEJ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MA,MAEMgE,UAAU/E,GAAY,EAAEC,GAAa,EAAE;QAC3CA,IAAIC,IAAI,CAAC;YACP8E,SAAS;YACTC,UAAU;QACZ;IACF;AACF"}
1
+ {"version":3,"sources":["../../src/controllers/slicer-compat.controller.ts"],"names":["SlicerCompatController","logger","loggerFactory","fileStorageService","fileAnalysisService","multerService","name","getVersion","req","res","send","api","server","text","uploadFile","files","acceptedExtensions","AppConstants","defaultAcceptedGcodeExtensions","defaultAcceptedBambuExtensions","multerLoadFileAsync","length","status","error","file","print","body","select","log","originalname","fileHash","calculateFileHash","path","fileStorageId","saveFile","filePath","getFilePath","metadata","thumbnails","analysisResult","analyzeFile","thumbnailMetadata","saveThumbnails","saveMetadata","analysisError","clearUploadedFile","e","local","origin","refs","resource","download","done","_fdmMonster","analyzed","Object","keys","thumbnailCount","printTime","gcodePrintTimeSeconds","filament","filamentUsedGrams","listFiles","listAllFiles","knownFiles","map","_originalFileName","fileName","type","typePath","fileFormat","gcodeAnalysis","estimatedPrintTime","tool0","filamentUsedMm","volume","filamentUsedCm3","undefined","date","Math","floor","createdAt","getTime","size","fileSize","free","total","getServer","version","safemode","slicerApiKeyAuth"],"mappings":";;;;+BAkBaA;;;eAAAA;;;+BAlB4B;yBACP;oCACC;qCACC;+BACN;+BACC;iCAEF;wCACI;;;;;;;;;;AAU1B,MAAMA;;;;IACMC,OAAsB;IAEvC,YACEC,aAA6B,EAC7B,AAAiBC,kBAAsC,EACvD,AAAiBC,mBAAwC,EACzD,AAAiBC,aAA4B,CAC7C;aAHiBF,qBAAAA;aACAC,sBAAAA;aACAC,gBAAAA;QAEjB,IAAI,CAACJ,MAAM,GAAGC,cAAcF,uBAAuBM,IAAI;IACzD;IAMA,MAEMC,WAAWC,GAAY,EAAEC,GAAa,EAAE;QAC5CA,IAAIC,IAAI,CAAC;YACPC,KAAK;YACLC,QAAQ;YACRC,MAAM;QACR;IACF;IASA,MAEMC,WAAWN,GAAY,EAAEC,GAAa,EAAE;QAC5C,IAAI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IACF;IAMA,MAEMgE,UAAU/E,GAAY,EAAEC,GAAa,EAAE;QAC3CA,IAAIC,IAAI,CAAC;YACP8E,SAAS;YACTC,UAAU;QACZ;IACF;AACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAnNSC,IAAAA,wCAAgB"}
@@ -12,7 +12,6 @@ require("reflect-metadata");
12
12
  const _typeorm = require("typeorm");
13
13
  const _dotenv = /*#__PURE__*/ _interop_require_default(require("dotenv"));
14
14
  const _nodepath = require("node:path");
15
- const _serverconstants = require("./server.constants");
16
15
  const _fsutils = require("./utils/fs.utils");
17
16
  const _floorentity = require("./entities/floor.entity");
18
17
  const _floorpositionentity = require("./entities/floor-position.entity");
@@ -39,6 +38,7 @@ const _1767352862576DropSettingsFileClean = require("./migrations/1767352862576-
39
38
  const _1767370191762ChangeFloorNonUniqueOrder = require("./migrations/1767370191762-ChangeFloorNonUniqueOrder");
40
39
  const _1767432108916RenameGroupToTag = require("./migrations/1767432108916-RenameGroupToTag");
41
40
  const _1767451444137AddPrintJob = require("./migrations/1767451444137-AddPrintJob");
41
+ const _1767909428129AddPrinterMaintenanceLog = require("./migrations/1767909428129-AddPrinterMaintenanceLog");
42
42
  function _interop_require_default(obj) {
43
43
  return obj && obj.__esModule ? obj : {
44
44
  default: obj
@@ -46,15 +46,13 @@ function _interop_require_default(obj) {
46
46
  }
47
47
  if (process.env.NODE_ENV !== "test") {
48
48
  _dotenv.default.config({
49
- path: (0, _nodepath.join)((0, _fsutils.superRootPath)(), ".env")
49
+ path: process.env.ENV_FILE || (0, _nodepath.join)("../.env"),
50
+ quiet: true
50
51
  });
51
52
  }
52
- const dbFolder = process.env[_serverconstants.AppConstants.DATABASE_PATH] ?? "./database";
53
- const dbFile = process.env[_serverconstants.AppConstants.DATABASE_FILE] ?? "./fdm-monster.sqlite";
54
- const dbName = dbFile === ":memory:" ? dbFile : (0, _nodepath.join)((0, _fsutils.superRootPath)(), dbFolder, dbFile);
55
53
  const AppDataSource = new _typeorm.DataSource({
56
54
  type: "better-sqlite3",
57
- database: dbName,
55
+ database: (0, _fsutils.getDatabaseFilePath)(),
58
56
  synchronize: false,
59
57
  logging: false,
60
58
  entities: [
@@ -69,7 +67,8 @@ const AppDataSource = new _typeorm.DataSource({
69
67
  _userroleentity.UserRole,
70
68
  _tagentity.Tag,
71
69
  _printertagentity.PrinterTag,
72
- _entities.PrintJob
70
+ _entities.PrintJob,
71
+ _entities.PrinterMaintenanceLog
73
72
  ],
74
73
  migrations: [
75
74
  _1706829146617InitSqlite.InitSqlite1706829146617,
@@ -86,7 +85,8 @@ const AppDataSource = new _typeorm.DataSource({
86
85
  _1767352862576DropSettingsFileClean.DropSettingsFileClean1767352862576,
87
86
  _1767370191762ChangeFloorNonUniqueOrder.ChangeFloorNonUniqueOrder1767370191762,
88
87
  _1767432108916RenameGroupToTag.RenameGroupToTag1767432108916,
89
- _1767451444137AddPrintJob.AddPrintJob1767451444137
88
+ _1767451444137AddPrintJob.AddPrintJob1767451444137,
89
+ _1767909428129AddPrinterMaintenanceLog.AddPrinterMaintenanceLog1767909428129
90
90
  ],
91
91
  subscribers: []
92
92
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/data-source.ts"],"names":["AppDataSource","process","env","NODE_ENV","dotenv","config","path","join","superRootPath","dbFolder","AppConstants","DATABASE_PATH","dbFile","DATABASE_FILE","dbName","DataSource","type","database","synchronize","logging","entities","Floor","FloorPosition","Printer","Settings","User","CameraStream","Role","RefreshToken","UserRole","Tag","PrinterTag","PrintJob","migrations","InitSqlite1706829146617","PrinterGroup1707494762198","ChangePrintCompletionDeletePrinterCascade1708465930665","ChangeRoleNameUnique1713300747465","RemovePrinterFile1720338804844","AddPrinterType1713897879622","AddPrinterUsernamePassword1745141688926","DropPermissions1766576698569","ChangeCameraPrinterOnDeleteSetNull1767278216516","DropCustomGcode1767279607392","DropPrintCompletions1767291804417","DropSettingsFileClean1767352862576","ChangeFloorNonUniqueOrder1767370191762","RenameGroupToTag1767432108916","AddPrintJob1767451444137","subscribers"],"mappings":";;;;+BA8CaA;;;eAAAA;;;QA9CN;yBACoB;+DACR;0BACE;iCACQ;yBACC;6BACR;qCACQ;+BACN;gCACC;0BACoB;oCAChB;4BACR;gCACI;yCACe;kCACb;2BACP;2CACsB;wEAGnC;mDAC2C;gDACH;6CACH;yDACY;8CACX;iEAGtC;8CACsC;mDACK;oDACC;wDACI;+CACT;0CACL;;;;;;AAEzC,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,QAAQ;IACnCC,eAAM,CAACC,MAAM,CAAC;QACZC,MAAMC,IAAAA,cAAI,EAACC,IAAAA,sBAAa,KAAI;IAC9B;AACF;AAEA,MAAMC,WAAWR,QAAQC,GAAG,CAACQ,6BAAY,CAACC,aAAa,CAAC,IAAI;AAC5D,MAAMC,SAASX,QAAQC,GAAG,CAACQ,6BAAY,CAACG,aAAa,CAAC,IAAI;AAC1D,MAAMC,SAASF,WAAW,aAAaA,SAASL,IAAAA,cAAI,EAACC,IAAAA,sBAAa,KAAIC,UAAUG;AAEzE,MAAMZ,gBAAgB,IAAIe,mBAAU,CAAC;IAC1CC,MAAM;IACNC,UAAUH;IACVI,aAAa;IACbC,SAAS;IACTC,UAAU;QACRC,kBAAK;QACLC,kCAAa;QACbC,sBAAO;QACPC,wBAAQ;QACRC,cAAI;QACJC,gCAAY;QACZC,gBAAI;QACJC,sBAAY;QACZC,wBAAQ;QACRC,cAAG;QACHC,4BAAU;QACVC,kBAAQ;KACT;IACDC,YAAY;QACVC,gDAAuB;QACvBC,oDAAyB;QACzBC,8GAAsD;QACtDC,oEAAiC;QACjCC,8DAA8B;QAC9BC,wDAA2B;QAC3BC,gFAAuC;QACvCC,0DAA4B;QAC5BC,gGAA+C;QAC/CC,0DAA4B;QAC5BC,oEAAiC;QACjCC,sEAAkC;QAClCC,8EAAsC;QACtCC,4DAA6B;QAC7BC,kDAAwB;KACzB;IACDC,aAAa,EAAE;AACjB"}
1
+ {"version":3,"sources":["../src/data-source.ts"],"names":["AppDataSource","process","env","NODE_ENV","dotenv","config","path","ENV_FILE","join","quiet","DataSource","type","database","getDatabaseFilePath","synchronize","logging","entities","Floor","FloorPosition","Printer","Settings","User","CameraStream","Role","RefreshToken","UserRole","Tag","PrinterTag","PrintJob","PrinterMaintenanceLog","migrations","InitSqlite1706829146617","PrinterGroup1707494762198","ChangePrintCompletionDeletePrinterCascade1708465930665","ChangeRoleNameUnique1713300747465","RemovePrinterFile1720338804844","AddPrinterType1713897879622","AddPrinterUsernamePassword1745141688926","DropPermissions1766576698569","ChangeCameraPrinterOnDeleteSetNull1767278216516","DropCustomGcode1767279607392","DropPrintCompletions1767291804417","DropSettingsFileClean1767352862576","ChangeFloorNonUniqueOrder1767370191762","RenameGroupToTag1767432108916","AddPrintJob1767451444137","AddPrinterMaintenanceLog1767909428129","subscribers"],"mappings":";;;;+BA2CaA;;;eAAAA;;;QA3CN;yBACoB;+DACR;0BACE;yBACe;6BACd;qCACQ;+BACN;gCACC;0BAC2C;oCACvC;4BACR;gCACI;yCACe;kCACb;2BACP;2CACsB;wEAGnC;mDAC2C;gDACH;6CACH;yDACY;8CACX;iEAGtC;8CACsC;mDACK;oDACC;wDACI;+CACT;0CACL;uDACa;;;;;;AAEtD,IAAIC,QAAQC,GAAG,CAACC,QAAQ,KAAK,QAAQ;IACnCC,eAAM,CAACC,MAAM,CAAC;QACZC,MAAML,QAAQC,GAAG,CAACK,QAAQ,IAAIC,IAAAA,cAAI,EAAC;QACnCC,OAAO;IACT;AACF;AAEO,MAAMT,gBAAgB,IAAIU,mBAAU,CAAC;IAC1CC,MAAM;IACNC,UAAUC,IAAAA,4BAAmB;IAC7BC,aAAa;IACbC,SAAS;IACTC,UAAU;QACRC,kBAAK;QACLC,kCAAa;QACbC,sBAAO;QACPC,wBAAQ;QACRC,cAAI;QACJC,gCAAY;QACZC,gBAAI;QACJC,sBAAY;QACZC,wBAAQ;QACRC,cAAG;QACHC,4BAAU;QACVC,kBAAQ;QACRC,+BAAqB;KACtB;IACDC,YAAY;QACVC,gDAAuB;QACvBC,oDAAyB;QACzBC,8GAAsD;QACtDC,oEAAiC;QACjCC,8DAA8B;QAC9BC,wDAA2B;QAC3BC,gFAAuC;QACvCC,0DAA4B;QAC5BC,gGAA+C;QAC/CC,0DAA4B;QAC5BC,oEAAiC;QACjCC,sEAAkC;QAClCC,8EAAsC;QACtCC,4DAA6B;QAC7BC,kDAAwB;QACxBC,4EAAqC;KACtC;IACDC,aAAa,EAAE;AACjB"}
@@ -24,6 +24,9 @@ _export(exports, {
24
24
  get Printer () {
25
25
  return _printerentity.Printer;
26
26
  },
27
+ get PrinterMaintenanceLog () {
28
+ return _printermaintenancelogentity.PrinterMaintenanceLog;
29
+ },
27
30
  get PrinterTag () {
28
31
  return _printertagentity.PrinterTag;
29
32
  },
@@ -58,5 +61,6 @@ const _refreshtokenentity = require("./refresh-token.entity");
58
61
  const _printertagentity = require("./printer-tag.entity");
59
62
  const _tagentity = require("./tag.entity");
60
63
  const _printjobentity = require("./print-job.entity");
64
+ const _printermaintenancelogentity = require("./printer-maintenance-log.entity");
61
65
 
62
66
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/entities/index.ts"],"names":["CameraStream","Floor","FloorPosition","PrintJob","Printer","PrinterTag","RefreshToken","Role","Settings","Tag","User","UserRole"],"mappings":";;;;;;;;;;;QACSA;eAAAA,gCAAY;;QACZC;eAAAA,kBAAK;;QACLC;eAAAA,kCAAa;;QAQbC;eAAAA,wBAAQ;;QAPRC;eAAAA,sBAAO;;QAKPC;eAAAA,4BAAU;;QADVC;eAAAA,gCAAY;;QAHZC;eAAAA,gBAAI;;QAEJC;eAAAA,wBAAQ;;QAGRC;eAAAA,cAAG;;QAVHC;eAAAA,gBAAI;;QAMJC;eAAAA,wBAAQ;;;4BANI;oCACQ;6BACP;qCACQ;+BACN;4BACH;gCACI;gCACA;oCACI;kCACF;2BACP;gCACK"}
1
+ {"version":3,"sources":["../../src/entities/index.ts"],"names":["CameraStream","Floor","FloorPosition","PrintJob","Printer","PrinterMaintenanceLog","PrinterTag","RefreshToken","Role","Settings","Tag","User","UserRole"],"mappings":";;;;;;;;;;;QACSA;eAAAA,gCAAY;;QACZC;eAAAA,kBAAK;;QACLC;eAAAA,kCAAa;;QAQbC;eAAAA,wBAAQ;;QAPRC;eAAAA,sBAAO;;QAQPC;eAAAA,kDAAqB;;QAHrBC;eAAAA,4BAAU;;QADVC;eAAAA,gCAAY;;QAHZC;eAAAA,gBAAI;;QAEJC;eAAAA,wBAAQ;;QAGRC;eAAAA,cAAG;;QAVHC;eAAAA,gBAAI;;QAMJC;eAAAA,wBAAQ;;;4BANI;oCACQ;6BACP;qCACQ;+BACN;4BACH;gCACI;gCACA;oCACI;kCACF;2BACP;gCACK;6CACa"}
@@ -49,9 +49,13 @@ _ts_decorate([
49
49
  ], PrintJob.prototype, "id", void 0);
50
50
  _ts_decorate([
51
51
  (0, _typeorm.ManyToOne)(()=>_printerentity.Printer, {
52
+ nullable: true,
52
53
  onDelete: "SET NULL"
53
54
  }),
54
- _ts_metadata("design:type", typeof _printerentity.Printer === "undefined" ? Object : _printerentity.Printer)
55
+ (0, _typeorm.JoinColumn)({
56
+ name: "printerId"
57
+ }),
58
+ _ts_metadata("design:type", typeof _typeorm.Relation === "undefined" ? Object : _typeorm.Relation)
55
59
  ], PrintJob.prototype, "printer", void 0);
56
60
  _ts_decorate([
57
61
  (0, _typeorm.Column)({
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/entities/print-job.entity.ts"],"names":["PrintJob","id","printer","printerId","printerName","fileName","fileStorageId","fileFormat","fileSize","fileHash","createdAt","updatedAt","analyzedAt","startedAt","endedAt","status","analysisState","statusReason","progress","metadata","statistics","queuePosition","queueGroup","Printer","onDelete","nullable","type","Date","default"],"mappings":";;;;+BAwJaA;;;eAAAA;;;yBAxJyF;+BAC9E;;;;;;;;;;AAuJjB,MAAMA;IAEXC,GAAW;IAGXC,QAAkB;IAGlBC,UAAyB;IAGzBC,YAA2B;IAI3BC,SAAiB;IAGjBC,cAA6B;IAG7BC,WAAkC;IAGlCC,SAAwB;IAGxBC,SAAwB;IAIxBC,UAAgB;IAGhBC,UAAgB;IAGhBC,WAAwB;IAGxBC,UAAuB;IAGvBC,QAAqB;IAIrBC,OAAuB;IAGvBC,cAA6B;IAG7BC,aAA4B;IAI5BC,SAAwB;IAIxBC,SAAkC;IAIlCC,WAAmC;IAInCC,cAA6B;IAG7BC,WAA0B;AAC5B;;;;;;gCArEmBC,sBAAO;QAAIC,UAAU;;;;;;QAG5BC,UAAU;;;;;;QAGVC,MAAM;QAAWD,UAAU;;;;;;QAI3BC,MAAM;QAAWD,UAAU;;;;;;QAG3BC,MAAM;QAAWD,UAAU;;;;;;QAG3BC,MAAM;QAAWD,UAAU;;;;;;QAG3BC,MAAM;QAAOD,UAAU;;;;;;QAGvBC,MAAM;QAAWD,UAAU;;;;;;;;;;;;;;QAU3BC,MAAMC;QAAMF,UAAU;;;;;;QAGtBC,MAAMC;QAAMF,UAAU;;;;;;QAGtBC,MAAMC;QAAMF,UAAU;;;;;;QAItBC,MAAM;QAAWD,UAAU;QAAOG,SAAS;;;;;;QAG3CF,MAAM;QAAWD,UAAU;QAAOG,SAAS;;;;;;QAG3CF,MAAM;QAAWD,UAAU;;;;;;QAI3BC,MAAM;QAASD,UAAU;;;;;;QAIzBC,MAAM;QAAQD,UAAU;;;;;;QAIxBC,MAAM;QAAQD,UAAU;;;;;;QAIxBC,MAAM;QAAOD,UAAU;;;;;;QAGvBC,MAAM;QAAWD,UAAU"}
1
+ {"version":3,"sources":["../../src/entities/print-job.entity.ts"],"names":["PrintJob","id","printer","printerId","printerName","fileName","fileStorageId","fileFormat","fileSize","fileHash","createdAt","updatedAt","analyzedAt","startedAt","endedAt","status","analysisState","statusReason","progress","metadata","statistics","queuePosition","queueGroup","Printer","nullable","onDelete","name","type","Date","default"],"mappings":";;;;+BAiKaA;;;eAAAA;;;yBAxJN;+BACiB;;;;;;;;;;AAuJjB,MAAMA;IAEXC,GAAW;IAIXC,QAA4B;IAE5BC,UAAyB;IAGzBC,YAA2B;IAI3BC,SAAiB;IAGjBC,cAA6B;IAG7BC,WAAkC;IAGlCC,SAAwB;IAGxBC,SAAwB;IAIxBC,UAAgB;IAGhBC,UAAgB;IAGhBC,WAAwB;IAGxBC,UAAuB;IAGvBC,QAAqB;IAIrBC,OAAuB;IAGvBC,cAA6B;IAG7BC,aAA4B;IAI5BC,SAAwB;IAIxBC,SAAkC;IAIlCC,WAAmC;IAInCC,cAA6B;IAG7BC,WAA0B;AAC5B;;;;;;gCArEmBC,sBAAO;QAAIC,UAAU;QAAMC,UAAU;;;QACxCC,MAAM;;;;;;QAEVF,UAAU;;;;;;QAGVG,MAAM;QAAWH,UAAU;;;;;;QAI3BG,MAAM;QAAWH,UAAU;;;;;;QAG3BG,MAAM;QAAWH,UAAU;;;;;;QAG3BG,MAAM;QAAWH,UAAU;;;;;;QAG3BG,MAAM;QAAOH,UAAU;;;;;;QAGvBG,MAAM;QAAWH,UAAU;;;;;;;;;;;;;;QAU3BG,MAAMC;QAAMJ,UAAU;;;;;;QAGtBG,MAAMC;QAAMJ,UAAU;;;;;;QAGtBG,MAAMC;QAAMJ,UAAU;;;;;;QAItBG,MAAM;QAAWH,UAAU;QAAOK,SAAS;;;;;;QAG3CF,MAAM;QAAWH,UAAU;QAAOK,SAAS;;;;;;QAG3CF,MAAM;QAAWH,UAAU;;;;;;QAI3BG,MAAM;QAASH,UAAU;;;;;;QAIzBG,MAAM;QAAQH,UAAU;;;;;;QAIxBG,MAAM;QAAQH,UAAU;;;;;;QAIxBG,MAAM;QAAOH,UAAU;;;;;;QAGvBG,MAAM;QAAWH,UAAU"}
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PrinterMaintenanceLog", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PrinterMaintenanceLog;
9
+ }
10
+ });
11
+ const _typeorm = require("typeorm");
12
+ const _printerentity = require("./printer.entity");
13
+ const _userentity = require("./user.entity");
14
+ function _ts_decorate(decorators, target, key, desc) {
15
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
+ else for(var i = decorators.length - 1; i >= 0; i--)if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
19
+ }
20
+ function _ts_metadata(k, v) {
21
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
22
+ }
23
+ class PrinterMaintenanceLog {
24
+ id;
25
+ createdAt;
26
+ createdBy;
27
+ createdByUser;
28
+ createdByUserId;
29
+ printer;
30
+ printerId;
31
+ printerName;
32
+ printerUrl;
33
+ metadata;
34
+ completed;
35
+ completedAt;
36
+ completedByUser;
37
+ completedByUserId;
38
+ completedBy;
39
+ }
40
+ _ts_decorate([
41
+ (0, _typeorm.PrimaryGeneratedColumn)(),
42
+ _ts_metadata("design:type", Number)
43
+ ], PrinterMaintenanceLog.prototype, "id", void 0);
44
+ _ts_decorate([
45
+ (0, _typeorm.CreateDateColumn)(),
46
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
47
+ ], PrinterMaintenanceLog.prototype, "createdAt", void 0);
48
+ _ts_decorate([
49
+ (0, _typeorm.Column)({
50
+ nullable: false
51
+ }),
52
+ _ts_metadata("design:type", String)
53
+ ], PrinterMaintenanceLog.prototype, "createdBy", void 0);
54
+ _ts_decorate([
55
+ (0, _typeorm.ManyToOne)(()=>_userentity.User, {
56
+ onDelete: "SET NULL",
57
+ nullable: true
58
+ }),
59
+ _ts_metadata("design:type", Object)
60
+ ], PrinterMaintenanceLog.prototype, "createdByUser", void 0);
61
+ _ts_decorate([
62
+ (0, _typeorm.Column)({
63
+ nullable: true
64
+ }),
65
+ _ts_metadata("design:type", Object)
66
+ ], PrinterMaintenanceLog.prototype, "createdByUserId", void 0);
67
+ _ts_decorate([
68
+ (0, _typeorm.ManyToOne)(()=>_printerentity.Printer, {
69
+ onDelete: "SET NULL",
70
+ nullable: true
71
+ }),
72
+ _ts_metadata("design:type", Object)
73
+ ], PrinterMaintenanceLog.prototype, "printer", void 0);
74
+ _ts_decorate([
75
+ (0, _typeorm.Column)({
76
+ nullable: true
77
+ }),
78
+ _ts_metadata("design:type", Object)
79
+ ], PrinterMaintenanceLog.prototype, "printerId", void 0);
80
+ _ts_decorate([
81
+ (0, _typeorm.Column)({
82
+ nullable: false
83
+ }),
84
+ _ts_metadata("design:type", String)
85
+ ], PrinterMaintenanceLog.prototype, "printerName", void 0);
86
+ _ts_decorate([
87
+ (0, _typeorm.Column)({
88
+ nullable: false
89
+ }),
90
+ _ts_metadata("design:type", String)
91
+ ], PrinterMaintenanceLog.prototype, "printerUrl", void 0);
92
+ _ts_decorate([
93
+ (0, _typeorm.Column)({
94
+ nullable: false,
95
+ type: "json",
96
+ default: "{}"
97
+ }),
98
+ _ts_metadata("design:type", Object)
99
+ ], PrinterMaintenanceLog.prototype, "metadata", void 0);
100
+ _ts_decorate([
101
+ (0, _typeorm.Column)({
102
+ nullable: false,
103
+ default: false
104
+ }),
105
+ _ts_metadata("design:type", Boolean)
106
+ ], PrinterMaintenanceLog.prototype, "completed", void 0);
107
+ _ts_decorate([
108
+ (0, _typeorm.Column)({
109
+ nullable: true
110
+ }),
111
+ _ts_metadata("design:type", typeof Date === "undefined" ? Object : Date)
112
+ ], PrinterMaintenanceLog.prototype, "completedAt", void 0);
113
+ _ts_decorate([
114
+ (0, _typeorm.ManyToOne)(()=>_userentity.User, {
115
+ onDelete: "SET NULL",
116
+ nullable: true
117
+ }),
118
+ _ts_metadata("design:type", Object)
119
+ ], PrinterMaintenanceLog.prototype, "completedByUser", void 0);
120
+ _ts_decorate([
121
+ (0, _typeorm.Column)({
122
+ nullable: true
123
+ }),
124
+ _ts_metadata("design:type", Object)
125
+ ], PrinterMaintenanceLog.prototype, "completedByUserId", void 0);
126
+ _ts_decorate([
127
+ (0, _typeorm.Column)({
128
+ nullable: true
129
+ }),
130
+ _ts_metadata("design:type", String)
131
+ ], PrinterMaintenanceLog.prototype, "completedBy", void 0);
132
+ PrinterMaintenanceLog = _ts_decorate([
133
+ (0, _typeorm.Entity)(),
134
+ (0, _typeorm.Index)([
135
+ "printerId"
136
+ ], {
137
+ unique: true,
138
+ where: "completed = 0"
139
+ })
140
+ ], PrinterMaintenanceLog);
141
+
142
+ //# sourceMappingURL=printer-maintenance-log.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/entities/printer-maintenance-log.entity.ts"],"names":["PrinterMaintenanceLog","id","createdAt","createdBy","createdByUser","createdByUserId","printer","printerId","printerName","printerUrl","metadata","completed","completedAt","completedByUser","completedByUserId","completedBy","nullable","User","onDelete","Printer","type","default","unique","where"],"mappings":";;;;+BAaaA;;;eAAAA;;;yBANN;+BACiB;4BACH;;;;;;;;;;AAId,MAAMA;IAEXC,GAAW;IAGXC,UAAgB;IAEhBC,UAAkB;IAElBC,cAA2B;IAE3BC,gBAA+B;IAG/BC,QAAwB;IAExBC,UAAyB;IAEzBC,YAAoB;IAEpBC,WAAmB;IAGnBC,SAKE;IAGFC,UAAmB;IAEnBC,YAAmB;IAEnBC,gBAA6B;IAE7BC,kBAAiC;IAEjCC,YAAqB;AACvB;;;;;;;;;;;QAlCYC,UAAU;;;;;gCAEHC,gBAAI;QAAIC,UAAU;QAAYF,UAAU;;;;;;QAE/CA,UAAU;;;;;gCAGHG,sBAAO;QAAID,UAAU;QAAYF,UAAU;;;;;;QAElDA,UAAU;;;;;;QAEVA,UAAU;;;;;;QAEVA,UAAU;;;;;;QAGVA,UAAU;QAAOI,MAAM;QAAQC,SAAS;;;;;;QAQxCL,UAAU;QAAOK,SAAS;;;;;;QAE1BL,UAAU;;;;;gCAEHC,gBAAI;QAAIC,UAAU;QAAYF,UAAU;;;;;;QAE/CA,UAAU;;;;;;QAEVA,UAAU;;;;;;;QAvCd;;QAAgBM,QAAQ;QAAMC,OAAO"}
@@ -89,9 +89,10 @@ _ts_decorate([
89
89
  ], Printer.prototype, "enabled", void 0);
90
90
  _ts_decorate([
91
91
  (0, _typeorm.Column)({
92
+ type: "varchar",
92
93
  nullable: true
93
94
  }),
94
- _ts_metadata("design:type", String)
95
+ _ts_metadata("design:type", Object)
95
96
  ], Printer.prototype, "disabledReason", void 0);
96
97
  _ts_decorate([
97
98
  (0, _typeorm.Column)({