pst-extractor 1.9.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.
Files changed (59) hide show
  1. package/dist/ColumnDescriptor.class.d.ts +26 -26
  2. package/dist/ColumnDescriptor.class.js +51 -51
  3. package/dist/DescriptorIndexNode.class.d.ts +25 -26
  4. package/dist/DescriptorIndexNode.class.js +53 -53
  5. package/dist/LZFu.class.d.ts +11 -12
  6. package/dist/LZFu.class.js +95 -95
  7. package/dist/NodeInfo.class.d.ts +33 -33
  8. package/dist/NodeInfo.class.js +52 -52
  9. package/dist/NodeMap.class.d.ts +35 -35
  10. package/dist/NodeMap.class.js +86 -86
  11. package/dist/OffsetIndexItem.class.d.ts +23 -24
  12. package/dist/OffsetIndexItem.class.js +45 -45
  13. package/dist/OutlookProperties.d.ts +275 -275
  14. package/dist/OutlookProperties.js +281 -281
  15. package/dist/PSTActivity.class.d.ts +103 -103
  16. package/dist/PSTActivity.class.js +144 -144
  17. package/dist/PSTAppointment.class.d.ts +270 -271
  18. package/dist/PSTAppointment.class.js +376 -376
  19. package/dist/PSTAttachment.class.d.ts +172 -172
  20. package/dist/PSTAttachment.class.js +317 -317
  21. package/dist/PSTContact.class.d.ts +884 -884
  22. package/dist/PSTContact.class.js +1227 -1227
  23. package/dist/PSTDescriptorItem.class.d.ts +45 -46
  24. package/dist/PSTDescriptorItem.class.js +99 -99
  25. package/dist/PSTFile.class.d.ts +215 -216
  26. package/dist/PSTFile.class.js +818 -818
  27. package/dist/PSTFolder.class.d.ts +129 -129
  28. package/dist/PSTFolder.class.js +318 -310
  29. package/dist/PSTMessage.class.d.ts +788 -789
  30. package/dist/PSTMessage.class.js +1321 -1321
  31. package/dist/PSTMessageStore.class.d.ts +13 -13
  32. package/dist/PSTMessageStore.class.js +17 -17
  33. package/dist/PSTNodeInputStream.class.d.ts +122 -123
  34. package/dist/PSTNodeInputStream.class.js +514 -514
  35. package/dist/PSTObject.class.d.ts +133 -134
  36. package/dist/PSTObject.class.js +326 -326
  37. package/dist/PSTRecipient.class.d.ts +65 -65
  38. package/dist/PSTRecipient.class.js +103 -103
  39. package/dist/PSTTable.class.d.ts +52 -52
  40. package/dist/PSTTable.class.js +175 -175
  41. package/dist/PSTTable7C.class.d.ts +45 -45
  42. package/dist/PSTTable7C.class.js +281 -281
  43. package/dist/PSTTableBC.class.d.ts +31 -31
  44. package/dist/PSTTableBC.class.js +111 -111
  45. package/dist/PSTTableItem.class.d.ts +47 -48
  46. package/dist/PSTTableItem.class.js +124 -124
  47. package/dist/PSTTask.class.d.ts +146 -146
  48. package/dist/PSTTask.class.js +205 -205
  49. package/dist/PSTUtil.class.d.ts +134 -135
  50. package/dist/PSTUtil.class.js +795 -795
  51. package/dist/RecurrencePattern.class.d.ts +49 -50
  52. package/dist/RecurrencePattern.class.js +120 -120
  53. package/dist/index.d.ts +6 -6
  54. package/dist/index.js +15 -15
  55. package/example/package.json +6 -6
  56. package/example/yarn.lock +95 -44
  57. package/junit.xml +68 -68
  58. package/package.json +26 -26
  59. package/readme.md +1 -3
