Skip to content

Commit

Permalink
@bentley/imodeljs-native 2.13.0 (#751)
Browse files Browse the repository at this point in the history
* Presentation: Enable an option for presentation backend to use memory mapped i/o for worker SQLite connections (#690)

* presentation/default units (#657)

* Add default-units functionality and testing

* change and API

* PR Fixes

* PR fixes

* renaming

* PR fix

* style fix

* PR fixes

* NextVersion and minor fixes

* PR fixes

* minor fix

* PR fixes

* minor fix

* Presentation: Enforce result paging for hierarchy compare (#678)

* Enforce hierarchy compare result paging

* extract-api

* rush change

* Restore broken public api

* rush extract-api

* Rename to 'continuationToken'

* Add test for hierarchy compare paging

* Update RPC version

* Adjustments to latest ECDb changes for moving properties (#730)

* rework IModelApp and IModelHost initialization (#687)

* add ipc response handler

* use responseHandler for NativeApp

* extract-api

* split out TxnManager

* extract-api, again

* remove EventSink and EventSource

* wip

* wip

* get tests working

* ElectronHost and ElectronApp

* clean up startup code

* clean up documenation

* work on mobile-manager

* wip

* add mobile-manager

* IOSApp and AndroidApp

* directory case change

* wip

* wip

* lint cleanup

* use Ipc for StandaloneConnection

* clean up documentation

* rename callBackend to callXxxHost

* clear subcategories in beforeClose rather than in each subclass

* deprecate RemoteBriefcaseConnection, added RemoteIModelConnection

* extract-api

* rename RemoteIModelConnection to CheckpointConnection

* more documentation

* always import IModelStatus from bentleyjs-core in backend

* fix presentation-backend test failures

* Get presentation update-related tests working again

* Update docs/learning/backend/IModelHost.md

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>

* Update core/common/tsconfig.json

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>

* add ProcessDetector

* extract-api

* make StandaloneConnection subclass of BriefcaseConnection

* use IModelDb rather than BriefcaseDb for IModelWriteRpc

* Working mockmobile tests

* restore mobileeventloop

* restored previous mobile ipc fix

* eliminate StandaloneConnection class

* fix openStandalone test

* remove naked require('electron') in favor of ElectronHost.electron

* fix for restarting IModelApp in InteractiveEditingSession.test

* fix interactiveEditingSession test

* fix IModelVersion interface

* fix lint errors

* steps toward getting mobile app working...still an issue in oidc

* typo...authInit being called now. just need a MobileHost.device now, I think

* move websocket ipc to mobilehost...still need to port device over

* IOSDevice back in action. App launches...but no tiles???

* rework IOSHost.startup

* typo

* documentation for TxnManager

* fix lint errors

* rename StandaloneConnection test to OpenStandalone

* ios/mobile refactoring

* api

* add test for classNameToId and classIdToName

* NextVersion.md

* typo

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
Co-authored-by: swbsi <69857376+swbsi@users.noreply.github.com>

* lint

* extract-api

* merge

* lint errors

* documenation descriptions

* doc errors

* documentation cleanup

* revert ecschema-metadata changes

Co-authored-by: Grigas <35135765+grigasp@users.noreply.github.com>
Co-authored-by: aurislt7 <30312645+aurislt7@users.noreply.github.com>
Co-authored-by: Saulius Skliutas <24278440+saskliutas@users.noreply.github.com>
Co-authored-by: Robert Schili <rschili@users.noreply.github.com>
Co-authored-by: kabentley <33296803+kabentley@users.noreply.github.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: swbsi <69857376+swbsi@users.noreply.github.com>
Co-authored-by: Caleb Shafer <31107829+calebmshafer@users.noreply.github.com>
  • Loading branch information
8 people authored Feb 11, 2021
2 parents 8a5a8af + fe9a5a2 commit c69ea6d
Show file tree
Hide file tree
Showing 297 changed files with 8,510 additions and 7,350 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*/

import { UserManager, UserManagerSettings } from "oidc-client";
import { assert, isElectronRenderer } from "@bentley/bentleyjs-core";
import { BrowserAuthorizationLogger } from "./BrowserAuthorizationLogger";

export abstract class BrowserAuthorizationBase<TConfig> {
Expand All @@ -18,8 +17,6 @@ export abstract class BrowserAuthorizationBase<TConfig> {
protected _advancedSettings?: UserManagerSettings;

protected constructor(configuration: TConfig) {
assert(!isElectronRenderer, "Cannot use Browser-based authorization classes within Electron");

this._basicSettings = configuration;
BrowserAuthorizationLogger.initializeLogger();
}
Expand Down
24 changes: 21 additions & 3 deletions common/api/bentleyjs-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export enum ChangeSetStatus {
NoTransactions = 90127,
ParentMismatch = 90128,
ProcessSchemaChangesOnOpen = 90134,
ReverseOrReinstateSchemaChangesOnOpen = 90133,
ReverseOrReinstateSchemaChanges = 90133,
SQLiteError = 90129,
// (undocumented)
Success = 0,
Expand Down Expand Up @@ -1005,10 +1005,10 @@ export class IndexMap<T> {
protected readonly _maximumSize: number;
}

// @internal
// @internal @deprecated
export const isElectronMain: boolean;

// @internal
// @internal @deprecated
export const isElectronRenderer: boolean;

// @public
Expand Down Expand Up @@ -1249,6 +1249,24 @@ export class PriorityQueue<T> implements Iterable<T> {
protected _swap(a: number, b: number): void;
}

// @beta
export class ProcessDetector {
static get isAndroidAppBackend(): boolean;
static get isAndroidAppFrontend(): boolean;
static get isAndroidBrowser(): boolean;
static get isBrowserProcess(): boolean;
static get isElectronAppBackend(): boolean;
static get isElectronAppFrontend(): boolean;
static get isIOSAppBackend(): boolean;
static get isIOSAppFrontend(): boolean;
static get isIOSBrowser(): boolean;
static get isIpadBrowser(): boolean;
static get isMobileAppBackend(): boolean;
static get isMobileAppFrontend(): boolean;
static get isMobileBrowser(): boolean;
static get isNodeProcess(): boolean;
}

// @public
export class ReadonlyOrderedSet<T> implements Iterable<T> {
[Symbol.iterator](): Iterator<T>;
Expand Down
67 changes: 41 additions & 26 deletions common/api/electron-manager.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,65 @@
```ts

import { AsyncMethodsOf } from '@bentley/imodeljs-frontend';
import { BrowserWindow } from 'electron';
import { BrowserWindowConstructorOptions } from 'electron';
import { IpcHandler } from '@bentley/imodeljs-common';
import { IpcListener } from '@bentley/imodeljs-common';
import { IpcSocketBackend } from '@bentley/imodeljs-common';
import { RemoveFunction } from '@bentley/imodeljs-common';
import { DesktopAuthorizationClient } from '@bentley/imodeljs-backend';
import { IModelAppOptions } from '@bentley/imodeljs-frontend';
import { IModelHostConfiguration } from '@bentley/imodeljs-backend';
import { IpcHandler } from '@bentley/imodeljs-backend';
import { PromiseReturnType } from '@bentley/imodeljs-frontend';
import { RpcConfiguration } from '@bentley/imodeljs-common';
import { RpcInterfaceDefinition } from '@bentley/imodeljs-common';

// @internal
export class DesktopAuthorizationClientIpc {
static get desktopAuthorizationClient(): DesktopAuthorizationClient | undefined;
static initializeIpc(): void;
}

// @beta
export class ElectronBackend implements IpcSocketBackend {
// @internal (undocumented)
addListener(channel: string, listener: IpcListener): RemoveFunction;
export class ElectronApp {
static callApp<T extends AsyncMethodsOf<Electron.App>>(methodName: T, ...args: Parameters<Electron.App[T]>): Promise<PromiseReturnType<Electron.App[T]>>;
static callDialog<T extends AsyncMethodsOf<Electron.Dialog>>(methodName: T, ...args: Parameters<Electron.Dialog[T]>): Promise<PromiseReturnType<Electron.Dialog[T]>>;
static callShell<T extends AsyncMethodsOf<Electron.Shell>>(methodName: T, ...args: Parameters<Electron.Shell[T]>): Promise<PromiseReturnType<Electron.Shell[T]>>;
// (undocumented)
static get isValid(): boolean;
// (undocumented)
get app(): Electron.App;
static shutdown(): Promise<void>;
static startup(opts?: {
iModelApp?: IModelAppOptions;
}): Promise<void>;
}

// @beta
export class ElectronHost {
// (undocumented)
readonly appIconPath: string;
static get app(): Electron.App;
// (undocumented)
get electron(): typeof Electron;
static appIconPath: string;
// (undocumented)
protected readonly _electronFrontend = "electron://frontend/";
static get electron(): typeof Electron;
// (undocumented)
readonly frontendURL: string;
// @internal (undocumented)
handle(channel: string, listener: (evt: any, ...args: any[]) => Promise<any>): RemoveFunction;
static initialize(opts?: ElectronBackendOptions): ElectronBackend;
static frontendURL: string;
// (undocumented)
static get instance(): ElectronBackend;
static get ipcMain(): Electron.IpcMain;
// (undocumented)
get ipcMain(): Electron.IpcMain;
get mainWindow(): BrowserWindow | undefined;
openMainWindow(windowOptions?: BrowserWindowConstructorOptions): Promise<void>;
// @internal (undocumented)
removeListener(channel: string, listener: IpcListener): void;
static get isValid(): boolean;
static get mainWindow(): BrowserWindow | undefined;
static openMainWindow(windowOptions?: BrowserWindowConstructorOptions): Promise<void>;
// (undocumented)
readonly rpcConfig: RpcConfiguration;
// @internal (undocumented)
send(channel: string, ...args: any[]): void;
static rpcConfig: RpcConfiguration;
static startup(opts?: {
electronHost?: ElectronHostOptions;
iModelHost?: IModelHostConfiguration;
}): Promise<void>;
// (undocumented)
readonly webResourcesPath: string;
static webResourcesPath: string;
}

// @beta
export interface ElectronBackendOptions {
export interface ElectronHostOptions {
developmentServer?: boolean;
frontendPort?: number;
frontendURL?: string;
Expand Down
Loading

0 comments on commit c69ea6d

Please sign in to comment.