pst-extractor 1.8.0 → 1.10.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/dist/ColumnDescriptor.class.d.ts +26 -26
- package/dist/ColumnDescriptor.class.js +51 -48
- package/dist/DescriptorIndexNode.class.d.ts +25 -26
- package/dist/DescriptorIndexNode.class.js +53 -53
- package/dist/LZFu.class.d.ts +11 -12
- package/dist/LZFu.class.js +95 -95
- package/dist/NodeInfo.class.d.ts +33 -33
- package/dist/NodeInfo.class.js +52 -52
- package/dist/NodeMap.class.d.ts +35 -35
- package/dist/NodeMap.class.js +86 -83
- package/dist/OffsetIndexItem.class.d.ts +23 -24
- package/dist/OffsetIndexItem.class.js +45 -45
- package/dist/OutlookProperties.d.ts +275 -275
- package/dist/OutlookProperties.js +281 -281
- package/dist/PSTActivity.class.d.ts +103 -103
- package/dist/PSTActivity.class.js +144 -144
- package/dist/PSTAppointment.class.d.ts +270 -271
- package/dist/PSTAppointment.class.js +376 -376
- package/dist/PSTAttachment.class.d.ts +172 -172
- package/dist/PSTAttachment.class.js +317 -314
- package/dist/PSTContact.class.d.ts +884 -884
- package/dist/PSTContact.class.js +1227 -1227
- package/dist/PSTDescriptorItem.class.d.ts +45 -46
- package/dist/PSTDescriptorItem.class.js +99 -96
- package/dist/PSTFile.class.d.ts +215 -216
- package/dist/PSTFile.class.js +818 -792
- package/dist/PSTFolder.class.d.ts +129 -129
- package/dist/PSTFolder.class.js +318 -307
- package/dist/PSTMessage.class.d.ts +788 -789
- package/dist/PSTMessage.class.js +1321 -1318
- package/dist/PSTMessageStore.class.d.ts +13 -13
- package/dist/PSTMessageStore.class.js +17 -17
- package/dist/PSTNodeInputStream.class.d.ts +122 -123
- package/dist/PSTNodeInputStream.class.js +514 -488
- package/dist/PSTObject.class.d.ts +133 -134
- package/dist/PSTObject.class.js +326 -323
- package/dist/PSTRecipient.class.d.ts +65 -65
- package/dist/PSTRecipient.class.js +103 -103
- package/dist/PSTTable.class.d.ts +52 -52
- package/dist/PSTTable.class.js +175 -172
- package/dist/PSTTable7C.class.d.ts +45 -45
- package/dist/PSTTable7C.class.js +281 -278
- package/dist/PSTTableBC.class.d.ts +31 -31
- package/dist/PSTTableBC.class.js +111 -108
- package/dist/PSTTableItem.class.d.ts +47 -48
- package/dist/PSTTableItem.class.js +124 -121
- package/dist/PSTTask.class.d.ts +146 -146
- package/dist/PSTTask.class.js +205 -205
- package/dist/PSTUtil.class.d.ts +134 -135
- package/dist/PSTUtil.class.js +795 -790
- package/dist/RecurrencePattern.class.d.ts +49 -50
- package/dist/RecurrencePattern.class.js +120 -120
- package/dist/index.d.ts +6 -6
- package/dist/index.js +15 -15
- package/example/package.json +7 -7
- package/example/test-min.ts +31 -12
- package/example/{test-mem.ts → test.ts} +38 -30
- package/example/testdata/output.txt +278 -0
- package/example/testdata/outputBody.txt +3404 -0
- package/example/yarn.lock +112 -50
- package/junit.xml +36 -36
- package/package.json +28 -27
- package/readme.md +1 -3
- package/example/test-max.ts +0 -251
package/dist/NodeInfo.class.js
CHANGED
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NodeInfo = void 0;
|
|
4
|
-
class NodeInfo {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Seek to position in node input stream and read a long
|
|
34
|
-
* @param {long} offset
|
|
35
|
-
* @param {number} length
|
|
36
|
-
* @returns {long}
|
|
37
|
-
* @memberof NodeInfo
|
|
38
|
-
*/
|
|
39
|
-
seekAndReadLong(offset, length) {
|
|
40
|
-
return this.pstNodeInputStream.seekAndReadLong(offset.add(this.startOffset), length);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* JSON stringify the object properties.
|
|
44
|
-
* @returns {string}
|
|
45
|
-
* @memberof NodeInfo
|
|
46
|
-
*/
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
toJSON() {
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
exports.NodeInfo = NodeInfo;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NodeInfo = void 0;
|
|
4
|
+
class NodeInfo {
|
|
5
|
+
get startOffset() {
|
|
6
|
+
return this._startOffset;
|
|
7
|
+
}
|
|
8
|
+
get endOffset() {
|
|
9
|
+
return this._endOffset;
|
|
10
|
+
}
|
|
11
|
+
length() {
|
|
12
|
+
return this.endOffset - this.startOffset;
|
|
13
|
+
}
|
|
14
|
+
get pstNodeInputStream() {
|
|
15
|
+
return this._pstNodeInputStream;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Creates an instance of NodeInfo, part of the node table.
|
|
19
|
+
* @param {number} start
|
|
20
|
+
* @param {number} end
|
|
21
|
+
* @param {PSTNodeInputStream} pstNodeInputStream
|
|
22
|
+
* @memberof NodeInfo
|
|
23
|
+
*/
|
|
24
|
+
constructor(start, end, pstNodeInputStream) {
|
|
25
|
+
if (start > end) {
|
|
26
|
+
throw new Error(`NodeInfo:: constructor Invalid NodeInfo parameters: start ${start} is greater than end ${end}`);
|
|
27
|
+
}
|
|
28
|
+
this._startOffset = start;
|
|
29
|
+
this._endOffset = end;
|
|
30
|
+
this._pstNodeInputStream = pstNodeInputStream;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Seek to position in node input stream and read a long
|
|
34
|
+
* @param {long} offset
|
|
35
|
+
* @param {number} length
|
|
36
|
+
* @returns {long}
|
|
37
|
+
* @memberof NodeInfo
|
|
38
|
+
*/
|
|
39
|
+
seekAndReadLong(offset, length) {
|
|
40
|
+
return this.pstNodeInputStream.seekAndReadLong(offset.add(this.startOffset), length);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* JSON stringify the object properties.
|
|
44
|
+
* @returns {string}
|
|
45
|
+
* @memberof NodeInfo
|
|
46
|
+
*/
|
|
47
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
+
toJSON() {
|
|
49
|
+
return this;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
exports.NodeInfo = NodeInfo;
|
package/dist/NodeMap.class.d.ts
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import
|
|
2
|
-
/**
|
|
3
|
-
* Stores node names (both alpha and numeric) in node maps for quick lookup.
|
|
4
|
-
* @export
|
|
5
|
-
* @class NodeMap
|
|
6
|
-
*/
|
|
7
|
-
export declare class NodeMap {
|
|
8
|
-
private nameToId;
|
|
9
|
-
private idToNumericName;
|
|
10
|
-
private idToStringName;
|
|
11
|
-
/**
|
|
12
|
-
* Set a node into the map.
|
|
13
|
-
* @param {*} key
|
|
14
|
-
* @param {number} propId
|
|
15
|
-
* @param {number} [idx]
|
|
16
|
-
* @memberof NodeMap
|
|
17
|
-
*/
|
|
18
|
-
setId(key: any, propId: number, idx?: number): void;
|
|
19
|
-
/**
|
|
20
|
-
* Get a node from the map.
|
|
21
|
-
* @param {*} key
|
|
22
|
-
* @param {number} [idx]
|
|
23
|
-
* @returns {number}
|
|
24
|
-
* @memberof NodeMap
|
|
25
|
-
*/
|
|
26
|
-
getId(key: any, idx?: number): number;
|
|
27
|
-
/**
|
|
28
|
-
* Get a node from the map.
|
|
29
|
-
* @param {number} propId
|
|
30
|
-
* @returns {long}
|
|
31
|
-
* @memberof NodeMap
|
|
32
|
-
*/
|
|
33
|
-
getNumericName(propId: number):
|
|
34
|
-
private transformKey;
|
|
35
|
-
}
|
|
1
|
+
import Long from 'long';
|
|
2
|
+
/**
|
|
3
|
+
* Stores node names (both alpha and numeric) in node maps for quick lookup.
|
|
4
|
+
* @export
|
|
5
|
+
* @class NodeMap
|
|
6
|
+
*/
|
|
7
|
+
export declare class NodeMap {
|
|
8
|
+
private nameToId;
|
|
9
|
+
private idToNumericName;
|
|
10
|
+
private idToStringName;
|
|
11
|
+
/**
|
|
12
|
+
* Set a node into the map.
|
|
13
|
+
* @param {*} key
|
|
14
|
+
* @param {number} propId
|
|
15
|
+
* @param {number} [idx]
|
|
16
|
+
* @memberof NodeMap
|
|
17
|
+
*/
|
|
18
|
+
setId(key: any, propId: number, idx?: number): void;
|
|
19
|
+
/**
|
|
20
|
+
* Get a node from the map.
|
|
21
|
+
* @param {*} key
|
|
22
|
+
* @param {number} [idx]
|
|
23
|
+
* @returns {number}
|
|
24
|
+
* @memberof NodeMap
|
|
25
|
+
*/
|
|
26
|
+
getId(key: any, idx?: number): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get a node from the map.
|
|
29
|
+
* @param {number} propId
|
|
30
|
+
* @returns {long}
|
|
31
|
+
* @memberof NodeMap
|
|
32
|
+
*/
|
|
33
|
+
getNumericName(propId: number): Long | undefined;
|
|
34
|
+
private transformKey;
|
|
35
|
+
}
|
package/dist/NodeMap.class.js
CHANGED
|
@@ -1,83 +1,86 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
* @
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
*
|
|
45
|
-
* @
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
id = this.nameToId.get(key);
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.NodeMap = void 0;
|
|
7
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
|
+
const long_1 = __importDefault(require("long"));
|
|
9
|
+
/**
|
|
10
|
+
* Stores node names (both alpha and numeric) in node maps for quick lookup.
|
|
11
|
+
* @export
|
|
12
|
+
* @class NodeMap
|
|
13
|
+
*/
|
|
14
|
+
class NodeMap {
|
|
15
|
+
constructor() {
|
|
16
|
+
this.nameToId = new Map();
|
|
17
|
+
this.idToNumericName = new Map();
|
|
18
|
+
this.idToStringName = new Map();
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Set a node into the map.
|
|
22
|
+
* @param {*} key
|
|
23
|
+
* @param {number} propId
|
|
24
|
+
* @param {number} [idx]
|
|
25
|
+
* @memberof NodeMap
|
|
26
|
+
*/
|
|
27
|
+
setId(key, propId, idx) {
|
|
28
|
+
if (typeof key === 'number' && idx !== undefined) {
|
|
29
|
+
const lkey = this.transformKey(key, idx);
|
|
30
|
+
this.nameToId.set(lkey.toString(), propId);
|
|
31
|
+
this.idToNumericName.set(propId, lkey);
|
|
32
|
+
// console.log('NodeMap::setId: propId = ' + propId + ', lkey = ' + lkey.toString());
|
|
33
|
+
}
|
|
34
|
+
else if (typeof key === 'string') {
|
|
35
|
+
this.nameToId.set(key, propId);
|
|
36
|
+
this.idToStringName.set(propId, key);
|
|
37
|
+
// console.log('NodeMap::setId: propId = ' + propId + ', key = ' + key);
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
throw new Error('NodeMap::setId bad param type ' + typeof key);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Get a node from the map.
|
|
45
|
+
* @param {*} key
|
|
46
|
+
* @param {number} [idx]
|
|
47
|
+
* @returns {number}
|
|
48
|
+
* @memberof NodeMap
|
|
49
|
+
*/
|
|
50
|
+
getId(key, idx) {
|
|
51
|
+
let id = undefined;
|
|
52
|
+
if (typeof key === 'number' && idx) {
|
|
53
|
+
id = this.nameToId.get(this.transformKey(key, idx).toString());
|
|
54
|
+
}
|
|
55
|
+
else if (typeof key === 'string') {
|
|
56
|
+
id = this.nameToId.get(key);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error('NodeMap::getId bad param type ' + typeof key);
|
|
60
|
+
}
|
|
61
|
+
if (!id) {
|
|
62
|
+
return -1;
|
|
63
|
+
}
|
|
64
|
+
return id;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get a node from the map.
|
|
68
|
+
* @param {number} propId
|
|
69
|
+
* @returns {long}
|
|
70
|
+
* @memberof NodeMap
|
|
71
|
+
*/
|
|
72
|
+
getNumericName(propId) {
|
|
73
|
+
const lkey = this.idToNumericName.get(propId);
|
|
74
|
+
if (!lkey) {
|
|
75
|
+
// console.log("NodeMap::getNumericName Name to Id mapping not found, propId = " + propId);
|
|
76
|
+
}
|
|
77
|
+
return lkey;
|
|
78
|
+
}
|
|
79
|
+
transformKey(key, idx) {
|
|
80
|
+
let lidx = long_1.default.fromNumber(idx);
|
|
81
|
+
lidx = lidx.shiftLeft(32);
|
|
82
|
+
lidx = lidx.or(key);
|
|
83
|
+
return lidx;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.NodeMap = NodeMap;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
*
|
|
13
|
-
* @param {
|
|
14
|
-
* @
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
* @
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
1
|
+
import Long from 'long';
|
|
2
|
+
export declare class OffsetIndexItem {
|
|
3
|
+
private _indexIdentifier;
|
|
4
|
+
get indexIdentifier(): Long;
|
|
5
|
+
private _fileOffset;
|
|
6
|
+
get fileOffset(): Long;
|
|
7
|
+
private _size;
|
|
8
|
+
get size(): number;
|
|
9
|
+
private cRef;
|
|
10
|
+
/**
|
|
11
|
+
* Creates an instance of OffsetIndexItem, part of the node table.
|
|
12
|
+
* @param {Buffer} data
|
|
13
|
+
* @param {number} pstFileType
|
|
14
|
+
* @memberof OffsetIndexItem
|
|
15
|
+
*/
|
|
16
|
+
constructor(data: Buffer, pstFileType: number);
|
|
17
|
+
/**
|
|
18
|
+
* JSON stringify the object properties.
|
|
19
|
+
* @returns {string}
|
|
20
|
+
* @memberof OffsetIndexItem
|
|
21
|
+
*/
|
|
22
|
+
toJSON(): any;
|
|
23
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OffsetIndexItem = void 0;
|
|
4
|
-
const PSTFile_class_1 = require("./PSTFile.class");
|
|
5
|
-
const PSTUtil_class_1 = require("./PSTUtil.class");
|
|
6
|
-
class OffsetIndexItem {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* JSON stringify the object properties.
|
|
38
|
-
* @returns {string}
|
|
39
|
-
* @memberof OffsetIndexItem
|
|
40
|
-
*/
|
|
41
|
-
toJSON() {
|
|
42
|
-
return this;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.OffsetIndexItem = OffsetIndexItem;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OffsetIndexItem = void 0;
|
|
4
|
+
const PSTFile_class_1 = require("./PSTFile.class");
|
|
5
|
+
const PSTUtil_class_1 = require("./PSTUtil.class");
|
|
6
|
+
class OffsetIndexItem {
|
|
7
|
+
get indexIdentifier() {
|
|
8
|
+
return this._indexIdentifier;
|
|
9
|
+
}
|
|
10
|
+
get fileOffset() {
|
|
11
|
+
return this._fileOffset;
|
|
12
|
+
}
|
|
13
|
+
get size() {
|
|
14
|
+
return this._size;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Creates an instance of OffsetIndexItem, part of the node table.
|
|
18
|
+
* @param {Buffer} data
|
|
19
|
+
* @param {number} pstFileType
|
|
20
|
+
* @memberof OffsetIndexItem
|
|
21
|
+
*/
|
|
22
|
+
constructor(data, pstFileType) {
|
|
23
|
+
if (pstFileType == PSTFile_class_1.PSTFile.PST_TYPE_ANSI) {
|
|
24
|
+
this._indexIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 0, 4);
|
|
25
|
+
this._fileOffset = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 4, 8);
|
|
26
|
+
this._size = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 8, 10).toNumber();
|
|
27
|
+
this.cRef = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 10, 12);
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this._indexIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 0, 8);
|
|
31
|
+
this._fileOffset = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 8, 16);
|
|
32
|
+
this._size = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 16, 18).toNumber();
|
|
33
|
+
this.cRef = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, 16, 18);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* JSON stringify the object properties.
|
|
38
|
+
* @returns {string}
|
|
39
|
+
* @memberof OffsetIndexItem
|
|
40
|
+
*/
|
|
41
|
+
toJSON() {
|
|
42
|
+
return this;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.OffsetIndexItem = OffsetIndexItem;
|