@operato/scene-manufacturing 7.3.16 → 7.3.19

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.
@@ -106,6 +106,7 @@ export default class TactTimer extends RectPath(Shape) {
106
106
  }
107
107
  const { autoStart, started } = this.state;
108
108
  if (autoStart || started) {
109
+ this.setState('started', true);
109
110
  this.start();
110
111
  }
111
112
  }
@@ -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,EAAE,CAAC,EAAE,EAAE,UAAU,EAAE,UAAU,CAAC;aACtC;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,WAAW;SAClB;QACD;YACE,IAAI,EAAE,OAAO;YACb,K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AAQ,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;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO;QACjB,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;YACjC,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAA;YACd,CAAC;QACH,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, 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"]}
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,K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AAM,CAAC;YACN,IAAI,CAAC,QAAQ,CAAC;gBACZ,SAAS,EAAE,SAAS;gBACpB,OAAO,EAAE,SAAS;aACnB,CAAC,CAAA;QACJ,CAAC;IACH,CAAC;IAED,IAAI,OAAO;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IACjC,CAAC;IAED,IAAI,OAAO,CAAC,OAAO;QACjB,IAAI,IAAI,CAAC,OAAO,KAAK,OAAO,EAAE,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;YACjC,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,KAAK,EAAE,CAAA;YACd,CAAC;QACH,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, started } = this.state\n\n if (autoStart || started) {\n this.setState('started', true)\n\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"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@operato/scene-manufacturing",
3
3
  "description": "Things scene components for manufacturing industry",
4
- "version": "7.3.16",
4
+ "version": "7.3.19",
5
5
  "license": "MIT",
6
6
  "things-scene": true,
7
7
  "author": "heartyoh",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "2f3a68c4862d89eafd149c3005e7e32f76845166"
60
+ "gitHead": "ff73072a62ee02520f9d986d0095f6d329de64f9"
61
61
  }
