@operato/scene-manufacturing 7.0.7 → 7.3.16

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 (31) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/db.sqlite +0 -0
  3. package/dist/tact-timer.d.ts +3 -0
  4. package/dist/tact-timer.js +18 -4
  5. package/dist/tact-timer.js.map +1 -1
  6. package/logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json +9 -19
  7. package/logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json +9 -49
  8. package/logs/{application-2024-07-12-16.log → application-2024-10-12-15.log} +8 -8
  9. package/logs/application-2024-10-12-16.log +105 -0
  10. package/logs/{application-2024-07-12-17.log → application-2024-10-13-01.log} +16 -98
  11. package/logs/connections-2024-10-12-15.log +50 -0
  12. package/logs/connections-2024-10-12-16.log +50 -0
  13. package/logs/connections-2024-10-13-01.log +97 -0
  14. package/package.json +3 -3
  15. package/schema.graphql +548 -59
  16. package/src/tact-timer.ts +21 -4
  17. package/tsconfig.tsbuildinfo +1 -1
  18. package/logs/application-2024-07-11-12.log +0 -23
  19. package/logs/application-2024-07-11-13.log +0 -23
  20. package/logs/application-2024-07-12-19.log +0 -46
  21. package/logs/connections-2024-07-05-08.log +0 -50
  22. package/logs/connections-2024-07-05-12.log +0 -50
  23. package/logs/connections-2024-07-06-01.log +0 -50
  24. package/logs/connections-2024-07-06-03.log +0 -50
  25. package/logs/connections-2024-07-06-11.log +0 -47
  26. package/logs/connections-2024-07-06-12.log +0 -50
  27. package/logs/connections-2024-07-11-12.log +0 -47
  28. package/logs/connections-2024-07-11-13.log +0 -47
  29. package/logs/connections-2024-07-12-16.log +0 -50
  30. package/logs/connections-2024-07-12-17.log +0 -100
  31. package/logs/connections-2024-07-12-19.log +0 -94
