keynote-parser2
Advanced tools
@@ -8,3 +8,3 @@ "use strict"; | ||
| const varint_1 = __importDefault(require("varint")); | ||
| const proto_1 = __importDefault(require("#proto/proto")); | ||
| const proto_1 = __importDefault(require("../../proto/proto")); | ||
| const utils_1 = require("../utils"); | ||
@@ -19,5 +19,5 @@ /** | ||
| const archiveInfoBufferLength = varint_1.default.decode(data, cursor); | ||
| // get the archive info buffer | ||
| const archiveInfoBufferStart = cursor + varint_1.default.decode.bytes; | ||
| const archiveInfoBufferEnd = archiveInfoBufferStart + archiveInfoBufferLength; | ||
| // get the archive info buffer | ||
| const archiveInfoBuffer = data.subarray(archiveInfoBufferStart, archiveInfoBufferEnd); | ||
@@ -24,0 +24,0 @@ // decode to get the archive info |
@@ -11,2 +11,3 @@ "use strict"; | ||
| const parseIwaProtobuf = (data) => { | ||
| // parse the protobuf data one by one and store them in an object | ||
| const iwaData = {}; | ||
@@ -13,0 +14,0 @@ let cursor = 0; |
@@ -24,6 +24,5 @@ "use strict"; | ||
| const chunkBufferLength = data.readUintLE(cursor + 1, 3); | ||
| // length of the whole frame | ||
| // get the snappy compressed chunk data | ||
| const chunkBufferStart = cursor + 4; | ||
| const chunkBufferEnd = chunkBufferStart + chunkBufferLength; | ||
| // the snappy compressed chunk data | ||
| const chunkBuffer = data.subarray(chunkBufferStart, chunkBufferEnd); | ||
@@ -30,0 +29,0 @@ // uncompress the chunk data |
@@ -11,3 +11,3 @@ "use strict"; | ||
| const parseIwaSnappy = (data) => { | ||
| // unpack the snappy frames one by one | ||
| // unpack the snappy frames one by one and concat them | ||
| const chunks = []; | ||
@@ -14,0 +14,0 @@ let cursor = 0; |
@@ -16,3 +16,3 @@ "use strict"; | ||
| */ | ||
| const parse = async (inputPath, outputPath = `${inputPath}.unzipped`) => { | ||
| const parse = async (inputPath, outputPath = `${inputPath}.parsed`) => { | ||
| // avoid output path conflict | ||
@@ -19,0 +19,0 @@ if (await fs_extra_1.default.pathExists(outputPath)) { |
+1
-1
@@ -1,2 +0,2 @@ | ||
| import type proto from '#proto/proto'; | ||
| import type proto from '../proto/proto'; | ||
| export interface IwaData { | ||
@@ -3,0 +3,0 @@ [archiveInfoIdentifier: string]: IwaArchiveInfoData; |
@@ -1,2 +0,2 @@ | ||
| import proto from '#proto/proto'; | ||
| import proto from '../../proto/proto'; | ||
| /** | ||
@@ -3,0 +3,0 @@ * Get the proto class for the given message info. |
@@ -8,4 +8,4 @@ "use strict"; | ||
| const lodash_get_1 = __importDefault(require("lodash.get")); | ||
| const message_type_proto_name_map_1 = __importDefault(require("#proto/message-type-proto-name-map")); | ||
| const proto_1 = __importDefault(require("#proto/proto")); | ||
| const message_type_proto_name_map_1 = __importDefault(require("../../proto/message-type-proto-name-map")); | ||
| const proto_1 = __importDefault(require("../../proto/proto")); | ||
| /** | ||
@@ -12,0 +12,0 @@ * Get the proto class for the given message info. |
+1
-4
| { | ||
| "name": "keynote-parser2", | ||
| "version": "0.3.0", | ||
| "version": "0.4.0", | ||
| "description": "A library for parsing Apple Keynote file", | ||
@@ -12,5 +12,2 @@ "keywords": [ | ||
| "type": "commonjs", | ||
| "imports": { | ||
| "#proto/*": "./proto/*" | ||
| }, | ||
| "exports": { | ||
@@ -17,0 +14,0 @@ ".": "./lib/index.js", |
@@ -1,6 +0,5 @@ | ||
| declare module '#proto/message-type-proto-name-map' { | ||
| declare const messageTypeProtoNameMap: { | ||
| [key: string | number]: string; | ||
| }; | ||
| export default messageTypeProtoNameMap; | ||
| } | ||
| declare const messageTypeProtoNameMap: { | ||
| [key: string | number]: string; | ||
| }; | ||
| export default messageTypeProtoNameMap; |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
32921198
03015
-0.03%