@mikw99/node-emberplus-custom 1.0.5
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/LICENSE +21 -0
- package/README.md +4 -0
- package/lib/ber.d.ts +42 -0
- package/lib/ber.js +237 -0
- package/lib/ber.js.map +1 -0
- package/lib/client/ember-client-logs.d.ts +4 -0
- package/lib/client/ember-client-logs.js +214 -0
- package/lib/client/ember-client-logs.js.map +1 -0
- package/lib/client/ember-client.d.ts +62 -0
- package/lib/client/ember-client.events.d.ts +8 -0
- package/lib/client/ember-client.events.js +12 -0
- package/lib/client/ember-client.events.js.map +1 -0
- package/lib/client/ember-client.js +678 -0
- package/lib/client/ember-client.js.map +1 -0
- package/lib/client/ember-client.request.d.ts +12 -0
- package/lib/client/ember-client.request.js +22 -0
- package/lib/client/ember-client.request.js.map +1 -0
- package/lib/common/command.d.ts +37 -0
- package/lib/common/command.js +95 -0
- package/lib/common/command.js.map +1 -0
- package/lib/common/common.d.ts +71 -0
- package/lib/common/common.js +310 -0
- package/lib/common/common.js.map +1 -0
- package/lib/common/constants.d.ts +10 -0
- package/lib/common/constants.js +13 -0
- package/lib/common/constants.js.map +1 -0
- package/lib/common/element.base.d.ts +13 -0
- package/lib/common/element.base.js +36 -0
- package/lib/common/element.base.js.map +1 -0
- package/lib/common/element.d.ts +6 -0
- package/lib/common/element.js +23 -0
- package/lib/common/element.js.map +1 -0
- package/lib/common/function/function-argument.d.ts +26 -0
- package/lib/common/function/function-argument.js +75 -0
- package/lib/common/function/function-argument.js.map +1 -0
- package/lib/common/function/function-contents.d.ts +30 -0
- package/lib/common/function/function-contents.js +138 -0
- package/lib/common/function/function-contents.js.map +1 -0
- package/lib/common/function/function.d.ts +31 -0
- package/lib/common/function/function.js +75 -0
- package/lib/common/function/function.js.map +1 -0
- package/lib/common/function/qualified-function.d.ts +19 -0
- package/lib/common/function/qualified-function.js +73 -0
- package/lib/common/function/qualified-function.js.map +1 -0
- package/lib/common/invocation-result.d.ts +23 -0
- package/lib/common/invocation-result.js +101 -0
- package/lib/common/invocation-result.js.map +1 -0
- package/lib/common/invocation.d.ts +20 -0
- package/lib/common/invocation.js +73 -0
- package/lib/common/invocation.js.map +1 -0
- package/lib/common/label.d.ts +14 -0
- package/lib/common/label.js +55 -0
- package/lib/common/label.js.map +1 -0
- package/lib/common/matrix/matrix-connection.d.ts +26 -0
- package/lib/common/matrix/matrix-connection.js +123 -0
- package/lib/common/matrix/matrix-connection.js.map +1 -0
- package/lib/common/matrix/matrix-contents.d.ts +38 -0
- package/lib/common/matrix/matrix-contents.js +173 -0
- package/lib/common/matrix/matrix-contents.js.map +1 -0
- package/lib/common/matrix/matrix-disposition.d.ts +9 -0
- package/lib/common/matrix/matrix-disposition.js +14 -0
- package/lib/common/matrix/matrix-disposition.js.map +1 -0
- package/lib/common/matrix/matrix-mode.d.ts +8 -0
- package/lib/common/matrix/matrix-mode.js +23 -0
- package/lib/common/matrix/matrix-mode.js.map +1 -0
- package/lib/common/matrix/matrix-node.d.ts +13 -0
- package/lib/common/matrix/matrix-node.js +90 -0
- package/lib/common/matrix/matrix-node.js.map +1 -0
- package/lib/common/matrix/matrix-operation.d.ts +8 -0
- package/lib/common/matrix/matrix-operation.js +13 -0
- package/lib/common/matrix/matrix-operation.js.map +1 -0
- package/lib/common/matrix/matrix-type.d.ts +9 -0
- package/lib/common/matrix/matrix-type.js +24 -0
- package/lib/common/matrix/matrix-type.js.map +1 -0
- package/lib/common/matrix/matrix.d.ts +91 -0
- package/lib/common/matrix/matrix.js +429 -0
- package/lib/common/matrix/matrix.js.map +1 -0
- package/lib/common/matrix/qualified-matrix.d.ts +17 -0
- package/lib/common/matrix/qualified-matrix.js +97 -0
- package/lib/common/matrix/qualified-matrix.js.map +1 -0
- package/lib/common/node-contents.d.ts +24 -0
- package/lib/common/node-contents.js +87 -0
- package/lib/common/node-contents.js.map +1 -0
- package/lib/common/node.d.ts +27 -0
- package/lib/common/node.js +67 -0
- package/lib/common/node.js.map +1 -0
- package/lib/common/parameter-access.d.ts +10 -0
- package/lib/common/parameter-access.js +25 -0
- package/lib/common/parameter-access.js.map +1 -0
- package/lib/common/parameter-contents.d.ts +55 -0
- package/lib/common/parameter-contents.js +167 -0
- package/lib/common/parameter-contents.js.map +1 -0
- package/lib/common/parameter-type.d.ts +15 -0
- package/lib/common/parameter-type.js +54 -0
- package/lib/common/parameter-type.js.map +1 -0
- package/lib/common/parameter.d.ts +76 -0
- package/lib/common/parameter.js +174 -0
- package/lib/common/parameter.js.map +1 -0
- package/lib/common/qualified-element.d.ts +10 -0
- package/lib/common/qualified-element.js +36 -0
- package/lib/common/qualified-element.js.map +1 -0
- package/lib/common/qualified-node.d.ts +16 -0
- package/lib/common/qualified-node.js +67 -0
- package/lib/common/qualified-node.js.map +1 -0
- package/lib/common/qualified-parameter.d.ts +52 -0
- package/lib/common/qualified-parameter.js +177 -0
- package/lib/common/qualified-parameter.js.map +1 -0
- package/lib/common/qualified-template.d.ts +17 -0
- package/lib/common/qualified-template.js +58 -0
- package/lib/common/qualified-template.js.map +1 -0
- package/lib/common/stream/stream-collection.d.ts +20 -0
- package/lib/common/stream/stream-collection.js +57 -0
- package/lib/common/stream/stream-collection.js.map +1 -0
- package/lib/common/stream/stream-description.d.ts +15 -0
- package/lib/common/stream/stream-description.js +45 -0
- package/lib/common/stream/stream-description.js.map +1 -0
- package/lib/common/stream/stream-entry.d.ts +15 -0
- package/lib/common/stream/stream-entry.js +49 -0
- package/lib/common/stream/stream-entry.js.map +1 -0
- package/lib/common/stream/stream-format.d.ts +23 -0
- package/lib/common/stream/stream-format.js +28 -0
- package/lib/common/stream/stream-format.js.map +1 -0
- package/lib/common/string-integer-collection.d.ts +12 -0
- package/lib/common/string-integer-collection.js +51 -0
- package/lib/common/string-integer-collection.js.map +1 -0
- package/lib/common/string-integer-pair.d.ts +18 -0
- package/lib/common/string-integer-pair.js +67 -0
- package/lib/common/string-integer-pair.js.map +1 -0
- package/lib/common/template-element.d.ts +12 -0
- package/lib/common/template-element.js +53 -0
- package/lib/common/template-element.js.map +1 -0
- package/lib/common/template.d.ts +16 -0
- package/lib/common/template.js +58 -0
- package/lib/common/template.js.map +1 -0
- package/lib/common/tree-node.d.ts +85 -0
- package/lib/common/tree-node.js +461 -0
- package/lib/common/tree-node.js.map +1 -0
- package/lib/error/errors.d.ts +57 -0
- package/lib/error/errors.js +150 -0
- package/lib/error/errors.js.map +1 -0
- package/lib/fixture/utils.d.ts +7 -0
- package/lib/fixture/utils.js +185 -0
- package/lib/fixture/utils.js.map +1 -0
- package/lib/index.d.ts +41 -0
- package/lib/index.js +15 -0
- package/lib/index.js.map +1 -0
- package/lib/logging/logging.service.d.ts +45 -0
- package/lib/logging/logging.service.js +110 -0
- package/lib/logging/logging.service.js.map +1 -0
- package/lib/server/client-request.d.ts +9 -0
- package/lib/server/client-request.js +10 -0
- package/lib/server/client-request.js.map +1 -0
- package/lib/server/element-handlers.d.ts +20 -0
- package/lib/server/element-handlers.js +105 -0
- package/lib/server/element-handlers.js.map +1 -0
- package/lib/server/ember-server.d.ts +84 -0
- package/lib/server/ember-server.events.d.ts +23 -0
- package/lib/server/ember-server.events.js +46 -0
- package/lib/server/ember-server.events.js.map +1 -0
- package/lib/server/ember-server.interface.d.ts +26 -0
- package/lib/server/ember-server.interface.js +3 -0
- package/lib/server/ember-server.interface.js.map +1 -0
- package/lib/server/ember-server.js +422 -0
- package/lib/server/ember-server.js.map +1 -0
- package/lib/server/ember-server.logs.d.ts +4 -0
- package/lib/server/ember-server.logs.js +274 -0
- package/lib/server/ember-server.logs.js.map +1 -0
- package/lib/server/json.parser.d.ts +13 -0
- package/lib/server/json.parser.js +209 -0
- package/lib/server/json.parser.js.map +1 -0
- package/lib/server/matrix.handlers.d.ts +10 -0
- package/lib/server/matrix.handlers.js +103 -0
- package/lib/server/matrix.handlers.js.map +1 -0
- package/lib/server/node.handlers.d.ts +12 -0
- package/lib/server/node.handlers.js +85 -0
- package/lib/server/node.handlers.js.map +1 -0
- package/lib/server/qualified.handlers.d.ts +15 -0
- package/lib/server/qualified.handlers.js +54 -0
- package/lib/server/qualified.handlers.js.map +1 -0
- package/lib/socket/s101.client.d.ts +17 -0
- package/lib/socket/s101.client.js +53 -0
- package/lib/socket/s101.client.js.map +1 -0
- package/lib/socket/s101.codec.d.ts +32 -0
- package/lib/socket/s101.codec.js +301 -0
- package/lib/socket/s101.codec.js.map +1 -0
- package/lib/socket/s101.packet-stats.socket.d.ts +31 -0
- package/lib/socket/s101.packet-stats.socket.js +74 -0
- package/lib/socket/s101.packet-stats.socket.js.map +1 -0
- package/lib/socket/s101.server.d.ts +28 -0
- package/lib/socket/s101.server.js +87 -0
- package/lib/socket/s101.server.js.map +1 -0
- package/lib/socket/s101.socket.d.ts +75 -0
- package/lib/socket/s101.socket.js +300 -0
- package/lib/socket/s101.socket.js.map +1 -0
- package/lib/socket/stats-collector.d.ts +19 -0
- package/lib/socket/stats-collector.js +63 -0
- package/lib/socket/stats-collector.js.map +1 -0
- package/lib/tools/debug.d.ts +2 -0
- package/lib/tools/debug.js +21 -0
- package/lib/tools/debug.js.map +1 -0
- package/lib/tools/jsontree.d.ts +1 -0
- package/lib/tools/jsontree.js +36 -0
- package/lib/tools/jsontree.js.map +1 -0
- package/lib/tools/monitoring-client.d.ts +2 -0
- package/lib/tools/monitoring-client.js +186 -0
- package/lib/tools/monitoring-client.js.map +1 -0
- package/lib/tools/serve.d.ts +1 -0
- package/lib/tools/serve.js +129 -0
- package/lib/tools/serve.js.map +1 -0
- package/package.json +105 -0
@@ -0,0 +1,85 @@
|
|
1
|
+
import { ExtendedReader as Reader, ExtendedWriter as Writer } from '../ber';
|
2
|
+
import { Command } from './command';
|
3
|
+
import { InvocationResult } from './invocation-result';
|
4
|
+
import { StreamCollection } from './stream/stream-collection';
|
5
|
+
import { FunctionContents } from './function/function-contents';
|
6
|
+
import { ParameterContents } from './parameter-contents';
|
7
|
+
import { NodeContents } from './node-contents';
|
8
|
+
import { MatrixContents } from './matrix/matrix-contents';
|
9
|
+
import { FunctionArgument } from './function/function-argument';
|
10
|
+
import { ElementBase } from './element.base';
|
11
|
+
export declare class TreeNode extends ElementBase {
|
12
|
+
get description(): string | null;
|
13
|
+
set description(description: string);
|
14
|
+
get identifier(): string | null;
|
15
|
+
set identifier(identifier: string);
|
16
|
+
get number(): number;
|
17
|
+
get path(): string;
|
18
|
+
get contents(): FunctionContents | ParameterContents | NodeContents | MatrixContents | null;
|
19
|
+
_parent: TreeNode;
|
20
|
+
elements: Map<string | number, TreeNode | Command | InvocationResult>;
|
21
|
+
protected _result?: InvocationResult;
|
22
|
+
protected _contents?: FunctionContents | ParameterContents | NodeContents | MatrixContents;
|
23
|
+
protected _number?: number;
|
24
|
+
protected _path?: string;
|
25
|
+
protected _seqID: number;
|
26
|
+
private _subscribers;
|
27
|
+
private streams?;
|
28
|
+
constructor();
|
29
|
+
static addElement(parent: TreeNode, element: TreeNode | Command): void;
|
30
|
+
static decode(ber: Reader): TreeNode | Command | InvocationResult;
|
31
|
+
static path2number(path: string): number;
|
32
|
+
static createElementTree(node: TreeNode): TreeNode;
|
33
|
+
_isSubscribable(callback: (x: TreeNode) => void): boolean;
|
34
|
+
_isAutoSubscribable(callback: (x: TreeNode) => void): boolean;
|
35
|
+
_subscribe(callback: (x: TreeNode) => void): void;
|
36
|
+
_unsubscribe(callback: (x: TreeNode) => void): void;
|
37
|
+
addChild(child: TreeNode | Command): void;
|
38
|
+
addElement(element: TreeNode | Command): void;
|
39
|
+
clear(): void;
|
40
|
+
encode(ber: Writer): void;
|
41
|
+
encodeNumber(ber: Writer): void;
|
42
|
+
encodePath(ber: Writer): void;
|
43
|
+
getSubscribersCount(): number;
|
44
|
+
getNewTree(): TreeNode;
|
45
|
+
hasChildren(): boolean;
|
46
|
+
isRoot(): boolean;
|
47
|
+
getMinimalContent(): any;
|
48
|
+
getDuplicate(): TreeNode;
|
49
|
+
getMinimal(): TreeNode;
|
50
|
+
getTreeBranch(child?: ElementBase, modifier?: (x: TreeNode) => void): TreeNode;
|
51
|
+
getRoot(): TreeNode;
|
52
|
+
getCommand(cmd: Command): TreeNode;
|
53
|
+
getDirectory(callback: (x: TreeNode) => void): TreeNode;
|
54
|
+
getChildren(): (TreeNode | Command | InvocationResult)[] | null;
|
55
|
+
getNumber(): number;
|
56
|
+
getParent(): TreeNode;
|
57
|
+
getElementByPath(path: string | number[]): TreeNode;
|
58
|
+
getElementByNumber(number: number): TreeNode | Command | InvocationResult;
|
59
|
+
getElementByIdentifier(identifier: string): TreeNode;
|
60
|
+
getElement(id: number | string): TreeNode | Command | InvocationResult;
|
61
|
+
getPath(): string;
|
62
|
+
getResult(): InvocationResult | null;
|
63
|
+
invoke(params: FunctionArgument[]): TreeNode;
|
64
|
+
setResult(result: InvocationResult): void;
|
65
|
+
setStreams(streams: StreamCollection): void;
|
66
|
+
getStreams(): StreamCollection;
|
67
|
+
subscribe(callback: (x: TreeNode) => void): TreeNode;
|
68
|
+
getJSONContent(): {
|
69
|
+
[index: string]: any;
|
70
|
+
};
|
71
|
+
toJSON(): {
|
72
|
+
[index: string]: any;
|
73
|
+
};
|
74
|
+
toElement(): TreeNode;
|
75
|
+
toQualified(): TreeNode;
|
76
|
+
unsubscribe(callback: (x: TreeNode) => void): TreeNode;
|
77
|
+
update(other: TreeNode): boolean;
|
78
|
+
updateSubscribers(): void;
|
79
|
+
protected decodeChildren(ber: Reader): void;
|
80
|
+
protected encodeChildren(ber: Writer): void;
|
81
|
+
protected setContent(key: string, value: any): void;
|
82
|
+
protected setPath(path: string): void;
|
83
|
+
protected setNumber(number: number): void;
|
84
|
+
protected setContents(contents: FunctionContents | ParameterContents | NodeContents | MatrixContents): void;
|
85
|
+
}
|
@@ -0,0 +1,461 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const constants_1 = require("./constants");
|
4
|
+
const ber_1 = require("../ber");
|
5
|
+
const command_1 = require("./command");
|
6
|
+
const invocation_result_1 = require("./invocation-result");
|
7
|
+
const errors_1 = require("../error/errors");
|
8
|
+
const invocation_1 = require("./invocation");
|
9
|
+
const element_base_1 = require("./element.base");
|
10
|
+
class TreeNode extends element_base_1.ElementBase {
|
11
|
+
constructor() {
|
12
|
+
super();
|
13
|
+
this._parent = null;
|
14
|
+
this._subscribers = new Set();
|
15
|
+
}
|
16
|
+
get description() {
|
17
|
+
var _a;
|
18
|
+
return (_a = this.contents) === null || _a === void 0 ? void 0 : _a.description;
|
19
|
+
}
|
20
|
+
set description(description) {
|
21
|
+
this.setContent('description', description);
|
22
|
+
}
|
23
|
+
get identifier() {
|
24
|
+
var _a;
|
25
|
+
return (_a = this.contents) === null || _a === void 0 ? void 0 : _a.identifier;
|
26
|
+
}
|
27
|
+
set identifier(identifier) {
|
28
|
+
this.setContent('identifier', identifier);
|
29
|
+
}
|
30
|
+
get number() {
|
31
|
+
const num = this._number;
|
32
|
+
return num;
|
33
|
+
}
|
34
|
+
get path() {
|
35
|
+
const path = this._path;
|
36
|
+
return path;
|
37
|
+
}
|
38
|
+
get contents() {
|
39
|
+
return this._contents;
|
40
|
+
}
|
41
|
+
static addElement(parent, element) {
|
42
|
+
element._parent = parent;
|
43
|
+
if (parent.elements == null) {
|
44
|
+
parent.elements = new Map();
|
45
|
+
}
|
46
|
+
if (parent.isRoot() && element.isQualified()) {
|
47
|
+
const path = element.getPath().split('.');
|
48
|
+
if (path.length > 1) {
|
49
|
+
parent.elements.set(element.getPath(), element);
|
50
|
+
return;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
parent.elements.set(element.getNumber(), element);
|
54
|
+
}
|
55
|
+
static decode(ber) {
|
56
|
+
return null;
|
57
|
+
}
|
58
|
+
static path2number(path) {
|
59
|
+
try {
|
60
|
+
const numbers = path.split('.');
|
61
|
+
if (numbers.length > 0) {
|
62
|
+
return Number(numbers[numbers.length - 1]);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
catch (e) {
|
66
|
+
}
|
67
|
+
}
|
68
|
+
static createElementTree(node) {
|
69
|
+
const elementTree = node.toElement();
|
70
|
+
const children = node.getChildren();
|
71
|
+
if (children != null) {
|
72
|
+
for (const child of children) {
|
73
|
+
elementTree.addChild(this.createElementTree(child));
|
74
|
+
}
|
75
|
+
}
|
76
|
+
return elementTree;
|
77
|
+
}
|
78
|
+
_isSubscribable(callback) {
|
79
|
+
return (callback != null &&
|
80
|
+
((this.isParameter() && this.isStream()) ||
|
81
|
+
this.isMatrix()));
|
82
|
+
}
|
83
|
+
_isAutoSubscribable(callback) {
|
84
|
+
return (callback != null &&
|
85
|
+
((this.isParameter() && !this.isStream()) ||
|
86
|
+
this.isMatrix()));
|
87
|
+
}
|
88
|
+
_subscribe(callback) {
|
89
|
+
this._subscribers.add(callback);
|
90
|
+
}
|
91
|
+
_unsubscribe(callback) {
|
92
|
+
this._subscribers.delete(callback);
|
93
|
+
}
|
94
|
+
addChild(child) {
|
95
|
+
TreeNode.addElement(this, child);
|
96
|
+
}
|
97
|
+
addElement(element) {
|
98
|
+
TreeNode.addElement(this, element);
|
99
|
+
}
|
100
|
+
clear() {
|
101
|
+
this.elements = undefined;
|
102
|
+
}
|
103
|
+
encode(ber) {
|
104
|
+
ber.startSequence(ber_1.APPLICATION(0));
|
105
|
+
if (this.elements != null) {
|
106
|
+
const elements = this.getChildren();
|
107
|
+
ber.startSequence(ber_1.APPLICATION(11));
|
108
|
+
for (let i = 0; i < elements.length; i++) {
|
109
|
+
ber.startSequence(ber_1.CONTEXT(0));
|
110
|
+
elements[i].encode(ber);
|
111
|
+
ber.endSequence();
|
112
|
+
}
|
113
|
+
ber.endSequence();
|
114
|
+
}
|
115
|
+
if (this.isRoot() && this._result != null) {
|
116
|
+
this._result.encode(ber);
|
117
|
+
}
|
118
|
+
if (this.streams != null) {
|
119
|
+
this.streams.encode(ber);
|
120
|
+
}
|
121
|
+
ber.endSequence();
|
122
|
+
}
|
123
|
+
encodeNumber(ber) {
|
124
|
+
ber.startSequence(ber_1.CONTEXT(0));
|
125
|
+
ber.writeInt(this.number);
|
126
|
+
ber.endSequence();
|
127
|
+
}
|
128
|
+
encodePath(ber) {
|
129
|
+
if (this.isQualified()) {
|
130
|
+
ber.startSequence(ber_1.CONTEXT(0));
|
131
|
+
ber.writeRelativeOID(this.path, ber_1.EMBER_RELATIVE_OID);
|
132
|
+
ber.endSequence();
|
133
|
+
}
|
134
|
+
}
|
135
|
+
getSubscribersCount() {
|
136
|
+
return this._subscribers.size;
|
137
|
+
}
|
138
|
+
getNewTree() {
|
139
|
+
return new TreeNode();
|
140
|
+
}
|
141
|
+
hasChildren() {
|
142
|
+
return this.elements != null && this.elements.size > 0;
|
143
|
+
}
|
144
|
+
isRoot() {
|
145
|
+
return this._parent == null;
|
146
|
+
}
|
147
|
+
getMinimalContent() {
|
148
|
+
let obj;
|
149
|
+
if (this.isQualified()) {
|
150
|
+
obj = new this.constructor(this.path);
|
151
|
+
}
|
152
|
+
else {
|
153
|
+
obj = new this.constructor(this.number);
|
154
|
+
}
|
155
|
+
if (this.contents != null) {
|
156
|
+
obj.setContents(this.contents);
|
157
|
+
}
|
158
|
+
else if (this.isTemplate()) {
|
159
|
+
obj.element = this.element;
|
160
|
+
}
|
161
|
+
return obj;
|
162
|
+
}
|
163
|
+
getDuplicate() {
|
164
|
+
const obj = this.getMinimal();
|
165
|
+
obj.update(this);
|
166
|
+
return obj;
|
167
|
+
}
|
168
|
+
getMinimal() {
|
169
|
+
if (this.isQualified()) {
|
170
|
+
return new this.constructor(this.path);
|
171
|
+
}
|
172
|
+
else {
|
173
|
+
return new this.constructor(this.number);
|
174
|
+
}
|
175
|
+
}
|
176
|
+
getTreeBranch(child, modifier) {
|
177
|
+
const m = this.getMinimal();
|
178
|
+
if (child != null) {
|
179
|
+
m.addChild(child);
|
180
|
+
}
|
181
|
+
if (modifier != null) {
|
182
|
+
modifier(m);
|
183
|
+
}
|
184
|
+
if (this._parent == null) {
|
185
|
+
return m;
|
186
|
+
}
|
187
|
+
else {
|
188
|
+
return this._parent.getTreeBranch(m);
|
189
|
+
}
|
190
|
+
}
|
191
|
+
getRoot() {
|
192
|
+
if (this._parent == null) {
|
193
|
+
return this;
|
194
|
+
}
|
195
|
+
else {
|
196
|
+
return this._parent.getRoot();
|
197
|
+
}
|
198
|
+
}
|
199
|
+
getCommand(cmd) {
|
200
|
+
return this.getTreeBranch(cmd);
|
201
|
+
}
|
202
|
+
getDirectory(callback) {
|
203
|
+
if (this._isAutoSubscribable(callback)) {
|
204
|
+
this._subscribe(callback);
|
205
|
+
}
|
206
|
+
return this.getCommand(new command_1.Command(constants_1.COMMAND_GETDIRECTORY));
|
207
|
+
}
|
208
|
+
getChildren() {
|
209
|
+
if (this.elements != null) {
|
210
|
+
return [...this.elements.values()];
|
211
|
+
}
|
212
|
+
return null;
|
213
|
+
}
|
214
|
+
getNumber() {
|
215
|
+
if (this.isQualified()) {
|
216
|
+
return TreeNode.path2number(this.getPath());
|
217
|
+
}
|
218
|
+
else {
|
219
|
+
return this.number;
|
220
|
+
}
|
221
|
+
}
|
222
|
+
getParent() {
|
223
|
+
return this._parent;
|
224
|
+
}
|
225
|
+
getElementByPath(path) {
|
226
|
+
if (this.elements == null || this.elements.size === 0) {
|
227
|
+
return null;
|
228
|
+
}
|
229
|
+
if (this.isRoot()) {
|
230
|
+
const _node = this.elements.get(Array.isArray(path) ? path.join('.') : path);
|
231
|
+
if (_node != null) {
|
232
|
+
return _node;
|
233
|
+
}
|
234
|
+
}
|
235
|
+
const myPath = this.getPath();
|
236
|
+
if (path === myPath) {
|
237
|
+
return this;
|
238
|
+
}
|
239
|
+
const myPathArray = this.isRoot() ? [] : myPath.split('.').map(x => Number(x));
|
240
|
+
const pathArray = Array.isArray(path) ? path : path.split('.').map(x => Number(x));
|
241
|
+
if (pathArray.length < myPathArray.length) {
|
242
|
+
return null;
|
243
|
+
}
|
244
|
+
for (let i = 0; i < myPathArray.length; i++) {
|
245
|
+
if (pathArray[i] !== myPathArray[i]) {
|
246
|
+
return null;
|
247
|
+
}
|
248
|
+
}
|
249
|
+
let node = this;
|
250
|
+
while (myPathArray.length !== pathArray.length) {
|
251
|
+
const number = pathArray[myPathArray.length];
|
252
|
+
node = node.getElementByNumber(number);
|
253
|
+
if (node == null || node.isCommand()) {
|
254
|
+
return null;
|
255
|
+
}
|
256
|
+
if (node.isQualified() && node.path === path) {
|
257
|
+
return node;
|
258
|
+
}
|
259
|
+
myPathArray.push(number);
|
260
|
+
}
|
261
|
+
return node;
|
262
|
+
}
|
263
|
+
getElementByNumber(number) {
|
264
|
+
const n = Number(number);
|
265
|
+
if (this.elements != null) {
|
266
|
+
return this.elements.get(n);
|
267
|
+
}
|
268
|
+
return null;
|
269
|
+
}
|
270
|
+
getElementByIdentifier(identifier) {
|
271
|
+
const children = this.getChildren();
|
272
|
+
if (children == null) {
|
273
|
+
return null;
|
274
|
+
}
|
275
|
+
for (let i = 0; i < children.length; i++) {
|
276
|
+
if (children[i].isCommand()) {
|
277
|
+
continue;
|
278
|
+
}
|
279
|
+
const contents = children[i].contents;
|
280
|
+
if (contents != null &&
|
281
|
+
contents.identifier === identifier) {
|
282
|
+
return children[i];
|
283
|
+
}
|
284
|
+
}
|
285
|
+
return null;
|
286
|
+
}
|
287
|
+
getElement(id) {
|
288
|
+
const num = Number(id);
|
289
|
+
if (Number.isInteger(num)) {
|
290
|
+
return this.getElementByNumber(num);
|
291
|
+
}
|
292
|
+
else {
|
293
|
+
const txt = String(id);
|
294
|
+
return this.getElementByIdentifier(txt);
|
295
|
+
}
|
296
|
+
}
|
297
|
+
getPath() {
|
298
|
+
if (this.path != null) {
|
299
|
+
return this.path;
|
300
|
+
}
|
301
|
+
if (this._parent == null) {
|
302
|
+
if (this.number == null) {
|
303
|
+
return '';
|
304
|
+
}
|
305
|
+
else {
|
306
|
+
return this.number.toString();
|
307
|
+
}
|
308
|
+
}
|
309
|
+
else {
|
310
|
+
let path = this._parent.getPath();
|
311
|
+
if (path.length > 0) {
|
312
|
+
path = path + '.';
|
313
|
+
}
|
314
|
+
return path + this.number;
|
315
|
+
}
|
316
|
+
}
|
317
|
+
getResult() {
|
318
|
+
if (this.isRoot()) {
|
319
|
+
return this._result;
|
320
|
+
}
|
321
|
+
throw new errors_1.InvalidEmberNodeError(this.getPath(), 'getResult only for root');
|
322
|
+
}
|
323
|
+
invoke(params) {
|
324
|
+
const invocation = new invocation_1.Invocation(invocation_1.Invocation.newInvocationID());
|
325
|
+
invocation.arguments = params;
|
326
|
+
const req = this.getCommand(command_1.Command.getInvocationCommand(invocation));
|
327
|
+
return req;
|
328
|
+
}
|
329
|
+
setResult(result) {
|
330
|
+
if (this.isRoot()) {
|
331
|
+
this._result = result;
|
332
|
+
}
|
333
|
+
else {
|
334
|
+
throw new errors_1.InvalidEmberNodeError(this.getPath(), 'setResult only for root');
|
335
|
+
}
|
336
|
+
}
|
337
|
+
setStreams(streams) {
|
338
|
+
this.streams = streams;
|
339
|
+
}
|
340
|
+
getStreams() {
|
341
|
+
return this.streams;
|
342
|
+
}
|
343
|
+
subscribe(callback) {
|
344
|
+
if (this._isSubscribable(callback)) {
|
345
|
+
this._subscribe(callback);
|
346
|
+
}
|
347
|
+
return this.getCommand(new command_1.Command(constants_1.COMMAND_SUBSCRIBE));
|
348
|
+
}
|
349
|
+
getJSONContent() {
|
350
|
+
var _a, _b, _c;
|
351
|
+
const node = this;
|
352
|
+
if (this.isRoot()) {
|
353
|
+
const elements = this.getChildren();
|
354
|
+
return {
|
355
|
+
elements: elements == null ? [] : elements.map(e => e.toJSON()),
|
356
|
+
streams: (_a = node.streams) === null || _a === void 0 ? void 0 : _a.toJSON(),
|
357
|
+
result: (_b = node._result) === null || _b === void 0 ? void 0 : _b.toJSON()
|
358
|
+
};
|
359
|
+
}
|
360
|
+
const res = {
|
361
|
+
nodeType: this.constructor.name,
|
362
|
+
number: node.getNumber(),
|
363
|
+
path: node.getPath()
|
364
|
+
};
|
365
|
+
(_c = node.contents) === null || _c === void 0 ? void 0 : _c.toJSON(res);
|
366
|
+
return res;
|
367
|
+
}
|
368
|
+
toJSON() {
|
369
|
+
var _a;
|
370
|
+
const res = this.getJSONContent();
|
371
|
+
res.children = (_a = this.getChildren()) === null || _a === void 0 ? void 0 : _a.map(child => child.toJSON());
|
372
|
+
return res;
|
373
|
+
}
|
374
|
+
toElement() {
|
375
|
+
if (this.isRoot()) {
|
376
|
+
return new TreeNode();
|
377
|
+
}
|
378
|
+
return this.getDuplicate();
|
379
|
+
}
|
380
|
+
toQualified() {
|
381
|
+
throw new errors_1.InvalidFunctionCallError('toQualified should not be called on TreeNode');
|
382
|
+
}
|
383
|
+
unsubscribe(callback) {
|
384
|
+
this._unsubscribe(callback);
|
385
|
+
return this.getCommand(new command_1.Command(constants_1.COMMAND_UNSUBSCRIBE));
|
386
|
+
}
|
387
|
+
update(other) {
|
388
|
+
let modified = false;
|
389
|
+
if ((other != null) && (other.contents != null)) {
|
390
|
+
if (this.contents == null) {
|
391
|
+
this.setContents(other.contents);
|
392
|
+
modified = true;
|
393
|
+
}
|
394
|
+
else {
|
395
|
+
const contents = this.contents;
|
396
|
+
const newContents = other.contents;
|
397
|
+
for (const key in newContents) {
|
398
|
+
if (contents[key] !== newContents[key]) {
|
399
|
+
contents[key] = newContents[key];
|
400
|
+
modified = true;
|
401
|
+
}
|
402
|
+
}
|
403
|
+
}
|
404
|
+
}
|
405
|
+
return modified;
|
406
|
+
}
|
407
|
+
updateSubscribers() {
|
408
|
+
if (this._subscribers != null) {
|
409
|
+
for (const cb of this._subscribers) {
|
410
|
+
cb(this);
|
411
|
+
}
|
412
|
+
}
|
413
|
+
}
|
414
|
+
decodeChildren(ber) {
|
415
|
+
const seq = ber.getSequence(ber_1.APPLICATION(4));
|
416
|
+
while (seq.remain > 0) {
|
417
|
+
const nodeSeq = seq.getSequence(ber_1.CONTEXT(0));
|
418
|
+
const child = TreeNode.decode(nodeSeq);
|
419
|
+
if (child == null) {
|
420
|
+
throw new errors_1.InvalidEmberNodeError(this.getPath(), `decoded child is null. Hex: ${nodeSeq.buffer.toString('hex')}`);
|
421
|
+
}
|
422
|
+
if (child instanceof invocation_result_1.InvocationResult) {
|
423
|
+
throw new errors_1.InvalidEmberNodeError('', 'Unexpected InvocationResult child');
|
424
|
+
}
|
425
|
+
this.addChild(child);
|
426
|
+
}
|
427
|
+
}
|
428
|
+
encodeChildren(ber) {
|
429
|
+
const children = this.getChildren();
|
430
|
+
if (children != null) {
|
431
|
+
ber.startSequence(ber_1.CONTEXT(2));
|
432
|
+
ber.startSequence(ber_1.APPLICATION(4));
|
433
|
+
for (let i = 0; i < children.length; i++) {
|
434
|
+
ber.startSequence(ber_1.CONTEXT(0));
|
435
|
+
children[i].encode(ber);
|
436
|
+
ber.endSequence();
|
437
|
+
}
|
438
|
+
ber.endSequence();
|
439
|
+
ber.endSequence();
|
440
|
+
}
|
441
|
+
}
|
442
|
+
setContent(key, value) {
|
443
|
+
if (this._contents != null) {
|
444
|
+
this._contents[key] = value;
|
445
|
+
}
|
446
|
+
else {
|
447
|
+
throw new errors_1.InvalidEmberNodeError(this.getPath(), 'No contents defined');
|
448
|
+
}
|
449
|
+
}
|
450
|
+
setPath(path) {
|
451
|
+
this._path = path;
|
452
|
+
}
|
453
|
+
setNumber(number) {
|
454
|
+
this._number = number;
|
455
|
+
}
|
456
|
+
setContents(contents) {
|
457
|
+
this._contents = contents;
|
458
|
+
}
|
459
|
+
}
|
460
|
+
exports.TreeNode = TreeNode;
|
461
|
+
//# sourceMappingURL=tree-node.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"tree-node.js","sourceRoot":"","sources":["../../src/common/tree-node.ts"],"names":[],"mappings":";;AAAA,2CAA2F;AAC3F,gCAAsH;AACtH,uCAAoC;AACpC,2DAAuD;AAMvD,4CAA6G;AAC7G,6CAA0C;AAE1C,iDAA6C;AAI7C,MAAa,QAAS,SAAQ,0BAAW;IAwCrC;QACI,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,I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C;aACrB;YACD,GAAG,CAAC,WAAW,EAAE,CAAC;YAClB,GAAG,CAAC,WAAW,EAAE,CAAC;SACrB;IACL,CAAC;IAES,UAAU,CAAC,GAAW,EAAE,KAAU;QACxC,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,EAAE;YACvB,IAAI,CAAC,SAAoC,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SAC3D;aAAM;YACH,MAAM,IAAI,8BAAqB,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,qBAAqB,CAAC,CAAC;SAC1E;IACL,CAAC;IACS,OAAO,CAAC,IAAY;QAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,CAAC;IACS,SAAS,CAAC,MAAc;QAC9B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC;IAC1B,CAAC;IAES,WAAW,CAAC,QAA8E;QAChG,IAAI,CAAC,SAAS,GAAG,QAAQ,CAAC;IAC9B,CAAC;CACJ;AAlgBD,4BAkgBC"}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
export declare class UnimplementedEmberTypeError extends Error {
|
2
|
+
constructor(tag?: number);
|
3
|
+
}
|
4
|
+
export declare class S101SocketError extends Error {
|
5
|
+
constructor(message: string);
|
6
|
+
}
|
7
|
+
export declare class ASN1Error extends Error {
|
8
|
+
constructor(message: string);
|
9
|
+
}
|
10
|
+
export declare class InvalidEmberResponseError extends Error {
|
11
|
+
constructor(req: string);
|
12
|
+
}
|
13
|
+
export declare class EmberTimeoutError extends Error {
|
14
|
+
constructor(message: string);
|
15
|
+
}
|
16
|
+
export declare class InvalidCommandError extends Error {
|
17
|
+
constructor(number: number);
|
18
|
+
}
|
19
|
+
export declare class MissingElementNumberError extends Error {
|
20
|
+
constructor();
|
21
|
+
}
|
22
|
+
export declare class MissingElementContentsError extends Error {
|
23
|
+
constructor(path: string);
|
24
|
+
}
|
25
|
+
export declare class UnknownElementError extends Error {
|
26
|
+
constructor(path: string);
|
27
|
+
}
|
28
|
+
export declare class InvalidRequestError extends Error {
|
29
|
+
constructor();
|
30
|
+
}
|
31
|
+
export declare class InvalidRequestFormatError extends Error {
|
32
|
+
constructor(path: string);
|
33
|
+
}
|
34
|
+
export declare class InvalidEmberNodeError extends Error {
|
35
|
+
constructor(path?: string, info?: string);
|
36
|
+
}
|
37
|
+
export declare class PathDiscoveryFailureError extends Error {
|
38
|
+
constructor(path: string);
|
39
|
+
static getMessage(path: string): string;
|
40
|
+
setPath(path: string): void;
|
41
|
+
}
|
42
|
+
export declare class InvalidBERFormatError extends Error {
|
43
|
+
constructor(info?: string);
|
44
|
+
}
|
45
|
+
export declare class InvalidMatrixSignalError extends Error {
|
46
|
+
constructor(value: number, info: string);
|
47
|
+
}
|
48
|
+
export declare class ErrorMultipleError extends Error {
|
49
|
+
errors: Error[];
|
50
|
+
constructor(errors: Error[]);
|
51
|
+
}
|
52
|
+
export declare class InvalidFunctionCallError extends Error {
|
53
|
+
constructor(msg: string);
|
54
|
+
}
|
55
|
+
export declare class UnsupportedValueError extends Error {
|
56
|
+
constructor(value: any);
|
57
|
+
}
|