@polkadot/extension-inject 0.42.4-0 → 0.42.5-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/detectPackage.cjs +9 -0
- package/detectPackage.d.ts +1 -0
- package/detectPackage.js +5 -0
- package/index.cjs +10 -0
- package/index.d.ts +2 -0
- package/index.js +3 -1
- package/package.json +9 -3
- package/packageInfo.cjs +1 -1
- package/packageInfo.js +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _util = require("@polkadot/util");
|
|
4
|
+
|
|
5
|
+
var _packageInfo = require("./packageInfo.cjs");
|
|
6
|
+
|
|
7
|
+
// Copyright 2017-2021 @polkadot/extension-inject authors & contributors
|
|
8
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
9
|
+
(0, _util.detectPackage)(_packageInfo.packageInfo, typeof __dirname !== 'undefined' && __dirname, []);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/detectPackage.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Copyright 2017-2021 @polkadot/extension-inject authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
import { detectPackage } from '@polkadot/util';
|
|
4
|
+
import { packageInfo } from "./packageInfo.js";
|
|
5
|
+
detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, []);
|
package/index.cjs
CHANGED
|
@@ -4,6 +4,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.injectExtension = injectExtension;
|
|
7
|
+
Object.defineProperty(exports, "packageInfo", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _packageInfo.packageInfo;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
require("./detectPackage.cjs");
|
|
15
|
+
|
|
16
|
+
var _packageInfo = require("./packageInfo.cjs");
|
|
7
17
|
|
|
8
18
|
// Copyright 2019-2021 @polkadot/extension-inject authors & contributors
|
|
9
19
|
// SPDX-License-Identifier: Apache-2.0
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
// Copyright 2019-2021 @polkadot/extension-inject authors & contributors
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
3
|
+
import "./detectPackage.js";
|
|
4
|
+
export { packageInfo } from "./packageInfo.js"; // It is recommended to always use the function below to shield the extension and dapp from
|
|
4
5
|
// any future changes. The exposed interface will manage access between the 2 environments,
|
|
5
6
|
// be it via window (current), postMessage (under consideration) or any other mechanism
|
|
7
|
+
|
|
6
8
|
export function injectExtension(enable, {
|
|
7
9
|
name,
|
|
8
10
|
version
|
package/package.json
CHANGED
|
@@ -14,12 +14,13 @@
|
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": true,
|
|
16
16
|
"type": "module",
|
|
17
|
-
"version": "0.42.
|
|
17
|
+
"version": "0.42.5-2",
|
|
18
18
|
"main": "index.js",
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@babel/runtime": "^7.16.5",
|
|
21
|
-
"@polkadot/rpc-provider": "^7.1.
|
|
22
|
-
"@polkadot/types": "^7.1.
|
|
21
|
+
"@polkadot/rpc-provider": "^7.1.2-0",
|
|
22
|
+
"@polkadot/types": "^7.1.2-0",
|
|
23
|
+
"@polkadot/util": "^8.2.2",
|
|
23
24
|
"@polkadot/util-crypto": "^8.2.2"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
@@ -40,6 +41,11 @@
|
|
|
40
41
|
"require": "./crossenv.cjs",
|
|
41
42
|
"default": "./crossenv.js"
|
|
42
43
|
},
|
|
44
|
+
"./detectPackage": {
|
|
45
|
+
"types": "./detectPackage.d.ts",
|
|
46
|
+
"require": "./detectPackage.cjs",
|
|
47
|
+
"default": "./detectPackage.js"
|
|
48
|
+
},
|
|
43
49
|
"./package.json": "./package.json",
|
|
44
50
|
"./packageInfo": {
|
|
45
51
|
"types": "./packageInfo.d.ts",
|
package/packageInfo.cjs
CHANGED
package/packageInfo.js
CHANGED