New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

r2-streamer-js

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

r2-streamer-js - npm Package Compare versions

Comparing version 0.0.1-alpha1 to 0.0.1-alpha10

dist/src/cli.d.ts

39

dist/src/cli.js
"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -16,19 +8,2 @@ const cbz_1 = require("./parser/cbz");

const util = require("util");
function sortObject(obj) {
if (obj instanceof Array) {
for (let i = 0; i < obj.length; i++) {
obj[i] = sortObject(obj[i]);
}
return obj;
}
else if (typeof obj !== "object") {
return obj;
}
const newObj = {};
Object.keys(obj).sort().forEach((key) => {
newObj[key] = sortObject(obj[key]);
});
return newObj;
}
exports.sortObject = sortObject;
console.log("process.cwd():");

@@ -63,6 +38,6 @@ console.log(process.cwd());

if (ext === ".epub") {
processEPUB(filePath)
epub_1.EpubParser.load(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
dumpPublication(publication);
}).catch((err) => {

@@ -74,3 +49,3 @@ console.log("== EpubParser: reject");

else if (ext === ".cbz") {
new cbz_1.CbzParser().Parse(filePath)
cbz_1.CbzParser.load(filePath)
.then((publication) => {

@@ -99,10 +74,2 @@ console.log("== CbzParser: resolve");

exports.dumpPublication = dumpPublication;
function processEPUB(path) {
return __awaiter(this, void 0, void 0, function* () {
const parser = new epub_1.EpubParser();
const publication = yield parser.Parse(path);
return publication;
});
}
exports.processEPUB = processEPUB;
// console.log("~~~~~~~~~~~~~~~");

@@ -109,0 +76,0 @@ // const meta1 = new Metadata();

@@ -38,3 +38,6 @@ "use strict";

__decorate([
ta_json_1.OnDeserialized(),
ta_json_1.OnDeserialized()
// tslint:disable-next-line:no-unused-variable
// tslint:disable-next-line
,
__metadata("design:type", Function),

@@ -41,0 +44,0 @@ __metadata("design:paramtypes", []),

@@ -38,3 +38,5 @@ "use strict";

__decorate([
ta_json_1.OnDeserialized(),
ta_json_1.OnDeserialized()
// tslint:disable-next-line:no-unused-variable
,
__metadata("design:type", Function),

@@ -41,0 +43,0 @@ __metadata("design:paramtypes", []),

@@ -159,3 +159,5 @@ "use strict";

__decorate([
ta_json_1.OnDeserialized(),
ta_json_1.OnDeserialized()
// tslint:disable-next-line:no-unused-variable
,
__metadata("design:type", Function),

@@ -162,0 +164,0 @@ __metadata("design:paramtypes", []),

@@ -73,3 +73,5 @@ "use strict";

__decorate([
ta_json_1.OnDeserialized(),
ta_json_1.OnDeserialized()
// tslint:disable-next-line:no-unused-variable
,
__metadata("design:type", Function),

@@ -76,0 +78,0 @@ __metadata("design:paramtypes", []),

@@ -239,3 +239,5 @@ "use strict";

__decorate([
ta_json_1.OnDeserialized(),
ta_json_1.OnDeserialized()
// tslint:disable-next-line:no-unused-variable
,
__metadata("design:type", Function),

@@ -242,0 +244,0 @@ __metadata("design:paramtypes", []),

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -15,2 +23,9 @@ const mime = require("mime-types");

class CbzParser {
static load(path) {
return __awaiter(this, void 0, void 0, function* () {
const parser = new CbzParser();
const publication = yield parser.Parse(path);
return publication;
});
}
Parse(filePath) {

@@ -17,0 +32,0 @@ const zipPromise = zip_1.createZipPromise(filePath);

"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
Object.defineProperty(exports, "__esModule", { value: true });

@@ -34,4 +42,4 @@ const moment = require("moment");

this.epub31 = "3.1";
this.epub2 = "2.0";
this.epub201 = "2.0.1";
// private epub2 = "2.0";
// private epub201 = "2.0.1";
this.autoMeta = "auto";

@@ -41,2 +49,9 @@ this.noneMeta = "none";

}
static load(path) {
return __awaiter(this, void 0, void 0, function* () {
const parser = new EpubParser();
const publication = yield parser.Parse(path);
return publication;
});
}
static get mediaOverlayURLPath() {

@@ -108,3 +123,3 @@ return "media-overlay";

// { showHidden: false, depth: 1000, colors: true, customInspect: true }));
const epubVersion = this.getEpubVersion(rootfile, opf);
// const epubVersion = this.getEpubVersion(rootfile, opf);
let ncx;

@@ -425,3 +440,3 @@ opf.Manifest.forEach((manifestItem) => {

let role;
const epubVersion = this.getEpubVersion(rootfile, opf);
// const epubVersion = this.getEpubVersion(rootfile, opf);
if (this.isEpub3OrMore(rootfile, opf)) {

@@ -549,3 +564,3 @@ const meta = this.findMetaByRefineAndProperty(rootfile, opf, cont.ID, "role");

}
addIdentifier(publication, rootfile, opf) {
addIdentifier(publication, _rootfile, opf) {
if (opf.Metadata && opf.Metadata.Identifier) {

@@ -751,2 +766,5 @@ if (opf.UniqueIdentifier && opf.Metadata.Identifier.length > 1) {

}
default: {
break;
}
}

@@ -789,3 +807,3 @@ if (propertiesStruct.Layout ||

}
addRendition(publication, rootfile, opf) {
addRendition(publication, _rootfile, opf) {
if (opf.Metadata && opf.Metadata.Meta && opf.Metadata.Meta.length) {

@@ -816,2 +834,5 @@ const rendition = new metadata_properties_1.Properties();

}
default: {
break;
}
}

@@ -855,3 +876,3 @@ });

}
fillEncryptionInfo(publication, rootfile, opf, encryption, lcp) {
fillEncryptionInfo(publication, rootfile, _opf, encryption, lcp) {
encryption.EncryptedData.forEach((encInfo) => {

@@ -879,3 +900,3 @@ const encrypted = new metadata_encrypted_1.Encrypted();

}
publication.Resources.forEach((l, i, arr) => {
publication.Resources.forEach((l, _i, _arr) => {
const filePath = path.join(path.dirname(rootfile.Path), l.Href);

@@ -889,3 +910,3 @@ if (filePath === encInfo.CipherData.CipherReference.URI) {

});
publication.Spine.forEach((l, i, arr) => {
publication.Spine.forEach((l, _i, _arr) => {
const filePath = path.join(path.dirname(rootfile.Path), l.Href);

@@ -912,3 +933,3 @@ if (filePath === encInfo.CipherData.CipherReference.URI) {

}
fillPageListFromNCX(publication, rootfile, opf, ncx) {
fillPageListFromNCX(publication, _rootfile, _opf, ncx) {
if (ncx.PageList && ncx.PageList.PageTarget && ncx.PageList.PageTarget.length) {

@@ -936,3 +957,3 @@ ncx.PageList.PageTarget.forEach((pageTarget) => {

}
fillLandmarksFromGuide(publication, rootfile, opf) {
fillLandmarksFromGuide(publication, _rootfile, opf) {
if (opf.Guide && opf.Guide.length) {

@@ -966,3 +987,3 @@ opf.Guide.forEach((ref) => {

}
fillSubject(publication, rootfile, opf) {
fillSubject(publication, _rootfile, opf) {
if (opf.Metadata && opf.Metadata.Subject && opf.Metadata.Subject.length) {

@@ -981,3 +1002,3 @@ opf.Metadata.Subject.forEach((s) => {

}
fillCalibreSerieInfo(publication, rootfile, opf) {
fillCalibreSerieInfo(publication, _rootfile, opf) {
let serie;

@@ -1010,3 +1031,3 @@ let seriePosition;

}
fillTOCFromNavDoc(publication, rootfile, opf, zip) {
fillTOCFromNavDoc(publication, rootfile, _opf, zip) {
const navLink = publication.GetNavDoc();

@@ -1069,2 +1090,5 @@ if (!navLink) {

}
default: {
break;
}
}

@@ -1123,3 +1147,3 @@ }

if (manifestInfo && manifestInfo.Href && publication.Resources && publication.Resources.length) {
publication.Resources.find((item, i, arr) => {
publication.Resources.find((item, i, _arr) => {
if (item.Href === manifestInfo.Href) {

@@ -1134,3 +1158,3 @@ publication.Resources[i].AddRel("cover");

}
findPropertiesInSpineForManifest(linkEpub, rootfile, opf) {
findPropertiesInSpineForManifest(linkEpub, _rootfile, opf) {
if (opf.Spine && opf.Spine.Items && opf.Spine.Items.length) {

@@ -1170,3 +1194,3 @@ const it = opf.Spine.Items.find((item) => {

}
findAllMetaByRefineAndProperty(rootfile, opf, ID, property) {
findAllMetaByRefineAndProperty(_rootfile, opf, ID, property) {
const metas = [];

@@ -1196,3 +1220,3 @@ const refineID = "#" + ID;

}
findLinKByHref(publication, rootfile, opf, href) {
findLinKByHref(publication, rootfile, _opf, href) {
if (publication.Spine && publication.Spine.length) {

@@ -1199,0 +1223,0 @@ const ll = publication.Spine.find((l) => {

@@ -14,2 +14,3 @@ "use strict";

super(...arguments);
// tslint:disable-next-line:no-unused-variable
this.isBody = true;

@@ -16,0 +17,0 @@ }

@@ -15,3 +15,3 @@ "use strict";

});
zip.on("entry", (entry) => {
zip.on("entry", (_entry) => {
// console.log("--ZIP: entry");

@@ -18,0 +18,0 @@ // console.log(entry.name);

@@ -7,3 +7,3 @@ "use strict";

const morgan = require("morgan");
const fs = require("fs");
const querystring = require("querystring");
const path = require("path");

@@ -13,289 +13,252 @@ const util = require("util");

const epub_1 = require("./parser/epub");
const cli_1 = require("./cli");
console.log("process.cwd():");
console.log(process.cwd());
console.log("__dirname:");
console.log(__dirname);
const args = process.argv.slice(2);
console.log("args:");
console.log(args);
let filePath = args[0];
if (!filePath) {
console.log("FILEPATH ARGUMENT IS MISSING.");
process.exit(1);
}
filePath = filePath.trim();
console.log(filePath);
if (!fs.existsSync(filePath)) {
filePath = path.join(__dirname, filePath);
console.log(filePath);
if (!fs.existsSync(filePath)) {
filePath = path.join(process.cwd(), filePath);
console.log(filePath);
if (!fs.existsSync(filePath)) {
console.log("FILEPATH DOES NOT EXIST.");
process.exit(1);
}
}
}
const fileName = path.basename(filePath);
const ext = path.extname(fileName).toLowerCase();
const server = express();
const port = process.env.PORT || 3000;
const filePathBase64 = new Buffer(filePath).toString("base64");
const urlBook = "./pub/" + filePathBase64 + "/manifest.json";
const urlBookShowAll = urlBook + "/show/all";
server.get("/", (req, res) => {
res.status(200).send("<html><body><p>OK</p><p><a href='" +
urlBookShowAll + "'>" + urlBookShowAll + "</a></p></body></html>");
});
const routerMediaOverlays = express.Router();
// routerMediaOverlays.use(morgan("combined"));
routerMediaOverlays.get(["", "/show/:" + epub_1.EpubParser.mediaOverlayURLParam + "?"], (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
cli_1.processEPUB(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
const isShow = req.url.indexOf("/show") >= 0;
let objToSerialize = null;
const resource = isShow ? req.params[epub_1.EpubParser.mediaOverlayURLParam] :
req.query[epub_1.EpubParser.mediaOverlayURLParam];
if (resource && resource !== "all") {
objToSerialize = publication.FindMediaOverlayByHref(resource);
}
else {
objToSerialize = publication.FindAllMediaOverlay();
}
if (!objToSerialize) {
objToSerialize = [];
}
let jsonObj = ta_json_1.JSON.serialize(objToSerialize);
jsonObj = { "media-overlay": jsonObj };
if (isShow) {
const jsonStr = global.JSON.stringify(jsonObj, null, " ");
// breakLength: 100 maxArrayLength: undefined
const dumpStr = util.inspect(objToSerialize, { showHidden: false, depth: 1000, colors: false, customInspect: true });
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<p><pre>" + jsonStr + "</pre></p>" +
"<p><pre>" + dumpStr + "</pre></p>" +
"</body></html>");
}
else {
res.setHeader("Access-Control-Allow-Origin", "*");
res.set("Content-Type", "application/vnd.readium.mo+json; charset=utf-8");
const jsonStr = global.JSON.stringify(cli_1.sortObject(jsonObj), null, "");
const checkSum = crypto.createHash("sha256");
checkSum.update(jsonStr);
const hash = checkSum.digest("hex");
const match = req.header("If-None-Match");
if (match === hash) {
res.status(304); // StatusNotModified
return;
}
res.setHeader("ETag", hash);
res.status(200).send(jsonStr);
}
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
const utils_1 = require("./utils");
function launchServer(filePath) {
// const fileName = path.basename(filePath);
// const ext = path.extname(fileName).toLowerCase();
const server = express();
const port = process.env.PORT || 3000;
const filePathBase64 = new Buffer(filePath).toString("base64");
const urlBook = "/pub/" + filePathBase64 + "/manifest.json";
const urlBookShowAll = "." + urlBook + "/show/all";
const urlReaderNYPL = "./readerNYPL/?url=PREFIX" + querystring.escape(urlBook); // urlBook.replace(/=/g, "%3D")
const urlReaderHADRIEN = "./readerHADRIEN/?manifest=true&href=PREFIX"
+ querystring.escape(urlBook); // urlBook.replace(/=/g, "%3D")
const urlReaderEPUBJS = "https://s3.amazonaws.com/epubjs-manifest/examples/manifest.html?href=PREFIZ"
+ urlBook;
const urlReaderHADRIENbasic = "https://hadriengardeur.github.io/webpub-manifest/examples/viewer/?manifest=true&href=PREFIX"
+ querystring.escape(urlBook);
const htmlLanding = "<html><body><p>OK</p><p>Manifest dump:<br><a href='" +
urlBookShowAll + "'>" + urlBookShowAll + "</a></p><p>Reader NYPL:<br><a href='" +
urlReaderNYPL + "'>" + urlReaderNYPL + "</a></p><p>Reader HADRIEN:<br><a href='" +
urlReaderHADRIEN + "'>" + urlReaderHADRIEN + "</a></p><p>Reader EPUB.js:<br><a href='" +
urlReaderEPUBJS + "'>" + urlReaderEPUBJS + "</a></p><p>Reader HADRIEN BASIC:<br><a href='" +
urlReaderHADRIENbasic + "'>" + urlReaderHADRIENbasic + "</a></p></body></html>";
server.get("/", (_req, res) => {
// // breakLength: 100 maxArrayLength: undefined
// console.log(util.inspect(_req,
// { showHidden: false, depth: 1000, colors: true, customInspect: false }));
const isSecureHttp = _req.secure ||
_req.protocol === "https" ||
_req.get("X-Forwarded-Protocol") === "https" ||
true; // TODO: the other tests do not appear to work on now.sh :(
res.status(200).send(htmlLanding.replace(/PREFIX/g, (isSecureHttp ?
querystring.escape("https://") : querystring.escape("http://"))
+ _req.headers.host).replace(/PREFIZ/g, (isSecureHttp ?
"https://" : "http://")
+ _req.headers.host));
});
});
const routerManifestJson = express.Router();
// routerManifestJson.use(morgan("combined"));
routerManifestJson.get(["/", "/show/:jsonPath?"], (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
cli_1.processEPUB(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
// console.log(req.url); // path local to this router
// console.log(req.baseUrl); // path local to above this router
// console.log(req.originalUrl); // full path (req.baseUrl + req.url)
// url.parse(req.originalUrl, false).host
// req.headers.host has port, not req.hostname
const rootUrl = "http://" + req.headers.host + "/pub/" + req.params.pathBase64;
const manifestURL = rootUrl + "/manifest.json";
publication.AddLink("application/webpub+json", ["self"], manifestURL, false);
let hasMO = false;
if (publication.Spine) {
const link = publication.Spine.find((l) => {
if (l.Properties && l.Properties.MediaOverlay) {
return true;
}
return false;
});
if (link) {
hasMO = true;
}
server.use("/readerNYPL", express.static("reader-NYPL"));
server.use("/readerHADRIEN", express.static("reader-HADRIEN"));
const routerMediaOverlays = express.Router();
// routerMediaOverlays.use(morgan("combined"));
routerMediaOverlays.get(["", "/show/:" + epub_1.EpubParser.mediaOverlayURLParam + "?"], (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
if (hasMO) {
const moURL = rootUrl + "/" + epub_1.EpubParser.mediaOverlayURLPath +
"?" + epub_1.EpubParser.mediaOverlayURLParam + "={path}";
publication.AddLink("application/vnd.readium.mo+json", ["media-overlay"], moURL, true);
}
if (req.url.indexOf("/show") >= 0) {
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
epub_1.EpubParser.load(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
const isShow = req.url.indexOf("/show") >= 0;
let objToSerialize = null;
if (req.params.jsonPath) {
switch (req.params.jsonPath) {
case "all": {
objToSerialize = publication;
break;
}
case "cover": {
objToSerialize = publication.GetCover();
break;
}
case "mediaoverlays": {
objToSerialize = publication.FindAllMediaOverlay();
break;
}
case "spine": {
objToSerialize = publication.Spine;
break;
}
case "pagelist": {
objToSerialize = publication.PageList;
break;
}
case "landmarks": {
objToSerialize = publication.Landmarks;
break;
}
case "links": {
objToSerialize = publication.Links;
break;
}
case "resources": {
objToSerialize = publication.Resources;
break;
}
case "toc": {
objToSerialize = publication.TOC;
break;
}
case "metadata": {
objToSerialize = publication.Metadata;
break;
}
default: {
objToSerialize = null;
}
}
const resource = isShow ? req.params[epub_1.EpubParser.mediaOverlayURLParam] :
req.query[epub_1.EpubParser.mediaOverlayURLParam];
if (resource && resource !== "all") {
objToSerialize = publication.FindMediaOverlayByHref(resource);
}
else {
objToSerialize = publication;
objToSerialize = publication.FindAllMediaOverlay();
}
if (!objToSerialize) {
objToSerialize = {};
objToSerialize = [];
}
const jsonObj = ta_json_1.JSON.serialize(objToSerialize);
const jsonStr = global.JSON.stringify(jsonObj, null, " ");
// breakLength: 100 maxArrayLength: undefined
const dumpStr = util.inspect(objToSerialize, { showHidden: false, depth: 1000, colors: false, customInspect: true });
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<p><pre>" + jsonStr + "</pre></p>" +
"<p><pre>" + dumpStr + "</pre></p>" +
"</body></html>");
}
else {
res.setHeader("Access-Control-Allow-Origin", "*");
res.set("Content-Type", "application/webpub+json; charset=utf-8");
const publicationJsonObj = ta_json_1.JSON.serialize(publication);
const publicationJsonStr = global.JSON.stringify(cli_1.sortObject(publicationJsonObj), null, "");
const checkSum = crypto.createHash("sha256");
checkSum.update(publicationJsonStr);
const hash = checkSum.digest("hex");
const match = req.header("If-None-Match");
if (match === hash) {
res.status(304); // StatusNotModified
return;
let jsonObj = ta_json_1.JSON.serialize(objToSerialize);
jsonObj = { "media-overlay": jsonObj };
if (isShow) {
const jsonStr = global.JSON.stringify(jsonObj, null, " ");
// breakLength: 100 maxArrayLength: undefined
const dumpStr = util.inspect(objToSerialize, { showHidden: false, depth: 1000, colors: false, customInspect: true });
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<p><pre>" + jsonStr + "</pre></p>" +
"<p><pre>" + dumpStr + "</pre></p>" +
"</body></html>");
}
res.setHeader("ETag", hash);
const links = publication.GetPreFetchResources();
if (links && links.length) {
let prefetch = "";
links.forEach((l) => {
prefetch += "<" + l.Href + ">;" + "rel=prefetch,";
});
res.setHeader("Link", prefetch);
else {
res.setHeader("Access-Control-Allow-Origin", "*");
res.set("Content-Type", "application/vnd.readium.mo+json; charset=utf-8");
const jsonStr = global.JSON.stringify(utils_1.sortObject(jsonObj), null, "");
const checkSum = crypto.createHash("sha256");
checkSum.update(jsonStr);
const hash = checkSum.digest("hex");
const match = req.header("If-None-Match");
if (match === hash) {
res.status(304); // StatusNotModified
return;
}
res.setHeader("ETag", hash);
res.status(200).send(jsonStr);
}
// res.setHeader("Cache-Control", "public,max-age=86400");
res.status(200).send(publicationJsonStr);
}
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
});
});
const routerAssets = express.Router();
// routerAssets.use(morgan("combined"));
routerAssets.get("/", (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
if (!req.params.asset) {
req.params.asset = req.asset;
}
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
cli_1.processEPUB(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
if (!publication.Internal) {
const err = "No publication internals!";
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
return;
});
});
const routerManifestJson = express.Router();
// routerManifestJson.use(morgan("combined"));
routerManifestJson.get(["/", "/show/:jsonPath?"], (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
const zipInternal = publication.Internal.find((i) => {
if (i.Name === "zip") {
return true;
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
epub_1.EpubParser.load(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
// console.log(req.url); // path local to this router
// console.log(req.baseUrl); // path local to above this router
// console.log(req.originalUrl); // full path (req.baseUrl + req.url)
// url.parse(req.originalUrl, false).host
// req.headers.host has port, not req.hostname
const rootUrl = "http://" + req.headers.host + "/pub/" + req.params.pathBase64;
const manifestURL = rootUrl + "/manifest.json";
publication.AddLink("application/webpub+json", ["self"], manifestURL, false);
let hasMO = false;
if (publication.Spine) {
const link = publication.Spine.find((l) => {
if (l.Properties && l.Properties.MediaOverlay) {
return true;
}
return false;
});
if (link) {
hasMO = true;
}
}
return false;
});
if (!zipInternal) {
const err = "No publication zip!";
if (hasMO) {
const moURL = rootUrl + "/" + epub_1.EpubParser.mediaOverlayURLPath +
"?" + epub_1.EpubParser.mediaOverlayURLParam + "={path}";
publication.AddLink("application/vnd.readium.mo+json", ["media-overlay"], moURL, true);
}
if (req.url.indexOf("/show") >= 0) {
let objToSerialize = null;
if (req.params.jsonPath) {
switch (req.params.jsonPath) {
case "all": {
objToSerialize = publication;
break;
}
case "cover": {
objToSerialize = publication.GetCover();
break;
}
case "mediaoverlays": {
objToSerialize = publication.FindAllMediaOverlay();
break;
}
case "spine": {
objToSerialize = publication.Spine;
break;
}
case "pagelist": {
objToSerialize = publication.PageList;
break;
}
case "landmarks": {
objToSerialize = publication.Landmarks;
break;
}
case "links": {
objToSerialize = publication.Links;
break;
}
case "resources": {
objToSerialize = publication.Resources;
break;
}
case "toc": {
objToSerialize = publication.TOC;
break;
}
case "metadata": {
objToSerialize = publication.Metadata;
break;
}
default: {
objToSerialize = null;
}
}
}
else {
objToSerialize = publication;
}
if (!objToSerialize) {
objToSerialize = {};
}
const jsonObj = ta_json_1.JSON.serialize(objToSerialize);
const jsonStr = global.JSON.stringify(jsonObj, null, " ");
// breakLength: 100 maxArrayLength: undefined
const dumpStr = util.inspect(objToSerialize, { showHidden: false, depth: 1000, colors: false, customInspect: true });
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<p><pre>" + jsonStr + "</pre></p>" +
"<p><pre>" + dumpStr + "</pre></p>" +
"</body></html>");
}
else {
res.setHeader("Access-Control-Allow-Origin", "*");
res.set("Content-Type", "application/webpub+json; charset=utf-8");
const publicationJsonObj = ta_json_1.JSON.serialize(publication);
const publicationJsonStr = global.JSON.stringify(utils_1.sortObject(publicationJsonObj), null, "");
const checkSum = crypto.createHash("sha256");
checkSum.update(publicationJsonStr);
const hash = checkSum.digest("hex");
const match = req.header("If-None-Match");
if (match === hash) {
res.status(304); // StatusNotModified
return;
}
res.setHeader("ETag", hash);
const links = publication.GetPreFetchResources();
if (links && links.length) {
let prefetch = "";
links.forEach((l) => {
prefetch += "<" + l.Href + ">;" + "rel=prefetch,";
});
res.setHeader("Link", prefetch);
}
// res.setHeader("Cache-Control", "public,max-age=86400");
res.status(200).send(publicationJsonStr);
}
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
return;
}
const zip = zipInternal.Value;
const opfInternal = publication.Internal.find((i) => {
if (i.Name === "rootfile") {
return true;
}
return false;
});
const rootfilePath = opfInternal ? opfInternal.Value : "EPUB/package.opf";
let pathInZip = req.params.asset;
if (Object.keys(zip.entries()).indexOf(pathInZip) < 0) {
// FIRST FAIL ...
// let's try to adjust the path, make it relative to the OPF package
// (support for legacy incorrect implementation)
pathInZip = path.join(path.dirname(rootfilePath), pathInZip);
});
const routerAssets = express.Router();
// routerAssets.use(morgan("combined"));
routerAssets.get("/", (req, res) => {
if (!req.params.pathBase64) {
req.params.pathBase64 = req.pathBase64;
}
if (Object.keys(zip.entries()).indexOf(pathInZip) < 0) {
const err = "Asset not in zip!";
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
return;
if (!req.params.asset) {
req.params.asset = req.asset;
}
let link;
if (pathInZip.indexOf("META-INF/") !== 0
&& !pathInZip.endsWith(".opf")
&& publication.Resources) {
const relativePath = path.relative(path.dirname(rootfilePath), pathInZip);
link = publication.Resources.find((l) => {
if (l.Href === relativePath) {
const pathBase64Str = new Buffer(req.params.pathBase64, "base64").toString("utf8");
epub_1.EpubParser.load(filePath)
.then((publication) => {
console.log("== EpubParser: resolve");
// dumpPublication(publication);
if (!publication.Internal) {
const err = "No publication internals!";
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>"
+ err + "</p></body></html>");
return;
}
const zipInternal = publication.Internal.find((i) => {
if (i.Name === "zip") {
return true;

@@ -305,12 +268,26 @@ }

});
if (!link) {
link = publication.Spine.find((l) => {
if (l.Href === relativePath) {
return true;
}
return false;
});
if (!zipInternal) {
const err = "No publication zip!";
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>"
+ err + "</p></body></html>");
return;
}
if (!link) {
const err = "Asset not declared in publication spine/resources!";
const zip = zipInternal.Value;
const opfInternal = publication.Internal.find((i) => {
if (i.Name === "rootfile") {
return true;
}
return false;
});
const rootfilePath = opfInternal ? opfInternal.Value : "EPUB/package.opf";
let pathInZip = req.params.asset;
if (Object.keys(zip.entries()).indexOf(pathInZip) < 0) {
// FIRST FAIL ...
// let's try to adjust the path, make it relative to the OPF package
// (support for legacy incorrect implementation)
pathInZip = path.join(path.dirname(rootfilePath), pathInZip);
}
if (Object.keys(zip.entries()).indexOf(pathInZip) < 0) {
const err = "Asset not in zip!";
console.log(err);

@@ -321,119 +298,155 @@ res.status(500).send("<html><body><p>Internal Server Error</p><p>"

}
}
const mediaType = mime.lookup(pathInZip);
const isText = mediaType && (mediaType.indexOf("text/") === 0 ||
mediaType.indexOf("application/xhtml") === 0 ||
mediaType.indexOf("application/xml") === 0 ||
mediaType.indexOf("application/json") === 0 ||
mediaType.indexOf("application/svg") === 0 ||
mediaType.indexOf("application/smil") === 0 ||
mediaType.indexOf("+json") > 0 ||
mediaType.indexOf("+smil") > 0 ||
mediaType.indexOf("+svg") > 0 ||
mediaType.indexOf("+xhtml") > 0 ||
mediaType.indexOf("+xml") > 0);
let zipData = zip.entryDataSync(pathInZip);
if (link && link.Properties && link.Properties.Encrypted) {
if (link.Properties.Encrypted.Algorithm === "http://www.idpf.org/2008/embedding") {
let pubID = publication.Metadata.Identifier;
pubID = pubID.replace(/\s/g, "");
const checkSum = crypto.createHash("sha1");
checkSum.update(pubID);
// const hash = checkSum.digest("hex");
// console.log(hash);
const key = checkSum.digest();
const prefixLength = 1040;
const zipDataPrefix = zipData.slice(0, prefixLength);
for (let i = 0; i < prefixLength; i++) {
/* tslint:disable:no-bitwise */
zipDataPrefix[i] = zipDataPrefix[i] ^ (key[i % key.length]);
let link;
if (pathInZip.indexOf("META-INF/") !== 0
&& !pathInZip.endsWith(".opf")
&& publication.Resources) {
const relativePath = path.relative(path.dirname(rootfilePath), pathInZip);
link = publication.Resources.find((l) => {
if (l.Href === relativePath) {
return true;
}
return false;
});
if (!link) {
link = publication.Spine.find((l) => {
if (l.Href === relativePath) {
return true;
}
return false;
});
}
const zipDataRemainder = zipData.slice(prefixLength);
zipData = Buffer.concat([zipDataPrefix, zipDataRemainder]);
if (!link) {
const err = "Asset not declared in publication spine/resources!";
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>"
+ err + "</p></body></html>");
return;
}
}
else if (link.Properties.Encrypted.Algorithm === "http://ns.adobe.com/pdf/enc#RC") {
let pubID = publication.Metadata.Identifier;
pubID = pubID.replace("urn:uuid:", "");
pubID = pubID.replace(/-/g, "");
pubID = pubID.replace(/\s/g, "");
const key = [];
for (let i = 0; i < 16; i++) {
const byteHex = pubID.substr(i * 2, 2);
const byteNumer = parseInt(byteHex, 16);
key.push(byteNumer);
const mediaType = mime.lookup(pathInZip);
const isText = mediaType && (mediaType.indexOf("text/") === 0 ||
mediaType.indexOf("application/xhtml") === 0 ||
mediaType.indexOf("application/xml") === 0 ||
mediaType.indexOf("application/json") === 0 ||
mediaType.indexOf("application/svg") === 0 ||
mediaType.indexOf("application/smil") === 0 ||
mediaType.indexOf("+json") > 0 ||
mediaType.indexOf("+smil") > 0 ||
mediaType.indexOf("+svg") > 0 ||
mediaType.indexOf("+xhtml") > 0 ||
mediaType.indexOf("+xml") > 0);
let zipData = zip.entryDataSync(pathInZip);
if (link && link.Properties && link.Properties.Encrypted) {
if (link.Properties.Encrypted.Algorithm === "http://www.idpf.org/2008/embedding") {
let pubID = publication.Metadata.Identifier;
pubID = pubID.replace(/\s/g, "");
const checkSum = crypto.createHash("sha1");
checkSum.update(pubID);
// const hash = checkSum.digest("hex");
// console.log(hash);
const key = checkSum.digest();
const prefixLength = 1040;
const zipDataPrefix = zipData.slice(0, prefixLength);
for (let i = 0; i < prefixLength; i++) {
/* tslint:disable:no-bitwise */
zipDataPrefix[i] = zipDataPrefix[i] ^ (key[i % key.length]);
}
const zipDataRemainder = zipData.slice(prefixLength);
zipData = Buffer.concat([zipDataPrefix, zipDataRemainder]);
}
const prefixLength = 1024;
const zipDataPrefix = zipData.slice(0, prefixLength);
for (let i = 0; i < prefixLength; i++) {
/* tslint:disable:no-bitwise */
zipDataPrefix[i] = zipDataPrefix[i] ^ (key[i % key.length]);
else if (link.Properties.Encrypted.Algorithm === "http://ns.adobe.com/pdf/enc#RC") {
let pubID = publication.Metadata.Identifier;
pubID = pubID.replace("urn:uuid:", "");
pubID = pubID.replace(/-/g, "");
pubID = pubID.replace(/\s/g, "");
const key = [];
for (let i = 0; i < 16; i++) {
const byteHex = pubID.substr(i * 2, 2);
const byteNumer = parseInt(byteHex, 16);
key.push(byteNumer);
}
const prefixLength = 1024;
const zipDataPrefix = zipData.slice(0, prefixLength);
for (let i = 0; i < prefixLength; i++) {
/* tslint:disable:no-bitwise */
zipDataPrefix[i] = zipDataPrefix[i] ^ (key[i % key.length]);
}
const zipDataRemainder = zipData.slice(prefixLength);
zipData = Buffer.concat([zipDataPrefix, zipDataRemainder]);
}
const zipDataRemainder = zipData.slice(prefixLength);
zipData = Buffer.concat([zipDataPrefix, zipDataRemainder]);
else if (link.Properties.Encrypted.Algorithm
=== "http://www.w3.org/2001/04/xmlenc#aes256-cbc") {
// TODO LCP userKey --> contentKey
}
}
else if (link.Properties.Encrypted.Algorithm === "http://www.w3.org/2001/04/xmlenc#aes256-cbc") {
// TODO LCP userKey --> contentKey
if (req.query.show) {
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<h3>" + mediaType + "</h3>" +
(isText ?
("<p><pre>" +
zipData.toString("utf8").replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&apos;") +
"</pre></p>")
: "<p>BINARY</p>") + "</body></html>");
}
}
if (req.query.show) {
res.status(200).send("<html><body>" +
"<h2>" + pathBase64Str + "</h2>" +
"<h3>" + mediaType + "</h3>" +
(isText ?
("<p><pre>" +
zipData.toString("utf8").replace(/&/g, "&amp;")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&apos;") +
"</pre></p>")
: "<p>BINARY</p>") + "</body></html>");
}
else {
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader("Cache-Control", "public,max-age=86400");
// res.set("Content-Type", mediaType);
res.type(mediaType);
if (isText) {
res.status(200).send(zipData.toString("utf8"));
}
else {
res.status(200).end(zipData, "binary");
res.setHeader("Access-Control-Allow-Origin", "*");
res.setHeader("Cache-Control", "public,max-age=86400");
// res.set("Content-Type", mediaType);
res.type(mediaType);
if (isText) {
res.status(200).send(zipData.toString("utf8"));
}
else {
res.status(200).end(zipData, "binary");
}
}
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
});
});
const routerPathBase64 = express.Router();
routerPathBase64.use(morgan("combined"));
routerPathBase64.param("pathBase64", (req, res, next, value, _name) => {
if (value === filePathBase64) {
req.pathBase64 = value;
next();
}
}).catch((err) => {
console.log("== EpubParser: reject");
console.log(err);
res.status(500).send("<html><body><p>Internal Server Error</p><p>" + err + "</p></body></html>");
else {
res.status(403).send("<html><body><p>Forbidden</p><p>INVALID parameter: <code>"
+ req.params.pathBase64 + "</code></p></body></html>");
// next(new Error("INVALID file param"));
}
});
});
const routerPathBase64 = express.Router();
routerPathBase64.use(morgan("combined"));
routerPathBase64.param("pathBase64", (req, res, next, value, name) => {
if (value === filePathBase64) {
req.pathBase64 = value;
routerPathBase64.param("asset", (req, _res, next, value, _name) => {
req.asset = value;
next();
}
else {
res.status(403).send("<html><body><p>Forbidden</p><p>INVALID parameter: <code>"
+ req.params.pathBase64 + "</code></p></body></html>");
// next(new Error("INVALID file param"));
}
});
routerPathBase64.param("asset", (req, res, next, value, name) => {
req.asset = value;
next();
});
routerPathBase64.use("/:pathBase64/manifest.json", routerManifestJson);
routerPathBase64.use("/:pathBase64/" + epub_1.EpubParser.mediaOverlayURLPath, routerMediaOverlays);
routerPathBase64.use("/:pathBase64/:asset(*)", routerAssets);
routerPathBase64.get("/:pathBase64", (req, res) => {
res.status(200).send("<html><body><p>OK</p><p><a href='" +
urlBookShowAll + "'>" + urlBookShowAll + "</a></p></body></html>");
});
server.use("/pub", routerPathBase64);
server.listen(port, () => {
console.log("http://localhost:" + port);
console.log(urlBook);
});
});
routerPathBase64.use("/:pathBase64/manifest.json", routerManifestJson);
routerPathBase64.use("/:pathBase64/" + epub_1.EpubParser.mediaOverlayURLPath, routerMediaOverlays);
routerPathBase64.use("/:pathBase64/:asset(*)", routerAssets);
routerPathBase64.get("/:pathBase64", (_req, res) => {
const isSecureHttp = _req.secure ||
_req.protocol === "https" ||
_req.get("X-Forwarded-Protocol") === "https" ||
true; // TODO: the other tests do not appear to work on now.sh :(
res.status(200).send(htmlLanding.replace(/PREFIX/g, (isSecureHttp ?
querystring.escape("https://") : querystring.escape("http://"))
+ _req.headers.host).replace(/PREFIZ/g, (isSecureHttp ?
"https://" : "http://")
+ _req.headers.host));
});
server.use("/pub", routerPathBase64);
server.listen(port, () => {
console.log("http://localhost:" + port);
console.log(urlBook);
});
}
exports.launchServer = launchServer;
//# sourceMappingURL=server.js.map

@@ -88,3 +88,3 @@ "use strict";

}
function deserializeObject(objectInstance, definition, options) {
function deserializeObject(objectInstance, definition, _options) {
const primitive = definition.objectType === String

@@ -91,0 +91,0 @@ || definition.objectType === Boolean

@@ -0,4 +1,4 @@

"use strict";
// export type XmlValuePrimitive = string | number | boolean | null;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//# sourceMappingURL=types.js.map
"use strict";
// import { serialize } from "./methods/serialize";
Object.defineProperty(exports, "__esModule", { value: true });
// import { serialize } from "./methods/serialize";
const deserialize_1 = require("./methods/deserialize");

@@ -5,0 +5,0 @@ class XML {

{
"name": "r2-streamer-js",
"version": "0.0.1-alpha1",
"description": "Readium 2 NodeJS 'streamer'",
"version": "0.0.1-alpha10",
"description": "Readium 2 'streamer' for NodeJS (TypeScript, ECMAScript 2015 / ES6)",
"keywords": [
"readium",
"streamer"
"readium2",
"streamer",
"EPUB",
"TypeScript",
"JavaScript",
"ES6",
"ECMAScript 2015",
"ECMAScript 6"
],

@@ -12,3 +19,3 @@ "engines": {

"npm": ">=3",
"yarn": ">= 0.21"
"yarn": ">= 0.23"
},

@@ -56,8 +63,10 @@ "repository": {

"tslint": "latest",
"tslint-language-service": "latest",
"typescript": "latest"
},
"main": "dist/src/server.js",
"main": "dist/src/index.js",
"types": "dist/src/index.d.js",
"bin": {
"r2-streamer-js-cli": "dist/src/cli.js",
"r2-streamer-js-server": "dist/src/server.js"
"r2-streamer-js-server": "dist/src/server-cli.js"
},

@@ -70,7 +79,8 @@ "files": [

"scripts": {
"now": "rm -rf ./now && mkdir now && cp -r dist/ now/ && cp *.epub now/ && cp package-now.json now/ && cd now/ && mv package-now.json package.json && now && cd ..",
"prepublish": "yarn run build && yarn test",
"now": "rm -rf ./now && mkdir now && mkdir now/reader-NYPL && mkdir now/reader-HADRIEN && cp -r dist/ now/ && cp -r reader-NYPL/ now/reader-NYPL/ && cp -r reader-HADRIEN/ now/reader-HADRIEN/ && cp *.epub now/ && cp package-now.json now/ && cd now/ && mv package-now.json package.json && now && cd ..",
"start": "yarn run build && yarn run server *.epub",
"build": "yarn run clean && yarn run lint:all && yarn run lint:typescript && yarn run transpile:typescript",
"clean": "rimraf ./dist && rimraf ./now && mkdirp ./dist",
"lint:all": "echo '\n===== LINT (all)\n' && eclint check '**/*' '[!].git/**/*' '[!]node_modules/**/*' '[!]dist/**/*' '[!]now/**/*' '[!].vscode/**/*' '[!]**/.DS_Store' '[!]**/*.epub' '[!]**/*.cbz' '[!]**/*.jpg' '[!]**/*.jpeg' '[!]**/*.png'",
"lint:all": "echo '\n===== LINT (all)\n' && eclint check '**/*' '[!].git/**/*' '[!]node_modules/**/*' '[!]dist/**/*' '[!]reader*/**/*' '[!]now/**/*' '[!].vscode/**/*' '[!]**/.DS_Store' '[!]**/*.epub' '[!]**/*.cbz' '[!]**/*.jpg' '[!]**/*.jpeg' '[!]**/*.png'",
"lint:typescript": "echo '\n===== LINT (typescript)\n' && tslint -c './tslint.json' './src/**/*.ts' './test/**/*.ts'",

@@ -80,4 +90,4 @@ "transpile:typescript": "echo '\n===== COMPILE (typescript)\n' && tsc -p './tsconfig.json'",

"cli": "node './dist/src/cli.js'",
"server": "node './dist/src/server.js'"
"server": "node './dist/src/server-cli.js'"
}
}

@@ -1,2 +0,2 @@

# Readium 2 NodeJS "streamer"
# Readium 2 "streamer" for NodeJS (TypeScript, ECMAScript 2015 / ES6)

@@ -12,4 +12,26 @@ ## Build status

1) https://nodejs.org NodeJS >= 6, NPM >= 3 (check with `node --version` and `npm --version` from the command line)
2) https://yarnpkg.com Yarn >= 0.21 (check with `yarn --version` from the command line)
2) https://yarnpkg.com Yarn >= 0.23 (check with `yarn --version` from the command line)
## NPM package usage
https://www.npmjs.com/package/r2-streamer-js
`yarn add r2-streamer-js` or `npm install r2-streamer-js`
...or manually, in your project's `package.json`:
```json
"dependencies": {
"r2-streamer-js": "latest"
}
```
In your Javascript code (ECMAScript 2015 / ES6) or TypeScript code (all `*.d.ts` type definitions are included in `./node_modules/r2-streamer-js/**`):
```javascript
// see r2-streamer-js/dist/src/index.d.ts for exported types:
import { * } from "r2-streamer-js";
// ... or specific, direct type import, e.g.:
import { Publication } from "r2-streamer-js/dist/src/models/publication";
```
## Quick start

@@ -24,4 +46,5 @@

5) `yarn upgrade` (sync local packages)
6) `yarn start` (invoke the main build script)
6) `yarn run build` (invoke the main build script: clean, lint, compile)
7) `yarn test` (run the unit tests)
8) `yarn run cli {PATH_TO_EPUB}` (relative or absolute path to a publication)
8) `yarn run cli {PATH_TO_EPUB}` (command line publication "dump") (path is relative or absolute)
9) `yarn run server {PATH_TO_EPUB}` (HTTP service to serve publication manifest and associated resources)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc