Skip to content
Snippets Groups Projects
Commit 852ab6c4 authored by Igor Markin's avatar Igor Markin
Browse files

Add build

parent 02fac5e2
No related branches found
No related tags found
1 merge request!76Replace @vereign/png with @vereign/lib-png
Pipeline #42700 passed
...@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) { ...@@ -33,7 +33,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.findSealContainer = void 0; exports.findSealContainer = void 0;
const lib_mime_1 = __importDefault(require("@vereign/lib-mime")); const lib_mime_1 = __importDefault(require("@vereign/lib-mime"));
const png_1 = __importStar(require("@vereign/png")); const lib_png_1 = __importStar(require("@vereign/lib-png"));
const url_parse_1 = __importDefault(require("url-parse")); const url_parse_1 = __importDefault(require("url-parse"));
const SealReadingError_1 = __importDefault(require("./SealReadingError")); const SealReadingError_1 = __importDefault(require("./SealReadingError"));
const __1 = require("../.."); const __1 = require("../..");
...@@ -99,8 +99,8 @@ const extractSealPublicKey = (sealContainer, mime) => { ...@@ -99,8 +99,8 @@ const extractSealPublicKey = (sealContainer, mime) => {
if (!sealImageAttachment) { if (!sealImageAttachment) {
throw new SealReadingError_1.default("Seal not found", SealReadingError_1.default.SEAL_NOT_FOUND, SealReadingError_1.default.SEVERITY_WARNING); throw new SealReadingError_1.default("Seal not found", SealReadingError_1.default.SEAL_NOT_FOUND, SealReadingError_1.default.SEVERITY_WARNING);
} }
const png = png_1.default.readPng(new Uint8Array(__1.base64ToArrayBuffer(sealImageAttachment.base64))); const png = lib_png_1.default.readPng(new Uint8Array(__1.base64ToArrayBuffer(sealImageAttachment.base64)));
const metadata = png_1.getMetaData(png); const metadata = lib_png_1.getMetaData(png);
const sealMarker = metadata["v-seal"]; const sealMarker = metadata["v-seal"];
if (!sealMarker) { if (!sealMarker) {
throw new SealReadingError_1.default('Seal not found. Seal marker "v-seal" is missing in picture metadata', SealReadingError_1.default.SEAL_NOT_FOUND, SealReadingError_1.default.SEVERITY_WARNING); throw new SealReadingError_1.default('Seal not found. Seal marker "v-seal" is missing in picture metadata', SealReadingError_1.default.SEAL_NOT_FOUND, SealReadingError_1.default.SEVERITY_WARNING);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment