├── frontend-sutd-ca ├── test.env ├── src │ ├── components │ │ ├── index.js │ │ ├── colors.js │ │ ├── upload-btn.js │ │ └── file-uploader.js │ ├── App.css │ ├── App.test.js │ ├── index.js │ ├── App.js │ └── serviceWorker.js ├── build │ ├── favicon.ico │ ├── static │ │ ├── css │ │ │ ├── main.b177e8af.chunk.css │ │ │ └── main.b177e8af.chunk.css.map │ │ └── js │ │ │ ├── runtime~main.a8a9905a.js │ │ │ ├── main.c183e099.chunk.js │ │ │ ├── runtime~main.a8a9905a.js.map │ │ │ └── main.c183e099.chunk.js.map │ ├── manifest.json │ ├── precache-manifest.a67417ecb308dfd9a33a753dd639e338.js │ ├── asset-manifest.json │ ├── service-worker.js │ └── index.html ├── public │ ├── favicon.ico │ ├── manifest.json │ └── index.html ├── Dockerfile ├── .eslintrc.json ├── package.json └── README.md ├── backend-sutd-ca ├── temp.env ├── env.js ├── Dockerfile ├── package.json ├── .eslintrc.json ├── index.js └── yarn.lock ├── setup.sh ├── README.md └── .gitignore /frontend-sutd-ca/test.env: -------------------------------------------------------------------------------- 1 | REACT_APP_API_SERVER=localhost -------------------------------------------------------------------------------- /backend-sutd-ca/temp.env: -------------------------------------------------------------------------------- 1 | PROJ_PATH= -------------------------------------------------------------------------------- /backend-sutd-ca/env.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | exports.PROJ_PATH = process.env.PROJ_PATH; -------------------------------------------------------------------------------- /frontend-sutd-ca/src/components/index.js: -------------------------------------------------------------------------------- 1 | export {default as FileUploader} from "./file-uploader"; 2 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/App.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Raleway:300,700,,900'); -------------------------------------------------------------------------------- /frontend-sutd-ca/build/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSUTD/cse-helper/master/frontend-sutd-ca/build/favicon.ico -------------------------------------------------------------------------------- /frontend-sutd-ca/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenSUTD/cse-helper/master/frontend-sutd-ca/public/favicon.ico -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/css/main.b177e8af.chunk.css: -------------------------------------------------------------------------------- 1 | @import url(https://fonts.googleapis.com/css?family=Raleway:300,700,,900); 2 | /*# sourceMappingURL=main.b177e8af.chunk.css.map */ -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | cd ./frontend-sutd-ca && docker build -t fe-sutd:v1 . 2 | cd ../backend-sutd-ca && docker build -t be-sutd:v1 . 3 | 4 | docker run -d -p 80:3000 --name fe-sutd-1 fe-sutd:v1 5 | docker run -d -p 8000:8000 --name be-sutd-1 be-sutd:v1 -------------------------------------------------------------------------------- /frontend-sutd-ca/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.15.1-alpine 2 | 3 | WORKDIR /app 4 | COPY . /app 5 | # Install yarn from the local .tgz 6 | RUN apk add yarn 7 | RUN yarn 8 | EXPOSE 3000 9 | RUN yarn build 10 | RUN yarn global add serve 11 | CMD serve -s build -l 3000 -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/css/main.b177e8af.chunk.css.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["main.b177e8af.chunk.css"],"names":[],"mappings":"AAAA,yEAAyE","file":"main.b177e8af.chunk.css","sourcesContent":["@import url(https://fonts.googleapis.com/css?family=Raleway:300,700,,900);\n\n"]} -------------------------------------------------------------------------------- /backend-sutd-ca/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8.15.1-alpine 2 | 3 | WORKDIR /app 4 | COPY . /app 5 | # Install yarn from the local .tgz 6 | RUN apk add yarn 7 | RUN apk add --update openssl 8 | RUN yarn 9 | RUN echo PROJ_PATH=/app > .env 10 | EXPOSE 8000 11 | CMD [ "node", "index.js" ] -------------------------------------------------------------------------------- /frontend-sutd-ca/src/components/colors.js: -------------------------------------------------------------------------------- 1 | export const Black="#2f3640"; 2 | export const LightGreen="#4cd137"; 3 | export const Green="#10ac84"; 4 | export const LightBlue="#00a8ff"; 5 | export const Blue="#0097e6"; 6 | export const Red="#e84118"; 7 | export const DarkRed="#c23616"; 8 | export const Yellow="#fbc531"; -------------------------------------------------------------------------------- /frontend-sutd-ca/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /frontend-sutd-ca/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /frontend-sutd-ca/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | } 10 | ], 11 | "start_url": ".", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /backend-sutd-ca/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "backend-sutd-ca", 3 | "version": "1.0.0", 4 | "description": "This is the backend for the sutd CA cert signer", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "author": "Koh Kai Wei", 10 | "license": "ISC", 11 | "dependencies": { 12 | "cors": "^2.8.5", 13 | "dotenv": "^7.0.0", 14 | "express": "^4.16.4", 15 | "multer": "^1.4.1" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/index.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import ReactDOM from "react-dom"; 3 | import App from "./App"; 4 | import * as serviceWorker from "./serviceWorker"; 5 | ReactDOM.render(, document.getElementById("root")); 6 | 7 | // If you want your app to work offline and load faster, you can change 8 | // unregister() to register() below. Note this comes with some pitfalls. 9 | // Learn more about service workers: https://bit.ly/CRA-PWA 10 | serviceWorker.unregister(); 11 | -------------------------------------------------------------------------------- /backend-sutd-ca/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "ecmaVersion": 2016, 9 | "sourceType": "module" 10 | }, 11 | "rules": { 12 | "indent": [ 13 | "error", 14 | 2 15 | ], 16 | "linebreak-style": [ 17 | "error", 18 | "unix" 19 | ], 20 | "quotes": [ 21 | "error", 22 | "double" 23 | ], 24 | "semi": [ 25 | "error", 26 | "always" 27 | ] 28 | } 29 | } -------------------------------------------------------------------------------- /frontend-sutd-ca/build/precache-manifest.a67417ecb308dfd9a33a753dd639e338.js: -------------------------------------------------------------------------------- 1 | self.__precacheManifest = [ 2 | { 3 | "revision": "04f6712dc05acd95429d", 4 | "url": "/static/css/main.b177e8af.chunk.css" 5 | }, 6 | { 7 | "revision": "04f6712dc05acd95429d", 8 | "url": "/static/js/main.c183e099.chunk.js" 9 | }, 10 | { 11 | "revision": "42ac5946195a7306e2a5", 12 | "url": "/static/js/runtime~main.a8a9905a.js" 13 | }, 14 | { 15 | "revision": "ff3b254a752a49b9816b", 16 | "url": "/static/js/2.4cd79871.chunk.js" 17 | }, 18 | { 19 | "revision": "70c936e934e45be75c698781a6ce158c", 20 | "url": "/index.html" 21 | } 22 | ]; -------------------------------------------------------------------------------- /frontend-sutd-ca/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "es6": true 5 | }, 6 | "extends": "eslint:recommended", 7 | "parserOptions": { 8 | "ecmaFeatures": { 9 | "jsx": true 10 | }, 11 | "ecmaVersion": 2018, 12 | "sourceType": "module" 13 | }, 14 | "plugins": [ 15 | "react" 16 | ], 17 | "rules": { 18 | "indent": [ 19 | "error", 20 | 2 21 | ], 22 | "linebreak-style": [ 23 | "error", 24 | "unix" 25 | ], 26 | "quotes": [ 27 | "error", 28 | "double" 29 | ], 30 | "semi": [ 31 | "error", 32 | "always" 33 | ] 34 | } 35 | } -------------------------------------------------------------------------------- /frontend-sutd-ca/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "main.css": "/static/css/main.b177e8af.chunk.css", 3 | "main.js": "/static/js/main.c183e099.chunk.js", 4 | "main.js.map": "/static/js/main.c183e099.chunk.js.map", 5 | "runtime~main.js": "/static/js/runtime~main.a8a9905a.js", 6 | "runtime~main.js.map": "/static/js/runtime~main.a8a9905a.js.map", 7 | "static/js/2.4cd79871.chunk.js": "/static/js/2.4cd79871.chunk.js", 8 | "static/js/2.4cd79871.chunk.js.map": "/static/js/2.4cd79871.chunk.js.map", 9 | "index.html": "/index.html", 10 | "precache-manifest.a67417ecb308dfd9a33a753dd639e338.js": "/precache-manifest.a67417ecb308dfd9a33a753dd639e338.js", 11 | "service-worker.js": "/service-worker.js", 12 | "static/css/main.b177e8af.chunk.css.map": "/static/css/main.b177e8af.chunk.css.map" 13 | } -------------------------------------------------------------------------------- /frontend-sutd-ca/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "frontend-sutd-ca", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@fortawesome/fontawesome-svg-core": "^1.2.17", 7 | "@fortawesome/free-solid-svg-icons": "^5.8.1", 8 | "@fortawesome/react-fontawesome": "^0.1.4", 9 | "axios": "^0.18.0", 10 | "js-file-download": "^0.4.5", 11 | "react": "^16.8.6", 12 | "react-dom": "^16.8.6", 13 | "react-scripts": "2.1.8", 14 | "styled-components": "^4.2.0" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": "react-app" 24 | }, 25 | "browserslist": [ 26 | ">0.2%", 27 | "not dead", 28 | "not ie <= 11", 29 | "not op_mini all" 30 | ], 31 | "devDependencies": {} 32 | } 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cse-helper 2 | Web portal to automate Certificate Signing for CSE assignment @ SUTD. This is to help reduce workload of professors. 3 | 4 | # Setup 5 | The Web portal consists of a frontend running on React and a backend running on node. Docker will be used to containerize both applications to be deployed on various servers/environments. 6 | 7 | ## Setup .env Files 8 | There are 2 .env files, one located in frontend-sutd-ca and the other in backend-sutd-ca. 9 | You only need to fill up the .env file in frontend-sutd-ca with the hostname/ip of the server you are running the backend container on. 10 | 11 | ## Building the docker images 12 | Next run setup.sh to build both docker images on the host. Ensure that you are in the root directory of the project (cse-helpers) 13 | 14 | [TODO : FINISH DOCUMENTATION] 15 | ## Not Included in this Repo 16 | The SUTD cert used to sign the .csr files. Those need to be copied over to the server. 17 | 18 | # Credits: 19 | This app was created by Koh Kai Wei - Class of 2018 ISTD. -------------------------------------------------------------------------------- /frontend-sutd-ca/build/service-worker.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Welcome to your Workbox-powered service worker! 3 | * 4 | * You'll need to register this file in your web app and you should 5 | * disable HTTP caching for this file too. 6 | * See https://goo.gl/nhQhGp 7 | * 8 | * The rest of the code is auto-generated. Please don't update this file 9 | * directly; instead, make changes to your Workbox build configuration 10 | * and re-run your build process. 11 | * See https://goo.gl/2aRDsh 12 | */ 13 | 14 | importScripts("https://storage.googleapis.com/workbox-cdn/releases/3.6.3/workbox-sw.js"); 15 | 16 | importScripts( 17 | "/precache-manifest.a67417ecb308dfd9a33a753dd639e338.js" 18 | ); 19 | 20 | workbox.clientsClaim(); 21 | 22 | /** 23 | * The workboxSW.precacheAndRoute() method efficiently caches and responds to 24 | * requests for URLs in the manifest. 25 | * See https://goo.gl/S9QRab 26 | */ 27 | self.__precacheManifest = [].concat(self.__precacheManifest || []); 28 | workbox.precaching.suppressWarnings(); 29 | workbox.precaching.precacheAndRoute(self.__precacheManifest, {}); 30 | 31 | workbox.routing.registerNavigationRoute("/index.html", { 32 | 33 | blacklist: [/^\/_/,/\/[^\/]+\.[^\/]+$/], 34 | }); 35 | -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/js/runtime~main.a8a9905a.js: -------------------------------------------------------------------------------- 1 | !function(e){function r(r){for(var n,f,i=r[0],l=r[1],a=r[2],c=0,s=[];c 2 | 3 | 4 | 5 | 6 | 10 | 11 | 15 | 16 | 25 | CSE Central 26 | 27 | 28 | 29 |
30 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import "./App.css"; 3 | import styled from "styled-components"; 4 | import {FileUploader} from "./components"; 5 | import { library } from "@fortawesome/fontawesome-svg-core"; 6 | import { faFileUpload,faFileSignature, faSpinner, faTimes, faDownload,faCheckCircle,faTimesCircle} from "@fortawesome/free-solid-svg-icons"; 7 | 8 | library.add([faFileUpload,faFileSignature,faSpinner, faTimes, faDownload, faCheckCircle, faTimesCircle]); 9 | 10 | const TitleContainer= styled.div` 11 | grid-area: header; 12 | font-family: 'Raleway', sans-serif; 13 | 14 | display:flex; 15 | flex-direction:column; 16 | justify-content: center; 17 | align-items:center; 18 | text-align: center 19 | .title{ 20 | font-weight:900; 21 | font-size: 3em; 22 | margin: 0px 5px 23 | } 24 | .subtitle{ 25 | font-size:1.5em 26 | font-weight:700; 27 | color: #576574; 28 | margin: 0px 5px; 29 | } 30 | 31 | `; 32 | const Container = styled.div` 33 | display:grid; 34 | position: absolute; 35 | top:0; 36 | left:0; 37 | width: 100%; 38 | height: 100%; 39 | grid-template: 50px 100px 1fr / 1fr 80% 1fr; 40 | grid-template-areas: 41 | "l-pad c-pad r-pad" 42 | "l-pad header r-pad" 43 | "l-pad upload-area r-pad" 44 | `; 45 | 46 | 47 | class App extends Component { 48 | constructor(props) { 49 | super(props); 50 | this.state = { 51 | selectedFile: null, 52 | loaded: 0 53 | }; 54 | 55 | } 56 | 57 | render() { 58 | return ( 59 | 60 | 61 |

CSE CENTRAL

62 |

A SUTD Certificate Authority

63 |
64 | 65 |
66 | ); 67 | } 68 | } 69 | 70 | export default App; 71 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/components/upload-btn.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import styled from "styled-components"; 3 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 4 | 5 | const UploadBtn = styled.button` 6 | margin:20px; 7 | border: none; 8 | border-radius:20px; 9 | height: 50px 10 | width:50%; 11 | background-color: ${props => props.theme.color}; 12 | font-size:1.5em 13 | font-family: 'Raleway', sans-serif; 14 | font-weight:700; 15 | color:white; 16 | text-align: center; 17 | :focus{ 18 | outline: 0; 19 | } 20 | :active{ 21 | background-color: #e84118; 22 | } 23 | svg{ 24 | padding: 0px 10px 25 | } 26 | `; 27 | 28 | class UploadButton extends Component{ 29 | 30 | renderButtonText(state){ 31 | switch(state){ 32 | case "choose-file": 33 | return ( 34 | 35 | 36 | Sign 37 | ); 38 | case "signing": 39 | return ( 40 | 41 | ; 42 | Signing... 43 | ); 44 | case "completed": 45 | return ( 46 | 47 | 48 | Download 49 | ); 50 | case "error": 51 | return ( 52 | 53 | 54 | Error 55 | ); 56 | default: 57 | return ( 58 | 59 | 60 | Sign 61 | ); 62 | } 63 | } 64 | 65 | 66 | render(){ 67 | return( 68 | 69 | {this.renderButtonText(this.props.processState)} 70 | 71 | ); 72 | } 73 | } 74 | 75 | export default UploadButton; -------------------------------------------------------------------------------- /frontend-sutd-ca/build/index.html: -------------------------------------------------------------------------------- 1 | React App
-------------------------------------------------------------------------------- /backend-sutd-ca/index.js: -------------------------------------------------------------------------------- 1 | const {PROJ_PATH} = require("./env"); 2 | const express = require("express"); 3 | const app = express(); 4 | const multer = require("multer"); 5 | const cors = require("cors"); 6 | const {exec} = require("child_process"); 7 | const fs = require("fs"); 8 | app.use(cors()); 9 | 10 | const storage = multer.diskStorage({ 11 | destination: (req, file, cb) => { 12 | cb(null, "public"); 13 | }, 14 | filename: (req, file, cb) => { 15 | cb(null, Date.now() + "-" +file.originalname ); 16 | } 17 | }); 18 | 19 | const filter = (req, file, cb)=>{ 20 | const csrRegex = /([\d\D]+).csr/gi; 21 | if(!csrRegex.test(file.originalname)){ 22 | cb(new Error("Not CSR file")); 23 | } 24 | cb(null,true); 25 | }; 26 | 27 | const upload = multer({ storage: storage , fileFilter:filter}).single("file"); 28 | function deleteFiles(filename){ 29 | fs.unlink(`public/${filename}.crt`,(err)=>{if(err)(console.log(err));}); 30 | fs.unlink(`public/${filename}.csr`,(err)=>{if(err)(console.log(err));}); 31 | console.log("files deleted"); 32 | } 33 | app.post("/upload",(req, res) => { 34 | upload(req, res, (err) => { 35 | if (err instanceof multer.MulterError) { 36 | return res.status(500).json(err); 37 | } else if (err) { 38 | return res.status(500).json(err); 39 | } 40 | let filename = ""; 41 | try{ 42 | filename = /([\d\D]+).csr/gi.exec(req.file.filename)[1]; 43 | } 44 | catch(e){ 45 | console.log(err); 46 | return res.status(500).json(err); 47 | } 48 | if(filename != null || filename != undefined || filename != ""){ 49 | // Perform Cert Signing 50 | exec(`cd ${PROJ_PATH} && openssl x509 -req -in public/${filename}.csr -CA scripts/cacse.crt -CAkey scripts/cacse.key -CAcreateserial -out public/${filename}.crt`,(err,stdout,stderr)=>{ 51 | if(err){ 52 | console.log(err); 53 | return res.status(500).json(err); 54 | } 55 | console.log(`stdout: ${stdout}`); 56 | console.log(`stderr: ${stderr}`); 57 | return res.status(200).send({fileName:filename}); 58 | }); 59 | }else{ 60 | return res.status(500).json(); 61 | } 62 | // Returned Signed file address 63 | }); 64 | }); 65 | app.get("/signed",(req,res) => { 66 | res.download(`public/${req.query.filename}.crt`, `${req.query.filename}.crt`, (err)=>{ 67 | if (err) {console.log(err);} 68 | else { 69 | console.log("Sent:", req.query.filename); 70 | deleteFiles(req.query.filename); 71 | } 72 | }); 73 | }); 74 | app.listen(8000, () => { 75 | console.log("App running on port 8000"); 76 | }); -------------------------------------------------------------------------------- /frontend-sutd-ca/README.md: -------------------------------------------------------------------------------- 1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 2 | 3 | ## Available Scripts 4 | 5 | In the project directory, you can run: 6 | 7 | ### `npm start` 8 | 9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 11 | 12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console. 14 | 15 | ### `npm test` 16 | 17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 19 | 20 | ### `npm run build` 21 | 22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance. 24 | 25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed! 27 | 28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 29 | 30 | ### `npm run eject` 31 | 32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 33 | 34 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 35 | 36 | Instead, it will copy all the configuration files and the transitive dependencies (Webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 37 | 38 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 39 | 40 | ## Learn More 41 | 42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 43 | 44 | To learn React, check out the [React documentation](https://reactjs.org/). 45 | 46 | ### Code Splitting 47 | 48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting 49 | 50 | ### Analyzing the Bundle Size 51 | 52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size 53 | 54 | ### Making a Progressive Web App 55 | 56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app 57 | 58 | ### Advanced Configuration 59 | 60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration 61 | 62 | ### Deployment 63 | 64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment 65 | 66 | ### `npm run build` fails to minify 67 | 68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify 69 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/serviceWorker.js: -------------------------------------------------------------------------------- 1 | // This optional code is used to register a service worker. 2 | // register() is not called by default. 3 | 4 | // This lets the app load faster on subsequent visits in production, and gives 5 | // it offline capabilities. However, it also means that developers (and users) 6 | // will only see deployed updates on subsequent visits to a page, after all the 7 | // existing tabs open on the page have been closed, since previously cached 8 | // resources are updated in the background. 9 | 10 | // To learn more about the benefits of this model and instructions on how to 11 | // opt-in, read https://bit.ly/CRA-PWA 12 | 13 | const isLocalhost = Boolean( 14 | window.location.hostname === 'localhost' || 15 | // [::1] is the IPv6 localhost address. 16 | window.location.hostname === '[::1]' || 17 | // 127.0.0.1/8 is considered localhost for IPv4. 18 | window.location.hostname.match( 19 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 20 | ) 21 | ); 22 | 23 | export function register(config) { 24 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 25 | // The URL constructor is available in all browsers that support SW. 26 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href); 27 | if (publicUrl.origin !== window.location.origin) { 28 | // Our service worker won't work if PUBLIC_URL is on a different origin 29 | // from what our page is served on. This might happen if a CDN is used to 30 | // serve assets; see https://github.com/facebook/create-react-app/issues/2374 31 | return; 32 | } 33 | 34 | window.addEventListener('load', () => { 35 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 36 | 37 | if (isLocalhost) { 38 | // This is running on localhost. Let's check if a service worker still exists or not. 39 | checkValidServiceWorker(swUrl, config); 40 | 41 | // Add some additional logging to localhost, pointing developers to the 42 | // service worker/PWA documentation. 43 | navigator.serviceWorker.ready.then(() => { 44 | console.log( 45 | 'This web app is being served cache-first by a service ' + 46 | 'worker. To learn more, visit https://bit.ly/CRA-PWA' 47 | ); 48 | }); 49 | } else { 50 | // Is not localhost. Just register service worker 51 | registerValidSW(swUrl, config); 52 | } 53 | }); 54 | } 55 | } 56 | 57 | function registerValidSW(swUrl, config) { 58 | navigator.serviceWorker 59 | .register(swUrl) 60 | .then(registration => { 61 | registration.onupdatefound = () => { 62 | const installingWorker = registration.installing; 63 | if (installingWorker == null) { 64 | return; 65 | } 66 | installingWorker.onstatechange = () => { 67 | if (installingWorker.state === 'installed') { 68 | if (navigator.serviceWorker.controller) { 69 | // At this point, the updated precached content has been fetched, 70 | // but the previous service worker will still serve the older 71 | // content until all client tabs are closed. 72 | console.log( 73 | 'New content is available and will be used when all ' + 74 | 'tabs for this page are closed. See https://bit.ly/CRA-PWA.' 75 | ); 76 | 77 | // Execute callback 78 | if (config && config.onUpdate) { 79 | config.onUpdate(registration); 80 | } 81 | } else { 82 | // At this point, everything has been precached. 83 | // It's the perfect time to display a 84 | // "Content is cached for offline use." message. 85 | console.log('Content is cached for offline use.'); 86 | 87 | // Execute callback 88 | if (config && config.onSuccess) { 89 | config.onSuccess(registration); 90 | } 91 | } 92 | } 93 | }; 94 | }; 95 | }) 96 | .catch(error => { 97 | console.error('Error during service worker registration:', error); 98 | }); 99 | } 100 | 101 | function checkValidServiceWorker(swUrl, config) { 102 | // Check if the service worker can be found. If it can't reload the page. 103 | fetch(swUrl) 104 | .then(response => { 105 | // Ensure service worker exists, and that we really are getting a JS file. 106 | const contentType = response.headers.get('content-type'); 107 | if ( 108 | response.status === 404 || 109 | (contentType != null && contentType.indexOf('javascript') === -1) 110 | ) { 111 | // No service worker found. Probably a different app. Reload the page. 112 | navigator.serviceWorker.ready.then(registration => { 113 | registration.unregister().then(() => { 114 | window.location.reload(); 115 | }); 116 | }); 117 | } else { 118 | // Service worker found. Proceed as normal. 119 | registerValidSW(swUrl, config); 120 | } 121 | }) 122 | .catch(() => { 123 | console.log( 124 | 'No internet connection found. App is running in offline mode.' 125 | ); 126 | }); 127 | } 128 | 129 | export function unregister() { 130 | if ('serviceWorker' in navigator) { 131 | navigator.serviceWorker.ready.then(registration => { 132 | registration.unregister(); 133 | }); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /frontend-sutd-ca/src/components/file-uploader.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from "react"; 2 | import styled from "styled-components"; 3 | import UploadButton from "./upload-btn"; 4 | import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; 5 | import axios from "axios"; 6 | import FileDownload from "js-file-download"; 7 | import { 8 | Black, 9 | Green, 10 | LightBlue, 11 | Red, 12 | Yellow 13 | } from "./colors"; 14 | 15 | const UploaderForm = styled.form` 16 | grid-area: upload-area; 17 | width:100%; 18 | height:100% 19 | display: flex; 20 | align-items: center; 21 | justify-content: center; 22 | flex-direction:column; 23 | `; 24 | 25 | const UploaderContainer = styled.div` 26 | height:300px; 27 | width:50% 28 | position:relative; 29 | display:flex; 30 | flex-direction:column 31 | align-items:center; 32 | justify-content:center; 33 | flex-wrap:wrap; 34 | border:2px dashed ${props=>props.theme.color}; 35 | height:300px; 36 | width:50% 37 | border-color 38 | `; 39 | 40 | const UploadLabel = styled.label` 41 | font-family: 'Raleway', sans-serif; 42 | font-weight:300; 43 | font-size:1em; 44 | color: ${props=>props.theme.color}; 45 | margin-top:10px 46 | `; 47 | const Uploader = styled.input` 48 | position: absolute; 49 | top:0; 50 | left:0; 51 | height:300px; 52 | width:100% 53 | opacity:0 54 | `; 55 | 56 | const errorTheme = { 57 | processState:"error", 58 | color: Red, 59 | fileIcon:"times-circle", 60 | }; 61 | 62 | class FileUploader extends Component{ 63 | constructor(props){ 64 | super(props); 65 | // States : choose-file,uploading,completed,error 66 | this.state={ 67 | selectedFile:{}, 68 | loaded:-1, 69 | color: Black, 70 | uploadText: "Upload your .csr file here", 71 | processState: "choose-file", 72 | fileIcon:"file-upload" 73 | }; 74 | this.onUploadClick = this.onUploadClick.bind(this); 75 | } 76 | 77 | getBtnColor(){ 78 | switch(this.state.processState){ 79 | case "choose-file": 80 | return {color:LightBlue}; 81 | case "uploading": 82 | return {color:Yellow}; 83 | case "completed": 84 | return {color:Green}; 85 | case "error": 86 | return {color:Red}; 87 | default: 88 | return {color:LightBlue}; 89 | } 90 | } 91 | 92 | onFileChange(event){ 93 | this.resetState(); 94 | let file = event.target.files[0]; 95 | const csrRegex =/([\d\D]+).csr/gi; 96 | if (csrRegex.test(file.name)){ 97 | this.setState({ 98 | selectedFile: event.target.files[0], 99 | uploadText:event.target.files[0].name, 100 | loaded: 0, 101 | }); 102 | } else { 103 | event.target.value = null; 104 | this.setState({ 105 | ...errorTheme, 106 | uploadText: "You can only upload .csr files", 107 | }); 108 | } 109 | } 110 | 111 | upload(){ 112 | const data = new FormData(); 113 | if(this.state.selectedFile === undefined){ 114 | this.setState({ 115 | ...errorTheme, 116 | uploadText: "Please select/drag a file here" 117 | }); 118 | return; 119 | } 120 | 121 | this.setState({ 122 | processState:"uploading", 123 | color: Yellow, 124 | fileIcon:"file-signature", 125 | uploadText: "Signing..." 126 | }); 127 | data.append("file", this.state.selectedFile); 128 | axios.post(`http://${process.env.REACT_APP_API_SERVER}:8000/upload`, data) 129 | .then(res => { // then print response status 130 | this.setState({ 131 | processState:"completed", 132 | color:Green, 133 | uploadText:"Certificate has been signed, download it below", 134 | fileIcon:"check-circle", 135 | certName: res.data.fileName 136 | }); 137 | console.log(res); 138 | }).catch((err)=>{ 139 | console.log(err); 140 | this.setState({ 141 | ...errorTheme, 142 | uploadText: "Failed to sign cert, please try again", 143 | }); 144 | document.getElementById("cert-uploader").reset(); 145 | console.log("Cert Failed to be signed."); 146 | }); 147 | } 148 | 149 | async download(){ 150 | let response = await axios.get(`http://${process.env.REACT_APP_API_SERVER}:8000/signed?filename=${this.state.certName}`); 151 | FileDownload(response.data, "signedCert.crt"); 152 | document.getElementById("cert-uploader").reset(); 153 | this.resetState(); 154 | } 155 | 156 | resetState(){ 157 | this.setState({ 158 | selectedFile: undefined, 159 | uploadText: "Upload your .csr file here", 160 | color:Black, 161 | processState: "choose-file", 162 | fileIcon:"file-upload" 163 | }); 164 | } 165 | 166 | onUploadClick(){ 167 | switch(this.state.processState){ 168 | case "choose-file": 169 | this.upload(); 170 | break; 171 | case "completed": 172 | this.download(); 173 | break; 174 | case "error": 175 | this.resetState(); 176 | break; 177 | default: 178 | } 179 | } 180 | 181 | render(){ 182 | return ( 183 | 184 | 185 | 186 | {this.state.uploadText} 187 | 188 | 189 | 190 | 191 | ); 192 | } 193 | } 194 | 195 | export default FileUploader; -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/js/main.c183e099.chunk.js: -------------------------------------------------------------------------------- 1 | (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{35:function(e,t,n){e.exports=n(66)},40:function(e,t,n){},66:function(e,t,n){"use strict";n.r(t);var a=n(0),r=n.n(a),o=n(14),i=n.n(o),c=n(7),l=n(8),s=n(10),u=n(9),d=n(11),p=n(3),f=(n(40),n(4)),h=n(19),m=n.n(h),g=n(30),b=n(16),v=n(15),x=n(5);function w(){var e=Object(p.a)(["\n margin:20px;\n border: none;\n border-radius:20px;\n height: 50px\n width:50%;\n background-color: ",";\n font-size:1.5em\n font-family: 'Raleway', sans-serif;\n font-weight:700;\n color:white;\n text-align: center;\n :focus{\n outline: 0;\n }\n :active{\n background-color: #e84118;\n }\n svg{\n padding: 0px 10px\n }\n"]);return w=function(){return e},e}var y=f.a.button(w(),function(e){return e.theme.color}),j=function(e){function t(){return Object(c.a)(this,t),Object(s.a)(this,Object(u.a)(t).apply(this,arguments))}return Object(d.a)(t,e),Object(l.a)(t,[{key:"renderButtonText",value:function(e){switch(e){case"choose-file":return r.a.createElement(r.a.Fragment,null,r.a.createElement(x.a,{icon:"file-signature"}),"Sign");case"signing":return r.a.createElement(r.a.Fragment,null,r.a.createElement(x.a,{icon:"spinner",spin:!0}),"; Signing...");case"completed":return r.a.createElement(r.a.Fragment,null,r.a.createElement(x.a,{icon:"download"}),"Sign");case"error":return r.a.createElement(r.a.Fragment,null,r.a.createElement(x.a,{icon:"times"}),"Error");default:return r.a.createElement(r.a.Fragment,null,r.a.createElement(x.a,{icon:"file-signature"}),"Sign")}}},{key:"render",value:function(){return r.a.createElement(y,{type:"button",onClick:this.props.uploadHandler,theme:this.props.color},this.renderButtonText(this.props.processState))}}]),t}(a.Component),E=n(23),S=n.n(E),O=n(33),k=n.n(O),C="#2f3640";function F(){var e=Object(p.a)(["\n position: absolute;\n top:0;\n left:0;\n height:300px;\n width:100%\n opacity:0\n "]);return F=function(){return e},e}function T(){var e=Object(p.a)(["\n font-family: 'Raleway', sans-serif;\n font-weight:300;\n font-size:1em;\n color: ",";\n margin-top:10px\n"]);return T=function(){return e},e}function I(){var e=Object(p.a)(["\n height:300px;\n width:50%\n position:relative;\n display:flex;\n flex-direction:column\n align-items:center;\n justify-content:center;\n flex-wrap:wrap;\n border:2px dashed ",";\n height:300px;\n width:50%\n border-color\n"]);return I=function(){return e},e}function B(){var e=Object(p.a)(["\n grid-area: upload-area;\n width:100%;\n height:100%\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction:column;\n"]);return B=function(){return e},e}var N=f.a.form(B()),U=f.a.div(I(),function(e){return e.theme.color}),z=f.a.label(T(),function(e){return e.theme.color}),R=f.a.input(F()),A={processState:"error",color:"#e84118",fileIcon:"times-circle"},D=function(e){function t(e){var n;return Object(c.a)(this,t),(n=Object(s.a)(this,Object(u.a)(t).call(this,e))).state={selectedFile:{},loaded:-1,color:C,uploadText:"Upload your .csr file here",processState:"choose-file",fileIcon:"file-upload"},n.onUploadClick=n.onUploadClick.bind(Object(v.a)(n)),n}return Object(d.a)(t,e),Object(l.a)(t,[{key:"getBtnColor",value:function(){switch(this.state.processState){case"choose-file":return{color:"#00a8ff"};case"uploading":return{color:"#fbc531"};case"completed":return{color:"#10ac84"};case"error":return{color:"#e84118"};default:return{color:"#00a8ff"}}}},{key:"onFileChange",value:function(e){this.resetState();var t=e.target.files[0];/([\d\D]+).csr/gi.test(t.name)?this.setState({selectedFile:e.target.files[0],uploadText:e.target.files[0].name,loaded:0}):(e.target.value=null,this.setState(Object(b.a)({},A,{uploadText:"You can only upload .csr files"})))}},{key:"upload",value:function(){var e=this,t=new FormData;void 0!==this.state.selectedFile?(this.setState({processState:"uploading",color:"#fbc531",fileIcon:"file-signature",uploadText:"Signing..."}),t.append("file",this.state.selectedFile),S.a.post("http://".concat("localhost",":8000/upload"),t).then(function(t){e.setState({processState:"completed",color:"#10ac84",uploadText:"Certificate has been signed, download it below",fileIcon:"check-circle",certName:t.data.fileName}),console.log(t)}).catch(function(t){console.log(t),e.setState(Object(b.a)({},A,{uploadText:"Failed to sign cert, please try again"})),document.getElementById("cert-uploader").reset(),console.log("Cert Failed to be signed.")})):this.setState(Object(b.a)({},A,{uploadText:"Please select/drag a file here"}))}},{key:"download",value:function(){var e=Object(g.a)(m.a.mark(function e(){var t;return m.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S.a.get("http://".concat("localhost",":8000/signed?filename=").concat(this.state.certName));case 2:t=e.sent,k()(t.data,"signedCert.crt"),document.getElementById("cert-uploader").reset(),this.resetState();case 6:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"resetState",value:function(){this.setState({selectedFile:void 0,uploadText:"Upload your .csr file here",color:C,processState:"choose-file",fileIcon:"file-upload"})}},{key:"onUploadClick",value:function(){switch(this.state.processState){case"choose-file":this.upload();break;case"completed":this.download();break;case"error":this.resetState()}}},{key:"render",value:function(){return r.a.createElement(N,{method:"post",action:"#",id:"cert-uploader"},r.a.createElement(U,{theme:{color:this.state.color}},r.a.createElement(x.a,{icon:this.state.fileIcon,size:"2x",color:this.state.color}),r.a.createElement(z,{className:"uploadText",theme:{color:this.state.color}},this.state.uploadText),r.a.createElement(R,{type:"file",name:"file",onChange:this.onFileChange.bind(this)})),r.a.createElement(j,{uploadHandler:this.onUploadClick,processState:this.state.processState,color:this.getBtnColor()}))}}]),t}(a.Component),H=n(13),J=n(6);function W(){var e=Object(p.a)(['\n display:grid;\n position: absolute;\n top:0;\n left:0;\n width: 100%;\n height: 100%;\n grid-template: 50px 100px 1fr / 1fr 80% 1fr;\n grid-template-areas:\n "l-pad c-pad r-pad"\n "l-pad header r-pad"\n "l-pad upload-area r-pad"\n']);return W=function(){return e},e}function L(){var e=Object(p.a)(["\n grid-area: header;\n font-family: 'Raleway', sans-serif;\n\n display:flex;\n flex-direction:column;\n justify-content: center;\n align-items:center;\n text-align: center\n .title{\n font-weight:900;\n font-size: 3em;\n margin: 0px 5px\n }\n .subtitle{\n font-size:1.5em\n font-weight:700;\n color: #576574;\n margin: 0px 5px;\n }\n\n"]);return L=function(){return e},e}H.b.add([J.d,J.c,J.e,J.f,J.b,J.a,J.g]);var P=f.a.div(L()),Y=f.a.div(W()),$=function(e){function t(e){var n;return Object(c.a)(this,t),(n=Object(s.a)(this,Object(u.a)(t).call(this,e))).state={selectedFile:null,loaded:0},n}return Object(d.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){return r.a.createElement(Y,null,r.a.createElement(P,null,r.a.createElement("h1",{className:"title"},"CSE CENTRAL"),r.a.createElement("p",{className:"subtitle"},"A SUTD Certificate Authority")),r.a.createElement(D,null))}}]),t}(a.Component);Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));i.a.render(r.a.createElement($,null),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(function(e){e.unregister()})}},[[35,1,2]]]); 2 | //# sourceMappingURL=main.c183e099.chunk.js.map -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/js/runtime~main.a8a9905a.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["../webpack/bootstrap"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","installedChunks","push","Object","prototype","hasOwnProperty","call","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice"],"mappings":"aACA,SAAAA,EAAAC,GAQA,IAPA,IAMAC,EAAAC,EANAC,EAAAH,EAAA,GACAI,EAAAJ,EAAA,GACAK,EAAAL,EAAA,GAIAM,EAAA,EAAAC,EAAA,GACQD,EAAAH,EAAAK,OAAoBF,IAC5BJ,EAAAC,EAAAG,GACAG,EAAAP,IACAK,EAAAG,KAAAD,EAAAP,GAAA,IAEAO,EAAAP,GAAA,EAEA,IAAAD,KAAAG,EACAO,OAAAC,UAAAC,eAAAC,KAAAV,EAAAH,KACAc,EAAAd,GAAAG,EAAAH,IAKA,IAFAe,KAAAhB,GAEAO,EAAAC,QACAD,EAAAU,OAAAV,GAOA,OAHAW,EAAAR,KAAAS,MAAAD,EAAAb,GAAA,IAGAe,IAEA,SAAAA,IAEA,IADA,IAAAC,EACAf,EAAA,EAAiBA,EAAAY,EAAAV,OAA4BF,IAAA,CAG7C,IAFA,IAAAgB,EAAAJ,EAAAZ,GACAiB,GAAA,EACAC,EAAA,EAAkBA,EAAAF,EAAAd,OAA2BgB,IAAA,CAC7C,IAAAC,EAAAH,EAAAE,GACA,IAAAf,EAAAgB,KAAAF,GAAA,GAEAA,IACAL,EAAAQ,OAAApB,IAAA,GACAe,EAAAM,IAAAC,EAAAN,EAAA,KAGA,OAAAD,EAIA,IAAAQ,EAAA,GAKApB,EAAA,CACAqB,EAAA,GAGAZ,EAAA,GAGA,SAAAS,EAAA1B,GAGA,GAAA4B,EAAA5B,GACA,OAAA4B,EAAA5B,GAAA8B,QAGA,IAAAC,EAAAH,EAAA5B,GAAA,CACAK,EAAAL,EACAgC,GAAA,EACAF,QAAA,IAUA,OANAhB,EAAAd,GAAAa,KAAAkB,EAAAD,QAAAC,IAAAD,QAAAJ,GAGAK,EAAAC,GAAA,EAGAD,EAAAD,QAKAJ,EAAAO,EAAAnB,EAGAY,EAAAQ,EAAAN,EAGAF,EAAAS,EAAA,SAAAL,EAAAM,EAAAC,GACAX,EAAAY,EAAAR,EAAAM,IACA1B,OAAA6B,eAAAT,EAAAM,EAAA,CAA0CI,YAAA,EAAAC,IAAAJ,KAK1CX,EAAAgB,EAAA,SAAAZ,GACA,qBAAAa,eAAAC,aACAlC,OAAA6B,eAAAT,EAAAa,OAAAC,YAAA,CAAwDC,MAAA,WAExDnC,OAAA6B,eAAAT,EAAA,cAAiDe,OAAA,KAQjDnB,EAAAoB,EAAA,SAAAD,EAAAE,GAEA,GADA,EAAAA,IAAAF,EAAAnB,EAAAmB,IACA,EAAAE,EAAA,OAAAF,EACA,KAAAE,GAAA,kBAAAF,QAAAG,WAAA,OAAAH,EACA,IAAAI,EAAAvC,OAAAwC,OAAA,MAGA,GAFAxB,EAAAgB,EAAAO,GACAvC,OAAA6B,eAAAU,EAAA,WAAyCT,YAAA,EAAAK,UACzC,EAAAE,GAAA,iBAAAF,EAAA,QAAAM,KAAAN,EAAAnB,EAAAS,EAAAc,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBC,KAAA,KAAAD,IACrI,OAAAF,GAIAvB,EAAA2B,EAAA,SAAAtB,GACA,IAAAM,EAAAN,KAAAiB,WACA,WAA2B,OAAAjB,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAL,EAAAS,EAAAE,EAAA,IAAAA,GACAA,GAIAX,EAAAY,EAAA,SAAAgB,EAAAC,GAAsD,OAAA7C,OAAAC,UAAAC,eAAAC,KAAAyC,EAAAC,IAGtD7B,EAAA8B,EAAA,IAEA,IAAAC,EAAAC,OAAA,aAAAA,OAAA,iBACAC,EAAAF,EAAAhD,KAAA2C,KAAAK,GACAA,EAAAhD,KAAAX,EACA2D,IAAAG,QACA,QAAAvD,EAAA,EAAgBA,EAAAoD,EAAAlD,OAAuBF,IAAAP,EAAA2D,EAAApD,IACvC,IAAAU,EAAA4C,EAIAxC","file":"static/js/runtime~main.a8a9905a.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// run deferred modules from other chunks\n \tcheckDeferredModules();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /frontend-sutd-ca/build/static/js/main.c183e099.chunk.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["components/upload-btn.js","components/colors.js","components/file-uploader.js","App.js","serviceWorker.js","index.js"],"names":["UploadBtn","styled","button","_templateObject","props","theme","color","UploadButton","state","react_default","a","createElement","Fragment","index_es","icon","spin","type","onClick","this","uploadHandler","renderButtonText","processState","Component","Black","UploaderForm","form","file_uploader_templateObject","UploaderContainer","div","_templateObject2","UploadLabel","label","_templateObject3","Uploader","input","_templateObject4","errorTheme","fileIcon","FileUploader","_this","Object","classCallCheck","possibleConstructorReturn","getPrototypeOf","call","selectedFile","loaded","uploadText","onUploadClick","bind","assertThisInitialized","event","resetState","file","target","files","test","name","setState","value","objectSpread","_this2","data","FormData","undefined","append","axios","post","concat","process","then","res","certName","fileName","console","log","catch","err","document","getElementById","reset","get","response","FileDownload","upload","download","method","action","id","size","className","onChange","onFileChange","upload_btn","getBtnColor","library","add","faFileUpload","faFileSignature","faSpinner","faTimes","faDownload","faCheckCircle","faTimesCircle","TitleContainer","App_templateObject","Container","App_templateObject2","App","file_uploader","Boolean","window","location","hostname","match","ReactDOM","render","src_App_0","navigator","serviceWorker","ready","registration","unregister"],"mappings":"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","file":"static/js/main.c183e099.chunk.js","sourcesContent":["import React, { Component } from \"react\";\nimport styled from \"styled-components\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\n\nconst UploadBtn = styled.button`\n margin:20px;\n border: none;\n border-radius:20px;\n height: 50px\n width:50%;\n background-color: ${props => props.theme.color};\n font-size:1.5em\n font-family: 'Raleway', sans-serif;\n font-weight:700;\n color:white;\n text-align: center;\n :focus{\n outline: 0;\n }\n :active{\n background-color: #e84118;\n }\n svg{\n padding: 0px 10px\n }\n`;\n\nclass UploadButton extends Component{\n\n renderButtonText(state){\n switch(state){\n case \"choose-file\":\n return (\n \n \n Sign\n );\n case \"signing\":\n return (\n \n ;\n Signing...\n );\n case \"completed\":\n return (\n \n \n Sign\n );\n case \"error\":\n return (\n \n \n Error\n );\n default:\n return (\n \n \n Sign\n );\n } \n }\n\n\n render(){\n return(\n \n {this.renderButtonText(this.props.processState)}\n \n );\n }\n}\n\nexport default UploadButton;","export const Black=\"#2f3640\";\nexport const LightGreen=\"#4cd137\";\nexport const Green=\"#10ac84\";\nexport const LightBlue=\"#00a8ff\";\nexport const Blue=\"#0097e6\";\nexport const Red=\"#e84118\";\nexport const DarkRed=\"#c23616\";\nexport const Yellow=\"#fbc531\";","import React, { Component } from \"react\";\nimport styled from \"styled-components\";\nimport UploadButton from \"./upload-btn\";\nimport { FontAwesomeIcon } from \"@fortawesome/react-fontawesome\";\nimport axios from \"axios\";\nimport FileDownload from \"js-file-download\";\nimport {\n Black,\n Green,\n LightBlue,\n Red,\n Yellow\n} from \"./colors\";\n\nconst UploaderForm = styled.form`\n grid-area: upload-area;\n width:100%;\n height:100%\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction:column;\n`;\n\nconst UploaderContainer = styled.div`\n height:300px;\n width:50%\n position:relative;\n display:flex;\n flex-direction:column\n align-items:center;\n justify-content:center;\n flex-wrap:wrap;\n border:2px dashed ${props=>props.theme.color};\n height:300px;\n width:50%\n border-color\n`;\n\nconst UploadLabel = styled.label`\n font-family: 'Raleway', sans-serif;\n font-weight:300;\n font-size:1em;\n color: ${props=>props.theme.color};\n margin-top:10px\n`;\nconst Uploader = styled.input`\n position: absolute;\n top:0;\n left:0;\n height:300px;\n width:100%\n opacity:0\n `;\n\nconst errorTheme = { \n processState:\"error\",\n color: Red,\n fileIcon:\"times-circle\",\n};\n\nclass FileUploader extends Component{\n constructor(props){\n super(props);\n // States : choose-file,uploading,completed,error\n this.state={\n selectedFile:{},\n loaded:-1,\n color: Black,\n uploadText: \"Upload your .csr file here\",\n processState: \"choose-file\",\n fileIcon:\"file-upload\"\n };\n this.onUploadClick = this.onUploadClick.bind(this);\n }\n \n getBtnColor(){\n switch(this.state.processState){\n case \"choose-file\":\n return {color:LightBlue};\n case \"uploading\":\n return {color:Yellow};\n case \"completed\":\n return {color:Green};\n case \"error\":\n return {color:Red};\n default:\n return {color:LightBlue};\n }\n }\n\n onFileChange(event){\n this.resetState();\n let file = event.target.files[0];\n const csrRegex =/([\\d\\D]+).csr/gi;\n if (csrRegex.test(file.name)){\n this.setState({\n selectedFile: event.target.files[0],\n uploadText:event.target.files[0].name,\n loaded: 0,\n });\n } else {\n event.target.value = null;\n this.setState({\n ...errorTheme,\n uploadText: \"You can only upload .csr files\",\n });\n }\n }\n\n upload(){\n const data = new FormData();\n if(this.state.selectedFile === undefined){\n this.setState({\n ...errorTheme,\n uploadText: \"Please select/drag a file here\"\n });\n return;\n }\n\n this.setState({\n processState:\"uploading\",\n color: Yellow,\n fileIcon:\"file-signature\",\n uploadText: \"Signing...\"\n });\n data.append(\"file\", this.state.selectedFile);\n axios.post(`http://${process.env.REACT_APP_API_SERVER}:8000/upload`, data)\n .then(res => { // then print response status\n this.setState({\n processState:\"completed\",\n color:Green,\n uploadText:\"Certificate has been signed, download it below\",\n fileIcon:\"check-circle\",\n certName: res.data.fileName\n });\n console.log(res);\n }).catch((err)=>{\n console.log(err);\n this.setState({\n ...errorTheme,\n uploadText: \"Failed to sign cert, please try again\",\n });\n document.getElementById(\"cert-uploader\").reset();\n console.log(\"Cert Failed to be signed.\");\n });\n }\n\n async download(){\n let response = await axios.get(`http://${process.env.REACT_APP_API_SERVER}:8000/signed?filename=${this.state.certName}`);\n FileDownload(response.data, \"signedCert.crt\");\n document.getElementById(\"cert-uploader\").reset();\n this.resetState();\n }\n\n resetState(){\n this.setState({\n selectedFile: undefined,\n uploadText: \"Upload your .csr file here\",\n color:Black,\n processState: \"choose-file\",\n fileIcon:\"file-upload\"\n });\n }\n \n onUploadClick(){\n switch(this.state.processState){\n case \"choose-file\":\n this.upload();\n break;\n case \"completed\":\n this.download();\n break;\n case \"error\":\n this.resetState();\n break;\n default:\n }\n }\n\n render(){\n return (\n \n \n \n {this.state.uploadText}\n \n \n \n \n );\n }\n}\n\nexport default FileUploader;","import React, { Component } from \"react\";\nimport \"./App.css\";\nimport styled from \"styled-components\";\nimport {FileUploader} from \"./components\";\nimport { library } from \"@fortawesome/fontawesome-svg-core\";\nimport { faFileUpload,faFileSignature, faSpinner, faTimes, faDownload,faCheckCircle,faTimesCircle} from \"@fortawesome/free-solid-svg-icons\";\n\nlibrary.add([faFileUpload,faFileSignature,faSpinner, faTimes, faDownload, faCheckCircle, faTimesCircle]);\n\nconst TitleContainer= styled.div`\n grid-area: header;\n font-family: 'Raleway', sans-serif;\n\n display:flex;\n flex-direction:column;\n justify-content: center;\n align-items:center;\n text-align: center\n .title{\n font-weight:900;\n font-size: 3em;\n margin: 0px 5px\n }\n .subtitle{\n font-size:1.5em\n font-weight:700;\n color: #576574;\n margin: 0px 5px;\n }\n\n`;\nconst Container = styled.div`\n display:grid;\n position: absolute;\n top:0;\n left:0;\n width: 100%;\n height: 100%;\n grid-template: 50px 100px 1fr / 1fr 80% 1fr;\n grid-template-areas:\n \"l-pad c-pad r-pad\"\n \"l-pad header r-pad\"\n \"l-pad upload-area r-pad\"\n`;\n\n\nclass App extends Component {\n constructor(props) {\n super(props);\n this.state = {\n selectedFile: null,\n loaded: 0\n };\n\n }\n\n render() {\n return (\n \n \n

CSE CENTRAL

\n

A SUTD Certificate Authority

\n
\n \n
\n );\n }\n}\n\nexport default App;\n","// This optional code is used to register a service worker.\n// register() is not called by default.\n\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on subsequent visits to a page, after all the\n// existing tabs open on the page have been closed, since previously cached\n// resources are updated in the background.\n\n// To learn more about the benefits of this model and instructions on how to\n// opt-in, read https://bit.ly/CRA-PWA\n\nconst isLocalhost = Boolean(\n window.location.hostname === 'localhost' ||\n // [::1] is the IPv6 localhost address.\n window.location.hostname === '[::1]' ||\n // 127.0.0.1/8 is considered localhost for IPv4.\n window.location.hostname.match(\n /^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/\n )\n);\n\nexport function register(config) {\n if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {\n // The URL constructor is available in all browsers that support SW.\n const publicUrl = new URL(process.env.PUBLIC_URL, window.location.href);\n if (publicUrl.origin !== window.location.origin) {\n // Our service worker won't work if PUBLIC_URL is on a different origin\n // from what our page is served on. This might happen if a CDN is used to\n // serve assets; see https://github.com/facebook/create-react-app/issues/2374\n return;\n }\n\n window.addEventListener('load', () => {\n const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`;\n\n if (isLocalhost) {\n // This is running on localhost. Let's check if a service worker still exists or not.\n checkValidServiceWorker(swUrl, config);\n\n // Add some additional logging to localhost, pointing developers to the\n // service worker/PWA documentation.\n navigator.serviceWorker.ready.then(() => {\n console.log(\n 'This web app is being served cache-first by a service ' +\n 'worker. To learn more, visit https://bit.ly/CRA-PWA'\n );\n });\n } else {\n // Is not localhost. Just register service worker\n registerValidSW(swUrl, config);\n }\n });\n }\n}\n\nfunction registerValidSW(swUrl, config) {\n navigator.serviceWorker\n .register(swUrl)\n .then(registration => {\n registration.onupdatefound = () => {\n const installingWorker = registration.installing;\n if (installingWorker == null) {\n return;\n }\n installingWorker.onstatechange = () => {\n if (installingWorker.state === 'installed') {\n if (navigator.serviceWorker.controller) {\n // At this point, the updated precached content has been fetched,\n // but the previous service worker will still serve the older\n // content until all client tabs are closed.\n console.log(\n 'New content is available and will be used when all ' +\n 'tabs for this page are closed. See https://bit.ly/CRA-PWA.'\n );\n\n // Execute callback\n if (config && config.onUpdate) {\n config.onUpdate(registration);\n }\n } else {\n // At this point, everything has been precached.\n // It's the perfect time to display a\n // \"Content is cached for offline use.\" message.\n console.log('Content is cached for offline use.');\n\n // Execute callback\n if (config && config.onSuccess) {\n config.onSuccess(registration);\n }\n }\n }\n };\n };\n })\n .catch(error => {\n console.error('Error during service worker registration:', error);\n });\n}\n\nfunction checkValidServiceWorker(swUrl, config) {\n // Check if the service worker can be found. If it can't reload the page.\n fetch(swUrl)\n .then(response => {\n // Ensure service worker exists, and that we really are getting a JS file.\n const contentType = response.headers.get('content-type');\n if (\n response.status === 404 ||\n (contentType != null && contentType.indexOf('javascript') === -1)\n ) {\n // No service worker found. Probably a different app. Reload the page.\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister().then(() => {\n window.location.reload();\n });\n });\n } else {\n // Service worker found. Proceed as normal.\n registerValidSW(swUrl, config);\n }\n })\n .catch(() => {\n console.log(\n 'No internet connection found. App is running in offline mode.'\n );\n });\n}\n\nexport function unregister() {\n if ('serviceWorker' in navigator) {\n navigator.serviceWorker.ready.then(registration => {\n registration.unregister();\n });\n }\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport App from \"./App\";\nimport * as serviceWorker from \"./serviceWorker\";\nReactDOM.render(, document.getElementById(\"root\"));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\nserviceWorker.unregister();\n"],"sourceRoot":""} -------------------------------------------------------------------------------- /backend-sutd-ca/yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | accepts@~1.3.5: 6 | version "1.3.5" 7 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2" 8 | integrity sha1-63d99gEXI6OxTopywIBcjoZ0a9I= 9 | dependencies: 10 | mime-types "~2.1.18" 11 | negotiator "0.6.1" 12 | 13 | append-field@^1.0.0: 14 | version "1.0.0" 15 | resolved "https://registry.yarnpkg.com/append-field/-/append-field-1.0.0.tgz#1e3440e915f0b1203d23748e78edd7b9b5b43e56" 16 | integrity sha1-HjRA6RXwsSA9I3SOeO3XubW0PlY= 17 | 18 | array-flatten@1.1.1: 19 | version "1.1.1" 20 | resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" 21 | integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= 22 | 23 | body-parser@1.18.3: 24 | version "1.18.3" 25 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4" 26 | integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ= 27 | dependencies: 28 | bytes "3.0.0" 29 | content-type "~1.0.4" 30 | debug "2.6.9" 31 | depd "~1.1.2" 32 | http-errors "~1.6.3" 33 | iconv-lite "0.4.23" 34 | on-finished "~2.3.0" 35 | qs "6.5.2" 36 | raw-body "2.3.3" 37 | type-is "~1.6.16" 38 | 39 | buffer-from@^1.0.0: 40 | version "1.1.1" 41 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 42 | integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== 43 | 44 | busboy@^0.2.11: 45 | version "0.2.14" 46 | resolved "https://registry.yarnpkg.com/busboy/-/busboy-0.2.14.tgz#6c2a622efcf47c57bbbe1e2a9c37ad36c7925453" 47 | integrity sha1-bCpiLvz0fFe7vh4qnDetNseSVFM= 48 | dependencies: 49 | dicer "0.2.5" 50 | readable-stream "1.1.x" 51 | 52 | bytes@3.0.0: 53 | version "3.0.0" 54 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048" 55 | integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= 56 | 57 | concat-stream@^1.5.2: 58 | version "1.6.2" 59 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" 60 | integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== 61 | dependencies: 62 | buffer-from "^1.0.0" 63 | inherits "^2.0.3" 64 | readable-stream "^2.2.2" 65 | typedarray "^0.0.6" 66 | 67 | content-disposition@0.5.2: 68 | version "0.5.2" 69 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4" 70 | integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= 71 | 72 | content-type@~1.0.4: 73 | version "1.0.4" 74 | resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" 75 | integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== 76 | 77 | cookie-signature@1.0.6: 78 | version "1.0.6" 79 | resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" 80 | integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= 81 | 82 | cookie@0.3.1: 83 | version "0.3.1" 84 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb" 85 | integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s= 86 | 87 | core-util-is@~1.0.0: 88 | version "1.0.2" 89 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 90 | integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= 91 | 92 | cors@^2.8.5: 93 | version "2.8.5" 94 | resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" 95 | integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== 96 | dependencies: 97 | object-assign "^4" 98 | vary "^1" 99 | 100 | debug@2.6.9: 101 | version "2.6.9" 102 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 103 | integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== 104 | dependencies: 105 | ms "2.0.0" 106 | 107 | depd@~1.1.2: 108 | version "1.1.2" 109 | resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" 110 | integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= 111 | 112 | destroy@~1.0.4: 113 | version "1.0.4" 114 | resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" 115 | integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= 116 | 117 | dicer@0.2.5: 118 | version "0.2.5" 119 | resolved "https://registry.yarnpkg.com/dicer/-/dicer-0.2.5.tgz#5996c086bb33218c812c090bddc09cd12facb70f" 120 | integrity sha1-WZbAhrszIYyBLAkL3cCc0S+stw8= 121 | dependencies: 122 | readable-stream "1.1.x" 123 | streamsearch "0.1.2" 124 | 125 | dotenv@^7.0.0: 126 | version "7.0.0" 127 | resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-7.0.0.tgz#a2be3cd52736673206e8a85fb5210eea29628e7c" 128 | integrity sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== 129 | 130 | ee-first@1.1.1: 131 | version "1.1.1" 132 | resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" 133 | integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= 134 | 135 | encodeurl@~1.0.2: 136 | version "1.0.2" 137 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" 138 | integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= 139 | 140 | escape-html@~1.0.3: 141 | version "1.0.3" 142 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" 143 | integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= 144 | 145 | etag@~1.8.1: 146 | version "1.8.1" 147 | resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" 148 | integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= 149 | 150 | express@^4.16.4: 151 | version "4.16.4" 152 | resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e" 153 | integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg== 154 | dependencies: 155 | accepts "~1.3.5" 156 | array-flatten "1.1.1" 157 | body-parser "1.18.3" 158 | content-disposition "0.5.2" 159 | content-type "~1.0.4" 160 | cookie "0.3.1" 161 | cookie-signature "1.0.6" 162 | debug "2.6.9" 163 | depd "~1.1.2" 164 | encodeurl "~1.0.2" 165 | escape-html "~1.0.3" 166 | etag "~1.8.1" 167 | finalhandler "1.1.1" 168 | fresh "0.5.2" 169 | merge-descriptors "1.0.1" 170 | methods "~1.1.2" 171 | on-finished "~2.3.0" 172 | parseurl "~1.3.2" 173 | path-to-regexp "0.1.7" 174 | proxy-addr "~2.0.4" 175 | qs "6.5.2" 176 | range-parser "~1.2.0" 177 | safe-buffer "5.1.2" 178 | send "0.16.2" 179 | serve-static "1.13.2" 180 | setprototypeof "1.1.0" 181 | statuses "~1.4.0" 182 | type-is "~1.6.16" 183 | utils-merge "1.0.1" 184 | vary "~1.1.2" 185 | 186 | finalhandler@1.1.1: 187 | version "1.1.1" 188 | resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105" 189 | integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg== 190 | dependencies: 191 | debug "2.6.9" 192 | encodeurl "~1.0.2" 193 | escape-html "~1.0.3" 194 | on-finished "~2.3.0" 195 | parseurl "~1.3.2" 196 | statuses "~1.4.0" 197 | unpipe "~1.0.0" 198 | 199 | forwarded@~0.1.2: 200 | version "0.1.2" 201 | resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" 202 | integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= 203 | 204 | fresh@0.5.2: 205 | version "0.5.2" 206 | resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" 207 | integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= 208 | 209 | http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3: 210 | version "1.6.3" 211 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d" 212 | integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= 213 | dependencies: 214 | depd "~1.1.2" 215 | inherits "2.0.3" 216 | setprototypeof "1.1.0" 217 | statuses ">= 1.4.0 < 2" 218 | 219 | iconv-lite@0.4.23: 220 | version "0.4.23" 221 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" 222 | integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA== 223 | dependencies: 224 | safer-buffer ">= 2.1.2 < 3" 225 | 226 | inherits@2.0.3, inherits@^2.0.3, inherits@~2.0.1, inherits@~2.0.3: 227 | version "2.0.3" 228 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 229 | integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= 230 | 231 | ipaddr.js@1.8.0: 232 | version "1.8.0" 233 | resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e" 234 | integrity sha1-6qM9bd16zo9/b+DJygRA5wZzix4= 235 | 236 | isarray@0.0.1: 237 | version "0.0.1" 238 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" 239 | integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= 240 | 241 | isarray@~1.0.0: 242 | version "1.0.0" 243 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 244 | integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= 245 | 246 | media-typer@0.3.0: 247 | version "0.3.0" 248 | resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" 249 | integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= 250 | 251 | merge-descriptors@1.0.1: 252 | version "1.0.1" 253 | resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" 254 | integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= 255 | 256 | methods@~1.1.2: 257 | version "1.1.2" 258 | resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" 259 | integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= 260 | 261 | mime-db@~1.38.0: 262 | version "1.38.0" 263 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.38.0.tgz#1a2aab16da9eb167b49c6e4df2d9c68d63d8e2ad" 264 | integrity sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg== 265 | 266 | mime-types@~2.1.18: 267 | version "2.1.22" 268 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.22.tgz#fe6b355a190926ab7698c9a0556a11199b2199bd" 269 | integrity sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog== 270 | dependencies: 271 | mime-db "~1.38.0" 272 | 273 | mime@1.4.1: 274 | version "1.4.1" 275 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6" 276 | integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ== 277 | 278 | minimist@0.0.8: 279 | version "0.0.8" 280 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 281 | integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= 282 | 283 | mkdirp@^0.5.1: 284 | version "0.5.1" 285 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 286 | integrity sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM= 287 | dependencies: 288 | minimist "0.0.8" 289 | 290 | ms@2.0.0: 291 | version "2.0.0" 292 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 293 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= 294 | 295 | multer@^1.4.1: 296 | version "1.4.1" 297 | resolved "https://registry.yarnpkg.com/multer/-/multer-1.4.1.tgz#24b12a416a22fec2ade810539184bf138720159e" 298 | integrity sha512-zzOLNRxzszwd+61JFuAo0fxdQfvku12aNJgnla0AQ+hHxFmfc/B7jBVuPr5Rmvu46Jze/iJrFpSOsD7afO8SDw== 299 | dependencies: 300 | append-field "^1.0.0" 301 | busboy "^0.2.11" 302 | concat-stream "^1.5.2" 303 | mkdirp "^0.5.1" 304 | object-assign "^4.1.1" 305 | on-finished "^2.3.0" 306 | type-is "^1.6.4" 307 | xtend "^4.0.0" 308 | 309 | negotiator@0.6.1: 310 | version "0.6.1" 311 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9" 312 | integrity sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk= 313 | 314 | object-assign@^4, object-assign@^4.1.1: 315 | version "4.1.1" 316 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" 317 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= 318 | 319 | on-finished@^2.3.0, on-finished@~2.3.0: 320 | version "2.3.0" 321 | resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" 322 | integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= 323 | dependencies: 324 | ee-first "1.1.1" 325 | 326 | parseurl@~1.3.2: 327 | version "1.3.2" 328 | resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3" 329 | integrity sha1-/CidTtiZMRlGDBViUyYs3I3mW/M= 330 | 331 | path-to-regexp@0.1.7: 332 | version "0.1.7" 333 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" 334 | integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= 335 | 336 | process-nextick-args@~2.0.0: 337 | version "2.0.0" 338 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" 339 | integrity sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw== 340 | 341 | proxy-addr@~2.0.4: 342 | version "2.0.4" 343 | resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93" 344 | integrity sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA== 345 | dependencies: 346 | forwarded "~0.1.2" 347 | ipaddr.js "1.8.0" 348 | 349 | qs@6.5.2: 350 | version "6.5.2" 351 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" 352 | integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== 353 | 354 | range-parser@~1.2.0: 355 | version "1.2.0" 356 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" 357 | integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= 358 | 359 | raw-body@2.3.3: 360 | version "2.3.3" 361 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3" 362 | integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw== 363 | dependencies: 364 | bytes "3.0.0" 365 | http-errors "1.6.3" 366 | iconv-lite "0.4.23" 367 | unpipe "1.0.0" 368 | 369 | readable-stream@1.1.x: 370 | version "1.1.14" 371 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" 372 | integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= 373 | dependencies: 374 | core-util-is "~1.0.0" 375 | inherits "~2.0.1" 376 | isarray "0.0.1" 377 | string_decoder "~0.10.x" 378 | 379 | readable-stream@^2.2.2: 380 | version "2.3.6" 381 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" 382 | integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== 383 | dependencies: 384 | core-util-is "~1.0.0" 385 | inherits "~2.0.3" 386 | isarray "~1.0.0" 387 | process-nextick-args "~2.0.0" 388 | safe-buffer "~5.1.1" 389 | string_decoder "~1.1.1" 390 | util-deprecate "~1.0.1" 391 | 392 | safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: 393 | version "5.1.2" 394 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 395 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== 396 | 397 | "safer-buffer@>= 2.1.2 < 3": 398 | version "2.1.2" 399 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" 400 | integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== 401 | 402 | send@0.16.2: 403 | version "0.16.2" 404 | resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" 405 | integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw== 406 | dependencies: 407 | debug "2.6.9" 408 | depd "~1.1.2" 409 | destroy "~1.0.4" 410 | encodeurl "~1.0.2" 411 | escape-html "~1.0.3" 412 | etag "~1.8.1" 413 | fresh "0.5.2" 414 | http-errors "~1.6.2" 415 | mime "1.4.1" 416 | ms "2.0.0" 417 | on-finished "~2.3.0" 418 | range-parser "~1.2.0" 419 | statuses "~1.4.0" 420 | 421 | serve-static@1.13.2: 422 | version "1.13.2" 423 | resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1" 424 | integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw== 425 | dependencies: 426 | encodeurl "~1.0.2" 427 | escape-html "~1.0.3" 428 | parseurl "~1.3.2" 429 | send "0.16.2" 430 | 431 | setprototypeof@1.1.0: 432 | version "1.1.0" 433 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656" 434 | integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== 435 | 436 | "statuses@>= 1.4.0 < 2": 437 | version "1.5.0" 438 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" 439 | integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= 440 | 441 | statuses@~1.4.0: 442 | version "1.4.0" 443 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" 444 | integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew== 445 | 446 | streamsearch@0.1.2: 447 | version "0.1.2" 448 | resolved "https://registry.yarnpkg.com/streamsearch/-/streamsearch-0.1.2.tgz#808b9d0e56fc273d809ba57338e929919a1a9f1a" 449 | integrity sha1-gIudDlb8Jz2Am6VzOOkpkZoanxo= 450 | 451 | string_decoder@~0.10.x: 452 | version "0.10.31" 453 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" 454 | integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= 455 | 456 | string_decoder@~1.1.1: 457 | version "1.1.1" 458 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" 459 | integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== 460 | dependencies: 461 | safe-buffer "~5.1.0" 462 | 463 | type-is@^1.6.4, type-is@~1.6.16: 464 | version "1.6.16" 465 | resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.16.tgz#f89ce341541c672b25ee7ae3c73dee3b2be50194" 466 | integrity sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q== 467 | dependencies: 468 | media-typer "0.3.0" 469 | mime-types "~2.1.18" 470 | 471 | typedarray@^0.0.6: 472 | version "0.0.6" 473 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 474 | integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= 475 | 476 | unpipe@1.0.0, unpipe@~1.0.0: 477 | version "1.0.0" 478 | resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" 479 | integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= 480 | 481 | util-deprecate@~1.0.1: 482 | version "1.0.2" 483 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 484 | integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= 485 | 486 | utils-merge@1.0.1: 487 | version "1.0.1" 488 | resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" 489 | integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= 490 | 491 | vary@^1, vary@~1.1.2: 492 | version "1.1.2" 493 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" 494 | integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= 495 | 496 | xtend@^4.0.0: 497 | version "4.0.1" 498 | resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" 499 | integrity sha1-pcbVMr5lbiPbgg77lDofBJmNY68= 500 | --------------------------------------------------------------------------------