package/CHANGELOG.md CHANGED
@@ -3,6 +3,24 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [7.3.16](https://github.com/things-scene/operato-scene/compare/v7.3.15...v7.3.16) (2024-10-12)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * support started property for tact-timer ([9241954](https://github.com/things-scene/operato-scene/commit/92419544454015531c94c3c3566bb94e2066a827))
12
+
13
+
14
+
15
+ ## [7.3.9](https://github.com/things-scene/operato-scene/compare/v7.3.8...v7.3.9) (2024-09-11)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * @hatiolab/things-scene version ([5260171](https://github.com/things-scene/operato-scene/commit/52601719115288709ca7e0eee0974cc4677f219e))
21
+
22
+
23
+
6
24
  ## [7.0.7](https://github.com/things-scene/operato-scene/compare/v7.0.6...v7.0.7) (2024-07-13)
7
25
 
8
26
 
package/db.sqlite CHANGED
Binary file
@@ -7,6 +7,7 @@ export default class TactTimer extends TactTimer_base {
7
7
  get nature(): ComponentNature;
8
8
  ready(): void;
9
9
  start(): void;
10
+ stop(): void;
10
11
  onchange(after: Properties): void;
11
12
  getImageElement(): HTMLImageElement | undefined;
12
13
  counting(): void;
@@ -16,5 +17,7 @@ export default class TactTimer extends TactTimer_base {
16
17
  get countdown(): number;
17
18
  get value(): any[];
18
19
  set value(v: any[]);
20
+ get started(): any;
21
+ set started(started: any);
19
22
  }
20
23
  export {};
@@ -104,8 +104,8 @@ export default class TactTimer extends RectPath(Shape) {
104
104
  if (!this.app.isViewMode) {
105
105
  return;
106
106
  }
107
- const { autoStart } = this.state;
108
- if (autoStart) {
107
+ const { autoStart, started } = this.state;
108
+ if (autoStart || started) {
109
109
  this.start();
110
110
  }
111
111
  }
@@ -119,6 +119,9 @@ export default class TactTimer extends RectPath(Shape) {
119
119
  this.counting();
120
120
  }
121
121
  }
122
+ stop() {
123
+ this.started = false;
124
+ }
122
125
  onchange(after) {
123
126
  if ('startTime' in after || 'endTime' in after || 'hidden' in after) {
124
127
  this.start();
@@ -137,8 +140,8 @@ export default class TactTimer extends RectPath(Shape) {
137
140
  return this.imageElement;
138
141
  }
139
142
  counting() {
140
- const { hidden } = this.state;
141
- if (this.disposed || hidden) {
143
+ const { hidden, started } = this.state;
144
+ if (this.disposed || hidden || !started) {
142
145
  return;
143
146
  }
144
147
  requestAnimationFrame(() => {
@@ -250,6 +253,17 @@ export default class TactTimer extends RectPath(Shape) {
250
253
  });
251
254
  }
252
255
  }
256
+ get started() {
257
+ return this.getState('started');
258
+ }
259
+ set started(started) {
260
+ if (this.started !== started) {
261
+ this.setState('started', started);
262
+ if (started) {
263
+ this.start();
264
+ }
265
+ }
266
+ }
253
267
  }
254
268
  Component.register('tact-timer', TactTimer);
255
269
  //# sourceMappingURL=tact-timer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tact-timer.js","sourceRoot":"","sources":["../src/tact-timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAChG,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,UAAU;SACxB;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,oBAAoB;YAC3B,IAAI,EAAE,mBAAmB;YACzB,QAAQ,EAAE;gBACR,OAAO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AAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAA;YAC9B,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS;gBACT,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;aAAM,IAAI,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;YAChC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;YAChC,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS;gBACT,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;aAAM,IAAI,OAAO,CAAC,IAAI,QAAQ,EAAE,CAAC;YAChC,MAAM,CAAC,SAAS,EAAE,OAAO,CAAC,GAAI,CAAY,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;YAC/D,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS;gBACT,OAAO;aACR,CAAC,CAAA;QACJ,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS,EAAE,SAAS;gBACpB,OAAO,EAAE,SAAS;aACnB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\nimport format from './libs/format'\nimport { MASK } from './tact-timer-mask'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'start-time',\n name: 'startTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'end-time',\n name: 'endTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'format',\n name: 'format',\n placeholder: 'hh:mm:ss'\n },\n {\n type: 'select',\n label: 'progress-direction',\n name: 'progressDirection',\n property: {\n options: ['', 'increase', 'decrease']\n }\n },\n {\n type: 'color',\n label: 'tact-timer-mask-color',\n name: 'maskColor'\n },\n {\n type: 'color',\n label: 'before-due-progress-color',\n name: 'beforeDueProgressColor'\n },\n {\n type: 'color',\n label: 'over-due-progress-color',\n name: 'overDueProgressColor'\n },\n {\n type: 'color',\n label: 'before-due-font-color',\n name: 'beforeDueFontColor'\n },\n {\n type: 'color',\n label: 'over-due-font-color',\n name: 'overDueFontColor'\n },\n {\n type: 'color',\n label: 'under-threshold-color',\n name: 'underThresholdColor'\n },\n {\n type: 'number',\n label: 'progress-threshold',\n name: 'progressThreshold',\n placeholder: '%'\n },\n {\n type: 'number',\n label: 'round',\n name: 'round'\n },\n {\n type: 'boolean',\n label: 'auto-start',\n name: 'autoStart'\n },\n {\n type: 'boolean',\n label: 'show-progress',\n name: 'showProgress'\n },\n {\n type: 'boolean',\n label: 'show-timer',\n name: 'showTimer'\n }\n ],\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n private _start: number = 0\n private _due: number = 0\n private imageElement?: HTMLImageElement\n\n get nature() {\n return NATURE\n }\n\n ready() {\n if (!this.app.isViewMode) {\n return\n }\n\n const { autoStart } = this.state\n\n if (autoStart) {\n this.start()\n }\n }\n\n start() {\n const { startTime, endTime, hidden } = this.state\n const start = this.parseTime(startTime)\n const end = this.parseTime(endTime)\n\n if (start && end && !hidden) {\n this._due = end.getTime()\n this._start = start.getTime()\n this.counting()\n }\n }\n\n onchange(after: Properties) {\n if ('startTime' in after || 'endTime' in after || 'hidden' in after) {\n this.start()\n }\n\n if ('maskColor' in after) {\n delete this.imageElement\n }\n }\n\n getImageElement(): HTMLImageElement | undefined {\n if (!this.imageElement) {\n const { maskColor = 'black' } = this.state\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MASK.replace(/{{fillColor}}/g, maskColor))\n }\n\n return this.imageElement\n }\n\n counting() {\n const { hidden } = this.state\n if (this.disposed || hidden) {\n return\n }\n\n requestAnimationFrame(() => {\n const { showTimer, beforeDueFontColor, overDueFontColor, fontColor } = this.state\n const countdown = this.countdown\n\n this.setState('fontColor', (this.countdown > 0 ? beforeDueFontColor : overDueFontColor) || fontColor)\n\n if (showTimer) {\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\n } else {\n this.text = ''\n }\n\n this.setState('data', this.countdown)\n\n setTimeout(() => {\n this.counting()\n }, 1000)\n })\n }\n\n render(context: CanvasRenderingContext2D) {\n var {\n top,\n left,\n height,\n width,\n round = 0,\n fontColor,\n maskColor,\n beforeDueFontColor,\n overDueFontColor,\n beforeDueProgressColor = 'transparent',\n overDueProgressColor = 'transparent',\n underThresholdColor = 'transparent',\n progressDirection = 'increase',\n progressThreshold = 0,\n showProgress\n } = this.state\n\n const increase = this.countdown > 0\n const totalDuration = (this._due - this._start) / 1000\n const underThreshold = this.countdown / totalDuration < progressThreshold / 100\n\n // progress의 색상\n context.beginPath()\n context.roundRect(left, top, width, height, round)\n context.clip()\n this.drawFill(context)\n\n // value의 색상\n context.beginPath()\n\n if (!showProgress) {\n return\n }\n\n var progress = Math.abs((this.countdown / totalDuration) * 100)\n\n if (!isNaN(progress)) {\n progress = width - (width * progress) / 100\n progress = Math.max(Math.min(progress, width), 0)\n\n if (progressDirection == 'increase') {\n context.rect(left, top, progress, height)\n } else {\n context.rect(left + progress, top, width - progress, height)\n }\n\n context.fillStyle = increase\n ? underThreshold\n ? underThresholdColor\n : beforeDueProgressColor\n : overDueProgressColor\n context.fill()\n\n context.beginPath()\n }\n\n const image = this.getImageElement()\n this.drawImage(context, image!, left - 2, top - 2, width + 4, height + 4)\n\n context.roundRect(left, top, width, height, round)\n\n this.setState('fontColor', (increase ? beforeDueFontColor : overDueFontColor) || fontColor)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n parseTime(timeString: string): Date | undefined {\n if (!timeString || timeString.length !== 14) {\n return undefined\n }\n const year = parseInt(timeString.slice(0, 4), 10)\n const month = parseInt(timeString.slice(4, 6), 10) - 1\n const day = parseInt(timeString.slice(6, 8), 10)\n const hour = parseInt(timeString.slice(8, 10), 10)\n const minute = parseInt(timeString.slice(10, 12), 10)\n const second = parseInt(timeString.slice(12, 14), 10)\n\n return new Date(year, month, day, hour, minute, second)\n }\n\n get countdown(): number {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\n }\n\n get value() {\n const { startTime, endTime } = this.state\n return [startTime, endTime]\n }\n\n set value(v) {\n if (v instanceof Array) {\n const [startTime, endTime] = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'object') {\n const { startTime, endTime } = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'string') {\n const [startTime, endTime] = (v as string).split(/[-+/%$#_,]+/)\n this.setState({\n startTime,\n endTime\n })\n } else {\n this.setState({\n startTime: undefined,\n endTime: undefined\n })\n }\n }\n}\n\nComponent.register('tact-timer', TactTimer)\n"]}
1
+ {"version":3,"file":"tact-timer.js","sourceRoot":"","sources":["../src/tact-timer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,QAAQ,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AAChG,OAAO,MAAM,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,MAAM,MAAM,GAAoB;IAC9B,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,SAAS,EAAE,IAAI;IACf,UAAU,EAAE;QACV;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,UAAU;YACjB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,gBAAgB;SAC9B;QACD;YACE,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,QAAQ;YACf,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,UAAU;SACxB;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,CAAC;CACF;AAED,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA","sourcesContent":["import { Component, ComponentNature, Properties, RectPath, Shape } from '@hatiolab/things-scene'\nimport format from './libs/format'\nimport { MASK } from './tact-timer-mask'\n\nconst NATURE: ComponentNature = {\n mutable: false,\n resizable: true,\n rotatable: true,\n properties: [\n {\n type: 'string',\n label: 'start-time',\n name: 'startTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'end-time',\n name: 'endTime',\n placeholder: 'YYYYMMDDhhmmss'\n },\n {\n type: 'string',\n label: 'format',\n name: 'format',\n placeholder: 'hh:mm:ss'\n },\n {\n type: 'select',\n label: 'progress-direction',\n name: 'progressDirection',\n property: {\n options: ['', 'increase', 'decrease']\n }\n },\n {\n type: 'color',\n label: 'tact-timer-mask-color',\n name: 'maskColor'\n },\n {\n type: 'color',\n label: 'before-due-progress-color',\n name: 'beforeDueProgressColor'\n },\n {\n type: 'color',\n label: 'over-due-progress-color',\n name: 'overDueProgressColor'\n },\n {\n type: 'color',\n label: 'before-due-font-color',\n name: 'beforeDueFontColor'\n },\n {\n type: 'color',\n label: 'over-due-font-color',\n name: 'overDueFontColor'\n },\n {\n type: 'color',\n label: 'under-threshold-color',\n name: 'underThresholdColor'\n },\n {\n type: 'number',\n label: 'progress-threshold',\n name: 'progressThreshold',\n placeholder: '%'\n },\n {\n type: 'number',\n label: 'round',\n name: 'round'\n },\n {\n type: 'boolean',\n label: 'auto-start',\n name: 'autoStart'\n },\n {\n type: 'boolean',\n label: 'show-progress',\n name: 'showProgress'\n },\n {\n type: 'boolean',\n label: 'show-timer',\n name: 'showTimer'\n }\n ],\n help: 'scene/component/manufacturing/tact-timer'\n}\n\nexport default class TactTimer extends RectPath(Shape) {\n private _start: number = 0\n private _due: number = 0\n private imageElement?: HTMLImageElement\n\n get nature() {\n return NATURE\n }\n\n ready() {\n if (!this.app.isViewMode) {\n return\n }\n\n const { autoStart, started } = this.state\n\n if (autoStart || started) {\n this.start()\n }\n }\n\n start() {\n const { startTime, endTime, hidden } = this.state\n const start = this.parseTime(startTime)\n const end = this.parseTime(endTime)\n\n if (start && end && !hidden) {\n this._due = end.getTime()\n this._start = start.getTime()\n this.counting()\n }\n }\n\n stop() {\n this.started = false\n }\n\n onchange(after: Properties) {\n if ('startTime' in after || 'endTime' in after || 'hidden' in after) {\n this.start()\n }\n\n if ('maskColor' in after) {\n delete this.imageElement\n }\n }\n\n getImageElement(): HTMLImageElement | undefined {\n if (!this.imageElement) {\n const { maskColor = 'black' } = this.state\n\n this.imageElement = new Image()\n this.imageElement.src =\n 'data:image/svg+xml;charset=UTF-8;base64,' + btoa(MASK.replace(/{{fillColor}}/g, maskColor))\n }\n\n return this.imageElement\n }\n\n counting() {\n const { hidden, started } = this.state\n if (this.disposed || hidden || !started) {\n return\n }\n\n requestAnimationFrame(() => {\n const { showTimer, beforeDueFontColor, overDueFontColor, fontColor } = this.state\n const countdown = this.countdown\n\n this.setState('fontColor', (this.countdown > 0 ? beforeDueFontColor : overDueFontColor) || fontColor)\n\n if (showTimer) {\n const text = format(Math.abs(countdown), this.getState('format'))\n this.text = text\n } else {\n this.text = ''\n }\n\n this.setState('data', this.countdown)\n\n setTimeout(() => {\n this.counting()\n }, 1000)\n })\n }\n\n render(context: CanvasRenderingContext2D) {\n var {\n top,\n left,\n height,\n width,\n round = 0,\n fontColor,\n maskColor,\n beforeDueFontColor,\n overDueFontColor,\n beforeDueProgressColor = 'transparent',\n overDueProgressColor = 'transparent',\n underThresholdColor = 'transparent',\n progressDirection = 'increase',\n progressThreshold = 0,\n showProgress\n } = this.state\n\n const increase = this.countdown > 0\n const totalDuration = (this._due - this._start) / 1000\n const underThreshold = this.countdown / totalDuration < progressThreshold / 100\n\n // progress의 색상\n context.beginPath()\n context.roundRect(left, top, width, height, round)\n context.clip()\n this.drawFill(context)\n\n // value의 색상\n context.beginPath()\n\n if (!showProgress) {\n return\n }\n\n var progress = Math.abs((this.countdown / totalDuration) * 100)\n\n if (!isNaN(progress)) {\n progress = width - (width * progress) / 100\n progress = Math.max(Math.min(progress, width), 0)\n\n if (progressDirection == 'increase') {\n context.rect(left, top, progress, height)\n } else {\n context.rect(left + progress, top, width - progress, height)\n }\n\n context.fillStyle = increase\n ? underThreshold\n ? underThresholdColor\n : beforeDueProgressColor\n : overDueProgressColor\n context.fill()\n\n context.beginPath()\n }\n\n const image = this.getImageElement()\n this.drawImage(context, image!, left - 2, top - 2, width + 4, height + 4)\n\n context.roundRect(left, top, width, height, round)\n\n this.setState('fontColor', (increase ? beforeDueFontColor : overDueFontColor) || fontColor)\n }\n\n postrender(context: CanvasRenderingContext2D) {\n this.drawStroke(context)\n this.drawText(context)\n }\n\n parseTime(timeString: string): Date | undefined {\n if (!timeString || timeString.length !== 14) {\n return undefined\n }\n const year = parseInt(timeString.slice(0, 4), 10)\n const month = parseInt(timeString.slice(4, 6), 10) - 1\n const day = parseInt(timeString.slice(6, 8), 10)\n const hour = parseInt(timeString.slice(8, 10), 10)\n const minute = parseInt(timeString.slice(10, 12), 10)\n const second = parseInt(timeString.slice(12, 14), 10)\n\n return new Date(year, month, day, hour, minute, second)\n }\n\n get countdown(): number {\n const due = this._due || 0\n const now = Date.now()\n\n return Math.round((due - now) / 1000)\n }\n\n get value() {\n const { startTime, endTime } = this.state\n return [startTime, endTime]\n }\n\n set value(v) {\n if (v instanceof Array) {\n const [startTime, endTime] = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'object') {\n const { startTime, endTime } = v\n this.setState({\n startTime,\n endTime\n })\n } else if (typeof v == 'string') {\n const [startTime, endTime] = (v as string).split(/[-+/%$#_,]+/)\n this.setState({\n startTime,\n endTime\n })\n } else {\n this.setState({\n startTime: undefined,\n endTime: undefined\n })\n }\n }\n\n get started() {\n return this.getState('started')\n }\n\n set started(started) {\n if (this.started !== started) {\n this.setState('started', started)\n if (started) {\n this.start()\n }\n }\n }\n}\n\nComponent.register('tact-timer', TactTimer)\n"]}
@@ -6,29 +6,19 @@
6
6
  "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1720670342063,
10
- "name": "logs/application-2024-07-11-12.log",
11
- "hash": "85677c40f2076ef65f5e6291a77db74beabb6e73aacc0ecf70907412bcc75a2b"
9
+ "date": 1728715931975,
10
+ "name": "logs/application-2024-10-12-15.log",
11
+ "hash": "5c3bdc98809f52fc0616645665bf2a6425549eac0f050006427d3bfcadc51e07"
12
12
  },
13
13
  {
14
- "date": 1720672295153,
15
- "name": "logs/application-2024-07-11-13.log",
16
- "hash": "0cae176bd15f168546d80c132308f082e2c5775e3c36374db76976c46b882207"
14
+ "date": 1728718043975,
15
+ "name": "logs/application-2024-10-12-16.log",
16
+ "hash": "d1d6c8f0d82c2cbff8ea0c8599d8a4a1343574385480fbdcc49539d10f02d125"
17
17
  },
18
18
  {
19
- "date": 1720769526083,
20
- "name": "logs/application-2024-07-12-16.log",
21
- "hash": "5514cf65fc3bdf6b58db34630e0fdf3dea1552ac2541321543e4bf9cdce73883"
22
- },
23
- {
24
- "date": 1720772145704,
25
- "name": "logs/application-2024-07-12-17.log",
26
- "hash": "96f68e68595644e56a553db649172b81ef1f6ddd489b7e37e4432fb9887e147f"
27
- },
28
- {
29
- "date": 1720781272322,
30
- "name": "logs/application-2024-07-12-19.log",
31
- "hash": "d6809311bf4d1c5ec2dd6b01ed3188d97d1cd238e5796ad6b7dca9ed46bd4426"
19
+ "date": 1728748811809,
20
+ "name": "logs/application-2024-10-13-01.log",
21
+ "hash": "9be149efac80ac4f01c989c1cc0d9c197a13b32c5ce58d02448507de55af5801"
32
22
  }
33
23
  ],
34
24
  "hashType": "sha256"
@@ -6,59 +6,19 @@
6
6
  "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
7
  "files": [
8
8
  {
9
- "date": 1720137178564,
10
- "name": "logs/connections-2024-07-05-08.log",
11
- "hash": "94f3ef0d5ba7805205e856205c20da3871817ea4c51799b86b60f98fde40fea2"
9
+ "date": 1728715933727,
10
+ "name": "logs/connections-2024-10-12-15.log",
11
+ "hash": "644d34ed94e9f0617a5650c8072e070b2fd70993ade8fc1dab4e3d5b4d0ff437"
12
12
  },
13
13
  {
14
- "date": 1720150885434,
15
- "name": "logs/connections-2024-07-05-12.log",
16
- "hash": "915217a5f77db853ca6eb66dfb4607356541bfd5c64398d94d56e2790d548e6d"
14
+ "date": 1728718045743,
15
+ "name": "logs/connections-2024-10-12-16.log",
16
+ "hash": "e6e10c0f311ee6f39c3b68f2157928aaa91be5cd6460ac602df43dfdab574184"
17
17
  },
18
18
  {
19
- "date": 1720197808800,
20
- "name": "logs/connections-2024-07-06-01.log",
21
- "hash": "20a27adf498638e92d964cefb0a15c246d1bd3e3e50caeb358a5ee56c071b223"
22
- },
23
- {
24
- "date": 1720204705240,
25
- "name": "logs/connections-2024-07-06-03.log",
26
- "hash": "e9b0077acc0212231c578f4f52420917879f9841e3681b59c2e33ef392a38c53"
27
- },
28
- {
29
- "date": 1720231836497,
30
- "name": "logs/connections-2024-07-06-11.log",
31
- "hash": "90547f443988ace04bdcd961cefa8e473792444776e628273dd29e6cd70092c7"
32
- },
33
- {
34
- "date": 1720235760768,
35
- "name": "logs/connections-2024-07-06-12.log",
36
- "hash": "683660cbeda45a721e399b95a8e16ab6c88ca8ef13b53eed9cc526294cae0de7"
37
- },
38
- {
39
- "date": 1720670343838,
40
- "name": "logs/connections-2024-07-11-12.log",
41
- "hash": "1b8f201fc8ec18f5851a826c15476b6d516b5a0ccb1c9b5e92488e14d90ed899"
42
- },
43
- {
44
- "date": 1720672296862,
45
- "name": "logs/connections-2024-07-11-13.log",
46
- "hash": "7a32a7cd575038336c75291e5a9ea2dae54a24550ff0442aed19ab30855145ea"
47
- },
48
- {
49
- "date": 1720769528029,
50
- "name": "logs/connections-2024-07-12-16.log",
51
- "hash": "8d83b77fcf7c207fa3e4f742a51b7f4193e650bad84c4fd25b0089a9e4234d76"
52
- },
53
- {
54
- "date": 1720772147824,
55
- "name": "logs/connections-2024-07-12-17.log",
56
- "hash": "473b0df886a34d0e37a3ab49d8945dc522093acda5ebbfce7d5191e7a17a4a61"
57
- },
58
- {
59
- "date": 1720781274006,
60
- "name": "logs/connections-2024-07-12-19.log",
61
- "hash": "7c23a5913fcd07f71a5dc4c4b7bfbc5f0d12dc37eb97755be00c4792beef1af9"
19
+ "date": 1728748813512,
20
+ "name": "logs/connections-2024-10-13-01.log",
21
+ "hash": "19229fe0bbd7daffba86b8c21517356b37ab6b83d3d337b4faac3e42a47eec51"
62
22
  }
63
23
  ],
64
24
  "hashType": "sha256"
@@ -1,5 +1,5 @@
1
- 2024-07-12T16:32:07+09:00 info: File Storage is Ready.
2
- 2024-07-12T16:32:08+09:00 error: Error: Cannot find module 'oracledb'
1
+ 2024-10-12T15:52:13+09:00 info: File Storage is Ready.
2
+ 2024-10-12T15:52:13+09:00 error: Error: Cannot find module 'oracledb'
3
3
  Require stack:
4
4
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
5
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
@@ -25,7 +25,7 @@ Require stack:
25
25
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
26
  at Module.load (node:internal/modules/cjs/loader:1208:32)
27
27
  at Module._load (node:internal/modules/cjs/loader:1024:12)
28
- 2024-07-12T16:32:08+09:00 error: Error: Cannot find module 'oracledb'
28
+ 2024-10-12T15:52:14+09:00 error: Error: Cannot find module 'oracledb'
29
29
  Require stack:
30
30
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
31
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
@@ -51,7 +51,7 @@ Require stack:
51
51
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
52
  at Module.load (node:internal/modules/cjs/loader:1208:32)
53
53
  at Module._load (node:internal/modules/cjs/loader:1024:12)
54
- 2024-07-12T16:32:08+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
54
+ 2024-10-12T15:52:14+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
55
55
  Require stack:
56
56
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
57
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
@@ -76,7 +76,7 @@ Require stack:
76
76
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
77
  at Module.load (node:internal/modules/cjs/loader:1208:32)
78
78
  at Module._load (node:internal/modules/cjs/loader:1024:12)
79
- 2024-07-12T16:32:08+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
79
+ 2024-10-12T15:52:14+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
80
80
  Require stack:
81
81
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
82
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
@@ -100,6 +100,6 @@ Require stack:
100
100
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
101
  at Module.load (node:internal/modules/cjs/loader:1208:32)
102
102
  at Module._load (node:internal/modules/cjs/loader:1024:12)
103
- 2024-07-12T16:32:09+09:00 info: Default DataSource established
104
- 2024-07-12T16:32:10+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
- 2024-07-12T16:32:10+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
103
+ 2024-10-12T15:52:15+09:00 info: Default DataSource established
104
+ 2024-10-12T15:52:16+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
+ 2024-10-12T15:52:16+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -0,0 +1,105 @@
1
+ 2024-10-12T16:27:25+09:00 info: File Storage is Ready.
2
+ 2024-10-12T16:27:25+09:00 error: Error: Cannot find module 'oracledb'
3
+ Require stack:
4
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
6
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
7
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
8
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
9
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
10
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
11
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
12
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
13
+ at Module._load (node:internal/modules/cjs/loader:986:27)
14
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
15
+ at require (node:internal/modules/helpers:179:18)
16
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js:7:20)
17
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
18
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
19
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
20
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
21
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
22
+ at require (node:internal/modules/helpers:179:18)
23
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js:11:1)
24
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
25
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
27
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
28
+ 2024-10-12T16:27:26+09:00 error: Error: Cannot find module 'oracledb'
29
+ Require stack:
30
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
32
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
33
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
34
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
35
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
36
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
37
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
38
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
39
+ at Module._load (node:internal/modules/cjs/loader:986:27)
40
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
41
+ at require (node:internal/modules/helpers:179:18)
42
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js:9:20)
43
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
44
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
45
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
46
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
47
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
48
+ at require (node:internal/modules/helpers:179:18)
49
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js:43:1)
50
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
51
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
53
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
54
+ 2024-10-12T16:27:26+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
55
+ Require stack:
56
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
58
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/index.js
59
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
60
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
61
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
62
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
63
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
64
+ at Module._load (node:internal/modules/cjs/loader:986:27)
65
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
66
+ at require (node:internal/modules/helpers:179:18)
67
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js:10:17)
68
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
69
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
70
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
71
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
72
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
73
+ at require (node:internal/modules/helpers:179:18)
74
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js:4:17)
75
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
76
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
78
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
79
+ 2024-10-12T16:27:26+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
80
+ Require stack:
81
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
83
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
84
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
85
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
86
+ - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
87
+ at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
88
+ at Module._load (node:internal/modules/cjs/loader:986:27)
89
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
90
+ at require (node:internal/modules/helpers:179:18)
91
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js:8:19)
92
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
93
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
94
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
95
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
96
+ at Module.require (node:internal/modules/cjs/loader:1233:19)
97
+ at require (node:internal/modules/helpers:179:18)
98
+ at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js:4:22)
99
+ at Module._compile (node:internal/modules/cjs/loader:1358:14)
100
+ at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
+ at Module.load (node:internal/modules/cjs/loader:1208:32)
102
+ at Module._load (node:internal/modules/cjs/loader:1024:12)
103
+ 2024-10-12T16:27:27+09:00 info: Default DataSource established
104
+ 2024-10-12T16:27:28+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
+ 2024-10-12T16:27:28+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
@@ -1,57 +1,7 @@
1
- 2024-07-12T17:15:47+09:00 info: File Storage is Ready.
2
- 2024-07-12T17:15:48+09:00 error: Error: Cannot find module 'oracledb'
3
- Require stack:
4
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
5
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
6
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
7
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
8
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
9
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
10
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
11
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
12
- at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
13
- at Module._load (node:internal/modules/cjs/loader:986:27)
14
- at Module.require (node:internal/modules/cjs/loader:1233:19)
15
- at require (node:internal/modules/helpers:179:18)
16
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js:7:20)
17
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
18
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
19
- at Module.load (node:internal/modules/cjs/loader:1208:32)
20
- at Module._load (node:internal/modules/cjs/loader:1024:12)
21
- at Module.require (node:internal/modules/cjs/loader:1233:19)
22
- at require (node:internal/modules/helpers:179:18)
23
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js:11:1)
24
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
25
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
26
- at Module.load (node:internal/modules/cjs/loader:1208:32)
27
- at Module._load (node:internal/modules/cjs/loader:1024:12)
28
- 2024-07-12T17:15:48+09:00 error: Error: Cannot find module 'oracledb'
29
- Require stack:
30
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
31
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
32
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/index.js
33
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/index.js
34
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/lib/module-loader.js
35
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
36
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
37
- - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
38
- at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
39
- at Module._load (node:internal/modules/cjs/loader:986:27)
40
- at Module.require (node:internal/modules/cjs/loader:1233:19)
41
- at require (node:internal/modules/helpers:179:18)
42
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js:9:20)
43
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
44
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
45
- at Module.load (node:internal/modules/cjs/loader:1208:32)
46
- at Module._load (node:internal/modules/cjs/loader:1024:12)
47
- at Module.require (node:internal/modules/cjs/loader:1233:19)
48
- at require (node:internal/modules/helpers:179:18)
49
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js:43:1)
50
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
51
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
52
- at Module.load (node:internal/modules/cjs/loader:1208:32)
53
- at Module._load (node:internal/modules/cjs/loader:1024:12)
54
- 2024-07-12T17:15:48+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
1
+ 2024-10-13T01:00:13+09:00 info: File Storage is Ready.
2
+ 2024-10-13T01:00:13+09:00 error: oracledb module loading failed
3
+ 2024-10-13T01:00:13+09:00 error: oracledb module loading failed
4
+ 2024-10-13T01:00:13+09:00 error: Cannot find module '@thiagoelg/node-printer'
55
5
  Require stack:
