node-opcua-chunkmanager 2.97.0 → 2.98.1

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.
@@ -1,19 +1,19 @@
1
- /***
2
- * @module node-opcua-chunkmanager
3
- */
4
- import { UInt32 } from "node-opcua-basic-types";
5
- import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
- import { BaseUAObject, IStructuredTypeSchema } from "node-opcua-factory";
7
- export interface SequenceHeaderOptions {
8
- sequenceNumber?: UInt32;
9
- requestId?: UInt32;
10
- }
11
- export declare class SequenceHeader extends BaseUAObject {
12
- static possibleFields: string[];
13
- static schema: IStructuredTypeSchema;
14
- sequenceNumber: UInt32;
15
- requestId: UInt32;
16
- constructor(options?: SequenceHeaderOptions);
17
- encode(stream: OutputBinaryStream): void;
18
- decode(stream: BinaryStream): void;
19
- }
1
+ /***
2
+ * @module node-opcua-chunkmanager
3
+ */
4
+ import { UInt32 } from "node-opcua-basic-types";
5
+ import { BinaryStream, OutputBinaryStream } from "node-opcua-binary-stream";
6
+ import { BaseUAObject, IStructuredTypeSchema } from "node-opcua-factory";
7
+ export interface SequenceHeaderOptions {
8
+ sequenceNumber?: UInt32;
9
+ requestId?: UInt32;
10
+ }
11
+ export declare class SequenceHeader extends BaseUAObject {
12
+ static possibleFields: string[];
13
+ static schema: IStructuredTypeSchema;
14
+ sequenceNumber: UInt32;
15
+ requestId: UInt32;
16
+ constructor(options?: SequenceHeaderOptions);
17
+ encode(stream: OutputBinaryStream): void;
18
+ decode(stream: BinaryStream): void;
19
+ }
@@ -1,48 +1,48 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SequenceHeader = void 0;
4
- /***
5
- * @module node-opcua-chunkmanager
6
- */
7
- const node_opcua_basic_types_1 = require("node-opcua-basic-types");
8
- const node_opcua_factory_1 = require("node-opcua-factory");
9
- const schemaSequenceHeader = (0, node_opcua_factory_1.buildStructuredType)({
10
- baseType: "BaseUAObject",
11
- fields: [
12
- // A monotonically increasing sequence number assigned by the sender to each
13
- // MessageChunk sent over the ClientSecureChannelLayer.
14
- { name: "sequenceNumber", fieldType: "UInt32" },
15
- // An identifier assigned by the client to OPC UA request Message. All MessageChunks for
16
- // the request and the associated response use the same identifier.
17
- { name: "requestId", fieldType: "UInt32" }
18
- ],
19
- name: "SequenceHeader"
20
- });
21
- class SequenceHeader extends node_opcua_factory_1.BaseUAObject {
22
- constructor(options) {
23
- options = options || {};
24
- super();
25
- const schema = schemaSequenceHeader;
26
- /* istanbul ignore next */
27
- if (node_opcua_factory_1.parameters.debugSchemaHelper) {
28
- (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
29
- }
30
- this.sequenceNumber = (0, node_opcua_factory_1.initialize_field)(schema.fields[0], options.sequenceNumber);
31
- this.requestId = (0, node_opcua_factory_1.initialize_field)(schema.fields[1], options.requestId);
32
- }
33
- encode(stream) {
34
- super.encode(stream);
35
- (0, node_opcua_basic_types_1.encodeUInt32)(this.sequenceNumber, stream);
36
- (0, node_opcua_basic_types_1.encodeUInt32)(this.requestId, stream);
37
- }
38
- decode(stream) {
39
- super.decode(stream);
40
- this.sequenceNumber = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
41
- this.requestId = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
42
- }
43
- }
44
- exports.SequenceHeader = SequenceHeader;
45
- SequenceHeader.possibleFields = ["sequenceNumber", "requestId"];
46
- SequenceHeader.schema = schemaSequenceHeader;
47
- SequenceHeader.prototype.schema = SequenceHeader.schema;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SequenceHeader = void 0;
4
+ /***
5
+ * @module node-opcua-chunkmanager
6
+ */
7
+ const node_opcua_basic_types_1 = require("node-opcua-basic-types");
8
+ const node_opcua_factory_1 = require("node-opcua-factory");
9
+ const schemaSequenceHeader = (0, node_opcua_factory_1.buildStructuredType)({
10
+ baseType: "BaseUAObject",
11
+ fields: [
12
+ // A monotonically increasing sequence number assigned by the sender to each
13
+ // MessageChunk sent over the ClientSecureChannelLayer.
14
+ { name: "sequenceNumber", fieldType: "UInt32" },
15
+ // An identifier assigned by the client to OPC UA request Message. All MessageChunks for
16
+ // the request and the associated response use the same identifier.
17
+ { name: "requestId", fieldType: "UInt32" }
18
+ ],
19
+ name: "SequenceHeader"
20
+ });
21
+ class SequenceHeader extends node_opcua_factory_1.BaseUAObject {
22
+ constructor(options) {
23
+ options = options || {};
24
+ super();
25
+ const schema = schemaSequenceHeader;
26
+ /* istanbul ignore next */
27
+ if (node_opcua_factory_1.parameters.debugSchemaHelper) {
28
+ (0, node_opcua_factory_1.check_options_correctness_against_schema)(this, schema, options);
29
+ }
30
+ this.sequenceNumber = (0, node_opcua_factory_1.initialize_field)(schema.fields[0], options.sequenceNumber);
31
+ this.requestId = (0, node_opcua_factory_1.initialize_field)(schema.fields[1], options.requestId);
32
+ }
33
+ encode(stream) {
34
+ super.encode(stream);
35
+ (0, node_opcua_basic_types_1.encodeUInt32)(this.sequenceNumber, stream);
36
+ (0, node_opcua_basic_types_1.encodeUInt32)(this.requestId, stream);
37
+ }
38
+ decode(stream) {
39
+ super.decode(stream);
40
+ this.sequenceNumber = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
41
+ this.requestId = (0, node_opcua_basic_types_1.decodeUInt32)(stream);
42
+ }
43
+ }
44
+ SequenceHeader.possibleFields = ["sequenceNumber", "requestId"];
45
+ SequenceHeader.schema = schemaSequenceHeader;
46
+ exports.SequenceHeader = SequenceHeader;
47
+ SequenceHeader.prototype.schema = SequenceHeader.schema;
48
48
  //# sourceMappingURL=SequenceHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SequenceHeader.js","sourceRoot":"","sources":["../source/SequenceHeader.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAA4E;AAE5E,2DAO4B;AAE5B,MAAM,oBAAoB,GAA0B,IAAA,wCAAmB,EAAC;IACpE,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE;QACJ,4EAA4E;QAC5E,uDAAuD;QACvD,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE;QAC/C,wFAAwF;QACxF,mEAAmE;QACnE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE;KAC7C;IACD,IAAI,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAMH,MAAa,cAAe,SAAQ,iCAAY;IAM5C,YAAY,OAA+B;QACvC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,MAAM,GAAG,oBAAoB,CAAC;QACpC,0BAA0B;QAC1B,IAAI,+BAAU,CAAC,iBAAiB,EAAE;YAC9B,IAAA,6DAAwC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SACnE;QACD,IAAI,CAAC,cAAc,GAAG,IAAA,qCAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;QACjF,IAAI,CAAC,SAAS,GAAG,IAAA,qCAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,MAA0B;QACpC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,IAAA,qCAAY,EAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC1C,IAAA,qCAAY,EAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,IAAA,qCAAY,EAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAA,qCAAY,EAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;;AA5BL,wCA6BC;AA5BiB,6BAAc,GAAa,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;AAC3D,qBAAM,GAAG,oBAAoB,CAAC;AA6BhD,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC"}
1
+ {"version":3,"file":"SequenceHeader.js","sourceRoot":"","sources":["../source/SequenceHeader.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,mEAA4E;AAE5E,2DAO4B;AAE5B,MAAM,oBAAoB,GAA0B,IAAA,wCAAmB,EAAC;IACpE,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE;QACJ,4EAA4E;QAC5E,uDAAuD;QACvD,EAAE,IAAI,EAAE,gBAAgB,EAAE,SAAS,EAAE,QAAQ,EAAE;QAC/C,wFAAwF;QACxF,mEAAmE;QACnE,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE;KAC7C;IACD,IAAI,EAAE,gBAAgB;CACzB,CAAC,CAAC;AAMH,MAAa,cAAe,SAAQ,iCAAY;IAM5C,YAAY,OAA+B;QACvC,OAAO,GAAG,OAAO,IAAI,EAAE,CAAC;QACxB,KAAK,EAAE,CAAC;QACR,MAAM,MAAM,GAAG,oBAAoB,CAAC;QACpC,0BAA0B;QAC1B,IAAI,+BAAU,CAAC,iBAAiB,EAAE;YAC9B,IAAA,6DAAwC,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;SACnE;QACD,IAAI,CAAC,cAAc,GAAG,IAAA,qCAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;QACjF,IAAI,CAAC,SAAS,GAAG,IAAA,qCAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC3E,CAAC;IAEM,MAAM,CAAC,MAA0B;QACpC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,IAAA,qCAAY,EAAC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;QAC1C,IAAA,qCAAY,EAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAEM,MAAM,CAAC,MAAoB;QAC9B,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACrB,IAAI,CAAC,cAAc,GAAG,IAAA,qCAAY,EAAC,MAAM,CAAC,CAAC;QAC3C,IAAI,CAAC,SAAS,GAAG,IAAA,qCAAY,EAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;;AA3Ba,6BAAc,GAAa,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAC;AAC3D,qBAAM,GAAG,oBAAoB,CAAC;AAFnC,wCAAc;AA+B3B,cAAc,CAAC,SAAS,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC"}
@@ -1,61 +1,61 @@
1
- /// <reference types="node" />
2
- /// <reference types="node" />
3
- /***
4
- * @module node-opcua-chunkmanager
5
- */
6
- import { EventEmitter } from "events";
7
- export declare function verify_message_chunk(messageChunk: Buffer): void;
8
- export type WriteHeaderFunc = (chunk: Buffer, isLast: boolean, expectedLength: number) => void;
9
- export type WriteSequenceHeaderFunc = (chunk: Buffer) => void;
10
- export type SignBufferFunc = (buffer: Buffer) => Buffer;
11
- export type EncryptBufferFunc = (buffer: Buffer) => Buffer;
12
- export interface IChunkManagerOptions {
13
- chunkSize: number;
14
- signatureLength: number;
15
- sequenceHeaderSize: number;
16
- cipherBlockSize: number;
17
- plainBlockSize: number;
18
- signBufferFunc?: SignBufferFunc;
19
- encryptBufferFunc?: EncryptBufferFunc;
20
- writeSequenceHeaderFunc?: WriteSequenceHeaderFunc;
21
- headerSize: number;
22
- writeHeaderFunc?: WriteHeaderFunc;
23
- }
24
- export declare class ChunkManager extends EventEmitter {
25
- signBufferFunc?: SignBufferFunc;
26
- encryptBufferFunc?: EncryptBufferFunc;
27
- writeSequenceHeaderFunc?: WriteSequenceHeaderFunc;
28
- writeHeaderFunc?: WriteHeaderFunc;
29
- private readonly chunkSize;
30
- private readonly headerSize;
31
- private readonly signatureLength;
32
- private readonly sequenceHeaderSize;
33
- private readonly cipherBlockSize;
34
- private readonly plainBlockSize;
35
- private readonly maxBodySize;
36
- private readonly maxBlock?;
37
- private readonly dataOffset;
38
- private chunk;
39
- private cursor;
40
- private pendingChunk;
41
- private dataEnd;
42
- constructor(options: IChunkManagerOptions);
43
- evaluateTotalLengthAndChunks(bodySize: number): {
44
- totalLength: number;
45
- chunkCount: number;
46
- };
47
- write(buffer: Buffer, length?: number): void;
48
- end(): void;
49
- /**
50
- * compute the signature of the chunk and append it at the end
51
- * of the data block.
52
- *
53
- * @method _write_signature
54
- * @private
55
- */
56
- private _write_signature;
57
- private _encrypt;
58
- private _push_pending_chunk;
59
- private _write_padding_bytes;
60
- private _post_process_current_chunk;
61
- }
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /***
4
+ * @module node-opcua-chunkmanager
5
+ */
6
+ import { EventEmitter } from "events";
7
+ export declare function verify_message_chunk(messageChunk: Buffer): void;
8
+ export type WriteHeaderFunc = (chunk: Buffer, isLast: boolean, expectedLength: number) => void;
9
+ export type WriteSequenceHeaderFunc = (chunk: Buffer) => void;
10
+ export type SignBufferFunc = (buffer: Buffer) => Buffer;
11
+ export type EncryptBufferFunc = (buffer: Buffer) => Buffer;
12
+ export interface IChunkManagerOptions {
13
+ chunkSize: number;
14
+ signatureLength: number;
15
+ sequenceHeaderSize: number;
16
+ cipherBlockSize: number;
17
+ plainBlockSize: number;
18
+ signBufferFunc?: SignBufferFunc;
19
+ encryptBufferFunc?: EncryptBufferFunc;
20
+ writeSequenceHeaderFunc?: WriteSequenceHeaderFunc;
21
+ headerSize: number;
22
+ writeHeaderFunc?: WriteHeaderFunc;
23
+ }
24
+ export declare class ChunkManager extends EventEmitter {
25
+ signBufferFunc?: SignBufferFunc;
26
+ encryptBufferFunc?: EncryptBufferFunc;
27
+ writeSequenceHeaderFunc?: WriteSequenceHeaderFunc;
28
+ writeHeaderFunc?: WriteHeaderFunc;
29
+ private readonly chunkSize;
30
+ private readonly headerSize;
31
+ private readonly signatureLength;
32
+ private readonly sequenceHeaderSize;
33
+ private readonly cipherBlockSize;
34
+ private readonly plainBlockSize;
35
+ private readonly maxBodySize;
36
+ private readonly maxBlock?;
37
+ private readonly dataOffset;
38
+ private chunk;
39
+ private cursor;
40
+ private pendingChunk;
41
+ private dataEnd;
42
+ constructor(options: IChunkManagerOptions);
43
+ evaluateTotalLengthAndChunks(bodySize: number): {
44
+ totalLength: number;
45
+ chunkCount: number;
46
+ };
47
+ write(buffer: Buffer, length?: number): void;
48
+ end(): void;
49
+ /**
50
+ * compute the signature of the chunk and append it at the end
51
+ * of the data block.
52
+ *
53
+ * @method _write_signature
54
+ * @private
55
+ */
56
+ private _write_signature;
57
+ private _encrypt;
58
+ private _push_pending_chunk;
59
+ private _write_padding_bytes;
60
+ private _post_process_current_chunk;
61
+ }
@@ -1,222 +1,222 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ChunkManager = exports.verify_message_chunk = void 0;
4
- /***
5
- * @module node-opcua-chunkmanager
6
- */
7
- const events_1 = require("events");
8
- const node_opcua_assert_1 = require("node-opcua-assert");
9
- const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
10
- const node_opcua_buffer_utils_1 = require("node-opcua-buffer-utils");
11
- const read_message_header_1 = require("./read_message_header");
12
- function verify_message_chunk(messageChunk) {
13
- (0, node_opcua_assert_1.assert)(messageChunk);
14
- (0, node_opcua_assert_1.assert)(messageChunk instanceof Buffer);
15
- const header = (0, read_message_header_1.readMessageHeader)(new node_opcua_binary_stream_1.BinaryStream(messageChunk));
16
- if (messageChunk.length !== header.length) {
17
- throw new Error(" chunk length = " + messageChunk.length + " message length " + header.length);
18
- }
19
- }
20
- exports.verify_message_chunk = verify_message_chunk;
21
- class ChunkManager extends events_1.EventEmitter {
22
- constructor(options) {
23
- super();
24
- // { chunkSize : 32, headerSize : 10 ,signatureLength: 32 }
25
- this.chunkSize = options.chunkSize;
26
- this.headerSize = options.headerSize || 0;
27
- if (this.headerSize) {
28
- this.writeHeaderFunc = options.writeHeaderFunc;
29
- (0, node_opcua_assert_1.assert)(typeof this.writeHeaderFunc === "function");
30
- }
31
- this.sequenceHeaderSize = options.sequenceHeaderSize === undefined ? 8 : options.sequenceHeaderSize;
32
- if (this.sequenceHeaderSize > 0) {
33
- this.writeSequenceHeaderFunc = options.writeSequenceHeaderFunc;
34
- (0, node_opcua_assert_1.assert)(typeof this.writeSequenceHeaderFunc === "function");
35
- }
36
- this.signatureLength = options.signatureLength || 0;
37
- this.signBufferFunc = options.signBufferFunc;
38
- this.plainBlockSize = options.plainBlockSize || 0; // 256-14;
39
- this.cipherBlockSize = options.cipherBlockSize || 0; // 256;
40
- this.dataEnd = 0;
41
- if (this.cipherBlockSize === 0) {
42
- (0, node_opcua_assert_1.assert)(this.plainBlockSize === 0);
43
- // unencrypted block
44
- this.maxBodySize = this.chunkSize - this.headerSize - this.signatureLength - this.sequenceHeaderSize;
45
- this.encryptBufferFunc = undefined;
46
- }
47
- else {
48
- (0, node_opcua_assert_1.assert)(this.plainBlockSize !== 0);
49
- // During encryption a block with a size equal to PlainTextBlockSize is processed to produce a block
50
- // with size equal to CipherTextBlockSize. These values depend on the encryption algorithm and may
51
- // be the same.
52
- this.encryptBufferFunc = options.encryptBufferFunc;
53
- (0, node_opcua_assert_1.assert)(typeof this.encryptBufferFunc === "function", "an encryptBufferFunc is required");
54
- // this is the formula proposed by OPCUA
55
- this.maxBodySize =
56
- this.plainBlockSize *
57
- Math.floor((this.chunkSize - this.headerSize - this.signatureLength - 1) / this.cipherBlockSize) -
58
- this.sequenceHeaderSize;
59
- // this is the formula proposed by ERN
60
- this.maxBlock = Math.floor((this.chunkSize - this.headerSize) / this.cipherBlockSize);
61
- this.maxBodySize = this.plainBlockSize * this.maxBlock - this.sequenceHeaderSize - this.signatureLength - 1;
62
- if (this.plainBlockSize > 256) {
63
- this.maxBodySize -= 1;
64
- }
65
- }
66
- (0, node_opcua_assert_1.assert)(this.maxBodySize > 0); // no space left to write data
67
- // where the data starts in the block
68
- this.dataOffset = this.headerSize + this.sequenceHeaderSize;
69
- this.chunk = null;
70
- this.cursor = 0;
71
- this.pendingChunk = null;
72
- }
73
- evaluateTotalLengthAndChunks(bodySize) {
74
- const chunkCount = Math.ceil(bodySize / this.maxBodySize);
75
- const totalLength = this.chunkSize + chunkCount;
76
- return { totalLength, chunkCount };
77
- }
78
- write(buffer, length) {
79
- length = length || buffer.length;
80
- (0, node_opcua_assert_1.assert)(buffer instanceof Buffer || buffer === null);
81
- (0, node_opcua_assert_1.assert)(length > 0);
82
- let l = length;
83
- let inputCursor = 0;
84
- while (l > 0) {
85
- (0, node_opcua_assert_1.assert)(length - inputCursor !== 0);
86
- if (this.cursor === 0) {
87
- this._push_pending_chunk(false);
88
- }
89
- // space left in current chunk
90
- const spaceLeft = this.maxBodySize - this.cursor;
91
- const nbToWrite = Math.min(length - inputCursor, spaceLeft);
92
- this.chunk = this.chunk || (0, node_opcua_buffer_utils_1.createFastUninitializedBuffer)(this.chunkSize);
93
- if (buffer) {
94
- buffer.copy(this.chunk, this.cursor + this.dataOffset, inputCursor, inputCursor + nbToWrite);
95
- }
96
- inputCursor += nbToWrite;
97
- this.cursor += nbToWrite;
98
- if (this.cursor >= this.maxBodySize) {
99
- this._post_process_current_chunk();
100
- }
101
- l -= nbToWrite;
102
- }
103
- }
104
- end() {
105
- if (this.cursor > 0) {
106
- this._post_process_current_chunk();
107
- }
108
- this._push_pending_chunk(true);
109
- }
110
- /**
111
- * compute the signature of the chunk and append it at the end
112
- * of the data block.
113
- *
114
- * @method _write_signature
115
- * @private
116
- */
117
- _write_signature(chunk) {
118
- if (this.signBufferFunc) {
119
- (0, node_opcua_assert_1.assert)(typeof this.signBufferFunc === "function");
120
- (0, node_opcua_assert_1.assert)(this.signatureLength !== 0);
121
- const signatureStart = this.dataEnd;
122
- const sectionToSign = chunk.subarray(0, signatureStart);
123
- const signature = this.signBufferFunc(sectionToSign);
124
- (0, node_opcua_assert_1.assert)(signature.length === this.signatureLength);
125
- signature.copy(chunk, signatureStart);
126
- }
127
- else {
128
- (0, node_opcua_assert_1.assert)(this.signatureLength === 0, "expecting NO SIGN");
129
- }
130
- }
131
- _encrypt(chunk) {
132
- if (this.plainBlockSize > 0) {
133
- (0, node_opcua_assert_1.assert)(this.dataEnd !== undefined);
134
- const startEncryptionPos = this.headerSize;
135
- const endEncryptionPos = this.dataEnd + this.signatureLength;
136
- const areaToEncrypt = chunk.subarray(startEncryptionPos, endEncryptionPos);
137
- (0, node_opcua_assert_1.assert)(areaToEncrypt.length % this.plainBlockSize === 0); // padding should have been applied
138
- const nbBlock = areaToEncrypt.length / this.plainBlockSize;
139
- const encryptedBuffer = this.encryptBufferFunc(areaToEncrypt);
140
- (0, node_opcua_assert_1.assert)(encryptedBuffer.length % this.cipherBlockSize === 0);
141
- (0, node_opcua_assert_1.assert)(encryptedBuffer.length === nbBlock * this.cipherBlockSize);
142
- encryptedBuffer.copy(chunk, this.headerSize, 0);
143
- }
144
- }
145
- _push_pending_chunk(isLast) {
146
- if (this.pendingChunk) {
147
- const expectedLength = this.pendingChunk.length;
148
- if (this.headerSize > 0) {
149
- // Release 1.02 39 OPC Unified Architecture, Part 6:
150
- // The sequence header ensures that the first encrypted block of every Message sent over
151
- // a channel will start with different data.
152
- this.writeHeaderFunc(this.pendingChunk.subarray(0, this.headerSize), isLast, expectedLength);
153
- }
154
- if (this.sequenceHeaderSize > 0) {
155
- this.writeSequenceHeaderFunc(this.pendingChunk.subarray(this.headerSize, this.headerSize + this.sequenceHeaderSize));
156
- }
157
- this._write_signature(this.pendingChunk);
158
- this._encrypt(this.pendingChunk);
159
- /**
160
- * @event chunk
161
- * @param chunk {Buffer}
162
- * @param isLast {Boolean} , true if final chunk
163
- */
164
- this.emit("chunk", this.pendingChunk, isLast);
165
- this.pendingChunk = null;
166
- }
167
- }
168
- _write_padding_bytes(nbPaddingByteTotal) {
169
- const nbPaddingByte = nbPaddingByteTotal % 256;
170
- const extraNbPaddingByte = Math.floor(nbPaddingByteTotal / 256);
171
- (0, node_opcua_assert_1.assert)(extraNbPaddingByte === 0 || this.plainBlockSize > 256, "extraNbPaddingByte only requested when key size > 2048");
172
- // write the padding byte
173
- this.chunk.writeUInt8(nbPaddingByte, this.cursor + this.dataOffset);
174
- this.cursor += 1;
175
- for (let i = 0; i < nbPaddingByteTotal; i++) {
176
- this.chunk.writeUInt8(nbPaddingByte, this.cursor + this.dataOffset + i);
177
- }
178
- this.cursor += nbPaddingByteTotal;
179
- if (this.plainBlockSize > 256) {
180
- this.chunk.writeUInt8(extraNbPaddingByte, this.cursor + this.dataOffset);
181
- this.cursor += 1;
182
- }
183
- }
184
- _post_process_current_chunk() {
185
- let extraEncryptionBytes = 0;
186
- // add padding bytes if needed
187
- if (this.plainBlockSize > 0) {
188
- // write padding ( if encryption )
189
- // let's calculate curLength = the length of the block to encrypt without padding yet
190
- // +---------------+---------------+-------------+---------+--------------+------------+
191
- // |SequenceHeader | data | paddingByte | padding | extraPadding | signature |
192
- // +---------------+---------------+-------------+---------+--------------+------------+
193
- let curLength = this.sequenceHeaderSize + this.cursor + this.signatureLength;
194
- if (this.plainBlockSize > 256) {
195
- curLength += 2; // account for extraPadding Byte Number;
196
- }
197
- else {
198
- curLength += 1;
199
- }
200
- // let's calculate the required number of padding bytes
201
- const n = curLength % this.plainBlockSize;
202
- const nbPaddingByteTotal = (this.plainBlockSize - n) % this.plainBlockSize;
203
- this._write_padding_bytes(nbPaddingByteTotal);
204
- const adjustedLength = this.sequenceHeaderSize + this.cursor + this.signatureLength;
205
- (0, node_opcua_assert_1.assert)(adjustedLength % this.plainBlockSize === 0);
206
- const nbBlock = adjustedLength / this.plainBlockSize;
207
- extraEncryptionBytes = nbBlock * (this.cipherBlockSize - this.plainBlockSize);
208
- }
209
- this.dataEnd = this.dataOffset + this.cursor;
210
- // calculate the expected length of the chunk, once encrypted if encryption apply
211
- const expectedLength = this.dataEnd + this.signatureLength + extraEncryptionBytes;
212
- this.pendingChunk = this.chunk.subarray(0, expectedLength);
213
- // note :
214
- // - this.pending_chunk has the correct size but is not signed nor encrypted yet
215
- // as we don't know what to write in the header yet
216
- // - as a result,
217
- this.chunk = null;
218
- this.cursor = 0;
219
- }
220
- }
221
- exports.ChunkManager = ChunkManager;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChunkManager = exports.verify_message_chunk = void 0;
4
+ /***
5
+ * @module node-opcua-chunkmanager
6
+ */
7
+ const events_1 = require("events");
8
+ const node_opcua_assert_1 = require("node-opcua-assert");
9
+ const node_opcua_binary_stream_1 = require("node-opcua-binary-stream");
10
+ const node_opcua_buffer_utils_1 = require("node-opcua-buffer-utils");
11
+ const read_message_header_1 = require("./read_message_header");
12
+ function verify_message_chunk(messageChunk) {
13
+ (0, node_opcua_assert_1.assert)(messageChunk);
14
+ (0, node_opcua_assert_1.assert)(messageChunk instanceof Buffer);
15
+ const header = (0, read_message_header_1.readMessageHeader)(new node_opcua_binary_stream_1.BinaryStream(messageChunk));
16
+ if (messageChunk.length !== header.length) {
17
+ throw new Error(" chunk length = " + messageChunk.length + " message length " + header.length);
18
+ }
19
+ }
20
+ exports.verify_message_chunk = verify_message_chunk;
21
+ class ChunkManager extends events_1.EventEmitter {
22
+ constructor(options) {
23
+ super();
24
+ // { chunkSize : 32, headerSize : 10 ,signatureLength: 32 }
25
+ this.chunkSize = options.chunkSize;
26
+ this.headerSize = options.headerSize || 0;
27
+ if (this.headerSize) {
28
+ this.writeHeaderFunc = options.writeHeaderFunc;
29
+ (0, node_opcua_assert_1.assert)(typeof this.writeHeaderFunc === "function");
30
+ }
31
+ this.sequenceHeaderSize = options.sequenceHeaderSize === undefined ? 8 : options.sequenceHeaderSize;
32
+ if (this.sequenceHeaderSize > 0) {
33
+ this.writeSequenceHeaderFunc = options.writeSequenceHeaderFunc;
34
+ (0, node_opcua_assert_1.assert)(typeof this.writeSequenceHeaderFunc === "function");
35
+ }
36
+ this.signatureLength = options.signatureLength || 0;
37
+ this.signBufferFunc = options.signBufferFunc;
38
+ this.plainBlockSize = options.plainBlockSize || 0; // 256-14;
39
+ this.cipherBlockSize = options.cipherBlockSize || 0; // 256;
40
+ this.dataEnd = 0;
41
+ if (this.cipherBlockSize === 0) {
42
+ (0, node_opcua_assert_1.assert)(this.plainBlockSize === 0);
43
+ // unencrypted block
44
+ this.maxBodySize = this.chunkSize - this.headerSize - this.signatureLength - this.sequenceHeaderSize;
45
+ this.encryptBufferFunc = undefined;
46
+ }
47
+ else {
48
+ (0, node_opcua_assert_1.assert)(this.plainBlockSize !== 0);
49
+ // During encryption a block with a size equal to PlainTextBlockSize is processed to produce a block
50
+ // with size equal to CipherTextBlockSize. These values depend on the encryption algorithm and may
51
+ // be the same.
52
+ this.encryptBufferFunc = options.encryptBufferFunc;
53
+ (0, node_opcua_assert_1.assert)(typeof this.encryptBufferFunc === "function", "an encryptBufferFunc is required");
54
+ // this is the formula proposed by OPCUA
55
+ this.maxBodySize =
56
+ this.plainBlockSize *
57
+ Math.floor((this.chunkSize - this.headerSize - this.signatureLength - 1) / this.cipherBlockSize) -
58
+ this.sequenceHeaderSize;
59
+ // this is the formula proposed by ERN
60
+ this.maxBlock = Math.floor((this.chunkSize - this.headerSize) / this.cipherBlockSize);
61
+ this.maxBodySize = this.plainBlockSize * this.maxBlock - this.sequenceHeaderSize - this.signatureLength - 1;
62
+ if (this.plainBlockSize > 256) {
63
+ this.maxBodySize -= 1;
64
+ }
65
+ }
66
+ (0, node_opcua_assert_1.assert)(this.maxBodySize > 0); // no space left to write data
67
+ // where the data starts in the block
68
+ this.dataOffset = this.headerSize + this.sequenceHeaderSize;
69
+ this.chunk = null;
70
+ this.cursor = 0;
71
+ this.pendingChunk = null;
72
+ }
73
+ evaluateTotalLengthAndChunks(bodySize) {
74
+ const chunkCount = Math.ceil(bodySize / this.maxBodySize);
75
+ const totalLength = this.chunkSize + chunkCount;
76
+ return { totalLength, chunkCount };
77
+ }
78
+ write(buffer, length) {
79
+ length = length || buffer.length;
80
+ (0, node_opcua_assert_1.assert)(buffer instanceof Buffer || buffer === null);
81
+ (0, node_opcua_assert_1.assert)(length > 0);
82
+ let l = length;
83
+ let inputCursor = 0;
84
+ while (l > 0) {
85
+ (0, node_opcua_assert_1.assert)(length - inputCursor !== 0);
86
+ if (this.cursor === 0) {
87
+ this._push_pending_chunk(false);
88
+ }
89
+ // space left in current chunk
90
+ const spaceLeft = this.maxBodySize - this.cursor;
91
+ const nbToWrite = Math.min(length - inputCursor, spaceLeft);
92
+ this.chunk = this.chunk || (0, node_opcua_buffer_utils_1.createFastUninitializedBuffer)(this.chunkSize);
93
+ if (buffer) {
94
+ buffer.copy(this.chunk, this.cursor + this.dataOffset, inputCursor, inputCursor + nbToWrite);
95
+ }
96
+ inputCursor += nbToWrite;
97
+ this.cursor += nbToWrite;
98
+ if (this.cursor >= this.maxBodySize) {
99
+ this._post_process_current_chunk();
100
+ }
101
+ l -= nbToWrite;
102
+ }
103
+ }
104
+ end() {
105
+ if (this.cursor > 0) {
106
+ this._post_process_current_chunk();
107
+ }
108
+ this._push_pending_chunk(true);
109
+ }
110
+ /**
111
+ * compute the signature of the chunk and append it at the end
112
+ * of the data block.
113
+ *
114
+ * @method _write_signature
115
+ * @private
116
+ */
117
+ _write_signature(chunk) {
118
+ if (this.signBufferFunc) {
119
+ (0, node_opcua_assert_1.assert)(typeof this.signBufferFunc === "function");
120
+ (0, node_opcua_assert_1.assert)(this.signatureLength !== 0);
121
+ const signatureStart = this.dataEnd;
122
+ const sectionToSign = chunk.subarray(0, signatureStart);
123
+ const signature = this.signBufferFunc(sectionToSign);
124
+ (0, node_opcua_assert_1.assert)(signature.length === this.signatureLength);
125
+ signature.copy(chunk, signatureStart);
126
+ }
127
+ else {
128
+ (0, node_opcua_assert_1.assert)(this.signatureLength === 0, "expecting NO SIGN");
129
+ }
130
+ }
131
+ _encrypt(chunk) {
132
+ if (this.plainBlockSize > 0) {
133
+ (0, node_opcua_assert_1.assert)(this.dataEnd !== undefined);
134
+ const startEncryptionPos = this.headerSize;
135
+ const endEncryptionPos = this.dataEnd + this.signatureLength;
136
+ const areaToEncrypt = chunk.subarray(startEncryptionPos, endEncryptionPos);
137
+ (0, node_opcua_assert_1.assert)(areaToEncrypt.length % this.plainBlockSize === 0); // padding should have been applied
138
+ const nbBlock = areaToEncrypt.length / this.plainBlockSize;
139
+ const encryptedBuffer = this.encryptBufferFunc(areaToEncrypt);
140
+ (0, node_opcua_assert_1.assert)(encryptedBuffer.length % this.cipherBlockSize === 0);
141
+ (0, node_opcua_assert_1.assert)(encryptedBuffer.length === nbBlock * this.cipherBlockSize);
142
+ encryptedBuffer.copy(chunk, this.headerSize, 0);
143
+ }
144
+ }
145
+ _push_pending_chunk(isLast) {
146
+ if (this.pendingChunk) {
147
+ const expectedLength = this.pendingChunk.length;
148
+ if (this.headerSize > 0) {
149
+ // Release 1.02 39 OPC Unified Architecture, Part 6:
150
+ // The sequence header ensures that the first encrypted block of every Message sent over
151
+ // a channel will start with different data.
152
+ this.writeHeaderFunc(this.pendingChunk.subarray(0, this.headerSize), isLast, expectedLength);
153
+ }
154
+ if (this.sequenceHeaderSize > 0) {
155
+ this.writeSequenceHeaderFunc(this.pendingChunk.subarray(this.headerSize, this.headerSize + this.sequenceHeaderSize));
156
+ }
157
+ this._write_signature(this.pendingChunk);
158
+ this._encrypt(this.pendingChunk);
159
+ /**
160
+ * @event chunk
161
+ * @param chunk {Buffer}
162
+ * @param isLast {Boolean} , true if final chunk
163
+ */
164
+ this.emit("chunk", this.pendingChunk, isLast);
165
+ this.pendingChunk = null;
166
+ }
167
+ }
168
+ _write_padding_bytes(nbPaddingByteTotal) {
169
+ const nbPaddingByte = nbPaddingByteTotal % 256;
170
+ const extraNbPaddingByte = Math.floor(nbPaddingByteTotal / 256);
171
+ (0, node_opcua_assert_1.assert)(extraNbPaddingByte === 0 || this.plainBlockSize > 256, "extraNbPaddingByte only requested when key size > 2048");
172
+ // write the padding byte
173
+ this.chunk.writeUInt8(nbPaddingByte, this.cursor + this.dataOffset);
174
+ this.cursor += 1;
175
+ for (let i = 0; i < nbPaddingByteTotal; i++) {
176
+ this.chunk.writeUInt8(nbPaddingByte, this.cursor + this.dataOffset + i);
177
+ }
178
+ this.cursor += nbPaddingByteTotal;
179
+ if (this.plainBlockSize > 256) {
180
+ this.chunk.writeUInt8(extraNbPaddingByte, this.cursor + this.dataOffset);
181
+ this.cursor += 1;
182
+ }
183
+ }
184
+ _post_process_current_chunk() {
185
+ let extraEncryptionBytes = 0;
186
+ // add padding bytes if needed
187
+ if (this.plainBlockSize > 0) {
188
+ // write padding ( if encryption )
189
+ // let's calculate curLength = the length of the block to encrypt without padding yet
190
+ // +---------------+---------------+-------------+---------+--------------+------------+
191
+ // |SequenceHeader | data | paddingByte | padding | extraPadding | signature |
192
+ // +---------------+---------------+-------------+---------+--------------+------------+
193
+ let curLength = this.sequenceHeaderSize + this.cursor + this.signatureLength;
194
+ if (this.plainBlockSize > 256) {
195
+ curLength += 2; // account for extraPadding Byte Number;
196
+ }
197
+ else {
198
+ curLength += 1;
199
+ }
200
+ // let's calculate the required number of padding bytes
201
+ const n = curLength % this.plainBlockSize;
202
+ const nbPaddingByteTotal = (this.plainBlockSize - n) % this.plainBlockSize;
203
+ this._write_padding_bytes(nbPaddingByteTotal);
204
+ const adjustedLength = this.sequenceHeaderSize + this.cursor + this.signatureLength;
205
+ (0, node_opcua_assert_1.assert)(adjustedLength % this.plainBlockSize === 0);
206
+ const nbBlock = adjustedLength / this.plainBlockSize;
207
+ extraEncryptionBytes = nbBlock * (this.cipherBlockSize - this.plainBlockSize);
208
+ }
209
+ this.dataEnd = this.dataOffset + this.cursor;
210
+ // calculate the expected length of the chunk, once encrypted if encryption apply
211
+ const expectedLength = this.dataEnd + this.signatureLength + extraEncryptionBytes;
212
+ this.pendingChunk = this.chunk.subarray(0, expectedLength);
213
+ // note :
214
+ // - this.pending_chunk has the correct size but is not signed nor encrypted yet
215
+ // as we don't know what to write in the header yet
216
+ // - as a result,
217
+ this.chunk = null;
218
+ this.cursor = 0;
219
+ }
220
+ }
221
+ exports.ChunkManager = ChunkManager;
222
222
  //# sourceMappingURL=chunk_manager.js.map
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- /***
2
- * @module node-opcua-chunkmanager
3
- */
4
- export * from "./chunk_manager";
5
- export * from "./read_message_header";
6
- export * from "./SequenceHeader";
1
+ /***
2
+ * @module node-opcua-chunkmanager
3
+ */
4
+ export * from "./chunk_manager";
5
+ export * from "./read_message_header";
6
+ export * from "./SequenceHeader";
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- /***
18
- * @module node-opcua-chunkmanager
19
- */
20
- __exportStar(require("./chunk_manager"), exports);
21
- __exportStar(require("./read_message_header"), exports);
22
- __exportStar(require("./SequenceHeader"), exports);
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /***
18
+ * @module node-opcua-chunkmanager
19
+ */
20
+ __exportStar(require("./chunk_manager"), exports);
21
+ __exportStar(require("./read_message_header"), exports);
22
+ __exportStar(require("./SequenceHeader"), exports);
23
23
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- /***
2
- * @module node-opcua-chunkmanager
3
- */
4
- import { BinaryStream } from "node-opcua-binary-stream";
5
- import { MessageHeader } from "node-opcua-packet-assembler";
6
- export declare function readMessageHeader(stream: BinaryStream): MessageHeader;
1
+ /***
2
+ * @module node-opcua-chunkmanager
3
+ */
4
+ import { BinaryStream } from "node-opcua-binary-stream";
5
+ import { MessageHeader } from "node-opcua-packet-assembler";
6
+ export declare function readMessageHeader(stream: BinaryStream): MessageHeader;
@@ -1,13 +1,13 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readMessageHeader = void 0;
4
- function readMessageHeader(stream) {
5
- const msgType = String.fromCharCode(stream.readUInt8()) +
6
- String.fromCharCode(stream.readUInt8()) +
7
- String.fromCharCode(stream.readUInt8());
8
- const isFinal = String.fromCharCode(stream.readUInt8());
9
- const length = stream.readUInt32();
10
- return { msgType, isFinal, length };
11
- }
12
- exports.readMessageHeader = readMessageHeader;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readMessageHeader = void 0;
4
+ function readMessageHeader(stream) {
5
+ const msgType = String.fromCharCode(stream.readUInt8()) +
6
+ String.fromCharCode(stream.readUInt8()) +
7
+ String.fromCharCode(stream.readUInt8());
8
+ const isFinal = String.fromCharCode(stream.readUInt8());
9
+ const length = stream.readUInt32();
10
+ return { msgType, isFinal, length };
11
+ }
12
+ exports.readMessageHeader = readMessageHeader;
13
13
  //# sourceMappingURL=read_message_header.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "node-opcua-chunkmanager",
3
- "version": "2.97.0",
4
- "description": "pure nodejs OPCUA SDK - module -chunkmanager",
3
+ "version": "2.98.1",
4
+ "description": "pure nodejs OPCUA SDK - module chunkmanager",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "scripts": {
@@ -11,16 +11,16 @@
11
11
  "lint": "eslint source/**/*.ts"
12
12
  },
13
13
  "dependencies": {
14
- "node-opcua-assert": "2.88.0",
15
- "node-opcua-basic-types": "2.97.0",
16
- "node-opcua-binary-stream": "2.90.1",
17
- "node-opcua-buffer-utils": "2.90.1",
18
- "node-opcua-factory": "2.97.0",
19
- "node-opcua-packet-assembler": "2.90.1"
14
+ "node-opcua-assert": "2.98.1",
15
+ "node-opcua-basic-types": "2.98.1",
16
+ "node-opcua-binary-stream": "2.98.1",
17
+ "node-opcua-buffer-utils": "2.98.1",
18
+ "node-opcua-factory": "2.98.1",
19
+ "node-opcua-packet-assembler": "2.98.1"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/node": "18.15.0",
23
- "node-opcua-debug": "2.90.1",
22
+ "@types/node": "18.15.11",
23
+ "node-opcua-debug": "2.98.1",
24
24
  "should": "^13.2.3",
25
25
  "source-map-support": "^0.5.21"
26
26
  },
@@ -39,5 +39,9 @@
39
39
  "internet of things"
40
40
  ],
41
41
  "homepage": "http://node-opcua.github.io/",
42
- "gitHead": "19c96bda0810d2dec73dd1c2427546be40908646"
42
+ "gitHead": "07dcdd8e8c7f2b55544c6e23023093e35674829c",
43
+ "files": [
44
+ "dist",
45
+ "source"
46
+ ]
43
47
  }