@etsoo/appscript 1.3.57 → 1.3.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/bridges/FlutterHost.d.ts +5 -1
- package/lib/cjs/bridges/FlutterHost.js +5 -0
- package/lib/cjs/bridges/IBridgeHost.d.ts +11 -0
- package/lib/cjs/bridges/IBridgeHost.js +9 -0
- package/lib/mjs/bridges/FlutterHost.d.ts +5 -1
- package/lib/mjs/bridges/FlutterHost.js +5 -0
- package/lib/mjs/bridges/IBridgeHost.d.ts +11 -0
- package/lib/mjs/bridges/IBridgeHost.js +8 -1
- package/package.json +5 -5
- package/src/bridges/FlutterHost.ts +6 -1
- package/src/bridges/IBridgeHost.ts +13 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import { IBridgeHost } from './IBridgeHost';
|
|
2
|
+
import { BridgeHostName, IBridgeHost } from './IBridgeHost';
|
|
3
3
|
type CallHandlerType = (name: string, ...args: unknown[]) => PromiseLike<DataTypes.StringRecord | void>;
|
|
4
4
|
/**
|
|
5
5
|
* Flutter JavaScript Host
|
|
@@ -7,6 +7,10 @@ type CallHandlerType = (name: string, ...args: unknown[]) => PromiseLike<DataTyp
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class FlutterHost implements IBridgeHost {
|
|
9
9
|
private host;
|
|
10
|
+
/**
|
|
11
|
+
* Name
|
|
12
|
+
*/
|
|
13
|
+
readonly name = BridgeHostName.Flutter;
|
|
10
14
|
/**
|
|
11
15
|
* Start Url
|
|
12
16
|
*/
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FlutterHost = void 0;
|
|
4
4
|
const shared_1 = require("@etsoo/shared");
|
|
5
|
+
const IBridgeHost_1 = require("./IBridgeHost");
|
|
5
6
|
/**
|
|
6
7
|
* Flutter JavaScript Host
|
|
7
8
|
* https://inappwebview.dev/docs/javascript/communication/
|
|
@@ -13,6 +14,10 @@ class FlutterHost {
|
|
|
13
14
|
*/
|
|
14
15
|
constructor(host) {
|
|
15
16
|
this.host = host;
|
|
17
|
+
/**
|
|
18
|
+
* Name
|
|
19
|
+
*/
|
|
20
|
+
this.name = IBridgeHost_1.BridgeHostName.Flutter;
|
|
16
21
|
/**
|
|
17
22
|
* Cached commands
|
|
18
23
|
*/
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge host names enum
|
|
3
|
+
*/
|
|
4
|
+
export declare enum BridgeHostName {
|
|
5
|
+
Electron = 0,
|
|
6
|
+
Flutter = 1
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* Bridge host interface
|
|
3
10
|
*/
|
|
4
11
|
export interface IBridgeHost {
|
|
12
|
+
/**
|
|
13
|
+
* Name
|
|
14
|
+
*/
|
|
15
|
+
readonly name: BridgeHostName;
|
|
5
16
|
/**
|
|
6
17
|
* Change culture
|
|
7
18
|
* @param locale Locale
|
|
@@ -1,2 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BridgeHostName = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Bridge host names enum
|
|
6
|
+
*/
|
|
7
|
+
var BridgeHostName;
|
|
8
|
+
(function (BridgeHostName) {
|
|
9
|
+
BridgeHostName[BridgeHostName["Electron"] = 0] = "Electron";
|
|
10
|
+
BridgeHostName[BridgeHostName["Flutter"] = 1] = "Flutter";
|
|
11
|
+
})(BridgeHostName = exports.BridgeHostName || (exports.BridgeHostName = {}));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTypes } from '@etsoo/shared';
|
|
2
|
-
import { IBridgeHost } from './IBridgeHost';
|
|
2
|
+
import { BridgeHostName, IBridgeHost } from './IBridgeHost';
|
|
3
3
|
type CallHandlerType = (name: string, ...args: unknown[]) => PromiseLike<DataTypes.StringRecord | void>;
|
|
4
4
|
/**
|
|
5
5
|
* Flutter JavaScript Host
|
|
@@ -7,6 +7,10 @@ type CallHandlerType = (name: string, ...args: unknown[]) => PromiseLike<DataTyp
|
|
|
7
7
|
*/
|
|
8
8
|
export declare class FlutterHost implements IBridgeHost {
|
|
9
9
|
private host;
|
|
10
|
+
/**
|
|
11
|
+
* Name
|
|
12
|
+
*/
|
|
13
|
+
readonly name = BridgeHostName.Flutter;
|
|
10
14
|
/**
|
|
11
15
|
* Start Url
|
|
12
16
|
*/
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ExtendUtils } from '@etsoo/shared';
|
|
2
|
+
import { BridgeHostName } from './IBridgeHost';
|
|
2
3
|
/**
|
|
3
4
|
* Flutter JavaScript Host
|
|
4
5
|
* https://inappwebview.dev/docs/javascript/communication/
|
|
@@ -10,6 +11,10 @@ export class FlutterHost {
|
|
|
10
11
|
*/
|
|
11
12
|
constructor(host) {
|
|
12
13
|
this.host = host;
|
|
14
|
+
/**
|
|
15
|
+
* Name
|
|
16
|
+
*/
|
|
17
|
+
this.name = BridgeHostName.Flutter;
|
|
13
18
|
/**
|
|
14
19
|
* Cached commands
|
|
15
20
|
*/
|
|
@@ -1,7 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge host names enum
|
|
3
|
+
*/
|
|
4
|
+
export declare enum BridgeHostName {
|
|
5
|
+
Electron = 0,
|
|
6
|
+
Flutter = 1
|
|
7
|
+
}
|
|
1
8
|
/**
|
|
2
9
|
* Bridge host interface
|
|
3
10
|
*/
|
|
4
11
|
export interface IBridgeHost {
|
|
12
|
+
/**
|
|
13
|
+
* Name
|
|
14
|
+
*/
|
|
15
|
+
readonly name: BridgeHostName;
|
|
5
16
|
/**
|
|
6
17
|
* Change culture
|
|
7
18
|
* @param locale Locale
|
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bridge host names enum
|
|
3
|
+
*/
|
|
4
|
+
export var BridgeHostName;
|
|
5
|
+
(function (BridgeHostName) {
|
|
6
|
+
BridgeHostName[BridgeHostName["Electron"] = 0] = "Electron";
|
|
7
|
+
BridgeHostName[BridgeHostName["Flutter"] = 1] = "Flutter";
|
|
8
|
+
})(BridgeHostName || (BridgeHostName = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/appscript",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.58",
|
|
4
4
|
"description": "Applications shared TypeScript framework",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/mjs/index.js",
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
},
|
|
53
53
|
"homepage": "https://github.com/ETSOO/AppScript#readme",
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@etsoo/notificationbase": "^1.1.
|
|
56
|
-
"@etsoo/restclient": "^1.0.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
55
|
+
"@etsoo/notificationbase": "^1.1.23",
|
|
56
|
+
"@etsoo/restclient": "^1.0.84",
|
|
57
|
+
"@etsoo/shared": "^1.1.88",
|
|
58
58
|
"@types/crypto-js": "^4.1.1",
|
|
59
59
|
"crypto-js": "^4.1.1"
|
|
60
60
|
},
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
"@types/jest": "^29.2.5",
|
|
68
68
|
"jest": "^29.3.1",
|
|
69
69
|
"jest-environment-jsdom": "^29.3.1",
|
|
70
|
-
"ts-jest": "^29.0.
|
|
70
|
+
"ts-jest": "^29.0.4",
|
|
71
71
|
"typescript": "^4.9.4"
|
|
72
72
|
}
|
|
73
73
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DataTypes, ExtendUtils } from '@etsoo/shared';
|
|
2
|
-
import { IBridgeHost } from './IBridgeHost';
|
|
2
|
+
import { BridgeHostName, IBridgeHost } from './IBridgeHost';
|
|
3
3
|
|
|
4
4
|
// Call handler type
|
|
5
5
|
type CallHandlerType = (
|
|
@@ -12,6 +12,11 @@ type CallHandlerType = (
|
|
|
12
12
|
* https://inappwebview.dev/docs/javascript/communication/
|
|
13
13
|
*/
|
|
14
14
|
export class FlutterHost implements IBridgeHost {
|
|
15
|
+
/**
|
|
16
|
+
* Name
|
|
17
|
+
*/
|
|
18
|
+
readonly name = BridgeHostName.Flutter;
|
|
19
|
+
|
|
15
20
|
/**
|
|
16
21
|
* Start Url
|
|
17
22
|
*/
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bridge host names enum
|
|
3
|
+
*/
|
|
4
|
+
export enum BridgeHostName {
|
|
5
|
+
Electron = 0,
|
|
6
|
+
Flutter = 1
|
|
7
|
+
}
|
|
8
|
+
|
|
1
9
|
/**
|
|
2
10
|
* Bridge host interface
|
|
3
11
|
*/
|
|
4
12
|
export interface IBridgeHost {
|
|
13
|
+
/**
|
|
14
|
+
* Name
|
|
15
|
+
*/
|
|
16
|
+
readonly name: BridgeHostName;
|
|
17
|
+
|
|
5
18
|
/**
|
|
6
19
|
* Change culture
|
|
7
20
|
* @param locale Locale
|