mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 18:25:24 +00:00
Edited options patching way.
This commit is contained in:
4
index.js
4
index.js
@@ -10,7 +10,7 @@ class Pass {
|
|||||||
constructor(options) {
|
constructor(options) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.passTypes = ["boardingPass", "eventTicket", "coupon", "generic", "storeCard"];
|
this.passTypes = ["boardingPass", "eventTicket", "coupon", "generic", "storeCard"];
|
||||||
this.overrides = options.overrides || {};
|
this.overrides = this.options.overrides || {};
|
||||||
this.Certificates = {};
|
this.Certificates = {};
|
||||||
this.model = "";
|
this.model = "";
|
||||||
}
|
}
|
||||||
@@ -321,7 +321,7 @@ class Pass {
|
|||||||
console.log("\x1b[33m", `Your pass model (${path.parse(this.model).base}) is not compatible with iOS versions greater than iOS 8. Refer to https://apple.co/2O5K65k to make it forward-compatible.`, "\x1b[0m");
|
console.log("\x1b[33m", `Your pass model (${path.parse(this.model).base}) is not compatible with iOS versions greater than iOS 8. Refer to https://apple.co/2O5K65k to make it forward-compatible.`, "\x1b[0m");
|
||||||
}
|
}
|
||||||
|
|
||||||
Object.keys(options).forEach(opt => passFile[opt] = options[opt]);
|
Object.assign(passFile, options);
|
||||||
|
|
||||||
return success(Buffer.from(JSON.stringify(passFile)));
|
return success(Buffer.from(JSON.stringify(passFile)));
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user