Commit Graph

  • 6b4ec893d8 Changed implementation inside __parseSettings for the certificates to throw in case of necessity alexandercerutti 2018-08-26 12:02:13 +02:00
  • eeb925b2a5 Improved parsing details in dateToW3CString to accept hours, minutes and seconds and different date formats alexandercerutti 2018-08-26 11:59:41 +02:00
  • e7c5a9a3bc Now location accepts also no translations passed to the function to include the languge alexandercerutti 2018-08-26 11:58:08 +02:00
  • d240d1a128 Fixed typo for error message alexandercerutti 2018-08-26 11:56:46 +02:00
  • 9c58529687 Changed return type of dateToW3CString in case of error; Changed the dependend chunk of code alexandercerutti 2018-08-23 23:33:00 +02:00
  • 09626f9885 Fixed comments alexandercerutti 2018-08-23 23:28:39 +02:00
  • 137b9ab841 Changed implementation of __parsePEM; Now it does not return anymore an object but the value; Moved __parsePEM outside of Pass class as parsePEM function; alexandercerutti 2018-08-23 22:34:16 +02:00
  • 7d9cd5e1af Removed old filter alexandercerutti 2018-08-23 20:04:47 +02:00
  • 589ed66773 Removed warning messages alexandercerutti 2018-08-23 13:47:21 +02:00
  • eeaee7eae8 Changed implementation of __barcodeAutocomplete and __autogenBarcode; Now the first calls the second to generate all the (missing) structures; Renamed __autogenBarcode in __barcodeAutogen Moved __barcodeChooseBackward under __barcodeAutogen alexandercerutti 2018-08-23 13:42:11 +02:00
  • 5ab3b365dd Fixed comments alexandercerutti 2018-08-23 13:41:36 +02:00
  • 88464f7764 Removed async dependency alexandercerutti 2018-08-22 23:38:11 +02:00
  • 2d6c278c93 Changed inner certificates mapping to a clearer implementation alexandercerutti 2018-08-22 23:07:18 +02:00
  • bb31ded884 _parseSettings now throws on error; Removed async.concat for Promise.all implementation; alexandercerutti 2018-08-22 23:01:58 +02:00
  • db74f3d407 Removed Promise returning template function to be executed for each buffer for a reduce implementation alexandercerutti 2018-08-22 22:43:48 +02:00
  • 3eac7a4cb5 Added some comments inside the function; renamed _passExtractor without low dash alexandercerutti 2018-08-22 22:35:36 +02:00
  • f1f42c2f69 Reordered methods alexandercerutti 2018-08-22 16:53:11 +02:00
  • 865930fc3b Added barcode backward support canceling in __barcodeChooseBackward alexandercerutti 2018-08-22 14:49:14 +02:00
  • 433fd15971 Added more validation checks alexandercerutti 2018-08-22 14:22:04 +02:00
  • f0c682abec Changed implementation and parameter of __barcodeChooseBackward to accept a format-like string; renamed retroCompatibility to backward alexandercerutti 2018-08-22 13:18:29 +02:00
  • dacfa8d799 Relevance now returns improved this with length property containing the amount of valid results pushed alexandercerutti 2018-08-22 01:07:45 +02:00
  • 8136921b32 Fixed errors of barcodeDict and beaconDict in schema alexandercerutti 2018-08-22 00:54:41 +02:00
  • fdb4cda138 Removed useless returns alexandercerutti 2018-08-22 00:54:12 +02:00
  • 07861414d5 Added four new methods to manage barcode insertion; barcode() to set it up; __autogenBarcode() to generate from a string; __barcodeChooseBackward() to choose with of barcodes set upon barcode __barcodeAutocomplete() to fill barcodes with missing types alexandercerutti 2018-08-22 00:53:49 +02:00
  • 15802d641e Updated _filterOptions keys alexandercerutti 2018-08-21 18:10:16 +02:00
  • a5cbe497a2 Added check on parameter in isValidRGB funct alexandercerutti 2018-08-21 18:09:02 +02:00
  • 656c74b3d9 Added value check for three keys through isValidRGB func alexandercerutti 2018-08-21 18:08:29 +02:00
  • 583e09fe3a Added isValidRGB function alexandercerutti 2018-08-21 14:57:01 +02:00
  • db0ac92f17 Added comment for relevance method alexandercerutti 2018-08-21 14:56:20 +02:00
  • 86c07da135 Added messages.js to keep error messages and changed errors in index.js alexandercerutti 2018-08-21 01:50:06 +02:00
  • 45b539573b Added lowercasing on icon check alexandercerutti 2018-08-20 23:25:15 +02:00
  • ff33cc9d2e Added shouldOverwrite to Pass class options to overwrite or append to the existing ones, the properties in main buffer alexandercerutti 2018-08-20 18:12:06 +02:00
  • f5df49f540 Fixed maxDistance problem alexandercerutti 2018-08-20 18:09:01 +02:00
  • 8634d540b8 Added relevace() method to set beacons and locations; Added schemas for beaconsDict and locationsDict alexandercerutti 2018-08-20 16:40:04 +02:00
  • 8cda71309d Added new translations to 'it' in server.js alexandercerutti 2018-08-19 16:01:40 +02:00
  • 40268709b6 Added features tests to server.js, primary and secondary fields, expiration() and void() method alexandercerutti 2018-08-19 16:01:04 +02:00
  • 0d4840373d Added new options to forbidden and supported options in _filterOptions alexandercerutti 2018-08-19 15:59:24 +02:00
  • 599899870b Fixed this.props assignment problem alexandercerutti 2018-08-19 15:58:14 +02:00
  • 769d75cb88 Added expiration() and void() methods and dateToW3CString() function to convert date in W3C format alexandercerutti 2018-08-19 15:57:14 +02:00
  • d97e1c6ab7 Fixed methods descriptors alexandercerutti 2018-08-19 15:55:58 +02:00
  • fcb29b3d68 Replaces this.overrides with this.props; all the properties inserted into overrides now get filtered through _parseSettings and pushed in there; _patch method now accepts only the pass buffer and not anymore the options; alexandercerutti 2018-08-19 14:23:11 +02:00
  • f065ab98cd Now localize returns this for method concatenation alexandercerutti 2018-08-19 13:51:57 +02:00
  • 55cb428222 Reordered requires per types and installed moment.js alexandercerutti 2018-08-19 13:51:05 +02:00
  • c1149a2662 Changed _filterOptions implementation - added forbidden options checks alexandercerutti 2018-08-19 00:43:40 +02:00
  • 541122f2b1 Added and fixed some methods comments alexandercerutti 2018-08-19 00:38:52 +02:00
  • 772ae839bf Added comments to FieldsArea class and its methods alexandercerutti 2018-08-18 23:07:36 +02:00
  • 1e0b08af6a Introduced support to primaryFields, secondaryFields, etc. alexandercerutti 2018-08-18 16:31:20 +02:00
  • 03ea03a752 Added fieldsArea class to add fields to primaryFields, secondaryFields, etc alexandercerutti 2018-08-18 16:30:41 +02:00
  • 2d626fd2df Added localization in the server alexandercerutti 2018-08-13 11:46:01 +02:00
  • 5ff5d0e28d Added _generateStringFile method documentation; Changed checks to return an empty buffer; Added filter on inverted commas in content when pushing translation to avoid invalid .strings content alexandercerutti 2018-08-12 17:25:20 +02:00
  • 9724592d4b Added documentation for localize function; Added check for translation type (must be an object) alexandercerutti 2018-08-12 17:22:10 +02:00
  • 6d8f26237a Introduced check for pass.strings buffer length - will be added if greater than 0 alexandercerutti 2018-08-12 17:20:42 +02:00
  • 31bb8ac3a0 Edited server to return JSON structure as Error alexandercerutti 2018-08-12 16:16:51 +02:00
  • e360ff01ff Edited generate method to include pass.string translations for each specified language alexandercerutti 2018-08-11 18:20:54 +02:00
  • 88f845cc69 Added localize method to register translation in the class; Added _generateStringFile method to create pass.string Buffer alexandercerutti 2018-08-11 18:19:38 +02:00
  • 89a21f47a0 Edited error messages alexandercerutti 2018-08-11 12:02:35 +02:00
  • 52bd86a906 Added check for icon file in pass model alexandercerutti 2018-08-11 10:16:55 +02:00
  • af6ab80702 Removed errors results as JSON, moved to exception throwing; Changed error messages alexandercerutti 2018-08-11 00:13:06 +02:00
  • cc23930a2f Transformed the whole generate() execution to a Promise-driven flow alexandercerutti 2018-08-07 16:23:42 +02:00
  • 551dd8a8e0 Changed back _patch method to return a Promise alexandercerutti 2018-08-07 16:22:09 +02:00
  • bab73d7b62 Fixed edit parameters passing alexandercerutti 2018-08-07 16:16:07 +02:00
  • c0098fe171 Added script for dev to ignore list alexandercerutti 2018-08-07 01:12:39 +02:00
  • 7efbb9c3d1 Moved pass types into _validateType alexandercerutti 2018-08-05 18:32:02 +02:00
  • 565916c65d Removed Promise returning into _patch; Now the catch is done when calling _patch and not inside _patch itself alexandercerutti 2018-08-03 02:38:35 +02:00
  • 1d1a4cd9c5 Added specific patching for barcode(s) alexandercerutti 2018-07-26 14:30:57 +02:00
  • c11472a447 Edited options patching way. alexandercerutti 2018-07-25 23:09:53 +02:00
  • ea8baec2b5 Changed _validateType to validate also the schema; Edited schemas to comply with boardingPass requirements and the others pass types alexandercerutti 2018-07-25 17:05:23 +02:00
  • 1c68623596 Removed old handlers support alexandercerutti 2018-07-25 16:31:51 +02:00
  • d5c1c48715 Renamed Promise done in success; Changed conditions to show barcode incompatibility notices alexandercerutti 2018-07-24 16:34:29 +02:00
  • 599280cf5c Moved settings checks in generate() and moved generate() content in an inline arrow function alexandercerutti 2018-07-24 16:31:26 +02:00
  • 514a15abd5 Moved removeHidden function to the bottom of the file alexandercerutti 2018-07-24 16:30:01 +02:00
  • 751e799462 Changed the way in which certificates are valid; Removed async parallel execution after handlers removal; Changed model extension adding condition alexandercerutti 2018-07-24 01:02:54 +02:00
  • 2d66e14f15 Changed schema violation from throw to Promise rejection alexandercerutti 2018-07-24 00:57:21 +02:00
  • 903d854723 Removed _checkReqs, moved back its checks into generate() alexandercerutti 2018-07-24 00:27:34 +02:00
  • 7023009b2d Removed handlers alexandercerutti 2018-07-24 00:07:04 +02:00
  • 2f3e6ff43b Renamed passExtractor function in _passExtractor function alexandercerutti 2018-07-24 00:03:12 +02:00
  • e3bf2e4add Replaced exception throw with Promise Rejection alexandercerutti 2018-07-23 18:13:02 +02:00
  • b1daa2d216 Converted certificates files names into paths; Removed dir property from the schema alexandercerutti 2018-07-23 17:21:06 +02:00
  • ad55d3aeba Model is now represented as string containing path, not anymore an Object alexandercerutti 2018-07-23 16:59:03 +02:00
  • c2081e32c7 Moved bigger functions in generate() into variables; Fixed some typos alexandercerutti 2018-07-23 15:39:50 +02:00
  • fa2b656efd Edited schemas, moved outside the object all the schemas, added schemas for structure and field alexandercerutti 2018-07-23 11:19:02 +02:00
  • c05bd130c3 Added schemas for 'field' and 'structure' alexandercerutti 2018-07-22 23:48:55 +02:00
  • 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; alexandercerutti 2018-07-22 23:14:16 +02:00
  • 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 alexandercerutti 2018-07-22 18:05:51 +02:00
  • 21c57ba338 Fixed some comments and other little things alexandercerutti 2018-07-21 11:01:33 +02:00
  • 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; alexandercerutti 2018-07-20 23:44:54 +02:00
  • da1db13b52 Documented _validateType and changed its implementation alexandercerutti 2018-07-20 16:09:38 +02:00
  • ee5e1801f0 Added error check inside pass.json reading block alexandercerutti 2018-07-20 15:11:41 +02:00
  • 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; alexandercerutti 2018-07-20 14:30:24 +02:00
  • e407dfe644 Added eslint support and configuration alexandercerutti 2018-07-20 14:29:31 +02:00
  • 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 alexandercerutti 2018-07-17 23:49:13 +02:00
  • 5085d27fe6 Added a schema for input parameters to Pass class alexandercerutti 2018-07-17 23:26:05 +02:00
  • db2ec3ec9e Moved 'filterPassOptions' into Pass class as '_filterOptions' method Alexander Cerutti 2018-06-18 11:08:50 +02:00
  • b9c39cc938 Moved generateSignature func into Pass class as _sign method Alexander Cerutti 2018-06-16 16:48:15 +02:00
  • e4d56bf7a1 Created Pass class and moved generatePass to generate method in Pass() Alexander Cerutti 2018-06-16 15:32:15 +02:00
  • a7590b09dd Added first support to localization L10N, now localized folders get recognized, indexed, and their files sha1-calculated Alexander Cerutti 2018-06-11 23:55:08 +02:00
  • 006a0270d3 Removed unused packages and changed comment Alexander Cerutti 2018-06-11 22:37:46 +02:00
  • 4c18f5b4e2 Separed async-independent body from pass.json reading by using async.parallel Alexander Cerutti 2018-06-11 22:34:52 +02:00
  • 5c8334e40a Added two path.resolve Alexander Cerutti 2018-06-10 20:35:21 +02:00
  • 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. Alexander Cerutti 2018-06-10 15:16:27 +02:00