chore(version-snjs): 2.7.18

This commit is contained in:
Antonella Sgarlatta
2021-07-13 19:23:14 -03:00
parent 0e67f78259
commit b1aeaeac41
10 changed files with 8 additions and 24 deletions

View File

@@ -10,11 +10,9 @@ APP_HOST=http://localhost:3001
EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
SF_DEFAULT_SERVER=http://localhost:3000 SF_DEFAULT_SERVER=http://localhost:3000
SF_NEXT_VERSION_SERVER=http://localhost:3000
# Development options # Development options
DEV_DEFAULT_SYNC_SERVER=https://sync.standardnotes.org DEV_DEFAULT_SYNC_SERVER=https://api.standardnotes.com
DEV_NEXT_VERSION_SYNC_SERVER=https://api.standardnotes.com
DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html DEV_EXTENSIONS_MANAGER_LOCATION=public/extensions/extensions-manager/dist/index.html
ENABLE_UNFINISHED_FEATURES=false ENABLE_UNFINISHED_FEATURES=false

View File

@@ -107,13 +107,10 @@ The web app makes use of two optional native extensions, which, when running the
EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html EXTENSIONS_MANAGER_LOCATION=extensions/extensions-manager/dist/index.html
``` ```
You can also set the `SF_DEFAULT_SERVER` and `SF_NEXT_VERSION_SERVER` environment variables to set the default servers for login and registration. You can also set the `SF_DEFAULT_SERVER` environment variable to set the default server for login and registration.
> **Note:** SF_NEXT_VERSION_SERVER can point to the same server. It is used for gradual upgrade of API versions.
``` ```
SF_DEFAULT_SERVER=https://sync.myserver SF_DEFAULT_SERVER=https://sync.myserver
SF_NEXT_VERSION_SERVER=https://sync.myserver
``` ```
--- ---

View File

