music-metadata 7.11.8 → 7.12.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.
- package/LICENSE.txt +9 -0
- package/README.md +5 -4
- package/lib/ParserFactory.js +1 -0
- package/lib/asf/AsfObject.d.ts +1 -1
- package/lib/asf/AsfObject.js +2 -5
- package/lib/asf/AsfUtil.d.ts +1 -1
- package/lib/asf/AsfUtil.js +3 -5
- package/lib/common/RandomFileReader.d.ts +5 -3
- package/lib/common/RandomFileReader.js +12 -15
- package/lib/common/Util.d.ts +8 -9
- package/lib/common/Util.js +17 -17
- package/lib/id3v2/FrameParser.d.ts +1 -2
- package/lib/id3v2/FrameParser.js +42 -42
- package/lib/id3v2/ID3v2Parser.d.ts +1 -2
- package/lib/id3v2/ID3v2Parser.js +14 -16
- package/lib/index.js +2 -2
- package/lib/wav/BwfChunk.d.ts +17 -0
- package/lib/wav/BwfChunk.js +28 -0
- package/lib/wav/WaveParser.js +12 -0
- package/package.json +13 -13
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright © 2022 Borewit
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -26,6 +26,7 @@ Supports any common audio and tagging format.
|
|
|
26
26
|
| AAC | ADTS / Advanced Audio Coding | [:link:](https://en.wikipedia.org/wiki/Advanced_Audio_Coding) | <img src="https://svgshare.com/i/UT8.svg" width="40" alt="AAC logo"> |
|
|
27
27
|
| APE | Monkey's Audio | [:link:](https://wikipedia.org/wiki/Monkey's_Audio) | <img src="https://foreverhits.files.wordpress.com/2015/05/ape_audio.jpg" width="40" alt="Monkey's Audio logo"> |
|
|
28
28
|
| ASF | Advanced Systems Format | [:link:](https://wikipedia.org/wiki/Advanced_Systems_Format) | |
|
|
29
|
+
| BWF | Broadcast Wave Format | [:link:](https://en.wikipedia.org/wiki/Broadcast_Wave_Format) | |
|
|
29
30
|
| DSDIFF | Philips DSDIFF | [:link:](https://wikipedia.org/wiki/Direct_Stream_Digital) | <img src="https://upload.wikimedia.org/wikipedia/commons/b/bc/DSDlogo.svg" width="80" alt="DSD logo"> |
|
|
30
31
|
| DSF | Sony's DSD Stream File | [:link:](https://wikipedia.org/wiki/Direct_Stream_Digital) | <img src="https://upload.wikimedia.org/wikipedia/commons/b/bc/DSDlogo.svg" width="80" alt="DSD logo"> |
|
|
31
32
|
| FLAC | Free Lossless Audio Codec | [:link:](https://wikipedia.org/wiki/FLAC) | <img src="https://upload.wikimedia.org/wikipedia/commons/a/a2/FLAC_logo_vector.svg" width="80" alt="FLAC logo"> |
|
|
@@ -422,12 +423,12 @@ img.src = `data:${picture.format};base64,${picture.data.toString('base64')}`;
|
|
|
422
423
|
|
|
423
424
|
## Licence
|
|
424
425
|
|
|
425
|
-
|
|
426
|
+
The MIT License (MIT)
|
|
426
427
|
|
|
427
|
-
Copyright
|
|
428
|
+
Copyright © 2022 Borewit
|
|
428
429
|
|
|
429
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
|
|
430
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
430
431
|
|
|
431
432
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
432
433
|
|
|
433
|
-
THE SOFTWARE IS PROVIDED
|
|
434
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/lib/ParserFactory.js
CHANGED
package/lib/asf/AsfObject.d.ts
CHANGED
|
@@ -294,7 +294,7 @@ export declare class ExtendedStreamPropertiesObjectState extends State<IExtended
|
|
|
294
294
|
export declare class MetadataObjectState extends State<ITag[]> {
|
|
295
295
|
static guid: GUID;
|
|
296
296
|
constructor(header: IAsfObjectHeader);
|
|
297
|
-
get(
|
|
297
|
+
get(uint8Array: Uint8Array, off: number): ITag[];
|
|
298
298
|
}
|
|
299
299
|
export declare class MetadataLibraryObjectState extends MetadataObjectState {
|
|
300
300
|
static guid: GUID;
|
package/lib/asf/AsfObject.js
CHANGED
|
@@ -311,8 +311,9 @@ class MetadataObjectState extends State {
|
|
|
311
311
|
constructor(header) {
|
|
312
312
|
super(header);
|
|
313
313
|
}
|
|
314
|
-
get(
|
|
314
|
+
get(uint8Array, off) {
|
|
315
315
|
const tags = [];
|
|
316
|
+
const buf = Buffer.from(uint8Array);
|
|
316
317
|
const descriptionRecordsCount = buf.readUInt16LE(off);
|
|
317
318
|
let pos = off + 2;
|
|
318
319
|
for (let i = 0; i < descriptionRecordsCount; i += 1) {
|
|
@@ -327,10 +328,6 @@ class MetadataObjectState extends State {
|
|
|
327
328
|
pos += nameLen;
|
|
328
329
|
const data = buf.slice(pos, pos + dataLen);
|
|
329
330
|
pos += dataLen;
|
|
330
|
-
const parseAttr = AsfUtil_1.AsfUtil.getParserForAttr(dataType);
|
|
331
|
-
if (!parseAttr) {
|
|
332
|
-
throw new Error('unexpected value headerType: ' + dataType);
|
|
333
|
-
}
|
|
334
331
|
this.postProcessTag(tags, name, dataType, data);
|
|
335
332
|
}
|
|
336
333
|
return tags;
|
package/lib/asf/AsfUtil.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { DataType } from './AsfObject';
|
|
|
3
3
|
export declare type AttributeParser = (buf: Buffer) => boolean | string | number | bigint | Buffer;
|
|
4
4
|
export declare class AsfUtil {
|
|
5
5
|
static getParserForAttr(i: DataType): AttributeParser;
|
|
6
|
-
static parseUnicodeAttr(
|
|
6
|
+
static parseUnicodeAttr(uint8Array: Uint8Array): string;
|
|
7
7
|
private static attributeParsers;
|
|
8
8
|
private static parseByteArrayAttr;
|
|
9
9
|
private static parseBoolAttr;
|
package/lib/asf/AsfUtil.js
CHANGED
|
@@ -7,13 +7,11 @@ class AsfUtil {
|
|
|
7
7
|
static getParserForAttr(i) {
|
|
8
8
|
return AsfUtil.attributeParsers[i];
|
|
9
9
|
}
|
|
10
|
-
static parseUnicodeAttr(
|
|
11
|
-
return util.stripNulls(util.decodeString(
|
|
10
|
+
static parseUnicodeAttr(uint8Array) {
|
|
11
|
+
return util.stripNulls(util.decodeString(uint8Array, 'utf16le'));
|
|
12
12
|
}
|
|
13
13
|
static parseByteArrayAttr(buf) {
|
|
14
|
-
|
|
15
|
-
buf.copy(newBuf);
|
|
16
|
-
return newBuf;
|
|
14
|
+
return Buffer.from(buf);
|
|
17
15
|
}
|
|
18
16
|
static parseBoolAttr(buf, offset = 0) {
|
|
19
17
|
return AsfUtil.parseWordAttr(buf, offset) === 1;
|
|
@@ -4,9 +4,10 @@ import { IRandomReader } from '../type';
|
|
|
4
4
|
* Provides abstract file access via the IRandomRead interface
|
|
5
5
|
*/
|
|
6
6
|
export declare class RandomFileReader implements IRandomReader {
|
|
7
|
+
private readonly fileHandle;
|
|
8
|
+
filePath: string;
|
|
7
9
|
fileSize: number;
|
|
8
|
-
private
|
|
9
|
-
constructor(filePath: string, fileSize: number);
|
|
10
|
+
private constructor();
|
|
10
11
|
/**
|
|
11
12
|
* Read from a given position of an abstracted file or buffer.
|
|
12
13
|
* @param buffer {Buffer} is the buffer that the data will be written to.
|
|
@@ -16,5 +17,6 @@ export declare class RandomFileReader implements IRandomReader {
|
|
|
16
17
|
* @return {Promise<number>} bytes read
|
|
17
18
|
*/
|
|
18
19
|
randomRead(buffer: Buffer, offset: number, length: number, position: number): Promise<number>;
|
|
19
|
-
close(): void
|
|
20
|
+
close(): Promise<void>;
|
|
21
|
+
static init(filePath: string, fileSize: number): Promise<RandomFileReader>;
|
|
20
22
|
}
|
|
@@ -6,9 +6,10 @@ const fs = require("fs");
|
|
|
6
6
|
* Provides abstract file access via the IRandomRead interface
|
|
7
7
|
*/
|
|
8
8
|
class RandomFileReader {
|
|
9
|
-
constructor(filePath, fileSize) {
|
|
9
|
+
constructor(fileHandle, filePath, fileSize) {
|
|
10
|
+
this.fileHandle = fileHandle;
|
|
11
|
+
this.filePath = filePath;
|
|
10
12
|
this.fileSize = fileSize;
|
|
11
|
-
this.fd = fs.openSync(filePath, 'r');
|
|
12
13
|
}
|
|
13
14
|
/**
|
|
14
15
|
* Read from a given position of an abstracted file or buffer.
|
|
@@ -18,20 +19,16 @@ class RandomFileReader {
|
|
|
18
19
|
* @param position {number} is an argument specifying where to begin reading from in the file.
|
|
19
20
|
* @return {Promise<number>} bytes read
|
|
20
21
|
*/
|
|
21
|
-
randomRead(buffer, offset, length, position) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (err) {
|
|
25
|
-
reject(err);
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
resolve(bytesRead);
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
});
|
|
22
|
+
async randomRead(buffer, offset, length, position) {
|
|
23
|
+
const result = await this.fileHandle.read(buffer, offset, length, position);
|
|
24
|
+
return result.bytesRead;
|
|
32
25
|
}
|
|
33
|
-
close() {
|
|
34
|
-
|
|
26
|
+
async close() {
|
|
27
|
+
return this.fileHandle.close();
|
|
28
|
+
}
|
|
29
|
+
static async init(filePath, fileSize) {
|
|
30
|
+
const fileHandle = await fs.promises.open(filePath, 'r');
|
|
31
|
+
return new RandomFileReader(fileHandle, filePath, fileSize);
|
|
35
32
|
}
|
|
36
33
|
}
|
|
37
34
|
exports.RandomFileReader = RandomFileReader;
|
package/lib/common/Util.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { IRatio } from '../type';
|
|
3
2
|
export declare type StringEncoding = 'ascii' | 'utf8' | 'utf16le' | 'ucs2' | 'base64url' | 'latin1' | 'hex';
|
|
4
3
|
export interface ITextEncoding {
|
|
@@ -19,27 +18,27 @@ export declare function trimRightNull(x: string): string;
|
|
|
19
18
|
/**
|
|
20
19
|
* Decode string
|
|
21
20
|
*/
|
|
22
|
-
export declare function decodeString(
|
|
21
|
+
export declare function decodeString(uint8Array: Uint8Array, encoding: StringEncoding): string;
|
|
23
22
|
export declare function stripNulls(str: string): string;
|
|
24
23
|
/**
|
|
25
24
|
* Read bit-aligned number start from buffer
|
|
26
25
|
* Total offset in bits = byteOffset * 8 + bitOffset
|
|
27
|
-
* @param
|
|
26
|
+
* @param source Byte buffer
|
|
28
27
|
* @param byteOffset Starting offset in bytes
|
|
29
28
|
* @param bitOffset Starting offset in bits: 0 = lsb
|
|
30
29
|
* @param len Length of number in bits
|
|
31
|
-
* @return
|
|
30
|
+
* @return Decoded bit aligned number
|
|
32
31
|
*/
|
|
33
|
-
export declare function getBitAllignedNumber(
|
|
32
|
+
export declare function getBitAllignedNumber(source: Uint8Array, byteOffset: number, bitOffset: number, len: number): number;
|
|
34
33
|
/**
|
|
35
34
|
* Read bit-aligned number start from buffer
|
|
36
35
|
* Total offset in bits = byteOffset * 8 + bitOffset
|
|
37
|
-
* @param
|
|
36
|
+
* @param source Byte Uint8Array
|
|
38
37
|
* @param byteOffset Starting offset in bytes
|
|
39
|
-
* @param bitOffset Starting offset in bits: 0 = most significant bit, 7 is least significant bit
|
|
40
|
-
* @return
|
|
38
|
+
* @param bitOffset Starting offset in bits: 0 = most significant bit, 7 is the least significant bit
|
|
39
|
+
* @return True if bit is set
|
|
41
40
|
*/
|
|
42
|
-
export declare function isBitSet(
|
|
41
|
+
export declare function isBitSet(source: Uint8Array, byteOffset: number, bitOffset: number): boolean;
|
|
43
42
|
export declare function a2hex(str: string): string;
|
|
44
43
|
/**
|
|
45
44
|
* Convert power ratio to DB
|
package/lib/common/Util.js
CHANGED
|
@@ -52,19 +52,19 @@ function swapBytes(uint8Array) {
|
|
|
52
52
|
/**
|
|
53
53
|
* Decode string
|
|
54
54
|
*/
|
|
55
|
-
function decodeString(
|
|
55
|
+
function decodeString(uint8Array, encoding) {
|
|
56
56
|
// annoying workaround for a double BOM issue
|
|
57
57
|
// https://github.com/leetreveil/musicmetadata/issues/84
|
|
58
|
-
if (
|
|
59
|
-
return decodeString(
|
|
58
|
+
if (uint8Array[0] === 0xFF && uint8Array[1] === 0xFE) { // little endian
|
|
59
|
+
return decodeString(uint8Array.subarray(2), encoding);
|
|
60
60
|
}
|
|
61
|
-
else if (encoding === 'utf16le' &&
|
|
61
|
+
else if (encoding === 'utf16le' && uint8Array[0] === 0xFE && uint8Array[1] === 0xFF) {
|
|
62
62
|
// BOM, indicating big endian decoding
|
|
63
|
-
if ((
|
|
63
|
+
if ((uint8Array.length & 1) !== 0)
|
|
64
64
|
throw new Error('Expected even number of octets for 16-bit unicode string');
|
|
65
|
-
return decodeString(swapBytes(
|
|
65
|
+
return decodeString(swapBytes(uint8Array), encoding);
|
|
66
66
|
}
|
|
67
|
-
return
|
|
67
|
+
return Buffer.from(uint8Array).toString(encoding);
|
|
68
68
|
}
|
|
69
69
|
exports.decodeString = decodeString;
|
|
70
70
|
function stripNulls(str) {
|
|
@@ -76,16 +76,16 @@ exports.stripNulls = stripNulls;
|
|
|
76
76
|
/**
|
|
77
77
|
* Read bit-aligned number start from buffer
|
|
78
78
|
* Total offset in bits = byteOffset * 8 + bitOffset
|
|
79
|
-
* @param
|
|
79
|
+
* @param source Byte buffer
|
|
80
80
|
* @param byteOffset Starting offset in bytes
|
|
81
81
|
* @param bitOffset Starting offset in bits: 0 = lsb
|
|
82
82
|
* @param len Length of number in bits
|
|
83
|
-
* @return
|
|
83
|
+
* @return Decoded bit aligned number
|
|
84
84
|
*/
|
|
85
|
-
function getBitAllignedNumber(
|
|
85
|
+
function getBitAllignedNumber(source, byteOffset, bitOffset, len) {
|
|
86
86
|
const byteOff = byteOffset + ~~(bitOffset / 8);
|
|
87
87
|
const bitOff = bitOffset % 8;
|
|
88
|
-
let value =
|
|
88
|
+
let value = source[byteOff];
|
|
89
89
|
value &= 0xff >> bitOff;
|
|
90
90
|
const bitsRead = 8 - bitOff;
|
|
91
91
|
const bitsLeft = len - bitsRead;
|
|
@@ -94,7 +94,7 @@ function getBitAllignedNumber(buf, byteOffset, bitOffset, len) {
|
|
|
94
94
|
}
|
|
95
95
|
else if (bitsLeft > 0) {
|
|
96
96
|
value <<= bitsLeft;
|
|
97
|
-
value |= getBitAllignedNumber(
|
|
97
|
+
value |= getBitAllignedNumber(source, byteOffset, bitOffset + bitsRead, bitsLeft);
|
|
98
98
|
}
|
|
99
99
|
return value;
|
|
100
100
|
}
|
|
@@ -102,13 +102,13 @@ exports.getBitAllignedNumber = getBitAllignedNumber;
|
|
|
102
102
|
/**
|
|
103
103
|
* Read bit-aligned number start from buffer
|
|
104
104
|
* Total offset in bits = byteOffset * 8 + bitOffset
|
|
105
|
-
* @param
|
|
105
|
+
* @param source Byte Uint8Array
|
|
106
106
|
* @param byteOffset Starting offset in bytes
|
|
107
|
-
* @param bitOffset Starting offset in bits: 0 = most significant bit, 7 is least significant bit
|
|
108
|
-
* @return
|
|
107
|
+
* @param bitOffset Starting offset in bits: 0 = most significant bit, 7 is the least significant bit
|
|
108
|
+
* @return True if bit is set
|
|
109
109
|
*/
|
|
110
|
-
function isBitSet(
|
|
111
|
-
return getBitAllignedNumber(
|
|
110
|
+
function isBitSet(source, byteOffset, bitOffset) {
|
|
111
|
+
return getBitAllignedNumber(source, byteOffset, bitOffset, 1) === 1;
|
|
112
112
|
}
|
|
113
113
|
exports.isBitSet = isBitSet;
|
|
114
114
|
function a2hex(str) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { ID3v2MajorVersion } from './ID3v2Token';
|
|
3
2
|
import { IWarningCollector } from '../common/MetadataCollector';
|
|
4
3
|
export declare function parseGenre(origVal: string): string[];
|
|
@@ -11,7 +10,7 @@ export declare class FrameParser {
|
|
|
11
10
|
* @param warningCollector - Used to collect decode issue
|
|
12
11
|
*/
|
|
13
12
|
constructor(major: ID3v2MajorVersion, warningCollector: IWarningCollector);
|
|
14
|
-
readData(
|
|
13
|
+
readData(uint8Array: Uint8Array, type: string, includeCovers: boolean): any;
|
|
15
14
|
protected static fixPictureMimeType(pictureType: string): string;
|
|
16
15
|
/**
|
|
17
16
|
* Converts TMCL (Musician credits list) or TIPL (Involved people list)
|
package/lib/id3v2/FrameParser.js
CHANGED
|
@@ -68,13 +68,13 @@ class FrameParser {
|
|
|
68
68
|
this.major = major;
|
|
69
69
|
this.warningCollector = warningCollector;
|
|
70
70
|
}
|
|
71
|
-
readData(
|
|
72
|
-
if (
|
|
71
|
+
readData(uint8Array, type, includeCovers) {
|
|
72
|
+
if (uint8Array.length === 0) {
|
|
73
73
|
this.warningCollector.addWarning(`id3v2.${this.major} header has empty tag type=${type}`);
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
const { encoding, bom } = ID3v2Token_1.TextEncodingToken.get(
|
|
77
|
-
const length =
|
|
76
|
+
const { encoding, bom } = ID3v2Token_1.TextEncodingToken.get(uint8Array, 0);
|
|
77
|
+
const length = uint8Array.length;
|
|
78
78
|
let offset = 0;
|
|
79
79
|
let output = []; // ToDo
|
|
80
80
|
const nullTerminatorLength = FrameParser.getNullTerminatorLength(encoding);
|
|
@@ -90,7 +90,7 @@ class FrameParser {
|
|
|
90
90
|
case 'PCST':
|
|
91
91
|
let text;
|
|
92
92
|
try {
|
|
93
|
-
text = util.decodeString(
|
|
93
|
+
text = util.decodeString(uint8Array.slice(1), encoding).replace(/\x00+$/, '');
|
|
94
94
|
}
|
|
95
95
|
catch (error) {
|
|
96
96
|
this.warningCollector.addWarning(`id3v2.${this.major} type=${type} header has invalid string value: ${error.message}`);
|
|
@@ -131,7 +131,7 @@ class FrameParser {
|
|
|
131
131
|
}
|
|
132
132
|
break;
|
|
133
133
|
case 'TXXX':
|
|
134
|
-
output = FrameParser.readIdentifierAndData(
|
|
134
|
+
output = FrameParser.readIdentifierAndData(uint8Array, offset + 1, length, encoding);
|
|
135
135
|
output = {
|
|
136
136
|
description: output.id,
|
|
137
137
|
text: this.splitValue(type, util.decodeString(output.data, encoding).replace(/\x00+$/, ''))
|
|
@@ -144,31 +144,31 @@ class FrameParser {
|
|
|
144
144
|
offset += 1;
|
|
145
145
|
switch (this.major) {
|
|
146
146
|
case 2:
|
|
147
|
-
pic.format = util.decodeString(
|
|
147
|
+
pic.format = util.decodeString(uint8Array.slice(offset, offset + 3), 'latin1'); // 'latin1'; // latin1 == iso-8859-1;
|
|
148
148
|
offset += 3;
|
|
149
149
|
break;
|
|
150
150
|
case 3:
|
|
151
151
|
case 4:
|
|
152
|
-
fzero = util.findZero(
|
|
153
|
-
pic.format = util.decodeString(
|
|
152
|
+
fzero = util.findZero(uint8Array, offset, length, defaultEnc);
|
|
153
|
+
pic.format = util.decodeString(uint8Array.slice(offset, fzero), defaultEnc);
|
|
154
154
|
offset = fzero + 1;
|
|
155
155
|
break;
|
|
156
156
|
default:
|
|
157
157
|
throw new Error('Warning: unexpected major versionIndex: ' + this.major);
|
|
158
158
|
}
|
|
159
159
|
pic.format = FrameParser.fixPictureMimeType(pic.format);
|
|
160
|
-
pic.type = ID3v2Token_1.AttachedPictureType[
|
|
160
|
+
pic.type = ID3v2Token_1.AttachedPictureType[uint8Array[offset]];
|
|
161
161
|
offset += 1;
|
|
162
|
-
fzero = util.findZero(
|
|
163
|
-
pic.description = util.decodeString(
|
|
162
|
+
fzero = util.findZero(uint8Array, offset, length, encoding);
|
|
163
|
+
pic.description = util.decodeString(uint8Array.slice(offset, fzero), encoding);
|
|
164
164
|
offset = fzero + nullTerminatorLength;
|
|
165
|
-
pic.data = Buffer.from(
|
|
165
|
+
pic.data = Buffer.from(uint8Array.slice(offset, length));
|
|
166
166
|
output = pic;
|
|
167
167
|
}
|
|
168
168
|
break;
|
|
169
169
|
case 'CNT':
|
|
170
170
|
case 'PCNT':
|
|
171
|
-
output = Token.UINT32_BE.get(
|
|
171
|
+
output = Token.UINT32_BE.get(uint8Array, 0);
|
|
172
172
|
break;
|
|
173
173
|
case 'SYLT':
|
|
174
174
|
// skip text encoding (1 byte),
|
|
@@ -179,7 +179,7 @@ class FrameParser {
|
|
|
179
179
|
offset += 7;
|
|
180
180
|
output = [];
|
|
181
181
|
while (offset < length) {
|
|
182
|
-
const txt =
|
|
182
|
+
const txt = uint8Array.slice(offset, offset = util.findZero(uint8Array, offset, length, encoding));
|
|
183
183
|
offset += 5; // push offset forward one + 4 byte timestamp
|
|
184
184
|
output.push(util.decodeString(txt, encoding));
|
|
185
185
|
}
|
|
@@ -189,47 +189,47 @@ class FrameParser {
|
|
|
189
189
|
case 'COM':
|
|
190
190
|
case 'COMM':
|
|
191
191
|
offset += 1;
|
|
192
|
-
out.language = util.decodeString(
|
|
192
|
+
out.language = util.decodeString(uint8Array.slice(offset, offset + 3), defaultEnc);
|
|
193
193
|
offset += 3;
|
|
194
|
-
fzero = util.findZero(
|
|
195
|
-
out.description = util.decodeString(
|
|
194
|
+
fzero = util.findZero(uint8Array, offset, length, encoding);
|
|
195
|
+
out.description = util.decodeString(uint8Array.slice(offset, fzero), encoding);
|
|
196
196
|
offset = fzero + nullTerminatorLength;
|
|
197
|
-
out.text = util.decodeString(
|
|
197
|
+
out.text = util.decodeString(uint8Array.slice(offset, length), encoding).replace(/\x00+$/, '');
|
|
198
198
|
output = [out];
|
|
199
199
|
break;
|
|
200
200
|
case 'UFID':
|
|
201
|
-
output = FrameParser.readIdentifierAndData(
|
|
201
|
+
output = FrameParser.readIdentifierAndData(uint8Array, offset, length, defaultEnc);
|
|
202
202
|
output = { owner_identifier: output.id, identifier: output.data };
|
|
203
203
|
break;
|
|
204
204
|
case 'PRIV': // private frame
|
|
205
|
-
output = FrameParser.readIdentifierAndData(
|
|
205
|
+
output = FrameParser.readIdentifierAndData(uint8Array, offset, length, defaultEnc);
|
|
206
206
|
output = { owner_identifier: output.id, data: output.data };
|
|
207
207
|
break;
|
|
208
208
|
case 'POPM': // Popularimeter
|
|
209
|
-
fzero = util.findZero(
|
|
210
|
-
const email = util.decodeString(
|
|
209
|
+
fzero = util.findZero(uint8Array, offset, length, defaultEnc);
|
|
210
|
+
const email = util.decodeString(uint8Array.slice(offset, fzero), defaultEnc);
|
|
211
211
|
offset = fzero + 1;
|
|
212
212
|
const dataLen = length - offset;
|
|
213
213
|
output = {
|
|
214
214
|
email,
|
|
215
|
-
rating:
|
|
216
|
-
counter: dataLen >= 5 ?
|
|
215
|
+
rating: Token.UINT8.get(uint8Array, offset),
|
|
216
|
+
counter: dataLen >= 5 ? Token.UINT32_BE.get(uint8Array, offset + 1) : undefined
|
|
217
217
|
};
|
|
218
218
|
break;
|
|
219
219
|
case 'GEOB': { // General encapsulated object
|
|
220
|
-
fzero = util.findZero(
|
|
221
|
-
const mimeType = util.decodeString(
|
|
220
|
+
fzero = util.findZero(uint8Array, offset + 1, length, encoding);
|
|
221
|
+
const mimeType = util.decodeString(uint8Array.slice(offset + 1, fzero), defaultEnc);
|
|
222
222
|
offset = fzero + 1;
|
|
223
|
-
fzero = util.findZero(
|
|
224
|
-
const filename = util.decodeString(
|
|
223
|
+
fzero = util.findZero(uint8Array, offset, length - offset, encoding);
|
|
224
|
+
const filename = util.decodeString(uint8Array.slice(offset, fzero), defaultEnc);
|
|
225
225
|
offset = fzero + 1;
|
|
226
|
-
fzero = util.findZero(
|
|
227
|
-
const description = util.decodeString(
|
|
226
|
+
fzero = util.findZero(uint8Array, offset, length - offset, encoding);
|
|
227
|
+
const description = util.decodeString(uint8Array.slice(offset, fzero), defaultEnc);
|
|
228
228
|
output = {
|
|
229
229
|
type: mimeType,
|
|
230
230
|
filename,
|
|
231
231
|
description,
|
|
232
|
-
data:
|
|
232
|
+
data: uint8Array.slice(offset + 1, length)
|
|
233
233
|
};
|
|
234
234
|
break;
|
|
235
235
|
}
|
|
@@ -243,23 +243,23 @@ class FrameParser {
|
|
|
243
243
|
case 'WPAY':
|
|
244
244
|
case 'WPUB':
|
|
245
245
|
// Decode URL
|
|
246
|
-
output = util.decodeString(
|
|
246
|
+
output = util.decodeString(uint8Array.slice(offset, fzero), defaultEnc);
|
|
247
247
|
break;
|
|
248
248
|
case 'WXXX': {
|
|
249
249
|
// Decode URL
|
|
250
|
-
fzero = util.findZero(
|
|
251
|
-
const description = util.decodeString(
|
|
250
|
+
fzero = util.findZero(uint8Array, offset + 1, length, encoding);
|
|
251
|
+
const description = util.decodeString(uint8Array.slice(offset + 1, fzero), encoding);
|
|
252
252
|
offset = fzero + (encoding === 'utf16le' ? 2 : 1);
|
|
253
|
-
output = { description, url: util.decodeString(
|
|
253
|
+
output = { description, url: util.decodeString(uint8Array.slice(offset, length), defaultEnc) };
|
|
254
254
|
break;
|
|
255
255
|
}
|
|
256
256
|
case 'WFD':
|
|
257
257
|
case 'WFED':
|
|
258
|
-
output = util.decodeString(
|
|
258
|
+
output = util.decodeString(uint8Array.slice(offset + 1, util.findZero(uint8Array, offset + 1, length, encoding)), encoding);
|
|
259
259
|
break;
|
|
260
260
|
case 'MCDI': {
|
|
261
261
|
// Music CD identifier
|
|
262
|
-
output =
|
|
262
|
+
output = uint8Array.slice(0, length);
|
|
263
263
|
break;
|
|
264
264
|
}
|
|
265
265
|
default:
|
|
@@ -316,11 +316,11 @@ class FrameParser {
|
|
|
316
316
|
static trimArray(values) {
|
|
317
317
|
return values.map(value => value.replace(/\x00+$/, '').trim());
|
|
318
318
|
}
|
|
319
|
-
static readIdentifierAndData(
|
|
320
|
-
const fzero = util.findZero(
|
|
321
|
-
const id = util.decodeString(
|
|
319
|
+
static readIdentifierAndData(uint8Array, offset, length, encoding) {
|
|
320
|
+
const fzero = util.findZero(uint8Array, offset, length, encoding);
|
|
321
|
+
const id = util.decodeString(uint8Array.slice(offset, fzero), encoding);
|
|
322
322
|
offset = fzero + FrameParser.getNullTerminatorLength(encoding);
|
|
323
|
-
return { id, data:
|
|
323
|
+
return { id, data: uint8Array.slice(offset, length) };
|
|
324
324
|
}
|
|
325
325
|
static getNullTerminatorLength(enc) {
|
|
326
326
|
return enc === 'utf16le' ? 2 : 1;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { ITokenizer } from 'strtok3/lib/core';
|
|
3
2
|
import { IOptions } from '../type';
|
|
4
3
|
import { INativeMetadataCollector } from '../common/MetadataCollector';
|
|
5
4
|
export declare class ID3v2Parser {
|
|
6
|
-
static removeUnsyncBytes(buffer:
|
|
5
|
+
static removeUnsyncBytes(buffer: Uint8Array): Uint8Array;
|
|
7
6
|
private static getFrameHeaderLength;
|
|
8
7
|
private static readFrameFlags;
|
|
9
8
|
private static readFrameData;
|
package/lib/id3v2/ID3v2Parser.js
CHANGED
|
@@ -48,20 +48,20 @@ class ID3v2Parser {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
static readFrameData(
|
|
51
|
+
static readFrameData(uint8Array, frameHeader, majorVer, includeCovers, warningCollector) {
|
|
52
52
|
const frameParser = new FrameParser_1.FrameParser(majorVer, warningCollector);
|
|
53
53
|
switch (majorVer) {
|
|
54
54
|
case 2:
|
|
55
|
-
return frameParser.readData(
|
|
55
|
+
return frameParser.readData(uint8Array, frameHeader.id, includeCovers);
|
|
56
56
|
case 3:
|
|
57
57
|
case 4:
|
|
58
58
|
if (frameHeader.flags.format.unsynchronisation) {
|
|
59
|
-
|
|
59
|
+
uint8Array = ID3v2Parser.removeUnsyncBytes(uint8Array);
|
|
60
60
|
}
|
|
61
61
|
if (frameHeader.flags.format.data_length_indicator) {
|
|
62
|
-
|
|
62
|
+
uint8Array = uint8Array.slice(4, uint8Array.length);
|
|
63
63
|
}
|
|
64
|
-
return frameParser.readData(
|
|
64
|
+
return frameParser.readData(uint8Array, frameHeader.id, includeCovers);
|
|
65
65
|
default:
|
|
66
66
|
throw new Error('Unexpected majorVer: ' + majorVer);
|
|
67
67
|
}
|
|
@@ -93,14 +93,12 @@ class ID3v2Parser {
|
|
|
93
93
|
return dataRemaining > 0 ? this.parseExtendedHeaderData(dataRemaining, extendedHeader.size) : this.parseId3Data(this.id3Header.size - extendedHeader.size);
|
|
94
94
|
}
|
|
95
95
|
async parseExtendedHeaderData(dataRemaining, extendedHeaderSize) {
|
|
96
|
-
|
|
97
|
-
await this.tokenizer.readBuffer(buffer, { length: dataRemaining });
|
|
96
|
+
await this.tokenizer.ignore(dataRemaining);
|
|
98
97
|
return this.parseId3Data(this.id3Header.size - extendedHeaderSize);
|
|
99
98
|
}
|
|
100
99
|
async parseId3Data(dataLen) {
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
for (const tag of this.parseMetadata(buffer)) {
|
|
100
|
+
const uint8Array = await this.tokenizer.readToken(new Token.Uint8ArrayType(dataLen));
|
|
101
|
+
for (const tag of this.parseMetadata(uint8Array)) {
|
|
104
102
|
if (tag.id === 'TXXX') {
|
|
105
103
|
if (tag.value) {
|
|
106
104
|
for (const text of tag.value.text) {
|
|
@@ -152,13 +150,13 @@ class ID3v2Parser {
|
|
|
152
150
|
}
|
|
153
151
|
return tags;
|
|
154
152
|
}
|
|
155
|
-
readFrameHeader(
|
|
153
|
+
readFrameHeader(uint8Array, majorVer) {
|
|
156
154
|
let header;
|
|
157
155
|
switch (majorVer) {
|
|
158
156
|
case 2:
|
|
159
157
|
header = {
|
|
160
|
-
id:
|
|
161
|
-
length: Token.UINT24_BE.get(
|
|
158
|
+
id: Buffer.from(uint8Array.slice(0, 3)).toString('ascii'),
|
|
159
|
+
length: Token.UINT24_BE.get(uint8Array, 3)
|
|
162
160
|
};
|
|
163
161
|
if (!header.id.match(/[A-Z0-9]{3}/g)) {
|
|
164
162
|
this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${header.id}`);
|
|
@@ -167,9 +165,9 @@ class ID3v2Parser {
|
|
|
167
165
|
case 3:
|
|
168
166
|
case 4:
|
|
169
167
|
header = {
|
|
170
|
-
id:
|
|
171
|
-
length: (majorVer === 4 ? ID3v2Token_1.UINT32SYNCSAFE : Token.UINT32_BE).get(
|
|
172
|
-
flags: ID3v2Parser.readFrameFlags(
|
|
168
|
+
id: Buffer.from(uint8Array.slice(0, 4)).toString('ascii'),
|
|
169
|
+
length: (majorVer === 4 ? ID3v2Token_1.UINT32SYNCSAFE : Token.UINT32_BE).get(uint8Array, 4),
|
|
170
|
+
flags: ID3v2Parser.readFrameFlags(uint8Array.slice(8, 10))
|
|
173
171
|
};
|
|
174
172
|
if (!header.id.match(/[A-Z0-9]{4}/g)) {
|
|
175
173
|
this.metadata.addWarning(`Invalid ID3v2.${this.id3Header.version.major} frame-header-ID: ${header.id}`);
|
package/lib/index.js
CHANGED
|
@@ -32,12 +32,12 @@ exports.parseStream = parseStream;
|
|
|
32
32
|
async function parseFile(filePath, options = {}) {
|
|
33
33
|
debug(`parseFile: ${filePath}`);
|
|
34
34
|
const fileTokenizer = await strtok3.fromFile(filePath);
|
|
35
|
-
const fileReader =
|
|
35
|
+
const fileReader = await RandomFileReader_1.RandomFileReader.init(filePath, fileTokenizer.fileInfo.size);
|
|
36
36
|
try {
|
|
37
37
|
await Core.scanAppendingHeaders(fileReader, options);
|
|
38
38
|
}
|
|
39
39
|
finally {
|
|
40
|
-
fileReader.close();
|
|
40
|
+
await fileReader.close();
|
|
41
41
|
}
|
|
42
42
|
try {
|
|
43
43
|
const parserName = ParserFactory_1.ParserFactory.getParserIdForExtension(filePath);
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IGetToken } from 'strtok3/lib/core';
|
|
2
|
+
export interface IBroadcastAudioExtensionChunk {
|
|
3
|
+
description: string;
|
|
4
|
+
originator: string;
|
|
5
|
+
originatorReference: string;
|
|
6
|
+
originationDate: string;
|
|
7
|
+
originationTime: string;
|
|
8
|
+
timeReferenceLow: number;
|
|
9
|
+
timeReferenceHigh: number;
|
|
10
|
+
version: number;
|
|
11
|
+
umid: Uint8Array;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Broadcast Audio Extension Chunk
|
|
15
|
+
* Ref: https://tech.ebu.ch/docs/tech/tech3285.pdf
|
|
16
|
+
*/
|
|
17
|
+
export declare const BroadcastAudioExtensionChunk: IGetToken<IBroadcastAudioExtensionChunk>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BroadcastAudioExtensionChunk = void 0;
|
|
4
|
+
const Token = require("token-types");
|
|
5
|
+
/**
|
|
6
|
+
* Broadcast Audio Extension Chunk
|
|
7
|
+
* Ref: https://tech.ebu.ch/docs/tech/tech3285.pdf
|
|
8
|
+
*/
|
|
9
|
+
exports.BroadcastAudioExtensionChunk = {
|
|
10
|
+
len: 420,
|
|
11
|
+
get: (uint8array, off) => {
|
|
12
|
+
return {
|
|
13
|
+
description: new Token.StringType(256, 'ascii').get(uint8array, off).trim(),
|
|
14
|
+
originator: new Token.StringType(32, 'ascii').get(uint8array, off + 256).trim(),
|
|
15
|
+
originatorReference: new Token.StringType(32, 'ascii').get(uint8array, off + 288).trim(),
|
|
16
|
+
originationDate: new Token.StringType(10, 'ascii').get(uint8array, off + 320).trim(),
|
|
17
|
+
originationTime: new Token.StringType(8, 'ascii').get(uint8array, off + 330).trim(),
|
|
18
|
+
timeReferenceLow: Token.UINT32_LE.get(uint8array, off + 338),
|
|
19
|
+
timeReferenceHigh: Token.UINT32_LE.get(uint8array, off + 342),
|
|
20
|
+
version: Token.UINT16_LE.get(uint8array, off + 346),
|
|
21
|
+
umid: new Token.Uint8ArrayType(64).get(uint8array, off + 348),
|
|
22
|
+
loudnessValue: Token.UINT16_LE.get(uint8array, off + 412),
|
|
23
|
+
maxTruePeakLevel: Token.UINT16_LE.get(uint8array, off + 414),
|
|
24
|
+
maxMomentaryLoudness: Token.UINT16_LE.get(uint8array, off + 416),
|
|
25
|
+
maxShortTermLoudness: Token.UINT16_LE.get(uint8array, off + 418)
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
};
|
package/lib/wav/WaveParser.js
CHANGED
|
@@ -10,6 +10,7 @@ const ID3v2Parser_1 = require("../id3v2/ID3v2Parser");
|
|
|
10
10
|
const util = require("../common/Util");
|
|
11
11
|
const FourCC_1 = require("../common/FourCC");
|
|
12
12
|
const BasicParser_1 = require("../common/BasicParser");
|
|
13
|
+
const BwfChunk_1 = require("../wav/BwfChunk");
|
|
13
14
|
const debug = initDebug('music-metadata:parser:RIFF');
|
|
14
15
|
/**
|
|
15
16
|
* Resource Interchange File Format (RIFF) Parser
|
|
@@ -101,6 +102,17 @@ class WaveParser extends BasicParser_1.BasicParser {
|
|
|
101
102
|
this.metadata.setFormat('bitrate', this.metadata.format.numberOfChannels * this.blockAlign * this.metadata.format.sampleRate); // ToDo: check me
|
|
102
103
|
await this.tokenizer.ignore(header.chunkSize);
|
|
103
104
|
break;
|
|
105
|
+
case 'bext': // Broadcast Audio Extension chunk https://tech.ebu.ch/docs/tech/tech3285.pdf
|
|
106
|
+
const bext = await this.tokenizer.readToken(BwfChunk_1.BroadcastAudioExtensionChunk);
|
|
107
|
+
Object.keys(bext).forEach(key => {
|
|
108
|
+
this.metadata.addTag('exif', 'bext.' + key, bext[key]);
|
|
109
|
+
});
|
|
110
|
+
break;
|
|
111
|
+
case '\x00\x00\x00\x00': // padding ??
|
|
112
|
+
debug(`Ignore padding chunk: RIFF/${header.chunkID} of ${header.chunkSize} bytes`);
|
|
113
|
+
this.metadata.addWarning('Ignore chunk: RIFF/' + header.chunkID);
|
|
114
|
+
await this.tokenizer.ignore(header.chunkSize);
|
|
115
|
+
break;
|
|
104
116
|
default:
|
|
105
117
|
debug(`Ignore chunk: RIFF/${header.chunkID} of ${header.chunkSize} bytes`);
|
|
106
118
|
this.metadata.addWarning('Ignore chunk: RIFF/' + header.chunkID);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "music-metadata",
|
|
3
3
|
"description": "Music metadata parser for Node.js, supporting virtual any audio and tag format.",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.12.1",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Borewit",
|
|
7
7
|
"url": "https://github.com/Borewit"
|
|
@@ -57,7 +57,8 @@
|
|
|
57
57
|
"chapter",
|
|
58
58
|
"info",
|
|
59
59
|
"parse",
|
|
60
|
-
"parser"
|
|
60
|
+
"parser",
|
|
61
|
+
"bwf"
|
|
61
62
|
],
|
|
62
63
|
"main": "lib/index.js",
|
|
63
64
|
"types": "lib/index.d.ts",
|
|
@@ -89,35 +90,34 @@
|
|
|
89
90
|
"file-type": "16.5.3",
|
|
90
91
|
"media-typer": "^1.1.0",
|
|
91
92
|
"strtok3": "^6.2.4",
|
|
92
|
-
"token-types": "^4.
|
|
93
|
+
"token-types": "^4.2.0"
|
|
93
94
|
},
|
|
94
95
|
"devDependencies": {
|
|
95
96
|
"@types/chai": "^4.3.0",
|
|
96
97
|
"@types/debug": "^4.1.7",
|
|
97
98
|
"@types/file-type": "^10.9.1",
|
|
98
99
|
"@types/mocha": "^9.1.0",
|
|
99
|
-
"@types/node": "^17.0.
|
|
100
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
101
|
-
"@typescript-eslint/parser": "^5.
|
|
100
|
+
"@types/node": "^17.0.21",
|
|
101
|
+
"@typescript-eslint/eslint-plugin": "^5.12.1",
|
|
102
|
+
"@typescript-eslint/parser": "^5.12.1",
|
|
102
103
|
"chai": "^4.3.6",
|
|
103
104
|
"coveralls": "^3.1.1",
|
|
104
105
|
"del-cli": "4.0.1",
|
|
105
|
-
"eslint": "^8.
|
|
106
|
-
"eslint-config-prettier": "^8.
|
|
106
|
+
"eslint": "^8.9.0",
|
|
107
|
+
"eslint-config-prettier": "^8.4.0",
|
|
107
108
|
"eslint-import-resolver-typescript": "^2.5.0",
|
|
108
109
|
"eslint-plugin-import": "^2.25.4",
|
|
109
|
-
"eslint-plugin-jsdoc": "^37.
|
|
110
|
+
"eslint-plugin-jsdoc": "^37.9.4",
|
|
110
111
|
"eslint-plugin-node": "^11.1.0",
|
|
111
|
-
"eslint-plugin-unicorn": "^
|
|
112
|
+
"eslint-plugin-unicorn": "^41.0.0",
|
|
112
113
|
"mime": "^3.0.0",
|
|
113
|
-
"mocha": "^9.2.
|
|
114
|
+
"mocha": "^9.2.1",
|
|
114
115
|
"npm-run-all": "^4.1.5",
|
|
115
116
|
"nyc": "^15.1.0",
|
|
116
|
-
"prettier": "^2.5.1",
|
|
117
117
|
"remark-cli": "^10.0.1",
|
|
118
118
|
"remark-preset-lint-recommended": "^6.1.2",
|
|
119
119
|
"source-map-support": "^0.5.21",
|
|
120
|
-
"ts-node": "^10.
|
|
120
|
+
"ts-node": "^10.5.0",
|
|
121
121
|
"typescript": "^4.5.5"
|
|
122
122
|
},
|
|
123
123
|
"engines": {
|