Added props getter to get a copy of current props

This commit is contained in:
Alexander Cerutti
2019-06-30 02:00:39 +02:00
parent dba3a7a02a
commit a5ac1e13a4

View File

@@ -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.
*