@zwave-js/nvmedit 15.21.0 → 15.22.0
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/build/cjs/lib/nvm3/files/ApplicationCCsFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ApplicationCCsFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ApplicationDataFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ApplicationDataFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ApplicationNameFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ApplicationNameFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ApplicationRFConfigFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ApplicationTypeFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ControllerInfoFile.js +3 -42
- package/build/cjs/lib/nvm3/files/ControllerInfoFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/NodeInfoFiles.js +7 -46
- package/build/cjs/lib/nvm3/files/NodeInfoFiles.js.map +1 -1
- package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js +19 -58
- package/build/cjs/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +1 -1
- package/build/cjs/lib/nvm3/files/RouteCacheFiles.js +5 -44
- package/build/cjs/lib/nvm3/files/RouteCacheFiles.js.map +1 -1
- package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js +5 -44
- package/build/cjs/lib/nvm3/files/SUCUpdateEntriesFile.js.map +1 -1
- package/build/cjs/lib/nvm3/files/VersionFiles.js +7 -46
- package/build/cjs/lib/nvm3/files/VersionFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationCCsFile.js +1 -34
- package/build/esm/lib/nvm3/files/ApplicationCCsFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationDataFile.js +1 -34
- package/build/esm/lib/nvm3/files/ApplicationDataFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationNameFile.js +1 -34
- package/build/esm/lib/nvm3/files/ApplicationNameFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js +1 -34
- package/build/esm/lib/nvm3/files/ApplicationRFConfigFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ApplicationTypeFile.js +1 -34
- package/build/esm/lib/nvm3/files/ApplicationTypeFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/ControllerInfoFile.js +1 -34
- package/build/esm/lib/nvm3/files/ControllerInfoFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/NodeInfoFiles.js +1 -34
- package/build/esm/lib/nvm3/files/NodeInfoFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js +1 -34
- package/build/esm/lib/nvm3/files/ProtocolNodeMaskFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/RouteCacheFiles.js +1 -34
- package/build/esm/lib/nvm3/files/RouteCacheFiles.js.map +1 -1
- package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js +1 -34
- package/build/esm/lib/nvm3/files/SUCUpdateEntriesFile.js.map +1 -1
- package/build/esm/lib/nvm3/files/VersionFiles.js +1 -34
- package/build/esm/lib/nvm3/files/VersionFiles.js.map +1 -1
- package/package.json +6 -5
|
@@ -23,49 +23,10 @@ __export(ApplicationCCsFile_exports, {
|
|
|
23
23
|
ApplicationCCsFileID: () => ApplicationCCsFileID
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ApplicationCCsFile_exports);
|
|
26
|
+
var import_tslib = require("tslib");
|
|
26
27
|
var import_core = require("@zwave-js/core");
|
|
27
28
|
var import_shared = require("@zwave-js/shared");
|
|
28
29
|
var import_NVMFile = require("./NVMFile.js");
|
|
29
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
30
|
-
function accept(f) {
|
|
31
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
32
|
-
return f;
|
|
33
|
-
}
|
|
34
|
-
__name(accept, "accept");
|
|
35
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
36
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
37
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
38
|
-
var _, done = false;
|
|
39
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
40
|
-
var context = {};
|
|
41
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
42
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
43
|
-
context.addInitializer = function(f) {
|
|
44
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
45
|
-
extraInitializers.push(accept(f || null));
|
|
46
|
-
};
|
|
47
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
48
|
-
if (kind === "accessor") {
|
|
49
|
-
if (result === void 0) continue;
|
|
50
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
51
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
52
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
53
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
54
|
-
} else if (_ = accept(result)) {
|
|
55
|
-
if (kind === "field") initializers.unshift(_);
|
|
56
|
-
else descriptor[key] = _;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
60
|
-
done = true;
|
|
61
|
-
};
|
|
62
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
63
|
-
var useValue = arguments.length > 2;
|
|
64
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
65
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
66
|
-
}
|
|
67
|
-
return useValue ? value : void 0;
|
|
68
|
-
};
|
|
69
30
|
const MAX_CCs = 35;
|
|
70
31
|
const ApplicationCCsFileID = 103;
|
|
71
32
|
let ApplicationCCsFile = (() => {
|
|
@@ -83,10 +44,10 @@ let ApplicationCCsFile = (() => {
|
|
|
83
44
|
}
|
|
84
45
|
static {
|
|
85
46
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
86
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
47
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
87
48
|
ApplicationCCsFile2 = _classThis = _classDescriptor.value;
|
|
88
49
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
89
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
50
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
90
51
|
}
|
|
91
52
|
constructor(options) {
|
|
92
53
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ApplicationCCsFile.ts"],
|
|
4
4
|
"sourcesContent": ["import { CommandClasses } from \"@zwave-js/core\";\nimport { Bytes } from \"@zwave-js/shared\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport interface ApplicationCCsFileOptions extends NVMFileCreationOptions {\n\tincludedInsecurely: CommandClasses[];\n\tincludedSecurelyInsecureCCs: CommandClasses[];\n\tincludedSecurelySecureCCs: CommandClasses[];\n}\n\nconst MAX_CCs = 35;\n\nexport const ApplicationCCsFileID = 103;\n\n@nvmFileID(ApplicationCCsFileID)\n@nvmSection(\"application\")\nexport class ApplicationCCsFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ApplicationCCsFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tlet offset = 0;\n\t\t\tlet numCCs = this.payload[offset];\n\t\t\tthis.includedInsecurely = [\n\t\t\t\t...this.payload.subarray(offset + 1, offset + 1 + numCCs),\n\t\t\t];\n\t\t\toffset += 1 + MAX_CCs;\n\n\t\t\tnumCCs = this.payload[offset];\n\t\t\tthis.includedSecurelyInsecureCCs = [\n\t\t\t\t...this.payload.subarray(offset + 1, offset + 1 + numCCs),\n\t\t\t];\n\t\t\toffset += 1 + MAX_CCs;\n\t\t\tnumCCs = this.payload[offset];\n\t\t\tthis.includedSecurelySecureCCs = [\n\t\t\t\t...this.payload.subarray(offset + 1, offset + 1 + numCCs),\n\t\t\t];\n\t\t} else {\n\t\t\tthis.includedInsecurely = options.includedInsecurely;\n\t\t\tthis.includedSecurelyInsecureCCs =\n\t\t\t\toptions.includedSecurelyInsecureCCs;\n\t\t\tthis.includedSecurelySecureCCs = options.includedSecurelySecureCCs;\n\t\t}\n\t}\n\n\tpublic includedInsecurely: CommandClasses[];\n\tpublic includedSecurelyInsecureCCs: CommandClasses[];\n\tpublic includedSecurelySecureCCs: CommandClasses[];\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\tthis.payload = new Bytes((1 + MAX_CCs) * 3);\n\t\tlet offset = 0;\n\t\tfor (\n\t\t\tconst array of [\n\t\t\t\tthis.includedInsecurely,\n\t\t\t\tthis.includedSecurelyInsecureCCs,\n\t\t\t\tthis.includedSecurelySecureCCs,\n\t\t\t]\n\t\t) {\n\t\t\tthis.payload[offset] = array.length;\n\t\t\tthis.payload.set(array, offset + 1);\n\t\t\toffset += 1 + MAX_CCs;\n\t\t}\n\t\treturn super.serialize();\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\t\"included insecurely\": this.includedInsecurely\n\t\t\t\t.map((cc) => CommandClasses[cc])\n\t\t\t\t.join(\", \"),\n\t\t\t\"included securely (insecure)\": this.includedSecurelyInsecureCCs\n\t\t\t\t.map((cc) => CommandClasses[cc])\n\t\t\t\t.join(\", \"),\n\t\t\t\"included securely (secure)\": this.includedSecurelySecureCCs\n\t\t\t\t.map((cc) => CommandClasses[cc])\n\t\t\t\t.join(\", \"),\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAA+B;AAC/B,oBAAsB;AAEtB,qBAOO;AAQP,MAAM,UAAU;AAET,MAAM,uBAAuB;IAIvB,sBAAkB,MAAA;8BAF9B,0BAAU,oBAAoB,OAC9B,2BAAW,aAAa,CAAC;;;;oBACc;0CAAA,YAAO;WAAA;;;;;;;;AAA/C,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACZ,YACC,SAAkE;AAElE,YAAM,OAAO;AACb,cAAI,0CAA0B,OAAO,GAAG;AACvC,YAAI,SAAS;AACb,YAAI,SAAS,KAAK,QAAQ,MAAM;AAChC,aAAK,qBAAqB;UACzB,GAAG,KAAK,QAAQ,SAAS,SAAS,GAAG,SAAS,IAAI,MAAM;;AAEzD,kBAAU,IAAI;AAEd,iBAAS,KAAK,QAAQ,MAAM;AAC5B,aAAK,8BAA8B;UAClC,GAAG,KAAK,QAAQ,SAAS,SAAS,GAAG,SAAS,IAAI,MAAM;;AAEzD,kBAAU,IAAI;AACd,iBAAS,KAAK,QAAQ,MAAM;AAC5B,aAAK,4BAA4B;UAChC,GAAG,KAAK,QAAQ,SAAS,SAAS,GAAG,SAAS,IAAI,MAAM;;MAE1D,OAAO;AACN,aAAK,qBAAqB,QAAQ;AAClC,aAAK,8BACJ,QAAQ;AACT,aAAK,4BAA4B,QAAQ;MAC1C;IACD;IAEO;IACA;IACA;IAEA,YAAS;AACf,WAAK,UAAU,IAAI,qBAAO,IAAI,WAAW,CAAC;AAC1C,UAAI,SAAS;AACb,iBACO,SAAS;QACd,KAAK;QACL,KAAK;QACL,KAAK;SAEL;AACD,aAAK,QAAQ,MAAM,IAAI,MAAM;AAC7B,aAAK,QAAQ,IAAI,OAAO,SAAS,CAAC;AAClC,kBAAU,IAAI;MACf;AACA,aAAO,MAAM,UAAS;IACvB;;IAGO,SAAM;AACZ,aAAO;QACN,GAAG,MAAM,OAAM;QACf,uBAAuB,KAAK,mBAC1B,IAAI,CAAC,OAAO,2BAAe,EAAE,CAAC,EAC9B,KAAK,IAAI;QACX,gCAAgC,KAAK,4BACnC,IAAI,CAAC,OAAO,2BAAe,EAAE,CAAC,EAC9B,KAAK,IAAI;QACX,8BAA8B,KAAK,0BACjC,IAAI,CAAC,OAAO,2BAAe,EAAE,CAAC,EAC9B,KAAK,IAAI;;IAEb;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,47 +23,8 @@ __export(ApplicationDataFile_exports, {
|
|
|
23
23
|
ApplicationDataFileID: () => ApplicationDataFileID
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ApplicationDataFile_exports);
|
|
26
|
+
var import_tslib = require("tslib");
|
|
26
27
|
var import_NVMFile = require("./NVMFile.js");
|
|
27
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
28
|
-
function accept(f) {
|
|
29
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
30
|
-
return f;
|
|
31
|
-
}
|
|
32
|
-
__name(accept, "accept");
|
|
33
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
34
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
35
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
36
|
-
var _, done = false;
|
|
37
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
38
|
-
var context = {};
|
|
39
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
40
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
41
|
-
context.addInitializer = function(f) {
|
|
42
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
43
|
-
extraInitializers.push(accept(f || null));
|
|
44
|
-
};
|
|
45
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
46
|
-
if (kind === "accessor") {
|
|
47
|
-
if (result === void 0) continue;
|
|
48
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
49
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
50
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
51
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
52
|
-
} else if (_ = accept(result)) {
|
|
53
|
-
if (kind === "field") initializers.unshift(_);
|
|
54
|
-
else descriptor[key] = _;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
58
|
-
done = true;
|
|
59
|
-
};
|
|
60
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
61
|
-
var useValue = arguments.length > 2;
|
|
62
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
63
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
64
|
-
}
|
|
65
|
-
return useValue ? value : void 0;
|
|
66
|
-
};
|
|
67
28
|
const ApplicationDataFileID = 200;
|
|
68
29
|
let ApplicationDataFile = (() => {
|
|
69
30
|
let _classDecorators = [(0, import_NVMFile.nvmFileID)(ApplicationDataFileID), (0, import_NVMFile.nvmSection)("application")];
|
|
@@ -80,10 +41,10 @@ let ApplicationDataFile = (() => {
|
|
|
80
41
|
}
|
|
81
42
|
static {
|
|
82
43
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
83
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
44
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
84
45
|
ApplicationDataFile2 = _classThis = _classDescriptor.value;
|
|
85
46
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
86
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
47
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
87
48
|
}
|
|
88
49
|
constructor(options) {
|
|
89
50
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ApplicationDataFile.ts"],
|
|
4
4
|
"sourcesContent": ["import type { Bytes } from \"@zwave-js/shared\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport interface ApplicationDataFileOptions extends NVMFileCreationOptions {\n\tapplicationData: Bytes;\n}\n\nexport const ApplicationDataFileID = 200;\n\n@nvmFileID(ApplicationDataFileID)\n@nvmSection(\"application\")\nexport class ApplicationDataFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ApplicationDataFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (!gotDeserializationOptions(options)) {\n\t\t\tthis.payload = options.applicationData;\n\t\t}\n\t}\n\n\t// Just binary data\n\tpublic get applicationData(): Bytes {\n\t\treturn this.payload;\n\t}\n\tpublic set applicationData(value: Bytes) {\n\t\tthis.payload = value;\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AACA,qBAOO;AAMA,MAAM,wBAAwB;IAIxB,uBAAmB,MAAA;8BAF/B,0BAAU,qBAAqB,OAC/B,2BAAW,aAAa,CAAC;;;;oBACe;2CAAA,YAAO;WAAA;;;;;;;;AAAhD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACZ,YACC,SAAmE;AAEnE,YAAM,OAAO;AACb,UAAI,KAAC,0CAA0B,OAAO,GAAG;AACxC,aAAK,UAAU,QAAQ;MACxB;IACD;;IAGA,IAAW,kBAAe;AACzB,aAAO,KAAK;IACb;IACA,IAAW,gBAAgB,OAAY;AACtC,WAAK,UAAU;IAChB;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,48 +23,9 @@ __export(ApplicationNameFile_exports, {
|
|
|
23
23
|
ApplicationNameFileID: () => ApplicationNameFileID
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ApplicationNameFile_exports);
|
|
26
|
+
var import_tslib = require("tslib");
|
|
26
27
|
var import_shared = require("@zwave-js/shared");
|
|
27
28
|
var import_NVMFile = require("./NVMFile.js");
|
|
28
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
29
|
-
function accept(f) {
|
|
30
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
31
|
-
return f;
|
|
32
|
-
}
|
|
33
|
-
__name(accept, "accept");
|
|
34
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
35
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
36
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
37
|
-
var _, done = false;
|
|
38
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
39
|
-
var context = {};
|
|
40
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
41
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
42
|
-
context.addInitializer = function(f) {
|
|
43
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
44
|
-
extraInitializers.push(accept(f || null));
|
|
45
|
-
};
|
|
46
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
47
|
-
if (kind === "accessor") {
|
|
48
|
-
if (result === void 0) continue;
|
|
49
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
50
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
51
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
52
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
53
|
-
} else if (_ = accept(result)) {
|
|
54
|
-
if (kind === "field") initializers.unshift(_);
|
|
55
|
-
else descriptor[key] = _;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
59
|
-
done = true;
|
|
60
|
-
};
|
|
61
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
62
|
-
var useValue = arguments.length > 2;
|
|
63
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
64
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
65
|
-
}
|
|
66
|
-
return useValue ? value : void 0;
|
|
67
|
-
};
|
|
68
29
|
const ApplicationNameFileID = 266252;
|
|
69
30
|
let ApplicationNameFile = (() => {
|
|
70
31
|
let _classDecorators = [(0, import_NVMFile.nvmFileID)(ApplicationNameFileID), (0, import_NVMFile.nvmSection)("application")];
|
|
@@ -81,10 +42,10 @@ let ApplicationNameFile = (() => {
|
|
|
81
42
|
}
|
|
82
43
|
static {
|
|
83
44
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
84
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
45
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
85
46
|
ApplicationNameFile2 = _classThis = _classDescriptor.value;
|
|
86
47
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
87
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
48
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
88
49
|
}
|
|
89
50
|
constructor(options) {
|
|
90
51
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ApplicationNameFile.ts"],
|
|
4
4
|
"sourcesContent": ["import { Bytes, cpp2js } from \"@zwave-js/shared\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport interface ApplicationNameFileOptions extends NVMFileCreationOptions {\n\tname: string;\n}\n\nexport const ApplicationNameFileID = 0x4100c;\n\n@nvmFileID(ApplicationNameFileID)\n@nvmSection(\"application\")\nexport class ApplicationNameFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ApplicationNameFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.name = cpp2js(this.payload.toString(\"utf8\"));\n\t\t} else {\n\t\t\tthis.name = options.name;\n\t\t}\n\t}\n\n\tpublic name: string;\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\t// Return a zero-terminated string with a fixed length of 30 bytes\n\t\tconst nameAsString = Bytes.from(this.name, \"utf8\");\n\t\tthis.payload = new Bytes(30).fill(0);\n\t\tthis.payload.set(nameAsString.subarray(0, this.payload.length), 0);\n\t\treturn super.serialize();\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAA8B;AAE9B,qBAOO;AAMA,MAAM,wBAAwB;IAIxB,uBAAmB,MAAA;8BAF/B,0BAAU,qBAAqB,OAC/B,2BAAW,aAAa,CAAC;;;;oBACe;2CAAA,YAAO;WAAA;;;;;;;;AAAhD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACZ,YACC,SAAmE;AAEnE,YAAM,OAAO;AACb,cAAI,0CAA0B,OAAO,GAAG;AACvC,aAAK,WAAO,sBAAO,KAAK,QAAQ,SAAS,MAAM,CAAC;MACjD,OAAO;AACN,aAAK,OAAO,QAAQ;MACrB;IACD;IAEO;IAEA,YAAS;AAEf,YAAM,eAAe,oBAAM,KAAK,KAAK,MAAM,MAAM;AACjD,WAAK,UAAU,IAAI,oBAAM,EAAE,EAAE,KAAK,CAAC;AACnC,WAAK,QAAQ,IAAI,aAAa,SAAS,GAAG,KAAK,QAAQ,MAAM,GAAG,CAAC;AACjE,aAAO,MAAM,UAAS;IACvB;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -33,51 +33,12 @@ __export(ApplicationRFConfigFile_exports, {
|
|
|
33
33
|
ApplicationRFConfigFileID: () => ApplicationRFConfigFileID
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(ApplicationRFConfigFile_exports);
|
|
36
|
+
var import_tslib = require("tslib");
|
|
36
37
|
var import_core = require("@zwave-js/core");
|
|
37
38
|
var import_shared = require("@zwave-js/shared");
|
|
38
39
|
var import_gte = __toESM(require("semver/functions/gte.js"), 1);
|
|
39
40
|
var import_lt = __toESM(require("semver/functions/lt.js"), 1);
|
|
40
41
|
var import_NVMFile = require("./NVMFile.js");
|
|
41
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
42
|
-
function accept(f) {
|
|
43
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
44
|
-
return f;
|
|
45
|
-
}
|
|
46
|
-
__name(accept, "accept");
|
|
47
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
48
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
49
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
50
|
-
var _, done = false;
|
|
51
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
52
|
-
var context = {};
|
|
53
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
54
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
55
|
-
context.addInitializer = function(f) {
|
|
56
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
57
|
-
extraInitializers.push(accept(f || null));
|
|
58
|
-
};
|
|
59
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
60
|
-
if (kind === "accessor") {
|
|
61
|
-
if (result === void 0) continue;
|
|
62
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
63
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
64
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
65
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
66
|
-
} else if (_ = accept(result)) {
|
|
67
|
-
if (kind === "field") initializers.unshift(_);
|
|
68
|
-
else descriptor[key] = _;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
72
|
-
done = true;
|
|
73
|
-
};
|
|
74
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
75
|
-
var useValue = arguments.length > 2;
|
|
76
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
77
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
78
|
-
}
|
|
79
|
-
return useValue ? value : void 0;
|
|
80
|
-
};
|
|
81
42
|
const ApplicationRFConfigFileID = 104;
|
|
82
43
|
let ApplicationRFConfigFile = (() => {
|
|
83
44
|
let _classDecorators = [(0, import_NVMFile.nvmFileID)(ApplicationRFConfigFileID), (0, import_NVMFile.nvmSection)("application")];
|
|
@@ -94,10 +55,10 @@ let ApplicationRFConfigFile = (() => {
|
|
|
94
55
|
}
|
|
95
56
|
static {
|
|
96
57
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
97
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
58
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
98
59
|
ApplicationRFConfigFile2 = _classThis = _classDescriptor.value;
|
|
99
60
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
100
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
61
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
101
62
|
}
|
|
102
63
|
constructor(options) {
|
|
103
64
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ApplicationRFConfigFile.ts"],
|
|
4
4
|
"sourcesContent": ["import {\n\tNodeIDType,\n\tRFRegion,\n\tZWaveError,\n\tZWaveErrorCodes,\n} from \"@zwave-js/core\";\nimport { type AllOrNone, Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport semverGte from \"semver/functions/gte.js\";\nimport semverLt from \"semver/functions/lt.js\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport type ApplicationRFConfigFileOptions =\n\t& NVMFileCreationOptions\n\t& {\n\t\trfRegion: RFRegion;\n\t\ttxPower: number;\n\t\tmeasured0dBm: number;\n\t}\n\t& AllOrNone<{\n\t\tenablePTI?: number;\n\t\tmaxTXPower?: number;\n\t}>\n\t& {\n\t\tnodeIdType?: number;\n\t};\n\nexport const ApplicationRFConfigFileID = 104;\n\n@nvmFileID(ApplicationRFConfigFileID)\n@nvmSection(\"application\")\nexport class ApplicationRFConfigFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ApplicationRFConfigFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tif (this.payload.length === 3 || this.payload.length === 6) {\n\t\t\t\tthis.rfRegion = this.payload[0];\n\t\t\t\tthis.txPower = this.payload.readInt8(1) / 10;\n\t\t\t\tthis.measured0dBm = this.payload.readInt8(2) / 10;\n\t\t\t\tif (this.payload.length === 6) {\n\t\t\t\t\tthis.enablePTI = this.payload[3];\n\t\t\t\t\tthis.maxTXPower = this.payload.readInt16LE(4) / 10;\n\t\t\t\t}\n\t\t\t} else if (this.payload.length === 8) {\n\t\t\t\tthis.rfRegion = this.payload[0];\n\t\t\t\tthis.txPower = this.payload.readInt16LE(1) / 10;\n\t\t\t\tthis.measured0dBm = this.payload.readInt16LE(3) / 10;\n\t\t\t\tthis.enablePTI = this.payload[5];\n\t\t\t\tthis.maxTXPower = this.payload.readInt16LE(6) / 10;\n\t\t\t} else if (this.payload.length === 9) {\n\t\t\t\tthis.rfRegion = this.payload[0];\n\t\t\t\tthis.txPower = this.payload.readInt16LE(1) / 10;\n\t\t\t\tthis.measured0dBm = this.payload.readInt16LE(3) / 10;\n\t\t\t\tthis.enablePTI = this.payload[5];\n\t\t\t\tthis.maxTXPower = this.payload.readInt16LE(6) / 10;\n\t\t\t\tthis.nodeIdType = this.payload[8];\n\t\t\t} else {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`ApplicationRFConfigFile has unsupported length ${this.payload.length}`,\n\t\t\t\t\tZWaveErrorCodes.NVM_NotSupported,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.rfRegion = options.rfRegion;\n\t\t\tthis.txPower = options.txPower;\n\t\t\tthis.measured0dBm = options.measured0dBm;\n\t\t\tthis.enablePTI = options.enablePTI;\n\t\t\tthis.maxTXPower = options.maxTXPower;\n\t\t\tthis.nodeIdType = options.nodeIdType;\n\t\t}\n\t}\n\n\tpublic rfRegion: RFRegion;\n\tpublic txPower: number;\n\tpublic measured0dBm: number;\n\tpublic enablePTI?: number;\n\tpublic maxTXPower?: number;\n\tpublic nodeIdType?: NodeIDType;\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\tif (semverLt(this.fileVersion, \"7.18.1\")) {\n\t\t\tthis.payload = new Bytes(\n\t\t\t\tsemverGte(this.fileVersion, \"7.15.3\") ? 6 : 3,\n\t\t\t).fill(0);\n\t\t\tthis.payload[0] = this.rfRegion;\n\t\t\tthis.payload.writeIntLE(this.txPower * 10, 1, 1);\n\t\t\tthis.payload.writeIntLE(this.measured0dBm * 10, 2, 1);\n\t\t\tif (semverGte(this.fileVersion, \"7.15.3\")) {\n\t\t\t\tthis.payload[3] = this.enablePTI ?? 0;\n\t\t\t\tthis.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 4);\n\t\t\t}\n\t\t} else if (semverLt(this.fileVersion, \"7.21.0\")) {\n\t\t\tthis.payload = new Bytes(8).fill(0);\n\t\t\tthis.payload[0] = this.rfRegion;\n\t\t\tthis.payload.writeInt16LE(this.txPower * 10, 1);\n\t\t\tthis.payload.writeInt16LE(this.measured0dBm * 10, 3);\n\t\t\tthis.payload[5] = this.enablePTI ?? 0;\n\t\t\tthis.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 6);\n\t\t} else {\n\t\t\tthis.payload = new Bytes(9).fill(0);\n\t\t\tthis.payload[0] = this.rfRegion;\n\t\t\tthis.payload.writeInt16LE(this.txPower * 10, 1);\n\t\t\tthis.payload.writeInt16LE(this.measured0dBm * 10, 3);\n\t\t\tthis.payload[5] = this.enablePTI ?? 0;\n\t\t\tthis.payload.writeInt16LE((this.maxTXPower ?? 0) * 10, 6);\n\t\t\tthis.payload[8] = this.nodeIdType ?? NodeIDType.Short;\n\t\t}\n\t\treturn super.serialize();\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\tconst ret: Record<string, any> = {\n\t\t\t...super.toJSON(),\n\t\t\t\"RF Region\": getEnumMemberName(RFRegion, this.rfRegion),\n\t\t\t\"TX Power\": `${this.txPower.toFixed(1)} dBm`,\n\t\t\t\"Power @ 0dBm\": `${this.measured0dBm.toFixed(1)} dBm`,\n\t\t};\n\t\tif (this.enablePTI != undefined) {\n\t\t\tret[\"enable PTI\"] = this.enablePTI;\n\t\t}\n\t\tif (this.maxTXPower != undefined) {\n\t\t\tret[\"max TX power\"] = `${this.maxTXPower.toFixed(1)} dBm`;\n\t\t}\n\t\tif (this.nodeIdType != undefined) {\n\t\t\tret[\"node ID type\"] = getEnumMemberName(\n\t\t\t\tNodeIDType,\n\t\t\t\tthis.nodeIdType,\n\t\t\t);\n\t\t}\n\t\treturn ret;\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAKO;AACP,oBAAyD;AACzD,iBAAsB;AACtB,gBAAqB;AAErB,qBAOO;AAiBA,MAAM,4BAA4B;IAI5B,2BAAuB,MAAA;8BAFnC,0BAAU,yBAAyB,OACnC,2BAAW,aAAa,CAAC;;;;oBACmB;+CAAA,YAAO;WAAA;;;;;;;;AAApD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACZ,YACC,SAAuE;AAEvE,YAAM,OAAO;AACb,cAAI,0CAA0B,OAAO,GAAG;AACvC,YAAI,KAAK,QAAQ,WAAW,KAAK,KAAK,QAAQ,WAAW,GAAG;AAC3D,eAAK,WAAW,KAAK,QAAQ,CAAC;AAC9B,eAAK,UAAU,KAAK,QAAQ,SAAS,CAAC,IAAI;AAC1C,eAAK,eAAe,KAAK,QAAQ,SAAS,CAAC,IAAI;AAC/C,cAAI,KAAK,QAAQ,WAAW,GAAG;AAC9B,iBAAK,YAAY,KAAK,QAAQ,CAAC;AAC/B,iBAAK,aAAa,KAAK,QAAQ,YAAY,CAAC,IAAI;UACjD;QACD,WAAW,KAAK,QAAQ,WAAW,GAAG;AACrC,eAAK,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,aAAO;IACR;;;;",
|
|
6
6
|
"names": ["semverLt", "semverGte"]
|
|
7
7
|
}
|
|
@@ -23,48 +23,9 @@ __export(ApplicationTypeFile_exports, {
|
|
|
23
23
|
ApplicationTypeFileID: () => ApplicationTypeFileID
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ApplicationTypeFile_exports);
|
|
26
|
+
var import_tslib = require("tslib");
|
|
26
27
|
var import_shared = require("@zwave-js/shared");
|
|
27
28
|
var import_NVMFile = require("./NVMFile.js");
|
|
28
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
29
|
-
function accept(f) {
|
|
30
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
31
|
-
return f;
|
|
32
|
-
}
|
|
33
|
-
__name(accept, "accept");
|
|
34
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
35
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
36
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
37
|
-
var _, done = false;
|
|
38
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
39
|
-
var context = {};
|
|
40
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
41
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
42
|
-
context.addInitializer = function(f) {
|
|
43
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
44
|
-
extraInitializers.push(accept(f || null));
|
|
45
|
-
};
|
|
46
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
47
|
-
if (kind === "accessor") {
|
|
48
|
-
if (result === void 0) continue;
|
|
49
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
50
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
51
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
52
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
53
|
-
} else if (_ = accept(result)) {
|
|
54
|
-
if (kind === "field") initializers.unshift(_);
|
|
55
|
-
else descriptor[key] = _;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
59
|
-
done = true;
|
|
60
|
-
};
|
|
61
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
62
|
-
var useValue = arguments.length > 2;
|
|
63
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
64
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
65
|
-
}
|
|
66
|
-
return useValue ? value : void 0;
|
|
67
|
-
};
|
|
68
29
|
const ApplicationTypeFileID = 102;
|
|
69
30
|
let ApplicationTypeFile = (() => {
|
|
70
31
|
let _classDecorators = [(0, import_NVMFile.nvmFileID)(ApplicationTypeFileID), (0, import_NVMFile.nvmSection)("application")];
|
|
@@ -81,10 +42,10 @@ let ApplicationTypeFile = (() => {
|
|
|
81
42
|
}
|
|
82
43
|
static {
|
|
83
44
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
84
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
45
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
85
46
|
ApplicationTypeFile2 = _classThis = _classDescriptor.value;
|
|
86
47
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
87
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
48
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
88
49
|
}
|
|
89
50
|
constructor(options) {
|
|
90
51
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ApplicationTypeFile.ts"],
|
|
4
4
|
"sourcesContent": ["import { Bytes } from \"@zwave-js/shared\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport interface ApplicationTypeFileOptions extends NVMFileCreationOptions {\n\tisListening: boolean;\n\toptionalFunctionality: boolean;\n\tgenericDeviceClass: number;\n\tspecificDeviceClass: number;\n}\n\nexport const ApplicationTypeFileID = 102;\n\n@nvmFileID(ApplicationTypeFileID)\n@nvmSection(\"application\")\nexport class ApplicationTypeFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ApplicationTypeFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.isListening = !!(this.payload[0] & 0b1);\n\t\t\tthis.optionalFunctionality = !!(this.payload[0] & 0b10);\n\t\t\tthis.genericDeviceClass = this.payload[1];\n\t\t\tthis.specificDeviceClass = this.payload[2];\n\t\t} else {\n\t\t\tthis.isListening = options.isListening;\n\t\t\tthis.optionalFunctionality = options.optionalFunctionality;\n\t\t\tthis.genericDeviceClass = options.genericDeviceClass;\n\t\t\tthis.specificDeviceClass = options.specificDeviceClass;\n\t\t}\n\t}\n\n\tpublic isListening: boolean;\n\tpublic optionalFunctionality: boolean;\n\tpublic genericDeviceClass: number;\n\tpublic specificDeviceClass: number;\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\tthis.payload = Bytes.from([\n\t\t\t(this.isListening ? 0b1 : 0)\n\t\t\t| (this.optionalFunctionality ? 0b10 : 0),\n\t\t\tthis.genericDeviceClass,\n\t\t\tthis.specificDeviceClass,\n\t\t]);\n\t\treturn super.serialize();\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn {\n\t\t\t...super.toJSON(),\n\t\t\tlistening: this.isListening,\n\t\t\t\"opt. functionality\": this.optionalFunctionality,\n\t\t\tgenericDeviceClass: this.genericDeviceClass,\n\t\t\tspecificDeviceClass: this.specificDeviceClass,\n\t\t};\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oBAAsB;AAEtB,qBAOO;AASA,MAAM,wBAAwB;IAIxB,uBAAmB,MAAA;8BAF/B,0BAAU,qBAAqB,OAC/B,2BAAW,aAAa,CAAC;;;;oBACe;2CAAA,YAAO;WAAA;;;;;;;;AAAhD,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACZ,YACC,SAAmE;AAEnE,YAAM,OAAO;AACb,cAAI,0CAA0B,OAAO,GAAG;AACvC,aAAK,cAAc,CAAC,EAAE,KAAK,QAAQ,CAAC,IAAI;AACxC,aAAK,wBAAwB,CAAC,EAAE,KAAK,QAAQ,CAAC,IAAI;AAClD,aAAK,qBAAqB,KAAK,QAAQ,CAAC;AACxC,aAAK,sBAAsB,KAAK,QAAQ,CAAC;MAC1C,OAAO;AACN,aAAK,cAAc,QAAQ;AAC3B,aAAK,wBAAwB,QAAQ;AACrC,aAAK,qBAAqB,QAAQ;AAClC,aAAK,sBAAsB,QAAQ;MACpC;IACD;IAEO;IACA;IACA;IACA;IAEA,YAAS;AACf,WAAK,UAAU,oBAAM,KAAK;SACxB,KAAK,cAAc,IAAM,MACvB,KAAK,wBAAwB,IAAO;QACvC,KAAK;QACL,KAAK;OACL;AACD,aAAO,MAAM,UAAS;IACvB;;IAGO,SAAM;AACZ,aAAO;QACN,GAAG,MAAM,OAAM;QACf,WAAW,KAAK;QAChB,sBAAsB,KAAK;QAC3B,oBAAoB,KAAK;QACzB,qBAAqB,KAAK;;IAE5B;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -23,49 +23,10 @@ __export(ControllerInfoFile_exports, {
|
|
|
23
23
|
ControllerInfoFileID: () => ControllerInfoFileID
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(ControllerInfoFile_exports);
|
|
26
|
+
var import_tslib = require("tslib");
|
|
26
27
|
var import_core = require("@zwave-js/core");
|
|
27
28
|
var import_shared = require("@zwave-js/shared");
|
|
28
29
|
var import_NVMFile = require("./NVMFile.js");
|
|
29
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
30
|
-
function accept(f) {
|
|
31
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
32
|
-
return f;
|
|
33
|
-
}
|
|
34
|
-
__name(accept, "accept");
|
|
35
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
36
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
37
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
38
|
-
var _, done = false;
|
|
39
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
40
|
-
var context = {};
|
|
41
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
42
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
43
|
-
context.addInitializer = function(f) {
|
|
44
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
45
|
-
extraInitializers.push(accept(f || null));
|
|
46
|
-
};
|
|
47
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
48
|
-
if (kind === "accessor") {
|
|
49
|
-
if (result === void 0) continue;
|
|
50
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
51
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
52
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
53
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
54
|
-
} else if (_ = accept(result)) {
|
|
55
|
-
if (kind === "field") initializers.unshift(_);
|
|
56
|
-
else descriptor[key] = _;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
60
|
-
done = true;
|
|
61
|
-
};
|
|
62
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
63
|
-
var useValue = arguments.length > 2;
|
|
64
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
65
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
66
|
-
}
|
|
67
|
-
return useValue ? value : void 0;
|
|
68
|
-
};
|
|
69
30
|
const ControllerInfoFileID = 327684;
|
|
70
31
|
let ControllerInfoFile = (() => {
|
|
71
32
|
let _classDecorators = [(0, import_NVMFile.nvmFileID)(ControllerInfoFileID), (0, import_NVMFile.nvmSection)("protocol")];
|
|
@@ -82,10 +43,10 @@ let ControllerInfoFile = (() => {
|
|
|
82
43
|
}
|
|
83
44
|
static {
|
|
84
45
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
85
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
46
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
86
47
|
ControllerInfoFile2 = _classThis = _classDescriptor.value;
|
|
87
48
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
88
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
49
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
89
50
|
}
|
|
90
51
|
constructor(options) {
|
|
91
52
|
super(options);
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../src/lib/nvm3/files/ControllerInfoFile.ts"],
|
|
4
4
|
"sourcesContent": ["import { ZWaveError, ZWaveErrorCodes, stripUndefined } from \"@zwave-js/core\";\nimport { Bytes, type BytesView, buffer2hex } from \"@zwave-js/shared\";\nimport type { NVM3Object } from \"../object.js\";\nimport {\n\tNVMFile,\n\ttype NVMFileCreationOptions,\n\ttype NVMFileDeserializationOptions,\n\tgotDeserializationOptions,\n\tnvmFileID,\n\tnvmSection,\n} from \"./NVMFile.js\";\n\nexport type ControllerInfoFileOptions =\n\t& NVMFileCreationOptions\n\t& {\n\t\thomeId: BytesView;\n\t\tnodeId: number;\n\t\tlastNodeId: number;\n\t\tstaticControllerNodeId: number;\n\t\tsucLastIndex: number;\n\t\tcontrollerConfiguration: number;\n\t\tmaxNodeId: number;\n\t\treservedId: number;\n\t\tsystemState: number;\n\t}\n\t& (\n\t\t| {\n\t\t\tsucAwarenessPushNeeded: number;\n\t\t}\n\t\t| {\n\t\t\tlastNodeIdLR: number;\n\t\t\tmaxNodeIdLR: number;\n\t\t\treservedIdLR: number;\n\t\t\tprimaryLongRangeChannelId: number;\n\t\t\tdcdcConfig: number;\n\t\t}\n\t);\n\nexport const ControllerInfoFileID = 0x50004;\n\n@nvmFileID(ControllerInfoFileID)\n@nvmSection(\"protocol\")\nexport class ControllerInfoFile extends NVMFile {\n\tpublic constructor(\n\t\toptions: NVMFileDeserializationOptions | ControllerInfoFileOptions,\n\t) {\n\t\tsuper(options);\n\t\tif (gotDeserializationOptions(options)) {\n\t\t\tthis.homeId = this.payload.subarray(0, 4);\n\t\t\tif (this.payload.length === 13) {\n\t\t\t\tthis.nodeId = this.payload[4];\n\t\t\t\tthis.lastNodeId = this.payload[5];\n\t\t\t\tthis.staticControllerNodeId = this.payload[6];\n\t\t\t\tthis.sucLastIndex = this.payload[7];\n\t\t\t\tthis.controllerConfiguration = this.payload[8];\n\t\t\t\tthis.sucAwarenessPushNeeded = this.payload[9];\n\t\t\t\tthis.maxNodeId = this.payload[10];\n\t\t\t\tthis.reservedId = this.payload[11];\n\t\t\t\tthis.systemState = this.payload[12];\n\t\t\t} else if (this.payload.length === 22) {\n\t\t\t\tthis.nodeId = this.payload.readUInt16LE(4);\n\t\t\t\tthis.staticControllerNodeId = this.payload.readUInt16LE(6);\n\t\t\t\tthis.lastNodeIdLR = this.payload.readUInt16LE(8);\n\t\t\t\tthis.lastNodeId = this.payload[10];\n\t\t\t\tthis.sucLastIndex = this.payload[11];\n\t\t\t\tthis.maxNodeIdLR = this.payload.readUInt16LE(12);\n\t\t\t\tthis.maxNodeId = this.payload[14];\n\t\t\t\tthis.controllerConfiguration = this.payload[15];\n\t\t\t\tthis.reservedIdLR = this.payload.readUInt16LE(16);\n\t\t\t\tthis.reservedId = this.payload[18];\n\t\t\t\tthis.systemState = this.payload[19];\n\t\t\t\tthis.primaryLongRangeChannelId = this.payload[20];\n\t\t\t\tthis.dcdcConfig = this.payload[21];\n\t\t\t} else {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Unsupported payload length`,\n\t\t\t\t\tZWaveErrorCodes.NVM_InvalidFormat,\n\t\t\t\t);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.homeId = Bytes.view(options.homeId);\n\t\t\tthis.nodeId = options.nodeId;\n\t\t\tthis.lastNodeId = options.lastNodeId;\n\t\t\tthis.staticControllerNodeId = options.staticControllerNodeId;\n\t\t\tthis.sucLastIndex = options.sucLastIndex;\n\t\t\tthis.controllerConfiguration = options.controllerConfiguration;\n\t\t\tthis.maxNodeId = options.maxNodeId;\n\t\t\tthis.reservedId = options.reservedId;\n\t\t\tthis.systemState = options.systemState;\n\t\t\tif (\"lastNodeIdLR\" in options) {\n\t\t\t\tthis.lastNodeIdLR = options.lastNodeIdLR;\n\t\t\t\tthis.maxNodeIdLR = options.maxNodeIdLR;\n\t\t\t\tthis.reservedIdLR = options.reservedIdLR;\n\t\t\t\tthis.primaryLongRangeChannelId =\n\t\t\t\t\toptions.primaryLongRangeChannelId;\n\t\t\t\tthis.dcdcConfig = options.dcdcConfig;\n\t\t\t} else {\n\t\t\t\tthis.sucAwarenessPushNeeded = options.sucAwarenessPushNeeded;\n\t\t\t}\n\t\t}\n\t}\n\n\tpublic homeId: BytesView;\n\tpublic nodeId: number;\n\tpublic lastNodeId: number;\n\tpublic staticControllerNodeId: number;\n\tpublic sucLastIndex: number;\n\tpublic controllerConfiguration: number; // TODO: Figure out what this is\n\tpublic sucAwarenessPushNeeded?: number;\n\tpublic maxNodeId: number;\n\tpublic reservedId: number;\n\tpublic systemState: number;\n\tpublic lastNodeIdLR?: number;\n\tpublic maxNodeIdLR?: number;\n\tpublic reservedIdLR?: number;\n\tpublic primaryLongRangeChannelId?: number;\n\tpublic dcdcConfig?: number;\n\n\tpublic serialize(): NVM3Object & { data: Bytes } {\n\t\tif (this.lastNodeIdLR != undefined) {\n\t\t\tthis.payload = new Bytes(22);\n\t\t\tthis.payload.set(this.homeId, 0);\n\t\t\tthis.payload.writeUInt16LE(this.nodeId, 4);\n\t\t\tthis.payload.writeUInt16LE(this.staticControllerNodeId, 6);\n\t\t\tthis.payload.writeUInt16LE(this.lastNodeIdLR, 8);\n\t\t\tthis.payload[10] = this.lastNodeId;\n\t\t\tthis.payload[11] = this.sucLastIndex;\n\t\t\tthis.payload.writeUInt16LE(this.maxNodeIdLR!, 12);\n\t\t\tthis.payload[14] = this.maxNodeId;\n\t\t\tthis.payload[15] = this.controllerConfiguration;\n\t\t\tthis.payload.writeUInt16LE(this.reservedIdLR!, 16);\n\t\t\tthis.payload[18] = this.reservedId;\n\t\t\tthis.payload[19] = this.systemState;\n\t\t\tthis.payload[20] = this.primaryLongRangeChannelId!;\n\t\t\tthis.payload[21] = this.dcdcConfig!;\n\t\t} else {\n\t\t\t// V0\n\t\t\tthis.payload = Bytes.concat([\n\t\t\t\tthis.homeId,\n\t\t\t\t[\n\t\t\t\t\tthis.nodeId,\n\t\t\t\t\tthis.lastNodeId,\n\t\t\t\t\tthis.staticControllerNodeId,\n\t\t\t\t\tthis.sucLastIndex,\n\t\t\t\t\tthis.controllerConfiguration,\n\t\t\t\t\tthis.sucAwarenessPushNeeded ?? 0,\n\t\t\t\t\tthis.maxNodeId,\n\t\t\t\t\tthis.reservedId,\n\t\t\t\t\tthis.systemState,\n\t\t\t\t],\n\t\t\t]);\n\t\t}\n\t\treturn super.serialize();\n\t}\n\n\t// oxlint-disable-next-line typescript/explicit-module-boundary-types\n\tpublic toJSON() {\n\t\treturn stripUndefined({\n\t\t\t...super.toJSON(),\n\t\t\thomeId: buffer2hex(this.homeId),\n\t\t\tnodeId: this.nodeId,\n\t\t\tlastNodeId: this.lastNodeId,\n\t\t\tstaticControllerNodeId: this.staticControllerNodeId,\n\t\t\tsucLastIndex: this.sucLastIndex,\n\t\t\tcontrollerConfiguration: this.controllerConfiguration,\n\t\t\tsucAwarenessPushNeeded: this.sucAwarenessPushNeeded,\n\t\t\tmaxNodeId: this.maxNodeId,\n\t\t\treservedId: this.reservedId,\n\t\t\tsystemState: this.systemState,\n\t\t\tlastNodeIdLR: this.lastNodeIdLR,\n\t\t\tmaxNodeIdLR: this.maxNodeIdLR,\n\t\t\treservedIdLR: this.reservedIdLR,\n\t\t\tprimaryLongRangeChannelId: this.primaryLongRangeChannelId,\n\t\t\tdcdcConfig: this.dcdcConfig,\n\t\t});\n\t}\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAA4D;AAC5D,oBAAkD;AAElD,qBAOO;AA4BA,M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AACjD,aAAK,QAAQ,EAAE,IAAI,KAAK;AACxB,aAAK,QAAQ,EAAE,IAAI,KAAK;AACxB,aAAK,QAAQ,EAAE,IAAI,KAAK;AACxB,aAAK,QAAQ,EAAE,IAAI,KAAK;MACzB,OAAO;AAEN,aAAK,UAAU,oBAAM,OAAO;UAC3B,KAAK;UACL;YACC,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK;YACL,KAAK,0BAA0B;YAC/B,KAAK;YACL,KAAK;YACL,KAAK;;SAEN;MACF;AACA,aAAO,MAAM,UAAS;IACvB;;IAGO,SAAM;AACZ,iBAAO,4BAAe;QACrB,GAAG,MAAM,OAAM;QACf,YAAQ,0BAAW,KAAK,MAAM;QAC9B,QAAQ,KAAK;QACb,YAAY,KAAK;QACjB,wBAAwB,KAAK;QAC7B,cAAc,KAAK;QACnB,yBAAyB,KAAK;QAC9B,wBAAwB,KAAK;QAC7B,WAAW,KAAK;QAChB,YAAY,KAAK;QACjB,aAAa,KAAK;QAClB,cAAc,KAAK;QACnB,aAAa,KAAK;QAClB,cAAc,KAAK;QACnB,2BAA2B,KAAK;QAChC,YAAY,KAAK;OACjB;IACF;;;;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -32,49 +32,10 @@ __export(NodeInfoFiles_exports, {
|
|
|
32
32
|
nodeIdToNodeInfoFileIDV1: () => nodeIdToNodeInfoFileIDV1
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(NodeInfoFiles_exports);
|
|
35
|
+
var import_tslib = require("tslib");
|
|
35
36
|
var import_core = require("@zwave-js/core");
|
|
36
37
|
var import_shared = require("@zwave-js/shared");
|
|
37
38
|
var import_NVMFile = require("./NVMFile.js");
|
|
38
|
-
var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
39
|
-
function accept(f) {
|
|
40
|
-
if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
|
|
41
|
-
return f;
|
|
42
|
-
}
|
|
43
|
-
__name(accept, "accept");
|
|
44
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
45
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
46
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
47
|
-
var _, done = false;
|
|
48
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
49
|
-
var context = {};
|
|
50
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
51
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
52
|
-
context.addInitializer = function(f) {
|
|
53
|
-
if (done) throw new TypeError("Cannot add initializers after decoration has completed");
|
|
54
|
-
extraInitializers.push(accept(f || null));
|
|
55
|
-
};
|
|
56
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
57
|
-
if (kind === "accessor") {
|
|
58
|
-
if (result === void 0) continue;
|
|
59
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
60
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
61
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
62
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
63
|
-
} else if (_ = accept(result)) {
|
|
64
|
-
if (kind === "field") initializers.unshift(_);
|
|
65
|
-
else descriptor[key] = _;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
69
|
-
done = true;
|
|
70
|
-
};
|
|
71
|
-
var __runInitializers = function(thisArg, initializers, value) {
|
|
72
|
-
var useValue = arguments.length > 2;
|
|
73
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
74
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
75
|
-
}
|
|
76
|
-
return useValue ? value : void 0;
|
|
77
|
-
};
|
|
78
39
|
const NODEINFOS_PER_FILE_V1 = 4;
|
|
79
40
|
const LR_NODEINFOS_PER_FILE_V5 = 50;
|
|
80
41
|
const NODEINFO_SIZE = 1 + 5 + import_core.NUM_NODEMASK_BYTES;
|
|
@@ -205,10 +166,10 @@ let NodeInfoFileV0 = (() => {
|
|
|
205
166
|
}
|
|
206
167
|
static {
|
|
207
168
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
208
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
169
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
209
170
|
NodeInfoFileV02 = _classThis = _classDescriptor.value;
|
|
210
171
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
211
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
172
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
212
173
|
}
|
|
213
174
|
constructor(options) {
|
|
214
175
|
super(options);
|
|
@@ -254,10 +215,10 @@ let NodeInfoFileV1 = (() => {
|
|
|
254
215
|
}
|
|
255
216
|
static {
|
|
256
217
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
257
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
218
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
258
219
|
NodeInfoFileV12 = _classThis = _classDescriptor.value;
|
|
259
220
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
260
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
221
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
261
222
|
}
|
|
262
223
|
constructor(options) {
|
|
263
224
|
super(options);
|
|
@@ -319,10 +280,10 @@ let LRNodeInfoFileV5 = (() => {
|
|
|
319
280
|
}
|
|
320
281
|
static {
|
|
321
282
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
|
|
322
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
283
|
+
(0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
323
284
|
LRNodeInfoFileV52 = _classThis = _classDescriptor.value;
|
|
324
285
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
325
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
286
|
+
(0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
|
|
326
287
|
}
|
|
327
288
|
constructor(options) {
|
|
328
289
|
super(options);
|