node-apk
Advanced tools
Comparing version 1.1.1 to 1.2.0
@@ -14,3 +14,3 @@ "use strict"; | ||
if (f) throw new TypeError("Generator is already executing."); | ||
while (_) try { | ||
while (g && (g = 0, op[0] && (_ = 0)), _) try { | ||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; | ||
@@ -17,0 +17,0 @@ if (y = 0, t) op = [op[0] & 2, t.value]; |
"use strict"; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from) { | ||
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) | ||
to[j] = from[i]; | ||
return to; | ||
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) { | ||
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { | ||
if (ar || !(i in from)) { | ||
if (!ar) ar = Array.prototype.slice.call(from, 0, i); | ||
ar[i] = from[i]; | ||
} | ||
} | ||
return to.concat(ar || Array.prototype.slice.call(from)); | ||
}; | ||
@@ -20,3 +24,2 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
function CertificateStore() { | ||
var _this = this; | ||
var certificates = []; | ||
@@ -26,2 +29,3 @@ for (var _i = 0; _i < arguments.length; _i++) { | ||
} | ||
var _this = this; | ||
this.store = new Map(); | ||
@@ -79,3 +83,3 @@ certificates.forEach(function (cert) { return _this.store.set(cert.subject.hash, cert); }); | ||
} | ||
var store = new (CertificateStore.bind.apply(CertificateStore, __spreadArray([void 0], certificates)))(); | ||
var store = new (CertificateStore.bind.apply(CertificateStore, __spreadArray([void 0], certificates, false)))(); | ||
return store.leaves().map(function (leaf) { return store.chain(leaf, function (cert, parent) { return new Certificate(cert, parent); }); }); | ||
@@ -82,0 +86,0 @@ }; |
@@ -37,3 +37,3 @@ "use strict"; | ||
else { | ||
throw Error("Found incorrect chunk type: " + this.type + ", expected: " + chunkType); | ||
throw Error("Found incorrect chunk type: ".concat(this.type, ", expected: ").concat(chunkType)); | ||
} | ||
@@ -40,0 +40,0 @@ } |
@@ -118,3 +118,3 @@ "use strict"; | ||
this.index = source.readUInt(); | ||
this.value = this.flags % 2 === 0 ? common_1.parseResourceValue(source, stringPool) : null; | ||
this.value = this.flags % 2 === 0 ? (0, common_1.parseResourceValue)(source, stringPool) : null; | ||
} | ||
@@ -121,0 +121,0 @@ return TableEntry; |
/// <reference types="node" /> | ||
/// <reference types="node" /> | ||
import { Readable } from "stream"; | ||
@@ -3,0 +4,0 @@ export default class Source { |
@@ -15,3 +15,3 @@ "use strict"; | ||
source.getCursorAndMove(4); // rawValue | ||
this.value = common_1.parseResourceValue(source, stringPool); | ||
this.value = (0, common_1.parseResourceValue)(source, stringPool); | ||
} | ||
@@ -18,0 +18,0 @@ return XmlAttribute; |
/// <reference types="node" /> | ||
export declare type BufferLoader = () => Promise<Buffer>; | ||
/// <reference types="node" /> | ||
export type BufferLoader = () => Promise<Buffer>; | ||
export declare class ZipEntry { | ||
@@ -4,0 +5,0 @@ static lookup(loader: BufferLoader, key: string): Promise<ZipEntry>; |
@@ -29,3 +29,3 @@ "use strict"; | ||
if (this.signature !== signature) { | ||
throw Error("Invalid file header signature found: 0x" + this.signature.toString(16)); | ||
throw Error("Invalid file header signature found: 0x".concat(this.signature.toString(16))); | ||
} | ||
@@ -93,3 +93,3 @@ this.versionMadeBy = this.signature === Signature.CENTRAL_HEADER ? source.readUShort() : 0; | ||
else { | ||
throw Error("Unsupported compression method: 0x" + this.compressionMethod.toString(16)); | ||
throw Error("Unsupported compression method: 0x".concat(this.compressionMethod.toString(16))); | ||
} | ||
@@ -96,0 +96,0 @@ }; |
{ | ||
"name": "node-apk", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "A library to parse Android application manifest and signature", | ||
@@ -28,16 +28,16 @@ "main": "build/lib/index.js", | ||
"devDependencies": { | ||
"@types/jest": "^26.0.23", | ||
"@types/node": "^14.14.35", | ||
"@types/node-forge": "^0.9.7", | ||
"@typescript-eslint/eslint-plugin": "^4.18.0", | ||
"@typescript-eslint/parser": "^4.18.0", | ||
"eslint": "^7.22.0", | ||
"jest": "^27.0.6", | ||
"ts-jest": "^27.0.3", | ||
"ts-node": "^10.0.0", | ||
"typescript": "^4.2.3" | ||
"@types/jest": "^29.2.3", | ||
"@types/node": "^18.11.10", | ||
"@types/node-forge": "^1.3.1", | ||
"@typescript-eslint/eslint-plugin": "^5.45.0", | ||
"@typescript-eslint/parser": "^5.45.0", | ||
"eslint": "^8.28.0", | ||
"jest": "^29.3.1", | ||
"ts-jest": "^29.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.3" | ||
}, | ||
"dependencies": { | ||
"node-forge": "^0.10.0" | ||
"node-forge": "^1.3.1" | ||
} | ||
} |
91923
35
2072
+ Addednode-forge@1.3.1(transitive)
- Removednode-forge@0.10.0(transitive)
Updatednode-forge@^1.3.1