mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-16 00:25:30 +00:00
Small improvements and fixes
This commit is contained in:
@@ -9,6 +9,12 @@ import { readFile as _readFile, readdir as _readdir } from "fs";
|
|||||||
const readDir = promisify(_readdir);
|
const readDir = promisify(_readdir);
|
||||||
const readFile = promisify(_readFile);
|
const readFile = promisify(_readFile);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Performs checks on the passed model to
|
||||||
|
* determine how to parse it
|
||||||
|
* @param model
|
||||||
|
*/
|
||||||
|
|
||||||
export async function getModelContents(model: FactoryOptions["model"]) {
|
export async function getModelContents(model: FactoryOptions["model"]) {
|
||||||
const isModelValid = (
|
const isModelValid = (
|
||||||
model && (
|
model && (
|
||||||
|
|||||||
@@ -7,10 +7,7 @@ import { ZipFile } from "yazl";
|
|||||||
import * as schema from "./schema";
|
import * as schema from "./schema";
|
||||||
import formatMessage from "./messages";
|
import formatMessage from "./messages";
|
||||||
import FieldsArray from "./fieldsArray";
|
import FieldsArray from "./fieldsArray";
|
||||||
import {
|
import { generateStringFile, dateToW3CString, isValidRGB } from "./utils";
|
||||||
generateStringFile,
|
|
||||||
dateToW3CString, isValidRGB
|
|
||||||
} from "./utils";
|
|
||||||
|
|
||||||
const barcodeDebug = debug("passkit:barcode");
|
const barcodeDebug = debug("passkit:barcode");
|
||||||
const genericDebug = debug("passkit:generic");
|
const genericDebug = debug("passkit:generic");
|
||||||
@@ -321,7 +318,7 @@ export class Pass {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
const parsedDate = processDate("relevandDate", date);
|
const parsedDate = processDate("relevantDate", date);
|
||||||
|
|
||||||
if (parsedDate) {
|
if (parsedDate) {
|
||||||
this[passProps]["relevantDate"] = parsedDate;
|
this[passProps]["relevantDate"] = parsedDate;
|
||||||
|
|||||||
Reference in New Issue
Block a user