├── .github
└── FUNDING.yml
├── .gitignore
├── Dockerfile
├── Dockerfile.mongo
├── Procfile
├── README.md
├── app.js
├── config
├── auth.json
├── config.json
├── index.js
└── mongo.json
├── docker-compose.yml
├── lib
├── bson.js
└── json.js
├── package-lock.json
├── package.json
├── public
├── images
│ ├── demo
│ │ ├── collections.png
│ │ ├── document.png
│ │ ├── documents.png
│ │ ├── new.png
│ │ ├── query.png
│ │ └── signin.png
│ ├── favicon.ico
│ └── google.png
├── javascripts
│ ├── codemirror
│ │ ├── codemirror.js
│ │ ├── mode
│ │ │ └── javascript
│ │ │ │ ├── index.html
│ │ │ │ ├── javascript.js
│ │ │ │ ├── json-ld.html
│ │ │ │ ├── test.js
│ │ │ │ └── typescript.html
│ │ └── theme
│ │ │ └── origami.css
│ ├── jquery-2.1.1.min.js
│ ├── mongri.js
│ └── pace.min.js
└── stylesheets
│ ├── codemirror.css
│ ├── pace.atom.css
│ ├── pace.css
│ ├── pace.flash.css
│ └── style.css
├── routes
├── collection.js
├── document.js
└── index.js
└── views
├── collections.pug
├── document.pug
├── documents.pug
├── index.pug
├── layout.pug
└── new_document.pug
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 |
3 | github: dongri # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4 | patreon: dongri # Replace with a single Patreon username
5 | open_collective: # Replace with a single Open Collective username
6 | ko_fi: # Replace with a single Ko-fi username
7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8 | custom: # Replace with a single custom sponsorship URL
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | *.seed
3 | *.log
4 | *.dat
5 | *.out
6 | *.pid
7 | *.gz
8 | *.swp
9 | *.rdb
10 |
11 | pids
12 | logs
13 | results
14 | doc
15 |
16 | npm-debug.log
17 | node_modules
18 | buildAssets
19 |
20 | data
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM node:12.0.0-alpine
2 | LABEL maintainer "Dongri Jin "
3 | RUN npm install -g nodemon@1.18.11
4 | RUN mkdir -p /app/src
5 | ADD package.json /app/package.json
6 | WORKDIR /app/src
7 | RUN cd /app
8 | RUN rm -rf node_modules
9 | RUN npm install
10 | EXPOSE 3000
11 | CMD PORT=3000 nodemon app.js
12 |
--------------------------------------------------------------------------------
/Dockerfile.mongo:
--------------------------------------------------------------------------------
1 | FROM mongo:4.1
2 | LABEL maintainer "Dongri Jin "
3 |
4 | EXPOSE 27017
5 | ENTRYPOINT ["/usr/bin/mongod", "--bind_ip", "0.0.0.0"]
6 |
--------------------------------------------------------------------------------
/Procfile:
--------------------------------------------------------------------------------
1 | web: node app.js
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | mongri
2 | =========
3 |
4 | ### Demo
5 | ------
6 | [Mongri on Heroku](http://mongri.herokuapp.com)
7 |
8 | ### Use Mongri
9 | ------
10 | ```
11 | $ git clone git@github.com:dongri/mongri.git
12 | $ cd mongri
13 | $ npm install
14 | $ node app.js
15 | ```
16 |
17 | ### Docker
18 |
19 | ```
20 | $ cd mongri
21 | $ docker-compose up -d
22 | ```
23 |
24 | [http://localhost:3000/collections](http://localhost:3000/collections)
25 |
26 | ### Images
27 | ------
28 | 
29 | ------
30 | 
31 | ------
32 | 
33 | ------
34 | 
35 | ------
36 | 
37 | ------
38 | 
39 | ------
40 |
41 | ### Author
42 | ------
43 | Dongri Jin - [@dongrify](http://twitter.com/dongrify)
44 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * Module dependencies.
4 | */
5 |
6 | var express = require('express');
7 | var session = require('cookie-session');
8 | var favicon = require('serve-favicon');
9 | var bodyParser = require('body-parser');
10 | var morgan = require('morgan');
11 | var methodOverride = require('method-override');
12 | var basicAuth = require('basic-auth');
13 | var passport = require('passport');
14 | var GoogleStrategy = require('passport-google-oauth2').Strategy;
15 |
16 | var http = require('http');
17 | var path = require('path');
18 |
19 | var ENV;
20 | if (process.env.NODE_ENV) {
21 | ENV = process.env.NODE_ENV
22 | } else {
23 | ENV = 'development';
24 | }
25 |
26 | // Config
27 | var config = require('./config/config.json');
28 |
29 | // MongoDB setup
30 | var mongo = require('./config/mongo.json');
31 | var mongoose = require('mongoose');
32 | var mongoUri = process.env.MONGOHQ_URL || mongo[ENV].uri;
33 | var mongoOpts = mongo[ENV].opts;
34 | mongoose.connect(mongoUri, mongoOpts);
35 |
36 | // Auth setup
37 | var auth = require('./config/auth.json')[ENV];
38 | global.auth = auth;
39 | passport.serializeUser(function(user, done) {
40 | done(null, user);
41 | });
42 | passport.deserializeUser(function(obj, done) {
43 | done(null, obj);
44 | });
45 | passport.use(new GoogleStrategy({
46 | clientID: auth.google.client_id,
47 | clientSecret: auth.google.client_secret,
48 | callbackURL: auth.google.callback_url
49 | },
50 | function(accessToken, refreshToken, profile, done) {
51 | process.nextTick(function () {
52 | return done(null, profile);
53 | });
54 | }
55 | ));
56 |
57 | var routes = require('./routes');
58 | var app = express();
59 |
60 | // all environments
61 | app.set('port', process.env.PORT || 3000);
62 | app.set('views', path.join(__dirname, 'views'));
63 | app.set('view engine', 'pug');
64 | app.use(express.static(path.join(__dirname, 'public')));
65 | app.use(favicon(__dirname + '/public/images/favicon.ico'));
66 | app.use(morgan('dev'));
67 | app.use(bodyParser());
68 | app.use(bodyParser.json());
69 | app.use(bodyParser.urlencoded());
70 | app.use(methodOverride(function (req, res) {
71 | if (req.body && typeof req.body === 'object' && '_method' in req.body) {
72 | // look in urlencoded POST bodies and delete it
73 | var method = req.body._method;
74 | delete req.body._method;
75 | return method;
76 | }
77 | }));
78 | app.use(session({keys: config.session_keys, secureProxy: false}))
79 | app.use(passport.initialize());
80 | app.use(passport.session());
81 |
82 | app.use(function(req, res, next) {
83 | if(auth.basic.enabled) {
84 | var credentials = basicAuth(req);
85 | if(!credentials || !(auth.basic.name === credentials.name &&
86 | auth.basic.pass === credentials.pass)) {
87 | res.writeHead(401, {
88 | 'WWW-Authenticate': 'Basic realm="Welcome to Mongri"'
89 | });
90 | res.end();
91 | } else {
92 | next();
93 | }
94 | } else {
95 | next();
96 | }
97 | });
98 |
99 | app.use(function(req, res, next){
100 | res.locals.isAuthenticated = req.isAuthenticated();
101 | res.locals.logoTitle = config.title;
102 | res.locals.dropCollection = config.drop_collection;
103 | next();
104 | });
105 |
106 | // development only
107 | if ('development' == app.get('env')) {
108 | mongoose.set('debug', true);
109 | }
110 |
111 | var collection = require('./routes/collection');
112 | var document = require('./routes/document');
113 |
114 | app.get('/', routes.index);
115 | app.all('/collections*', ensureAuthenticated);
116 | app.get('/collections', collection.collections);
117 | app.get('/collections/:collection/drop', collection.dropCollection);
118 | app.get('/collections/:document', document.documents);
119 | app.get('/collections/:document/new', document.newDocument);
120 | app.post('/collections/:document', document.postDocument);
121 | app.get('/collections/:document/:id', document.document);
122 | app.delete('/collections/:document/:id', document.deleteDocument);
123 | app.post('/collections/:document/:id', document.documentUpdate);
124 |
125 | app.get('/auth/google',
126 | passport.authenticate('google', { scope: ['https://www.googleapis.com/auth/userinfo.email'] }),
127 | function(req, res){});
128 | app.get('/auth/google/callback',
129 | passport.authenticate('google', { failureRedirect: '/' }),
130 | function(req, res) {
131 | email = req.user.emails[0].value
132 | domain = email.split("@")[1]
133 | if (domain != auth.google.allow_domain){
134 | res.redirect('/logout');
135 | } else {
136 | res.redirect('/');
137 | }
138 | });
139 | app.get('/logout', function(req, res){
140 | req.logout();
141 | res.redirect('/');
142 | });
143 |
144 | function ensureAuthenticated(req, res, next) {
145 | if (auth.google.enabled){
146 | if (req.isAuthenticated()) {
147 | return next();
148 | }
149 | res.redirect('/');
150 | }else{
151 | next();
152 | }
153 | }
154 |
155 | http.createServer(app).listen(app.get('port'), '0.0.0.0', function(){
156 | console.log('Express server listening on port ' + app.get('port'));
157 | });
158 |
--------------------------------------------------------------------------------
/config/auth.json:
--------------------------------------------------------------------------------
1 | {
2 | "development": {
3 | "basic": {
4 | "enabled": false,
5 | "name": "mongri",
6 | "pass": "password"
7 | },
8 | "google": {
9 | "enabled": false,
10 | "allow_domain": "domain.com",
11 | "client_id": "--insert-google-client-id-here--",
12 | "client_secret": "--insert-google-client-secret-here--",
13 | "callback_url": "http://localhost:3000/auth/google/callback"
14 | }
15 | },
16 | "docker": {
17 | "basic": {
18 | "enabled": false,
19 | "name": "mongri",
20 | "pass": "password"
21 | },
22 | "google": {
23 | "enabled": false,
24 | "allow_domain": "domain.com",
25 | "client_id": "--insert-google-client-id-here--",
26 | "client_secret": "--insert-google-client-secret-here--",
27 | "callback_url": "http://localhost:3000/auth/google/callback"
28 | }
29 | },
30 | "docdb": {
31 | "basic": {
32 | "enabled": false,
33 | "name": "mongri",
34 | "pass": "password"
35 | },
36 | "google": {
37 | "enabled": false,
38 | "allow_domain": "domain.com",
39 | "client_id": "--insert-google-client-id-here--",
40 | "client_secret": "--insert-google-client-secret-here--",
41 | "callback_url": "http://localhost:3000/auth/google/callback"
42 | }
43 | },
44 | "heroku": {
45 | "basic": {
46 | "enabled": false,
47 | "name": "mongri",
48 | "pass": "password"
49 | },
50 | "google": {
51 | "enabled": false,
52 | "allow_domain": "domain.com",
53 | "client_id": "--insert-google-client-id-here--",
54 | "client_secret": "--insert-google-client-secret-here--",
55 | "callback_url": "http://localhost:3000/auth/google/callback"
56 | }
57 | },
58 | "production":{
59 | "basic": {
60 | "enabled": false,
61 | "name": "mongri",
62 | "pass": "password"
63 | },
64 | "google": {
65 | "enabled": false,
66 | "allow_domain": "domain.com",
67 | "client_id": "--insert-google-client-id-here--",
68 | "client_secret": "--insert-google-client-secret-here--",
69 | "callback_url": "http://localhost:3000/auth/google/callback"
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/config/config.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Mongri",
3 | "session_keys": ["skQVdOQE6N1MNqNM7c2iwTuHfrtkAKka"],
4 | "drop_collection": false
5 | }
6 |
--------------------------------------------------------------------------------
/config/index.js:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/config/index.js
--------------------------------------------------------------------------------
/config/mongo.json:
--------------------------------------------------------------------------------
1 | {
2 | "development": {
3 | "uri": "mongodb://localhost:27017/mongri-develop",
4 | "opts": {
5 | "poolSize": 20,
6 | "useNewUrlParser": true
7 | }
8 | },
9 | "docker": {
10 | "uri": "mongodb://mongo:27017/mongri-develop",
11 | "opts": {
12 | "poolSize": 20,
13 | "useNewUrlParser": true
14 | }
15 | },
16 | "heroku": {
17 | "opts": {
18 | "poolSize": 20,
19 | "useNewUrlParser": true
20 | }
21 | },
22 | "docdb": {
23 | "uri": "mongodb://{user}:{password}@localhost:27017/{docdb}",
24 | "opts": {
25 | "poolSize": 20,
26 | "useNewUrlParser": true,
27 | "ssl": true
28 | }
29 | },
30 | "production": {
31 | "uri": "mongodb://localhost:27017/mongri-production",
32 | "opts": {
33 | "poolSize": 20,
34 | "server": {
35 | "ssl": true
36 | },
37 | "useNewUrlParser": true
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: "3"
2 |
3 | services:
4 | mongo:
5 | container_name: mongo
6 | build:
7 | context: .
8 | dockerfile: Dockerfile.mongo
9 | volumes:
10 | - ./data:/data
11 | ports:
12 | - "127.0.0.1:27017:27017"
13 | mongri:
14 | container_name: mongri
15 | build:
16 | context: .
17 | dockerfile: Dockerfile
18 | volumes:
19 | - .:/app/src
20 | environment:
21 | - NODE_ENV=docker
22 | logging:
23 | options:
24 | max-size: "500k"
25 | ports:
26 | - "127.0.0.1:3000:3000"
27 |
--------------------------------------------------------------------------------
/lib/bson.js:
--------------------------------------------------------------------------------
1 | var mongoose = require('mongoose');
2 | var vm = require('vm');
3 | var json = require('./json');
4 |
5 |
6 | exports.getSandbox = function() {
7 | return {
8 | ObjectId: mongoose.Types.ObjectId,
9 | ISODate: Date,
10 | Date: Date
11 | };
12 | };
13 |
14 | exports.toBSON = function(string) {
15 | var sandbox = exports.getSandbox();
16 |
17 | string = string.replace(/ISODate\(/g, "new ISODate(");
18 |
19 | vm.runInNewContext('doc = eval((' + string + '));', sandbox);
20 |
21 | return sandbox.doc;
22 | };
23 |
24 | exports.toString = function(doc) {
25 | return json.stringify(doc, null, ' ');
26 | };
27 |
--------------------------------------------------------------------------------
/lib/json.js:
--------------------------------------------------------------------------------
1 | var mongoose = require('mongoose');
2 |
3 | function f(n) {
4 | return n < 10 ? '0' + n : n;
5 | }
6 |
7 | var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
8 | escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,
9 | gap,
10 | indent,
11 | meta = { // table of character substitutions
12 | '\b': '\\b',
13 | '\t': '\\t',
14 | '\n': '\\n',
15 | '\f': '\\f',
16 | '\r': '\\r',
17 | '"' : '\\"',
18 | '\\': '\\\\'
19 | },
20 | rep;
21 |
22 | function quote(string) {
23 | escapable.lastIndex = 0;
24 | return escapable.test(string) ? '"' + string.replace(escapable, function (a) {
25 | var c = meta[a];
26 | return typeof c === 'string'
27 | ? c
28 | : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);
29 | }) + '"' : '"' + string + '"';
30 | }
31 |
32 | function str(key, holder) {
33 | var i,
34 | k,
35 | v,
36 | length,
37 | mind = gap,
38 | partial,
39 | value = holder[key];
40 |
41 | if (value instanceof mongoose.Types.ObjectId) {
42 | return 'ObjectId("' + value + '")';
43 | } else if (value instanceof Date) {
44 | return 'ISODate("' + value.toJSON() + '")';
45 | }
46 | if (value && typeof value === 'object' &&
47 | typeof value.toJSON === 'function') {
48 | value = value.toJSON(key);
49 | }
50 | if (typeof rep === 'function') {
51 | value = rep.call(holder, key, value);
52 | }
53 | switch (typeof value) {
54 | case 'string':
55 | return quote(value);
56 | case 'number':
57 | return isFinite(value) ? String(value) : 'null';
58 |
59 | case 'boolean':
60 | case 'null':
61 | return String(value);
62 |
63 | case 'object':
64 | if (!value) {
65 | return 'null';
66 | }
67 | gap += indent;
68 | partial = [];
69 | if (Object.prototype.toString.apply(value) === '[object Array]') {
70 | length = value.length;
71 | for (i = 0; i < length; i += 1) {
72 | partial[i] = str(i, value) || 'null';
73 | }
74 | v = partial.length === 0
75 | ? '[]'
76 | : gap
77 | ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']'
78 | : '[' + partial.join(',') + ']';
79 | gap = mind;
80 | return v;
81 | }
82 | if (rep && typeof rep === 'object') {
83 | length = rep.length;
84 | for (i = 0; i < length; i += 1) {
85 | if (typeof rep[i] === 'string') {
86 | k = rep[i];
87 | v = str(k, value);
88 | if (v) {
89 | partial.push(quote(k) + (gap ? ': ' : ':') + v);
90 | }
91 | }
92 | }
93 | } else {
94 | for (k in value) {
95 | if (Object.prototype.hasOwnProperty.call(value, k)) {
96 | v = str(k, value);
97 | if (v) {
98 | partial.push(quote(k) + (gap ? ': ' : ':') + v);
99 | }
100 | }
101 | }
102 | }
103 | v = partial.length === 0
104 | ? '{}'
105 | : gap
106 | ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}'
107 | : '{' + partial.join(',') + '}';
108 | gap = mind;
109 | return v;
110 | }
111 | }
112 |
113 | exports.stringify = function (value, replacer, space) {
114 | var i;
115 | gap = '';
116 | indent = '';
117 | if (typeof space === 'number') {
118 | for (i = 0; i < space; i += 1) {
119 | indent += ' ';
120 | }
121 | } else if (typeof space === 'string') {
122 | indent = space;
123 | }
124 | rep = replacer;
125 | if (replacer && typeof replacer !== 'function' &&
126 | (typeof replacer !== 'object' ||
127 | typeof replacer.length !== 'number')) {
128 | throw new Error('JSON.stringify');
129 | }
130 | return str('', {'': value});
131 | };
132 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mongri",
3 | "version": "0.0.1",
4 | "lockfileVersion": 1,
5 | "requires": true,
6 | "dependencies": {
7 | "@babel/helper-validator-identifier": {
8 | "version": "7.12.11",
9 | "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz",
10 | "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw=="
11 | },
12 | "@babel/parser": {
13 | "version": "7.13.9",
14 | "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.9.tgz",
15 | "integrity": "sha512-nEUfRiARCcaVo3ny3ZQjURjHQZUo/JkEw7rLlSZy/psWGnvwXFtPcr6jb7Yb41DVW5LTe6KRq9LGleRNsg1Frw=="
16 | },
17 | "@babel/types": {
18 | "version": "7.13.0",
19 | "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.0.tgz",
20 | "integrity": "sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==",
21 | "requires": {
22 | "@babel/helper-validator-identifier": "^7.12.11",
23 | "lodash": "^4.17.19",
24 | "to-fast-properties": "^2.0.0"
25 | }
26 | },
27 | "@types/bson": {
28 | "version": "4.0.5",
29 | "resolved": "https://registry.npmjs.org/@types/bson/-/bson-4.0.5.tgz",
30 | "integrity": "sha512-vVLwMUqhYJSQ/WKcE60eFqcyuWse5fGH+NMAXHuKrUAPoryq3ATxk5o4bgYNtg5aOM4APVg7Hnb3ASqUYG0PKg==",
31 | "requires": {
32 | "@types/node": "*"
33 | }
34 | },
35 | "@types/mongodb": {
36 | "version": "3.6.20",
37 | "resolved": "https://registry.npmjs.org/@types/mongodb/-/mongodb-3.6.20.tgz",
38 | "integrity": "sha512-WcdpPJCakFzcWWD9juKoZbRtQxKIMYF/JIAM4JrNHrMcnJL6/a2NWjXxW7fo9hxboxxkg+icff8d7+WIEvKgYQ==",
39 | "requires": {
40 | "@types/bson": "*",
41 | "@types/node": "*"
42 | }
43 | },
44 | "@types/node": {
45 | "version": "18.11.12",
46 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.12.tgz",
47 | "integrity": "sha512-FgD3NtTAKvyMmD44T07zz2fEf+OKwutgBCEVM8GcvMGVGaDktiLNTDvPwC/LUe3PinMW+X6CuLOF2Ui1mAlSXg=="
48 | },
49 | "accepts": {
50 | "version": "1.3.8",
51 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
52 | "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
53 | "requires": {
54 | "mime-types": "~2.1.34",
55 | "negotiator": "0.6.3"
56 | },
57 | "dependencies": {
58 | "mime-db": {
59 | "version": "1.52.0",
60 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
61 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
62 | },
63 | "mime-types": {
64 | "version": "2.1.35",
65 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
66 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
67 | "requires": {
68 | "mime-db": "1.52.0"
69 | }
70 | }
71 | }
72 | },
73 | "acorn": {
74 | "version": "7.1.1",
75 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz",
76 | "integrity": "sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg=="
77 | },
78 | "array-flatten": {
79 | "version": "1.1.1",
80 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
81 | "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg=="
82 | },
83 | "asap": {
84 | "version": "2.0.6",
85 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz",
86 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY="
87 | },
88 | "assert-never": {
89 | "version": "1.2.1",
90 | "resolved": "https://registry.npmjs.org/assert-never/-/assert-never-1.2.1.tgz",
91 | "integrity": "sha512-TaTivMB6pYI1kXwrFlEhLeGfOqoDNdTxjCdwRfFFkEA30Eu+k48W34nlok2EYWJfFFzqaEmichdNM7th6M5HNw=="
92 | },
93 | "async": {
94 | "version": "2.6.4",
95 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz",
96 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==",
97 | "requires": {
98 | "lodash": "^4.17.14"
99 | }
100 | },
101 | "babel-walk": {
102 | "version": "3.0.0-canary-5",
103 | "resolved": "https://registry.npmjs.org/babel-walk/-/babel-walk-3.0.0-canary-5.tgz",
104 | "integrity": "sha512-GAwkz0AihzY5bkwIY5QDR+LvsRQgB/B+1foMPvi0FZPMl5fjD7ICiznUiBdLYMH1QYe6vqu4gWYytZOccLouFw==",
105 | "requires": {
106 | "@babel/types": "^7.9.6"
107 | }
108 | },
109 | "base64-js": {
110 | "version": "1.5.1",
111 | "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz",
112 | "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="
113 | },
114 | "base64url": {
115 | "version": "3.0.1",
116 | "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz",
117 | "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A=="
118 | },
119 | "basic-auth": {
120 | "version": "2.0.1",
121 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
122 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
123 | "requires": {
124 | "safe-buffer": "5.1.2"
125 | },
126 | "dependencies": {
127 | "safe-buffer": {
128 | "version": "5.1.2",
129 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
130 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
131 | }
132 | }
133 | },
134 | "bl": {
135 | "version": "2.2.1",
136 | "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz",
137 | "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==",
138 | "requires": {
139 | "readable-stream": "^2.3.5",
140 | "safe-buffer": "^5.1.1"
141 | }
142 | },
143 | "bluebird": {
144 | "version": "3.5.1",
145 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
146 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
147 | },
148 | "body-parser": {
149 | "version": "1.20.1",
150 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz",
151 | "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==",
152 | "requires": {
153 | "bytes": "3.1.2",
154 | "content-type": "~1.0.4",
155 | "debug": "2.6.9",
156 | "depd": "2.0.0",
157 | "destroy": "1.2.0",
158 | "http-errors": "2.0.0",
159 | "iconv-lite": "0.4.24",
160 | "on-finished": "2.4.1",
161 | "qs": "6.11.0",
162 | "raw-body": "2.5.1",
163 | "type-is": "~1.6.18",
164 | "unpipe": "1.0.0"
165 | },
166 | "dependencies": {
167 | "debug": {
168 | "version": "2.6.9",
169 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
170 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
171 | "requires": {
172 | "ms": "2.0.0"
173 | }
174 | },
175 | "depd": {
176 | "version": "2.0.0",
177 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
178 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
179 | },
180 | "destroy": {
181 | "version": "1.2.0",
182 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz",
183 | "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg=="
184 | },
185 | "on-finished": {
186 | "version": "2.4.1",
187 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
188 | "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
189 | "requires": {
190 | "ee-first": "1.1.1"
191 | }
192 | }
193 | }
194 | },
195 | "bson": {
196 | "version": "4.3.0",
197 | "resolved": "https://registry.npmjs.org/bson/-/bson-4.3.0.tgz",
198 | "integrity": "sha512-LkKKeFJx5D6RRCRvLE+fDs40M2ZQNuk7W7tFXmKd7OOcQQ+BHdzCgRdL4XEGjc1UEGtiYuMvIVk91Bv8qsI50A==",
199 | "requires": {
200 | "buffer": "^5.6.0"
201 | }
202 | },
203 | "buffer": {
204 | "version": "5.7.1",
205 | "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
206 | "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
207 | "requires": {
208 | "base64-js": "^1.3.1",
209 | "ieee754": "^1.1.13"
210 | }
211 | },
212 | "bytes": {
213 | "version": "3.1.2",
214 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
215 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
216 | },
217 | "call-bind": {
218 | "version": "1.0.2",
219 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
220 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
221 | "requires": {
222 | "function-bind": "^1.1.1",
223 | "get-intrinsic": "^1.0.2"
224 | }
225 | },
226 | "character-parser": {
227 | "version": "2.2.0",
228 | "resolved": "https://registry.npmjs.org/character-parser/-/character-parser-2.2.0.tgz",
229 | "integrity": "sha1-x84o821LzZdE5f/CxfzeHHMmH8A=",
230 | "requires": {
231 | "is-regex": "^1.0.3"
232 | }
233 | },
234 | "constantinople": {
235 | "version": "4.0.1",
236 | "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz",
237 | "integrity": "sha512-vCrqcSIq4//Gx74TXXCGnHpulY1dskqLTFGDmhrGxzeXL8lF8kvXv6mpNWlJj1uD4DW23D4ljAqbY4RRaaUZIw==",
238 | "requires": {
239 | "@babel/parser": "^7.6.0",
240 | "@babel/types": "^7.6.1"
241 | }
242 | },
243 | "content-disposition": {
244 | "version": "0.5.4",
245 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",
246 | "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==",
247 | "requires": {
248 | "safe-buffer": "5.2.1"
249 | },
250 | "dependencies": {
251 | "safe-buffer": {
252 | "version": "5.2.1",
253 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
254 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
255 | }
256 | }
257 | },
258 | "content-type": {
259 | "version": "1.0.4",
260 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz",
261 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA=="
262 | },
263 | "cookie": {
264 | "version": "0.4.2",
265 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz",
266 | "integrity": "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="
267 | },
268 | "cookie-session": {
269 | "version": "1.3.2",
270 | "resolved": "https://registry.npmjs.org/cookie-session/-/cookie-session-1.3.2.tgz",
271 | "integrity": "sha1-Rp26djCMAQtSnpp8+dh7ZJvgGQs=",
272 | "requires": {
273 | "cookies": "0.7.1",
274 | "debug": "2.6.9",
275 | "on-headers": "~1.0.1"
276 | },
277 | "dependencies": {
278 | "debug": {
279 | "version": "2.6.9",
280 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
281 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
282 | "requires": {
283 | "ms": "2.0.0"
284 | }
285 | }
286 | }
287 | },
288 | "cookie-signature": {
289 | "version": "1.0.6",
290 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz",
291 | "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ=="
292 | },
293 | "cookies": {
294 | "version": "0.7.1",
295 | "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.7.1.tgz",
296 | "integrity": "sha1-fIphX1SBxhq58WyDNzG8uPZjuZs=",
297 | "requires": {
298 | "depd": "~1.1.1",
299 | "keygrip": "~1.0.2"
300 | }
301 | },
302 | "core-util-is": {
303 | "version": "1.0.3",
304 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
305 | "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
306 | },
307 | "debug": {
308 | "version": "3.1.0",
309 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
310 | "integrity": "sha1-W7WgZyYotkFJVmuhaBnmFRjGcmE=",
311 | "requires": {
312 | "ms": "2.0.0"
313 | }
314 | },
315 | "denque": {
316 | "version": "1.5.1",
317 | "resolved": "https://registry.npmjs.org/denque/-/denque-1.5.1.tgz",
318 | "integrity": "sha512-XwE+iZ4D6ZUB7mfYRMb5wByE8L74HCn30FBN7sWnXksWc1LO1bPDl67pBR9o/kC4z/xSNAwkMYcGgqDV3BE3Hw=="
319 | },
320 | "depd": {
321 | "version": "1.1.2",
322 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz",
323 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak="
324 | },
325 | "destroy": {
326 | "version": "1.0.4",
327 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz",
328 | "integrity": "sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg=="
329 | },
330 | "doctypes": {
331 | "version": "1.1.0",
332 | "resolved": "https://registry.npmjs.org/doctypes/-/doctypes-1.1.0.tgz",
333 | "integrity": "sha1-6oCxBqh1OHdOijpKWv4pPeSJ4Kk="
334 | },
335 | "ee-first": {
336 | "version": "1.1.1",
337 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
338 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0="
339 | },
340 | "encodeurl": {
341 | "version": "1.0.2",
342 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz",
343 | "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w=="
344 | },
345 | "escape-html": {
346 | "version": "1.0.3",
347 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
348 | "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="
349 | },
350 | "etag": {
351 | "version": "1.8.1",
352 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
353 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc="
354 | },
355 | "express": {
356 | "version": "4.17.3",
357 | "resolved": "https://registry.npmjs.org/express/-/express-4.17.3.tgz",
358 | "integrity": "sha512-yuSQpz5I+Ch7gFrPCk4/c+dIBKlQUxtgwqzph132bsT6qhuzss6I8cLJQz7B3rFblzd6wtcI0ZbGltH/C4LjUg==",
359 | "requires": {
360 | "accepts": "~1.3.8",
361 | "array-flatten": "1.1.1",
362 | "body-parser": "1.19.2",
363 | "content-disposition": "0.5.4",
364 | "content-type": "~1.0.4",
365 | "cookie": "0.4.2",
366 | "cookie-signature": "1.0.6",
367 | "debug": "2.6.9",
368 | "depd": "~1.1.2",
369 | "encodeurl": "~1.0.2",
370 | "escape-html": "~1.0.3",
371 | "etag": "~1.8.1",
372 | "finalhandler": "~1.1.2",
373 | "fresh": "0.5.2",
374 | "merge-descriptors": "1.0.1",
375 | "methods": "~1.1.2",
376 | "on-finished": "~2.3.0",
377 | "parseurl": "~1.3.3",
378 | "path-to-regexp": "0.1.7",
379 | "proxy-addr": "~2.0.7",
380 | "qs": "6.9.7",
381 | "range-parser": "~1.2.1",
382 | "safe-buffer": "5.2.1",
383 | "send": "0.17.2",
384 | "serve-static": "1.14.2",
385 | "setprototypeof": "1.2.0",
386 | "statuses": "~1.5.0",
387 | "type-is": "~1.6.18",
388 | "utils-merge": "1.0.1",
389 | "vary": "~1.1.2"
390 | },
391 | "dependencies": {
392 | "body-parser": {
393 | "version": "1.19.2",
394 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
395 | "integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==",
396 | "requires": {
397 | "bytes": "3.1.2",
398 | "content-type": "~1.0.4",
399 | "debug": "2.6.9",
400 | "depd": "~1.1.2",
401 | "http-errors": "1.8.1",
402 | "iconv-lite": "0.4.24",
403 | "on-finished": "~2.3.0",
404 | "qs": "6.9.7",
405 | "raw-body": "2.4.3",
406 | "type-is": "~1.6.18"
407 | }
408 | },
409 | "bytes": {
410 | "version": "3.1.2",
411 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
412 | "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg=="
413 | },
414 | "debug": {
415 | "version": "2.6.9",
416 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
417 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
418 | "requires": {
419 | "ms": "2.0.0"
420 | }
421 | },
422 | "http-errors": {
423 | "version": "1.8.1",
424 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
425 | "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
426 | "requires": {
427 | "depd": "~1.1.2",
428 | "inherits": "2.0.4",
429 | "setprototypeof": "1.2.0",
430 | "statuses": ">= 1.5.0 < 2",
431 | "toidentifier": "1.0.1"
432 | }
433 | },
434 | "iconv-lite": {
435 | "version": "0.4.24",
436 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
437 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
438 | "requires": {
439 | "safer-buffer": ">= 2.1.2 < 3"
440 | }
441 | },
442 | "inherits": {
443 | "version": "2.0.4",
444 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
445 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
446 | },
447 | "mime-db": {
448 | "version": "1.52.0",
449 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
450 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
451 | },
452 | "mime-types": {
453 | "version": "2.1.35",
454 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
455 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
456 | "requires": {
457 | "mime-db": "1.52.0"
458 | }
459 | },
460 | "parseurl": {
461 | "version": "1.3.3",
462 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
463 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
464 | },
465 | "qs": {
466 | "version": "6.9.7",
467 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.7.tgz",
468 | "integrity": "sha512-IhMFgUmuNpyRfxA90umL7ByLlgRXu6tIfKPpF5TmcfRLlLCckfP/g3IQmju6jjpu+Hh8rA+2p6A27ZSPOOHdKw=="
469 | },
470 | "raw-body": {
471 | "version": "2.4.3",
472 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.3.tgz",
473 | "integrity": "sha512-UlTNLIcu0uzb4D2f4WltY6cVjLi+/jEN4lgEUj3E04tpMDpUlkBo/eSn6zou9hum2VMNpCCUone0O0WeJim07g==",
474 | "requires": {
475 | "bytes": "3.1.2",
476 | "http-errors": "1.8.1",
477 | "iconv-lite": "0.4.24",
478 | "unpipe": "1.0.0"
479 | }
480 | },
481 | "safe-buffer": {
482 | "version": "5.2.1",
483 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
484 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
485 | },
486 | "setprototypeof": {
487 | "version": "1.2.0",
488 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
489 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
490 | },
491 | "statuses": {
492 | "version": "1.5.0",
493 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
494 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="
495 | },
496 | "type-is": {
497 | "version": "1.6.18",
498 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
499 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
500 | "requires": {
501 | "media-typer": "0.3.0",
502 | "mime-types": "~2.1.24"
503 | }
504 | }
505 | }
506 | },
507 | "finalhandler": {
508 | "version": "1.1.2",
509 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz",
510 | "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==",
511 | "requires": {
512 | "debug": "2.6.9",
513 | "encodeurl": "~1.0.2",
514 | "escape-html": "~1.0.3",
515 | "on-finished": "~2.3.0",
516 | "parseurl": "~1.3.3",
517 | "statuses": "~1.5.0",
518 | "unpipe": "~1.0.0"
519 | },
520 | "dependencies": {
521 | "debug": {
522 | "version": "2.6.9",
523 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
524 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
525 | "requires": {
526 | "ms": "2.0.0"
527 | }
528 | },
529 | "parseurl": {
530 | "version": "1.3.3",
531 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
532 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
533 | },
534 | "statuses": {
535 | "version": "1.5.0",
536 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
537 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="
538 | }
539 | }
540 | },
541 | "forwarded": {
542 | "version": "0.2.0",
543 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
544 | "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow=="
545 | },
546 | "fresh": {
547 | "version": "0.5.2",
548 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
549 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
550 | },
551 | "function-bind": {
552 | "version": "1.1.1",
553 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
554 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
555 | },
556 | "get-intrinsic": {
557 | "version": "1.1.1",
558 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
559 | "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
560 | "requires": {
561 | "function-bind": "^1.1.1",
562 | "has": "^1.0.3",
563 | "has-symbols": "^1.0.1"
564 | }
565 | },
566 | "has": {
567 | "version": "1.0.3",
568 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
569 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
570 | "requires": {
571 | "function-bind": "^1.1.1"
572 | }
573 | },
574 | "has-symbols": {
575 | "version": "1.0.2",
576 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz",
577 | "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw=="
578 | },
579 | "http-errors": {
580 | "version": "2.0.0",
581 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
582 | "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
583 | "requires": {
584 | "depd": "2.0.0",
585 | "inherits": "2.0.4",
586 | "setprototypeof": "1.2.0",
587 | "statuses": "2.0.1",
588 | "toidentifier": "1.0.1"
589 | },
590 | "dependencies": {
591 | "depd": {
592 | "version": "2.0.0",
593 | "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
594 | "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
595 | },
596 | "inherits": {
597 | "version": "2.0.4",
598 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
599 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
600 | }
601 | }
602 | },
603 | "iconv-lite": {
604 | "version": "0.4.24",
605 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
606 | "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
607 | "requires": {
608 | "safer-buffer": ">= 2.1.2 < 3"
609 | }
610 | },
611 | "ieee754": {
612 | "version": "1.2.1",
613 | "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz",
614 | "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="
615 | },
616 | "inherits": {
617 | "version": "2.0.3",
618 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
619 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
620 | },
621 | "ipaddr.js": {
622 | "version": "1.9.1",
623 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
624 | "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g=="
625 | },
626 | "is-core-module": {
627 | "version": "2.2.0",
628 | "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz",
629 | "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==",
630 | "requires": {
631 | "has": "^1.0.3"
632 | }
633 | },
634 | "is-expression": {
635 | "version": "4.0.0",
636 | "resolved": "https://registry.npmjs.org/is-expression/-/is-expression-4.0.0.tgz",
637 | "integrity": "sha512-zMIXX63sxzG3XrkHkrAPvm/OVZVSCPNkwMHU8oTX7/U3AL78I0QXCEICXUM13BIa8TYGZ68PiTKfQz3yaTNr4A==",
638 | "requires": {
639 | "acorn": "^7.1.1",
640 | "object-assign": "^4.1.1"
641 | }
642 | },
643 | "is-promise": {
644 | "version": "2.2.2",
645 | "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
646 | "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="
647 | },
648 | "is-regex": {
649 | "version": "1.1.2",
650 | "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
651 | "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
652 | "requires": {
653 | "call-bind": "^1.0.2",
654 | "has-symbols": "^1.0.1"
655 | }
656 | },
657 | "isarray": {
658 | "version": "1.0.0",
659 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
660 | "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
661 | },
662 | "js-stringify": {
663 | "version": "1.0.2",
664 | "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz",
665 | "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds="
666 | },
667 | "jstransformer": {
668 | "version": "1.0.0",
669 | "resolved": "https://registry.npmjs.org/jstransformer/-/jstransformer-1.0.0.tgz",
670 | "integrity": "sha1-7Yvwkh4vPx7U1cGkT2hwntJHIsM=",
671 | "requires": {
672 | "is-promise": "^2.0.0",
673 | "promise": "^7.0.1"
674 | }
675 | },
676 | "kareem": {
677 | "version": "2.3.2",
678 | "resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.2.tgz",
679 | "integrity": "sha512-STHz9P7X2L4Kwn72fA4rGyqyXdmrMSdxqHx9IXon/FXluXieaFA6KJ2upcHAHxQPQ0LeM/OjLrhFxifHewOALQ=="
680 | },
681 | "keygrip": {
682 | "version": "1.0.3",
683 | "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.0.3.tgz",
684 | "integrity": "sha512-/PpesirAIfaklxUzp4Yb7xBper9MwP6hNRA6BGGUFCgbJ+BM5CKBtsoxinNXkLHAr+GXS1/lSlF2rP7cv5Fl+g=="
685 | },
686 | "kind-of": {
687 | "version": "6.0.3",
688 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
689 | "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="
690 | },
691 | "lodash": {
692 | "version": "4.17.21",
693 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
694 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
695 | },
696 | "media-typer": {
697 | "version": "0.3.0",
698 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
699 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g="
700 | },
701 | "memory-pager": {
702 | "version": "1.5.0",
703 | "resolved": "https://registry.npmjs.org/memory-pager/-/memory-pager-1.5.0.tgz",
704 | "integrity": "sha512-ZS4Bp4r/Zoeq6+NLJpP+0Zzm0pR8whtGPf1XExKLJBAczGMnSi3It14OiNCStjQjM6NU1okjQGSxgEZN8eBYKg==",
705 | "optional": true
706 | },
707 | "merge-descriptors": {
708 | "version": "1.0.1",
709 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
710 | "integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w=="
711 | },
712 | "method-override": {
713 | "version": "3.0.0",
714 | "resolved": "https://registry.npmjs.org/method-override/-/method-override-3.0.0.tgz",
715 | "integrity": "sha512-IJ2NNN/mSl9w3kzWB92rcdHpz+HjkxhDJWNDBqSlas+zQdP8wBiJzITPg08M/k2uVvMow7Sk41atndNtt/PHSA==",
716 | "requires": {
717 | "debug": "3.1.0",
718 | "methods": "~1.1.2",
719 | "parseurl": "~1.3.2",
720 | "vary": "~1.1.2"
721 | }
722 | },
723 | "methods": {
724 | "version": "1.1.2",
725 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz",
726 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4="
727 | },
728 | "mime": {
729 | "version": "1.6.0",
730 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
731 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg=="
732 | },
733 | "mime-db": {
734 | "version": "1.52.0",
735 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
736 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="
737 | },
738 | "mime-types": {
739 | "version": "2.1.35",
740 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
741 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
742 | "requires": {
743 | "mime-db": "1.52.0"
744 | }
745 | },
746 | "mongodb": {
747 | "version": "3.7.3",
748 | "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.7.3.tgz",
749 | "integrity": "sha512-Psm+g3/wHXhjBEktkxXsFMZvd3nemI0r3IPsE0bU+4//PnvNWKkzhZcEsbPcYiWqe8XqXJJEg4Tgtr7Raw67Yw==",
750 | "requires": {
751 | "bl": "^2.2.1",
752 | "bson": "^1.1.4",
753 | "denque": "^1.4.1",
754 | "optional-require": "^1.1.8",
755 | "safe-buffer": "^5.1.2",
756 | "saslprep": "^1.0.0"
757 | },
758 | "dependencies": {
759 | "bson": {
760 | "version": "1.1.6",
761 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz",
762 | "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg=="
763 | },
764 | "optional-require": {
765 | "version": "1.1.8",
766 | "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.1.8.tgz",
767 | "integrity": "sha512-jq83qaUb0wNg9Krv1c5OQ+58EK+vHde6aBPzLvPPqJm89UQWsvSuFy9X/OSNJnFeSOKo7btE0n8Nl2+nE+z5nA==",
768 | "requires": {
769 | "require-at": "^1.0.6"
770 | }
771 | },
772 | "safe-buffer": {
773 | "version": "5.2.1",
774 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
775 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
776 | }
777 | }
778 | },
779 | "mongoose": {
780 | "version": "5.13.15",
781 | "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.13.15.tgz",
782 | "integrity": "sha512-cxp1Gbb8yUWkaEbajdhspSaKzAvsIvOtRlYD87GN/P2QEUhpd6bIvebi36T6M0tIVAMauNaK9SPA055N3PwF8Q==",
783 | "requires": {
784 | "@types/bson": "1.x || 4.0.x",
785 | "@types/mongodb": "^3.5.27",
786 | "bson": "^1.1.4",
787 | "kareem": "2.3.2",
788 | "mongodb": "3.7.3",
789 | "mongoose-legacy-pluralize": "1.0.2",
790 | "mpath": "0.8.4",
791 | "mquery": "3.2.5",
792 | "ms": "2.1.2",
793 | "optional-require": "1.0.x",
794 | "regexp-clone": "1.0.0",
795 | "safe-buffer": "5.2.1",
796 | "sift": "13.5.2",
797 | "sliced": "1.0.1"
798 | },
799 | "dependencies": {
800 | "bson": {
801 | "version": "1.1.6",
802 | "resolved": "https://registry.npmjs.org/bson/-/bson-1.1.6.tgz",
803 | "integrity": "sha512-EvVNVeGo4tHxwi8L6bPj3y3itEvStdwvvlojVxxbyYfoaxJ6keLgrTuKdyfEAszFK+H3olzBuafE0yoh0D1gdg=="
804 | },
805 | "mquery": {
806 | "version": "3.2.5",
807 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.5.tgz",
808 | "integrity": "sha512-VjOKHHgU84wij7IUoZzFRU07IAxd5kWJaDmyUzQlbjHjyoeK5TNeeo8ZsFDtTYnSgpW6n/nMNIHvE3u8Lbrf4A==",
809 | "requires": {
810 | "bluebird": "3.5.1",
811 | "debug": "3.1.0",
812 | "regexp-clone": "^1.0.0",
813 | "safe-buffer": "5.1.2",
814 | "sliced": "1.0.1"
815 | },
816 | "dependencies": {
817 | "safe-buffer": {
818 | "version": "5.1.2",
819 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
820 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
821 | }
822 | }
823 | },
824 | "ms": {
825 | "version": "2.1.2",
826 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
827 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
828 | },
829 | "safe-buffer": {
830 | "version": "5.2.1",
831 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
832 | "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
833 | }
834 | }
835 | },
836 | "mongoose-legacy-pluralize": {
837 | "version": "1.0.2",
838 | "resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
839 | "integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ=="
840 | },
841 | "morgan": {
842 | "version": "1.9.1",
843 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.1.tgz",
844 | "integrity": "sha512-HQStPIV4y3afTiCYVxirakhlCfGkI161c76kKFca7Fk1JusM//Qeo1ej2XaMniiNeaZklMVrh3vTtIzpzwbpmA==",
845 | "requires": {
846 | "basic-auth": "~2.0.0",
847 | "debug": "2.6.9",
848 | "depd": "~1.1.2",
849 | "on-finished": "~2.3.0",
850 | "on-headers": "~1.0.1"
851 | },
852 | "dependencies": {
853 | "basic-auth": {
854 | "version": "2.0.1",
855 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz",
856 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==",
857 | "requires": {
858 | "safe-buffer": "5.1.2"
859 | }
860 | },
861 | "debug": {
862 | "version": "2.6.9",
863 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
864 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
865 | "requires": {
866 | "ms": "2.0.0"
867 | }
868 | },
869 | "safe-buffer": {
870 | "version": "5.1.2",
871 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
872 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
873 | }
874 | }
875 | },
876 | "mpath": {
877 | "version": "0.8.4",
878 | "resolved": "https://registry.npmjs.org/mpath/-/mpath-0.8.4.tgz",
879 | "integrity": "sha512-DTxNZomBcTWlrMW76jy1wvV37X/cNNxPW1y2Jzd4DZkAaC5ZGsm8bfGfNOthcDuRJujXLqiuS6o3Tpy0JEoh7g=="
880 | },
881 | "mquery": {
882 | "version": "3.2.3",
883 | "resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.3.tgz",
884 | "integrity": "sha512-cIfbP4TyMYX+SkaQ2MntD+F2XbqaBHUYWk3j+kqdDztPWok3tgyssOZxMHMtzbV1w9DaSlvEea0Iocuro41A4g==",
885 | "requires": {
886 | "bluebird": "3.5.1",
887 | "debug": "3.1.0",
888 | "regexp-clone": "^1.0.0",
889 | "safe-buffer": "5.1.2",
890 | "sliced": "1.0.1"
891 | },
892 | "dependencies": {
893 | "safe-buffer": {
894 | "version": "5.1.2",
895 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
896 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
897 | }
898 | }
899 | },
900 | "ms": {
901 | "version": "2.0.0",
902 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
903 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
904 | },
905 | "negotiator": {
906 | "version": "0.6.3",
907 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz",
908 | "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg=="
909 | },
910 | "oauth": {
911 | "version": "0.9.15",
912 | "resolved": "https://registry.npmjs.org/oauth/-/oauth-0.9.15.tgz",
913 | "integrity": "sha1-vR/vr2hslrdUda7VGWQS/2DPucE="
914 | },
915 | "object-assign": {
916 | "version": "4.1.1",
917 | "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
918 | "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
919 | },
920 | "object-inspect": {
921 | "version": "1.12.2",
922 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz",
923 | "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ=="
924 | },
925 | "on-finished": {
926 | "version": "2.3.0",
927 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz",
928 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=",
929 | "requires": {
930 | "ee-first": "1.1.1"
931 | }
932 | },
933 | "on-headers": {
934 | "version": "1.0.1",
935 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz",
936 | "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c="
937 | },
938 | "optional-require": {
939 | "version": "1.0.3",
940 | "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.3.tgz",
941 | "integrity": "sha512-RV2Zp2MY2aeYK5G+B/Sps8lW5NHAzE5QClbFP15j+PWmP+T9PxlJXBOOLoSAdgwFvS4t0aMR4vpedMkbHfh0nA=="
942 | },
943 | "parseurl": {
944 | "version": "1.3.2",
945 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz",
946 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M="
947 | },
948 | "passport": {
949 | "version": "0.6.0",
950 | "resolved": "https://registry.npmjs.org/passport/-/passport-0.6.0.tgz",
951 | "integrity": "sha512-0fe+p3ZnrWRW74fe8+SvCyf4a3Pb2/h7gFkQ8yTJpAO50gDzlfjZUZTO1k5Eg9kUct22OxHLqDZoKUWRHOh9ug==",
952 | "requires": {
953 | "passport-strategy": "1.x.x",
954 | "pause": "0.0.1",
955 | "utils-merge": "^1.0.1"
956 | }
957 | },
958 | "passport-google-oauth2": {
959 | "version": "0.2.0",
960 | "resolved": "https://registry.npmjs.org/passport-google-oauth2/-/passport-google-oauth2-0.2.0.tgz",
961 | "integrity": "sha512-62EdPtbfVdc55nIXi0p1WOa/fFMM8v/M8uQGnbcXA4OexZWCnfsEi3wo2buag+Is5oqpuHzOtI64JpHk0Xi5RQ==",
962 | "requires": {
963 | "passport-oauth2": "^1.1.2"
964 | }
965 | },
966 | "passport-oauth2": {
967 | "version": "1.6.1",
968 | "resolved": "https://registry.npmjs.org/passport-oauth2/-/passport-oauth2-1.6.1.tgz",
969 | "integrity": "sha512-ZbV43Hq9d/SBSYQ22GOiglFsjsD1YY/qdiptA+8ej+9C1dL1TVB+mBE5kDH/D4AJo50+2i8f4bx0vg4/yDDZCQ==",
970 | "requires": {
971 | "base64url": "3.x.x",
972 | "oauth": "0.9.x",
973 | "passport-strategy": "1.x.x",
974 | "uid2": "0.0.x",
975 | "utils-merge": "1.x.x"
976 | }
977 | },
978 | "passport-strategy": {
979 | "version": "1.0.0",
980 | "resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
981 | "integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ="
982 | },
983 | "path-parse": {
984 | "version": "1.0.7",
985 | "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
986 | "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
987 | },
988 | "path-to-regexp": {
989 | "version": "0.1.7",
990 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz",
991 | "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ=="
992 | },
993 | "pause": {
994 | "version": "0.0.1",
995 | "resolved": "https://registry.npmjs.org/pause/-/pause-0.0.1.tgz",
996 | "integrity": "sha512-KG8UEiEVkR3wGEb4m5yZkVCzigAD+cVEJck2CzYZO37ZGJfctvVptVO192MwrtPhzONn6go8ylnOdMhKqi4nfg=="
997 | },
998 | "process-nextick-args": {
999 | "version": "2.0.1",
1000 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
1001 | "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
1002 | },
1003 | "promise": {
1004 | "version": "7.3.1",
1005 | "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz",
1006 | "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==",
1007 | "requires": {
1008 | "asap": "~2.0.3"
1009 | }
1010 | },
1011 | "proxy-addr": {
1012 | "version": "2.0.7",
1013 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
1014 | "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
1015 | "requires": {
1016 | "forwarded": "0.2.0",
1017 | "ipaddr.js": "1.9.1"
1018 | }
1019 | },
1020 | "pug": {
1021 | "version": "3.0.1",
1022 | "resolved": "https://registry.npmjs.org/pug/-/pug-3.0.1.tgz",
1023 | "integrity": "sha512-9v1o2yXMfSKJy2PykKyWUhpgx9Pf9D/UlPgIs2pTTxR6DQZ0oivy4I9f8PlWXRY4sjIhDU4TMJ7hQmYnNJc2bw==",
1024 | "requires": {
1025 | "pug-code-gen": "^3.0.2",
1026 | "pug-filters": "^4.0.0",
1027 | "pug-lexer": "^5.0.0",
1028 | "pug-linker": "^4.0.0",
1029 | "pug-load": "^3.0.0",
1030 | "pug-parser": "^6.0.0",
1031 | "pug-runtime": "^3.0.0",
1032 | "pug-strip-comments": "^2.0.0"
1033 | }
1034 | },
1035 | "pug-attrs": {
1036 | "version": "3.0.0",
1037 | "resolved": "https://registry.npmjs.org/pug-attrs/-/pug-attrs-3.0.0.tgz",
1038 | "integrity": "sha512-azINV9dUtzPMFQktvTXciNAfAuVh/L/JCl0vtPCwvOA21uZrC08K/UnmrL+SXGEVc1FwzjW62+xw5S/uaLj6cA==",
1039 | "requires": {
1040 | "constantinople": "^4.0.1",
1041 | "js-stringify": "^1.0.2",
1042 | "pug-runtime": "^3.0.0"
1043 | }
1044 | },
1045 | "pug-code-gen": {
1046 | "version": "3.0.2",
1047 | "resolved": "https://registry.npmjs.org/pug-code-gen/-/pug-code-gen-3.0.2.tgz",
1048 | "integrity": "sha512-nJMhW16MbiGRiyR4miDTQMRWDgKplnHyeLvioEJYbk1RsPI3FuA3saEP8uwnTb2nTJEKBU90NFVWJBk4OU5qyg==",
1049 | "requires": {
1050 | "constantinople": "^4.0.1",
1051 | "doctypes": "^1.1.0",
1052 | "js-stringify": "^1.0.2",
1053 | "pug-attrs": "^3.0.0",
1054 | "pug-error": "^2.0.0",
1055 | "pug-runtime": "^3.0.0",
1056 | "void-elements": "^3.1.0",
1057 | "with": "^7.0.0"
1058 | }
1059 | },
1060 | "pug-error": {
1061 | "version": "2.0.0",
1062 | "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-2.0.0.tgz",
1063 | "integrity": "sha512-sjiUsi9M4RAGHktC1drQfCr5C5eriu24Lfbt4s+7SykztEOwVZtbFk1RRq0tzLxcMxMYTBR+zMQaG07J/btayQ=="
1064 | },
1065 | "pug-filters": {
1066 | "version": "4.0.0",
1067 | "resolved": "https://registry.npmjs.org/pug-filters/-/pug-filters-4.0.0.tgz",
1068 | "integrity": "sha512-yeNFtq5Yxmfz0f9z2rMXGw/8/4i1cCFecw/Q7+D0V2DdtII5UvqE12VaZ2AY7ri6o5RNXiweGH79OCq+2RQU4A==",
1069 | "requires": {
1070 | "constantinople": "^4.0.1",
1071 | "jstransformer": "1.0.0",
1072 | "pug-error": "^2.0.0",
1073 | "pug-walk": "^2.0.0",
1074 | "resolve": "^1.15.1"
1075 | }
1076 | },
1077 | "pug-lexer": {
1078 | "version": "5.0.1",
1079 | "resolved": "https://registry.npmjs.org/pug-lexer/-/pug-lexer-5.0.1.tgz",
1080 | "integrity": "sha512-0I6C62+keXlZPZkOJeVam9aBLVP2EnbeDw3An+k0/QlqdwH6rv8284nko14Na7c0TtqtogfWXcRoFE4O4Ff20w==",
1081 | "requires": {
1082 | "character-parser": "^2.2.0",
1083 | "is-expression": "^4.0.0",
1084 | "pug-error": "^2.0.0"
1085 | }
1086 | },
1087 | "pug-linker": {
1088 | "version": "4.0.0",
1089 | "resolved": "https://registry.npmjs.org/pug-linker/-/pug-linker-4.0.0.tgz",
1090 | "integrity": "sha512-gjD1yzp0yxbQqnzBAdlhbgoJL5qIFJw78juN1NpTLt/mfPJ5VgC4BvkoD3G23qKzJtIIXBbcCt6FioLSFLOHdw==",
1091 | "requires": {
1092 | "pug-error": "^2.0.0",
1093 | "pug-walk": "^2.0.0"
1094 | }
1095 | },
1096 | "pug-load": {
1097 | "version": "3.0.0",
1098 | "resolved": "https://registry.npmjs.org/pug-load/-/pug-load-3.0.0.tgz",
1099 | "integrity": "sha512-OCjTEnhLWZBvS4zni/WUMjH2YSUosnsmjGBB1An7CsKQarYSWQ0GCVyd4eQPMFJqZ8w9xgs01QdiZXKVjk92EQ==",
1100 | "requires": {
1101 | "object-assign": "^4.1.1",
1102 | "pug-walk": "^2.0.0"
1103 | }
1104 | },
1105 | "pug-parser": {
1106 | "version": "6.0.0",
1107 | "resolved": "https://registry.npmjs.org/pug-parser/-/pug-parser-6.0.0.tgz",
1108 | "integrity": "sha512-ukiYM/9cH6Cml+AOl5kETtM9NR3WulyVP2y4HOU45DyMim1IeP/OOiyEWRr6qk5I5klpsBnbuHpwKmTx6WURnw==",
1109 | "requires": {
1110 | "pug-error": "^2.0.0",
1111 | "token-stream": "1.0.0"
1112 | }
1113 | },
1114 | "pug-runtime": {
1115 | "version": "3.0.1",
1116 | "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-3.0.1.tgz",
1117 | "integrity": "sha512-L50zbvrQ35TkpHwv0G6aLSuueDRwc/97XdY8kL3tOT0FmhgG7UypU3VztfV/LATAvmUfYi4wNxSajhSAeNN+Kg=="
1118 | },
1119 | "pug-strip-comments": {
1120 | "version": "2.0.0",
1121 | "resolved": "https://registry.npmjs.org/pug-strip-comments/-/pug-strip-comments-2.0.0.tgz",
1122 | "integrity": "sha512-zo8DsDpH7eTkPHCXFeAk1xZXJbyoTfdPlNR0bK7rpOMuhBYb0f5qUVCO1xlsitYd3w5FQTK7zpNVKb3rZoUrrQ==",
1123 | "requires": {
1124 | "pug-error": "^2.0.0"
1125 | }
1126 | },
1127 | "pug-walk": {
1128 | "version": "2.0.0",
1129 | "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-2.0.0.tgz",
1130 | "integrity": "sha512-yYELe9Q5q9IQhuvqsZNwA5hfPkMJ8u92bQLIMcsMxf/VADjNtEYptU+inlufAFYcWdHlwNfZOEnOOQrZrcyJCQ=="
1131 | },
1132 | "qs": {
1133 | "version": "6.11.0",
1134 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz",
1135 | "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==",
1136 | "requires": {
1137 | "side-channel": "^1.0.4"
1138 | }
1139 | },
1140 | "range-parser": {
1141 | "version": "1.2.1",
1142 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
1143 | "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg=="
1144 | },
1145 | "raw-body": {
1146 | "version": "2.5.1",
1147 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
1148 | "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==",
1149 | "requires": {
1150 | "bytes": "3.1.2",
1151 | "http-errors": "2.0.0",
1152 | "iconv-lite": "0.4.24",
1153 | "unpipe": "1.0.0"
1154 | }
1155 | },
1156 | "readable-stream": {
1157 | "version": "2.3.7",
1158 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
1159 | "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
1160 | "requires": {
1161 | "core-util-is": "~1.0.0",
1162 | "inherits": "~2.0.3",
1163 | "isarray": "~1.0.0",
1164 | "process-nextick-args": "~2.0.0",
1165 | "safe-buffer": "~5.1.1",
1166 | "string_decoder": "~1.1.1",
1167 | "util-deprecate": "~1.0.1"
1168 | }
1169 | },
1170 | "regexp-clone": {
1171 | "version": "1.0.0",
1172 | "resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
1173 | "integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
1174 | },
1175 | "require-at": {
1176 | "version": "1.0.6",
1177 | "resolved": "https://registry.npmjs.org/require-at/-/require-at-1.0.6.tgz",
1178 | "integrity": "sha512-7i1auJbMUrXEAZCOQ0VNJgmcT2VOKPRl2YGJwgpHpC9CE91Mv4/4UYIUm4chGJaI381ZDq1JUicFii64Hapd8g=="
1179 | },
1180 | "resolve": {
1181 | "version": "1.20.0",
1182 | "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
1183 | "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
1184 | "requires": {
1185 | "is-core-module": "^2.2.0",
1186 | "path-parse": "^1.0.6"
1187 | }
1188 | },
1189 | "safe-buffer": {
1190 | "version": "5.1.1",
1191 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz",
1192 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg=="
1193 | },
1194 | "safer-buffer": {
1195 | "version": "2.1.2",
1196 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
1197 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
1198 | },
1199 | "saslprep": {
1200 | "version": "1.0.3",
1201 | "resolved": "https://registry.npmjs.org/saslprep/-/saslprep-1.0.3.tgz",
1202 | "integrity": "sha512-/MY/PEMbk2SuY5sScONwhUDsV2p77Znkb/q3nSVstq/yQzYJOH/Azh29p9oJLsl3LnQwSvZDKagDGBsBwSooag==",
1203 | "optional": true,
1204 | "requires": {
1205 | "sparse-bitfield": "^3.0.3"
1206 | }
1207 | },
1208 | "send": {
1209 | "version": "0.17.2",
1210 | "resolved": "https://registry.npmjs.org/send/-/send-0.17.2.tgz",
1211 | "integrity": "sha512-UJYB6wFSJE3G00nEivR5rgWp8c2xXvJ3OPWPhmuteU0IKj8nKbG3DrjiOmLwpnHGYWAVwA69zmTm++YG0Hmwww==",
1212 | "requires": {
1213 | "debug": "2.6.9",
1214 | "depd": "~1.1.2",
1215 | "destroy": "~1.0.4",
1216 | "encodeurl": "~1.0.2",
1217 | "escape-html": "~1.0.3",
1218 | "etag": "~1.8.1",
1219 | "fresh": "0.5.2",
1220 | "http-errors": "1.8.1",
1221 | "mime": "1.6.0",
1222 | "ms": "2.1.3",
1223 | "on-finished": "~2.3.0",
1224 | "range-parser": "~1.2.1",
1225 | "statuses": "~1.5.0"
1226 | },
1227 | "dependencies": {
1228 | "debug": {
1229 | "version": "2.6.9",
1230 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
1231 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
1232 | "requires": {
1233 | "ms": "2.0.0"
1234 | },
1235 | "dependencies": {
1236 | "ms": {
1237 | "version": "2.0.0",
1238 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
1239 | "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="
1240 | }
1241 | }
1242 | },
1243 | "http-errors": {
1244 | "version": "1.8.1",
1245 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
1246 | "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
1247 | "requires": {
1248 | "depd": "~1.1.2",
1249 | "inherits": "2.0.4",
1250 | "setprototypeof": "1.2.0",
1251 | "statuses": ">= 1.5.0 < 2",
1252 | "toidentifier": "1.0.1"
1253 | }
1254 | },
1255 | "inherits": {
1256 | "version": "2.0.4",
1257 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
1258 | "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
1259 | },
1260 | "ms": {
1261 | "version": "2.1.3",
1262 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",
1263 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="
1264 | },
1265 | "setprototypeof": {
1266 | "version": "1.2.0",
1267 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1268 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
1269 | },
1270 | "statuses": {
1271 | "version": "1.5.0",
1272 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz",
1273 | "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA=="
1274 | }
1275 | }
1276 | },
1277 | "serve-favicon": {
1278 | "version": "2.5.0",
1279 | "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.5.0.tgz",
1280 | "integrity": "sha1-k10kDN/g9YBTB/3+ln2IlCosvPA=",
1281 | "requires": {
1282 | "etag": "~1.8.1",
1283 | "fresh": "0.5.2",
1284 | "ms": "2.1.1",
1285 | "parseurl": "~1.3.2",
1286 | "safe-buffer": "5.1.1"
1287 | },
1288 | "dependencies": {
1289 | "ms": {
1290 | "version": "2.1.1",
1291 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
1292 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
1293 | }
1294 | }
1295 | },
1296 | "serve-static": {
1297 | "version": "1.14.2",
1298 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.2.tgz",
1299 | "integrity": "sha512-+TMNA9AFxUEGuC0z2mevogSnn9MXKb4fa7ngeRMJaaGv8vTwnIEkKi+QGvPt33HSnf8pRS+WGM0EbMtCJLKMBQ==",
1300 | "requires": {
1301 | "encodeurl": "~1.0.2",
1302 | "escape-html": "~1.0.3",
1303 | "parseurl": "~1.3.3",
1304 | "send": "0.17.2"
1305 | },
1306 | "dependencies": {
1307 | "parseurl": {
1308 | "version": "1.3.3",
1309 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
1310 | "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ=="
1311 | }
1312 | }
1313 | },
1314 | "setprototypeof": {
1315 | "version": "1.2.0",
1316 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
1317 | "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
1318 | },
1319 | "side-channel": {
1320 | "version": "1.0.4",
1321 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
1322 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
1323 | "requires": {
1324 | "call-bind": "^1.0.0",
1325 | "get-intrinsic": "^1.0.2",
1326 | "object-inspect": "^1.9.0"
1327 | }
1328 | },
1329 | "sift": {
1330 | "version": "13.5.2",
1331 | "resolved": "https://registry.npmjs.org/sift/-/sift-13.5.2.tgz",
1332 | "integrity": "sha512-+gxdEOMA2J+AI+fVsCqeNn7Tgx3M9ZN9jdi95939l1IJ8cZsqS8sqpJyOkic2SJk+1+98Uwryt/gL6XDaV+UZA=="
1333 | },
1334 | "sliced": {
1335 | "version": "1.0.1",
1336 | "resolved": "https://registry.npmjs.org/sliced/-/sliced-1.0.1.tgz",
1337 | "integrity": "sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E="
1338 | },
1339 | "sparse-bitfield": {
1340 | "version": "3.0.3",
1341 | "resolved": "https://registry.npmjs.org/sparse-bitfield/-/sparse-bitfield-3.0.3.tgz",
1342 | "integrity": "sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==",
1343 | "optional": true,
1344 | "requires": {
1345 | "memory-pager": "^1.0.2"
1346 | }
1347 | },
1348 | "statuses": {
1349 | "version": "2.0.1",
1350 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
1351 | "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ=="
1352 | },
1353 | "string_decoder": {
1354 | "version": "1.1.1",
1355 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
1356 | "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
1357 | "requires": {
1358 | "safe-buffer": "~5.1.0"
1359 | }
1360 | },
1361 | "to-fast-properties": {
1362 | "version": "2.0.0",
1363 | "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
1364 | "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4="
1365 | },
1366 | "toidentifier": {
1367 | "version": "1.0.1",
1368 | "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
1369 | "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA=="
1370 | },
1371 | "token-stream": {
1372 | "version": "1.0.0",
1373 | "resolved": "https://registry.npmjs.org/token-stream/-/token-stream-1.0.0.tgz",
1374 | "integrity": "sha1-zCAOqyYT9BZtJ/+a/HylbUnfbrQ="
1375 | },
1376 | "type-is": {
1377 | "version": "1.6.18",
1378 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz",
1379 | "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==",
1380 | "requires": {
1381 | "media-typer": "0.3.0",
1382 | "mime-types": "~2.1.24"
1383 | }
1384 | },
1385 | "uid2": {
1386 | "version": "0.0.3",
1387 | "resolved": "https://registry.npmjs.org/uid2/-/uid2-0.0.3.tgz",
1388 | "integrity": "sha1-SDEm4Rd03y9xuLY53NeZw3YWK4I="
1389 | },
1390 | "unpipe": {
1391 | "version": "1.0.0",
1392 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
1393 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw="
1394 | },
1395 | "util-deprecate": {
1396 | "version": "1.0.2",
1397 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
1398 | "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
1399 | },
1400 | "utils-merge": {
1401 | "version": "1.0.1",
1402 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz",
1403 | "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM="
1404 | },
1405 | "vary": {
1406 | "version": "1.1.2",
1407 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
1408 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw="
1409 | },
1410 | "void-elements": {
1411 | "version": "3.1.0",
1412 | "resolved": "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz",
1413 | "integrity": "sha1-YU9/v42AHwu18GYfWy9XhXUOTwk="
1414 | },
1415 | "with": {
1416 | "version": "7.0.2",
1417 | "resolved": "https://registry.npmjs.org/with/-/with-7.0.2.tgz",
1418 | "integrity": "sha512-RNGKj82nUPg3g5ygxkQl0R937xLyho1J24ItRCBTr/m1YnZkzJy1hUiHUJrc/VlsDQzsCnInEGSg3bci0Lmd4w==",
1419 | "requires": {
1420 | "@babel/parser": "^7.9.6",
1421 | "@babel/types": "^7.9.6",
1422 | "assert-never": "^1.2.1",
1423 | "babel-walk": "3.0.0-canary-5"
1424 | }
1425 | }
1426 | }
1427 | }
1428 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mongri",
3 | "version": "0.0.1",
4 | "private": true,
5 | "scripts": {
6 | "start": "node app.js"
7 | },
8 | "dependencies": {
9 | "acorn": ">=5.7.4",
10 | "async": "2.6.4",
11 | "basic-auth": "2.0.1",
12 | "body-parser": "1.20.1",
13 | "bson": ">=1.1.4",
14 | "cookie-session": "1.3.2",
15 | "express": "4.17.3",
16 | "kind-of": ">=6.0.3",
17 | "lodash": "^4.17.21",
18 | "pug": "3.0.1",
19 | "method-override": "3.0.0",
20 | "mongoose": "^5.13.15",
21 | "morgan": "1.9.1",
22 | "mquery": "3.2.3",
23 | "passport": "0.6.0",
24 | "passport-google-oauth2": "0.2.0",
25 | "serve-favicon": "2.5.0"
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/public/images/demo/collections.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/collections.png
--------------------------------------------------------------------------------
/public/images/demo/document.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/document.png
--------------------------------------------------------------------------------
/public/images/demo/documents.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/documents.png
--------------------------------------------------------------------------------
/public/images/demo/new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/new.png
--------------------------------------------------------------------------------
/public/images/demo/query.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/query.png
--------------------------------------------------------------------------------
/public/images/demo/signin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/demo/signin.png
--------------------------------------------------------------------------------
/public/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/favicon.ico
--------------------------------------------------------------------------------
/public/images/google.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/dongri/mongri/5666eb4ca8feb4708bbf84b01b2d47dfcd01970d/public/images/google.png
--------------------------------------------------------------------------------
/public/javascripts/codemirror/mode/javascript/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: JavaScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |

16 |
17 |
22 |
26 |
27 |
28 |
29 | JavaScript mode
30 |
31 |
32 |
81 |
82 |
90 |
91 |
92 | JavaScript mode supports several configuration options:
93 |
94 | json
which will set the mode to expect JSON
95 | data rather than a JavaScript program.
96 | jsonld
which will set the mode to expect
97 | JSON-LD linked data rather
98 | than a JavaScript program (demo).
99 | typescript
which will activate additional
100 | syntax highlighting and some other things for TypeScript code
101 | (demo).
102 | statementIndent
which (given a number) will
103 | determine the amount of indentation to use for statements
104 | continued on a new line.
105 |
106 |
107 |
108 | MIME types defined: text/javascript
, application/json
, application/ld+json
, text/typescript
, application/typescript
.
109 |
110 |
--------------------------------------------------------------------------------
/public/javascripts/codemirror/mode/javascript/javascript.js:
--------------------------------------------------------------------------------
1 | // TODO actually recognize syntax of TypeScript constructs
2 |
3 | (function(mod) {
4 | if (typeof exports == "object" && typeof module == "object") // CommonJS
5 | mod(require("../../lib/codemirror"));
6 | else if (typeof define == "function" && define.amd) // AMD
7 | define(["../../lib/codemirror"], mod);
8 | else // Plain browser env
9 | mod(CodeMirror);
10 | })(function(CodeMirror) {
11 | "use strict";
12 |
13 | CodeMirror.defineMode("javascript", function(config, parserConfig) {
14 | var indentUnit = config.indentUnit;
15 | var statementIndent = parserConfig.statementIndent;
16 | var jsonldMode = parserConfig.jsonld;
17 | var jsonMode = parserConfig.json || jsonldMode;
18 | var isTS = parserConfig.typescript;
19 |
20 | // Tokenizer
21 |
22 | var keywords = function(){
23 | function kw(type) {return {type: type, style: "keyword"};}
24 | var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
25 | var operator = kw("operator"), atom = {type: "atom", style: "atom"};
26 |
27 | var jsKeywords = {
28 | "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
29 | "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, "debugger": C,
30 | "var": kw("var"), "const": kw("var"), "let": kw("var"),
31 | "function": kw("function"), "catch": kw("catch"),
32 | "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
33 | "in": operator, "typeof": operator, "instanceof": operator,
34 | "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom,
35 | "this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"),
36 | "yield": C, "export": kw("export"), "import": kw("import"), "extends": C
37 | };
38 |
39 | // Extend the 'normal' keywords with the TypeScript language extensions
40 | if (isTS) {
41 | var type = {type: "variable", style: "variable-3"};
42 | var tsKeywords = {
43 | // object-like things
44 | "interface": kw("interface"),
45 | "extends": kw("extends"),
46 | "constructor": kw("constructor"),
47 |
48 | // scope modifiers
49 | "public": kw("public"),
50 | "private": kw("private"),
51 | "protected": kw("protected"),
52 | "static": kw("static"),
53 |
54 | // types
55 | "string": type, "number": type, "bool": type, "any": type
56 | };
57 |
58 | for (var attr in tsKeywords) {
59 | jsKeywords[attr] = tsKeywords[attr];
60 | }
61 | }
62 |
63 | return jsKeywords;
64 | }();
65 |
66 | var isOperatorChar = /[+\-*&%=<>!?|~^]/;
67 | var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;
68 |
69 | function readRegexp(stream) {
70 | var escaped = false, next, inSet = false;
71 | while ((next = stream.next()) != null) {
72 | if (!escaped) {
73 | if (next == "/" && !inSet) return;
74 | if (next == "[") inSet = true;
75 | else if (inSet && next == "]") inSet = false;
76 | }
77 | escaped = !escaped && next == "\\";
78 | }
79 | }
80 |
81 | // Used as scratch variables to communicate multiple values without
82 | // consing up tons of objects.
83 | var type, content;
84 | function ret(tp, style, cont) {
85 | type = tp; content = cont;
86 | return style;
87 | }
88 | function tokenBase(stream, state) {
89 | var ch = stream.next();
90 | if (ch == '"' || ch == "'") {
91 | state.tokenize = tokenString(ch);
92 | return state.tokenize(stream, state);
93 | } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) {
94 | return ret("number", "number");
95 | } else if (ch == "." && stream.match("..")) {
96 | return ret("spread", "meta");
97 | } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
98 | return ret(ch);
99 | } else if (ch == "=" && stream.eat(">")) {
100 | return ret("=>", "operator");
101 | } else if (ch == "0" && stream.eat(/x/i)) {
102 | stream.eatWhile(/[\da-f]/i);
103 | return ret("number", "number");
104 | } else if (/\d/.test(ch)) {
105 | stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
106 | return ret("number", "number");
107 | } else if (ch == "/") {
108 | if (stream.eat("*")) {
109 | state.tokenize = tokenComment;
110 | return tokenComment(stream, state);
111 | } else if (stream.eat("/")) {
112 | stream.skipToEnd();
113 | return ret("comment", "comment");
114 | } else if (state.lastType == "operator" || state.lastType == "keyword c" ||
115 | state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) {
116 | readRegexp(stream);
117 | stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
118 | return ret("regexp", "string-2");
119 | } else {
120 | stream.eatWhile(isOperatorChar);
121 | return ret("operator", "operator", stream.current());
122 | }
123 | } else if (ch == "`") {
124 | state.tokenize = tokenQuasi;
125 | return tokenQuasi(stream, state);
126 | } else if (ch == "#") {
127 | stream.skipToEnd();
128 | return ret("error", "error");
129 | } else if (isOperatorChar.test(ch)) {
130 | stream.eatWhile(isOperatorChar);
131 | return ret("operator", "operator", stream.current());
132 | } else {
133 | stream.eatWhile(/[\w\$_]/);
134 | var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
135 | return (known && state.lastType != ".") ? ret(known.type, known.style, word) :
136 | ret("variable", "variable", word);
137 | }
138 | }
139 |
140 | function tokenString(quote) {
141 | return function(stream, state) {
142 | var escaped = false, next;
143 | if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)){
144 | state.tokenize = tokenBase;
145 | return ret("jsonld-keyword", "meta");
146 | }
147 | while ((next = stream.next()) != null) {
148 | if (next == quote && !escaped) break;
149 | escaped = !escaped && next == "\\";
150 | }
151 | if (!escaped) state.tokenize = tokenBase;
152 | return ret("string", "string");
153 | };
154 | }
155 |
156 | function tokenComment(stream, state) {
157 | var maybeEnd = false, ch;
158 | while (ch = stream.next()) {
159 | if (ch == "/" && maybeEnd) {
160 | state.tokenize = tokenBase;
161 | break;
162 | }
163 | maybeEnd = (ch == "*");
164 | }
165 | return ret("comment", "comment");
166 | }
167 |
168 | function tokenQuasi(stream, state) {
169 | var escaped = false, next;
170 | while ((next = stream.next()) != null) {
171 | if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) {
172 | state.tokenize = tokenBase;
173 | break;
174 | }
175 | escaped = !escaped && next == "\\";
176 | }
177 | return ret("quasi", "string-2", stream.current());
178 | }
179 |
180 | var brackets = "([{}])";
181 | // This is a crude lookahead trick to try and notice that we're
182 | // parsing the argument patterns for a fat-arrow function before we
183 | // actually hit the arrow token. It only works if the arrow is on
184 | // the same line as the arguments and there's no strange noise
185 | // (comments) in between. Fallback is to only notice when we hit the
186 | // arrow, and not declare the arguments as locals for the arrow
187 | // body.
188 | function findFatArrow(stream, state) {
189 | if (state.fatArrowAt) state.fatArrowAt = null;
190 | var arrow = stream.string.indexOf("=>", stream.start);
191 | if (arrow < 0) return;
192 |
193 | var depth = 0, sawSomething = false;
194 | for (var pos = arrow - 1; pos >= 0; --pos) {
195 | var ch = stream.string.charAt(pos);
196 | var bracket = brackets.indexOf(ch);
197 | if (bracket >= 0 && bracket < 3) {
198 | if (!depth) { ++pos; break; }
199 | if (--depth == 0) break;
200 | } else if (bracket >= 3 && bracket < 6) {
201 | ++depth;
202 | } else if (/[$\w]/.test(ch)) {
203 | sawSomething = true;
204 | } else if (sawSomething && !depth) {
205 | ++pos;
206 | break;
207 | }
208 | }
209 | if (sawSomething && !depth) state.fatArrowAt = pos;
210 | }
211 |
212 | // Parser
213 |
214 | var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true, "jsonld-keyword": true};
215 |
216 | function JSLexical(indented, column, type, align, prev, info) {
217 | this.indented = indented;
218 | this.column = column;
219 | this.type = type;
220 | this.prev = prev;
221 | this.info = info;
222 | if (align != null) this.align = align;
223 | }
224 |
225 | function inScope(state, varname) {
226 | for (var v = state.localVars; v; v = v.next)
227 | if (v.name == varname) return true;
228 | for (var cx = state.context; cx; cx = cx.prev) {
229 | for (var v = cx.vars; v; v = v.next)
230 | if (v.name == varname) return true;
231 | }
232 | }
233 |
234 | function parseJS(state, style, type, content, stream) {
235 | var cc = state.cc;
236 | // Communicate our context to the combinators.
237 | // (Less wasteful than consing up a hundred closures on every call.)
238 | cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
239 |
240 | if (!state.lexical.hasOwnProperty("align"))
241 | state.lexical.align = true;
242 |
243 | while(true) {
244 | var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
245 | if (combinator(type, content)) {
246 | while(cc.length && cc[cc.length - 1].lex)
247 | cc.pop()();
248 | if (cx.marked) return cx.marked;
249 | if (type == "variable" && inScope(state, content)) return "variable-2";
250 | return style;
251 | }
252 | }
253 | }
254 |
255 | // Combinator utils
256 |
257 | var cx = {state: null, column: null, marked: null, cc: null};
258 | function pass() {
259 | for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
260 | }
261 | function cont() {
262 | pass.apply(null, arguments);
263 | return true;
264 | }
265 | function register(varname) {
266 | function inList(list) {
267 | for (var v = list; v; v = v.next)
268 | if (v.name == varname) return true;
269 | return false;
270 | }
271 | var state = cx.state;
272 | if (state.context) {
273 | cx.marked = "def";
274 | if (inList(state.localVars)) return;
275 | state.localVars = {name: varname, next: state.localVars};
276 | } else {
277 | if (inList(state.globalVars)) return;
278 | if (parserConfig.globalVars)
279 | state.globalVars = {name: varname, next: state.globalVars};
280 | }
281 | }
282 |
283 | // Combinators
284 |
285 | var defaultVars = {name: "this", next: {name: "arguments"}};
286 | function pushcontext() {
287 | cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
288 | cx.state.localVars = defaultVars;
289 | }
290 | function popcontext() {
291 | cx.state.localVars = cx.state.context.vars;
292 | cx.state.context = cx.state.context.prev;
293 | }
294 | function pushlex(type, info) {
295 | var result = function() {
296 | var state = cx.state, indent = state.indented;
297 | if (state.lexical.type == "stat") indent = state.lexical.indented;
298 | state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info);
299 | };
300 | result.lex = true;
301 | return result;
302 | }
303 | function poplex() {
304 | var state = cx.state;
305 | if (state.lexical.prev) {
306 | if (state.lexical.type == ")")
307 | state.indented = state.lexical.indented;
308 | state.lexical = state.lexical.prev;
309 | }
310 | }
311 | poplex.lex = true;
312 |
313 | function expect(wanted) {
314 | function exp(type) {
315 | if (type == wanted) return cont();
316 | else if (wanted == ";") return pass();
317 | else return cont(exp);
318 | };
319 | return exp;
320 | }
321 |
322 | function statement(type, value) {
323 | if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex);
324 | if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
325 | if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
326 | if (type == "{") return cont(pushlex("}"), block, poplex);
327 | if (type == ";") return cont();
328 | if (type == "if") {
329 | if (cx.state.lexical.info == "else" && cx.state.cc[cx.state.cc.length - 1] == poplex)
330 | cx.state.cc.pop()();
331 | return cont(pushlex("form"), expression, statement, poplex, maybeelse);
332 | }
333 | if (type == "function") return cont(functiondef);
334 | if (type == "for") return cont(pushlex("form"), forspec, statement, poplex);
335 | if (type == "variable") return cont(pushlex("stat"), maybelabel);
336 | if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
337 | block, poplex, poplex);
338 | if (type == "case") return cont(expression, expect(":"));
339 | if (type == "default") return cont(expect(":"));
340 | if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
341 | statement, poplex, popcontext);
342 | if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex);
343 | if (type == "class") return cont(pushlex("form"), className, objlit, poplex);
344 | if (type == "export") return cont(pushlex("form"), afterExport, poplex);
345 | if (type == "import") return cont(pushlex("form"), afterImport, poplex);
346 | return pass(pushlex("stat"), expression, expect(";"), poplex);
347 | }
348 | function expression(type) {
349 | return expressionInner(type, false);
350 | }
351 | function expressionNoComma(type) {
352 | return expressionInner(type, true);
353 | }
354 | function expressionInner(type, noComma) {
355 | if (cx.state.fatArrowAt == cx.stream.start) {
356 | var body = noComma ? arrowBodyNoComma : arrowBody;
357 | if (type == "(") return cont(pushcontext, pushlex(")"), commasep(pattern, ")"), poplex, expect("=>"), body, popcontext);
358 | else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext);
359 | }
360 |
361 | var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma;
362 | if (atomicTypes.hasOwnProperty(type)) return cont(maybeop);
363 | if (type == "function") return cont(functiondef, maybeop);
364 | if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression);
365 | if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop);
366 | if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression);
367 | if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop);
368 | if (type == "{") return contCommasep(objprop, "}", null, maybeop);
369 | if (type == "quasi") { return pass(quasi, maybeop); }
370 | return cont();
371 | }
372 | function maybeexpression(type) {
373 | if (type.match(/[;\}\)\],]/)) return pass();
374 | return pass(expression);
375 | }
376 | function maybeexpressionNoComma(type) {
377 | if (type.match(/[;\}\)\],]/)) return pass();
378 | return pass(expressionNoComma);
379 | }
380 |
381 | function maybeoperatorComma(type, value) {
382 | if (type == ",") return cont(expression);
383 | return maybeoperatorNoComma(type, value, false);
384 | }
385 | function maybeoperatorNoComma(type, value, noComma) {
386 | var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma;
387 | var expr = noComma == false ? expression : expressionNoComma;
388 | if (value == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext);
389 | if (type == "operator") {
390 | if (/\+\+|--/.test(value)) return cont(me);
391 | if (value == "?") return cont(expression, expect(":"), expr);
392 | return cont(expr);
393 | }
394 | if (type == "quasi") { return pass(quasi, me); }
395 | if (type == ";") return;
396 | if (type == "(") return contCommasep(expressionNoComma, ")", "call", me);
397 | if (type == ".") return cont(property, me);
398 | if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me);
399 | }
400 | function quasi(type, value) {
401 | if (type != "quasi") return pass();
402 | if (value.slice(value.length - 2) != "${") return cont(quasi);
403 | return cont(expression, continueQuasi);
404 | }
405 | function continueQuasi(type) {
406 | if (type == "}") {
407 | cx.marked = "string-2";
408 | cx.state.tokenize = tokenQuasi;
409 | return cont(quasi);
410 | }
411 | }
412 | function arrowBody(type) {
413 | findFatArrow(cx.stream, cx.state);
414 | if (type == "{") return pass(statement);
415 | return pass(expression);
416 | }
417 | function arrowBodyNoComma(type) {
418 | findFatArrow(cx.stream, cx.state);
419 | if (type == "{") return pass(statement);
420 | return pass(expressionNoComma);
421 | }
422 | function maybelabel(type) {
423 | if (type == ":") return cont(poplex, statement);
424 | return pass(maybeoperatorComma, expect(";"), poplex);
425 | }
426 | function property(type) {
427 | if (type == "variable") {cx.marked = "property"; return cont();}
428 | }
429 | function objprop(type, value) {
430 | if (type == "variable") {
431 | cx.marked = "property";
432 | if (value == "get" || value == "set") return cont(getterSetter);
433 | } else if (type == "number" || type == "string") {
434 | cx.marked = jsonldMode ? "property" : (type + " property");
435 | } else if (type == "[") {
436 | return cont(expression, expect("]"), afterprop);
437 | }
438 | if (atomicTypes.hasOwnProperty(type)) return cont(afterprop);
439 | }
440 | function getterSetter(type) {
441 | if (type != "variable") return pass(afterprop);
442 | cx.marked = "property";
443 | return cont(functiondef);
444 | }
445 | function afterprop(type) {
446 | if (type == ":") return cont(expressionNoComma);
447 | if (type == "(") return pass(functiondef);
448 | }
449 | function commasep(what, end) {
450 | function proceed(type) {
451 | if (type == ",") {
452 | var lex = cx.state.lexical;
453 | if (lex.info == "call") lex.pos = (lex.pos || 0) + 1;
454 | return cont(what, proceed);
455 | }
456 | if (type == end) return cont();
457 | return cont(expect(end));
458 | }
459 | return function(type) {
460 | if (type == end) return cont();
461 | return pass(what, proceed);
462 | };
463 | }
464 | function contCommasep(what, end, info) {
465 | for (var i = 3; i < arguments.length; i++)
466 | cx.cc.push(arguments[i]);
467 | return cont(pushlex(end, info), commasep(what, end), poplex);
468 | }
469 | function block(type) {
470 | if (type == "}") return cont();
471 | return pass(statement, block);
472 | }
473 | function maybetype(type) {
474 | if (isTS && type == ":") return cont(typedef);
475 | }
476 | function typedef(type) {
477 | if (type == "variable"){cx.marked = "variable-3"; return cont();}
478 | }
479 | function vardef() {
480 | return pass(pattern, maybetype, maybeAssign, vardefCont);
481 | }
482 | function pattern(type, value) {
483 | if (type == "variable") { register(value); return cont(); }
484 | if (type == "[") return contCommasep(pattern, "]");
485 | if (type == "{") return contCommasep(proppattern, "}");
486 | }
487 | function proppattern(type, value) {
488 | if (type == "variable" && !cx.stream.match(/^\s*:/, false)) {
489 | register(value);
490 | return cont(maybeAssign);
491 | }
492 | if (type == "variable") cx.marked = "property";
493 | return cont(expect(":"), pattern, maybeAssign);
494 | }
495 | function maybeAssign(_type, value) {
496 | if (value == "=") return cont(expressionNoComma);
497 | }
498 | function vardefCont(type) {
499 | if (type == ",") return cont(vardef);
500 | }
501 | function maybeelse(type, value) {
502 | if (type == "keyword b" && value == "else") return cont(pushlex("form", "else"), statement, poplex);
503 | }
504 | function forspec(type) {
505 | if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex);
506 | }
507 | function forspec1(type) {
508 | if (type == "var") return cont(vardef, expect(";"), forspec2);
509 | if (type == ";") return cont(forspec2);
510 | if (type == "variable") return cont(formaybeinof);
511 | return pass(expression, expect(";"), forspec2);
512 | }
513 | function formaybeinof(_type, value) {
514 | if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
515 | return cont(maybeoperatorComma, forspec2);
516 | }
517 | function forspec2(type, value) {
518 | if (type == ";") return cont(forspec3);
519 | if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); }
520 | return pass(expression, expect(";"), forspec3);
521 | }
522 | function forspec3(type) {
523 | if (type != ")") cont(expression);
524 | }
525 | function functiondef(type, value) {
526 | if (value == "*") {cx.marked = "keyword"; return cont(functiondef);}
527 | if (type == "variable") {register(value); return cont(functiondef);}
528 | if (type == "(") return cont(pushcontext, pushlex(")"), commasep(funarg, ")"), poplex, statement, popcontext);
529 | }
530 | function funarg(type) {
531 | if (type == "spread") return cont(funarg);
532 | return pass(pattern, maybetype);
533 | }
534 | function className(type, value) {
535 | if (type == "variable") {register(value); return cont(classNameAfter);}
536 | }
537 | function classNameAfter(_type, value) {
538 | if (value == "extends") return cont(expression);
539 | }
540 | function objlit(type) {
541 | if (type == "{") return contCommasep(objprop, "}");
542 | }
543 | function afterModule(type, value) {
544 | if (type == "string") return cont(statement);
545 | if (type == "variable") { register(value); return cont(maybeFrom); }
546 | }
547 | function afterExport(_type, value) {
548 | if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); }
549 | if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); }
550 | return pass(statement);
551 | }
552 | function afterImport(type) {
553 | if (type == "string") return cont();
554 | return pass(importSpec, maybeFrom);
555 | }
556 | function importSpec(type, value) {
557 | if (type == "{") return contCommasep(importSpec, "}");
558 | if (type == "variable") register(value);
559 | return cont();
560 | }
561 | function maybeFrom(_type, value) {
562 | if (value == "from") { cx.marked = "keyword"; return cont(expression); }
563 | }
564 | function arrayLiteral(type) {
565 | if (type == "]") return cont();
566 | return pass(expressionNoComma, maybeArrayComprehension);
567 | }
568 | function maybeArrayComprehension(type) {
569 | if (type == "for") return pass(comprehension, expect("]"));
570 | if (type == ",") return cont(commasep(expressionNoComma, "]"));
571 | return pass(commasep(expressionNoComma, "]"));
572 | }
573 | function comprehension(type) {
574 | if (type == "for") return cont(forspec, comprehension);
575 | if (type == "if") return cont(expression, comprehension);
576 | }
577 |
578 | // Interface
579 |
580 | return {
581 | startState: function(basecolumn) {
582 | var state = {
583 | tokenize: tokenBase,
584 | lastType: "sof",
585 | cc: [],
586 | lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
587 | localVars: parserConfig.localVars,
588 | context: parserConfig.localVars && {vars: parserConfig.localVars},
589 | indented: 0
590 | };
591 | if (parserConfig.globalVars && typeof parserConfig.globalVars == "object")
592 | state.globalVars = parserConfig.globalVars;
593 | return state;
594 | },
595 |
596 | token: function(stream, state) {
597 | if (stream.sol()) {
598 | if (!state.lexical.hasOwnProperty("align"))
599 | state.lexical.align = false;
600 | state.indented = stream.indentation();
601 | findFatArrow(stream, state);
602 | }
603 | if (state.tokenize != tokenComment && stream.eatSpace()) return null;
604 | var style = state.tokenize(stream, state);
605 | if (type == "comment") return style;
606 | state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type;
607 | return parseJS(state, style, type, content, stream);
608 | },
609 |
610 | indent: function(state, textAfter) {
611 | if (state.tokenize == tokenComment) return CodeMirror.Pass;
612 | if (state.tokenize != tokenBase) return 0;
613 | var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
614 | // Kludge to prevent 'maybelse' from blocking lexical scope pops
615 | if (!/^\s*else\b/.test(textAfter)) for (var i = state.cc.length - 1; i >= 0; --i) {
616 | var c = state.cc[i];
617 | if (c == poplex) lexical = lexical.prev;
618 | else if (c != maybeelse) break;
619 | }
620 | if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
621 | if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat")
622 | lexical = lexical.prev;
623 | var type = lexical.type, closing = firstChar == type;
624 |
625 | if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0);
626 | else if (type == "form" && firstChar == "{") return lexical.indented;
627 | else if (type == "form") return lexical.indented + indentUnit;
628 | else if (type == "stat")
629 | return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0);
630 | else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false)
631 | return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
632 | else if (lexical.align) return lexical.column + (closing ? 0 : 1);
633 | else return lexical.indented + (closing ? 0 : indentUnit);
634 | },
635 |
636 | electricChars: ":{}",
637 | blockCommentStart: jsonMode ? null : "/*",
638 | blockCommentEnd: jsonMode ? null : "*/",
639 | lineComment: jsonMode ? null : "//",
640 | fold: "brace",
641 |
642 | helperType: jsonMode ? "json" : "javascript",
643 | jsonldMode: jsonldMode,
644 | jsonMode: jsonMode
645 | };
646 | });
647 |
648 | CodeMirror.defineMIME("text/javascript", "javascript");
649 | CodeMirror.defineMIME("text/ecmascript", "javascript");
650 | CodeMirror.defineMIME("application/javascript", "javascript");
651 | CodeMirror.defineMIME("application/ecmascript", "javascript");
652 | CodeMirror.defineMIME("application/json", {name: "javascript", json: true});
653 | CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true});
654 | CodeMirror.defineMIME("application/ld+json", {name: "javascript", jsonld: true});
655 | CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true });
656 | CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true });
657 |
658 | });
659 |
--------------------------------------------------------------------------------
/public/javascripts/codemirror/mode/javascript/json-ld.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: JSON-LD mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |

16 |
17 |
22 |
26 |
27 |
28 |
29 | JSON-LD mode
30 |
31 |
32 |
61 |
62 |
70 |
71 | This is a specialization of the JavaScript mode.
72 |
73 |
--------------------------------------------------------------------------------
/public/javascripts/codemirror/mode/javascript/test.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var mode = CodeMirror.getMode({indentUnit: 2}, "javascript");
3 | function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); }
4 |
5 | MT("locals",
6 | "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }");
7 |
8 | MT("comma-and-binop",
9 | "[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }");
10 |
11 | MT("destructuring",
12 | "([keyword function]([def a], [[[def b], [def c] ]]) {",
13 | " [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);",
14 | " [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];",
15 | "})();");
16 |
17 | MT("class",
18 | "[keyword class] [variable Point] [keyword extends] [variable SuperThing] {",
19 | " [[ [string-2 /expr/] ]]: [number 24],",
20 | " [property constructor]([def x], [def y]) {",
21 | " [keyword super]([string 'something']);",
22 | " [keyword this].[property x] [operator =] [variable-2 x];",
23 | " }",
24 | "}");
25 |
26 | MT("module",
27 | "[keyword module] [string 'foo'] {",
28 | " [keyword export] [keyword let] [def x] [operator =] [number 42];",
29 | " [keyword export] [keyword *] [keyword from] [string 'somewhere'];",
30 | "}");
31 |
32 | MT("import",
33 | "[keyword function] [variable foo]() {",
34 | " [keyword import] [def $] [keyword from] [string 'jquery'];",
35 | " [keyword module] [def crypto] [keyword from] [string 'crypto'];",
36 | " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];",
37 | "}");
38 |
39 | MT("const",
40 | "[keyword function] [variable f]() {",
41 | " [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];",
42 | "}");
43 |
44 | MT("for/of",
45 | "[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}");
46 |
47 | MT("generator",
48 | "[keyword function*] [variable repeat]([def n]) {",
49 | " [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])",
50 | " [keyword yield] [variable-2 i];",
51 | "}");
52 |
53 | MT("fatArrow",
54 | "[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);",
55 | "[variable a];", // No longer in scope
56 | "[keyword let] [variable f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];",
57 | "[variable c];");
58 |
59 | MT("spread",
60 | "[keyword function] [variable f]([def a], [meta ...][def b]) {",
61 | " [variable something]([variable-2 a], [meta ...][variable-2 b]);",
62 | "}");
63 |
64 | MT("comprehension",
65 | "[keyword function] [variable f]() {",
66 | " [[([variable x] [operator +] [number 1]) [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];",
67 | " ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] [operator ===] [string 'blue']));",
68 | "}");
69 |
70 | MT("quasi",
71 | "[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
72 |
73 | MT("quasi_no_function",
74 | "[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]");
75 |
76 | MT("indent_statement",
77 | "[keyword var] [variable x] [operator =] [number 10]",
78 | "[variable x] [operator +=] [variable y] [operator +]",
79 | " [atom Infinity]",
80 | "[keyword debugger];");
81 |
82 | MT("indent_if",
83 | "[keyword if] ([number 1])",
84 | " [keyword break];",
85 | "[keyword else] [keyword if] ([number 2])",
86 | " [keyword continue];",
87 | "[keyword else]",
88 | " [number 10];",
89 | "[keyword if] ([number 1]) {",
90 | " [keyword break];",
91 | "} [keyword else] [keyword if] ([number 2]) {",
92 | " [keyword continue];",
93 | "} [keyword else] {",
94 | " [number 10];",
95 | "}");
96 |
97 | MT("indent_for",
98 | "[keyword for] ([keyword var] [variable i] [operator =] [number 0];",
99 | " [variable i] [operator <] [number 100];",
100 | " [variable i][operator ++])",
101 | " [variable doSomething]([variable i]);",
102 | "[keyword debugger];");
103 |
104 | MT("indent_c_style",
105 | "[keyword function] [variable foo]()",
106 | "{",
107 | " [keyword debugger];",
108 | "}");
109 |
110 | MT("indent_else",
111 | "[keyword for] (;;)",
112 | " [keyword if] ([variable foo])",
113 | " [keyword if] ([variable bar])",
114 | " [number 1];",
115 | " [keyword else]",
116 | " [number 2];",
117 | " [keyword else]",
118 | " [number 3];");
119 |
120 | MT("indent_below_if",
121 | "[keyword for] (;;)",
122 | " [keyword if] ([variable foo])",
123 | " [number 1];",
124 | "[number 2];");
125 |
126 | MT("multilinestring",
127 | "[keyword var] [variable x] [operator =] [string 'foo\\]",
128 | "[string bar'];");
129 |
130 | MT("scary_regexp",
131 | "[string-2 /foo[[/]]bar/];");
132 |
133 | var jsonld_mode = CodeMirror.getMode(
134 | {indentUnit: 2},
135 | {name: "javascript", jsonld: true}
136 | );
137 | function LD(name) {
138 | test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1));
139 | }
140 |
141 | LD("json_ld_keywords",
142 | '{',
143 | ' [meta "@context"]: {',
144 | ' [meta "@base"]: [string "http://example.com"],',
145 | ' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],',
146 | ' [property "likesFlavor"]: {',
147 | ' [meta "@container"]: [meta "@list"]',
148 | ' [meta "@reverse"]: [string "@beFavoriteOf"]',
149 | ' },',
150 | ' [property "nick"]: { [meta "@container"]: [meta "@set"] },',
151 | ' [property "nick"]: { [meta "@container"]: [meta "@index"] }',
152 | ' },',
153 | ' [meta "@graph"]: [[ {',
154 | ' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],',
155 | ' [property "name"]: [string "John Lennon"],',
156 | ' [property "modified"]: {',
157 | ' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],',
158 | ' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]',
159 | ' }',
160 | ' } ]]',
161 | '}');
162 |
163 | LD("json_ld_fake",
164 | '{',
165 | ' [property "@fake"]: [string "@fake"],',
166 | ' [property "@contextual"]: [string "@identifier"],',
167 | ' [property "user@domain.com"]: [string "@graphical"],',
168 | ' [property "@ID"]: [string "@@ID"]',
169 | '}');
170 | })();
171 |
--------------------------------------------------------------------------------
/public/javascripts/codemirror/mode/javascript/typescript.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | CodeMirror: TypeScript mode
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |

13 |
14 |
19 |
23 |
24 |
25 |
26 | TypeScript mode
27 |
28 |
29 |
51 |
52 |
59 |
60 | This is a specialization of the JavaScript mode.
61 |
62 |
--------------------------------------------------------------------------------
/public/javascripts/codemirror/theme/origami.css:
--------------------------------------------------------------------------------
1 | /* Port of TextMate's origami theme */
2 |
3 | .CodeMirror-scroll {
4 | background: #fff;
5 | border: 1px solid #DDD;
6 | -moz-border-radius: 4px;
7 | -webkit-border-radius: 4px;
8 | border-radius: 4px;
9 | margin-bottom: 20px;
10 | margin-right: 0px;
11 | }
12 |
13 | .CodeMirror-code {
14 | }
15 |
16 | .cm-s-origami {line-height: 1.8em; font-family: monospace; font-size: 13px;}
17 | .cm-s-origami.CodeMirror { background: #fff; color: #222; margin-bottom: 10px;}
18 | .cm-s-origami .CodeMirror-selected { background: #AFEEEE !important; }
19 | .cm-s-origami .CodeMirror-gutters { background: #0C1021; border-right: 0; }
20 | .cm-s-origami .CodeMirror-linenumber { color: #444; }
21 | .cm-s-origami .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; }
22 |
23 | .cm-s-origami .cm-keyword { color: #FBDE2D; }
24 | .cm-s-origami .cm-atom { color: #268bd2; }
25 | .cm-s-origami .cm-number { color: #cb4b16; }
26 | .cm-s-origami .cm-def { color: #8DA6CE; }
27 | .cm-s-origami .cm-variable { color: #FF6400; }
28 | .cm-s-origami .cm-operator { color: #FBDE2D;}
29 | .cm-s-origami .cm-comment { color: #AEAEAE; }
30 | .cm-s-origami .cm-string { color: #2aa198; }
31 | .cm-s-origami .cm-string-2 { color: #61CE3C; }
32 | .cm-s-origami .cm-meta { color: #D8FA3C; }
33 | .cm-s-origami .cm-builtin { color: #8DA6CE; }
34 | .cm-s-origami .cm-tag { color: #8DA6CE; }
35 | .cm-s-origami .cm-attribute { color: #8DA6CE; }
36 | .cm-s-origami .cm-header { color: #FF6400; }
37 | .cm-s-origami .cm-hr { color: #AEAEAE; }
38 | .cm-s-origami .cm-link { color: #8DA6CE; }
39 | .cm-s-origami .cm-error { background: #9D1E15; color: #F8F8F8; }
40 |
41 | .cm-s-origami .CodeMirror-activeline-background {background: #3C3636 !important;}
42 | .cm-s-origami .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important}
43 |
--------------------------------------------------------------------------------
/public/javascripts/mongri.js:
--------------------------------------------------------------------------------
1 | // paceOptions = {
2 | // document: false, // Checks for the existance of specific elements on the page
3 | // eventLag: false, // Checks the document readyState
4 | // startOnPageLoad: false
5 | // };
6 |
7 | function urlArg(key){
8 | var arg=null;
9 | var data=location.search.split("?");
10 | if (data.length <= 1){
11 | return null;
12 | }
13 | var data=data[1].split("&");
14 | for(i=0;ib;b++)if(b in this&&this[b]===a)return b;return-1};for(t={catchupTime:500,initialRate:.03,minTime:500,ghostTime:500,maxProgressPerFrame:10,easeFactor:1.25,startOnPageLoad:!0,restartOnPushState:!0,restartOnRequestAfter:500,target:"body",elements:{checkInterval:100,selectors:["body"]},eventLag:{minSamples:10,sampleCount:3,lagThreshold:3},ajax:{trackMethods:["GET"],trackWebSockets:!0,ignoreURLs:[]}},B=function(){var a;return null!=(a="undefined"!=typeof performance&&null!==performance?"function"==typeof performance.now?performance.now():void 0:void 0)?a:+new Date},D=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame,s=window.cancelAnimationFrame||window.mozCancelAnimationFrame,null==D&&(D=function(a){return setTimeout(a,50)},s=function(a){return clearTimeout(a)}),F=function(a){var b,c;return b=B(),(c=function(){var d;return d=B()-b,d>=33?(b=B(),a(d,function(){return D(c)})):setTimeout(c,33-d)})()},E=function(){var a,b,c;return c=arguments[0],b=arguments[1],a=3<=arguments.length?W.call(arguments,2):[],"function"==typeof c[b]?c[b].apply(c,a):c[b]},u=function(){var a,b,c,d,e,f,g;for(b=arguments[0],d=2<=arguments.length?W.call(arguments,1):[],f=0,g=d.length;g>f;f++)if(c=d[f])for(a in c)X.call(c,a)&&(e=c[a],null!=b[a]&&"object"==typeof b[a]&&null!=e&&"object"==typeof e?u(b[a],e):b[a]=e);return b},p=function(a){var b,c,d,e,f;for(c=b=0,e=0,f=a.length;f>e;e++)d=a[e],c+=Math.abs(d),b++;return c/b},w=function(a,b){var c,d,e;if(null==a&&(a="options"),null==b&&(b=!0),e=document.querySelector("[data-pace-"+a+"]")){if(c=e.getAttribute("data-pace-"+a),!b)return c;try{return JSON.parse(c)}catch(f){return d=f,"undefined"!=typeof console&&null!==console?console.error("Error parsing inline pace options",d):void 0}}},g=function(){function a(){}return a.prototype.on=function(a,b,c,d){var e;return null==d&&(d=!1),null==this.bindings&&(this.bindings={}),null==(e=this.bindings)[a]&&(e[a]=[]),this.bindings[a].push({handler:b,ctx:c,once:d})},a.prototype.once=function(a,b,c){return this.on(a,b,c,!0)},a.prototype.off=function(a,b){var c,d,e;if(null!=(null!=(d=this.bindings)?d[a]:void 0)){if(null==b)return delete this.bindings[a];for(c=0,e=[];cP;P++)J=T[P],C[J]===!0&&(C[J]=t[J]);i=function(a){function b(){return U=b.__super__.constructor.apply(this,arguments)}return Y(b,a),b}(Error),b=function(){function a(){this.progress=0}return a.prototype.getElement=function(){var a;if(null==this.el){if(a=document.querySelector(C.target),!a)throw new i;this.el=document.createElement("div"),this.el.className="pace pace-active",document.body.className=document.body.className.replace(/pace-done/g,""),document.body.className+=" pace-running",this.el.innerHTML='\n',null!=a.firstChild?a.insertBefore(this.el,a.firstChild):a.appendChild(this.el)}return this.el},a.prototype.finish=function(){var a;return a=this.getElement(),a.className=a.className.replace("pace-active",""),a.className+=" pace-inactive",document.body.className=document.body.className.replace("pace-running",""),document.body.className+=" pace-done"},a.prototype.update=function(a){return this.progress=a,this.render()},a.prototype.destroy=function(){try{this.getElement().parentNode.removeChild(this.getElement())}catch(a){i=a}return this.el=void 0},a.prototype.render=function(){var a,b;return null==document.querySelector(C.target)?!1:(a=this.getElement(),a.children[0].style.width=""+this.progress+"%",(!this.lastRenderedProgress||this.lastRenderedProgress|0!==this.progress|0)&&(a.children[0].setAttribute("data-progress-text",""+(0|this.progress)+"%"),this.progress>=100?b="99":(b=this.progress<10?"0":"",b+=0|this.progress),a.children[0].setAttribute("data-progress",""+b)),this.lastRenderedProgress=this.progress)},a.prototype.done=function(){return this.progress>=100},a}(),h=function(){function a(){this.bindings={}}return a.prototype.trigger=function(a,b){var c,d,e,f,g;if(null!=this.bindings[a]){for(f=this.bindings[a],g=[],d=0,e=f.length;e>d;d++)c=f[d],g.push(c.call(this,b));return g}},a.prototype.on=function(a,b){var c;return null==(c=this.bindings)[a]&&(c[a]=[]),this.bindings[a].push(b)},a}(),O=window.XMLHttpRequest,N=window.XDomainRequest,M=window.WebSocket,v=function(a,b){var c,d,e,f;f=[];for(d in b.prototype)try{e=b.prototype[d],null==a[d]&&"function"!=typeof e?f.push(a[d]=e):f.push(void 0)}catch(g){c=g}return f},z=[],Pace.ignore=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?W.call(arguments,1):[],z.unshift("ignore"),c=b.apply(null,a),z.shift(),c},Pace.track=function(){var a,b,c;return b=arguments[0],a=2<=arguments.length?W.call(arguments,1):[],z.unshift("track"),c=b.apply(null,a),z.shift(),c},I=function(a){var b;if(null==a&&(a="GET"),"track"===z[0])return"force";if(!z.length&&C.ajax){if("socket"===a&&C.ajax.trackWebSockets)return!0;if(b=a.toUpperCase(),Z.call(C.ajax.trackMethods,b)>=0)return!0}return!1},j=function(a){function b(){var a,c=this;b.__super__.constructor.apply(this,arguments),a=function(a){var b;return b=a.open,a.open=function(d,e){return I(d)&&c.trigger("request",{type:d,url:e,request:a}),b.apply(a,arguments)}},window.XMLHttpRequest=function(b){var c;return c=new O(b),a(c),c},v(window.XMLHttpRequest,O),null!=N&&(window.XDomainRequest=function(){var b;return b=new N,a(b),b},v(window.XDomainRequest,N)),null!=M&&C.ajax.trackWebSockets&&(window.WebSocket=function(a,b){var d;return d=null!=b?new M(a,b):new M(a),I("socket")&&c.trigger("request",{type:"socket",url:a,protocols:b,request:d}),d},v(window.WebSocket,M))}return Y(b,a),b}(h),Q=null,x=function(){return null==Q&&(Q=new j),Q},H=function(a){var b,c,d,e;for(e=C.ajax.ignoreURLs,c=0,d=e.length;d>c;c++)if(b=e[c],"string"==typeof b){if(-1!==a.indexOf(b))return!0}else if(b.test(a))return!0;return!1},x().on("request",function(b){var c,d,e,f,g;return f=b.type,e=b.request,g=b.url,H(g)?void 0:Pace.running||C.restartOnRequestAfter===!1&&"force"!==I(f)?void 0:(d=arguments,c=C.restartOnRequestAfter||0,"boolean"==typeof c&&(c=0),setTimeout(function(){var b,c,g,h,i,j;if(b="socket"===f?e.readyState<2:0<(h=e.readyState)&&4>h){for(Pace.restart(),i=Pace.sources,j=[],c=0,g=i.length;g>c;c++){if(J=i[c],J instanceof a){J.watch.apply(J,d);break}j.push(void 0)}return j}},c))}),a=function(){function a(){var a=this;this.elements=[],x().on("request",function(){return a.watch.apply(a,arguments)})}return a.prototype.watch=function(a){var b,c,d,e;return d=a.type,b=a.request,e=a.url,H(e)?void 0:(c="socket"===d?new m(b):new n(b),this.elements.push(c))},a}(),n=function(){function a(a){var b,c,d,e,f,g,h=this;if(this.progress=0,null!=window.ProgressEvent)for(c=null,a.addEventListener("progress",function(a){return h.progress=a.lengthComputable?100*a.loaded/a.total:h.progress+(100-h.progress)/2}),g=["load","abort","timeout","error"],d=0,e=g.length;e>d;d++)b=g[d],a.addEventListener(b,function(){return h.progress=100});else f=a.onreadystatechange,a.onreadystatechange=function(){var b;return 0===(b=a.readyState)||4===b?h.progress=100:3===a.readyState&&(h.progress=50),"function"==typeof f?f.apply(null,arguments):void 0}}return a}(),m=function(){function a(a){var b,c,d,e,f=this;for(this.progress=0,e=["error","open"],c=0,d=e.length;d>c;c++)b=e[c],a.addEventListener(b,function(){return f.progress=100})}return a}(),d=function(){function a(a){var b,c,d,f;for(null==a&&(a={}),this.elements=[],null==a.selectors&&(a.selectors=[]),f=a.selectors,c=0,d=f.length;d>c;c++)b=f[c],this.elements.push(new e(b))}return a}(),e=function(){function a(a){this.selector=a,this.progress=0,this.check()}return a.prototype.check=function(){var a=this;return document.querySelector(this.selector)?this.done():setTimeout(function(){return a.check()},C.elements.checkInterval)},a.prototype.done=function(){return this.progress=100},a}(),c=function(){function a(){var a,b,c=this;this.progress=null!=(b=this.states[document.readyState])?b:100,a=document.onreadystatechange,document.onreadystatechange=function(){return null!=c.states[document.readyState]&&(c.progress=c.states[document.readyState]),"function"==typeof a?a.apply(null,arguments):void 0}}return a.prototype.states={loading:0,interactive:50,complete:100},a}(),f=function(){function a(){var a,b,c,d,e,f=this;this.progress=0,a=0,e=[],d=0,c=B(),b=setInterval(function(){var g;return g=B()-c-50,c=B(),e.push(g),e.length>C.eventLag.sampleCount&&e.shift(),a=p(e),++d>=C.eventLag.minSamples&&a=100&&(this.done=!0),b===this.last?this.sinceLastUpdate+=a:(this.sinceLastUpdate&&(this.rate=(b-this.last)/this.sinceLastUpdate),this.catchup=(b-this.progress)/C.catchupTime,this.sinceLastUpdate=0,this.last=b),b>this.progress&&(this.progress+=this.catchup*a),c=1-Math.pow(this.progress/100,C.easeFactor),this.progress+=c*this.rate*a,this.progress=Math.min(this.lastProgress+C.maxProgressPerFrame,this.progress),this.progress=Math.max(0,this.progress),this.progress=Math.min(100,this.progress),this.lastProgress=this.progress,this.progress},a}(),K=null,G=null,q=null,L=null,o=null,r=null,Pace.running=!1,y=function(){return C.restartOnPushState?Pace.restart():void 0},null!=window.history.pushState&&(S=window.history.pushState,window.history.pushState=function(){return y(),S.apply(window.history,arguments)}),null!=window.history.replaceState&&(V=window.history.replaceState,window.history.replaceState=function(){return y(),V.apply(window.history,arguments)}),k={ajax:a,elements:d,document:c,eventLag:f},(A=function(){var a,c,d,e,f,g,h,i;for(Pace.sources=K=[],g=["ajax","elements","document","eventLag"],c=0,e=g.length;e>c;c++)a=g[c],C[a]!==!1&&K.push(new k[a](C[a]));for(i=null!=(h=C.extraSources)?h:[],d=0,f=i.length;f>d;d++)J=i[d],K.push(new J(C));return Pace.bar=q=new b,G=[],L=new l})(),Pace.stop=function(){return Pace.trigger("stop"),Pace.running=!1,q.destroy(),r=!0,null!=o&&("function"==typeof s&&s(o),o=null),A()},Pace.restart=function(){return Pace.trigger("restart"),Pace.stop(),Pace.start()},Pace.go=function(){var a;return Pace.running=!0,q.render(),a=B(),r=!1,o=F(function(b,c){var d,e,f,g,h,i,j,k,m,n,o,p,s,t,u,v;for(k=100-q.progress,e=o=0,f=!0,i=p=0,t=K.length;t>p;i=++p)for(J=K[i],n=null!=G[i]?G[i]:G[i]=[],h=null!=(v=J.elements)?v:[J],j=s=0,u=h.length;u>s;j=++s)g=h[j],m=null!=n[j]?n[j]:n[j]=new l(g),f&=m.done,m.done||(e++,o+=m.tick(b));return d=o/e,q.update(L.tick(b,d)),q.done()||f||r?(q.update(100),Pace.trigger("done"),setTimeout(function(){return q.finish(),Pace.running=!1,Pace.trigger("hide")},Math.max(C.ghostTime,Math.max(C.minTime-(B()-a),0)))):c()})},Pace.start=function(a){u(C,a),Pace.running=!0;try{q.render()}catch(b){i=b}return document.querySelector(".pace")?(Pace.trigger("start"),Pace.go()):setTimeout(Pace.start,50)},"function"==typeof define&&define.amd?define(function(){return Pace}):"object"==typeof exports?module.exports=Pace:C.startOnPageLoad&&Pace.start()}).call(this);
--------------------------------------------------------------------------------
/public/stylesheets/codemirror.css:
--------------------------------------------------------------------------------
1 | /* BASICS */
2 |
3 | .CodeMirror {
4 | /* Set height, width, borders, and global font properties here */
5 | font-family: monospace;
6 | height: 300px;
7 | }
8 | .CodeMirror-scroll {
9 | /* Set scrolling behaviour here */
10 | overflow: auto;
11 | }
12 |
13 | /* PADDING */
14 |
15 | .CodeMirror-lines {
16 | padding: 4px 0; /* Vertical padding around content */
17 | }
18 | .CodeMirror pre {
19 | padding: 0 4px; /* Horizontal padding of content */
20 | }
21 |
22 | .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
23 | background-color: white; /* The little square between H and V scrollbars */
24 | }
25 |
26 | /* GUTTER */
27 |
28 | .CodeMirror-gutters {
29 | border-right: 1px solid #ddd;
30 | background-color: #f7f7f7;
31 | white-space: nowrap;
32 | }
33 | .CodeMirror-linenumbers {}
34 | .CodeMirror-linenumber {
35 | padding: 0 3px 0 5px;
36 | min-width: 20px;
37 | text-align: right;
38 | color: #999;
39 | -moz-box-sizing: content-box;
40 | box-sizing: content-box;
41 | }
42 |
43 | /* CURSOR */
44 |
45 | .CodeMirror div.CodeMirror-cursor {
46 | border-left: 1px solid black;
47 | }
48 | /* Shown when moving in bi-directional text */
49 | .CodeMirror div.CodeMirror-secondarycursor {
50 | border-left: 1px solid silver;
51 | }
52 | .CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor {
53 | width: auto;
54 | border: 0;
55 | background: #7e7;
56 | }
57 | /* Can style cursor different in overwrite (non-insert) mode */
58 | div.CodeMirror-overwrite div.CodeMirror-cursor {}
59 |
60 | .cm-tab { display: inline-block; }
61 |
62 | .CodeMirror-ruler {
63 | border-left: 1px solid #ccc;
64 | position: absolute;
65 | }
66 |
67 | /* DEFAULT THEME */
68 |
69 | .cm-s-default .cm-keyword {color: #708;}
70 | .cm-s-default .cm-atom {color: #219;}
71 | .cm-s-default .cm-number {color: #164;}
72 | .cm-s-default .cm-def {color: #00f;}
73 | .cm-s-default .cm-variable,
74 | .cm-s-default .cm-punctuation,
75 | .cm-s-default .cm-property,
76 | .cm-s-default .cm-operator {}
77 | .cm-s-default .cm-variable-2 {color: #05a;}
78 | .cm-s-default .cm-variable-3 {color: #085;}
79 | .cm-s-default .cm-comment {color: #a50;}
80 | .cm-s-default .cm-string {color: #a11;}
81 | .cm-s-default .cm-string-2 {color: #f50;}
82 | .cm-s-default .cm-meta {color: #555;}
83 | .cm-s-default .cm-qualifier {color: #555;}
84 | .cm-s-default .cm-builtin {color: #30a;}
85 | .cm-s-default .cm-bracket {color: #997;}
86 | .cm-s-default .cm-tag {color: #170;}
87 | .cm-s-default .cm-attribute {color: #00c;}
88 | .cm-s-default .cm-header {color: blue;}
89 | .cm-s-default .cm-quote {color: #090;}
90 | .cm-s-default .cm-hr {color: #999;}
91 | .cm-s-default .cm-link {color: #00c;}
92 |
93 | .cm-negative {color: #d44;}
94 | .cm-positive {color: #292;}
95 | .cm-header, .cm-strong {font-weight: bold;}
96 | .cm-em {font-style: italic;}
97 | .cm-link {text-decoration: underline;}
98 |
99 | .cm-s-default .cm-error {color: #f00;}
100 | .cm-invalidchar {color: #f00;}
101 |
102 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;}
103 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
104 | .CodeMirror-activeline-background {background: #e8f2ff;}
105 |
106 | /* STOP */
107 |
108 | /* The rest of this file contains styles related to the mechanics of
109 | the editor. You probably shouldn't touch them. */
110 |
111 | .CodeMirror {
112 | line-height: 1;
113 | position: relative;
114 | overflow: hidden;
115 | background: white;
116 | color: black;
117 | }
118 |
119 | .CodeMirror-scroll {
120 | /* 30px is the magic margin used to hide the element's real scrollbars */
121 | /* See overflow: hidden in .CodeMirror */
122 | margin-bottom: -30px; margin-right: -30px;
123 | padding-bottom: 30px;
124 | height: 100%;
125 | outline: none; /* Prevent dragging from highlighting the element */
126 | position: relative;
127 | -moz-box-sizing: content-box;
128 | box-sizing: content-box;
129 | }
130 | .CodeMirror-sizer {
131 | position: relative;
132 | border-right: 30px solid transparent;
133 | -moz-box-sizing: content-box;
134 | box-sizing: content-box;
135 | }
136 |
137 | /* The fake, visible scrollbars. Used to force redraw during scrolling
138 | before actuall scrolling happens, thus preventing shaking and
139 | flickering artifacts. */
140 | .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler {
141 | position: absolute;
142 | z-index: 6;
143 | display: none;
144 | }
145 | .CodeMirror-vscrollbar {
146 | right: 0; top: 0;
147 | overflow-x: hidden;
148 | overflow-y: scroll;
149 | }
150 | .CodeMirror-hscrollbar {
151 | bottom: 0; left: 0;
152 | overflow-y: hidden;
153 | overflow-x: scroll;
154 | }
155 | .CodeMirror-scrollbar-filler {
156 | right: 0; bottom: 0;
157 | }
158 | .CodeMirror-gutter-filler {
159 | left: 0; bottom: 0;
160 | }
161 |
162 | .CodeMirror-gutters {
163 | position: absolute; left: 0; top: 0;
164 | padding-bottom: 30px;
165 | z-index: 3;
166 | }
167 | .CodeMirror-gutter {
168 | white-space: normal;
169 | height: 100%;
170 | -moz-box-sizing: content-box;
171 | box-sizing: content-box;
172 | padding-bottom: 30px;
173 | margin-bottom: -32px;
174 | display: inline-block;
175 | /* Hack to make IE7 behave */
176 | *zoom:1;
177 | *display:inline;
178 | }
179 | .CodeMirror-gutter-elt {
180 | position: absolute;
181 | cursor: default;
182 | z-index: 4;
183 | }
184 |
185 | .CodeMirror-lines {
186 | cursor: text;
187 | }
188 | .CodeMirror pre {
189 | /* Reset some styles that the rest of the page might have set */
190 | -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0;
191 | border-width: 0;
192 | background: transparent;
193 | font-family: inherit;
194 | font-size: inherit;
195 | margin: 0;
196 | white-space: pre;
197 | word-wrap: normal;
198 | line-height: inherit;
199 | color: inherit;
200 | z-index: 2;
201 | position: relative;
202 | overflow: visible;
203 | }
204 | .CodeMirror-wrap pre {
205 | word-wrap: break-word;
206 | white-space: pre-wrap;
207 | word-break: normal;
208 | }
209 |
210 | .CodeMirror-linebackground {
211 | position: absolute;
212 | left: 0; right: 0; top: 0; bottom: 0;
213 | z-index: 0;
214 | }
215 |
216 | .CodeMirror-linewidget {
217 | position: relative;
218 | z-index: 2;
219 | overflow: auto;
220 | }
221 |
222 | .CodeMirror-widget {}
223 |
224 | .CodeMirror-wrap .CodeMirror-scroll {
225 | overflow-x: hidden;
226 | }
227 |
228 | .CodeMirror-measure {
229 | position: absolute;
230 | width: 100%;
231 | height: 0;
232 | overflow: hidden;
233 | visibility: hidden;
234 | }
235 | .CodeMirror-measure pre { position: static; }
236 |
237 | .CodeMirror div.CodeMirror-cursor {
238 | position: absolute;
239 | border-right: none;
240 | width: 0;
241 | }
242 |
243 | div.CodeMirror-cursors {
244 | visibility: hidden;
245 | position: relative;
246 | z-index: 1;
247 | }
248 | .CodeMirror-focused div.CodeMirror-cursors {
249 | visibility: visible;
250 | }
251 |
252 | .CodeMirror-selected { background: #d9d9d9; }
253 | .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; }
254 | .CodeMirror-crosshair { cursor: crosshair; }
255 |
256 | .cm-searching {
257 | background: #ffa;
258 | background: rgba(255, 255, 0, .4);
259 | }
260 |
261 | /* IE7 hack to prevent it from returning funny offsetTops on the spans */
262 | .CodeMirror span { *vertical-align: text-bottom; }
263 |
264 | /* Used to force a border model for a node */
265 | .cm-force-border { padding-right: .1px; }
266 |
267 | @media print {
268 | /* Hide the cursor when printing */
269 | .CodeMirror div.CodeMirror-cursors {
270 | visibility: hidden;
271 | }
272 | }
273 |
--------------------------------------------------------------------------------
/public/stylesheets/pace.atom.css:
--------------------------------------------------------------------------------
1 | .pace.pace-inactive {
2 | display: none;
3 | }
4 |
5 | .pace {
6 | -webkit-pointer-events: none;
7 | pointer-events: none;
8 |
9 | -webkit-user-select: none;
10 | -moz-user-select: none;
11 | user-select: none;
12 |
13 | z-index: 2000;
14 | position: fixed;
15 | height: 60px;
16 | width: 100px;
17 | margin: auto;
18 | top: 0;
19 | left: 0;
20 | right: 0;
21 | bottom: 0;
22 | }
23 |
24 | .pace .pace-progress {
25 | z-index: 2000;
26 | position: absolute;
27 | height: 60px;
28 | width: 100px !important;
29 | }
30 |
31 | .pace .pace-progress:before {
32 | content: attr(data-progress-text);
33 | text-align: center;
34 | color: #fff;
35 | background: #29d;
36 | border-radius: 50%;
37 | font-family: "Helvetica Neue", sans-serif;
38 | font-size: 14px;
39 | font-weight: 100;
40 | line-height: 1;
41 | padding: 20% 0 7px;
42 | width: 50%;
43 | height: 40%;
44 | margin: 10px 0 0 30px;
45 | display: block;
46 | z-index: 999;
47 | position: absolute;
48 | }
49 |
50 | .pace .pace-progress:after {
51 | border-radius: 50%;
52 | border: 5px solid #29d;
53 | content: ' ';
54 | display: block;
55 | position: absolute;
56 | top: 0;
57 | left: 0;
58 | height: 60px;
59 | width: 100px;
60 |
61 | -webkit-transform: rotate(90deg);
62 | -moz-transform: rotate(90deg);
63 | -o-transform: rotate(90deg);
64 | transform: rotate(90deg);
65 | -webkit-animation: spin-3 2s linear infinite;
66 | -moz-animation: spin-3 2s linear infinite;
67 | -o-animation: spin-3 2s linear infinite;
68 | animation: spin-3 2s linear infinite;
69 | }
70 |
71 | .pace .pace-activity {
72 | font-size: 15px;
73 | line-height: 1;
74 | z-index: 2000;
75 | position: absolute;
76 | height: 60px;
77 | width: 100px;
78 |
79 | display: block;
80 | }
81 |
82 | .pace .pace-activity:before {
83 | border-radius: 50%;
84 | border: 5px solid #29d;
85 | content: ' ';
86 | display: block;
87 | position: absolute;
88 | top: 0;
89 | left: 0;
90 | height: 60px;
91 | width: 100px;
92 |
93 | -webkit-animation: spin-1 2s linear infinite;
94 | -moz-animation: spin-1 2s linear infinite;
95 | -o-animation: spin-1 2s linear infinite;
96 | animation: spin-1 2s linear infinite;
97 | }
98 |
99 | .pace .pace-activity:after{
100 | border-radius: 50%;
101 | border: 5px solid #29d;
102 | content: ' ';
103 | display: block;
104 | position: absolute;
105 | top: 0;
106 | left: 0;
107 | height: 60px;
108 | width: 100px;
109 |
110 | -webkit-transform: rotate(45deg);
111 | -moz-transform: rotate(45deg);
112 | -o-transform: rotate(45deg);
113 | transform: rotate(45deg);
114 | -webkit-animation: spin-2 2s linear infinite;
115 | -moz-animation: spin-2 2s linear infinite;
116 | -o-animation: spin-2 2s linear infinite;
117 | animation: spin-2 2s linear infinite;
118 | }
119 |
120 | @-webkit-keyframes spin-1 {
121 | 0% { -webkit-transform: rotate(0deg); }
122 | 100%{ -webkit-transform: rotate(359deg);}
123 | }
124 | @-moz-keyframes spin-1 {
125 | 0% { -moz-transform: rotate(0deg); }
126 | 100%{ -moz-transform: rotate(359deg);}
127 | }
128 | @-o-keyframes spin-1 {
129 | 0% { -o-transform: rotate(0deg); }
130 | 100%{ -o-transform: rotate(359deg);}
131 | }
132 | @keyframes spin-1 {
133 | 0% { transform: rotate(0deg); }
134 | 100%{ transform: rotate(359deg);}
135 | }
136 |
137 | @-webkit-keyframes spin-2 {
138 | 0% { -webkit-transform: rotate(59.8deg); }
139 | 100%{ -webkit-transform: rotate(418.8deg);}
140 | }
141 | @-moz-keyframes spin-2 {
142 | 0% { -moz-transform: rotate(59.8deg); }
143 | 100%{ -moz-transform: rotate(418.8deg);}
144 | }
145 | @-o-keyframes spin-2 {
146 | 0% { -o-transform: rotate(59.8deg); }
147 | 100%{ -o-transform: rotate(418.8deg);}
148 | }
149 | @keyframes spin-2 {
150 | 0% { transform: rotate(59.8deg); }
151 | 100%{ transform: rotate(418.8deg);}
152 | }
153 |
154 | @-webkit-keyframes spin-3 {
155 | 0% { -webkit-transform: rotate(119.6deg); }
156 | 100%{ -webkit-transform: rotate(478.6deg);}
157 | }
158 | @-moz-keyframes spin-3 {
159 | 0% { -moz-transform: rotate(119.6deg); }
160 | 100%{ -moz-transform: rotate(478.6deg);}
161 | }
162 | @-o-keyframes spin-3 {
163 | 0% { -o-transform: rotate(119.6deg); }
164 | 100%{ -o-transform: rotate(478.6deg);}
165 | }
166 | @keyframes spin-3 {
167 | 0% { transform: rotate(119.6deg); }
168 | 100%{ transform: rotate(478.6deg);}
169 | }
--------------------------------------------------------------------------------
/public/stylesheets/pace.css:
--------------------------------------------------------------------------------
1 | .pace {
2 | -webkit-pointer-events: none;
3 | pointer-events: none;
4 | -webkit-user-select: none;
5 | -moz-user-select: none;
6 | user-select: none;
7 | }
8 |
9 | .pace-inactive {
10 | display: none;
11 | }
12 |
13 | .pace .pace-progress {
14 | /*background-color: #EE5C00;*/
15 | background-color: green;
16 | position: absolute;
17 | z-index: 100;
18 | top: 0;
19 | left: 0;
20 | height: 8px;
21 | overflow: hidden;
22 | pointer-events: none;
23 | opacity: 0.8;
24 | }
25 |
26 | .pace .pace-progress-inner {
27 | position: absolute;
28 | top: 0;
29 | left: 0;
30 | right: -32px;
31 | bottom: 0;
32 |
33 | background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.2)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.2)), color-stop(0.75, rgba(255, 255, 255, 0.2)), color-stop(0.75, transparent), to(transparent));
34 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
35 | background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
36 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
37 | background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
38 | -webkit-background-size: 32px 32px;
39 | -moz-background-size: 32px 32px;
40 | -o-background-size: 32px 32px;
41 | background-size: 32px 32px;
42 |
43 | -webkit-animation: pace-stripe-animation 500ms linear infinite;
44 | -moz-animation: pace-stripe-animation 500ms linear infinite;
45 | -ms-animation: pace-stripe-animation 500ms linear infinite;
46 | -o-animation: pace-stripe-animation 500ms linear infinite;
47 | animation: pace-stripe-animation 500ms linear infinite;
48 | }
49 |
50 |
51 | .pace .pace-activity {
52 | display: block;
53 | position: fixed;
54 | z-index: 2000;
55 | top: 15px;
56 | right: 15px;
57 | width: 14px;
58 | height: 14px;
59 | border: solid 2px transparent;
60 | border-top-color: #29d;
61 | border-left-color: #29d;
62 | border-radius: 10px;
63 | -webkit-animation: pace-spinner 400ms linear infinite;
64 | -moz-animation: pace-spinner 400ms linear infinite;
65 | -ms-animation: pace-spinner 400ms linear infinite;
66 | -o-animation: pace-spinner 400ms linear infinite;
67 | animation: pace-spinner 400ms linear infinite;
68 | }
69 |
70 |
71 | @-webkit-keyframes pace-stripe-animation {
72 | 0% { -webkit-transform: none; transform: none; }
73 | 100% { -webkit-transform: translate(-32px, 0); transform: translate(-32px, 0); }
74 | }
75 | @-moz-keyframes pace-stripe-animation {
76 | 0% { -moz-transform: none; transform: none; }
77 | 100% { -moz-transform: translate(-32px, 0); transform: translate(-32px, 0); }
78 | }
79 | @-o-keyframes pace-stripe-animation {
80 | 0% { -o-transform: none; transform: none; }
81 | 100% { -o-transform: translate(-32px, 0); transform: translate(-32px, 0); }
82 | }
83 | @-ms-keyframes pace-stripe-animation {
84 | 0% { -ms-transform: none; transform: none; }
85 | 100% { -ms-transform: translate(-32px, 0); transform: translate(-32px, 0); }
86 | }
87 | @keyframes pace-stripe-animation {
88 | 0% { transform: none; transform: none; }
89 | 100% { transform: translate(-32px, 0); transform: translate(-32px, 0); }
90 | }
91 |
92 | @-webkit-keyframes pace-spinner {
93 | 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
94 | 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
95 | }
96 | @-moz-keyframes pace-spinner {
97 | 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
98 | 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
99 | }
100 | @-o-keyframes pace-spinner {
101 | 0% { -o-transform: rotate(0deg); transform: rotate(0deg); }
102 | 100% { -o-transform: rotate(360deg); transform: rotate(360deg); }
103 | }
104 | @-ms-keyframes pace-spinner {
105 | 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); }
106 | 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); }
107 | }
108 | @keyframes pace-spinner {
109 | 0% { transform: rotate(0deg); transform: rotate(0deg); }
110 | 100% { transform: rotate(360deg); transform: rotate(360deg); }
111 | }
112 |
--------------------------------------------------------------------------------
/public/stylesheets/pace.flash.css:
--------------------------------------------------------------------------------
1 | .pace {
2 | -webkit-pointer-events: none;
3 | pointer-events: none;
4 | -webkit-user-select: none;
5 | -moz-user-select: none;
6 | user-select: none;
7 | }
8 |
9 | .pace-inactive {
10 | display: none;
11 | }
12 |
13 | .pace .pace-progress {
14 | background: #29d;
15 | position: fixed;
16 | z-index: 2000;
17 | top: 0;
18 | left: 0;
19 | height: 2px;
20 |
21 | -webkit-transition: width 1s;
22 | -moz-transition: width 1s;
23 | -o-transition: width 1s;
24 | transition: width 1s;
25 | }
26 |
27 | .pace .pace-progress-inner {
28 | display: block;
29 | position: absolute;
30 | right: 0px;
31 | width: 100px;
32 | height: 100%;
33 | box-shadow: 0 0 10px #29d, 0 0 5px #29d;
34 | opacity: 1.0;
35 | -webkit-transform: rotate(3deg) translate(0px, -4px);
36 | -moz-transform: rotate(3deg) translate(0px, -4px);
37 | -ms-transform: rotate(3deg) translate(0px, -4px);
38 | -o-transform: rotate(3deg) translate(0px, -4px);
39 | transform: rotate(3deg) translate(0px, -4px);
40 | }
41 |
42 | .pace .pace-activity {
43 | display: block;
44 | position: fixed;
45 | z-index: 2000;
46 | top: 15px;
47 | right: 15px;
48 | width: 14px;
49 | height: 14px;
50 | border: solid 2px transparent;
51 | border-top-color: #29d;
52 | border-left-color: #29d;
53 | border-radius: 10px;
54 | -webkit-animation: pace-spinner 400ms linear infinite;
55 | -moz-animation: pace-spinner 400ms linear infinite;
56 | -ms-animation: pace-spinner 400ms linear infinite;
57 | -o-animation: pace-spinner 400ms linear infinite;
58 | animation: pace-spinner 400ms linear infinite;
59 | }
60 |
61 | @-webkit-keyframes pace-spinner {
62 | 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
63 | 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
64 | }
65 | @-moz-keyframes pace-spinner {
66 | 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); }
67 | 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); }
68 | }
69 | @-o-keyframes pace-spinner {
70 | 0% { -o-transform: rotate(0deg); transform: rotate(0deg); }
71 | 100% { -o-transform: rotate(360deg); transform: rotate(360deg); }
72 | }
73 | @-ms-keyframes pace-spinner {
74 | 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); }
75 | 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); }
76 | }
77 | @keyframes pace-spinner {
78 | 0% { transform: rotate(0deg); transform: rotate(0deg); }
79 | 100% { transform: rotate(360deg); transform: rotate(360deg); }
80 | }
81 |
--------------------------------------------------------------------------------
/public/stylesheets/style.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin: 0px;
3 | padding: 0px;
4 | }
5 |
6 | body {
7 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
8 | }
9 |
10 | a {
11 | color: #00B7FF;
12 | }
13 |
14 | header {
15 | height: 50px;
16 | background: black;
17 | color: white;
18 | }
19 |
20 | header .logo {
21 | margin: 0 auto;
22 | font-size: 20px;
23 | text-align: center;
24 | padding-top: 15px;
25 | }
26 |
27 | footer {
28 | margin-top: 20px;
29 | margin-bottom: 20px;
30 | text-align: right;
31 | margin-right: 20px;
32 | }
33 |
34 | .content-left {
35 | float: left;
36 | width: 15%;
37 | background: white;
38 | padding: 10px;
39 | }
40 |
41 | .content-left h3{
42 | margin-top: 20px;
43 | margin-left: 10px;
44 | }
45 |
46 | .content-left h3 a{
47 | text-decoration:none;
48 | }
49 |
50 | .content-right {
51 | display: inline-block;
52 | padding: 10px;
53 | width: 75%;
54 | }
55 |
56 | h1.page-header{
57 | margin-top: 10px;
58 | margin-bottom: 10px;
59 | }
60 |
61 | h4.page-header{
62 | margin-top: 10px;
63 | margin-bottom: 10px;
64 | }
65 |
66 | .document{
67 | padding-top: 10px;
68 | padding-bottom: 10px;
69 | padding-left: 10px;
70 | padding-right: 10px;
71 | background: #EFEFEF;
72 | margin-bottom: 10px;
73 | border-radius: 10px;
74 | border-bottom: 1px solid #EEE;
75 | list-style: none;
76 | word-wrap: break-word;
77 | }
78 |
79 | .CodeMirror{
80 | height: auto !important;
81 | }
82 |
83 | ul.collections{
84 | border: 1px solid #DDD;
85 | list-style: none;
86 | line-height: 2.5em;
87 | border-radius: 5px;
88 | }
89 | ul.collections li{
90 | border-bottom: 1px solid #DDD;
91 | padding-left: 10px;
92 | }
93 | ul.collections a{
94 | display: block;
95 | text-decoration:none;
96 | color: #222;
97 | }
98 | ul.collections li:hover {
99 | background:#E0FFFF;
100 | }
101 |
102 | ul.documents{
103 | border: 1px solid #DDD;
104 | list-style: none;
105 | line-height: 1.5em;
106 | border-radius: 5px;
107 | margin-bottom: 20px;
108 | }
109 |
110 | ul.documents li{
111 | border-bottom: 1px solid #DDD;
112 | padding: 10px;
113 | max-height: 58px;
114 | overflow: hidden;
115 | }
116 | ul.documents a{
117 | display: block;
118 | text-decoration:none;
119 | font-size: 12px;
120 | color: #222;
121 | }
122 | ul.documents li:hover {
123 | background:#E0FFFF;
124 | }
125 | ul.collections span.count {
126 | float: right;
127 | margin-right: 10px;
128 | }
129 | .query{
130 | font-size: 20px;
131 | padding: 15px;
132 | background: black;
133 | color: #00c123;
134 | border-radius: 10px 10px 0 0;
135 | }
136 |
137 | #query{
138 | border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
139 | display: inline-block;
140 | margin: 0 .4em;
141 | padding: 0 .3em;
142 | position: relative;
143 | min-width: 3em;
144 | color: white;
145 | }
146 |
147 | #sort, #skip, #limit{
148 | border-bottom: 1px dashed rgba(255, 255, 255, 0.3);
149 | display: inline-block;
150 | margin: 0 .4em;
151 | position: relative;
152 | min-width: 1.0em;
153 | color: white;
154 | }
155 |
156 | [contentEditable=true]:focus {
157 | outline: none;
158 | }
159 |
160 | .buttons{
161 | box-shadow: rgba(255, 255, 255, 0.05) 0 1px inset;
162 | background: #363636;
163 | padding: .6em .7em;
164 | font-size: .75em;
165 | color: #999;
166 | border-top: 1px solid #1c1c1c;
167 | height: 30px;
168 | border-radius: 0 0 10px 10px;
169 | margin-bottom: 20px;
170 | }
171 |
172 | .button{
173 | text-shadow: #151515 0 1px 1px;
174 | margin-right: .6em;
175 | padding: .45em .8em;
176 | /* line-height: 1.2em; */
177 | /* font-size: 12px; */
178 | /* background: none; */
179 | -moz-border-radius: 0.4em;
180 | -webkit-border-radius: 0.4em;
181 | /* border-radius: 0.4em; */
182 | -moz-box-shadow: rgba(255, 255, 255, 0.08) 0 1px 0 inset, rgba(255, 255, 255, 0.08) 0 1px;
183 | /* -webkit-box-shadow: rgba(255, 255, 255, 0.08) 0 1px 0 inset, rgba(255, 255, 255, 0.08) 0 1px; */
184 | box-shadow: rgba(255, 255, 255, 0.08) 0 1px 0 inset, rgba(255, 255, 255, 0.08) 0 1px;
185 | /* border: 1px solid #292929; */
186 | color: inherit;
187 |
188 | padding: .45em 1em;
189 | margin-right: 0;
190 | color: #444;
191 | text-shadow: rgba(255, 255, 255, 0.3) 0 1px;
192 | -moz-transition: background-color 0.2s linear;
193 | -o-transition: background-color 0.2s linear;
194 | -webkit-transition: background-color 0.2s linear;
195 | transition: background-color 0.2s linear;
196 | background-image: -moz-linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
197 | background-image: -o-linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
198 | background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
199 | background-image: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.2));
200 | background-color: rgba(255, 255, 255, 0.7);
201 | }
202 |
203 | #run-button{
204 | float: right;
205 | }
206 |
207 | .right-button{
208 | float: right;
209 | }
210 |
211 | .danger-button{
212 | color: red;
213 | }
214 |
215 | .signin_with_google{
216 | margin: 50px;
217 | text-align: center;
218 | }
219 |
220 | .signin_with_google img{
221 | height: 50px;
222 | }
223 |
--------------------------------------------------------------------------------
/routes/collection.js:
--------------------------------------------------------------------------------
1 | var _ = require('lodash');
2 | var async = require('async');
3 | var mongoose = require('mongoose');
4 |
5 | exports.collections = function(req, res){
6 | mongoose.connection.db.listCollections().toArray(function(error, collectionNames) {
7 | if (error) {
8 | throw new Error(error);
9 | } else {
10 | collectionNames = _.reject(collectionNames, function(collectionName){
11 | return collectionName.name.match(/system\./) || collectionName.name.match(/-system/);
12 | });
13 | var names = collectionNames.map(function(collectionName){
14 | return collectionName.name.replace(mongoose.connection.db.databaseName+".","");
15 | });
16 | counts = []
17 | async.eachSeries(names, function(n, cb) {
18 | mongoose.connection.db.collection(n).count({},function(err, count) {
19 | counts.push(count);
20 | cb();
21 | });
22 | }, function(err) {
23 | res.render('collections', {
24 | title: 'Collections',
25 | db_name: mongoose.connection.db.databaseName,
26 | collections: names,
27 | counts: counts
28 | });
29 | });
30 | }
31 | });
32 | };
33 |
34 | exports.dropCollection = function(req, res) {
35 | var collectionName = req.params.collection;
36 | var collection = mongoose.connection.db.collection(collectionName);
37 | collection.drop(function(err) {
38 | res.redirect("/collections");
39 | });
40 | };
41 |
--------------------------------------------------------------------------------
/routes/document.js:
--------------------------------------------------------------------------------
1 | var _ = require('lodash');
2 | var mongoose = require('mongoose');
3 | var ObjectId = mongoose.Types.ObjectId;
4 |
5 | var bson = require('../lib/bson');
6 |
7 | exports.documents = function(req, res) {
8 | var document = req.params.document;
9 | var query = req.query.query;
10 | var sort = req.query.sort;
11 | var skip = req.query.skip;
12 | var limit = req.query.limit;
13 | if (!query){
14 | query='';
15 | } else {
16 | var token = query.split(":");
17 | if (token[0] == "_id"){
18 | if (!token[1].match(/ObjectId/)) {
19 | value = "ObjectId("+token[1]+")";
20 | query = "_id:" + value;
21 | }
22 | }
23 | }
24 | if (!sort){
25 | sort = "_id:-1";
26 | }
27 | if (!skip){
28 | skip = 0;
29 | }
30 | if (!limit){
31 | limit = 10;
32 | }
33 | sort = bson.toBSON("{"+sort+"}");
34 | query = bson.toBSON("{"+query+"}");
35 | col = mongoose.connection.db.collection(document);
36 | col.find({}).count(function(err, count){
37 | col.find(query, {skip:skip, limit:limit}).sort(sort).toArray(function(err, docs) {
38 | ids = _.map(docs, function(d){
39 | return d._id;
40 | });
41 | docs = _.map(docs, function(d){
42 | return bson.toString(d)
43 | });
44 | var hasNext = false;
45 | if (count > 10){
46 | hasNext = true;
47 | }
48 | var hasPrevious = false;
49 | if (skip != 0){
50 | hasPrevious = true;
51 | }
52 | res.render('documents', {
53 | title: document,
54 | db_name: mongoose.connection.db.databaseName,
55 | document: document,
56 | docs: docs,
57 | ids: ids,
58 | hasNext: hasNext,
59 | hasPrevious: hasPrevious
60 | });
61 | });
62 | });
63 | };
64 |
65 | exports.newDocument = function(req, res) {
66 | var document = req.params.document;
67 | var id = mongoose.Types.ObjectId();
68 | res.render('new_document', {
69 | title: document,
70 | db_name: mongoose.connection.db.databaseName,
71 | doc: bson.toString({_id:id}),
72 | document: document
73 | });
74 | };
75 |
76 | exports.postDocument = function(req, res) {
77 | var document = req.params.document;
78 | var doc = req.body.doc;
79 | var col = mongoose.connection.db.collection(document);
80 | try {
81 | docBSON = bson.toBSON(doc);
82 | } catch (err) {
83 | throw new Error(error);
84 | }
85 | col.insert(docBSON, function(err, docs) {
86 | if (err) {
87 | throw new Error(err);
88 | } else {
89 | var insertedId = docs.ops[0]._id;
90 | return res.redirect('/collections/' + document + '/' + insertedId)
91 | }
92 | });
93 | };
94 |
95 | exports.deleteDocument = function(req, res) {
96 | var document = req.params.document;
97 | var id = req.params.id;
98 | var col = mongoose.connection.db.collection(document);
99 | col.findAndModify({_id:ObjectId(id)}, [], null, {remove: true}, function(err, doc){
100 | if (err) {
101 | throw new Error(error);
102 | } else {
103 | res.redirect('/collections/'+document);
104 | }
105 | });
106 | };
107 |
108 | exports.document = function(req, res) {
109 | var document = req.params.document;
110 | var id = req.params.id;
111 | var col = mongoose.connection.db.collection(document);
112 | col.findOne({_id:ObjectId(id)}, function(err, doc) {
113 | if (err) {
114 | throw new Error(err);
115 | } else {
116 | res.render('document', {
117 | title: document,
118 | db_name: mongoose.connection.db.databaseName,
119 | document: document,
120 | doc: bson.toString(doc),
121 | document_id: id
122 | });
123 | }
124 | });
125 | };
126 |
127 | exports.documentUpdate = function(req, res) {
128 | var document = req.params.document;
129 | var id = req.params.id;
130 | var doc = req.body.doc;
131 | var col = mongoose.connection.db.collection(document);
132 | try {
133 | docBSON = bson.toBSON(doc);
134 | } catch (err) {
135 | throw new Error(err);
136 | }
137 | col.findAndModify({_id:ObjectId(id)}, [], docBSON, {new: true, upsert:true}, function(err, doc) {
138 | if (err) {
139 | throw new Error(err);
140 | } else {
141 | res.render('document', {
142 | title: document,
143 | db_name: mongoose.connection.db.databaseName,
144 | document: document,
145 | doc: bson.toString(doc.value),
146 | document_id: id
147 | });
148 | }
149 | });
150 | };
151 |
--------------------------------------------------------------------------------
/routes/index.js:
--------------------------------------------------------------------------------
1 |
2 | /*
3 | * GET home page.
4 | */
5 |
6 | exports.index = function(req, res){
7 | if (auth.google.enabled){
8 | if (req.isAuthenticated()){
9 | res.redirect("/collections");
10 | }else{
11 | res.render("index")
12 | }
13 | }else{
14 | res.redirect("/collections");
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/views/collections.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h1.page-header Collections
5 | ul.collections
6 | - for (var i in collections)
7 | li
8 | a(href=`/collections/${collections[i]}`) #{collections[i]}
9 | span.count #{counts[i]}
10 |
--------------------------------------------------------------------------------
/views/document.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h4.page-header
5 | a(href=`/collections/${document}`)= document
6 | | / #{document_id}
7 | div.main_content
8 | form(method='POST', action=`/collections/${document}/${document_id}`)
9 | input#action-method(type='hidden', name='_method', value='POST' )
10 | textarea#document(name='doc', style='display:none;')
11 | | #{doc}
12 | button#delete-button.left-button.danger-button.button Delete Document
13 | button#save-button.right-button.button Save Changes
14 | block js
15 | script(src='/javascripts/codemirror/mode/javascript/javascript.js')
16 | script.
17 | $(function () {
18 | CodeMirror.fromTextArea(document.getElementById('document'), {
19 | mode: "application/ld+json",
20 | theme: "origami",
21 | matchBrackets: true,
22 | autoCloseBrackets: true,
23 | lineWrapping: true,
24 | lineNumbers: false
25 | });
26 | $(document).on('click', '#delete-button', function(event) {
27 | var answer = confirm('Are you sure?');
28 | if (answer){
29 | $('#action-method').val('DELETE');
30 | this.submit();
31 | }else{
32 | return false;
33 | }
34 | });
35 | });
36 |
--------------------------------------------------------------------------------
/views/documents.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h1.page-header= document
5 | div.right-button
6 | if dropCollection === true
7 | button.button.danger-button(onclick=`dropCollection('${document}');`) Drop Collection
8 | |
9 | button.button(onclick=`location.href='/collections/${document}/new'`) Add Document
10 |
11 | div.main_content
12 | form(method='get', action=`/collections/${document}`, id="query_form")
13 | input#p-query(type='hidden', name='query', value='')
14 | input#p-sort(type='hidden', name='sort', value='')
15 | input#p-skip(type='hidden', name='skip', value='')
16 | input#p-limit(type='hidden', name='limit', value='')
17 | div.query
18 | | find({
19 | span#query(spellcheck="false" contenteditable="true" data-type="hash" data-name="query")
20 | | }).
21 | | sort(
22 | span#sort(spellcheck="false" contenteditable="true" data-type="hash" data-name="sort")
23 | | ).
24 | | skip(
25 | span#skip(spellcheck="false" contenteditable="true" data-type="hash" data-name="skip") 0
26 | | ).
27 | | limit(
28 | span#limit(spellcheck="false" contenteditable="true" data-type="hash" data-name="limit") 10
29 | |)
30 | input#name(type='hidden', value=document)
31 | div.buttons
32 | button#run-button.button Run
33 | ul.documents
34 | - for (var i in docs)
35 | li
36 | a(href=`/collections/${document}/${ids[i]}`) #{docs[i]}
37 | if hasPrevious === true
38 | button#previous-button.left-button.button Previous
39 | if hasNext === true
40 | button#next-button.right-button.button Next
41 | block js
42 | script.
43 | $(function () {
44 | function setParams(page){
45 | var query = $('#query').html();
46 | var sort = $('#sort').html();
47 | var skip = $('#skip').html();
48 | var limit = $('#limit').html();
49 | if (page === 'next'){
50 | skip = parseInt(skip) + parseInt(limit);
51 | }
52 | if (page === 'previous') {
53 | skip = parseInt(skip) - parseInt(limit);
54 | if (skip < 0){
55 | skip = 0;
56 | }
57 | }
58 | $('#p-query').val(query);
59 | $('#p-sort').val(sort);
60 | $('#p-skip').val(skip);
61 | $('#p-limit').val(limit);
62 | }
63 | $(window).load(function () {
64 | urlQuery = urlArg("query");
65 | urlSort = urlArg("sort");
66 | urlSkip = urlArg("skip");
67 | urlLimit = urlArg("limit");
68 | if (urlQuery != null) {
69 | $('#query').html(decodeURIComponent(urlQuery.replace(/\+/g, '%20')));
70 | }
71 | if (urlSort != null) {
72 | $('#sort').html(decodeURIComponent(urlSort.replace(/\+/g, '%20')));
73 | }
74 | if (urlSkip != null) {
75 | $('#skip').html(decodeURIComponent(urlSkip.replace(/\+/g, '%20')));
76 | }
77 | if (urlLimit != null) {
78 | $('#limit').html(decodeURIComponent(urlLimit.replace(/\+/g, '%20')));
79 | }
80 | });
81 | $(document).on('click', '#run-button', function(event) {
82 | setParams('');
83 | this.submit();
84 | });
85 | $(document).on('click', '#next-button', function(event) {
86 | setParams('next');
87 | this.submit();
88 | });
89 | $(document).on('click', '#previous-button', function(event) {
90 | setParams('previous');
91 | this.submit();
92 | });
93 | $('[contenteditable]').on('paste',function(e) {
94 | e.preventDefault();
95 | var text = (e.originalEvent || e).clipboardData.getData('text/plain') || prompt('Paste something..');
96 | document.execCommand('insertText', false, text);
97 | });
98 |
99 | $('#query_form').on('keydown', function(e) {
100 | if(e.keyCode == 13 && e.metaKey) {
101 | setParams('');
102 | this.submit();
103 | }
104 | });
105 |
106 | });
107 |
--------------------------------------------------------------------------------
/views/index.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= title
5 | link(rel='stylesheet', href='/stylesheets/style.css')
6 | body
7 | header
8 | div.logo
9 | | #{logoTitle}
10 | h1.signin_with_google
11 | a(href="/auth/google")
12 | img(src="/images/google.png")
13 | footer
14 | |
15 |
--------------------------------------------------------------------------------
/views/layout.pug:
--------------------------------------------------------------------------------
1 | doctype html
2 | html
3 | head
4 | title= title
5 | link(rel='stylesheet', href='/stylesheets/style.css')
6 | link(rel='stylesheet', href='/stylesheets/codemirror.css')
7 | link(rel='stylesheet', href='/javascripts/codemirror/theme/origami.css')
8 | link(rel='stylesheet', href='/stylesheets/pace.css')
9 | script(src='/javascripts/jquery-2.1.1.min.js')
10 | script(src='/javascripts/codemirror/codemirror.js')
11 | script(src='/javascripts/pace.min.js')
12 | script(src='/javascripts/mongri.js')
13 | body
14 | header
15 | div.logo
16 | | #{logoTitle}
17 | div.content-left
18 | h3
19 | a(href="/collections") #{db_name}
20 | if isAuthenticated
21 | h3
22 | a(href="/logout") logout
23 | div.content-right
24 | block content
25 | footer
26 | |
27 | block js
28 |
--------------------------------------------------------------------------------
/views/new_document.pug:
--------------------------------------------------------------------------------
1 | extends layout
2 |
3 | block content
4 | h4.page-header
5 | a(href=`/collections/${document}`)= document
6 | div.main_content
7 | form(method='post', action=`/collections/${document}/`)
8 | textarea#document(name='doc', style='display:none;')
9 | | #{doc}
10 | button#save-button.right-button.button Save Document
11 | block js
12 | script(src='/javascripts/codemirror/mode/javascript/javascript.js')
13 | script.
14 | $(function () {
15 | CodeMirror.fromTextArea(document.getElementById('document'), {
16 | mode: "application/ld+json",
17 | theme: "origami",
18 | matchBrackets: true,
19 | autoCloseBrackets: true,
20 | lineWrapping: true,
21 | lineNumbers: false
22 | });
23 | });
24 |
--------------------------------------------------------------------------------