56
6
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
57
7
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
@@ -60,23 +10,7 @@ Require stack:
60
10
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
61
11
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
62
12
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
63
- at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
64
- at Module._load (node:internal/modules/cjs/loader:986:27)
65
- at Module.require (node:internal/modules/cjs/loader:1233:19)
66
- at require (node:internal/modules/helpers:179:18)
67
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js:10:17)
68
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
69
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
70
- at Module.load (node:internal/modules/cjs/loader:1208:32)
71
- at Module._load (node:internal/modules/cjs/loader:1024:12)
72
- at Module.require (node:internal/modules/cjs/loader:1233:19)
73
- at require (node:internal/modules/helpers:179:18)
74
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js:4:17)
75
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
76
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
77
- at Module.load (node:internal/modules/cjs/loader:1208:32)
78
- at Module._load (node:internal/modules/cjs/loader:1024:12)
79
- 2024-07-12T17:15:48+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
13
+ 2024-10-13T01:00:14+09:00 error: Cannot find module '@thiagoelg/node-printer'
80
14
  Require stack:
81
15
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
82
16
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
@@ -84,27 +18,11 @@ Require stack:
84
18
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/env/index.js
85
19
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/dist-server/server-dev.js
86
20
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/shell/bin/things-factory-dev
87
- at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
88
- at Module._load (node:internal/modules/cjs/loader:986:27)
89
- at Module.require (node:internal/modules/cjs/loader:1233:19)
90
- at require (node:internal/modules/helpers:179:18)
91
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js:8:19)
92
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
93
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
94
- at Module.load (node:internal/modules/cjs/loader:1208:32)
95
- at Module._load (node:internal/modules/cjs/loader:1024:12)
96
- at Module.require (node:internal/modules/cjs/loader:1233:19)
97
- at require (node:internal/modules/helpers:179:18)
98
- at Object.<anonymous> (/Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js:4:22)
99
- at Module._compile (node:internal/modules/cjs/loader:1358:14)
100
- at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
101
- at Module.load (node:internal/modules/cjs/loader:1208:32)
102
- at Module._load (node:internal/modules/cjs/loader:1024:12)
103
- 2024-07-12T17:15:49+09:00 info: Default DataSource established
104
- 2024-07-12T17:15:50+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
105
- 2024-07-12T17:15:50+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
106
- 2024-07-12T17:27:08+09:00 info: File Storage is Ready.
107
- 2024-07-12T17:27:08+09:00 error: Error: Cannot find module 'oracledb'
21
+ 2024-10-13T01:00:15+09:00 info: Default DataSource established
22
+ 2024-10-13T01:00:16+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
23
+ 2024-10-13T01:00:16+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
24
+ 2024-10-13T01:23:40+09:00 info: File Storage is Ready.
25
+ 2024-10-13T01:23:41+09:00 error: Error: Cannot find module 'oracledb'
108
26
  Require stack:
