@operato/scene-manufacturing 8.0.0-alpha.0 → 8.0.0-alpha.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
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
+ ## [8.0.0-alpha.8](https://github.com/things-scene/operato-scene/compare/v8.0.0-alpha.7...v8.0.0-alpha.8) (2024-10-12)
7
+
8
+
9
+ ### :bug: Bug Fix
10
+
11
+ * support started property for tact-timer ([c77bade](https://github.com/things-scene/operato-scene/commit/c77bade352a526405163e5fce331a021f8a9a4c4))
12
+
13
+
14
+
15
+ ## [8.0.0-alpha.1](https://github.com/things-scene/operato-scene/compare/v8.0.0-alpha.0...v8.0.0-alpha.1) (2024-09-09)
16
+
17
+
18
+ ### :bug: Bug Fix
19
+
20
+ * @hatiolab/things-scene dependency version ([01458eb](https://github.com/things-scene/operato-scene/commit/01458ebe9110906729fc9f8440ce1e5afe3e17bd))
21
+ * update [@things-factory](https://github.com/things-factory)@^8.0.0-alpha ([1dc3163](https://github.com/things-scene/operato-scene/commit/1dc31638ed9d3fd0ecb2ac55be0ce541e5599ab8))
22
+
23
+
24
+
6
25
  ## [8.0.0-alpha.0](https://github.com/things-scene/operato-scene/compare/v7.3.7...v8.0.0-alpha.0) (2024-09-01)
7
26
 
8
27
  **Note:** Version bump only for package @operato/scene-manufacturing
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,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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,C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ACN,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"]}
@@ -6,29 +6,14 @@
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"
17
- },
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"
14
+ "date": 1728718043975,
15
+ "name": "logs/application-2024-10-12-16.log",
16
+ "hash": "d1d6c8f0d82c2cbff8ea0c8599d8a4a1343574385480fbdcc49539d10f02d125"
32
17
  }
33
18
  ],
34
19
  "hashType": "sha256"
@@ -6,59 +6,14 @@
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"
17
- },
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"
14
+ "date": 1728718045743,
15
+ "name": "logs/connections-2024-10-12-16.log",
16
+ "hash": "e6e10c0f311ee6f39c3b68f2157928aaa91be5cd6460ac602df43dfdab574184"
62
17
  }
63
18
  ],
64
19
  "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
