@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.
@@ -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 {};
@@ -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
@@ -1,2 +1,4 @@
1
+ import './detectPackage';
1
2
  import type { Injected, InjectOptions } from './types';
3
+ export { packageInfo } from './packageInfo';
2
4
  export declare function injectExtension(enable: (origin: string) => Promise<Injected>, { name, version }: InjectOptions): void;
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
- // It is recommended to always use the function below to shield the extension and dapp from
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.4-0",
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.1",
22
- "@polkadot/types": "^7.1.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
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/extension-inject',
12
- version: '0.42.4-0'
12
+ version: '0.42.5-2'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/extension-inject',
6
- version: '0.42.4-0'
6
+ version: '0.42.5-2'
7
7
  };