Commit Graph

1020 Commits

Author SHA1 Message Date
alexandercerutti
9724592d4b Added documentation for localize function;
Added check for translation type (must be an object)
2018-08-12 17:22:10 +02:00
alexandercerutti
6d8f26237a Introduced check for pass.strings buffer length - will be added if greater than 0 2018-08-12 17:20:42 +02:00
alexandercerutti
31bb8ac3a0 Edited server to return JSON structure as Error 2018-08-12 16:16:51 +02:00
alexandercerutti
e360ff01ff Edited generate method to include pass.string translations for each specified language 2018-08-11 18:20:54 +02:00
alexandercerutti
88f845cc69 Added localize method to register translation in the class; Added _generateStringFile method to create pass.string Buffer 2018-08-11 18:19:38 +02:00
alexandercerutti
89a21f47a0 Edited error messages 2018-08-11 12:02:35 +02:00
alexandercerutti
52bd86a906 Added check for icon file in pass model 2018-08-11 10:16:55 +02:00
alexandercerutti
af6ab80702 Removed errors results as JSON, moved to exception throwing; Changed error messages 2018-08-11 00:13:06 +02:00
alexandercerutti
cc23930a2f Transformed the whole generate() execution to a Promise-driven flow 2018-08-07 23:49:47 +02:00
alexandercerutti
551dd8a8e0 Changed back _patch method to return a Promise 2018-08-07 16:22:09 +02:00
alexandercerutti
bab73d7b62 Fixed edit parameters passing 2018-08-07 16:16:07 +02:00
alexandercerutti
c0098fe171 Added script for dev to ignore list 2018-08-07 01:12:39 +02:00
alexandercerutti
7efbb9c3d1 Moved pass types into _validateType 2018-08-05 18:32:02 +02:00
alexandercerutti
565916c65d Removed Promise returning into _patch; Now the catch is done when calling _patch and not inside _patch itself 2018-08-03 02:38:35 +02:00
alexandercerutti
1d1a4cd9c5 Added specific patching for barcode(s) 2018-07-26 14:30:57 +02:00
alexandercerutti
c11472a447 Edited options patching way. 2018-07-25 23:09:53 +02:00
alexandercerutti
ea8baec2b5 Changed _validateType to validate also the schema;
Edited schemas to comply with boardingPass requirements and the others pass types
2018-07-25 17:08:06 +02:00
alexandercerutti
1c68623596 Removed old handlers support 2018-07-25 16:31:51 +02:00
alexandercerutti
d5c1c48715 Renamed Promise done in success; Changed conditions to show barcode incompatibility notices 2018-07-24 16:34:29 +02:00
alexandercerutti
599280cf5c Moved settings checks in generate() and moved generate() content in an inline arrow function 2018-07-24 16:31:26 +02:00
alexandercerutti
514a15abd5 Moved removeHidden function to the bottom of the file 2018-07-24 16:30:01 +02:00
alexandercerutti
751e799462 Changed the way in which certificates are valid; Removed async parallel execution after handlers removal; Changed model extension adding condition 2018-07-24 01:03:48 +02:00
alexandercerutti
2d66e14f15 Changed schema violation from throw to Promise rejection 2018-07-24 01:03:34 +02:00
alexandercerutti
903d854723 Removed _checkReqs, moved back its checks into generate() 2018-07-24 00:27:34 +02:00
alexandercerutti
7023009b2d Removed handlers 2018-07-24 00:07:04 +02:00
alexandercerutti
2f3e6ff43b Renamed passExtractor function in _passExtractor function 2018-07-24 00:03:12 +02:00
alexandercerutti
e3bf2e4add Replaced exception throw with Promise Rejection 2018-07-23 18:13:02 +02:00
alexandercerutti
b1daa2d216 Converted certificates files names into paths; Removed dir property from the schema 2018-07-23 17:22:08 +02:00
alexandercerutti
ad55d3aeba Model is now represented as string containing path, not anymore an Object 2018-07-23 16:59:03 +02:00
alexandercerutti
c2081e32c7 Moved bigger functions in generate() into variables;
Fixed some typos
2018-07-23 15:39:50 +02:00
alexandercerutti
fa2b656efd Edited schemas, moved outside the object all the schemas,
added schemas for structure and field
2018-07-23 11:19:02 +02:00
alexandercerutti
c05bd130c3 Added schemas for 'field' and 'structure' 2018-07-22 23:48:55 +02:00
alexandercerutti
b74da4ba93 Added Barcode(s) correctness check with backward and forward compatibility check;
Added constants in schema.js to keep all the schemas against which validate;
Added schema for barcodes;
Renamed "settingSchema" in "schema";
Renamed schemas "validate" function in "isValid";
Edited "isValid" fn to accept both the schema and the object;
Added more error-catching conditions;
2018-07-22 23:21:17 +02:00
alexandercerutti
fb77e6e426 Moved pass.json handling as parallel activity with L10N extractors
and removed the next parallel action used for pass.json and bundle
files like L10N and assets
2018-07-22 18:05:51 +02:00
alexandercerutti
21c57ba338 Fixed some comments and other little things 2018-07-21 11:01:33 +02:00
alexandercerutti
908863ba4a Added _checkReqs method to check model requirements (pass.json, name, non-empty);
Created different type of file lists and renamed the existing ones;
Renamed 'removeHiddenFiles' in 'removeHidden';
Changed model name and directory representation as Object;
Moved 'generate' main conditions in _checkReqs;
Changed L10N representation (list, extractors) as Object;
Changed completely the way in which bundle files (except pass.json) get retrieved and managed;
2018-07-21 00:00:06 +02:00
alexandercerutti
da1db13b52 Documented _validateType and changed its implementation 2018-07-20 16:09:38 +02:00
alexandercerutti
ee5e1801f0 Added error check inside pass.json reading block 2018-07-20 15:11:41 +02:00
alexandercerutti
2e5e1eb278 Added check for pass type (borderPass, eventTicket, shopping, etc.);
Added _validateType method for the previous implementation;
Added error support in async.parallel usage;
Renamed modelPath in computedModelPath;
Removed unused variables;
2018-07-20 14:30:24 +02:00
alexandercerutti
e407dfe644 Added eslint support and configuration 2018-07-20 14:29:31 +02:00
alexandercerutti
7c864f1d2a Changed name for input model as parameter;
Added Joi to validate input parameters schema;
Removed old draft of Pass class;
Removed completely the old way to load the configuration
2018-07-17 23:49:13 +02:00
alexandercerutti
5085d27fe6 Added a schema for input parameters to Pass class 2018-07-17 23:26:05 +02:00
Alexander Cerutti
db2ec3ec9e Moved 'filterPassOptions' into Pass class as '_filterOptions' method 2018-06-18 11:08:50 +02:00
Alexander Cerutti
b9c39cc938 Moved generateSignature func into Pass class as _sign method 2018-06-16 16:48:55 +02:00
Alexander Cerutti
e4d56bf7a1 Created Pass class and moved generatePass to generate method in Pass() 2018-06-16 16:47:16 +02:00
Alexander Cerutti
a7590b09dd Added first support to localization L10N, now localized folders get recognized, indexed, and their files sha1-calculated 2018-06-11 23:55:08 +02:00
Alexander Cerutti
006a0270d3 Removed unused packages and changed comment 2018-06-11 22:37:46 +02:00
Alexander Cerutti
4c18f5b4e2 Separed async-independent body from pass.json reading by using async.parallel 2018-06-11 22:34:52 +02:00
Alexander Cerutti
5c8334e40a Added two path.resolve 2018-06-10 20:35:21 +02:00
Alexander Cerutti
3d0a25314a Moved completely webserver activities from index.js to server.js
Replaced `RequestHandler` with `generatePass`.
Now `generatePass` function returns JSON objects containing the pass stream or, otherwise, the error structure.
2018-06-10 15:44:30 +02:00