mirror of
https://github.com/OutlineFoundation/outline-server.git
synced 2026-08-04 14:37:34 +00:00
Move app-root js to Typescript
This commit is contained in:
parent
a3c44651ef
commit
74d0b19761
7 changed files with 502 additions and 514 deletions
|
|
@ -24,6 +24,7 @@
|
|||
<script src="/bower_components/webcomponentsjs/webcomponents-loader.js"></script>
|
||||
<link rel="import" href="/bower_components/app-layout/app-toolbar/app-toolbar.html">
|
||||
<link rel="import" href="/ui_components/app-root.html">
|
||||
<!-- TODO: Move this to app-root.ts -->
|
||||
<script src="/bower_components/outline-i18n/index.js"></script>
|
||||
<script src="server_manager/web_app/main.js"></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
"email": "info@getoutline.org"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polymer/polymer": "^3.3.0",
|
||||
"@sentry/electron": "^0.8.1",
|
||||
"body-parser": "^1.18.3",
|
||||
"bytes": "^3.1.0",
|
||||
|
|
@ -27,7 +28,7 @@
|
|||
"@types/request": "^2.47.1",
|
||||
"@types/semver": "^5.5.0",
|
||||
"bower": "^1.8.0",
|
||||
"browserify": "^14.5.0",
|
||||
"browserify": "^16.5.0",
|
||||
"electron": "7.0.0",
|
||||
"electron-builder": "^21.2.0",
|
||||
"electron-icon-maker": "^0.0.4",
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
<link rel="import" href="./outline-server-progress-step.html">
|
||||
<link rel="import" href="./outline-server-view.html">
|
||||
<link rel="import" href="./outline-tos-view.html">
|
||||
<link rel='import' href='./outline-share-dialog.html'>
|
||||
|
||||
<dom-module id="app-root">
|
||||
<template>
|
||||
|
|
@ -449,410 +450,4 @@
|
|||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
const TOS_ACK_LOCAL_STORAGE_KEY = 'tos-ack';
|
||||
Polymer({
|
||||
is: 'app-root',
|
||||
behaviors: [
|
||||
Polymer.AppLocalizeBehavior
|
||||
],
|
||||
properties: {
|
||||
LANGUAGES_AVAILABLE: {
|
||||
type: Object,
|
||||
readonly: true,
|
||||
value: {
|
||||
am: {id: 'am', dir: 'ltr'},
|
||||
ar: {id: 'ar', dir: 'rtl'},
|
||||
bg: {id: 'bg', dir: 'ltr'},
|
||||
ca: {id: 'ca', dir: 'ltr'},
|
||||
cs: {id: 'cs', dir: 'ltr'},
|
||||
da: {id: 'da', dir: 'ltr'},
|
||||
de: {id: 'de', dir: 'ltr'},
|
||||
el: {id: 'el', dir: 'ltr'},
|
||||
en: {id: 'en', dir: 'ltr'},
|
||||
'es-419': {id: 'es-419', dir: 'ltr'},
|
||||
fa: {id: 'fa', dir: 'rtl'},
|
||||
fi: {id: 'fi', dir: 'ltr'},
|
||||
fil: {id: 'fil', dir: 'ltr'},
|
||||
fr: {id: 'fr', dir: 'ltr'},
|
||||
he: {id: 'he', dir: 'rtl'},
|
||||
hi: {id: 'hi', dir: 'ltr'},
|
||||
hr: {id: 'hr', dir: 'ltr'},
|
||||
hu: {id: 'hu', dir: 'ltr'},
|
||||
id: {id: 'id', dir: 'ltr'},
|
||||
it: {id: 'it', dir: 'ltr'},
|
||||
ja: {id: 'ja', dir: 'ltr'},
|
||||
ko: {id: 'ko', dir: 'ltr'},
|
||||
km: {id: 'km', dir: 'ltr'},
|
||||
lt: {id: 'lt', dir: 'ltr'},
|
||||
lv: {id: 'lv', dir: 'ltr'},
|
||||
nl: {id: 'nl', dir: 'ltr'},
|
||||
no: {id: 'no', dir: 'ltr'},
|
||||
pl: {id: 'pl', dir: 'ltr'},
|
||||
'pt-BR': {id: 'pt-BR', dir: 'ltr'},
|
||||
ro: {id: 'ro', dir: 'ltr'},
|
||||
ru: {id: 'ru', dir: 'ltr'},
|
||||
sk: {id: 'sk', dir: 'ltr'},
|
||||
sl: {id: 'sl', dir: 'ltr'},
|
||||
sr: {id: 'sr', dir: 'ltr'},
|
||||
'sr-Latn': {id: 'sr-Latn', dir: 'ltr'},
|
||||
sv: {id: 'sv', dir: 'ltr'},
|
||||
th: {id: 'th', dir: 'ltr'},
|
||||
tr: {id: 'tr', dir: 'ltr'},
|
||||
uk: {id: 'uk', dir: 'ltr'},
|
||||
ur: {id: 'ur', dir: 'rtl'},
|
||||
vi: {id: 'vi', dir: 'ltr'},
|
||||
zh: {id: 'zh', dir: 'ltr'},
|
||||
'zh-CN': {id: 'zh-CN', dir: 'ltr'},
|
||||
'zh-TW': {id: 'zh-TW', dir: 'ltr'},
|
||||
}
|
||||
},
|
||||
DEFAULT_LANGUAGE: {
|
||||
type: String,
|
||||
readonly: true,
|
||||
value: 'en'
|
||||
},
|
||||
useKeyIfMissing: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
language: {
|
||||
type: String,
|
||||
readonly: true,
|
||||
computed: '_computeLanguage(LANGUAGES_AVAILABLE, DEFAULT_LANGUAGE)'
|
||||
},
|
||||
serverList: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
selectedServer: {
|
||||
type: Object, // DisplayServer in display_server.ts
|
||||
value: undefined,
|
||||
},
|
||||
hasManualServers: {
|
||||
type: Boolean,
|
||||
computed: '_computeHasManualServers(serverList.*)',
|
||||
},
|
||||
adminEmail: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
isSignedInToDigitalOcean: {
|
||||
type: Boolean,
|
||||
computed: '_computeIsSignedInToDigitalOcean(adminEmail)'
|
||||
},
|
||||
outlineVersion: String,
|
||||
userAcceptedTos: {
|
||||
type: Boolean,
|
||||
// Get notified when the user clicks the OK button in the ToS view
|
||||
observer: '_userAcceptedTosChanged',
|
||||
},
|
||||
hasAcceptedTos: {
|
||||
type: Boolean,
|
||||
computed: '_computeHasAcceptedTermsOfService(userAcceptedTos)'
|
||||
},
|
||||
currentPage: {
|
||||
type: String,
|
||||
value: 'intro'
|
||||
},
|
||||
shouldShowSideBar: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
sideBarMarginClass: {
|
||||
type: String,
|
||||
computed: '_computeSideBarMarginClass(shouldShowSideBar)'
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
'RegionSelected': 'handleRegionSelected',
|
||||
'MetricsChoiceSelected': 'handleMetricsChoiceSelected',
|
||||
'SetUpGenericCloudProviderRequested': 'handleSetUpGenericCloudProviderRequested',
|
||||
'SetUpAwsRequested': 'handleSetUpAwsRequested',
|
||||
'SetUpGcpRequested': 'handleSetUpGcpRequested',
|
||||
'ManualServerEntryCancelled': 'handleManualCancelled'
|
||||
},
|
||||
ready: function() {
|
||||
const messagesUrl = `/messages/${this.language}.json`;
|
||||
this.loadResources(messagesUrl, this.language);
|
||||
const languageProperties = this.LANGUAGES_AVAILABLE[this.language];
|
||||
if (languageProperties && languageProperties.dir === 'rtl') {
|
||||
document.documentElement.setAttribute('dir', 'rtl');
|
||||
this.$.appDrawer.align = 'right';
|
||||
this.$.sideBar.align = 'right';
|
||||
}
|
||||
},
|
||||
showIntro: function () {
|
||||
this.maybeCloseDrawer();
|
||||
this.selectedServer = undefined;
|
||||
this.currentPage = 'intro';
|
||||
},
|
||||
getDigitalOceanOauthFlow: function (onCancel) {
|
||||
const oauthFlow = this.$.digitalOceanOauth;
|
||||
oauthFlow.onCancel = onCancel;
|
||||
return oauthFlow;
|
||||
},
|
||||
showDigitalOceanOauthFlow: function () {
|
||||
this.currentPage = 'digitalOceanOauth';
|
||||
},
|
||||
getAndShowDigitalOceanOauthFlow: function (onCancel) {
|
||||
this.currentPage = 'digitalOceanOauth';
|
||||
const oauthFlow = this.getDigitalOceanOauthFlow(onCancel);
|
||||
oauthFlow.showConnectAccount();
|
||||
return oauthFlow;
|
||||
},
|
||||
getAndShowRegionPicker: function () {
|
||||
this.currentPage = 'regionPicker';
|
||||
this.$.regionPicker.init();
|
||||
return this.$.regionPicker;
|
||||
},
|
||||
getManualServerEntry: function() {
|
||||
return this.$.manualEntry;
|
||||
},
|
||||
showProgress: function (serverName, showCancelButton) {
|
||||
this.currentPage = 'serverProgressStep';
|
||||
this.$.serverProgressStep.serverName = serverName;
|
||||
this.$.serverProgressStep.showCancelButton = showCancelButton;
|
||||
this.$.serverProgressStep.start();
|
||||
},
|
||||
showServerView: function () {
|
||||
this.$.serverProgressStep.stop();
|
||||
this.currentPage = 'serverView';
|
||||
},
|
||||
getServerView: function(displayServerId) {
|
||||
if (!displayServerId) {
|
||||
return null;
|
||||
}
|
||||
const selectedServerId = this._base64Encode(displayServerId);
|
||||
return this.$.serverView.querySelector(`#serverView-${selectedServerId}`);
|
||||
},
|
||||
handleRegionSelected: function (e) {
|
||||
this.fire('SetUpServerRequested', {
|
||||
regionId: this.$.regionPicker.getSelectedRegionId()
|
||||
});
|
||||
},
|
||||
handleSetUpGenericCloudProviderRequested: function () {
|
||||
this.handleManualServerSelected('generic');
|
||||
},
|
||||
handleSetUpAwsRequested: function() {
|
||||
this.handleManualServerSelected('aws');
|
||||
},
|
||||
handleSetUpGcpRequested: function() {
|
||||
this.handleManualServerSelected('gcp');
|
||||
},
|
||||
handleManualServerSelected: function(cloudProvider) {
|
||||
this.$.manualEntry.clear();
|
||||
this.$.manualEntry.cloudProvider = cloudProvider;
|
||||
this.currentPage = 'manualEntry';
|
||||
},
|
||||
handleManualCancelled: function() {
|
||||
this.currentPage = 'intro';
|
||||
},
|
||||
showError: function (errorMsg) {
|
||||
this.showToast(errorMsg, Infinity);
|
||||
},
|
||||
showNotification: function (message, durationMs=3000) {
|
||||
this.showToast(message, durationMs);
|
||||
},
|
||||
showToast: function(message, duration) {
|
||||
const toast = this.$.toast;
|
||||
toast.close();
|
||||
// Defer in order to trigger the toast animation, otherwise the
|
||||
// update happens in place.
|
||||
setTimeout(() => {
|
||||
toast.show({
|
||||
text: message,
|
||||
duration: duration,
|
||||
noOverlap: true
|
||||
});
|
||||
}, 0);
|
||||
},
|
||||
closeError: function () {
|
||||
this.$.toast.close();
|
||||
},
|
||||
// cb is a function which accepts a single boolean which is true iff
|
||||
// the user chose to retry the failing operation.
|
||||
showConnectivityDialog: function (cb) {
|
||||
const dialogTitle = this.localize('error-connectivity-title');
|
||||
const dialogText = this.localize('error-connectivity');
|
||||
this.showModalDialog(dialogTitle, dialogText, [this.localize('cancel'), this.localize('retry')])
|
||||
.then((clickedButtonIndex) => {
|
||||
cb(clickedButtonIndex === 1); // pass true if user clicked retry
|
||||
});
|
||||
},
|
||||
getConfirmation: function(title, text, confirmButtonText, continueFunc) {
|
||||
this.showModalDialog(title, text, [this.localize('cancel'), confirmButtonText])
|
||||
.then((clickedButtonIndex) => {
|
||||
if (clickedButtonIndex === 1) { // user clicked to confirm.
|
||||
continueFunc();
|
||||
}
|
||||
});
|
||||
},
|
||||
showManualServerError: function (errorTitle, errorText) {
|
||||
this.showModalDialog(errorTitle, errorText, [this.localize('cancel'), this.localize('retry')])
|
||||
.then((clickedButtonIndex) => {
|
||||
if (clickedButtonIndex == 1) {
|
||||
this.$.manualEntry.retryTapped();
|
||||
} else {
|
||||
this.$.manualEntry.cancelTapped();
|
||||
}
|
||||
});
|
||||
},
|
||||
_computeIsSignedInToDigitalOcean: function (adminEmail) {
|
||||
return Boolean(adminEmail);
|
||||
},
|
||||
_computeHasManualServers: function(serverList) {
|
||||
return this.serverList.filter(server => !server.isManaged).length > 0;
|
||||
},
|
||||
_userAcceptedTosChanged: function(userAcceptedTos) {
|
||||
if (userAcceptedTos) {
|
||||
window.localStorage[TOS_ACK_LOCAL_STORAGE_KEY] = Date.now();
|
||||
}
|
||||
},
|
||||
_computeHasAcceptedTermsOfService: function(userAcceptedTos) {
|
||||
return userAcceptedTos || !!window.localStorage[TOS_ACK_LOCAL_STORAGE_KEY];
|
||||
},
|
||||
_toggleAppDrawer: function() {
|
||||
const drawerNarrow = this.$.drawerLayout.narrow;
|
||||
const forceNarrow = this.$.drawerLayout.forceNarrow;
|
||||
if (drawerNarrow) {
|
||||
if (forceNarrow) {
|
||||
// The window width is below the responsive threshold. Do not force narrow mode.
|
||||
this.$.drawerLayout.forceNarrow = false;
|
||||
}
|
||||
this.$.appDrawer.toggle();
|
||||
} else {
|
||||
// Forcing narrow mode when the window width is above the responsive threshold effectively
|
||||
// collapses the drawer. Conversely, reverting force narrow expands the drawer.
|
||||
this.$.drawerLayout.forceNarrow = !forceNarrow;
|
||||
}
|
||||
},
|
||||
maybeCloseDrawer: function() {
|
||||
if (this.$.drawerLayout.narrow || this.$.drawerLayout.forceNarrow) {
|
||||
this.$.appDrawer.close();
|
||||
}
|
||||
},
|
||||
submitFeedbackTapped: function () {
|
||||
this.$.feedbackDialog.open();
|
||||
},
|
||||
aboutTapped: function() {
|
||||
this.$.aboutDialog.open();
|
||||
},
|
||||
signOutTapped: function() {
|
||||
this.fire('SignOutRequested');
|
||||
},
|
||||
openManualInstallFeedback: function(prepopulatedMessage) {
|
||||
this.$.feedbackDialog.open(prepopulatedMessage, true);
|
||||
},
|
||||
openShareDialog: function(accessKey, s3Url) {
|
||||
this.$.shareDialog.open(accessKey, s3Url);
|
||||
},
|
||||
openGetConnectedDialog: function(inviteUrl) {
|
||||
const dialog = this.$.getConnectedDialog;
|
||||
if (dialog.children.length > 1) {
|
||||
return; // The iframe is already loading.
|
||||
}
|
||||
// Reset the iframe's state, by replacing it with a newly constructed
|
||||
// iframe. Unfortunately the location.reload API does not work in our case due to
|
||||
// this Chrome error:
|
||||
// "Blocked a frame with origin "outline://web_app" from accessing a cross-origin frame."
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.onload = function() {
|
||||
dialog.open();
|
||||
};
|
||||
iframe.src = inviteUrl;
|
||||
dialog.insertBefore(iframe, dialog.children[0]);
|
||||
},
|
||||
closeGetConnectedDialog: function() {
|
||||
const dialog = this.$.getConnectedDialog;
|
||||
dialog.close();
|
||||
const oldIframe = dialog.children[0];
|
||||
dialog.removeChild(oldIframe);
|
||||
},
|
||||
showMetricsDialogForNewServer: function() {
|
||||
this.$.metricsDialog.showMetricsOptInDialog();
|
||||
},
|
||||
// Returns a Promise which fulfills with the index of the button clicked.
|
||||
showModalDialog: function(title, text, buttons) {
|
||||
return this.$.modalDialog.open(title, text, buttons);
|
||||
},
|
||||
closeModalDialog: function(title, text, buttons) {
|
||||
return this.$.modalDialog.close();
|
||||
},
|
||||
showLicensesTapped: function () {
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.onload = () => {
|
||||
this.$.licensesText.innerText = xhr.responseText;
|
||||
this.$.licenses.open();
|
||||
};
|
||||
xhr.onerror = () => {
|
||||
console.error('could not load license.txt');
|
||||
};
|
||||
xhr.open('GET', '/ui_components/licenses/licenses.txt', true);
|
||||
xhr.send();
|
||||
},
|
||||
_computeShouldShowSideBar: function() {
|
||||
const drawerNarrow = this.$.drawerLayout.narrow;
|
||||
const drawerOpened = this.$.appDrawer.opened;
|
||||
if (drawerOpened && drawerNarrow) {
|
||||
this.shouldShowSideBar = false;
|
||||
} else {
|
||||
this.shouldShowSideBar = drawerNarrow;
|
||||
}
|
||||
},
|
||||
_computeSideBarMarginClass: function(shouldShowSideBar) {
|
||||
return shouldShowSideBar ? 'side-bar-margin' : '';
|
||||
},
|
||||
_isServerManaged: function(server) {
|
||||
return server.isManaged;
|
||||
},
|
||||
_isServerManual: function(server) {
|
||||
return !server.isManaged;
|
||||
},
|
||||
_sortServersByName: function(a, b) {
|
||||
const aName = a.name.toUpperCase();
|
||||
const bName = b.name.toUpperCase();
|
||||
if (aName < bName) {
|
||||
return -1;
|
||||
} else if (aName > bName) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
_computeServerClasses: function(selectedServer, server) {
|
||||
let serverClasses = [];
|
||||
if (this._isServerSelected(selectedServer, server)) {
|
||||
serverClasses.push('selected');
|
||||
}
|
||||
if (!server.isSynced) {
|
||||
serverClasses.push('syncing')
|
||||
}
|
||||
return serverClasses.join(' ');
|
||||
},
|
||||
_computeServerImage: function(selectedServer, server) {
|
||||
if (this._isServerSelected(selectedServer, server)) {
|
||||
return 'server-icon-selected.png';
|
||||
}
|
||||
return 'server-icon.png';
|
||||
},
|
||||
_isServerSelected: function(selectedServer, server) {
|
||||
return !!selectedServer && selectedServer.id === server.id;
|
||||
},
|
||||
_showServer: function(event) {
|
||||
const server = event.model.server;
|
||||
this.fire('ShowServerRequested', {displayServerId: server.id });
|
||||
this.maybeCloseDrawer();
|
||||
},
|
||||
_computeLanguage: function (LANGUAGES_AVAILABLE, DEFAULT_LANGUAGE) {
|
||||
return OutlineI18n.getBestMatchingLanguage(
|
||||
Object.keys(LANGUAGES_AVAILABLE)) || DEFAULT_LANGUAGE;
|
||||
},
|
||||
// Wrapper to encode a string in base64. This is necessary to set the server view IDs to
|
||||
// the display server IDs, which are URLs, so they can be used with selector methods. The IDs
|
||||
// are never decoded.
|
||||
_base64Encode: function(s) {
|
||||
return btoa(s).replace(/=/g, '');
|
||||
},
|
||||
});
|
||||
</script>
|
||||
</dom-module>
|
||||
|
|
|
|||
431
src/server_manager/ui_components/app_root.ts
Normal file
431
src/server_manager/ui_components/app_root.ts
Normal file
|
|
@ -0,0 +1,431 @@
|
|||
// Copyright 2018 The Outline Authors
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
import {DisplayServer} from '../web_app/display_server';
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
declare function Polymer(o: any): void;
|
||||
|
||||
// TODO: Import outline-i18n as a module, rather than a window global
|
||||
declare namespace OutlineI18n {
|
||||
function getBestMatchingLanguage(languages: object): string;
|
||||
}
|
||||
|
||||
const TOS_ACK_LOCAL_STORAGE_KEY = 'tos-ack';
|
||||
|
||||
// TODO: Convert to a PolymerElement class
|
||||
Polymer({
|
||||
is: 'app-root',
|
||||
behaviors: [
|
||||
// tslint:disable-next-line:no-any
|
||||
(Polymer as any).AppLocalizeBehavior
|
||||
],
|
||||
properties: {
|
||||
LANGUAGES_AVAILABLE: {
|
||||
type: Object,
|
||||
readonly: true,
|
||||
value: {
|
||||
am: {id: 'am', dir: 'ltr'},
|
||||
ar: {id: 'ar', dir: 'rtl'},
|
||||
bg: {id: 'bg', dir: 'ltr'},
|
||||
ca: {id: 'ca', dir: 'ltr'},
|
||||
cs: {id: 'cs', dir: 'ltr'},
|
||||
da: {id: 'da', dir: 'ltr'},
|
||||
de: {id: 'de', dir: 'ltr'},
|
||||
el: {id: 'el', dir: 'ltr'},
|
||||
en: {id: 'en', dir: 'ltr'},
|
||||
'es-419': {id: 'es-419', dir: 'ltr'},
|
||||
fa: {id: 'fa', dir: 'rtl'},
|
||||
fi: {id: 'fi', dir: 'ltr'},
|
||||
fil: {id: 'fil', dir: 'ltr'},
|
||||
fr: {id: 'fr', dir: 'ltr'},
|
||||
he: {id: 'he', dir: 'rtl'},
|
||||
hi: {id: 'hi', dir: 'ltr'},
|
||||
hr: {id: 'hr', dir: 'ltr'},
|
||||
hu: {id: 'hu', dir: 'ltr'},
|
||||
id: {id: 'id', dir: 'ltr'},
|
||||
it: {id: 'it', dir: 'ltr'},
|
||||
ja: {id: 'ja', dir: 'ltr'},
|
||||
ko: {id: 'ko', dir: 'ltr'},
|
||||
km: {id: 'km', dir: 'ltr'},
|
||||
lt: {id: 'lt', dir: 'ltr'},
|
||||
lv: {id: 'lv', dir: 'ltr'},
|
||||
nl: {id: 'nl', dir: 'ltr'},
|
||||
no: {id: 'no', dir: 'ltr'},
|
||||
pl: {id: 'pl', dir: 'ltr'},
|
||||
'pt-BR': {id: 'pt-BR', dir: 'ltr'},
|
||||
ro: {id: 'ro', dir: 'ltr'},
|
||||
ru: {id: 'ru', dir: 'ltr'},
|
||||
sk: {id: 'sk', dir: 'ltr'},
|
||||
sl: {id: 'sl', dir: 'ltr'},
|
||||
sr: {id: 'sr', dir: 'ltr'},
|
||||
'sr-Latn': {id: 'sr-Latn', dir: 'ltr'},
|
||||
sv: {id: 'sv', dir: 'ltr'},
|
||||
th: {id: 'th', dir: 'ltr'},
|
||||
tr: {id: 'tr', dir: 'ltr'},
|
||||
uk: {id: 'uk', dir: 'ltr'},
|
||||
ur: {id: 'ur', dir: 'rtl'},
|
||||
vi: {id: 'vi', dir: 'ltr'},
|
||||
zh: {id: 'zh', dir: 'ltr'},
|
||||
'zh-CN': {id: 'zh-CN', dir: 'ltr'},
|
||||
'zh-TW': {id: 'zh-TW', dir: 'ltr'},
|
||||
}
|
||||
},
|
||||
DEFAULT_LANGUAGE: {
|
||||
type: String,
|
||||
readonly: true,
|
||||
value: 'en'
|
||||
},
|
||||
useKeyIfMissing: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
language: {
|
||||
type: String,
|
||||
readonly: true,
|
||||
computed: '_computeLanguage(LANGUAGES_AVAILABLE, DEFAULT_LANGUAGE)'
|
||||
},
|
||||
serverList: {
|
||||
type: Array,
|
||||
value: [],
|
||||
},
|
||||
selectedServer: {
|
||||
type: Object, // DisplayServer in display_server.ts
|
||||
value: undefined,
|
||||
},
|
||||
hasManualServers: {
|
||||
type: Boolean,
|
||||
computed: '_computeHasManualServers(serverList.*)',
|
||||
},
|
||||
adminEmail: {
|
||||
type: String,
|
||||
value: ''
|
||||
},
|
||||
isSignedInToDigitalOcean: {
|
||||
type: Boolean,
|
||||
computed: '_computeIsSignedInToDigitalOcean(adminEmail)'
|
||||
},
|
||||
outlineVersion: String,
|
||||
userAcceptedTos: {
|
||||
type: Boolean,
|
||||
// Get notified when the user clicks the OK button in the ToS view
|
||||
observer: '_userAcceptedTosChanged',
|
||||
},
|
||||
hasAcceptedTos: {
|
||||
type: Boolean,
|
||||
computed: '_computeHasAcceptedTermsOfService(userAcceptedTos)'
|
||||
},
|
||||
currentPage: {
|
||||
type: String,
|
||||
value: 'intro'
|
||||
},
|
||||
shouldShowSideBar: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
sideBarMarginClass: {
|
||||
type: String,
|
||||
computed: '_computeSideBarMarginClass(shouldShowSideBar)'
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
'RegionSelected': 'handleRegionSelected',
|
||||
'MetricsChoiceSelected': 'handleMetricsChoiceSelected',
|
||||
'SetUpGenericCloudProviderRequested': 'handleSetUpGenericCloudProviderRequested',
|
||||
'SetUpAwsRequested': 'handleSetUpAwsRequested',
|
||||
'SetUpGcpRequested': 'handleSetUpGcpRequested',
|
||||
'ManualServerEntryCancelled': 'handleManualCancelled'
|
||||
},
|
||||
ready() {
|
||||
const messagesUrl = `/messages/${this.language}.json`;
|
||||
this.loadResources(messagesUrl, this.language);
|
||||
const languageProperties = this.LANGUAGES_AVAILABLE[this.language];
|
||||
if (languageProperties && languageProperties.dir === 'rtl') {
|
||||
document.documentElement.setAttribute('dir', 'rtl');
|
||||
this.$.appDrawer.align = 'right';
|
||||
this.$.sideBar.align = 'right';
|
||||
}
|
||||
},
|
||||
showIntro() {
|
||||
this.maybeCloseDrawer();
|
||||
this.selectedServer = undefined;
|
||||
this.currentPage = 'intro';
|
||||
},
|
||||
getDigitalOceanOauthFlow(onCancel: Function) {
|
||||
const oauthFlow = this.$.digitalOceanOauth;
|
||||
oauthFlow.onCancel = onCancel;
|
||||
return oauthFlow;
|
||||
},
|
||||
showDigitalOceanOauthFlow() {
|
||||
this.currentPage = 'digitalOceanOauth';
|
||||
},
|
||||
getAndShowDigitalOceanOauthFlow(onCancel: Function) {
|
||||
this.currentPage = 'digitalOceanOauth';
|
||||
const oauthFlow = this.getDigitalOceanOauthFlow(onCancel);
|
||||
oauthFlow.showConnectAccount();
|
||||
return oauthFlow;
|
||||
},
|
||||
getAndShowRegionPicker() {
|
||||
this.currentPage = 'regionPicker';
|
||||
this.$.regionPicker.init();
|
||||
return this.$.regionPicker;
|
||||
},
|
||||
getManualServerEntry() {
|
||||
return this.$.manualEntry;
|
||||
},
|
||||
showProgress(serverName: string, showCancelButton: boolean) {
|
||||
this.currentPage = 'serverProgressStep';
|
||||
this.$.serverProgressStep.serverName = serverName;
|
||||
this.$.serverProgressStep.showCancelButton = showCancelButton;
|
||||
this.$.serverProgressStep.start();
|
||||
},
|
||||
showServerView() {
|
||||
this.$.serverProgressStep.stop();
|
||||
this.currentPage = 'serverView';
|
||||
},
|
||||
getServerView(displayServerId: string) {
|
||||
if (!displayServerId) {
|
||||
return null;
|
||||
}
|
||||
const selectedServerId = this._base64Encode(displayServerId);
|
||||
return this.$.serverView.querySelector(`#serverView-${selectedServerId}`);
|
||||
},
|
||||
handleRegionSelected(e: Event) {
|
||||
this.fire('SetUpServerRequested', {
|
||||
regionId: this.$.regionPicker.getSelectedRegionId()
|
||||
});
|
||||
},
|
||||
handleSetUpGenericCloudProviderRequested() {
|
||||
this.handleManualServerSelected('generic');
|
||||
},
|
||||
handleSetUpAwsRequested() {
|
||||
this.handleManualServerSelected('aws');
|
||||
},
|
||||
handleSetUpGcpRequested() {
|
||||
this.handleManualServerSelected('gcp');
|
||||
},
|
||||
handleManualServerSelected(cloudProvider: string) {
|
||||
this.$.manualEntry.clear();
|
||||
this.$.manualEntry.cloudProvider = cloudProvider;
|
||||
this.currentPage = 'manualEntry';
|
||||
},
|
||||
handleManualCancelled() {
|
||||
this.currentPage = 'intro';
|
||||
},
|
||||
showError(errorMsg: string) {
|
||||
this.showToast(errorMsg, Infinity);
|
||||
},
|
||||
showNotification(message: string, durationMs=3000) {
|
||||
this.showToast(message, durationMs);
|
||||
},
|
||||
showToast(message: string, duration: number) {
|
||||
const toast = this.$.toast;
|
||||
toast.close();
|
||||
// Defer in order to trigger the toast animation, otherwise the
|
||||
// update happens in place.
|
||||
setTimeout(() => {
|
||||
toast.show({
|
||||
text: message,
|
||||
duration,
|
||||
noOverlap: true
|
||||
});
|
||||
}, 0);
|
||||
},
|
||||
closeError() {
|
||||
this.$.toast.close();
|
||||
},
|
||||
// cb is a function which accepts a single boolean which is true iff
|
||||
// the user chose to retry the failing operation.
|
||||
showConnectivityDialog(cb: (isRetry: boolean) => void) {
|
||||
const dialogTitle = this.localize('error-connectivity-title');
|
||||
const dialogText = this.localize('error-connectivity');
|
||||
this.showModalDialog(dialogTitle, dialogText, [this.localize('cancel'), this.localize('retry')])
|
||||
.then((clickedButtonIndex: number) => {
|
||||
cb(clickedButtonIndex === 1); // pass true if user clicked retry
|
||||
});
|
||||
},
|
||||
getConfirmation(title: string, text: string, confirmButtonText: string, continueFunc: () => void) {
|
||||
this.showModalDialog(title, text, [this.localize('cancel'), confirmButtonText])
|
||||
.then((clickedButtonIndex: number) => {
|
||||
if (clickedButtonIndex === 1) { // user clicked to confirm.
|
||||
continueFunc();
|
||||
}
|
||||
});
|
||||
},
|
||||
showManualServerError(errorTitle: string, errorText: string) {
|
||||
this.showModalDialog(errorTitle, errorText, [this.localize('cancel'), this.localize('retry')])
|
||||
.then((clickedButtonIndex: number) => {
|
||||
if (clickedButtonIndex === 1) {
|
||||
this.$.manualEntry.retryTapped();
|
||||
} else {
|
||||
this.$.manualEntry.cancelTapped();
|
||||
}
|
||||
});
|
||||
},
|
||||
_computeIsSignedInToDigitalOcean(adminEmail: string) {
|
||||
return Boolean(adminEmail);
|
||||
},
|
||||
_computeHasManualServers(serverList: DisplayServer[]) {
|
||||
return this.serverList.filter((server: DisplayServer) => !server.isManaged).length > 0;
|
||||
},
|
||||
_userAcceptedTosChanged(userAcceptedTos: boolean) {
|
||||
if (userAcceptedTos) {
|
||||
window.localStorage[TOS_ACK_LOCAL_STORAGE_KEY] = Date.now();
|
||||
}
|
||||
},
|
||||
_computeHasAcceptedTermsOfService(userAcceptedTos: boolean) {
|
||||
return userAcceptedTos || !!window.localStorage[TOS_ACK_LOCAL_STORAGE_KEY];
|
||||
},
|
||||
_toggleAppDrawer() {
|
||||
const drawerNarrow = this.$.drawerLayout.narrow;
|
||||
const forceNarrow = this.$.drawerLayout.forceNarrow;
|
||||
if (drawerNarrow) {
|
||||
if (forceNarrow) {
|
||||
// The window width is below the responsive threshold. Do not force narrow mode.
|
||||
this.$.drawerLayout.forceNarrow = false;
|
||||
}
|
||||
this.$.appDrawer.toggle();
|
||||
} else {
|
||||
// Forcing narrow mode when the window width is above the responsive threshold effectively
|
||||
// collapses the drawer. Conversely, reverting force narrow expands the drawer.
|
||||
this.$.drawerLayout.forceNarrow = !forceNarrow;
|
||||
}
|
||||
},
|
||||
maybeCloseDrawer() {
|
||||
if (this.$.drawerLayout.narrow || this.$.drawerLayout.forceNarrow) {
|
||||
this.$.appDrawer.close();
|
||||
}
|
||||
},
|
||||
submitFeedbackTapped() {
|
||||
this.$.feedbackDialog.open();
|
||||
},
|
||||
aboutTapped() {
|
||||
this.$.aboutDialog.open();
|
||||
},
|
||||
signOutTapped() {
|
||||
this.fire('SignOutRequested');
|
||||
},
|
||||
openManualInstallFeedback(prepopulatedMessage: string) {
|
||||
this.$.feedbackDialog.open(prepopulatedMessage, true);
|
||||
},
|
||||
openShareDialog(accessKey: string, s3Url: string) {
|
||||
this.$.shareDialog.open(accessKey, s3Url);
|
||||
},
|
||||
openGetConnectedDialog(inviteUrl: string) {
|
||||
const dialog = this.$.getConnectedDialog;
|
||||
if (dialog.children.length > 1) {
|
||||
return; // The iframe is already loading.
|
||||
}
|
||||
// Reset the iframe's state, by replacing it with a newly constructed
|
||||
// iframe. Unfortunately the location.reload API does not work in our case due to
|
||||
// this Chrome error:
|
||||
// "Blocked a frame with origin "outline://web_app" from accessing a cross-origin frame."
|
||||
const iframe = document.createElement('iframe');
|
||||
iframe.onload = () => {
|
||||
dialog.open();
|
||||
};
|
||||
iframe.src = inviteUrl;
|
||||
dialog.insertBefore(iframe, dialog.children[0]);
|
||||
},
|
||||
closeGetConnectedDialog() {
|
||||
const dialog = this.$.getConnectedDialog;
|
||||
dialog.close();
|
||||
const oldIframe = dialog.children[0];
|
||||
dialog.removeChild(oldIframe);
|
||||
},
|
||||
showMetricsDialogForNewServer() {
|
||||
this.$.metricsDialog.showMetricsOptInDialog();
|
||||
},
|
||||
// Returns a Promise which fulfills with the index of the button clicked.
|
||||
showModalDialog(title: string, text: string, buttons: string[]) {
|
||||
return this.$.modalDialog.open(title, text, buttons);
|
||||
},
|
||||
closeModalDialog() {
|
||||
return this.$.modalDialog.close();
|
||||
},
|
||||
showLicensesTapped() {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.onload = () => {
|
||||
this.$.licensesText.innerText = xhr.responseText;
|
||||
this.$.licenses.open();
|
||||
};
|
||||
xhr.onerror = () => {
|
||||
console.error('could not load license.txt');
|
||||
};
|
||||
xhr.open('GET', '/ui_components/licenses/licenses.txt', true);
|
||||
xhr.send();
|
||||
},
|
||||
_computeShouldShowSideBar() {
|
||||
const drawerNarrow = this.$.drawerLayout.narrow;
|
||||
const drawerOpened = this.$.appDrawer.opened;
|
||||
if (drawerOpened && drawerNarrow) {
|
||||
this.shouldShowSideBar = false;
|
||||
} else {
|
||||
this.shouldShowSideBar = drawerNarrow;
|
||||
}
|
||||
},
|
||||
_computeSideBarMarginClass(shouldShowSideBar: boolean) {
|
||||
return shouldShowSideBar ? 'side-bar-margin' : '';
|
||||
},
|
||||
_isServerManaged(server: DisplayServer) {
|
||||
return server.isManaged;
|
||||
},
|
||||
_isServerManual(server: DisplayServer) {
|
||||
return !server.isManaged;
|
||||
},
|
||||
_sortServersByName(a: DisplayServer, b: DisplayServer) {
|
||||
const aName = a.name.toUpperCase();
|
||||
const bName = b.name.toUpperCase();
|
||||
if (aName < bName) {
|
||||
return -1;
|
||||
} else if (aName > bName) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
_computeServerClasses(selectedServer: DisplayServer, server: DisplayServer) {
|
||||
const serverClasses = [];
|
||||
if (this._isServerSelected(selectedServer, server)) {
|
||||
serverClasses.push('selected');
|
||||
}
|
||||
if (!server.isSynced) {
|
||||
serverClasses.push('syncing');
|
||||
}
|
||||
return serverClasses.join(' ');
|
||||
},
|
||||
_computeServerImage(selectedServer: DisplayServer, server: DisplayServer) {
|
||||
if (this._isServerSelected(selectedServer, server)) {
|
||||
return 'server-icon-selected.png';
|
||||
}
|
||||
return 'server-icon.png';
|
||||
},
|
||||
_isServerSelected(selectedServer: DisplayServer, server: DisplayServer) {
|
||||
return !!selectedServer && selectedServer.id === server.id;
|
||||
},
|
||||
_showServer(event: {model: {server: DisplayServer}}) {
|
||||
const server: DisplayServer = event.model.server;
|
||||
this.fire('ShowServerRequested', {displayServerId: server.id });
|
||||
this.maybeCloseDrawer();
|
||||
},
|
||||
_computeLanguage(LANGUAGES_AVAILABLE: object, DEFAULT_LANGUAGE: string) {
|
||||
return OutlineI18n.getBestMatchingLanguage(
|
||||
Object.keys(LANGUAGES_AVAILABLE)) || DEFAULT_LANGUAGE;
|
||||
},
|
||||
// Wrapper to encode a string in base64. This is necessary to set the server view IDs to
|
||||
// the display server IDs, which are URLs, so they can be used with selector methods. The IDs
|
||||
// are never decoded.
|
||||
_base64Encode(s: string): string {
|
||||
return btoa(s).replace(/=/g, '');
|
||||
},
|
||||
});
|
||||
|
|
@ -31,7 +31,6 @@
|
|||
<link rel='import' href='./outline-help-bubble.html'>
|
||||
<link rel='import' href='./outline-metrics-option-dialog.html'>
|
||||
<link rel='import' href='./outline-server-settings.html'>
|
||||
<link rel='import' href='./outline-share-dialog.html'>
|
||||
|
||||
<script src='../node_modules.js'></script>
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ import * as digitalocean_server from './digitalocean_server';
|
|||
import {DisplayServer, DisplayServerRepository, makeDisplayServer} from './display_server';
|
||||
import {parseManualServerConfig} from './management_urls';
|
||||
|
||||
// Do not delete: used by app-root.html.
|
||||
import '../ui_components/app_root';
|
||||
|
||||
// tslint:disable-next-line:no-any
|
||||
type Polymer = HTMLElement&any;
|
||||
|
||||
|
|
|
|||
170
yarn.lock
170
yarn.lock
|
|
@ -142,6 +142,13 @@
|
|||
through2 "^3.0.0"
|
||||
xdg-basedir "^3.0.0"
|
||||
|
||||
"@polymer/polymer@^3.3.0":
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@polymer/polymer/-/polymer-3.3.0.tgz#52a0665ac29654728e8f46e8ee178c02c49efdd0"
|
||||
integrity sha512-rij7suomS7DxdBamnwr/Xa0V5hpypf7I9oYKseF2FWz5Xh2a3wJNpVjgJy1adXVCxqIyPhghsrthnfCt7EblsQ==
|
||||
dependencies:
|
||||
"@webcomponents/shadycss" "^1.9.1"
|
||||
|
||||
"@sentry/browser@4.0.0-beta.12":
|
||||
version "4.0.0-beta.12"
|
||||
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-4.0.0-beta.12.tgz#dff44c7a3732577057844b1643e0ba38c644138b"
|
||||
|
|
@ -386,6 +393,11 @@
|
|||
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-2.3.5.tgz#9da44ed75571999b65c37b60c9b2b88db54c585d"
|
||||
integrity sha512-SCcK7mvGi3+ZNz833RRjFIxrn4gI1PPR3NtuIS+6vMkvmsGjosqTJwRt5bAEFLRz+wtJMWv8+uOnZf2hi2QXTg==
|
||||
|
||||
"@webcomponents/shadycss@^1.9.1":
|
||||
version "1.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@webcomponents/shadycss/-/shadycss-1.9.2.tgz#6a3a65951b5a97279dd9b92cc277dd815d0e1fad"
|
||||
integrity sha512-GsD7RpDVrVdgC6e+D8zQia8RGNmEGQ9/qotnVPQYPrIXhGS5xSt6ZED9YmuHz3HbLqY+E54tE1EK3tjLzSCGrw==
|
||||
|
||||
JSONStream@^1.0.3:
|
||||
version "1.3.5"
|
||||
resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0"
|
||||
|
|
@ -428,7 +440,7 @@ accepts@~1.3.7:
|
|||
mime-types "~2.1.24"
|
||||
negotiator "0.6.2"
|
||||
|
||||
acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2:
|
||||
acorn-node@^1.2.0, acorn-node@^1.3.0, acorn-node@^1.5.2, acorn-node@^1.6.1:
|
||||
version "1.8.2"
|
||||
resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8"
|
||||
integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==
|
||||
|
|
@ -442,11 +454,6 @@ acorn-walk@^7.0.0:
|
|||
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.0.0.tgz#c8ba6f0f1aac4b0a9e32d1f0af12be769528f36b"
|
||||
integrity sha512-7Bv1We7ZGuU79zZbb6rRqcpxo3OY+zrdtloZWoyD8fmGX+FeXRjE+iuGkZjSXLVovLzrsvMGMy0EkwA0E0umxg==
|
||||
|
||||
acorn@^5.2.1:
|
||||
version "5.7.3"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
|
||||
integrity sha512-T/zvzYRfbVojPWahDsE5evJdHb3oJoQfFbsrKM7w5Zcs++Tr257tia3BmMP8XYVjp1S9RZXQMh7gao96BlqZOw==
|
||||
|
||||
acorn@^7.0.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.1.0.tgz#949d36f2c292535da602283586c2477c57eb2d6c"
|
||||
|
|
@ -1070,10 +1077,10 @@ browserify-zlib@~0.2.0:
|
|||
dependencies:
|
||||
pako "~1.0.5"
|
||||
|
||||
browserify@^14.5.0:
|
||||
version "14.5.0"
|
||||
resolved "https://registry.yarnpkg.com/browserify/-/browserify-14.5.0.tgz#0bbbce521acd6e4d1d54d8e9365008efb85a9cc5"
|
||||
integrity sha512-gKfOsNQv/toWz+60nSPfYzuwSEdzvV2WdxrVPUbPD/qui44rAkB3t3muNtmmGYHqrG56FGwX9SUEQmzNLAeS7g==
|
||||
browserify@^16.5.0:
|
||||
version "16.5.0"
|
||||
resolved "https://registry.yarnpkg.com/browserify/-/browserify-16.5.0.tgz#a1c2bc0431bec11fd29151941582e3f645ede881"
|
||||
integrity sha512-6bfI3cl76YLAnCZ75AGu/XPOsqUhRyc0F/olGIJeCxtfxF2HvPKEcmjU9M8oAPxl4uBY1U7Nry33Q6koV3f2iw==
|
||||
dependencies:
|
||||
JSONStream "^1.0.3"
|
||||
assert "^1.4.0"
|
||||
|
|
@ -1082,15 +1089,15 @@ browserify@^14.5.0:
|
|||
browserify-zlib "~0.2.0"
|
||||
buffer "^5.0.2"
|
||||
cached-path-relative "^1.0.0"
|
||||
concat-stream "~1.5.1"
|
||||
concat-stream "^1.6.0"
|
||||
console-browserify "^1.1.0"
|
||||
constants-browserify "~1.0.0"
|
||||
crypto-browserify "^3.0.0"
|
||||
defined "^1.0.0"
|
||||
deps-sort "^2.0.0"
|
||||
domain-browser "~1.1.0"
|
||||
domain-browser "^1.2.0"
|
||||
duplexer2 "~0.1.2"
|
||||
events "~1.1.0"
|
||||
events "^2.0.0"
|
||||
glob "^7.1.0"
|
||||
has "^1.0.0"
|
||||
htmlescape "^1.1.0"
|
||||
|
|
@ -1098,7 +1105,8 @@ browserify@^14.5.0:
|
|||
inherits "~2.0.1"
|
||||
insert-module-globals "^7.0.0"
|
||||
labeled-stream-splicer "^2.0.0"
|
||||
module-deps "^4.0.8"
|
||||
mkdirp "^0.5.0"
|
||||
module-deps "^6.0.0"
|
||||
os-browserify "~0.3.0"
|
||||
parents "^1.0.1"
|
||||
path-browserify "~0.0.0"
|
||||
|
|
@ -1111,16 +1119,16 @@ browserify@^14.5.0:
|
|||
shasum "^1.0.0"
|
||||
shell-quote "^1.6.1"
|
||||
stream-browserify "^2.0.0"
|
||||
stream-http "^2.0.0"
|
||||
string_decoder "~1.0.0"
|
||||
stream-http "^3.0.0"
|
||||
string_decoder "^1.1.1"
|
||||
subarg "^1.0.0"
|
||||
syntax-error "^1.1.1"
|
||||
through2 "^2.0.0"
|
||||
timers-browserify "^1.0.1"
|
||||
tty-browserify "~0.0.0"
|
||||
tty-browserify "0.0.1"
|
||||
url "~0.11.0"
|
||||
util "~0.10.1"
|
||||
vm-browserify "~0.0.1"
|
||||
vm-browserify "^1.0.0"
|
||||
xtend "^4.0.0"
|
||||
|
||||
buffer-equal-constant-time@1.0.1:
|
||||
|
|
@ -1236,7 +1244,7 @@ cacheable-request@^6.0.0:
|
|||
normalize-url "^4.1.0"
|
||||
responselike "^1.0.2"
|
||||
|
||||
cached-path-relative@^1.0.0:
|
||||
cached-path-relative@^1.0.0, cached-path-relative@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/cached-path-relative/-/cached-path-relative-1.0.2.tgz#a13df4196d26776220cc3356eb147a52dba2c6db"
|
||||
integrity sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==
|
||||
|
|
@ -1531,7 +1539,7 @@ concat-map@0.0.1:
|
|||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
||||
|
||||
concat-stream@1.6.2, concat-stream@^1.6.0, concat-stream@^1.6.1:
|
||||
concat-stream@1.6.2, concat-stream@^1.6.0, concat-stream@^1.6.1, concat-stream@~1.6.0:
|
||||
version "1.6.2"
|
||||
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
|
||||
integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
|
||||
|
|
@ -1551,15 +1559,6 @@ concat-stream@^2.0.0:
|
|||
readable-stream "^3.0.2"
|
||||
typedarray "^0.0.6"
|
||||
|
||||
concat-stream@~1.5.0, concat-stream@~1.5.1:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.5.2.tgz#708978624d856af41a5a741defdd261da752c266"
|
||||
integrity sha1-cIl4Yk2FavQaWnQd790mHadSwmY=
|
||||
dependencies:
|
||||
inherits "~2.0.1"
|
||||
readable-stream "~2.0.0"
|
||||
typedarray "~0.0.5"
|
||||
|
||||
configstore@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/configstore/-/configstore-4.0.0.tgz#5933311e95d3687efb592c528b922d9262d227e7"
|
||||
|
|
@ -1974,13 +1973,14 @@ detect-node@^2.0.3:
|
|||
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
|
||||
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
|
||||
|
||||
detective@^4.0.0:
|
||||
version "4.7.1"
|
||||
resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.1.tgz#0eca7314338442febb6d65da54c10bb1c82b246e"
|
||||
integrity sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==
|
||||
detective@^5.0.2:
|
||||
version "5.2.0"
|
||||
resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.0.tgz#feb2a77e85b904ecdea459ad897cc90a99bd2a7b"
|
||||
integrity sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==
|
||||
dependencies:
|
||||
acorn "^5.2.1"
|
||||
acorn-node "^1.6.1"
|
||||
defined "^1.0.0"
|
||||
minimist "^1.1.1"
|
||||
|
||||
diff@^4.0.1:
|
||||
version "4.0.1"
|
||||
|
|
@ -2022,10 +2022,10 @@ dom-walk@^0.1.0:
|
|||
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
|
||||
integrity sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=
|
||||
|
||||
domain-browser@~1.1.0:
|
||||
version "1.1.7"
|
||||
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.1.7.tgz#867aa4b093faa05f1de08c06f4d7b21fdf8698bc"
|
||||
integrity sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=
|
||||
domain-browser@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
|
||||
integrity sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==
|
||||
|
||||
domelementtype@1, domelementtype@^1.3.1:
|
||||
version "1.3.1"
|
||||
|
|
@ -2399,10 +2399,10 @@ eventemitter3@^2.0.3:
|
|||
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-2.0.3.tgz#b5e1079b59fb5e1ba2771c0a993be060a58c99ba"
|
||||
integrity sha1-teEHm1n7XhuidxwKmTvgYKWMmbo=
|
||||
|
||||
events@~1.1.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
|
||||
integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=
|
||||
events@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/events/-/events-2.1.0.tgz#2a9a1e18e6106e0e812aa9ebd4a819b3c29c0ba5"
|
||||
integrity sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==
|
||||
|
||||
evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
|
||||
version "1.0.3"
|
||||
|
|
@ -3449,11 +3449,6 @@ indent-string@^2.1.0:
|
|||
dependencies:
|
||||
repeating "^2.0.0"
|
||||
|
||||
indexof@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
|
||||
integrity sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=
|
||||
|
||||
inflight@^1.0.4:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
|
||||
|
|
@ -4404,7 +4399,7 @@ minimist@0.0.8:
|
|||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
||||
integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=
|
||||
|
||||
minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.3, minimist@^1.2.0:
|
||||
minimist@1.2.0, minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=
|
||||
|
|
@ -4439,22 +4434,22 @@ mkdirp@0.5.1, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.1:
|
|||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
module-deps@^4.0.8:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-4.1.1.tgz#23215833f1da13fd606ccb8087b44852dcb821fd"
|
||||
integrity sha1-IyFYM/HaE/1gbMuAh7RIUty4If0=
|
||||
module-deps@^6.0.0:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/module-deps/-/module-deps-6.2.1.tgz#cfe558784060e926824f474b4e647287837cda50"
|
||||
integrity sha512-UnEn6Ah36Tu4jFiBbJVUtt0h+iXqxpLqDvPS8nllbw5RZFmNJ1+Mz5BjYnM9ieH80zyxHkARGLnMIHlPK5bu6A==
|
||||
dependencies:
|
||||
JSONStream "^1.0.3"
|
||||
browser-resolve "^1.7.0"
|
||||
cached-path-relative "^1.0.0"
|
||||
concat-stream "~1.5.0"
|
||||
cached-path-relative "^1.0.2"
|
||||
concat-stream "~1.6.0"
|
||||
defined "^1.0.0"
|
||||
detective "^4.0.0"
|
||||
detective "^5.0.2"
|
||||
duplexer2 "^0.1.2"
|
||||
inherits "^2.0.1"
|
||||
parents "^1.0.0"
|
||||
readable-stream "^2.0.2"
|
||||
resolve "^1.1.3"
|
||||
resolve "^1.4.0"
|
||||
stream-combiner2 "^1.1.1"
|
||||
subarg "^1.0.0"
|
||||
through2 "^2.0.0"
|
||||
|
|
@ -5212,11 +5207,6 @@ process-nextick-args@^2.0.0, process-nextick-args@~2.0.0:
|
|||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||
|
||||
process-nextick-args@~1.0.6:
|
||||
version "1.0.7"
|
||||
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"
|
||||
integrity sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=
|
||||
|
||||
process@~0.11.0:
|
||||
version "0.11.10"
|
||||
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
|
||||
|
|
@ -5436,7 +5426,7 @@ read-pkg@^4.0.1:
|
|||
parse-json "^4.0.0"
|
||||
pify "^3.0.0"
|
||||
|
||||
"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.1.1:
|
||||
"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc"
|
||||
integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==
|
||||
|
|
@ -5458,18 +5448,6 @@ readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable
|
|||
string_decoder "~1.1.1"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readable-stream@~2.0.0:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
|
||||
integrity sha1-j5A0HmilPMySh4jaz80Rs265t44=
|
||||
dependencies:
|
||||
core-util-is "~1.0.0"
|
||||
inherits "~2.0.1"
|
||||
isarray "~1.0.0"
|
||||
process-nextick-args "~1.0.6"
|
||||
string_decoder "~0.10.x"
|
||||
util-deprecate "~1.0.1"
|
||||
|
||||
readdirp@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
|
||||
|
|
@ -5674,7 +5652,7 @@ resolve@1.1.7:
|
|||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
|
||||
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=
|
||||
|
||||
resolve@^1.1.3, resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0:
|
||||
resolve@^1.1.4, resolve@^1.1.6, resolve@^1.1.7, resolve@^1.10.0, resolve@^1.3.2, resolve@^1.4.0:
|
||||
version "1.12.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.12.0.tgz#3fc644a35c84a48554609ff26ec52b66fa577df6"
|
||||
integrity sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w==
|
||||
|
|
@ -6151,15 +6129,14 @@ stream-exhaust@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/stream-exhaust/-/stream-exhaust-1.0.2.tgz#acdac8da59ef2bc1e17a2c0ccf6c320d120e555d"
|
||||
integrity sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==
|
||||
|
||||
stream-http@^2.0.0:
|
||||
version "2.8.3"
|
||||
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc"
|
||||
integrity sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==
|
||||
stream-http@^3.0.0:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-3.1.0.tgz#22fb33fe9b4056b4eccf58bd8f400c4b993ffe57"
|
||||
integrity sha512-cuB6RgO7BqC4FBYzmnvhob5Do3wIdIsXAgGycHJnW+981gHqoYcYz9lqjJrk8WXRddbwPuqPYRl+bag6mYv4lw==
|
||||
dependencies:
|
||||
builtin-status-codes "^3.0.0"
|
||||
inherits "^2.0.1"
|
||||
readable-stream "^2.3.6"
|
||||
to-arraybuffer "^1.0.0"
|
||||
readable-stream "^3.0.6"
|
||||
xtend "^4.0.0"
|
||||
|
||||
stream-shift@^1.0.0:
|
||||
|
|
@ -6262,18 +6239,6 @@ string_decoder@^1.1.1:
|
|||
dependencies:
|
||||
safe-buffer "~5.2.0"
|
||||
|
||||
string_decoder@~0.10.x:
|
||||
version "0.10.31"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
|
||||
integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=
|
||||
|
||||
string_decoder@~1.0.0:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
|
||||
integrity sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==
|
||||
dependencies:
|
||||
safe-buffer "~5.1.0"
|
||||
|
||||
string_decoder@~1.1.1:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||
|
|
@ -6489,11 +6454,6 @@ to-absolute-glob@^2.0.0:
|
|||
is-absolute "^1.0.0"
|
||||
is-negated-glob "^1.0.0"
|
||||
|
||||
to-arraybuffer@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43"
|
||||
integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=
|
||||
|
||||
to-object-path@^0.3.0:
|
||||
version "0.3.0"
|
||||
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
|
||||
|
|
@ -6587,7 +6547,7 @@ tsutils@^2.29.0:
|
|||
dependencies:
|
||||
tslib "^1.8.1"
|
||||
|
||||
tty-browserify@~0.0.0:
|
||||
tty-browserify@0.0.1:
|
||||
version "0.0.1"
|
||||
resolved "https://registry.yarnpkg.com/tty-browserify/-/tty-browserify-0.0.1.tgz#3f05251ee17904dfd0677546670db9651682b811"
|
||||
integrity sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==
|
||||
|
|
@ -6622,7 +6582,7 @@ type@^1.0.1:
|
|||
resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0"
|
||||
integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==
|
||||
|
||||
typedarray@^0.0.6, typedarray@~0.0.5:
|
||||
typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
|
@ -6916,12 +6876,10 @@ vinyl@^2.0.0:
|
|||
remove-trailing-separator "^1.0.1"
|
||||
replace-ext "^1.0.0"
|
||||
|
||||
vm-browserify@~0.0.1:
|
||||
version "0.0.4"
|
||||
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-0.0.4.tgz#5d7ea45bbef9e4a6ff65f95438e0a87c357d5a73"
|
||||
integrity sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=
|
||||
dependencies:
|
||||
indexof "0.0.1"
|
||||
vm-browserify@^1.0.0:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0"
|
||||
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
|
||||
|
||||
wbuf@^1.1.0, wbuf@^1.7.2:
|
||||
version "1.7.3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue