Commit Graph

681 Commits

Author SHA1 Message Date
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
Alexander Cerutti
c6c605a3f6 Added some path.resolve, fixed misconfiguration, improved support for pass naming 2018-06-08 01:44:25 +02:00
Alexander Cerutti
474a79317d Added support for custom name on pass download (if it get download from a device without PassKit support) 2018-06-08 01:22:03 +02:00
Alexander Cerutti
1744155c75 Removed function fileStreamToBuffer for fs.readFile 2018-06-08 01:01:48 +02:00
Alexander Cerutti
afddb1fdba Removed config.json from files, added validation for config output and models dir paths as promise in init() function 2018-06-07 19:20:24 +02:00
Alexander Cerutti
45f658fedb Removed checkSignatureRequirements function 2018-06-07 01:19:43 +02:00
Alexander Cerutti
ef52c60c78 Removed creation of output directory in the main path 2018-06-07 01:14:43 +02:00
Alexander Cerutti
a45366bb84 Removed generateManifest, getUUID and old generateManifestSignature functions
Removed passModelsDir and outputDir constants and putted them asconfiguration object keys
Removed configuration loading from loadConfiguration and moved into init()
Removed generateManifest function
Created first implementation of pass saving option inside configuration output directory
2018-06-07 01:14:43 +02:00
Alexander Cerutti
662ae69e60 Removed nodejs crypto inclusion for node-forge
Added loadConfiguration function
Moved completely from Openssl for signature generation and crypto for sha1 generation to node-forge
Moved configuration to another file
Added init function
2018-06-07 01:05:22 +02:00
Alexander Cerutti
74700fedd0 Changed including method of index.js 2018-06-06 23:34:32 +02:00
Alexander Cerutti
2efe0f55f1 Splitted Webserver from operative module 2018-05-12 14:35:37 +02:00
Alexander Cerutti
fe1ce19b0e Fixed function rename calling 2018-05-09 19:19:10 +02:00
Alexander Cerutti
0eb2bd75f9 Added some comments to functions, renamed queryToOptions to filterPassOptions 2018-05-09 18:34:50 +02:00
Alexander Cerutti
37e3e69df6 Requests and serving update
Added support for POST Requests with JSON HTTP Body and GET Requests with QueryString,
Renamed res and req in 'response' and 'request',
Added support for pass.json buffer retrieval, editing and direct compression in the zip file,
Introduced function fileStreamToBuffer to simplify the retrivial of pass.json,
Edited pass types names conforming to Apple guide
2018-05-09 18:12:40 +02:00
Alexander Cerutti
1d0ed48084 Replaced the creation of one new folder in tmpDir for each manifest to the creation in tmpDir of one manifest with unique generated uuid
Added some comments;
Renamed some parameters
2018-05-07 22:04:51 +02:00
Alexander Cerutti
d3b4a17e84 Add a control on sha-1 creation, various 2018-05-07 19:58:54 +02:00
Alexander Cerutti
65e4ba6bd0 Removed the first attempt to read the directory to check if the model was available. Replaced with direct model-reading with error handling 2018-05-07 19:19:31 +02:00
Alexander Cerutti
b93965efde Renamed variables, changes exit conditions from throws to json messages to be sent as response, added comments to functions 2018-05-06 23:25:20 +02:00
Alexander Cerutti
1af6039371 Removed shellExec from child_process library require 2018-05-06 21:14:06 +02:00
Alexander Cerutti
269e85e7f8 First working version that let you download pass on http request
Added config.json for paths and credentials configuration.
2018-05-06 00:06:50 +02:00
Alexander Cerutti
7164961ddb First Passkit server commit 2018-04-27 18:25:31 +02:00