@@ -91,7 +91,6 @@ function reloadHiddenFirefoxTab(): boolean {
const startApplication: StartApplication = async function startApplication( const startApplication: StartApplication = async function startApplication(
defaultSyncServerHost: string, defaultSyncServerHost: string,
bridge: Bridge, bridge: Bridge,
nextVersionSyncServerHost: string
) { ) {
if (reloadHiddenFirefoxTab()) { if (reloadHiddenFirefoxTab()) {
return; return;
@@ -108,7 +107,6 @@ const startApplication: StartApplication = async function startApplication(
.config(configRoutes) .config(configRoutes)
.constant('bridge', bridge) .constant('bridge', bridge)
.constant('defaultSyncServerHost', defaultSyncServerHost) .constant('defaultSyncServerHost', defaultSyncServerHost)
.constant('nextVersionSyncServerHost', nextVersionSyncServerHost)
.constant('appVersion', bridge.appVersion); .constant('appVersion', bridge.appVersion);
// Controllers // Controllers
@@ -195,7 +193,6 @@ if (__WEB__) {
startApplication( startApplication(
(window as any)._default_sync_server, (window as any)._default_sync_server,
new BrowserBridge(__VERSION__), new BrowserBridge(__VERSION__),
(window as any)._next_version_sync_server
); );
} else { } else {
(window as any).startApplication = startApplication; (window as any).startApplication = startApplication;

View File

@@ -3,5 +3,4 @@ import { Bridge } from "./services/bridge";
export type StartApplication = ( export type StartApplication = (
defaultSyncServerHost: string, defaultSyncServerHost: string,
bridge: Bridge, bridge: Bridge,
nextVersionSyncServerHost: string
) => Promise<void>; ) => Promise<void>;

View File

@@ -53,7 +53,6 @@ export class WebApplication extends SNApplication {
scope: angular.IScope, scope: angular.IScope,
defaultSyncServerHost: string, defaultSyncServerHost: string,
public bridge: Bridge, public bridge: Bridge,
nextVersionSyncServerHost: string,
) { ) {
super( super(
bridge.environment, bridge.environment,
@@ -64,7 +63,6 @@ export class WebApplication extends SNApplication {
identifier, identifier,
[], [],
defaultSyncServerHost, defaultSyncServerHost,
nextVersionSyncServerHost,
); );
this.$compile = $compile; this.$compile = $compile;
this.scope = scope; this.scope = scope;

View File

@@ -29,7 +29,6 @@ export class ApplicationGroup extends SNApplicationGroup {
$timeout: ng.ITimeoutService, $timeout: ng.ITimeoutService,
private defaultSyncServerHost: string, private defaultSyncServerHost: string,
private bridge: Bridge, private bridge: Bridge,
private nextVersionSyncServerHost: string,
) { ) {
super(new WebDeviceInterface($timeout, bridge)); super(new WebDeviceInterface($timeout, bridge));
this.$compile = $compile; this.$compile = $compile;
@@ -64,7 +63,6 @@ export class ApplicationGroup extends SNApplicationGroup {
scope, scope,
this.defaultSyncServerHost, this.defaultSyncServerHost,
this.bridge, this.bridge,
this.nextVersionSyncServerHost,
); );
const appState = new AppState( const appState = new AppState(
this.$rootScope, this.$rootScope,

View File

@@ -30,7 +30,6 @@
<script> <script>
window._default_sync_server = "<%= ENV['SF_DEFAULT_SERVER'] %>"; window._default_sync_server = "<%= ENV['SF_DEFAULT_SERVER'] %>";
window._next_version_sync_server = "<%= ENV['SF_NEXT_VERSION_SERVER'] || ENV['SF_DEFAULT_SERVER'] %>";
window._extensions_manager_location = "<%= ENV['EXTENSIONS_MANAGER_LOCATION'] %>"; window._extensions_manager_location = "<%= ENV['EXTENSIONS_MANAGER_LOCATION'] %>";
window._batch_manager_location = "<%= ENV['BATCH_MANAGER_LOCATION'] %>"; window._batch_manager_location = "<%= ENV['BATCH_MANAGER_LOCATION'] %>";
window._bugsnag_api_key = "<%= ENV['BUGSNAG_API_KEY'] %>"; window._bugsnag_api_key = "<%= ENV['BUGSNAG_API_KEY'] %>";

View File

@@ -30,14 +30,12 @@
<body <body
data-default-sync-server="<%= env.DEV_DEFAULT_SYNC_SERVER %>" data-default-sync-server="<%= env.DEV_DEFAULT_SYNC_SERVER %>"
data-next-version-sync-server="<%= env.DEV_NEXT_VERSION_SYNC_SERVER || env.DEV_DEFAULT_SYNC_SERVER %>"
data-extensions-manager-location="<%= env.DEV_EXTENSIONS_MANAGER_LOCATION %>" data-extensions-manager-location="<%= env.DEV_EXTENSIONS_MANAGER_LOCATION %>"
data-bugsnag-api-key="<%= env.DEV_BUGSNAG_API_KEY %>" data-bugsnag-api-key="<%= env.DEV_BUGSNAG_API_KEY %>"
data-enable-unfinished-features="<%= env.ENABLE_UNFINISHED_FEATURES %>" data-enable-unfinished-features="<%= env.ENABLE_UNFINISHED_FEATURES %>"
> >
<script> <script>
window._default_sync_server = document.body.dataset.defaultSyncServer || "https://sync.standardnotes.org"; window._default_sync_server = document.body.dataset.defaultSyncServer || "https://api.standardnotes.com";
window._next_version_sync_server = document.body.dataset.nextVersionSyncServer || "https://api.standardnotes.com";
window._extensions_manager_location = document.body.dataset.extensionsManagerLocation || "public/extensions/extensions-manager/dist/index.html"; window._extensions_manager_location = document.body.dataset.extensionsManagerLocation || "public/extensions/extensions-manager/dist/index.html";
window._bugsnag_api_key = document.body.dataset.bugsnagApiKey; window._bugsnag_api_key = document.body.dataset.bugsnagApiKey;
window._enable_unfinished_features = document.body.dataset.enableUnfinishedFeatures === 'true'; window._enable_unfinished_features = document.body.dataset.enableUnfinishedFeatures === 'true';

View File

@@ -71,7 +71,7 @@
"@reach/checkbox": "^0.13.2", "@reach/checkbox": "^0.13.2",
"@reach/dialog": "^0.13.0", "@reach/dialog": "^0.13.0",
"@standardnotes/sncrypto-web": "1.2.10", "@standardnotes/sncrypto-web": "1.2.10",
"@standardnotes/snjs": "2.7.17", "@standardnotes/snjs": "2.7.18",
"mobx": "^6.1.6", "mobx": "^6.1.6",
"mobx-react-lite": "^3.2.0", "mobx-react-lite": "^3.2.0",
"preact": "^10.5.12" "preact": "^10.5.12"

View File

@@ -2029,10 +2029,10 @@
"@standardnotes/sncrypto-common" "^1.2.7" "@standardnotes/sncrypto-common" "^1.2.7"
libsodium-wrappers "^0.7.8" libsodium-wrappers "^0.7.8"
"@standardnotes/snjs@2.7.17": "@standardnotes/snjs@2.7.18":
version "2.7.17" version "2.7.18"
resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.17.tgz#e83986e637dbfdb9ac0d94270c6a3d7391de88ce" resolved "https://registry.yarnpkg.com/@standardnotes/snjs/-/snjs-2.7.18.tgz#90dd33576176da53714438e0819eef180c221381"
integrity sha512-M030ex34TTMXWTTWu2ViSYEHKTScf1xbC03IIysxC9BRYpwAh996V5RQQiUW3jiW0XMHXxFYN/XhKGYHn5bixw== integrity sha512-fXv91FhsxLRMK9KR1LLNzG/k9vdnMqrqMwQrfRECDqJRG2iZvlvVqzgWKBCYtCvLRHSRnFmt0xPKA2yuTkZqpA==
dependencies: dependencies:
"@standardnotes/auth" "^2.0.0" "@standardnotes/auth" "^2.0.0"
"@standardnotes/sncrypto-common" "^1.2.9" "@standardnotes/sncrypto-common" "^1.2.9"