update deps & fix compilation

This commit is contained in:
王劲鹏 2020-01-10 16:19:53 +08:00 committed by osborn
parent 50147329a4
commit 54b79e7f1e
10 changed files with 326 additions and 326 deletions

View File

@ -22,11 +22,11 @@
"dependencies": { "dependencies": {
"child_process": "^1.0.2", "child_process": "^1.0.2",
"chokidar": "^3.3.1", "chokidar": "^3.3.1",
"commander": "^4.0.1", "commander": "^4.1.0",
"keypress": "^0.2.1", "keypress": "^0.2.1",
"nodejs-websocket": "^1.7.2", "nodejs-websocket": "^1.7.2",
"qrcode-terminal": "^0.12.0", "qrcode-terminal": "^0.12.0",
"rollup": "^1.28.0", "rollup": "^1.29.0",
"shelljs": "^0.8.3", "shelljs": "^0.8.3",
"source-map-merger": "^0.2.0", "source-map-merger": "^0.2.0",
"typescript": "^3.7.4" "typescript": "^3.7.4"

View File

@ -11,10 +11,10 @@
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-node-resolve": "^6.1.0", "@rollup/plugin-node-resolve": "^7.0.0",
"doric": "file:../doric-js", "doric": "file:../doric-js",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"rollup": "^1.28.0", "rollup": "^1.29.0",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"typescript": "^3.7.4" "typescript": "^3.7.4"
} }

View File