@@ -0,0 +1,50 @@
1
+ 2024-10-12T15:52:16+09:00 info: Initializing ConnectionManager...
2
+ 2024-10-12T15:52:16+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-10-12T15:52:16+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-10-12T15:52:16+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-10-12T15:52:16+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-10-12T15:52:16+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-10-12T15:52:16+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-10-12T15:52:16+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-10-12T15:52:16+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-10-12T15:52:16+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-10-12T15:52:16+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-10-12T15:52:16+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-10-12T15:52:16+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-10-12T15:52:16+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-10-12T15:52:16+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-10-12T15:52:16+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-10-12T15:52:16+09:00 info: Connector 'proxy-connector' started to ready
18
+ 2024-10-12T15:52:16+09:00 info: echo-back-servers are ready
19
+ 2024-10-12T15:52:16+09:00 info: echo-back connections are ready
20
+ 2024-10-12T15:52:16+09:00 info: http-connector connections are ready
21
+ 2024-10-12T15:52:16+09:00 info: graphql-connector connections are ready
22
+ 2024-10-12T15:52:16+09:00 info: sqlite-connector connections are ready
23
+ 2024-10-12T15:52:16+09:00 info: postgresql-connector connections are ready
24
+ 2024-10-12T15:52:16+09:00 info: mqtt-connector connections are ready
25
+ 2024-10-12T15:52:16+09:00 info: mssql-connector connections are ready
26
+ 2024-10-12T15:52:16+09:00 info: oracle-connector connections are ready
27
+ 2024-10-12T15:52:16+09:00 info: mysql-connector connections are ready
28
+ 2024-10-12T15:52:16+09:00 info: socket servers are ready
29
+ 2024-10-12T15:52:16+09:00 info: operato-connector connections are ready
30
+ 2024-10-12T15:52:16+09:00 info: email connections are ready
31
+ 2024-10-12T15:52:16+09:00 info: influxdb connections are ready
32
+ 2024-10-12T15:52:16+09:00 info: msgraph-connector connections are ready
33
+ 2024-10-12T15:52:16+09:00 info: proxy-connector connections are ready
34
+ 2024-10-12T15:52:16+09:00 info: All connector for 'echo-back-server' ready
35
+ 2024-10-12T15:52:16+09:00 info: All connector for 'echo-back' ready
36
+ 2024-10-12T15:52:16+09:00 info: All connector for 'http-connector' ready
37
+ 2024-10-12T15:52:16+09:00 info: All connector for 'graphql-connector' ready
38
+ 2024-10-12T15:52:16+09:00 info: All connector for 'sqlite-connector' ready
39
+ 2024-10-12T15:52:16+09:00 info: All connector for 'postgresql-connector' ready
40
+ 2024-10-12T15:52:16+09:00 info: All connector for 'mqtt-connector' ready
41
+ 2024-10-12T15:52:16+09:00 info: All connector for 'mssql-connector' ready
42
+ 2024-10-12T15:52:16+09:00 info: All connector for 'oracle-connector' ready
43
+ 2024-10-12T15:52:16+09:00 info: All connector for 'mysql-connector' ready
44
+ 2024-10-12T15:52:16+09:00 info: All connector for 'socket-server' ready
45
+ 2024-10-12T15:52:16+09:00 info: All connector for 'operato-connector' ready
46
+ 2024-10-12T15:52:16+09:00 info: All connector for 'email-connector' ready
47
+ 2024-10-12T15:52:16+09:00 info: All connector for 'influxdb-connector' ready
48
+ 2024-10-12T15:52:16+09:00 info: All connector for 'msgraph-connector' ready
49
+ 2024-10-12T15:52:16+09:00 info: All connector for 'proxy-connector' ready
50
+ 2024-10-12T15:52:16+09:00 info: ConnectionManager initialization done:
@@ -0,0 +1,50 @@
1
+ 2024-10-12T16:27:28+09:00 info: Initializing ConnectionManager...
2
+ 2024-10-12T16:27:28+09:00 info: Connector 'echo-back-server' started to ready
3
+ 2024-10-12T16:27:28+09:00 info: Connector 'echo-back' started to ready
4
+ 2024-10-12T16:27:28+09:00 info: Connector 'http-connector' started to ready
5
+ 2024-10-12T16:27:28+09:00 info: Connector 'graphql-connector' started to ready
6
+ 2024-10-12T16:27:28+09:00 info: Connector 'sqlite-connector' started to ready
7
+ 2024-10-12T16:27:28+09:00 info: Connector 'postgresql-connector' started to ready
8
+ 2024-10-12T16:27:28+09:00 info: Connector 'mqtt-connector' started to ready
9
+ 2024-10-12T16:27:28+09:00 info: Connector 'mssql-connector' started to ready
10
+ 2024-10-12T16:27:28+09:00 info: Connector 'oracle-connector' started to ready
11
+ 2024-10-12T16:27:28+09:00 info: Connector 'mysql-connector' started to ready
12
+ 2024-10-12T16:27:28+09:00 info: Connector 'socket-server' started to ready
13
+ 2024-10-12T16:27:28+09:00 info: Connector 'operato-connector' started to ready
14
+ 2024-10-12T16:27:28+09:00 info: Connector 'email-connector' started to ready
15
+ 2024-10-12T16:27:28+09:00 info: Connector 'influxdb-connector' started to ready
16
+ 2024-10-12T16:27:28+09:00 info: Connector 'msgraph-connector' started to ready
17
+ 2024-10-12T16:27:28+09:00 info: Connector 'proxy-connector' started to ready
18
+ 2024-10-12T16:27:28+09:00 info: echo-back-servers are ready
19
+ 2024-10-12T16:27:28+09:00 info: echo-back connections are ready
20
+ 2024-10-12T16:27:28+09:00 info: http-connector connections are ready
21
+ 2024-10-12T16:27:28+09:00 info: graphql-connector connections are ready
22
+ 2024-10-12T16:27:28+09:00 info: sqlite-connector connections are ready
23
+ 2024-10-12T16:27:28+09:00 info: postgresql-connector connections are ready
24
+ 2024-10-12T16:27:28+09:00 info: mqtt-connector connections are ready
25
+ 2024-10-12T16:27:28+09:00 info: mssql-connector connections are ready
26
+ 2024-10-12T16:27:28+09:00 info: oracle-connector connections are ready
27
+ 2024-10-12T16:27:28+09:00 info: mysql-connector connections are ready
28
+ 2024-10-12T16:27:28+09:00 info: socket servers are ready
29
+ 2024-10-12T16:27:28+09:00 info: operato-connector connections are ready
30
+ 2024-10-12T16:27:28+09:00 info: email connections are ready
31
+ 2024-10-12T16:27:28+09:00 info: influxdb connections are ready
32
+ 2024-10-12T16:27:28+09:00 info: msgraph-connector connections are ready
33
+ 2024-10-12T16:27:28+09:00 info: proxy-connector connections are ready
34
+ 2024-10-12T16:27:28+09:00 info: All connector for 'echo-back-server' ready
35
+ 2024-10-12T16:27:28+09:00 info: All connector for 'echo-back' ready
36
+ 2024-10-12T16:27:28+09:00 info: All connector for 'http-connector' ready
37
+ 2024-10-12T16:27:28+09:00 info: All connector for 'graphql-connector' ready
38
+ 2024-10-12T16:27:28+09:00 info: All connector for 'sqlite-connector' ready
39
+ 2024-10-12T16:27:28+09:00 info: All connector for 'postgresql-connector' ready
40
+ 2024-10-12T16:27:28+09:00 info: All connector for 'mqtt-connector' ready
41
+ 2024-10-12T16:27:28+09:00 info: All connector for 'mssql-connector' ready
42
+ 2024-10-12T16:27:28+09:00 info: All connector for 'oracle-connector' ready
43
+ 2024-10-12T16:27:28+09:00 info: All connector for 'mysql-connector' ready
44
+ 2024-10-12T16:27:28+09:00 info: All connector for 'socket-server' ready
45
+ 2024-10-12T16:27:28+09:00 info: All connector for 'operato-connector' ready
46
+ 2024-10-12T16:27:28+09:00 info: All connector for 'email-connector' ready
47
+ 2024-10-12T16:27:28+09:00 info: All connector for 'influxdb-connector' ready
48
+ 2024-10-12T16:27:28+09:00 info: All connector for 'msgraph-connector' ready
49
+ 2024-10-12T16:27:28+09:00 info: All connector for 'proxy-connector' ready
50
+ 2024-10-12T16:27:28+09:00 info: ConnectionManager initialization done:
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": "8.0.0-alpha.0",
4
+ "version": "8.0.0-alpha.8",
5
5
  "license": "MIT",
6
6
  "things-scene": true,
7
7
  "author": "heartyoh",
@@ -27,12 +27,12 @@
27
27
  "migration": "things-factory-migration"
28
28
  },
29
29
  "dependencies": {
30
- "@hatiolab/things-scene": "^3.0.19"
30
+ "@hatiolab/things-scene": "^8.0.0-alpha"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@hatiolab/prettier-config": "^1.0.0",
34
- "@things-factory/builder": "^7.0.0",
35
- "@things-factory/operato-board": "^7.0.0",
34
+ "@things-factory/builder": "^8.0.0-alpha",
35
+ "@things-factory/operato-board": "^8.0.0-alpha",
36
36
  "@typescript-eslint/eslint-plugin": "^4.33.0",
37
37
  "@typescript-eslint/parser": "^4.33.0",
38
38
  "@web/dev-server": "^0.1.28",
@@ -57,5 +57,5 @@
57
57
  "prettier --write"
58
58
  ]
59
59
  },
60
- "gitHead": "bcfeeca92c274cb1fb20be92e1ca57bae46fd1b6"
60
+ "gitHead": "4cfc72ee61a91cc2a9e247bd64101b2d8e6cfcdd"
61
61
  }