@onekeyfe/cross-inpage-provider-core 2.1.0 → 2.1.2
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/dist/cjs/versionInfo.js
CHANGED
|
@@ -91,10 +91,12 @@ function checkEnableDefineProperty(property) {
|
|
|
91
91
|
exports.checkEnableDefineProperty = checkEnableDefineProperty;
|
|
92
92
|
function defineWindowProperty(property, provider, options) {
|
|
93
93
|
var _a;
|
|
94
|
-
if (!
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
if (!(options === null || options === void 0 ? void 0 : options.alwaysInject)) {
|
|
95
|
+
if (!checkPlatformEnable(options === null || options === void 0 ? void 0 : options.disablePlatform))
|
|
96
|
+
return;
|
|
97
|
+
if (!checkWalletSwitchEnable())
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
98
100
|
const enable = checkEnableDefineProperty(property);
|
|
99
101
|
const proxyProvider = new Proxy(provider, {
|
|
100
102
|
defineProperty(target, property, attributes) {
|
package/dist/versionInfo.js
CHANGED
package/dist/walletProperty.d.ts
CHANGED
|
@@ -16,4 +16,5 @@ export declare function checkEnableDefineProperty(property: string): boolean;
|
|
|
16
16
|
export declare function defineWindowProperty(property: string, provider: unknown, options?: {
|
|
17
17
|
enumerable?: boolean;
|
|
18
18
|
disablePlatform?: IPlatformType[];
|
|
19
|
+
alwaysInject?: boolean;
|
|
19
20
|
}): void;
|
package/dist/walletProperty.js
CHANGED
|
@@ -85,10 +85,12 @@ export function checkEnableDefineProperty(property) {
|
|
|
85
85
|
}
|
|
86
86
|
export function defineWindowProperty(property, provider, options) {
|
|
87
87
|
var _a;
|
|
88
|
-
if (!
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
88
|
+
if (!(options === null || options === void 0 ? void 0 : options.alwaysInject)) {
|
|
89
|
+
if (!checkPlatformEnable(options === null || options === void 0 ? void 0 : options.disablePlatform))
|
|
90
|
+
return;
|
|
91
|
+
if (!checkWalletSwitchEnable())
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
92
94
|
const enable = checkEnableDefineProperty(property);
|
|
93
95
|
const proxyProvider = new Proxy(provider, {
|
|
94
96
|
defineProperty(target, property, attributes) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/cross-inpage-provider-core",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"cross-inpage-provider"
|
|
6
6
|
],
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
"build-version-info": "node ./scripts/buildVersionInfo.js"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@onekeyfe/cross-inpage-provider-errors": "2.1.
|
|
33
|
-
"@onekeyfe/cross-inpage-provider-events": "2.1.
|
|
34
|
-
"@onekeyfe/cross-inpage-provider-types": "2.1.
|
|
32
|
+
"@onekeyfe/cross-inpage-provider-errors": "2.1.2",
|
|
33
|
+
"@onekeyfe/cross-inpage-provider-events": "2.1.2",
|
|
34
|
+
"@onekeyfe/cross-inpage-provider-types": "2.1.2",
|
|
35
35
|
"events": "^3.3.0",
|
|
36
36
|
"lodash-es": "^4.17.21",
|
|
37
37
|
"ms": "^2.1.3"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/lodash-es": "^4.17.12"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "18c5992b3eb11029f807d9488d2bb8a378e9b503"
|
|
43
43
|
}
|