@duet3d/objectmodel 3.4.0-b2 → 3.4.0-b22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ModelCollection.d.ts +13 -1
- package/dist/ModelCollection.js +26 -1
- package/dist/ModelDictionary.d.ts +13 -0
- package/dist/ModelDictionary.js +24 -1
- package/dist/ModelObject.d.ts +13 -1
- package/dist/ModelObject.js +61 -1
- package/dist/ObjectModel.d.ts +48 -0
- package/dist/ObjectModel.js +55 -0
- package/dist/boards/index.d.ts +2 -1
- package/dist/boards/index.js +3 -2
- package/dist/directories/index.d.ts +2 -1
- package/dist/directories/index.js +2 -0
- package/dist/fans/index.d.ts +2 -1
- package/dist/fans/index.js +2 -1
- package/dist/heat/Heater.d.ts +2 -1
- package/dist/heat/Heater.js +2 -1
- package/dist/heat/HeaterModel.d.ts +2 -1
- package/dist/heat/HeaterModel.js +2 -1
- package/dist/heat/HeaterMonitor.d.ts +2 -1
- package/dist/heat/HeaterMonitor.js +2 -1
- package/dist/heat/index.d.ts +7 -3
- package/dist/heat/index.js +20 -1
- package/dist/httpEndpoints/index.d.ts +2 -1
- package/dist/httpEndpoints/index.js +2 -1
- package/dist/index.d.ts +25 -43
- package/dist/index.js +41 -47
- package/dist/inputs/CodeChannel.d.ts +1 -0
- package/dist/inputs/CodeChannel.js +1 -0
- package/dist/inputs/Compatibility.d.ts +1 -0
- package/dist/inputs/Compatibility.js +1 -0
- package/dist/inputs/InputChannel.d.ts +4 -3
- package/dist/inputs/InputChannel.js +5 -4
- package/dist/inputs/index.d.ts +3 -0
- package/dist/inputs/index.js +19 -0
- package/dist/job/Build.d.ts +3 -2
- package/dist/job/Build.js +3 -2
- package/dist/job/GCodeFileInfo.d.ts +3 -2
- package/dist/job/GCodeFileInfo.js +3 -1
- package/dist/job/ThumbnailInfo.d.ts +3 -2
- package/dist/job/ThumbnailInfo.js +3 -2
- package/dist/job/index.d.ts +6 -2
- package/dist/job/index.js +20 -2
- package/dist/limits/index.d.ts +2 -1
- package/dist/limits/index.js +2 -0
- package/dist/messages/index.d.ts +2 -1
- package/dist/messages/index.js +2 -1
- package/dist/move/Axis.d.ts +2 -1
- package/dist/move/Axis.js +2 -1
- package/dist/move/DriverId.d.ts +5 -2
- package/dist/move/DriverId.js +23 -3
- package/dist/move/Extruder.d.ts +2 -1
- package/dist/move/Extruder.js +2 -1
- package/dist/move/InputShaping.d.ts +2 -1
- package/dist/move/InputShaping.js +2 -1
- package/dist/move/Microstepping.d.ts +2 -1
- package/dist/move/Microstepping.js +2 -0
- package/dist/move/MoveCalibration.d.ts +2 -1
- package/dist/move/MoveCalibration.js +2 -1
- package/dist/move/MoveCompensation.d.ts +2 -1
- package/dist/move/MoveCompensation.js +2 -1
- package/dist/move/index.d.ts +10 -1
- package/dist/move/index.js +24 -1
- package/dist/move/kinematics/CoreKinematics.d.ts +2 -1
- package/dist/move/kinematics/CoreKinematics.js +2 -0
- package/dist/move/kinematics/DeltaKinematics.d.ts +2 -1
- package/dist/move/kinematics/DeltaKinematics.js +3 -2
- package/dist/move/kinematics/HangprinterKinematics.d.ts +2 -1
- package/dist/move/kinematics/HangprinterKinematics.js +3 -0
- package/dist/move/kinematics/KinematicsBase.d.ts +2 -1
- package/dist/move/kinematics/KinematicsBase.js +2 -1
- package/dist/move/kinematics/PolarKinematics.d.ts +2 -1
- package/dist/move/kinematics/PolarKinematics.js +2 -0
- package/dist/move/kinematics/ScaraKinematics.d.ts +2 -1
- package/dist/move/kinematics/ScaraKinematics.js +2 -0
- package/dist/move/kinematics/index.d.ts +9 -2
- package/dist/move/kinematics/index.js +26 -4
- package/dist/network/NetworkInterface.d.ts +14 -1
- package/dist/network/NetworkInterface.js +15 -1
- package/dist/network/index.d.ts +3 -1
- package/dist/network/index.js +17 -1
- package/dist/plugins/PluginManifest.d.ts +4 -2
- package/dist/plugins/PluginManifest.js +5 -3
- package/dist/plugins/index.d.ts +3 -1
- package/dist/plugins/index.js +17 -0
- package/dist/scanner/index.d.ts +2 -1
- package/dist/scanner/index.js +2 -1
- package/dist/sensors/AnalogSensor.d.ts +2 -1
- package/dist/sensors/AnalogSensor.js +2 -1
- package/dist/sensors/Endstop.d.ts +2 -1
- package/dist/sensors/Endstop.js +2 -1
- package/dist/sensors/FilamentMonitors/FilamentMonitorBase.d.ts +2 -1
- package/dist/sensors/FilamentMonitors/FilamentMonitorBase.js +2 -1
- package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.d.ts +2 -1
- package/dist/sensors/FilamentMonitors/LaserFilamentMonitor.js +2 -1
- package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.d.ts +2 -1
- package/dist/sensors/FilamentMonitors/PulsedFilamentMonitor.js +2 -1
- package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.d.ts +2 -1
- package/dist/sensors/FilamentMonitors/RotatingMagnetFilamentMonitor.js +2 -1
- package/dist/sensors/FilamentMonitors/index.d.ts +6 -1
- package/dist/sensors/FilamentMonitors/index.js +20 -1
- package/dist/sensors/Probe.d.ts +2 -1
- package/dist/sensors/Probe.js +2 -1
- package/dist/sensors/index.d.ts +11 -6
- package/dist/sensors/index.js +20 -1
- package/dist/spindles/index.d.ts +2 -1
- package/dist/spindles/index.js +2 -1
- package/dist/state/MachineStatus.d.ts +3 -2
- package/dist/state/MachineStatus.js +3 -2
- package/dist/state/MessageBox.d.ts +2 -1
- package/dist/state/MessageBox.js +2 -1
- package/dist/state/RestorePoint.d.ts +2 -1
- package/dist/state/RestorePoint.js +2 -0
- package/dist/state/index.d.ts +6 -2
- package/dist/state/index.js +19 -1
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.js +2 -1
- package/dist/userSessions/index.d.ts +2 -1
- package/dist/userSessions/index.js +2 -1
- package/dist/volumes/index.d.ts +2 -1
- package/dist/volumes/index.js +2 -0
- package/package.json +10 -8
|
@@ -2,7 +2,7 @@ import { IModelObject } from "./ModelObject";
|
|
|
2
2
|
/**
|
|
3
3
|
* Class for storing model object items in an array
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export declare class ModelCollection<T extends IModelObject | null> extends Array<T> implements IModelObject {
|
|
6
6
|
private readonly itemConstructor;
|
|
7
7
|
/**
|
|
8
8
|
* Constructor of this class
|
|
@@ -23,3 +23,15 @@ export default class ModelCollection<T extends IModelObject> extends Array<T> im
|
|
|
23
23
|
*/
|
|
24
24
|
update(jsonElement: any): IModelObject | null;
|
|
25
25
|
}
|
|
26
|
+
export default ModelCollection;
|
|
27
|
+
/**
|
|
28
|
+
* Initialize a model collection from the given data
|
|
29
|
+
* @param itemType Item type to create
|
|
30
|
+
* @param data Data to assign
|
|
31
|
+
* @returns Initialized model collection
|
|
32
|
+
*/
|
|
33
|
+
export declare function initCollection<T extends IModelObject>(itemType: {
|
|
34
|
+
new (): T;
|
|
35
|
+
}, data: Array<{
|
|
36
|
+
[Property in keyof T]?: T[Property];
|
|
37
|
+
}>): ModelCollection<T>;
|
package/dist/ModelCollection.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.initCollection = exports.ModelCollection = void 0;
|
|
3
4
|
const ModelObject_1 = require("./ModelObject");
|
|
4
5
|
const index_1 = require("./index");
|
|
5
6
|
/**
|
|
@@ -71,9 +72,33 @@ class ModelCollection extends Array {
|
|
|
71
72
|
}
|
|
72
73
|
// Add new items
|
|
73
74
|
for (let i = this.length; i < jsonElement.length; i++) {
|
|
74
|
-
|
|
75
|
+
const itemToAdd = jsonElement[i];
|
|
76
|
+
if (itemToAdd === null) {
|
|
77
|
+
super.push(itemToAdd);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
const newItem = new this.itemConstructor();
|
|
81
|
+
super.push(newItem.update(itemToAdd));
|
|
82
|
+
}
|
|
75
83
|
}
|
|
76
84
|
return this;
|
|
77
85
|
}
|
|
78
86
|
}
|
|
87
|
+
exports.ModelCollection = ModelCollection;
|
|
79
88
|
exports.default = ModelCollection;
|
|
89
|
+
/**
|
|
90
|
+
* Initialize a model collection from the given data
|
|
91
|
+
* @param itemType Item type to create
|
|
92
|
+
* @param data Data to assign
|
|
93
|
+
* @returns Initialized model collection
|
|
94
|
+
*/
|
|
95
|
+
function initCollection(itemType, data) {
|
|
96
|
+
const result = new ModelCollection(itemType);
|
|
97
|
+
for (let presetItem of data) {
|
|
98
|
+
const item = new itemType();
|
|
99
|
+
item.update(presetItem);
|
|
100
|
+
result.push(item);
|
|
101
|
+
}
|
|
102
|
+
return result;
|
|
103
|
+
}
|
|
104
|
+
exports.initCollection = initCollection;
|
|
@@ -26,3 +26,16 @@ export declare class ModelDictionary<T> extends Map<string, T | null> implements
|
|
|
26
26
|
*/
|
|
27
27
|
update(jsonElement: any): IModelObject | null;
|
|
28
28
|
}
|
|
29
|
+
export default ModelDictionary;
|
|
30
|
+
/**
|
|
31
|
+
* Initialize a model dictionary from the given data
|
|
32
|
+
* @param nullDeletesKeys Defines whether setting values to null deletes the corresponding key
|
|
33
|
+
* @param itemConstructor Item constructor
|
|
34
|
+
* @param data Data to assign
|
|
35
|
+
* @returns Initialized model dictionary
|
|
36
|
+
*/
|
|
37
|
+
export declare function initDictionary<T>(nullDeletesKeys: boolean, itemConstructor: {
|
|
38
|
+
new (): T;
|
|
39
|
+
}, data: Record<string, {
|
|
40
|
+
[Property in keyof T]?: T[Property];
|
|
41
|
+
}>): ModelDictionary<T>;
|
package/dist/ModelDictionary.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelDictionary = void 0;
|
|
3
|
+
exports.initDictionary = exports.ModelDictionary = void 0;
|
|
4
4
|
const ModelObject_1 = require("./ModelObject");
|
|
5
5
|
/**
|
|
6
6
|
* Dictionary class to map object model data
|
|
@@ -66,3 +66,26 @@ class ModelDictionary extends Map {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
exports.ModelDictionary = ModelDictionary;
|
|
69
|
+
exports.default = ModelDictionary;
|
|
70
|
+
/**
|
|
71
|
+
* Initialize a model dictionary from the given data
|
|
72
|
+
* @param nullDeletesKeys Defines whether setting values to null deletes the corresponding key
|
|
73
|
+
* @param itemConstructor Item constructor
|
|
74
|
+
* @param data Data to assign
|
|
75
|
+
* @returns Initialized model dictionary
|
|
76
|
+
*/
|
|
77
|
+
function initDictionary(nullDeletesKeys, itemConstructor, data) {
|
|
78
|
+
const result = new ModelDictionary(nullDeletesKeys, itemConstructor);
|
|
79
|
+
for (let key in data) {
|
|
80
|
+
const item = new itemConstructor();
|
|
81
|
+
if ((0, ModelObject_1.isModelObject)(item)) {
|
|
82
|
+
item.update(data[key]);
|
|
83
|
+
result.set(key, item);
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
result.set(key, data[key]);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return result;
|
|
90
|
+
}
|
|
91
|
+
exports.initDictionary = initDictionary;
|
package/dist/ModelObject.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export declare function isModelObject(value: any): value is IModelObject;
|
|
|
17
17
|
/**
|
|
18
18
|
* Base class for object model classes
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export declare abstract class ModelObject implements IModelObject {
|
|
21
21
|
/**
|
|
22
22
|
* Update this instance from the given data
|
|
23
23
|
* @param jsonElement JSON data to upgrade this instance from
|
|
@@ -33,3 +33,15 @@ export default abstract class ModelObject implements IModelObject {
|
|
|
33
33
|
new (): T;
|
|
34
34
|
}): void;
|
|
35
35
|
}
|
|
36
|
+
export default ModelObject;
|
|
37
|
+
/**
|
|
38
|
+
* Initialize a model object from the given data
|
|
39
|
+
* @param itemType Model type to create
|
|
40
|
+
* @param data Data to assign
|
|
41
|
+
* @returns Initialized model instance
|
|
42
|
+
*/
|
|
43
|
+
export declare function initObject<T>(itemType: {
|
|
44
|
+
new (): T;
|
|
45
|
+
}, data: {
|
|
46
|
+
[Property in keyof T]?: T[Property];
|
|
47
|
+
}): T;
|
package/dist/ModelObject.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isModelObject = void 0;
|
|
3
|
+
exports.initObject = exports.ModelObject = exports.isModelObject = void 0;
|
|
4
4
|
const index_1 = require("./index");
|
|
5
5
|
/**
|
|
6
6
|
* Check whether a given value provides model update functionality
|
|
@@ -43,6 +43,9 @@ class ModelObject {
|
|
|
43
43
|
console.warn(`Model object ${key} changed but it could not be set due to missing setter`);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
47
|
+
console.warn(`Model object ${key} changed but it lacks the property descriptor`);
|
|
48
|
+
}
|
|
46
49
|
}
|
|
47
50
|
}
|
|
48
51
|
else if (prop instanceof Array) {
|
|
@@ -71,6 +74,25 @@ class ModelObject {
|
|
|
71
74
|
console.warn(`Model array ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
72
75
|
}
|
|
73
76
|
}
|
|
77
|
+
else if (prop instanceof Set) {
|
|
78
|
+
if (value instanceof Array || value instanceof Set) {
|
|
79
|
+
// Remove deleted items
|
|
80
|
+
for (let item of new Set(prop)) {
|
|
81
|
+
if (!prop.has(item)) {
|
|
82
|
+
prop.delete(item);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Add new items
|
|
86
|
+
for (let item of value) {
|
|
87
|
+
if (!prop.has(item)) {
|
|
88
|
+
prop.add(item);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
93
|
+
console.warn(`Model set ${key} could not be changed because the target type ${typeof value} is invalid`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
74
96
|
else if (prop === null || value === null) {
|
|
75
97
|
// Unfortunately we cannot do type checks during runtime without excessive extra work and possibly
|
|
76
98
|
// third-party libraries, so skip them for null values until there is a better solution.
|
|
@@ -152,4 +174,42 @@ class ModelObject {
|
|
|
152
174
|
});
|
|
153
175
|
}
|
|
154
176
|
}
|
|
177
|
+
exports.ModelObject = ModelObject;
|
|
155
178
|
exports.default = ModelObject;
|
|
179
|
+
/**
|
|
180
|
+
* Initialize a model object from the given data
|
|
181
|
+
* @param itemType Model type to create
|
|
182
|
+
* @param data Data to assign
|
|
183
|
+
* @returns Initialized model instance
|
|
184
|
+
*/
|
|
185
|
+
function initObject(itemType, data) {
|
|
186
|
+
const result = new itemType();
|
|
187
|
+
for (let key in data) {
|
|
188
|
+
const resultKey = result[key];
|
|
189
|
+
if (isModelObject(resultKey)) {
|
|
190
|
+
const updatedObject = resultKey.update(data[key]);
|
|
191
|
+
if (resultKey !== updatedObject) {
|
|
192
|
+
const propDescriptor = Object.getOwnPropertyDescriptor(result, key);
|
|
193
|
+
if (propDescriptor !== undefined) {
|
|
194
|
+
if (propDescriptor.writable) {
|
|
195
|
+
result[key] = updatedObject;
|
|
196
|
+
}
|
|
197
|
+
else if (propDescriptor.set !== undefined) {
|
|
198
|
+
propDescriptor.set(updatedObject);
|
|
199
|
+
}
|
|
200
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
201
|
+
console.warn(`Model object ${key} changed but it could not be set due to missing setter`);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
205
|
+
console.warn(`Model object ${key} changed but it lacks the property descriptor`);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
result[key] = data[key];
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return result;
|
|
214
|
+
}
|
|
215
|
+
exports.initObject = initObject;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import ModelCollection from "./ModelCollection";
|
|
2
|
+
import ModelDictionary from "./ModelDictionary";
|
|
3
|
+
import ModelObject from "./ModelObject";
|
|
4
|
+
import Board from "./boards";
|
|
5
|
+
import Directories from "./directories";
|
|
6
|
+
import Fan from "./fans";
|
|
7
|
+
import Heat from "./heat";
|
|
8
|
+
import HttpEndpoint from "./httpEndpoints";
|
|
9
|
+
import InputChannel from "./inputs/InputChannel";
|
|
10
|
+
import Job from "./job";
|
|
11
|
+
import Limits from "./limits";
|
|
12
|
+
import Message from "./messages";
|
|
13
|
+
import Move from "./move";
|
|
14
|
+
import Network from "./network";
|
|
15
|
+
import Plugin from "./plugins";
|
|
16
|
+
import Scanner from "./scanner";
|
|
17
|
+
import Sensors from "./sensors";
|
|
18
|
+
import Spindle from "./spindles";
|
|
19
|
+
import State from "./state";
|
|
20
|
+
import Tool from "./tools";
|
|
21
|
+
import UserSession from "./userSessions";
|
|
22
|
+
import Volume from "./volumes";
|
|
23
|
+
/**
|
|
24
|
+
* Refer to the DSF/RRF documentation for descriptions of the object model fields
|
|
25
|
+
*/
|
|
26
|
+
export declare class ObjectModel extends ModelObject {
|
|
27
|
+
readonly boards: ModelCollection<Board>;
|
|
28
|
+
readonly directories: Directories;
|
|
29
|
+
readonly fans: ModelCollection<Fan | null>;
|
|
30
|
+
readonly global: ModelDictionary<any>;
|
|
31
|
+
readonly heat: Heat;
|
|
32
|
+
readonly httpEndpoints: ModelCollection<HttpEndpoint>;
|
|
33
|
+
readonly inputs: ModelCollection<InputChannel | null>;
|
|
34
|
+
readonly job: Job;
|
|
35
|
+
readonly limits: Limits;
|
|
36
|
+
readonly messages: ModelCollection<Message>;
|
|
37
|
+
readonly move: Move;
|
|
38
|
+
readonly network: Network;
|
|
39
|
+
readonly plugins: ModelDictionary<Plugin>;
|
|
40
|
+
readonly scanner: Scanner;
|
|
41
|
+
readonly sensors: Sensors;
|
|
42
|
+
readonly spindles: ModelCollection<Spindle | null>;
|
|
43
|
+
readonly state: State;
|
|
44
|
+
readonly tools: ModelCollection<Tool | null>;
|
|
45
|
+
readonly userSessions: ModelCollection<UserSession>;
|
|
46
|
+
readonly volumes: ModelCollection<Volume>;
|
|
47
|
+
}
|
|
48
|
+
export default ObjectModel;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ObjectModel = void 0;
|
|
4
|
+
const ModelCollection_1 = require("./ModelCollection");
|
|
5
|
+
const ModelDictionary_1 = require("./ModelDictionary");
|
|
6
|
+
const ModelObject_1 = require("./ModelObject");
|
|
7
|
+
const boards_1 = require("./boards");
|
|
8
|
+
const directories_1 = require("./directories");
|
|
9
|
+
const fans_1 = require("./fans");
|
|
10
|
+
const heat_1 = require("./heat");
|
|
11
|
+
const httpEndpoints_1 = require("./httpEndpoints");
|
|
12
|
+
const InputChannel_1 = require("./inputs/InputChannel");
|
|
13
|
+
const job_1 = require("./job");
|
|
14
|
+
const limits_1 = require("./limits");
|
|
15
|
+
const messages_1 = require("./messages");
|
|
16
|
+
const move_1 = require("./move");
|
|
17
|
+
const network_1 = require("./network");
|
|
18
|
+
const plugins_1 = require("./plugins");
|
|
19
|
+
const scanner_1 = require("./scanner");
|
|
20
|
+
const sensors_1 = require("./sensors");
|
|
21
|
+
const spindles_1 = require("./spindles");
|
|
22
|
+
const state_1 = require("./state");
|
|
23
|
+
const tools_1 = require("./tools");
|
|
24
|
+
const userSessions_1 = require("./userSessions");
|
|
25
|
+
const volumes_1 = require("./volumes");
|
|
26
|
+
/**
|
|
27
|
+
* Refer to the DSF/RRF documentation for descriptions of the object model fields
|
|
28
|
+
*/
|
|
29
|
+
class ObjectModel extends ModelObject_1.default {
|
|
30
|
+
constructor() {
|
|
31
|
+
super(...arguments);
|
|
32
|
+
this.boards = new ModelCollection_1.default(boards_1.default);
|
|
33
|
+
this.directories = new directories_1.default();
|
|
34
|
+
this.fans = new ModelCollection_1.default(fans_1.default);
|
|
35
|
+
this.global = new ModelDictionary_1.default(false);
|
|
36
|
+
this.heat = new heat_1.default();
|
|
37
|
+
this.httpEndpoints = new ModelCollection_1.default(httpEndpoints_1.default);
|
|
38
|
+
this.inputs = new ModelCollection_1.default(InputChannel_1.default);
|
|
39
|
+
this.job = new job_1.default();
|
|
40
|
+
this.limits = new limits_1.default();
|
|
41
|
+
this.messages = new ModelCollection_1.default(messages_1.default); // must be manually cleared after updates
|
|
42
|
+
this.move = new move_1.default();
|
|
43
|
+
this.network = new network_1.default();
|
|
44
|
+
this.plugins = new ModelDictionary_1.default(true, plugins_1.default);
|
|
45
|
+
this.scanner = new scanner_1.default();
|
|
46
|
+
this.sensors = new sensors_1.default();
|
|
47
|
+
this.spindles = new ModelCollection_1.default(spindles_1.default);
|
|
48
|
+
this.state = new state_1.default();
|
|
49
|
+
this.tools = new ModelCollection_1.default(tools_1.default);
|
|
50
|
+
this.userSessions = new ModelCollection_1.default(userSessions_1.default);
|
|
51
|
+
this.volumes = new ModelCollection_1.default(volumes_1.default);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.ObjectModel = ObjectModel;
|
|
55
|
+
exports.default = ObjectModel;
|
package/dist/boards/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare class DirectDisplay extends ModelObject {
|
|
|
24
24
|
spiFreq: number;
|
|
25
25
|
typeName: string;
|
|
26
26
|
}
|
|
27
|
-
export
|
|
27
|
+
export declare class Board extends ModelObject {
|
|
28
28
|
constructor();
|
|
29
29
|
accelerometer: Accelerometer | null;
|
|
30
30
|
bootloaderFileName: string | null;
|
|
@@ -47,3 +47,4 @@ export default class Board extends ModelObject {
|
|
|
47
47
|
v12: MinMaxCurrent | null;
|
|
48
48
|
vIn: MinMaxCurrent | null;
|
|
49
49
|
}
|
|
50
|
+
export default Board;
|
package/dist/boards/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DirectDisplay = exports.MinMaxCurrent = exports.ClosedLoop = exports.BoardState = exports.Accelerometer = void 0;
|
|
3
|
+
exports.Board = exports.DirectDisplay = exports.MinMaxCurrent = exports.ClosedLoop = exports.BoardState = exports.Accelerometer = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
class Accelerometer extends ModelObject_1.default {
|
|
6
6
|
constructor() {
|
|
@@ -49,7 +49,7 @@ class Board extends ModelObject_1.default {
|
|
|
49
49
|
super();
|
|
50
50
|
this.accelerometer = null;
|
|
51
51
|
this.bootloaderFileName = null;
|
|
52
|
-
this.canAddress =
|
|
52
|
+
this.canAddress = null;
|
|
53
53
|
this.closedLoop = null;
|
|
54
54
|
this.directDisplay = null;
|
|
55
55
|
this.firmwareDate = "";
|
|
@@ -75,4 +75,5 @@ class Board extends ModelObject_1.default {
|
|
|
75
75
|
this.wrapModelProperty("vIn", MinMaxCurrent);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
+
exports.Board = Board;
|
|
78
79
|
exports.default = Board;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import ModelObject from "../ModelObject";
|
|
2
|
-
export
|
|
2
|
+
export declare class Directories extends ModelObject {
|
|
3
3
|
filaments: string;
|
|
4
4
|
firmware: string;
|
|
5
5
|
gCodes: string;
|
|
@@ -9,3 +9,4 @@ export default class Directories extends ModelObject {
|
|
|
9
9
|
system: string;
|
|
10
10
|
web: string;
|
|
11
11
|
}
|
|
12
|
+
export default Directories;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Directories = void 0;
|
|
3
4
|
const ModelObject_1 = require("../ModelObject");
|
|
4
5
|
class Directories extends ModelObject_1.default {
|
|
5
6
|
constructor() {
|
|
@@ -14,4 +15,5 @@ class Directories extends ModelObject_1.default {
|
|
|
14
15
|
this.web = "0:/www";
|
|
15
16
|
}
|
|
16
17
|
}
|
|
18
|
+
exports.Directories = Directories;
|
|
17
19
|
exports.default = Directories;
|
package/dist/fans/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class FanThermostaticControl extends ModelObject {
|
|
|
4
4
|
highTemperature: number | null;
|
|
5
5
|
lowTemperature: number | null;
|
|
6
6
|
}
|
|
7
|
-
export
|
|
7
|
+
export declare class Fan extends ModelObject {
|
|
8
8
|
actualValue: number;
|
|
9
9
|
blip: number;
|
|
10
10
|
frequency: number;
|
|
@@ -15,3 +15,4 @@ export default class Fan extends ModelObject {
|
|
|
15
15
|
rpm: number;
|
|
16
16
|
readonly thermostatic: FanThermostaticControl;
|
|
17
17
|
}
|
|
18
|
+
export default Fan;
|
package/dist/fans/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FanThermostaticControl = void 0;
|
|
3
|
+
exports.Fan = exports.FanThermostaticControl = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
class FanThermostaticControl extends ModelObject_1.default {
|
|
6
6
|
constructor() {
|
|
@@ -25,4 +25,5 @@ class Fan extends ModelObject_1.default {
|
|
|
25
25
|
this.thermostatic = new FanThermostaticControl();
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
exports.Fan = Fan;
|
|
28
29
|
exports.default = Fan;
|
package/dist/heat/Heater.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare enum HeaterState {
|
|
|
10
10
|
tuning = "tuning",
|
|
11
11
|
offline = "offline"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export declare class Heater extends ModelObject {
|
|
14
14
|
active: number;
|
|
15
15
|
avgPwm: number;
|
|
16
16
|
current: number;
|
|
@@ -22,3 +22,4 @@ export default class Heater extends ModelObject {
|
|
|
22
22
|
standby: number;
|
|
23
23
|
state: HeaterState;
|
|
24
24
|
}
|
|
25
|
+
export default Heater;
|
package/dist/heat/Heater.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HeaterState = void 0;
|
|
3
|
+
exports.Heater = exports.HeaterState = void 0;
|
|
4
4
|
const ModelCollection_1 = require("../ModelCollection");
|
|
5
5
|
const HeaterModel_1 = require("./HeaterModel");
|
|
6
6
|
const ModelObject_1 = require("../ModelObject");
|
|
@@ -29,4 +29,5 @@ class Heater extends ModelObject_1.default {
|
|
|
29
29
|
this.state = HeaterState.off;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
+
exports.Heater = Heater;
|
|
32
33
|
exports.default = Heater;
|
|
@@ -6,7 +6,7 @@ export declare class HeaterModelPID extends ModelObject {
|
|
|
6
6
|
p: number;
|
|
7
7
|
used: boolean;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export declare class HeaterModel extends ModelObject {
|
|
10
10
|
coolingExp: number;
|
|
11
11
|
coolingRate: number;
|
|
12
12
|
deadTime: number;
|
|
@@ -18,3 +18,4 @@ export default class HeaterModel extends ModelObject {
|
|
|
18
18
|
readonly pid: HeaterModelPID;
|
|
19
19
|
standardVoltage: number | null;
|
|
20
20
|
}
|
|
21
|
+
export default HeaterModel;
|
package/dist/heat/HeaterModel.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HeaterModelPID = void 0;
|
|
3
|
+
exports.HeaterModel = exports.HeaterModelPID = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
class HeaterModelPID extends ModelObject_1.default {
|
|
6
6
|
constructor() {
|
|
@@ -28,4 +28,5 @@ class HeaterModel extends ModelObject_1.default {
|
|
|
28
28
|
this.standardVoltage = null;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
+
exports.HeaterModel = HeaterModel;
|
|
31
32
|
exports.default = HeaterModel;
|
|
@@ -10,8 +10,9 @@ export declare enum HeaterMonitorCondition {
|
|
|
10
10
|
tooHigh = "tooHigh",
|
|
11
11
|
tooLow = "tooLow"
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export declare class HeaterMonitor extends ModelObject {
|
|
14
14
|
action: HeaterMonitorAction;
|
|
15
15
|
condition: HeaterMonitorCondition;
|
|
16
16
|
limit: number;
|
|
17
17
|
}
|
|
18
|
+
export default HeaterMonitor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HeaterMonitorCondition = exports.HeaterMonitorAction = void 0;
|
|
3
|
+
exports.HeaterMonitor = exports.HeaterMonitorCondition = exports.HeaterMonitorAction = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
var HeaterMonitorAction;
|
|
6
6
|
(function (HeaterMonitorAction) {
|
|
@@ -23,4 +23,5 @@ class HeaterMonitor extends ModelObject_1.default {
|
|
|
23
23
|
this.limit = 2000;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
exports.HeaterMonitor = HeaterMonitor;
|
|
26
27
|
exports.default = HeaterMonitor;
|
package/dist/heat/index.d.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import ModelCollection from "../ModelCollection";
|
|
2
|
-
import Heater from "./Heater";
|
|
3
2
|
import ModelObject from "../ModelObject";
|
|
4
|
-
|
|
3
|
+
import Heater from "./Heater";
|
|
4
|
+
export declare class Heat extends ModelObject {
|
|
5
5
|
bedHeaters: Array<number>;
|
|
6
6
|
chamberHeaters: Array<number>;
|
|
7
7
|
coldExtrudeTemperature: number;
|
|
8
8
|
coldRetractTemperature: number;
|
|
9
|
-
readonly heaters: ModelCollection<Heater>;
|
|
9
|
+
readonly heaters: ModelCollection<Heater | null>;
|
|
10
10
|
}
|
|
11
|
+
export default Heat;
|
|
12
|
+
export * from "./Heater";
|
|
13
|
+
export * from "./HeaterModel";
|
|
14
|
+
export * from "./HeaterMonitor";
|
package/dist/heat/index.js
CHANGED
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.Heat = void 0;
|
|
3
18
|
const ModelCollection_1 = require("../ModelCollection");
|
|
4
|
-
const Heater_1 = require("./Heater");
|
|
5
19
|
const ModelObject_1 = require("../ModelObject");
|
|
20
|
+
const Heater_1 = require("./Heater");
|
|
6
21
|
class Heat extends ModelObject_1.default {
|
|
7
22
|
constructor() {
|
|
8
23
|
super(...arguments);
|
|
@@ -13,4 +28,8 @@ class Heat extends ModelObject_1.default {
|
|
|
13
28
|
this.heaters = new ModelCollection_1.default(Heater_1.default);
|
|
14
29
|
}
|
|
15
30
|
}
|
|
31
|
+
exports.Heat = Heat;
|
|
16
32
|
exports.default = Heat;
|
|
33
|
+
__exportStar(require("./Heater"), exports);
|
|
34
|
+
__exportStar(require("./HeaterModel"), exports);
|
|
35
|
+
__exportStar(require("./HeaterMonitor"), exports);
|
|
@@ -9,10 +9,11 @@ export declare enum HttpEndpointType {
|
|
|
9
9
|
OPTIONS = "OPTIONS",
|
|
10
10
|
WebSocket = "WebSocket"
|
|
11
11
|
}
|
|
12
|
-
export
|
|
12
|
+
export declare class HttpEndpoint extends ModelObject {
|
|
13
13
|
endpointType: HttpEndpointType;
|
|
14
14
|
namespace: string;
|
|
15
15
|
path: string;
|
|
16
16
|
isUploadRequest: boolean;
|
|
17
17
|
unixSocket: string;
|
|
18
18
|
}
|
|
19
|
+
export default HttpEndpoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpEndpointType = void 0;
|
|
3
|
+
exports.HttpEndpoint = exports.HttpEndpointType = void 0;
|
|
4
4
|
const ModelObject_1 = require("../ModelObject");
|
|
5
5
|
var HttpEndpointType;
|
|
6
6
|
(function (HttpEndpointType) {
|
|
@@ -23,4 +23,5 @@ class HttpEndpoint extends ModelObject_1.default {
|
|
|
23
23
|
this.unixSocket = "";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
exports.HttpEndpoint = HttpEndpoint;
|
|
26
27
|
exports.default = HttpEndpoint;
|