Merge branch 'feature/public-api' into feature/sketch-collections
This commit is contained in:
commit
13c45490a2
16 changed files with 82 additions and 214 deletions
|
@ -498,7 +498,7 @@ class Nav extends React.PureComponent {
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<span className="nav__item-header">Help & Feedback</span>
|
<span className="nav__item-header">Help</span>
|
||||||
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
|
<InlineSVG className="nav__item-header-triangle" src={triangleUrl} />
|
||||||
</button>
|
</button>
|
||||||
<ul className="nav__dropdown">
|
<ul className="nav__dropdown">
|
||||||
|
@ -532,16 +532,6 @@ class Nav extends React.PureComponent {
|
||||||
About
|
About
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="nav__dropdown-item">
|
|
||||||
<Link
|
|
||||||
to="/feedback"
|
|
||||||
onFocus={this.handleFocusForHelp}
|
|
||||||
onBlur={this.handleBlur}
|
|
||||||
onClick={this.setDropdownForNone}
|
|
||||||
>
|
|
||||||
Feedback
|
|
||||||
</Link>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -281,7 +281,7 @@ exports[`Nav renders correctly 1`] = `
|
||||||
<span
|
<span
|
||||||
className="nav__item-header"
|
className="nav__item-header"
|
||||||
>
|
>
|
||||||
Help & Feedback
|
Help
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
className="isvg loading nav__item-header-triangle"
|
className="isvg loading nav__item-header-triangle"
|
||||||
|
@ -327,18 +327,6 @@ exports[`Nav renders correctly 1`] = `
|
||||||
About
|
About
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li
|
|
||||||
className="nav__dropdown-item"
|
|
||||||
>
|
|
||||||
<a
|
|
||||||
onBlur={[Function]}
|
|
||||||
onClick={[Function]}
|
|
||||||
onFocus={[Function]}
|
|
||||||
style={Object {}}
|
|
||||||
>
|
|
||||||
Feedback
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -124,9 +124,6 @@ export const HIDE_ERROR_MODAL = 'HIDE_ERROR_MODAL';
|
||||||
export const PERSIST_STATE = 'PERSIST_STATE';
|
export const PERSIST_STATE = 'PERSIST_STATE';
|
||||||
export const CLEAR_PERSISTED_STATE = 'CLEAR_PERSISTED_STATE';
|
export const CLEAR_PERSISTED_STATE = 'CLEAR_PERSISTED_STATE';
|
||||||
|
|
||||||
export const SHOW_HELP_MODAL = 'SHOW_HELP_MODAL';
|
|
||||||
export const HIDE_HELP_MODAL = 'HIDE_HELP_MODAL';
|
|
||||||
|
|
||||||
export const HIDE_RUNTIME_ERROR_WARNING = 'HIDE_RUNTIME_ERROR_WARNING';
|
export const HIDE_RUNTIME_ERROR_WARNING = 'HIDE_RUNTIME_ERROR_WARNING';
|
||||||
export const SHOW_RUNTIME_ERROR_WARNING = 'SHOW_RUNTIME_ERROR_WARNING';
|
export const SHOW_RUNTIME_ERROR_WARNING = 'SHOW_RUNTIME_ERROR_WARNING';
|
||||||
export const SET_ASSETS = 'SET_ASSETS';
|
export const SET_ASSETS = 'SET_ASSETS';
|
||||||
|
|
|
@ -232,19 +232,6 @@ export function hideErrorModal() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function showHelpModal(helpType) {
|
|
||||||
return {
|
|
||||||
type: ActionTypes.SHOW_HELP_MODAL,
|
|
||||||
helpType
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function hideHelpModal() {
|
|
||||||
return {
|
|
||||||
type: ActionTypes.HIDE_HELP_MODAL
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function hideRuntimeErrorWarning() {
|
export function hideRuntimeErrorWarning() {
|
||||||
return {
|
return {
|
||||||
type: ActionTypes.HIDE_RUNTIME_ERROR_WARNING
|
type: ActionTypes.HIDE_RUNTIME_ERROR_WARNING
|
||||||
|
|
|
@ -77,7 +77,7 @@ class Console extends React.Component {
|
||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={consoleClass} role="main" title="console">
|
<div className={consoleClass} role="main">
|
||||||
<div className="preview-console__header">
|
<div className="preview-console__header">
|
||||||
<h2 className="preview-console__header-title">Console</h2>
|
<h2 className="preview-console__header-title">Console</h2>
|
||||||
<div className="preview-console__header-buttons">
|
<div className="preview-console__header-buttons">
|
||||||
|
|
|
@ -70,7 +70,6 @@ class CopyableInput extends React.Component {
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
href={value}
|
href={value}
|
||||||
className="copyable-input__preview"
|
className="copyable-input__preview"
|
||||||
title={`open ${label.toLowerCase()} view in new tab`}
|
|
||||||
>
|
>
|
||||||
<InlineSVG src={shareUrl} alt={`open ${label} view in new tab`} />
|
<InlineSVG src={shareUrl} alt={`open ${label} view in new tab`} />
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -312,7 +312,6 @@ class Editor extends React.Component {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
title="code editor"
|
|
||||||
role="main"
|
role="main"
|
||||||
className={editorSectionClass}
|
className={editorSectionClass}
|
||||||
>
|
>
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
function HTTPSModal() {
|
|
||||||
return (
|
|
||||||
<section className="help-modal">
|
|
||||||
<div className="help-modal__section">
|
|
||||||
<div>
|
|
||||||
<p>Use the checkbox to choose whether this sketch should be loaded using HTTPS or HTTP.</p>
|
|
||||||
<p>You should choose HTTPS if you need to:</p>
|
|
||||||
<ul>
|
|
||||||
<li>access a webcam or microphone</li>
|
|
||||||
<li>access an API served over HTTPS</li>
|
|
||||||
</ul>
|
|
||||||
<p>Choose HTTP if you need to:</p>
|
|
||||||
<ul>
|
|
||||||
<li>access an API served over HTTP</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default HTTPSModal;
|
|
|
@ -92,7 +92,7 @@ class Preferences extends React.Component {
|
||||||
const beep = new Audio(beepUrl);
|
const beep = new Audio(beepUrl);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="preferences" title="preference-menu">
|
<section className="preferences">
|
||||||
<Helmet>
|
<Helmet>
|
||||||
<title>p5.js Web Editor | Preferences</title>
|
<title>p5.js Web Editor | Preferences</title>
|
||||||
</Helmet>
|
</Helmet>
|
||||||
|
|
|
@ -360,7 +360,7 @@ class PreviewFrame extends React.Component {
|
||||||
aria-label="sketch output"
|
aria-label="sketch output"
|
||||||
role="main"
|
role="main"
|
||||||
frameBorder="0"
|
frameBorder="0"
|
||||||
title="sketch output"
|
title="sketch preview"
|
||||||
ref={(element) => { this.iframeElement = element; }}
|
ref={(element) => { this.iframeElement = element; }}
|
||||||
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals"
|
sandbox="allow-scripts allow-pointer-lock allow-same-origin allow-popups allow-forms allow-modals"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -15,7 +15,6 @@ import NewFolderModal from '../components/NewFolderModal';
|
||||||
import ShareModal from '../components/ShareModal';
|
import ShareModal from '../components/ShareModal';
|
||||||
import KeyboardShortcutModal from '../components/KeyboardShortcutModal';
|
import KeyboardShortcutModal from '../components/KeyboardShortcutModal';
|
||||||
import ErrorModal from '../components/ErrorModal';
|
import ErrorModal from '../components/ErrorModal';
|
||||||
import HTTPSModal from '../components/HTTPSModal';
|
|
||||||
import Nav from '../../../components/Nav';
|
import Nav from '../../../components/Nav';
|
||||||
import Console from '../components/Console';
|
import Console from '../components/Console';
|
||||||
import Toast from '../components/Toast';
|
import Toast from '../components/Toast';
|
||||||
|
@ -196,7 +195,6 @@ class IDEView extends React.Component {
|
||||||
<Toolbar />
|
<Toolbar />
|
||||||
{this.props.ide.preferencesIsVisible &&
|
{this.props.ide.preferencesIsVisible &&
|
||||||
<Overlay
|
<Overlay
|
||||||
title="Settings"
|
|
||||||
ariaLabel="settings"
|
ariaLabel="settings"
|
||||||
closeOverlay={this.props.closePreferences}
|
closeOverlay={this.props.closePreferences}
|
||||||
>
|
>
|
||||||
|
@ -371,7 +369,6 @@ class IDEView extends React.Component {
|
||||||
{ this.props.location.pathname === '/about' &&
|
{ this.props.location.pathname === '/about' &&
|
||||||
<Overlay
|
<Overlay
|
||||||
previousPath={this.props.ide.previousPath}
|
previousPath={this.props.ide.previousPath}
|
||||||
title="Welcome"
|
|
||||||
ariaLabel="about"
|
ariaLabel="about"
|
||||||
>
|
>
|
||||||
<About previousPath={this.props.ide.previousPath} />
|
<About previousPath={this.props.ide.previousPath} />
|
||||||
|
@ -380,7 +377,6 @@ class IDEView extends React.Component {
|
||||||
{this.props.location.pathname === '/feedback' &&
|
{this.props.location.pathname === '/feedback' &&
|
||||||
<Overlay
|
<Overlay
|
||||||
previousPath={this.props.ide.previousPath}
|
previousPath={this.props.ide.previousPath}
|
||||||
title="Submit Feedback"
|
|
||||||
ariaLabel="submit-feedback"
|
ariaLabel="submit-feedback"
|
||||||
>
|
>
|
||||||
<Feedback previousPath={this.props.ide.previousPath} />
|
<Feedback previousPath={this.props.ide.previousPath} />
|
||||||
|
@ -402,7 +398,6 @@ class IDEView extends React.Component {
|
||||||
}
|
}
|
||||||
{this.props.ide.shareModalVisible &&
|
{this.props.ide.shareModalVisible &&
|
||||||
<Overlay
|
<Overlay
|
||||||
title="Share This Sketch"
|
|
||||||
ariaLabel="share"
|
ariaLabel="share"
|
||||||
closeOverlay={this.props.closeShareModal}
|
closeOverlay={this.props.closeShareModal}
|
||||||
>
|
>
|
||||||
|
@ -415,7 +410,6 @@ class IDEView extends React.Component {
|
||||||
}
|
}
|
||||||
{this.props.ide.keyboardShortcutVisible &&
|
{this.props.ide.keyboardShortcutVisible &&
|
||||||
<Overlay
|
<Overlay
|
||||||
title="Keyboard Shortcuts"
|
|
||||||
ariaLabel="keyboard shortcuts"
|
ariaLabel="keyboard shortcuts"
|
||||||
closeOverlay={this.props.closeKeyboardShortcutModal}
|
closeOverlay={this.props.closeKeyboardShortcutModal}
|
||||||
>
|
>
|
||||||
|
@ -424,7 +418,6 @@ class IDEView extends React.Component {
|
||||||
}
|
}
|
||||||
{this.props.ide.errorType &&
|
{this.props.ide.errorType &&
|
||||||
<Overlay
|
<Overlay
|
||||||
title="Error"
|
|
||||||
ariaLabel="error"
|
ariaLabel="error"
|
||||||
closeOverlay={this.props.hideErrorModal}
|
closeOverlay={this.props.hideErrorModal}
|
||||||
>
|
>
|
||||||
|
@ -434,14 +427,6 @@ class IDEView extends React.Component {
|
||||||
/>
|
/>
|
||||||
</Overlay>
|
</Overlay>
|
||||||
}
|
}
|
||||||
{this.props.ide.helpType &&
|
|
||||||
<Overlay
|
|
||||||
title="Serve over HTTPS"
|
|
||||||
closeOverlay={this.props.hideHelpModal}
|
|
||||||
>
|
|
||||||
<HTTPSModal />
|
|
||||||
</Overlay>
|
|
||||||
}
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -487,7 +472,6 @@ IDEView.propTypes = {
|
||||||
previousPath: PropTypes.string.isRequired,
|
previousPath: PropTypes.string.isRequired,
|
||||||
justOpenedProject: PropTypes.bool.isRequired,
|
justOpenedProject: PropTypes.bool.isRequired,
|
||||||
errorType: PropTypes.string,
|
errorType: PropTypes.string,
|
||||||
helpType: PropTypes.string,
|
|
||||||
runtimeErrorWarningVisible: PropTypes.bool.isRequired,
|
runtimeErrorWarningVisible: PropTypes.bool.isRequired,
|
||||||
}).isRequired,
|
}).isRequired,
|
||||||
stopSketch: PropTypes.func.isRequired,
|
stopSketch: PropTypes.func.isRequired,
|
||||||
|
@ -588,7 +572,6 @@ IDEView.propTypes = {
|
||||||
hideErrorModal: PropTypes.func.isRequired,
|
hideErrorModal: PropTypes.func.isRequired,
|
||||||
clearPersistedState: PropTypes.func.isRequired,
|
clearPersistedState: PropTypes.func.isRequired,
|
||||||
persistState: PropTypes.func.isRequired,
|
persistState: PropTypes.func.isRequired,
|
||||||
hideHelpModal: PropTypes.func.isRequired,
|
|
||||||
showRuntimeErrorWarning: PropTypes.func.isRequired,
|
showRuntimeErrorWarning: PropTypes.func.isRequired,
|
||||||
hideRuntimeErrorWarning: PropTypes.func.isRequired,
|
hideRuntimeErrorWarning: PropTypes.func.isRequired,
|
||||||
startSketch: PropTypes.func.isRequired,
|
startSketch: PropTypes.func.isRequired,
|
||||||
|
|
|
@ -101,10 +101,6 @@ const ide = (state = initialState, action) => {
|
||||||
return Object.assign({}, state, { errorType: action.modalType });
|
return Object.assign({}, state, { errorType: action.modalType });
|
||||||
case ActionTypes.HIDE_ERROR_MODAL:
|
case ActionTypes.HIDE_ERROR_MODAL:
|
||||||
return Object.assign({}, state, { errorType: undefined });
|
return Object.assign({}, state, { errorType: undefined });
|
||||||
case ActionTypes.SHOW_HELP_MODAL:
|
|
||||||
return Object.assign({}, state, { helpType: action.helpType });
|
|
||||||
case ActionTypes.HIDE_HELP_MODAL:
|
|
||||||
return Object.assign({}, state, { helpType: undefined });
|
|
||||||
case ActionTypes.HIDE_RUNTIME_ERROR_WARNING:
|
case ActionTypes.HIDE_RUNTIME_ERROR_WARNING:
|
||||||
return Object.assign({}, state, { runtimeErrorWarningVisible: false });
|
return Object.assign({}, state, { runtimeErrorWarningVisible: false });
|
||||||
case ActionTypes.SHOW_RUNTIME_ERROR_WARNING:
|
case ActionTypes.SHOW_RUNTIME_ERROR_WARNING:
|
||||||
|
|
|
@ -49,7 +49,6 @@ const routes = store => (
|
||||||
<Route path="/:username/collections/create" component={DashboardView} />
|
<Route path="/:username/collections/create" component={DashboardView} />
|
||||||
<Route path="/:username/collections/:collection_id" component={CollectionView} />
|
<Route path="/:username/collections/:collection_id" component={CollectionView} />
|
||||||
<Route path="/about" component={IDEView} />
|
<Route path="/about" component={IDEView} />
|
||||||
<Route path="/feedback" component={IDEView} />
|
|
||||||
</Route>
|
</Route>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
195
package-lock.json
generated
195
package-lock.json
generated
|
@ -7907,9 +7907,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"handlebars": {
|
"handlebars": {
|
||||||
"version": "4.1.2",
|
"version": "4.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.5.1.tgz",
|
||||||
"integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==",
|
"integrity": "sha512-C29UoFzHe9yM61lOsIlCE5/mQVGrnIOrOq7maQl76L7tYPCgC1og0Ajt6uWnX4ZTxBPnjw+CUvawphwCfJgUnA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
"neo-async": "^2.6.0",
|
"neo-async": "^2.6.0",
|
||||||
|
@ -8090,11 +8090,6 @@
|
||||||
"parse-passwd": "^1.0.0"
|
"parse-passwd": "^1.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hooks-fixed": {
|
|
||||||
"version": "2.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/hooks-fixed/-/hooks-fixed-2.0.2.tgz",
|
|
||||||
"integrity": "sha512-YurCM4gQSetcrhwEtpQHhQ4M7Zo7poNGqY4kQGeBS6eZtOcT3tnNs01ThFa0jYBByAiYt1MjMjP/YApG0EnAvQ=="
|
|
||||||
},
|
|
||||||
"hosted-git-info": {
|
"hosted-git-info": {
|
||||||
"version": "2.7.1",
|
"version": "2.7.1",
|
||||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
|
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
|
||||||
|
@ -8330,14 +8325,22 @@
|
||||||
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
|
"integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM="
|
||||||
},
|
},
|
||||||
"https-proxy-agent": {
|
"https-proxy-agent": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz",
|
||||||
"integrity": "sha512-HPCTS1LW51bcyMYbxUIOO4HEOlQ1/1qRaFWcyxvwaqUS9TY88aoEuHUY33kuAh1YhVVaDQhLZsnPd+XNARWZlQ==",
|
"integrity": "sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"agent-base": "^4.1.0",
|
"agent-base": "^4.3.0",
|
||||||
"debug": "^3.1.0"
|
"debug": "^3.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"agent-base": {
|
||||||
|
"version": "4.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz",
|
||||||
|
"integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==",
|
||||||
|
"requires": {
|
||||||
|
"es6-promisify": "^5.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "3.2.6",
|
"version": "3.2.6",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
|
||||||
|
@ -11033,9 +11036,9 @@
|
||||||
"integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw=="
|
"integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw=="
|
||||||
},
|
},
|
||||||
"kareem": {
|
"kareem": {
|
||||||
"version": "1.5.0",
|
"version": "2.3.1",
|
||||||
"resolved": "https://registry.npmjs.org/kareem/-/kareem-1.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/kareem/-/kareem-2.3.1.tgz",
|
||||||
"integrity": "sha1-4+QQHZ3P3imXadr0tNtk2JXRdEg="
|
"integrity": "sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw=="
|
||||||
},
|
},
|
||||||
"kind-of": {
|
"kind-of": {
|
||||||
"version": "3.2.2",
|
"version": "3.2.2",
|
||||||
|
@ -11343,11 +11346,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.foreach/-/lodash.foreach-4.5.0.tgz",
|
||||||
"integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM="
|
"integrity": "sha1-Gmo16s5AEoDH8G3d7DUWWrJ+PlM="
|
||||||
},
|
},
|
||||||
"lodash.get": {
|
|
||||||
"version": "4.4.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz",
|
|
||||||
"integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk="
|
|
||||||
},
|
|
||||||
"lodash.isempty": {
|
"lodash.isempty": {
|
||||||
"version": "4.4.0",
|
"version": "4.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz",
|
||||||
|
@ -12684,85 +12682,49 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mongoose": {
|
"mongoose": {
|
||||||
"version": "4.13.18",
|
"version": "5.7.5",
|
||||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-4.13.18.tgz",
|
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-5.7.5.tgz",
|
||||||
"integrity": "sha512-pPZlVID+/9xl0pyBibr7CZbjYKzpJZuw58TdWwIxr3ydO/OUZqhX1kUEAQIzsOJVSsL6GnD1fb54reO35jvLtw==",
|
"integrity": "sha512-BZ4FxtnbTurc/wcm/hLltLdI4IDxo4nsE0D9q58YymTdZwreNzwO62CcjVtaHhmr8HmJtOInp2W/T12FZaMf8g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"async": "2.6.0",
|
"bson": "~1.1.1",
|
||||||
"bson": "~1.0.4",
|
"kareem": "2.3.1",
|
||||||
"hooks-fixed": "2.0.2",
|
"mongodb": "3.3.2",
|
||||||
"kareem": "1.5.0",
|
"mongoose-legacy-pluralize": "1.0.2",
|
||||||
"lodash.get": "4.4.2",
|
"mpath": "0.6.0",
|
||||||
"mongodb": "2.2.34",
|
"mquery": "3.2.2",
|
||||||
"mpath": "0.5.1",
|
"ms": "2.1.2",
|
||||||
"mpromise": "0.5.5",
|
"regexp-clone": "1.0.0",
|
||||||
"mquery": "2.3.3",
|
"safe-buffer": "5.1.2",
|
||||||
"ms": "2.0.0",
|
"sift": "7.0.1",
|
||||||
"muri": "1.3.0",
|
|
||||||
"regexp-clone": "0.0.1",
|
|
||||||
"sliced": "1.0.1"
|
"sliced": "1.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async": {
|
"bson": {
|
||||||
"version": "2.6.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
|
"resolved": "https://registry.npmjs.org/bson/-/bson-1.1.1.tgz",
|
||||||
"integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==",
|
"integrity": "sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg=="
|
||||||
"requires": {
|
|
||||||
"lodash": "^4.14.0"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"mongodb": {
|
"mongodb": {
|
||||||
"version": "2.2.34",
|
"version": "3.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-2.2.34.tgz",
|
"resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.3.2.tgz",
|
||||||
"integrity": "sha1-o09Zu+thdUrsQy3nLD/iFSakTBo=",
|
"integrity": "sha512-fqJt3iywelk4yKu/lfwQg163Bjpo5zDKhXiohycvon4iQHbrfflSAz9AIlRE6496Pm/dQKQK5bMigdVo2s6gBg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"es6-promise": "3.2.1",
|
"bson": "^1.1.1",
|
||||||
"mongodb-core": "2.1.18",
|
"require_optional": "^1.0.1",
|
||||||
"readable-stream": "2.2.7"
|
"safe-buffer": "^5.1.2"
|
||||||
}
|
|
||||||
},
|
|
||||||
"mongodb-core": {
|
|
||||||
"version": "2.1.18",
|
|
||||||
"resolved": "https://registry.npmjs.org/mongodb-core/-/mongodb-core-2.1.18.tgz",
|
|
||||||
"integrity": "sha1-TEYTm986HwMt7ZHbSfOO7AFlkFA=",
|
|
||||||
"requires": {
|
|
||||||
"bson": "~1.0.4",
|
|
||||||
"require_optional": "~1.0.0"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ms": {
|
"ms": {
|
||||||
"version": "2.0.0",
|
"version": "2.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||||
},
|
}
|
||||||
"process-nextick-args": {
|
|
||||||
"version": "1.0.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz",
|
|
||||||
"integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M="
|
|
||||||
},
|
|
||||||
"readable-stream": {
|
|
||||||
"version": "2.2.7",
|
|
||||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.7.tgz",
|
|
||||||
"integrity": "sha1-BwV6y+JGeyIELTb5jFrVBwVOlbE=",
|
|
||||||
"requires": {
|
|
||||||
"buffer-shims": "~1.0.0",
|
|
||||||
"core-util-is": "~1.0.0",
|
|
||||||
"inherits": "~2.0.1",
|
|
||||||
"isarray": "~1.0.0",
|
|
||||||
"process-nextick-args": "~1.0.6",
|
|
||||||
"string_decoder": "~1.0.0",
|
|
||||||
"util-deprecate": "~1.0.1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"string_decoder": {
|
"mongoose-legacy-pluralize": {
|
||||||
"version": "1.0.3",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz",
|
||||||
"integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==",
|
"integrity": "sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ=="
|
||||||
"requires": {
|
|
||||||
"safe-buffer": "~5.1.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"moo": {
|
"moo": {
|
||||||
"version": "0.4.3",
|
"version": "0.4.3",
|
||||||
|
@ -12784,35 +12746,31 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mpath": {
|
"mpath": {
|
||||||
"version": "0.5.1",
|
"version": "0.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.5.1.tgz",
|
"resolved": "https://registry.npmjs.org/mpath/-/mpath-0.6.0.tgz",
|
||||||
"integrity": "sha512-H8OVQ+QEz82sch4wbODFOz+3YQ61FYz/z3eJ5pIdbMEaUzDqA268Wd+Vt4Paw9TJfvDgVKaayC0gBzMIw2jhsg=="
|
"integrity": "sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw=="
|
||||||
},
|
|
||||||
"mpromise": {
|
|
||||||
"version": "0.5.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/mpromise/-/mpromise-0.5.5.tgz",
|
|
||||||
"integrity": "sha1-9bJCWddjrMIlewoMjG2Gb9UXMuY="
|
|
||||||
},
|
},
|
||||||
"mquery": {
|
"mquery": {
|
||||||
"version": "2.3.3",
|
"version": "3.2.2",
|
||||||
"resolved": "https://registry.npmjs.org/mquery/-/mquery-2.3.3.tgz",
|
"resolved": "https://registry.npmjs.org/mquery/-/mquery-3.2.2.tgz",
|
||||||
"integrity": "sha512-NC8L14kn+qxJbbJ1gbcEMDxF0sC3sv+1cbRReXXwVvowcwY1y9KoVZFq0ebwARibsadu8lx8nWGvm3V0Pf0ZWQ==",
|
"integrity": "sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bluebird": "3.5.0",
|
"bluebird": "3.5.1",
|
||||||
"debug": "2.6.9",
|
"debug": "3.1.0",
|
||||||
"regexp-clone": "0.0.1",
|
"regexp-clone": "^1.0.0",
|
||||||
"sliced": "0.0.5"
|
"safe-buffer": "5.1.2",
|
||||||
|
"sliced": "1.0.1"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bluebird": {
|
"bluebird": {
|
||||||
"version": "3.5.0",
|
"version": "3.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz",
|
||||||
"integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw="
|
"integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA=="
|
||||||
},
|
},
|
||||||
"debug": {
|
"debug": {
|
||||||
"version": "2.6.9",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
|
"resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz",
|
||||||
"integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
|
"integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"ms": "2.0.0"
|
"ms": "2.0.0"
|
||||||
}
|
}
|
||||||
|
@ -12821,11 +12779,6 @@
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
||||||
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
"integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
|
||||||
},
|
|
||||||
"sliced": {
|
|
||||||
"version": "0.0.5",
|
|
||||||
"resolved": "https://registry.npmjs.org/sliced/-/sliced-0.0.5.tgz",
|
|
||||||
"integrity": "sha1-XtwETKTrb3gW1Qui/GPiXY/kcH8="
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -12834,11 +12787,6 @@
|
||||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
|
||||||
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
"integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg=="
|
||||||
},
|
},
|
||||||
"muri": {
|
|
||||||
"version": "1.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/muri/-/muri-1.3.0.tgz",
|
|
||||||
"integrity": "sha512-FiaFwKl864onHFFUV/a2szAl7X0fxVlSKNdhTf+BM8i8goEgYut8u5P9MqQqIYwvaMxjzVESsoEm/2kfkFH1rg=="
|
|
||||||
},
|
|
||||||
"mute-stream": {
|
"mute-stream": {
|
||||||
"version": "0.0.7",
|
"version": "0.0.7",
|
||||||
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
|
"resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz",
|
||||||
|
@ -17405,9 +17353,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"regexp-clone": {
|
"regexp-clone": {
|
||||||
"version": "0.0.1",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-0.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/regexp-clone/-/regexp-clone-1.0.0.tgz",
|
||||||
"integrity": "sha1-p8LgmJH9vzj7sQ03b7cwA+aKxYk="
|
"integrity": "sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw=="
|
||||||
},
|
},
|
||||||
"regexp-tree": {
|
"regexp-tree": {
|
||||||
"version": "0.1.10",
|
"version": "0.1.10",
|
||||||
|
@ -18639,6 +18587,11 @@
|
||||||
"nanoid": "^2.0.0"
|
"nanoid": "^2.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"sift": {
|
||||||
|
"version": "7.0.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/sift/-/sift-7.0.1.tgz",
|
||||||
|
"integrity": "sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g=="
|
||||||
|
},
|
||||||
"sigmund": {
|
"sigmund": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
|
||||||
|
|
|
@ -135,7 +135,7 @@
|
||||||
"loop-protect": "github:catarak/loop-protect",
|
"loop-protect": "github:catarak/loop-protect",
|
||||||
"mjml": "^3.3.2",
|
"mjml": "^3.3.2",
|
||||||
"mockingoose": "^2.13.0",
|
"mockingoose": "^2.13.0",
|
||||||
"mongoose": "^4.6.8",
|
"mongoose": "^5.7.5",
|
||||||
"node-uuid": "^1.4.7",
|
"node-uuid": "^1.4.7",
|
||||||
"nodemailer": "^2.6.4",
|
"nodemailer": "^2.6.4",
|
||||||
"nodemailer-mailgun-transport": "^1.4.0",
|
"nodemailer-mailgun-transport": "^1.4.0",
|
||||||
|
|
|
@ -136,7 +136,8 @@ require('./config/passport');
|
||||||
|
|
||||||
// Connect to MongoDB
|
// Connect to MongoDB
|
||||||
mongoose.Promise = global.Promise;
|
mongoose.Promise = global.Promise;
|
||||||
mongoose.connect(mongoConnectionString, { useMongoClient: true });
|
mongoose.connect(mongoConnectionString, { useNewUrlParser: true, useUnifiedTopology: true });
|
||||||
|
mongoose.set('useCreateIndex', true);
|
||||||
mongoose.connection.on('error', () => {
|
mongoose.connection.on('error', () => {
|
||||||
console.error('MongoDB Connection Error. Please make sure that MongoDB is running.');
|
console.error('MongoDB Connection Error. Please make sure that MongoDB is running.');
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
|
Loading…
Reference in a new issue