mirror of
https://github.com/marcogll/passkit-generator.git
synced 2026-03-15 19:25:23 +00:00
Changed all examples to new generate signature;
Added internal package.json for examples
This commit is contained in:
@@ -1,14 +1,14 @@
|
|||||||
# Examples
|
# Examples
|
||||||
|
|
||||||
This is examples folder. Each example is linked to webserver.js, which *requires* express.js to run.
|
This is examples folder. These examples are used to test new features and as sample showcases.
|
||||||
Express.js **was not** inserted as dipendency.
|
|
||||||
|
Each example is linked to webserver.js, which *requires* express.js to run.
|
||||||
|
Express.js has been inserted as "example package" dipendency.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/alexandercerutti/passkit-generator.git;
|
git clone https://github.com/alexandercerutti/passkit-generator.git;
|
||||||
cd passkit-generator;
|
cd passkit-generator && npm install;
|
||||||
npm install;
|
cd examples && npm install;
|
||||||
npm install --no-save express;
|
|
||||||
cd examples;
|
|
||||||
node <the-example-you-want-to-execute>.js
|
node <the-example-you-want-to-execute>.js
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -13,76 +13,75 @@ import { createPass } from "..";
|
|||||||
import { PassWithBarcodeMethods } from "../src/pass";
|
import { PassWithBarcodeMethods } from "../src/pass";
|
||||||
|
|
||||||
app.all(async function manageRequest(request, response) {
|
app.all(async function manageRequest(request, response) {
|
||||||
|
|
||||||
const passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
const passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
||||||
|
|
||||||
let pass = await createPass({
|
try {
|
||||||
model: `./models/${request.params.modelName}`,
|
const pass = await createPass({
|
||||||
certificates: {
|
model: `./models/${request.params.modelName}`,
|
||||||
wwdr: "../certificates/WWDR.pem",
|
certificates: {
|
||||||
signerCert: "../certificates/signerCert.pem",
|
wwdr: "../certificates/WWDR.pem",
|
||||||
signerKey: {
|
signerCert: "../certificates/signerCert.pem",
|
||||||
keyFile: "../certificates/signerKey.pem",
|
signerKey: {
|
||||||
passphrase: "123456"
|
keyFile: "../certificates/signerKey.pem",
|
||||||
}
|
passphrase: "123456"
|
||||||
},
|
}
|
||||||
overrides: request.body || request.params || request.query,
|
},
|
||||||
});
|
overrides: request.body || request.params || request.query,
|
||||||
|
|
||||||
let bc: PassWithBarcodeMethods;
|
|
||||||
|
|
||||||
if (request.query.alt === true) {
|
|
||||||
// After this, pass.props["barcodes"] will have support for all the formats
|
|
||||||
// while pass.props["barcode"] will be the first of barcodes.
|
|
||||||
|
|
||||||
bc = pass.barcode("Thank you for using this package <3");
|
|
||||||
} else {
|
|
||||||
// After this, pass.props["barcodes"] will have support for just two of three
|
|
||||||
// of the passed format (the valid ones) and pass.props["barcode"] the first of barcodes.
|
|
||||||
// if not specified, altText is automatically the message
|
|
||||||
|
|
||||||
bc = pass.barcode({
|
|
||||||
message: "Thank you for using this package <3",
|
|
||||||
format: "PKBarcodeFormatCode128"
|
|
||||||
}, {
|
|
||||||
message: "Thank you for using this package <3",
|
|
||||||
format: "PKBarcodeFormatPDF417"
|
|
||||||
}, {
|
|
||||||
message: "Thank you for using this package <3",
|
|
||||||
format: "PKBarcodeFormatMock44617"
|
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
||||||
// You can change the format chosen for barcode prop support by calling .backward()
|
let bc: PassWithBarcodeMethods;
|
||||||
// or cancel the support by calling empty .backward
|
|
||||||
// like bc.backward().
|
|
||||||
// If the property passed does not exists, things does not change.
|
|
||||||
|
|
||||||
bc.backward("PKBarcodeFormatPDF417");
|
if (request.query.alt === true) {
|
||||||
|
// After this, pass.props["barcodes"] will have support for all the formats
|
||||||
|
// while pass.props["barcode"] will be the first of barcodes.
|
||||||
|
|
||||||
// If your barcode structures got not autogenerated yet (as happens with string
|
bc = pass.barcode("Thank you for using this package <3");
|
||||||
// parameter of barcode) you can call .autocomplete() to generate the support
|
} else {
|
||||||
// to all the structures. Please beware that this will overwrite ONLY barcodes and not barcode.
|
// After this, pass.props["barcodes"] will have support for just two of three
|
||||||
|
// of the passed format (the valid ones) and pass.props["barcode"] the first of barcodes.
|
||||||
|
// if not specified, altText is automatically the message
|
||||||
|
|
||||||
if (!request.query.alt) {
|
bc = pass.barcode({
|
||||||
// String generated barcode returns autocomplete as empty function
|
message: "Thank you for using this package <3",
|
||||||
bc.autocomplete();
|
format: "PKBarcodeFormatCode128"
|
||||||
}
|
}, {
|
||||||
|
message: "Thank you for using this package <3",
|
||||||
|
format: "PKBarcodeFormatPDF417"
|
||||||
|
}, {
|
||||||
|
message: "Thank you for using this package <3",
|
||||||
|
format: "PKBarcodeFormatMock44617"
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// @ts-ignore - ignoring for logging purposes
|
// You can change the format chosen for barcode prop support by calling .backward()
|
||||||
console.log("Barcode property is now:", pass._props["barcode"]);
|
// or cancel the support by calling empty .backward
|
||||||
// @ts-ignore - ignoring for logging purposes
|
// like bc.backward().
|
||||||
console.log("Barcodes support is autocompleted:", pass._props["barcodes"]);
|
// If the property passed does not exists, things does not change.
|
||||||
|
|
||||||
pass.generate().then(function (stream) {
|
bc.backward("PKBarcodeFormatPDF417");
|
||||||
|
|
||||||
|
// If your barcode structures got not autogenerated yet (as happens with string
|
||||||
|
// parameter of barcode) you can call .autocomplete() to generate the support
|
||||||
|
// to all the structures. Please beware that this will overwrite ONLY barcodes and not barcode.
|
||||||
|
|
||||||
|
if (!request.query.alt) {
|
||||||
|
// String generated barcode returns autocomplete as empty function
|
||||||
|
bc.autocomplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
// @ts-ignore - ignoring for logging purposes
|
||||||
|
console.log("Barcode property is now:", pass._props["barcode"]);
|
||||||
|
// @ts-ignore - ignoring for logging purposes
|
||||||
|
console.log("Barcodes support is autocompleted:", pass._props["barcodes"]);
|
||||||
|
|
||||||
|
const stream = pass.generate();
|
||||||
response.set({
|
response.set({
|
||||||
"Content-type": "application/vnd.apple.pkpass",
|
"Content-type": "application/vnd.apple.pkpass",
|
||||||
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.pipe(response);
|
stream.pipe(response);
|
||||||
}).catch(err => {
|
} catch(err) {
|
||||||
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
response.set({
|
response.set({
|
||||||
@@ -90,5 +89,5 @@ app.all(async function manageRequest(request, response) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
response.send(err.message);
|
response.send(err.message);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,39 +19,39 @@ app.all(async function manageRequest(request, response) {
|
|||||||
|
|
||||||
let passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
let passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
||||||
|
|
||||||
let pass = await createPass({
|
try {
|
||||||
model: `./models/${request.params.modelName}`,
|
let pass = await createPass({
|
||||||
certificates: {
|
model: `./models/${request.params.modelName}`,
|
||||||
wwdr: "../certificates/WWDR.pem",
|
certificates: {
|
||||||
signerCert: "../certificates/signerCert.pem",
|
wwdr: "../certificates/WWDR.pem",
|
||||||
signerKey: {
|
signerCert: "../certificates/signerCert.pem",
|
||||||
keyFile: "../certificates/signerKey.pem",
|
signerKey: {
|
||||||
passphrase: "123456"
|
keyFile: "../certificates/signerKey.pem",
|
||||||
}
|
passphrase: "123456"
|
||||||
},
|
}
|
||||||
overrides: request.body || request.params || request.query,
|
},
|
||||||
});
|
overrides: request.body || request.params || request.query,
|
||||||
|
});
|
||||||
|
|
||||||
if (request.query.fn === "void") {
|
if (request.query.fn === "void") {
|
||||||
pass.void();
|
pass.void();
|
||||||
} else if (request.query.fn === "expiration") {
|
} else if (request.query.fn === "expiration") {
|
||||||
// 2 minutes later...
|
// 2 minutes later...
|
||||||
const d = new Date();
|
const d = new Date();
|
||||||
d.setMinutes(d.getMinutes() + 2);
|
d.setMinutes(d.getMinutes() + 2);
|
||||||
|
|
||||||
// setting the expiration
|
// setting the expiration
|
||||||
pass.expiration(d);
|
pass.expiration(d);
|
||||||
}
|
}
|
||||||
|
|
||||||
pass.generate().then(function (stream) {
|
const stream = pass.generate();
|
||||||
response.set({
|
response.set({
|
||||||
"Content-type": "application/vnd.apple.pkpass",
|
"Content-type": "application/vnd.apple.pkpass",
|
||||||
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.pipe(response);
|
stream.pipe(response);
|
||||||
}).catch(err => {
|
} catch(err) {
|
||||||
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
response.set({
|
response.set({
|
||||||
@@ -59,5 +59,5 @@ app.all(async function manageRequest(request, response) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
response.send(err.message);
|
response.send(err.message);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,145 +14,145 @@ import { createPass } from "..";
|
|||||||
|
|
||||||
app.all(async function manageRequest(request, response) {
|
app.all(async function manageRequest(request, response) {
|
||||||
let passName = "exampleBooking" + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
let passName = "exampleBooking" + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
||||||
|
try {
|
||||||
|
let pass = await createPass({
|
||||||
|
model: `./models/exampleBooking`,
|
||||||
|
certificates: {
|
||||||
|
wwdr: "../certificates/WWDR.pem",
|
||||||
|
signerCert: "../certificates/signerCert.pem",
|
||||||
|
signerKey: {
|
||||||
|
keyFile: "../certificates/signerKey.pem",
|
||||||
|
passphrase: "123456"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
overrides: request.body || request.params || request.query,
|
||||||
|
});
|
||||||
|
|
||||||
let pass = await createPass({
|
pass.transitType = "PKTransitTypeAir";
|
||||||
model: `./models/exampleBooking`,
|
|
||||||
certificates: {
|
|
||||||
wwdr: "../certificates/WWDR.pem",
|
|
||||||
signerCert: "../certificates/signerCert.pem",
|
|
||||||
signerKey: {
|
|
||||||
keyFile: "../certificates/signerKey.pem",
|
|
||||||
passphrase: "123456"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
overrides: request.body || request.params || request.query,
|
|
||||||
});
|
|
||||||
|
|
||||||
pass.transitType = "PKTransitTypeAir";
|
pass.headerFields.push({
|
||||||
|
"key": "header1",
|
||||||
|
"label": "Data",
|
||||||
|
"value": "25 mag",
|
||||||
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
|
}, {
|
||||||
|
"key": "header2",
|
||||||
|
"label": "Volo",
|
||||||
|
"value": "EZY997",
|
||||||
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
|
});
|
||||||
|
|
||||||
pass.headerFields.push({
|
pass.primaryFields.push({
|
||||||
"key": "header1",
|
key: "IATA-source",
|
||||||
"label": "Data",
|
value: "NAP",
|
||||||
"value": "25 mag",
|
label: "Napoli",
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
textAlignment: "PKTextAlignmentLeft"
|
||||||
}, {
|
}, {
|
||||||
"key": "header2",
|
key: "IATA-destination",
|
||||||
"label": "Volo",
|
value: "VCE",
|
||||||
"value": "EZY997",
|
label: "Venezia Marco Polo",
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
textAlignment: "PKTextAlignmentRight"
|
||||||
});
|
});
|
||||||
|
|
||||||
pass.primaryFields.push({
|
pass.secondaryFields.push({
|
||||||
key: "IATA-source",
|
"key": "secondary1",
|
||||||
value: "NAP",
|
"label": "Imbarco chiuso",
|
||||||
label: "Napoli",
|
"value": "18:40",
|
||||||
textAlignment: "PKTextAlignmentLeft"
|
"textAlignment": "PKTextAlignmentCenter",
|
||||||
}, {
|
}, {
|
||||||
key: "IATA-destination",
|
"key": "sec2",
|
||||||
value: "VCE",
|
"label": "Partenze",
|
||||||
label: "Venezia Marco Polo",
|
"value": "19:10",
|
||||||
textAlignment: "PKTextAlignmentRight"
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
});
|
}, {
|
||||||
|
"key": "sec3",
|
||||||
|
"label": "SB",
|
||||||
|
"value": "Sì",
|
||||||
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
|
}, {
|
||||||
|
"key": "sec4",
|
||||||
|
"label": "Imbarco",
|
||||||
|
"value": "Anteriore",
|
||||||
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
|
});
|
||||||
|
|
||||||
pass.secondaryFields.push({
|
pass.auxiliaryFields.push({
|
||||||
"key": "secondary1",
|
"key": "aux1",
|
||||||
"label": "Imbarco chiuso",
|
"label": "Passeggero",
|
||||||
"value": "18:40",
|
"value": "MR. WHO KNOWS",
|
||||||
"textAlignment": "PKTextAlignmentCenter",
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
}, {
|
}, {
|
||||||
"key": "sec2",
|
"key": "aux2",
|
||||||
"label": "Partenze",
|
"label": "Posto",
|
||||||
"value": "19:10",
|
"value": "1A*",
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
"textAlignment": "PKTextAlignmentCenter"
|
||||||
}, {
|
});
|
||||||
"key": "sec3",
|
|
||||||
"label": "SB",
|
|
||||||
"value": "Sì",
|
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
|
||||||
}, {
|
|
||||||
"key": "sec4",
|
|
||||||
"label": "Imbarco",
|
|
||||||
"value": "Anteriore",
|
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
|
||||||
});
|
|
||||||
|
|
||||||
pass.auxiliaryFields.push({
|
pass.backFields.push({
|
||||||
"key": "aux1",
|
"key": "document number",
|
||||||
"label": "Passeggero",
|
"label": "Numero documento:",
|
||||||
"value": "MR. WHO KNOWS",
|
"value": "- -",
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
}, {
|
}, {
|
||||||
"key": "aux2",
|
"key": "You're checked in, what next",
|
||||||
"label": "Posto",
|
"label": "Hai effettuato il check-in, Quali sono le prospettive",
|
||||||
"value": "1A*",
|
"value": "",
|
||||||
"textAlignment": "PKTextAlignmentCenter"
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
});
|
}, {
|
||||||
|
"key": "Check In",
|
||||||
|
"label": "1. check-in✓",
|
||||||
|
"value": "",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "checkIn",
|
||||||
|
"label": "",
|
||||||
|
"value": "Le uscite d'imbarco chiudono 30 minuti prima della partenza, quindi sii puntuale. In questo aeroporto puoi utilizzare la corsia Fast Track ai varchi di sicurezza.",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "2. Bags",
|
||||||
|
"label": "2. Bagaglio",
|
||||||
|
"value": "",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "Require special assistance",
|
||||||
|
"label": "Assistenza speciale",
|
||||||
|
"value": "Se hai richiesto assistenza speciale, presentati a un membro del personale nell'area di Consegna bagagli almeno 90 minuti prima del volo.",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "3. Departures",
|
||||||
|
"label": "3. Partenze",
|
||||||
|
"value": "",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "photoId",
|
||||||
|
"label": "Un documento d’identità corredato di fotografia",
|
||||||
|
"value": "è obbligatorio su TUTTI i voli. Per un viaggio internazionale è necessario un passaporto valido o, dove consentita, una carta d’identità.",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "yourSeat",
|
||||||
|
"label": "Il tuo posto:",
|
||||||
|
"value": "verifica il tuo numero di posto nella parte superiore. Durante l’imbarco utilizza le scale anteriori e posteriori: per le file 1-10 imbarcati dalla parte anteriore; per le file 11-31 imbarcati dalla parte posteriore. Colloca le borse di dimensioni ridotte sotto il sedile davanti a te.",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "Pack safely",
|
||||||
|
"label": "Bagaglio sicuro",
|
||||||
|
"value": "Fai clic http://easyjet.com/it/articoli-pericolosi per maggiori informazioni sulle merci pericolose oppure visita il sito CAA http://www.caa.co.uk/default.aspx?catid=2200",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
}, {
|
||||||
|
"key": "Thank you for travelling easyJet",
|
||||||
|
"label": "Grazie per aver viaggiato con easyJet",
|
||||||
|
"value": "",
|
||||||
|
"textAlignment": "PKTextAlignmentLeft"
|
||||||
|
});
|
||||||
|
|
||||||
pass.backFields.push({
|
const stream = pass.generate();
|
||||||
"key": "document number",
|
|
||||||
"label": "Numero documento:",
|
|
||||||
"value": "- -",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "You're checked in, what next",
|
|
||||||
"label": "Hai effettuato il check-in, Quali sono le prospettive",
|
|
||||||
"value": "",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "Check In",
|
|
||||||
"label": "1. check-in✓",
|
|
||||||
"value": "",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "checkIn",
|
|
||||||
"label": "",
|
|
||||||
"value": "Le uscite d'imbarco chiudono 30 minuti prima della partenza, quindi sii puntuale. In questo aeroporto puoi utilizzare la corsia Fast Track ai varchi di sicurezza.",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "2. Bags",
|
|
||||||
"label": "2. Bagaglio",
|
|
||||||
"value": "",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "Require special assistance",
|
|
||||||
"label": "Assistenza speciale",
|
|
||||||
"value": "Se hai richiesto assistenza speciale, presentati a un membro del personale nell'area di Consegna bagagli almeno 90 minuti prima del volo.",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "3. Departures",
|
|
||||||
"label": "3. Partenze",
|
|
||||||
"value": "",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "photoId",
|
|
||||||
"label": "Un documento d’identità corredato di fotografia",
|
|
||||||
"value": "è obbligatorio su TUTTI i voli. Per un viaggio internazionale è necessario un passaporto valido o, dove consentita, una carta d’identità.",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "yourSeat",
|
|
||||||
"label": "Il tuo posto:",
|
|
||||||
"value": "verifica il tuo numero di posto nella parte superiore. Durante l’imbarco utilizza le scale anteriori e posteriori: per le file 1-10 imbarcati dalla parte anteriore; per le file 11-31 imbarcati dalla parte posteriore. Colloca le borse di dimensioni ridotte sotto il sedile davanti a te.",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "Pack safely",
|
|
||||||
"label": "Bagaglio sicuro",
|
|
||||||
"value": "Fai clic http://easyjet.com/it/articoli-pericolosi per maggiori informazioni sulle merci pericolose oppure visita il sito CAA http://www.caa.co.uk/default.aspx?catid=2200",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
}, {
|
|
||||||
"key": "Thank you for travelling easyJet",
|
|
||||||
"label": "Grazie per aver viaggiato con easyJet",
|
|
||||||
"value": "",
|
|
||||||
"textAlignment": "PKTextAlignmentLeft"
|
|
||||||
});
|
|
||||||
|
|
||||||
pass.generate().then(function (stream) {
|
|
||||||
response.set({
|
response.set({
|
||||||
"Content-type": "application/vnd.apple.pkpass",
|
"Content-type": "application/vnd.apple.pkpass",
|
||||||
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.pipe(response);
|
stream.pipe(response);
|
||||||
}).catch(err => {
|
} catch(err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
response.set({
|
response.set({
|
||||||
@@ -160,5 +160,5 @@ app.all(async function manageRequest(request, response) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
response.send(err.message);
|
response.send(err.message);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,57 +10,57 @@ import { createPass } from "..";
|
|||||||
app.all(async function manageRequest(request, response) {
|
app.all(async function manageRequest(request, response) {
|
||||||
const passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
const passName = request.params.modelName + "_" + (new Date()).toISOString().split('T')[0].replace(/-/ig, "");
|
||||||
|
|
||||||
const pass = await createPass({
|
try {
|
||||||
model: `./models/${request.params.modelName}`,
|
const pass = await createPass({
|
||||||
certificates: {
|
model: `./models/${request.params.modelName}`,
|
||||||
wwdr: "../certificates/WWDR.pem",
|
certificates: {
|
||||||
signerCert: "../certificates/signerCert.pem",
|
wwdr: "../certificates/WWDR.pem",
|
||||||
signerKey: {
|
signerCert: "../certificates/signerCert.pem",
|
||||||
keyFile: "../certificates/signerKey.pem",
|
signerKey: {
|
||||||
passphrase: "123456"
|
keyFile: "../certificates/signerKey.pem",
|
||||||
}
|
passphrase: "123456"
|
||||||
},
|
}
|
||||||
overrides: request.body || request.params || request.query
|
},
|
||||||
});
|
overrides: request.body || request.params || request.query
|
||||||
|
});
|
||||||
|
|
||||||
// For each language you include, an .lproj folder in pass bundle
|
// For each language you include, an .lproj folder in pass bundle
|
||||||
// is created or included. You may not want to add translations but
|
// is created or included. You may not want to add translations but
|
||||||
// only images for a specific language. So you create manually
|
// only images for a specific language. So you create manually
|
||||||
// an .lproj folder in your pass model then add the language here below.
|
// an .lproj folder in your pass model then add the language here below.
|
||||||
// If no translations were added, the folder
|
// If no translations were added, the folder
|
||||||
// is included or created but without pass.strings file
|
// is included or created but without pass.strings file
|
||||||
|
|
||||||
// English, does not has an .lproj folder and no translation
|
// English, does not has an .lproj folder and no translation
|
||||||
// Text placeholders may not be showed for the english language
|
// Text placeholders may not be showed for the english language
|
||||||
// (e.g. "Event" and "Location" as literal) and another language may be used instead
|
// (e.g. "Event" and "Location" as literal) and another language may be used instead
|
||||||
pass.localize("en");
|
pass.localize("en");
|
||||||
|
|
||||||
// Italian, already has an .lproj which gets included
|
// Italian, already has an .lproj which gets included
|
||||||
pass.localize("it", {
|
pass.localize("it", {
|
||||||
"EVENT": "Evento",
|
"EVENT": "Evento",
|
||||||
"LOCATION": "Dove"
|
"LOCATION": "Dove"
|
||||||
});
|
});
|
||||||
|
|
||||||
// German, doesn't, so is created
|
// German, doesn't, so is created
|
||||||
pass.localize("de", {
|
pass.localize("de", {
|
||||||
"EVENT": "Ereignis",
|
"EVENT": "Ereignis",
|
||||||
"LOCATION": "Ort"
|
"LOCATION": "Ort"
|
||||||
});
|
});
|
||||||
|
|
||||||
// This language does not exist but is still added as .lproj folder
|
// This language does not exist but is still added as .lproj folder
|
||||||
pass.localize("zu", {});
|
pass.localize("zu", {});
|
||||||
// @ts-ignore - ignoring for logging purposes. Do not replicate
|
// @ts-ignore - ignoring for logging purposes. Do not replicate
|
||||||
console.log("Added languages", Object.keys(pass.l10nBundles).join(", "))
|
console.log("Added languages", Object.keys(pass.l10nBundles).join(", "))
|
||||||
|
|
||||||
pass.generate().then(function (stream) {
|
const stream = pass.generate();
|
||||||
response.set({
|
response.set({
|
||||||
"Content-type": "application/vnd.apple.pkpass",
|
"Content-type": "application/vnd.apple.pkpass",
|
||||||
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
"Content-disposition": `attachment; filename=${passName}.pkpass`
|
||||||
});
|
});
|
||||||
|
|
||||||
stream.pipe(response);
|
stream.pipe(response);
|
||||||
}).catch(err => {
|
} catch(err) {
|
||||||
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
||||||
response.set({
|
response.set({
|
||||||
@@ -68,5 +68,5 @@ app.all(async function manageRequest(request, response) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
response.send(err.message);
|
response.send(err.message);
|
||||||
});
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
374
examples/package-lock.json
generated
Normal file
374
examples/package-lock.json
generated
Normal file
@@ -0,0 +1,374 @@
|
|||||||
|
{
|
||||||
|
"name": "examples",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"accepts": {
|
||||||
|
"version": "1.3.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz",
|
||||||
|
"integrity": "sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==",
|
||||||
|
"requires": {
|
||||||
|
"mime-types": "~2.1.24",
|
||||||
|
"negotiator": "0.6.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"array-flatten": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI="
|
||||||
|
},
|
||||||
|
"body-parser": {
|
||||||
|
"version": "1.19.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.0.tgz",
|
||||||
|
"integrity": "sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.1.0",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"http-errors": "1.7.2",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"qs": "6.7.0",
|
||||||
|
"raw-body": "2.4.0",
|
||||||
|
"type-is": "~1.6.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"bytes": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg=="
|
||||||
|
},
|
||||||
|
"content-disposition": {
|
||||||
|
"version": "0.5.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.3.tgz",
|
||||||
|
"integrity": "sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==",
|
||||||
|
"requires": {
|
||||||
|
"safe-buffer": "5.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content-type": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
|
||||||
|
"integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
|
||||||
|
},
|
||||||
|
"cookie": {
|
||||||
|
"version": "0.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz",
|
||||||
|
"integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg=="
|
||||||
|
},
|
||||||
|
"cookie-signature": {
|
||||||
|
"version": "1.0.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
|
||||||
|
"integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw="
|
||||||
|
},
|
||||||
|
"debug": {
|
||||||
|
"version": "2.6.9",
|
||||||
|
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
||||||
|
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
||||||
|
"requires": {
|
||||||
|
"ms": "2.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"depd": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
|
||||||
|
},
|
||||||
|
"destroy": {
|
||||||
|
"version": "1.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
|
||||||
|
"integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="
|
||||||
|
},
|
||||||
|
"ee-first": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
|
||||||
|
"integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
|
||||||
|
},
|
||||||
|
"encodeurl": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
|
||||||
|
"integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k="
|
||||||
|
},
|
||||||
|
"escape-html": {
|
||||||
|
"version": "1.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
|
||||||
|
"integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg="
|
||||||
|
},
|
||||||
|
"etag": {
|
||||||
|
"version": "1.8.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
|
||||||
|
"integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
|
||||||
|
},
|
||||||
|
"express": {
|
||||||
|
"version": "4.17.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/express/-/express-4.17.1.tgz",
|
||||||
|
"integrity": "sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==",
|
||||||
|
"requires": {
|
||||||
|
"accepts": "~1.3.7",
|
||||||
|
"array-flatten": "1.1.1",
|
||||||
|
"body-parser": "1.19.0",
|
||||||
|
"content-disposition": "0.5.3",
|
||||||
|
"content-type": "~1.0.4",
|
||||||
|
"cookie": "0.4.0",
|
||||||
|
"cookie-signature": "1.0.6",
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"finalhandler": "~1.1.2",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"merge-descriptors": "1.0.1",
|
||||||
|
"methods": "~1.1.2",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"path-to-regexp": "0.1.7",
|
||||||
|
"proxy-addr": "~2.0.5",
|
||||||
|
"qs": "6.7.0",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"safe-buffer": "5.1.2",
|
||||||
|
"send": "0.17.1",
|
||||||
|
"serve-static": "1.14.1",
|
||||||
|
"setprototypeof": "1.1.1",
|
||||||
|
"statuses": "~1.5.0",
|
||||||
|
"type-is": "~1.6.18",
|
||||||
|
"utils-merge": "1.0.1",
|
||||||
|
"vary": "~1.1.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"finalhandler": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
|
||||||
|
"integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"statuses": "~1.5.0",
|
||||||
|
"unpipe": "~1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"forwarded": {
|
||||||
|
"version": "0.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz",
|
||||||
|
"integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ="
|
||||||
|
},
|
||||||
|
"fresh": {
|
||||||
|
"version": "0.5.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
|
||||||
|
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
|
||||||
|
},
|
||||||
|
"http-errors": {
|
||||||
|
"version": "1.7.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz",
|
||||||
|
"integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==",
|
||||||
|
"requires": {
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"inherits": "2.0.3",
|
||||||
|
"setprototypeof": "1.1.1",
|
||||||
|
"statuses": ">= 1.5.0 < 2",
|
||||||
|
"toidentifier": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"iconv-lite": {
|
||||||
|
"version": "0.4.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
|
||||||
|
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
|
||||||
|
"requires": {
|
||||||
|
"safer-buffer": ">= 2.1.2 < 3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"inherits": {
|
||||||
|
"version": "2.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
|
||||||
|
"integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
|
||||||
|
},
|
||||||
|
"ipaddr.js": {
|
||||||
|
"version": "1.9.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.0.tgz",
|
||||||
|
"integrity": "sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA=="
|
||||||
|
},
|
||||||
|
"media-typer": {
|
||||||
|
"version": "0.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
|
||||||
|
"integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
|
||||||
|
},
|
||||||
|
"merge-descriptors": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E="
|
||||||
|
},
|
||||||
|
"methods": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
|
||||||
|
},
|
||||||
|
"mime": {
|
||||||
|
"version": "1.6.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
|
||||||
|
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
|
||||||
|
},
|
||||||
|
"mime-db": {
|
||||||
|
"version": "1.40.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz",
|
||||||
|
"integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA=="
|
||||||
|
},
|
||||||
|
"mime-types": {
|
||||||
|
"version": "2.1.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz",
|
||||||
|
"integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==",
|
||||||
|
"requires": {
|
||||||
|
"mime-db": "1.40.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ms": {
|
||||||
|
"version": "2.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
|
},
|
||||||
|
"negotiator": {
|
||||||
|
"version": "0.6.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz",
|
||||||
|
"integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw=="
|
||||||
|
},
|
||||||
|
"on-finished": {
|
||||||
|
"version": "2.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
|
||||||
|
"integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
|
||||||
|
"requires": {
|
||||||
|
"ee-first": "1.1.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"parseurl": {
|
||||||
|
"version": "1.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
|
||||||
|
"integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
|
||||||
|
},
|
||||||
|
"path-to-regexp": {
|
||||||
|
"version": "0.1.7",
|
||||||
|
"resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
|
||||||
|
"integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
|
||||||
|
},
|
||||||
|
"proxy-addr": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.5.tgz",
|
||||||
|
"integrity": "sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==",
|
||||||
|
"requires": {
|
||||||
|
"forwarded": "~0.1.2",
|
||||||
|
"ipaddr.js": "1.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"qs": {
|
||||||
|
"version": "6.7.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz",
|
||||||
|
"integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ=="
|
||||||
|
},
|
||||||
|
"range-parser": {
|
||||||
|
"version": "1.2.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
||||||
|
"integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
|
||||||
|
},
|
||||||
|
"raw-body": {
|
||||||
|
"version": "2.4.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz",
|
||||||
|
"integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==",
|
||||||
|
"requires": {
|
||||||
|
"bytes": "3.1.0",
|
||||||
|
"http-errors": "1.7.2",
|
||||||
|
"iconv-lite": "0.4.24",
|
||||||
|
"unpipe": "1.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"safe-buffer": {
|
||||||
|
"version": "5.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||||
|
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||||
|
},
|
||||||
|
"safer-buffer": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||||
|
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||||
|
},
|
||||||
|
"send": {
|
||||||
|
"version": "0.17.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/send/-/send-0.17.1.tgz",
|
||||||
|
"integrity": "sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==",
|
||||||
|
"requires": {
|
||||||
|
"debug": "2.6.9",
|
||||||
|
"depd": "~1.1.2",
|
||||||
|
"destroy": "~1.0.4",
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"etag": "~1.8.1",
|
||||||
|
"fresh": "0.5.2",
|
||||||
|
"http-errors": "~1.7.2",
|
||||||
|
"mime": "1.6.0",
|
||||||
|
"ms": "2.1.1",
|
||||||
|
"on-finished": "~2.3.0",
|
||||||
|
"range-parser": "~1.2.1",
|
||||||
|
"statuses": "~1.5.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"ms": {
|
||||||
|
"version": "2.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve-static": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==",
|
||||||
|
"requires": {
|
||||||
|
"encodeurl": "~1.0.2",
|
||||||
|
"escape-html": "~1.0.3",
|
||||||
|
"parseurl": "~1.3.3",
|
||||||
|
"send": "0.17.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"setprototypeof": {
|
||||||
|
"version": "1.1.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz",
|
||||||
|
"integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw=="
|
||||||
|
},
|
||||||
|
"statuses": {
|
||||||
|
"version": "1.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
|
||||||
|
"integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow="
|
||||||
|
},
|
||||||
|
"toidentifier": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw=="
|
||||||
|
},
|
||||||
|
"type-is": {
|
||||||
|
"version": "1.6.18",
|
||||||
|
"resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
|
||||||
|
"integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
|
||||||
|
"requires": {
|
||||||
|
"media-typer": "0.3.0",
|
||||||
|
"mime-types": "~2.1.24"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unpipe": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
|
||||||
|
"integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
|
||||||
|
},
|
||||||
|
"utils-merge": {
|
||||||
|
"version": "1.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
|
||||||
|
"integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
|
||||||
|
},
|
||||||
|
"vary": {
|
||||||
|
"version": "1.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
||||||
|
"integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
10
examples/package.json
Normal file
10
examples/package.json
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"name": "examples",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "Passkit-generator examples",
|
||||||
|
"author": "Alexander P. Cerutti <cerutti.alexander@gmail.com>",
|
||||||
|
"license": "ISC",
|
||||||
|
"dependencies": {
|
||||||
|
"express": "^4.17.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user