@@ -1,46 +1,45 @@
1
- /// <reference types="node" />
2
- import { PSTFile } from './PSTFile.class';
3
- export declare class PSTDescriptorItem {
4
- private dataBlockData;
5
- private dataBlockOffsets;
6
- private _pstFile;
7
- private _subNodeOffsetIndexIdentifier;
8
- get subNodeOffsetIndexIdentifier(): number;
9
- private _descriptorIdentifier;
10
- get descriptorIdentifier(): number;
11
- private _offsetIndexIdentifier;
12
- get offsetIndexIdentifier(): number;
13
- /**
14
- * Creates an instance of PSTDescriptorItem.
15
- * @param {Buffer} data
16
- * @param {number} offset
17
- * @param {PSTFile} pstFile
18
- * @memberof PSTDescriptorItem
19
- */
20
- constructor(data: Buffer, offset: number, pstFile: PSTFile);
21
- /**
22
- * Get a node input stream from the offset index and read into a buffer.
23
- * @returns {Buffer}
24
- * @memberof PSTDescriptorItem
25
- */
26
- getData(): Buffer;
27
- /**
28
- * Get block offsets within current file.
29
- * @returns {number[]}
30
- * @memberof PSTDescriptorItem
31
- */
32
- getBlockOffsets(): number[];
33
- /**
34
- * Get the size of this this leaf of the b-tree.
35
- * @readonly
36
- * @type {number}
37
- * @memberof PSTDescriptorItem
38
- */
39
- get dataSize(): number;
40
- /**
41
- * JSON stringify the object properties.
42
- * @returns {string}
43
- * @memberof PSTDescriptorItem
44
- */
45
- toJSON(): any;
46
- }
1
+ import { PSTFile } from './PSTFile.class';
2
+ export declare class PSTDescriptorItem {
3
+ private dataBlockData;
4
+ private dataBlockOffsets;
5
+ private _pstFile;
6
+ private _subNodeOffsetIndexIdentifier;
7
+ get subNodeOffsetIndexIdentifier(): number;
8
+ private _descriptorIdentifier;
9
+ get descriptorIdentifier(): number;
10
+ private _offsetIndexIdentifier;
11
+ get offsetIndexIdentifier(): number;
12
+ /**
13
+ * Creates an instance of PSTDescriptorItem.
14
+ * @param {Buffer} data
15
+ * @param {number} offset
16
+ * @param {PSTFile} pstFile
17
+ * @memberof PSTDescriptorItem
18
+ */
19
+ constructor(data: Buffer, offset: number, pstFile: PSTFile);
20
+ /**
21
+ * Get a node input stream from the offset index and read into a buffer.
22
+ * @returns {Buffer}
23
+ * @memberof PSTDescriptorItem
24
+ */
25
+ getData(): Buffer;
26
+ /**
27
+ * Get block offsets within current file.
28
+ * @returns {number[]}
29
+ * @memberof PSTDescriptorItem
30
+ */
31
+ getBlockOffsets(): number[];
32
+ /**
33
+ * Get the size of this this leaf of the b-tree.
34
+ * @readonly
35
+ * @type {number}
36
+ * @memberof PSTDescriptorItem
37
+ */
38
+ get dataSize(): number;
39
+ /**
40
+ * JSON stringify the object properties.
41
+ * @returns {string}
42
+ * @memberof PSTDescriptorItem
43
+ */
44
+ toJSON(): any;
45
+ }
@@ -1,99 +1,99 @@
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.PSTDescriptorItem = void 0;
7
- /* eslint-disable @typescript-eslint/no-explicit-any */
8
- const long_1 = __importDefault(require("long"));
9
- const PSTUtil_class_1 = require("./PSTUtil.class");
10
- const PSTFile_class_1 = require("./PSTFile.class");
11
- class PSTDescriptorItem {
12
- /**
13
- * Creates an instance of PSTDescriptorItem.
14
- * @param {Buffer} data
15
- * @param {number} offset
16
- * @param {PSTFile} pstFile
17
- * @memberof PSTDescriptorItem
18
- */
19
- constructor(data, offset, pstFile) {
20
- this.dataBlockData = null;
21
- this.dataBlockOffsets = [];
22
- this._pstFile = pstFile;
23
- if (pstFile.pstFileType == PSTFile_class_1.PSTFile.PST_TYPE_ANSI) {
24
- this._descriptorIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset, offset + 4).toNumber();
25
- this._offsetIndexIdentifier =
26
- PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 4, offset + 8).toNumber() & 0xfffffffe;
27
- this._subNodeOffsetIndexIdentifier =
28
- PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 8, offset + 12).toNumber() & 0xfffffffe;
29
- }
30
- else {
31
- this._descriptorIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset, offset + 4).toNumber();
32
- this._offsetIndexIdentifier =
33
- PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 8, offset + 16).toNumber() & 0xfffffffe;
34
- this._subNodeOffsetIndexIdentifier =
35
- PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 16, offset + 24).toNumber() & 0xfffffffe;
36
- }
37
- }
38
- get subNodeOffsetIndexIdentifier() {
39
- return this._subNodeOffsetIndexIdentifier;
40
- }
41
- get descriptorIdentifier() {
42
- return this._descriptorIdentifier;
43
- }
44
- get offsetIndexIdentifier() {
45
- return this._offsetIndexIdentifier;
46
- }
47
- /**
48
- * Get a node input stream from the offset index and read into a buffer.
49
- * @returns {Buffer}
50
- * @memberof PSTDescriptorItem
51
- */
52
- getData() {
53
- if (this.dataBlockData != null) {
54
- return this.dataBlockData;
55
- }
56
- const pstNodeInputStream = this._pstFile.readLeaf(long_1.default.fromValue(this.offsetIndexIdentifier));
57
- const out = Buffer.alloc(pstNodeInputStream.length.toNumber());
58
- pstNodeInputStream.readCompletely(out);
59
- this.dataBlockData = out;
60
- return this.dataBlockData;
61
- }
62
- /**
63
- * Get block offsets within current file.
64
- * @returns {number[]}
65
- * @memberof PSTDescriptorItem
66
- */
67
- getBlockOffsets() {
68
- debugger;
69
- if (this.dataBlockOffsets != null) {
70
- return this.dataBlockOffsets;
71
- }
72
- const offsets = this._pstFile
73
- .readLeaf(long_1.default.fromNumber(this.offsetIndexIdentifier))
74
- .getBlockOffsets();
75
- const offsetsOut = [];
76
- for (let x = 0; x < offsets.length; x++) {
77
- offsetsOut[x] = offsets[x].toNumber();
78
- }
79
- return offsetsOut;
80
- }
81
- /**
82
- * Get the size of this this leaf of the b-tree.
83
- * @readonly
84
- * @type {number}
85
- * @memberof PSTDescriptorItem
86
- */
87
- get dataSize() {
88
- return this._pstFile.getLeafSize(long_1.default.fromNumber(this.offsetIndexIdentifier));
89
- }
90
- /**
91
- * JSON stringify the object properties.
92
- * @returns {string}
93
- * @memberof PSTDescriptorItem
94
- */
95
- toJSON() {
96
- return this;
97
- }
98
- }
99
- exports.PSTDescriptorItem = PSTDescriptorItem;
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.PSTDescriptorItem = void 0;
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ const long_1 = __importDefault(require("long"));
9
+ const PSTUtil_class_1 = require("./PSTUtil.class");
10
+ const PSTFile_class_1 = require("./PSTFile.class");
11
+ class PSTDescriptorItem {
12
+ get subNodeOffsetIndexIdentifier() {
13
+ return this._subNodeOffsetIndexIdentifier;
14
+ }
15
+ get descriptorIdentifier() {
16
+ return this._descriptorIdentifier;
17
+ }
18
+ get offsetIndexIdentifier() {
19
+ return this._offsetIndexIdentifier;
20
+ }
21
+ /**
22
+ * Creates an instance of PSTDescriptorItem.
23
+ * @param {Buffer} data
24
+ * @param {number} offset
25
+ * @param {PSTFile} pstFile
26
+ * @memberof PSTDescriptorItem
27
+ */
28
+ constructor(data, offset, pstFile) {
29
+ this.dataBlockData = null;
30
+ this.dataBlockOffsets = [];
31
+ this._pstFile = pstFile;
32
+ if (pstFile.pstFileType == PSTFile_class_1.PSTFile.PST_TYPE_ANSI) {
33
+ this._descriptorIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset, offset + 4).toNumber();
34
+ this._offsetIndexIdentifier =
35
+ PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 4, offset + 8).toNumber() & 0xfffffffe;
36
+ this._subNodeOffsetIndexIdentifier =
37
+ PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 8, offset + 12).toNumber() & 0xfffffffe;
38
+ }
39
+ else {
40
+ this._descriptorIdentifier = PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset, offset + 4).toNumber();
41
+ this._offsetIndexIdentifier =
42
+ PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 8, offset + 16).toNumber() & 0xfffffffe;
43
+ this._subNodeOffsetIndexIdentifier =
44
+ PSTUtil_class_1.PSTUtil.convertLittleEndianBytesToLong(data, offset + 16, offset + 24).toNumber() & 0xfffffffe;
45
+ }
46
+ }
47
+ /**
48
+ * Get a node input stream from the offset index and read into a buffer.
49
+ * @returns {Buffer}
50
+ * @memberof PSTDescriptorItem
51
+ */
52
+ getData() {
53
+ if (this.dataBlockData != null) {
54
+ return this.dataBlockData;
55
+ }
56
+ const pstNodeInputStream = this._pstFile.readLeaf(long_1.default.fromValue(this.offsetIndexIdentifier));
57
+ const out = Buffer.alloc(pstNodeInputStream.length.toNumber());
58
+ pstNodeInputStream.readCompletely(out);
59
+ this.dataBlockData = out;
60
+ return this.dataBlockData;
61
+ }
62
+ /**
63
+ * Get block offsets within current file.
64
+ * @returns {number[]}
65
+ * @memberof PSTDescriptorItem
66
+ */
67
+ getBlockOffsets() {
68
+ debugger;
69
+ if (this.dataBlockOffsets != null) {
70
+ return this.dataBlockOffsets;
71
+ }
72
+ const offsets = this._pstFile
73
+ .readLeaf(long_1.default.fromNumber(this.offsetIndexIdentifier))
74
+ .getBlockOffsets();
75
+ const offsetsOut = [];
76
+ for (let x = 0; x < offsets.length; x++) {
77
+ offsetsOut[x] = offsets[x].toNumber();
78
+ }
79
+ return offsetsOut;
80
+ }
81
+ /**
82
+ * Get the size of this this leaf of the b-tree.
83
+ * @readonly
84
+ * @type {number}
85
+ * @memberof PSTDescriptorItem
86
+ */
87
+ get dataSize() {
88
+ return this._pstFile.getLeafSize(long_1.default.fromNumber(this.offsetIndexIdentifier));
89
+ }
90
+ /**
91
+ * JSON stringify the object properties.
92
+ * @returns {string}
93
+ * @memberof PSTDescriptorItem
94
+ */
95
+ toJSON() {
96
+ return this;
97
+ }
98
+ }
99
+ exports.PSTDescriptorItem = PSTDescriptorItem;