@ -766,7 +766,7 @@ class Panel {
this.context.shader.render(model); this.context.shader.render(model);
} }
hookBeforeNativeCall() { hookBeforeNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
this.__root__.clean(); this.__root__.clean();
for (let map of this.headviews.values()) { for (let map of this.headviews.values()) {
for (let v of map.values()) { for (let v of map.values()) {
@ -776,7 +776,7 @@ class Panel {
} }
} }
hookAfterNativeCall() { hookAfterNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
//Here insert a native call to ensure the promise is resolved done. //Here insert a native call to ensure the promise is resolved done.
nativeEmpty(); nativeEmpty();
if (this.__root__.isDirty()) { if (this.__root__.isDirty()) {

View File

@ -2225,7 +2225,7 @@ class Panel {
this.context.shader.render(model); this.context.shader.render(model);
} }
hookBeforeNativeCall() { hookBeforeNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
this.__root__.clean(); this.__root__.clean();
for (let map of this.headviews.values()) { for (let map of this.headviews.values()) {
for (let v of map.values()) { for (let v of map.values()) {
@ -2235,7 +2235,7 @@ class Panel {
} }
} }
hookAfterNativeCall() { hookAfterNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
//Here insert a native call to ensure the promise is resolved done. //Here insert a native call to ensure the promise is resolved done.
nativeEmpty(); nativeEmpty();
if (this.__root__.isDirty()) { if (this.__root__.isDirty()) {

22
doric-js/index.d.ts vendored
View File

@ -21,7 +21,7 @@ declare module 'doric/lib/src/runtime/global' {
global { global {
const context: BridgeContext; const context: BridgeContext;
const Environment: { const Environment: {
platform: "Android" | "iOS" | "Qt" | "h5"; platform: "Android" | "iOS" | "Qt" | "web";
platformVersion: string; platformVersion: string;
appName: string; appName: string;
appVersion: string; appVersion: string;
@ -31,10 +31,10 @@ declare module 'doric/lib/src/runtime/global' {
[index: string]: number | string | boolean | object | undefined; [index: string]: number | string | boolean | object | undefined;
}; };
function Entry(constructor: { function Entry(constructor: {
new(...args: any[]): {}; new (...args: any[]): {};
}): any; }): any;
} }
export { }; export {};
} }
declare module 'doric/lib/src/ui/index.ui' { declare module 'doric/lib/src/ui/index.ui' {
@ -387,7 +387,7 @@ declare module 'doric/lib/src/ui/animation' {
delay: number | undefined; delay: number | undefined;
}; };
} }
export { }; export {};
} }
declare module 'doric/lib/src/widget/layouts' { declare module 'doric/lib/src/widget/layouts' {
@ -418,7 +418,7 @@ declare module 'doric/lib/src/widget/layouts' {
export function stack(views: View[], config?: IStack): Stack; export function stack(views: View[], config?: IStack): Stack;
export function hlayout(views: View[], config?: IHLayout): HLayout; export function hlayout(views: View[], config?: IHLayout): HLayout;
export function vlayout(views: View[], config?: IVLayout): VLayout; export function vlayout(views: View[], config?: IVLayout): VLayout;
export { }; export {};
} }
declare module 'doric/lib/src/widget/text' { declare module 'doric/lib/src/widget/text' {
@ -982,7 +982,7 @@ declare module 'doric/lib/src/util/types' {
bind(binder: Binder<T>): void; bind(binder: Binder<T>): void;
static of<E>(v: E): Mutable<E>; static of<E>(v: E): Mutable<E>;
} }
export { }; export {};
} }
declare module 'doric/lib/src/util/uniqueId' { declare module 'doric/lib/src/util/uniqueId' {
@ -1010,7 +1010,7 @@ declare module 'doric/lib/src/pattern/provider' {
} }
export class Observable<M> implements IObservable<M> { export class Observable<M> implements IObservable<M> {
constructor(provider: IProvider, clz: { constructor(provider: IProvider, clz: {
new(...args: any[]): M; new (...args: any[]): M;
}); });
addObserver(observer: Observer<M | undefined>): void; addObserver(observer: Observer<M | undefined>): void;
removeObserver(observer: Observer<M | undefined>): void; removeObserver(observer: Observer<M | undefined>): void;
@ -1019,20 +1019,20 @@ declare module 'doric/lib/src/pattern/provider' {
export interface IProvider { export interface IProvider {
provide(obj: Object): void; provide(obj: Object): void;
acquire<T>(clz: { acquire<T>(clz: {
new(...args: any[]): T; new (...args: any[]): T;
}): T | undefined; }): T | undefined;
remove<T>(clz: { remove<T>(clz: {
new(...args: any[]): T; new (...args: any[]): T;
}): void; }): void;
clear(): void; clear(): void;
observe<T>(clz: { observe<T>(clz: {
new(...args: any[]): T; new (...args: any[]): T;
}): Observable<T>; }): Observable<T>;
} }
export class Provider implements IProvider { export class Provider implements IProvider {
provide(obj: Object): void; provide(obj: Object): void;
acquire<T>(clz: { acquire<T>(clz: {
new(...args: any[]): T; new (...args: any[]): T;
}): T | undefined; }): T | undefined;
remove<T>(clz: new (...args: any[]) => T): void; remove<T>(clz: new (...args: any[]) => T): void;
clear(): void; clear(): void;

View File

@ -137,7 +137,7 @@ export class Panel {
this.context.shader.render(model); this.context.shader.render(model);
} }
hookBeforeNativeCall() { hookBeforeNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
this.__root__.clean(); this.__root__.clean();
for (let map of this.headviews.values()) { for (let map of this.headviews.values()) {
for (let v of map.values()) { for (let v of map.values()) {
@ -147,7 +147,7 @@ export class Panel {
} }
} }
hookAfterNativeCall() { hookAfterNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
//Here insert a native call to ensure the promise is resolved done. //Here insert a native call to ensure the promise is resolved done.
nativeEmpty(); nativeEmpty();
if (this.__root__.isDirty()) { if (this.__root__.isDirty()) {

View File

@ -22,11 +22,11 @@
}, },
"homepage": "https://github.com/doric-pub/doric#readme", "homepage": "https://github.com/doric-pub/doric#readme",
"dependencies": { "dependencies": {
"@rollup/plugin-node-resolve": "^6.1.0", "@rollup/plugin-node-resolve": "^7.0.0",
"@types/ws": "^6.0.4", "@types/ws": "^6.0.4",
"dts-bundle": "^0.7.3", "dts-bundle": "^0.7.3",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"rollup": "^1.28.0", "rollup": "^1.29.0",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"typescript": "^3.7.4", "typescript": "^3.7.4",
"ws": "^7.2.1" "ws": "^7.2.1"

View File

@ -156,7 +156,7 @@ export abstract class Panel {
} }
private hookBeforeNativeCall() { private hookBeforeNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
this.__root__.clean() this.__root__.clean()
for (let map of this.headviews.values()) { for (let map of this.headviews.values()) {
for (let v of map.values()) { for (let v of map.values()) {
@ -167,7 +167,7 @@ export abstract class Panel {
} }
private hookAfterNativeCall() { private hookAfterNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
//Here insert a native call to ensure the promise is resolved done. //Here insert a native call to ensure the promise is resolved done.
nativeEmpty() nativeEmpty()
if (this.__root__.isDirty()) { if (this.__root__.isDirty()) {

View File

@ -2283,7 +2283,7 @@ class Panel {
this.context.shader.render(model); this.context.shader.render(model);
} }
hookBeforeNativeCall() { hookBeforeNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
this.__root__.clean(); this.__root__.clean();
for (let map of this.headviews.values()) { for (let map of this.headviews.values()) {
for (let v of map.values()) { for (let v of map.values()) {
@ -2293,7 +2293,7 @@ class Panel {
} }
} }
hookAfterNativeCall() { hookAfterNativeCall() {
if (Environment.platform !== 'h5') { if (Environment.platform !== 'web') {
//Here insert a native call to ensure the promise is resolved done. //Here insert a native call to ensure the promise is resolved done.
nativeEmpty(); nativeEmpty();
if (this.__root__.isDirty()) { if (this.__root__.isDirty()) {

View File

@ -21,10 +21,10 @@
"dependencies": { "dependencies": {
"@rollup/plugin-commonjs": "^11.0.1", "@rollup/plugin-commonjs": "^11.0.1",
"@rollup/plugin-json": "^4.0.1", "@rollup/plugin-json": "^4.0.1",
"@rollup/plugin-node-resolve": "^6.1.0", "@rollup/plugin-node-resolve": "^7.0.0",
"axios": "^0.19.0", "axios": "^0.19.1",
"doric": "file:../doric-js", "doric": "file:../doric-js",
"rollup": "^1.28.0", "rollup": "^1.29.0",
"typescript": "^3.7.4" "typescript": "^3.7.4"
}, },
"publishConfig": { "publishConfig": {