From a5ac1e13a4d5b31fe309ddfedb917d19bab0ec1e Mon Sep 17 00:00:00 2001 From: Alexander Cerutti Date: Sun, 30 Jun 2019 02:00:39 +0200 Subject: [PATCH] Added props getter to get a copy of current props --- src/pass.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pass.ts b/src/pass.ts index 057b5f8..16fb19a 100644 --- a/src/pass.ts +++ b/src/pass.ts @@ -60,7 +60,6 @@ export class Pass implements PassIndexSignature { this.bundle = { ...options.model.bundle }; try { - // getting pass.json this.passCore = JSON.parse(this.bundle["pass.json"].toString("utf8")); } catch (err) { throw new Error(formatMessage("PASSFILE_VALIDATION_FAILED")); @@ -274,7 +273,7 @@ export class Pass implements PassIndexSignature { } return this; - } + } /** * Sets current pass' relevancy through locations @@ -295,7 +294,7 @@ export class Pass implements PassIndexSignature { } return this; - } + } /** * Sets current pass' relevancy through a date @@ -451,6 +450,10 @@ export class Pass implements PassIndexSignature { return this; } + get props(): schema.ValidPass { + return deepCopy(this[passProps]); + } + /** * Generates the PKCS #7 cryptografic signature for the manifest file. *