Skip to content

Commit

Permalink
chore: upgrade snjs and sncrypto deps
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Sep 9, 2020
1 parent 86e77ee commit 30f0650
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 27 deletions.
13 changes: 13 additions & 0 deletions dist/@types/app/assets/javascripts/services/bridge.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import { PurePayload, Environment } from "snjs";
/** Platform-specific (i-e Electron/browser) behavior is handled by a Bridge object. */
export interface Bridge {
environment: Environment;
getKeychainValue(): Promise<unknown>;
setKeychainValue(value: any): Promise<void>;
clearKeychainValue(): Promise<void>;
extensionsServerHost?: string;
syncComponents(payloads: PurePayload[]): void;
onMajorDataChange(): void;
onInitialDataLoad(): void;
onSearch(text?: string): void;
}
export declare class BrowserBridge implements Bridge {
environment: Environment;
getKeychainValue(): Promise<unknown>;
setKeychainValue(value: any): Promise<void>;
clearKeychainValue(): Promise<void>;
/** No-ops */
syncComponents(): void;
onMajorDataChange(): void;
onInitialDataLoad(): void;
onSearch(): void;
}
21 changes: 6 additions & 15 deletions dist/@types/app/assets/javascripts/services/desktopManager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@
import { SNComponent, PurePayload } from 'snjs';
import { WebApplication } from '@/ui_models/application';
import { ApplicationService, ApplicationEvent } from 'snjs';
import { Bridge } from './bridge';
declare type UpdateObserverCallback = (component: SNComponent) => void;
declare type ComponentActivationCallback = (payload: PurePayload) => void;
declare type ComponentActivationObserver = {
id: string;
callback: ComponentActivationCallback;
};
export declare class DesktopManager extends ApplicationService {
private bridge;
$rootScope: ng.IRootScopeService;
$timeout: ng.ITimeoutService;
componentActivationObservers: ComponentActivationObserver[];
Expand All @@ -17,14 +19,9 @@ export declare class DesktopManager extends ApplicationService {
}[];
isDesktop: any;
dataLoaded: boolean;
dataLoadHandler?: () => void;
majorDataChangeHandler?: () => void;
extServerHost?: string;
installationSyncHandler?: (payloads: PurePayload[]) => void;
installComponentHandler?: (payload: PurePayload) => void;
lastSearchedText?: string;
searchHandler?: (text?: string) => void;
constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication);
private removeComponentObserver?;
constructor($rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, application: WebApplication, bridge: Bridge);
get webApplication(): WebApplication;
deinit(): void;
onAppEvent(eventName: ApplicationEvent): Promise<void>;
Expand All @@ -36,11 +33,9 @@ export declare class DesktopManager extends ApplicationService {
*/
convertComponentForTransmission(component: SNComponent): Promise<PurePayload>;
syncComponentsInstallation(components: SNComponent[]): void;
installComponent(component: SNComponent): Promise<void>;
registerUpdateObserver(callback: UpdateObserverCallback): () => void;
searchText(text?: string): void;
redoSearch(): void;
desktop_setSearchHandler(handler: (text?: string) => void): void;
desktop_windowGainedFocus(): void;
desktop_windowLostFocus(): void;
desktop_onComponentInstallationComplete(componentData: any, error: any): Promise<void>;
Expand All @@ -50,12 +45,8 @@ export declare class DesktopManager extends ApplicationService {
};
desktop_deregisterComponentActivationObserver(observer: ComponentActivationObserver): void;
notifyComponentActivation(component: SNComponent): Promise<void>;
desktop_setExtServerHost(host: string): void;
desktop_setComponentInstallationSyncHandler(handler: (payloads: PurePayload[]) => void): void;
desktop_setInstallComponentHandler(handler: (payload: PurePayload) => void): void;
desktop_setInitialDataLoadHandler(handler: () => void): void;
desktop_requestBackupFile(callback: (data: any) => void): Promise<void>;
desktop_setMajorDataChangeHandler(handler: () => void): void;
onExtensionsReady(): void;
desktop_requestBackupFile(): Promise<string | undefined>;
desktop_didBeginBackup(): void;
desktop_didFinishBackup(success: boolean): void;
}
Expand Down
1 change: 1 addition & 0 deletions dist/@types/app/assets/javascripts/strings.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export declare const STRING_ENTER_ACCOUNT_PASSWORD = "Enter your account passwor
export declare const STRING_ENTER_PASSCODE_FOR_MIGRATION = "Your application passcode is required to perform an upgrade of your local data storage structure.";
export declare const STRING_STORAGE_UPDATE = "Storage Update";
export declare const STRING_AUTHENTICATION_REQUIRED = "Authentication Required";
export declare const STRING_UNSUPPORTED_BACKUP_FILE_VERSION = "This backup file was created using an unsupported version of the application and cannot be imported here. Please update your application and try again.";
/** @password_change */
export declare const STRING_FAILED_PASSWORD_CHANGE = "There was an error re-encrypting your items. Your password was changed, but not all your items were properly re-encrypted and synced. You should try syncing again. If all else fails, you should restore your notes from backup.";
export declare const STRING_CONFIRM_APP_QUIT_DURING_UPGRADE: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export declare class WebApplication extends SNApplication {
private currentAuthenticationElement?;
editorGroup: EditorGroup;
componentGroup: ComponentGroup;
constructor($compile: ng.ICompileService, $timeout: ng.ITimeoutService, scope: ng.IScope, onDeinit: (app: WebApplication) => void, bridge: Bridge);
constructor($compile: ng.ICompileService, $timeout: ng.ITimeoutService, scope: ng.IScope, onDeinit: (app: WebApplication) => void, defaultSyncServerHost: string, bridge: Bridge);
/** @override */
deinit(): void;
setWebServices(services: WebServices): void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import { WebApplication } from './application';
import { Bridge } from '@/services/bridge';
declare type AppManagerChangeCallback = () => void;
export declare class ApplicationGroup {
private defaultSyncServerHost;
private bridge;
$compile: ng.ICompileService;
$rootScope: ng.IRootScopeService;
$timeout: ng.ITimeoutService;
applications: WebApplication[];
changeObservers: AppManagerChangeCallback[];
activeApplication?: WebApplication;
constructor($compile: ng.ICompileService, $rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, bridge: Bridge);
constructor($compile: ng.ICompileService, $rootScope: ng.IRootScopeService, $timeout: ng.ITimeoutService, defaultSyncServerHost: string, bridge: Bridge);
private createDefaultApplication;
/** @callback */
onApplicationDeinit(application: WebApplication): void;
Expand Down
10 changes: 6 additions & 4 deletions dist/@types/app/assets/javascripts/web_device_interface.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Bridge } from './services/bridge';
export declare class WebDeviceInterface extends DeviceInterface {
private bridge;
private database;
constructor(namespace: string, timeout: any, bridge: Bridge);
constructor(timeout: any, bridge: Bridge);
setApplication(application: SNApplication): void;
deinit(): void;
getRawStorageValue(key: string): Promise<string | null>;
Expand All @@ -24,8 +24,10 @@ export declare class WebDeviceInterface extends DeviceInterface {
saveRawDatabasePayloads(payloads: any[]): Promise<void>;
removeRawDatabasePayloadWithId(id: string): Promise<void>;
removeAllRawDatabasePayloads(): Promise<void>;
getKeychainValue(): Promise<unknown>;
setKeychainValue(value: any): Promise<void>;
clearKeychainValue(): Promise<void>;
getNamespacedKeychainValue(): Promise<any>;
setNamespacedKeychainValue(value: any): Promise<void>;
clearNamespacedKeychainValue(): Promise<void>;
getRawKeychainValue(): Promise<any>;
clearRawKeychainValue(): Promise<void>;
openUrl(url: string): void;
}
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"webpack-merge": "^4.2.2"
},
"dependencies": {
"sncrypto": "github:standardnotes/sncrypto#49732d8215312a08a71b833b79e94ba7c1872e11",
"snjs": "github:standardnotes/snjs#ee696470fa0d5e762a39ce179f215052327acbc3"
"sncrypto": "github:standardnotes/sncrypto#0b12b9748fde7c82e48609836838953b03c9200a",
"snjs": "github:standardnotes/snjs#bb04a94a9b91f2ce95ecb55f823d4a98a6654291"
}
}

0 comments on commit 30f0650

Please sign in to comment.