mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 15:25:20 +00:00
Improved types, messages and exported objects
This commit is contained in:
8
index.ts
8
index.ts
@@ -1 +1,7 @@
|
|||||||
export { createPass, Pass } from "./src/factory";
|
import { Pass } from "./src/pass";
|
||||||
|
import { AbstractModel } from "./src/abstract";
|
||||||
|
|
||||||
|
export { createPass } from "./src/factory";
|
||||||
|
export { createAbstractModel } from "./src/abstract";
|
||||||
|
export type Pass = InstanceType<typeof Pass>
|
||||||
|
export type AbstractModel = InstanceType<typeof AbstractModel>
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ interface MessageGroup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const errors: MessageGroup = {
|
const errors: MessageGroup = {
|
||||||
CP_INIT_ERROR: "Something went really bad in the initialization, dude! Please look at the log below this message. It should contain all the infos about the problem: \n%s",
|
CP_INIT_ERROR: "Something went really bad in the %s initialization! Look at the log below this message. It should contain all the infos about the problem: \n%s",
|
||||||
CP_NO_OPTS: "Cannot initialize the pass creation: no options were passed.",
|
CP_NO_OPTS: "Cannot initialize the pass or abstract model creation: no options were passed.",
|
||||||
CP_NO_CERTS: "Cannot initialize the pass creation: no valid certificates were passed.",
|
CP_NO_CERTS: "Cannot initialize the pass creation: no valid certificates were passed.",
|
||||||
PASSFILE_VALIDATION_FAILED: "Validation of pass type failed. Pass file is not a valid buffer or (more probably) does not respect the schema.\nRefer to https://apple.co/2Nvshvn to build a correct pass.",
|
PASSFILE_VALIDATION_FAILED: "Validation of pass type failed. Pass file is not a valid buffer or (more probably) does not respect the schema.\nRefer to https://apple.co/2Nvshvn to build a correct pass.",
|
||||||
REQUIR_VALID_FAILED: "The options passed to Pass constructor does not meet the requirements.\nRefer to the documentation to compile them correctly.",
|
REQUIR_VALID_FAILED: "The options passed to Pass constructor does not meet the requirements.\nRefer to the documentation to compile them correctly.",
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export interface Certificates {
|
|||||||
export interface FactoryOptions {
|
export interface FactoryOptions {
|
||||||
model: BundleUnit | string;
|
model: BundleUnit | string;
|
||||||
certificates: Certificates;
|
certificates: Certificates;
|
||||||
overrides?: Object;
|
overrides?: OverridesSupportedOptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BundleUnit {
|
export interface BundleUnit {
|
||||||
|
|||||||
Reference in New Issue
Block a user