package/CHANGELOG.md DELETED
@@ -1,195 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
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
-
24
- ## [7.0.7](https://github.com/things-scene/operato-scene/compare/v7.0.6...v7.0.7) (2024-07-13)
25
-
26
-
27
- ### :bug: Bug Fix
28
-
29
- * upgrade tact-timer ([b1d9521](https://github.com/things-scene/operato-scene/commit/b1d952152a8e2d5ac116d46e595a31f733af0ba4))
30
-
31
-
32
-
33
- ## [7.0.6](https://github.com/things-scene/operato-scene/compare/v7.0.5...v7.0.6) (2024-07-11)
34
-
35
-
36
- ### :bug: Bug Fix
37
-
38
- * make tact-timer mask color settable ([a59cf40](https://github.com/things-scene/operato-scene/commit/a59cf408706de9087212a6aa21333c1aa1c874f3))
39
-
40
-
41
-
42
- ## [7.0.4](https://github.com/things-scene/operato-scene/compare/v7.0.3...v7.0.4) (2024-07-08)
43
-
44
-
45
- ### :bug: Bug Fix
46
-
47
- * support startTime, endTime, showProgress, showTimer and mask image for tact-timer ([dc7557e](https://github.com/things-scene/operato-scene/commit/dc7557eed23744b922b65ccbba4ea276f13545b5))
48
-
49
-
50
-
51
- ## [7.0.3](https://github.com/things-scene/operato-scene/compare/v7.0.2...v7.0.3) (2024-07-05)
52
-
53
-
54
- ### :bug: Bug Fix
55
-
56
- * missing component icons ([371d826](https://github.com/things-scene/operato-scene/commit/371d826cd905485d787d45a9a77b1a4cd28a52d7))
57
-
58
-
59
-
60
- ## [7.0.1](https://github.com/things-scene/operato-scene/compare/v7.0.0...v7.0.1) (2024-06-30)
61
-
62
-
63
- ### :bug: Bug Fix
64
-
65
- * things-factory@7.0.0 ([f4cfe44](https://github.com/things-scene/operato-scene/commit/f4cfe44cb565e7b8fdc0df210a722b6526871848))
66
-
67
-
68
-
69
- ## [7.0.0](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.4...v7.0.0) (2024-06-30)
70
-
71
- **Note:** Version bump only for package @operato/scene-manufacturing
72
-
73
-
74
-
75
-
76
-
77
- ## [7.0.0-rc.3](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.2...v7.0.0-rc.3) (2024-06-28)
78
-
79
-
80
- ### :bug: Bug Fix
81
-
82
- * remove minus limit from tact-timer ([dc7d2d0](https://github.com/things-scene/operato-scene/commit/dc7d2d012cff03e5bc462fe2f01780b280927e48))
83
- * setting value-format for chart series ([c77c295](https://github.com/things-scene/operato-scene/commit/c77c295946b01828ab3b37c0c0739f12ea42d63a))
84
-
85
-
86
-
87
- ## [7.0.0-rc.1](https://github.com/things-scene/operato-scene/compare/v7.0.0-rc.0...v7.0.0-rc.1) (2024-06-21)
88
-
89
-
90
- ### :bug: Bug Fix
91
-
92
- * apply v7-rc dependencies ([eee5612](https://github.com/things-scene/operato-scene/commit/eee5612e1d569387c284a7c6c49d64ef44b6d701))
93
-
94
-
95
-
96
- ## [7.0.0-rc.0](https://github.com/things-scene/operato-scene/compare/v2.0.0-beta.8...v7.0.0-rc.0) (2024-06-21)
97
-
98
- **Note:** Version bump only for package @operato/scene-manufacturing
99
-
100
-
101
-
102
-
103
-
104
- ## [2.0.0-beta.0](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.12...v2.0.0-beta.0) (2024-06-01)
105
-
106
-
107
- ### :rocket: New Features
108
-
109
- * 2.0.0-beta.0 ([a2e2869](https://github.com/things-scene/operato-scene/commit/a2e28694eedf5bab0c54bcab5432d54ec59edd7f))
110
-
111
-
112
- ### :bug: Bug Fix
113
-
114
- * allowJs in tsconfig option ([fa77174](https://github.com/things-scene/operato-scene/commit/fa771742188f21f177f0a85281570f59f0c478cf))
115
-
116
-
117
-
118
- ## [2.0.0-alpha.9](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.8...v2.0.0-alpha.9) (2024-04-11)
119
-
120
-
121
- ### :bug: Bug Fix
122
-
123
- * things-factory@7.0.1 ([a9f4c18](https://github.com/things-scene/operato-scene/commit/a9f4c1873b80c540e4c2e16649e127ccffcf9a4c))
124
-
125
-
126
-
127
- ## [2.0.0-alpha.6](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.5...v2.0.0-alpha.6) (2024-03-24)
128
-
129
-
130
- ### :bug: Bug Fix
131
-
132
- * translation ([266d423](https://github.com/things-scene/operato-scene/commit/266d423d9d6992464f45a437acc90ccf8ed33bf6))
133
-
134
-
135
-
136
- ## [2.0.0-alpha.5](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.4...v2.0.0-alpha.5) (2024-03-21)
137
-
138
-
139
- ### :bug: Bug Fix
140
-
141
- * 컴포넌트 명 다국어 ([fbc26d9](https://github.com/things-scene/operato-scene/commit/fbc26d9fb24e858541598ba55e2b8d33f2df8d8a))
142
-
143
-
144
-
145
- ## [2.0.0-alpha.4](https://github.com/things-scene/operato-scene/compare/v2.0.0-alpha.3...v2.0.0-alpha.4) (2024-03-21)
146
-
147
-
148
- ### :bug: Bug Fix
149
-
150
- * 컴포넌트 명 다국어 ([64e1f08](https://github.com/things-scene/operato-scene/commit/64e1f08af32d2ac193c3d31b0025f8d06f569ca4))
151
-
152
-
153
-
154
- ## [2.0.0-alpha.0](https://github.com/things-scene/operato-scene/compare/v1.3.9...v2.0.0-alpha.0) (2024-01-14)
155
-
156
-
157
- ### :bug: Bug Fix
158
-
159
- * 2.0.0-alpha.0 ([93274e3](https://github.com/things-scene/operato-scene/commit/93274e36c5d184f339f83899654dd48b4786ac2b))
160
-
161
-
162
-
163
- ## [1.3.4](https://github.com/things-scene/operato-scene/compare/v1.3.3...v1.3.4) (2023-12-04)
164
-
165
-
166
- ### :bug: Bug Fix
167
-
168
- * remove ignored files ([412acb0](https://github.com/things-scene/operato-scene/commit/412acb035e727fb6ee10cbcae85a06ed961d115e))
169
-
170
-
171
-
172
- ## [1.3.3](https://github.com/things-scene/operato-scene/compare/v1.3.2...v1.3.3) (2023-12-02)
173
-
174
-
175
- ### :bug: Bug Fix
176
-
177
- * tact-timer missing parameter ([be02dce](https://github.com/things-scene/operato-scene/commit/be02dce0dc06802abd2be02840f3f2e80539296f))
178
-
179
-
180
-
181
- ## [1.3.1](https://github.com/things-scene/operato-scene/compare/v1.3.0...v1.3.1) (2023-12-01)
182
-
183
-
184
- ### :bug: Bug Fix
185
-
186
- * complete tact-timer in manufacturing module ([7b569d9](https://github.com/things-scene/operato-scene/commit/7b569d9c98e2732791b4cbd07166896c6e4df440))
187
-
188
-
189
-
190
- ## [1.3.0](https://github.com/things-scene/operato-scene/compare/v1.2.91...v1.3.0) (2023-11-30)
191
-
192
-
193
- ### :rocket: New Features
194
-
195
- * add manufacturing module ([55cdb2d](https://github.com/things-scene/operato-scene/commit/55cdb2d13018c71cdf825efba0647757bd79e3ee))
package/db.sqlite DELETED
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "keep": {
3
- "days": true,
4
- "amount": 2
5
- },
6
- "auditLog": "logs/.08636eb59927f12972f6774f5947c8507b3564c2-audit.json",
7
- "files": [
8
- {
9
- "date": 1728715931975,
10
- "name": "logs/application-2024-10-12-15.log",
11
- "hash": "5c3bdc98809f52fc0616645665bf2a6425549eac0f050006427d3bfcadc51e07"
12
- },
13
- {
14
- "date": 1728718043975,
15
- "name": "logs/application-2024-10-12-16.log",
16
- "hash": "d1d6c8f0d82c2cbff8ea0c8599d8a4a1343574385480fbdcc49539d10f02d125"
17
- },
18
- {
19
- "date": 1728748811809,
20
- "name": "logs/application-2024-10-13-01.log",
21
- "hash": "9be149efac80ac4f01c989c1cc0d9c197a13b32c5ce58d02448507de55af5801"
22
- }
23
- ],
24
- "hashType": "sha256"
25
- }
@@ -1,25 +0,0 @@
1
- {
2
- "keep": {
3
- "days": true,
4
- "amount": 14
5
- },
6
- "auditLog": "logs/.5e5d741d8b7784a2fbad65eedc0fd46946aaf6f2-audit.json",
7
- "files": [
8
- {
9
- "date": 1728715933727,
10
- "name": "logs/connections-2024-10-12-15.log",
11
- "hash": "644d34ed94e9f0617a5650c8072e070b2fd70993ade8fc1dab4e3d5b4d0ff437"
12
- },
13
- {
14
- "date": 1728718045743,
15
- "name": "logs/connections-2024-10-12-16.log",
16
- "hash": "e6e10c0f311ee6f39c3b68f2157928aaa91be5cd6460ac602df43dfdab574184"
17
- },
18
- {
19
- "date": 1728748813512,
20
- "name": "logs/connections-2024-10-13-01.log",
21
- "hash": "19229fe0bbd7daffba86b8c21517356b37ab6b83d3d337b4faac3e42a47eec51"
22
- }
23
- ],
24
- "hashType": "sha256"
25
- }
@@ -1,105 +0,0 @@
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
- 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-12T15:52:14+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-12T15:52:14+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-12T15:52:14+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-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
@@ -1,105 +0,0 @@
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