@duet3d/objectmodel 3.6.0-alpha.1 → 3.6.0-alpha.2
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.js +2 -2
- package/dist/ModelDictionary.js +2 -2
- package/dist/ModelObject.js +3 -3
- package/dist/boards/directDisplay/index.js +2 -2
- package/dist/index.js +2 -1
- package/dist/job/GCodeFileInfo.d.ts +2 -0
- package/dist/job/GCodeFileInfo.js +2 -0
- package/dist/move/DriverId.js +2 -2
- package/dist/move/kinematics/index.js +2 -2
- package/dist/sensors/FilamentMonitors/index.js +2 -2
- package/package.json +1 -1
- package/dist/httpEndpoints/index.d.ts +0 -19
- package/dist/httpEndpoints/index.js +0 -27
- package/dist/userSessions/index.d.ts +0 -18
- package/dist/userSessions/index.js +0 -27
package/dist/ModelCollection.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelCollection = void 0;
|
|
4
|
-
exports.initCollection = initCollection;
|
|
3
|
+
exports.initCollection = exports.ModelCollection = void 0;
|
|
5
4
|
const ModelObject_1 = require("./ModelObject");
|
|
6
5
|
const index_1 = require("./index");
|
|
7
6
|
/**
|
|
@@ -104,3 +103,4 @@ function initCollection(itemType, data) {
|
|
|
104
103
|
}
|
|
105
104
|
return result;
|
|
106
105
|
}
|
|
106
|
+
exports.initCollection = initCollection;
|
package/dist/ModelDictionary.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelDictionary = void 0;
|
|
4
|
-
exports.initDictionary = initDictionary;
|
|
3
|
+
exports.initDictionary = exports.ModelDictionary = void 0;
|
|
5
4
|
const ModelObject_1 = require("./ModelObject");
|
|
6
5
|
/**
|
|
7
6
|
* Dictionary class to map object model data
|
|
@@ -106,3 +105,4 @@ function initDictionary(nullDeletesKeys, itemConstructor, data) {
|
|
|
106
105
|
}
|
|
107
106
|
return result;
|
|
108
107
|
}
|
|
108
|
+
exports.initDictionary = initDictionary;
|
package/dist/ModelObject.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ModelObject = void 0;
|
|
4
|
-
exports.isModelObject = isModelObject;
|
|
5
|
-
exports.initObject = initObject;
|
|
3
|
+
exports.initObject = exports.ModelObject = exports.isModelObject = void 0;
|
|
6
4
|
const index_1 = require("./index");
|
|
7
5
|
/**
|
|
8
6
|
* Check whether a given value provides model update functionality
|
|
@@ -11,6 +9,7 @@ const index_1 = require("./index");
|
|
|
11
9
|
function isModelObject(value) {
|
|
12
10
|
return (value instanceof Object) && value.update !== undefined;
|
|
13
11
|
}
|
|
12
|
+
exports.isModelObject = isModelObject;
|
|
14
13
|
/**
|
|
15
14
|
* Base class for object model classes
|
|
16
15
|
*/
|
|
@@ -238,3 +237,4 @@ exports.default = ModelObject;
|
|
|
238
237
|
function initObject(itemType, data) {
|
|
239
238
|
return new itemType().update(data);
|
|
240
239
|
}
|
|
240
|
+
exports.initObject = initObject;
|
|
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.DirectDisplay = exports.DirectDisplayEncoder = exports.DirectDisplayController = void 0;
|
|
18
|
-
exports.getDirectDisplayScreen = getDirectDisplayScreen;
|
|
17
|
+
exports.getDirectDisplayScreen = exports.DirectDisplay = exports.DirectDisplayEncoder = exports.DirectDisplayController = void 0;
|
|
19
18
|
const ModelObject_1 = require("../../ModelObject");
|
|
20
19
|
const DirectDisplayScreen_1 = require("./DirectDisplayScreen");
|
|
21
20
|
const DirectDisplayScreenST7567_1 = require("./DirectDisplayScreenST7567");
|
|
@@ -52,5 +51,6 @@ function getDirectDisplayScreen(controller) {
|
|
|
52
51
|
return new DirectDisplayScreenST7567_1.DirectDisplayScreenST7567();
|
|
53
52
|
}
|
|
54
53
|
}
|
|
54
|
+
exports.getDirectDisplayScreen = getDirectDisplayScreen;
|
|
55
55
|
__exportStar(require("./DirectDisplayScreen"), exports);
|
|
56
56
|
__exportStar(require("./DirectDisplayScreenST7567"), exports);
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.setArrayItem =
|
|
17
|
+
exports.setArrayItem = void 0;
|
|
18
18
|
// Expose all the sub-exports
|
|
19
19
|
__exportStar(require("./ModelCollection"), exports);
|
|
20
20
|
__exportStar(require("./ModelDictionary"), exports);
|
|
@@ -52,3 +52,4 @@ globalThis._duetModelSetArray = (array, index, value) => array[index] = value;
|
|
|
52
52
|
function setArrayItem(array, index, value) {
|
|
53
53
|
globalThis._duetModelSetArray(array, index, value);
|
|
54
54
|
}
|
|
55
|
+
exports.setArrayItem = setArrayItem;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import ModelCollection from "../ModelCollection";
|
|
2
|
+
import ModelDictionary from "../ModelDictionary";
|
|
2
3
|
import ModelObject from "../ModelObject";
|
|
3
4
|
import ThumbnailInfo from "./ThumbnailInfo";
|
|
4
5
|
export declare class GCodeFileInfo extends ModelObject {
|
|
6
|
+
readonly customInfo: ModelDictionary<any>;
|
|
5
7
|
filament: Array<number>;
|
|
6
8
|
fileName: string;
|
|
7
9
|
generatedBy: string;
|
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GCodeFileInfo = void 0;
|
|
4
4
|
const ModelCollection_1 = require("../ModelCollection");
|
|
5
|
+
const ModelDictionary_1 = require("../ModelDictionary");
|
|
5
6
|
const ModelObject_1 = require("../ModelObject");
|
|
6
7
|
const ThumbnailInfo_1 = require("./ThumbnailInfo");
|
|
7
8
|
class GCodeFileInfo extends ModelObject_1.default {
|
|
8
9
|
constructor() {
|
|
9
10
|
super(...arguments);
|
|
11
|
+
this.customInfo = new ModelDictionary_1.default(false);
|
|
10
12
|
this.filament = new Array();
|
|
11
13
|
this.fileName = "";
|
|
12
14
|
this.generatedBy = "";
|
package/dist/move/DriverId.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DriverId = void 0;
|
|
4
|
-
exports.isDriverId = isDriverId;
|
|
3
|
+
exports.DriverId = exports.isDriverId = void 0;
|
|
5
4
|
const ModelObject_1 = require("../ModelObject");
|
|
6
5
|
function isDriverId(value) {
|
|
7
6
|
return (value instanceof Object) && value.board !== undefined && value.driver !== undefined;
|
|
8
7
|
}
|
|
8
|
+
exports.isDriverId = isDriverId;
|
|
9
9
|
class DriverId extends ModelObject_1.default {
|
|
10
10
|
constructor() {
|
|
11
11
|
super(...arguments);
|
|
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Kinematics = void 0;
|
|
18
|
-
exports.getKinematics = getKinematics;
|
|
17
|
+
exports.getKinematics = exports.Kinematics = void 0;
|
|
19
18
|
const KinematicsBase_1 = require("./KinematicsBase");
|
|
20
19
|
const CoreKinematics_1 = require("./CoreKinematics");
|
|
21
20
|
const DeltaKinematics_1 = require("./DeltaKinematics");
|
|
@@ -65,6 +64,7 @@ function getKinematics(name) {
|
|
|
65
64
|
return new CoreKinematics_1.default(name);
|
|
66
65
|
}
|
|
67
66
|
}
|
|
67
|
+
exports.getKinematics = getKinematics;
|
|
68
68
|
__exportStar(require("./CoreKinematics"), exports);
|
|
69
69
|
__exportStar(require("./DeltaKinematics"), exports);
|
|
70
70
|
__exportStar(require("./HangprinterKinematics"), exports);
|
|
@@ -14,8 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.FilamentMonitor = void 0;
|
|
18
|
-
exports.getFilamentMonitor = getFilamentMonitor;
|
|
17
|
+
exports.getFilamentMonitor = exports.FilamentMonitor = void 0;
|
|
19
18
|
const FilamentMonitorBase_1 = require("./FilamentMonitorBase");
|
|
20
19
|
const LaserFilamentMonitor_1 = require("./LaserFilamentMonitor");
|
|
21
20
|
const PulsedFilamentMonitor_1 = require("./PulsedFilamentMonitor");
|
|
@@ -45,6 +44,7 @@ function getFilamentMonitor(type) {
|
|
|
45
44
|
return new FilamentMonitor(type);
|
|
46
45
|
}
|
|
47
46
|
}
|
|
47
|
+
exports.getFilamentMonitor = getFilamentMonitor;
|
|
48
48
|
__exportStar(require("./FilamentMonitorBase"), exports);
|
|
49
49
|
__exportStar(require("./Duet3DFilamentMonitor"), exports);
|
|
50
50
|
__exportStar(require("./LaserFilamentMonitor"), exports);
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import ModelObject from "../ModelObject";
|
|
2
|
-
export declare enum HttpEndpointType {
|
|
3
|
-
GET = "GET",
|
|
4
|
-
POST = "POST",
|
|
5
|
-
PUT = "PUT",
|
|
6
|
-
PATCH = "PATCH",
|
|
7
|
-
TRACE = "TRACE",
|
|
8
|
-
DELETE = "DELETE",
|
|
9
|
-
OPTIONS = "OPTIONS",
|
|
10
|
-
WebSocket = "WebSocket"
|
|
11
|
-
}
|
|
12
|
-
export declare class HttpEndpoint extends ModelObject {
|
|
13
|
-
endpointType: HttpEndpointType;
|
|
14
|
-
namespace: string;
|
|
15
|
-
path: string;
|
|
16
|
-
isUploadRequest: boolean;
|
|
17
|
-
unixSocket: string;
|
|
18
|
-
}
|
|
19
|
-
export default HttpEndpoint;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.HttpEndpoint = exports.HttpEndpointType = void 0;
|
|
4
|
-
const ModelObject_1 = require("../ModelObject");
|
|
5
|
-
var HttpEndpointType;
|
|
6
|
-
(function (HttpEndpointType) {
|
|
7
|
-
HttpEndpointType["GET"] = "GET";
|
|
8
|
-
HttpEndpointType["POST"] = "POST";
|
|
9
|
-
HttpEndpointType["PUT"] = "PUT";
|
|
10
|
-
HttpEndpointType["PATCH"] = "PATCH";
|
|
11
|
-
HttpEndpointType["TRACE"] = "TRACE";
|
|
12
|
-
HttpEndpointType["DELETE"] = "DELETE";
|
|
13
|
-
HttpEndpointType["OPTIONS"] = "OPTIONS";
|
|
14
|
-
HttpEndpointType["WebSocket"] = "WebSocket";
|
|
15
|
-
})(HttpEndpointType = exports.HttpEndpointType || (exports.HttpEndpointType = {}));
|
|
16
|
-
class HttpEndpoint extends ModelObject_1.default {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.endpointType = HttpEndpointType.GET;
|
|
20
|
-
this.namespace = "";
|
|
21
|
-
this.path = "";
|
|
22
|
-
this.isUploadRequest = false;
|
|
23
|
-
this.unixSocket = "";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.HttpEndpoint = HttpEndpoint;
|
|
27
|
-
exports.default = HttpEndpoint;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import ModelObject from "../ModelObject";
|
|
2
|
-
export declare enum AccessLevel {
|
|
3
|
-
readOnly = "readOnly",
|
|
4
|
-
readWrite = "readWrite"
|
|
5
|
-
}
|
|
6
|
-
export declare enum SessionType {
|
|
7
|
-
local = "local",
|
|
8
|
-
http = "http",
|
|
9
|
-
telnet = "telnet"
|
|
10
|
-
}
|
|
11
|
-
export declare class UserSession extends ModelObject {
|
|
12
|
-
accessLevel: AccessLevel;
|
|
13
|
-
id: number;
|
|
14
|
-
origin: string | null;
|
|
15
|
-
originId: number;
|
|
16
|
-
sessionType: SessionType;
|
|
17
|
-
}
|
|
18
|
-
export default UserSession;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserSession = exports.SessionType = exports.AccessLevel = void 0;
|
|
4
|
-
const ModelObject_1 = require("../ModelObject");
|
|
5
|
-
var AccessLevel;
|
|
6
|
-
(function (AccessLevel) {
|
|
7
|
-
AccessLevel["readOnly"] = "readOnly";
|
|
8
|
-
AccessLevel["readWrite"] = "readWrite";
|
|
9
|
-
})(AccessLevel = exports.AccessLevel || (exports.AccessLevel = {}));
|
|
10
|
-
var SessionType;
|
|
11
|
-
(function (SessionType) {
|
|
12
|
-
SessionType["local"] = "local";
|
|
13
|
-
SessionType["http"] = "http";
|
|
14
|
-
SessionType["telnet"] = "telnet";
|
|
15
|
-
})(SessionType = exports.SessionType || (exports.SessionType = {}));
|
|
16
|
-
class UserSession extends ModelObject_1.default {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.accessLevel = AccessLevel.readOnly;
|
|
20
|
-
this.id = 0;
|
|
21
|
-
this.origin = null;
|
|
22
|
-
this.originId = -1;
|
|
23
|
-
this.sessionType = SessionType.local;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.UserSession = UserSession;
|
|
27
|
-
exports.default = UserSession;
|