mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Removed Schemas.Manifest
This commit is contained in:
@@ -481,19 +481,18 @@ export default class PKPass extends Bundle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private [createManifestSymbol]() {
|
private [createManifestSymbol]() {
|
||||||
return Object.entries(this[filesSymbol]).reduce<Schemas.Manifest>(
|
return Object.entries(this[filesSymbol]).reduce<{
|
||||||
(acc, [fileName, buffer]) => {
|
[key: string]: string;
|
||||||
const hashFlow = forge.md.sha1.create();
|
}>((acc, [fileName, buffer]) => {
|
||||||
|
const hashFlow = forge.md.sha1.create();
|
||||||
|
|
||||||
hashFlow.update(buffer.toString("binary"));
|
hashFlow.update(buffer.toString("binary"));
|
||||||
|
|
||||||
return {
|
return {
|
||||||
...acc,
|
...acc,
|
||||||
[fileName]: hashFlow.digest().toHex(),
|
[fileName]: hashFlow.digest().toHex(),
|
||||||
};
|
};
|
||||||
},
|
}, {});
|
||||||
{},
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private [closePassSymbol]() {
|
private [closePassSymbol]() {
|
||||||
|
|||||||
@@ -21,9 +21,6 @@ import { Semantics } from "./SemanticTags";
|
|||||||
|
|
||||||
const schemaDebug = debug("Schema");
|
const schemaDebug = debug("Schema");
|
||||||
|
|
||||||
export interface Manifest {
|
|
||||||
[key: string]: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* export interface Certificates {
|
/* export interface Certificates {
|
||||||
wwdr?: string;
|
wwdr?: string;
|
||||||
|
|||||||
@@ -5,12 +5,12 @@ import type * as Schemas from "./schemas";
|
|||||||
* Generates the PKCS #7 cryptografic signature for the manifest file.
|
* Generates the PKCS #7 cryptografic signature for the manifest file.
|
||||||
*
|
*
|
||||||
* @method create
|
* @method create
|
||||||
* @params {Object} manifest - Manifest content.
|
* @params manifest - Manifest content.
|
||||||
* @returns {Buffer}
|
* @returns
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export function create(
|
export function create(
|
||||||
manifest: Schemas.Manifest,
|
manifest: { [key: string]: string },
|
||||||
certificates: Schemas.CertificatesSchema,
|
certificates: Schemas.CertificatesSchema,
|
||||||
): Buffer {
|
): Buffer {
|
||||||
const signature = forge.pkcs7.createSignedData();
|
const signature = forge.pkcs7.createSignedData();
|
||||||
|
|||||||
Reference in New Issue
Block a user