passkit-generator
Advanced tools
Comparing version 1.3.0 to 1.3.1
81
API.md
@@ -34,22 +34,22 @@ # API Reference | ||
* [Instance](#method:constructor) | ||
* [Instance](#method_constructor) | ||
* Localize the pass | ||
* [.localize()](#method:localize) | ||
* [.localize()](#method_localize) | ||
* Setting barcode | ||
* [.barcode()](#method:barcode) | ||
* [.backward()](#method:bBackward) | ||
* [.autocomplete()](#method:bAutocomplete) | ||
* [.barcode()](#method_barcode) | ||
* [.backward()](#method_bBackward) | ||
* [.autocomplete()](#method_bAutocomplete) | ||
* Setting expiration / voiding the pass | ||
* [.expiration()](#method:expiration) | ||
* [.void()](#method:void) | ||
* [.expiration()](#method_expiration) | ||
* [.void()](#method_void) | ||
* Setting relevance | ||
* [.relevance()](#method:relevance) | ||
* [.relevance()](#method_relevance) | ||
* Setting NFC | ||
* [.nfc()](#method:nfc) | ||
* [.nfc()](#method_nfc) | ||
* Setting Pass Structure Keys (primaryFields, secondaryFields, ...) | ||
* [<field>.push()](#prop:fields-push) | ||
* [<field>.pop()](#prop:fields-pop) | ||
* [TransitType](#prop:transitType) | ||
* [<field>.push()](#prop_fields-push) | ||
* [<field>.pop()](#prop_fields-pop) | ||
* [TransitType](#prop_transitType) | ||
* Generating the compiled pass. | ||
* [.generate()](#method:generate) | ||
* [.generate()](#method_generate) | ||
@@ -59,5 +59,5 @@ <br><br> | ||
<a name="method:constructor"> | ||
<a name="method_constructor"></a> | ||
#### constructor() | ||
</a> | ||
@@ -101,5 +101,5 @@ ```javascript | ||
<br> | ||
<a name="method:localize"> | ||
<a name="method_localize"></a> | ||
#### .localize() | ||
</a> | ||
@@ -150,5 +150,5 @@ ```javascript | ||
<a name="method:barcode"> | ||
<a name="method_barcode"></a> | ||
#### .barcode() | ||
</a> | ||
@@ -211,5 +211,5 @@ ```javascript | ||
<br> | ||
<a name="method:bBackward"> | ||
<a name="method_bBackward"></a> | ||
#### .barcode().backward() | ||
</a> | ||
@@ -250,5 +250,5 @@ ```javascript | ||
<br> | ||
<a name="method:bAutocomplete"> | ||
<a name="method_bAutocomplete"></a> | ||
#### .barcode().autocomplete() | ||
</a> | ||
@@ -273,5 +273,5 @@ ```javascript | ||
<a name="method:expiration"> | ||
<a name="method_expiration"></a> | ||
#### .expiration() | ||
</a> | ||
@@ -305,5 +305,6 @@ ```javascript | ||
<a name="method:void"> | ||
<a name="method_void"></a> | ||
#### .void() | ||
</a> | ||
```javascript | ||
@@ -327,5 +328,5 @@ pass.void(); | ||
<a name="method:relevance"> | ||
<a name="method_relevance"></a> | ||
#### .relevance() | ||
</a> | ||
@@ -347,3 +348,3 @@ ```javascript | ||
For *relevantDate*, the date is parsed in the same formats of [#expiration()](#method:expiration). For *maxDistance*, the value is simply converted as Number and pushed only with successful conversion. | ||
For *relevantDate*, the date is parsed in the same formats of [#expiration()](#method_expiration). For *maxDistance*, the value is simply converted as Number and pushed only with successful conversion. | ||
@@ -382,5 +383,5 @@ | ||
<a name="method:nfc"> | ||
<a name="method_nfc"></a> | ||
#### .nfc() | ||
</a> | ||
@@ -420,5 +421,5 @@ ```javascript | ||
<a name="prop:fields-push"> | ||
<a name="prop_fields-push"></a> | ||
#### <field>.push() | ||
</a> | ||
@@ -476,5 +477,5 @@ ```javascript | ||
<a name="prop:fields-pop"> | ||
<a name="prop_fields-pop"></a> | ||
#### <field>.pop() | ||
</a> | ||
@@ -510,5 +511,5 @@ ```javascript | ||
<a name="prop:transitType"> | ||
<a name="prop_transitType"></a> | ||
#### .transitType | ||
</a> | ||
@@ -535,5 +536,5 @@ ```javascript | ||
<a name="method:generate"> | ||
<a name="method_generate"></a> | ||
#### .generate() | ||
</a> | ||
@@ -540,0 +541,0 @@ ```javascript |
@@ -616,3 +616,3 @@ const fs = require("fs"); | ||
if (!pem) { | ||
return reject(errors.INVALID_CERTS) | ||
throw new Error(errors.INVALID_CERTS.replace("%s", optCertsNames[index])); | ||
} | ||
@@ -623,3 +623,7 @@ | ||
}).catch(err => { | ||
throw new Error(errors.INVALID_CERTS); | ||
if (!err.path) { | ||
throw err; | ||
} else { | ||
throw new Error(errors.INVALID_CERT_PATH.replace("%s", path.parse(err.path).base)); | ||
} | ||
}); | ||
@@ -626,0 +630,0 @@ } |
@@ -8,5 +8,6 @@ let errors = { | ||
MODEL_NOT_FOUND: "Model %s not found. Provide a valid one to continue", | ||
INVALID_CERTS: "Invalid certificates got loaded. Please provide WWDR certificates and developer signer certificate and key (with passphrase)." | ||
INVALID_CERTS: "Invalid certificate(s) loaded: %s. Please provide valid WWDR certificates and developer signer certificate and key (with passphrase). Refer to docs to obtain them.", | ||
INVALID_CERT_PATH: "Invalid certificate loaded. %s does not exist." | ||
}; | ||
module.exports = errors; |
{ | ||
"name": "passkit-generator", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "The easiest way to generate custom Apple Wallet passes in Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,3 +34,3 @@ # Node PassKit Generator | ||
You can also create `.lproj` folders (e.g. *en.lproj* or *it.lproj*) containing localized media. To include a folder or translate texts inside the pass, please refer to the API, [.localize()](./API.md#method:localize) method. | ||
You can also create `.lproj` folders (e.g. *en.lproj* or *it.lproj*) containing localized media. To include a folder or translate texts inside the pass, please refer to the API, [.localize()](./API.md#method_localize) method. | ||
@@ -122,1 +122,3 @@ ##### Pass.json | ||
Any contribution is welcome ❤️ | ||
A big thanks to all the people and friends in the Apple Developer Academy that pushed me and helped me into realizing something like this and a big thanks to the ones that helped me to make technical choices. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
587678
1457
123