109
27
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/oracle-connector.js
110
28
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/connector/index.js
@@ -130,7 +48,7 @@ Require stack:
130
48
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
131
49
  at Module.load (node:internal/modules/cjs/loader:1208:32)
132
50
  at Module._load (node:internal/modules/cjs/loader:1024:12)
133
- 2024-07-12T17:27:09+09:00 error: Error: Cannot find module 'oracledb'
51
+ 2024-10-13T01:23:41+09:00 error: Error: Cannot find module 'oracledb'
134
52
  Require stack:
135
53
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/oracle-procedure.js
136
54
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/integration-base/dist-server/engine/task/index.js
@@ -156,7 +74,7 @@ Require stack:
156
74
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
157
75
  at Module.load (node:internal/modules/cjs/loader:1208:32)
158
76
  at Module._load (node:internal/modules/cjs/loader:1024:12)
159
- 2024-07-12T17:27:09+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
77
+ 2024-10-13T01:23:41+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
160
78
  Require stack:
161
79
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/print.js
162
80
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/board-service/dist-server/controllers/index.js
@@ -181,7 +99,7 @@ Require stack:
181
99
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
182
100
  at Module.load (node:internal/modules/cjs/loader:1208:32)
183
101
  at Module._load (node:internal/modules/cjs/loader:1024:12)
184
- 2024-07-12T17:27:09+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
102
+ 2024-10-13T01:23:42+09:00 error: Error: Cannot find module '@thiagoelg/node-printer'
185
103
  Require stack:
186
104
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/middlewares/index.js
187
105
  - /Users/super/Documents/GitHub/operato-scene/node_modules/@things-factory/print-service/dist-server/index.js
@@ -205,6 +123,6 @@ Require stack:
205
123
  at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
206
124
  at Module.load (node:internal/modules/cjs/loader:1208:32)
207
125
  at Module._load (node:internal/modules/cjs/loader:1024:12)
208
- 2024-07-12T17:27:09+09:00 info: Default DataSource established
209
- 2024-07-12T17:27:10+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
210
- 2024-07-12T17:27:10+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql
126
+ 2024-10-13T01:23:43+09:00 info: Default DataSource established
127
+ 2024-10-13T01:23:46+09:00 info: 🚀 Server ready at http://0.0.0.0:3000/graphql
128
+ 2024-10-13T01:23:46+09:00 info: 🚀 Subscriptions ready at ws://0.0.0.0:3000/graphql