@polkadot/extension-dapp 0.42.5-5 → 0.42.5-9

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.
@@ -15,7 +15,7 @@ const polkadotExtensionDapp = (function (exports, util, utilCrypto) {
15
15
 
16
16
  const packageInfo = {
17
17
  name: '@polkadot/extension-dapp',
18
- version: '0.42.5-5'
18
+ version: '0.42.5-9'
19
19
  };
20
20
 
21
21
  const unwrapBytes = util.u8aUnwrapBytes;
package/bundle.cjs CHANGED
@@ -41,7 +41,7 @@ var _packageInfo = require("./packageInfo.cjs");
41
41
 
42
42
  var _wrapBytes = require("./wrapBytes.cjs");
43
43
 
44
- // Copyright 2019-2021 @polkadot/extension-dapp authors & contributors
44
+ // Copyright 2019-2022 @polkadot/extension-dapp authors & contributors
45
45
  // SPDX-License-Identifier: Apache-2.0
46
46
  // expose utility functions
47
47
  // just a helper (otherwise we cast all-over, so shorter and more readable)
package/bundle.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2021 @polkadot/extension-dapp authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-dapp authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { u8aEq } from '@polkadot/util';
4
4
  import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ declare const __dirname: string | undefined;
5
+
6
+ export default __dirname;
package/cjs/dirname.js ADDED
@@ -0,0 +1,6 @@
1
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ module.exports = typeof __dirname === 'string'
5
+ ? __dirname.replace('/cjs', '')
6
+ : undefined;
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _packageInfo = require("@polkadot/extension-inject/packageInfo");
9
+
10
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
11
+ // SPDX-License-Identifier: Apache-2.0
12
+ var _default = [_packageInfo.packageInfo];
13
+ exports.default = _default;
@@ -0,0 +1,5 @@
1
+ declare const _default: {
2
+ name: string;
3
+ version: string;
4
+ }[];
5
+ export default _default;
package/detectOther.js ADDED
@@ -0,0 +1,4 @@
1
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
2
+ // SPDX-License-Identifier: Apache-2.0
3
+ import { packageInfo as injectInfo } from '@polkadot/extension-inject/packageInfo';
4
+ export default [injectInfo];
package/detectPackage.cjs CHANGED
@@ -1,11 +1,15 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
3
5
  var _packageInfo = require("@polkadot/extension-inject/packageInfo");
4
6
 
5
7
  var _util = require("@polkadot/util");
6
8
 
9
+ var _dirname2 = _interopRequireDefault(require("./cjs/dirname"));
10
+
7
11
  var _packageInfo2 = require("./packageInfo.cjs");
8
12
 
9
- // Copyright 2017-2021 @polkadot/extension-dapp authors & contributors
13
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
10
14
  // SPDX-License-Identifier: Apache-2.0
11
- (0, _util.detectPackage)(_packageInfo2.packageInfo, typeof __dirname !== 'undefined' && __dirname, [_packageInfo.packageInfo]);
15
+ (0, _util.detectPackage)(_packageInfo2.packageInfo, typeof _dirname2.default !== 'undefined' && _dirname2.default, [_packageInfo.packageInfo]);
package/detectPackage.js CHANGED
@@ -1,6 +1,7 @@
1
- // Copyright 2017-2021 @polkadot/extension-dapp authors & contributors
1
+ // Copyright 2017-2022 @polkadot/extension-dapp authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { packageInfo as injectInfo } from '@polkadot/extension-inject/packageInfo';
4
4
  import { detectPackage } from '@polkadot/util';
5
+ import __dirname from "./cjs/dirname.js";
5
6
  import { packageInfo } from "./packageInfo.js";
6
7
  detectPackage(packageInfo, typeof __dirname !== 'undefined' && __dirname, [injectInfo]);
package/index.cjs CHANGED
@@ -4,8 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- require("./detectPackage.cjs");
8
-
9
7
  var _bundle = require("./bundle.cjs");
10
8
 
11
9
  Object.keys(_bundle).forEach(function (key) {
package/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- import './detectPackage';
2
1
  export * from './bundle';
package/index.js CHANGED
@@ -1,4 +1,5 @@
1
- // Copyright 2019-2021 @polkadot/extension-dapp authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-dapp authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import "./detectPackage.js";
3
+ // Since we inject into pages, we skip this
4
+ // import './detectPackage';
4
5
  export * from "./bundle.js";
package/package.json CHANGED
@@ -17,11 +17,11 @@
17
17
  "./detectPackage.cjs"
18
18
  ],
19
19
  "type": "module",
20
- "version": "0.42.5-5",
20
+ "version": "0.42.5-9",
21
21
  "main": "index.js",
22
22
  "dependencies": {
23
- "@babel/runtime": "^7.16.5",
24
- "@polkadot/extension-inject": "^0.42.5-5",
23
+ "@babel/runtime": "^7.16.7",
24
+ "@polkadot/extension-inject": "^0.42.5-9",
25
25
  "@polkadot/util": "^8.2.2",
26
26
  "@polkadot/util-crypto": "^8.2.2"
27
27
  },
@@ -41,6 +41,16 @@
41
41
  "require": "./bundle.cjs",
42
42
  "default": "./bundle.js"
43
43
  },
44
+ "./cjs/dirname": {
45
+ "types": "./cjs/dirname.d.ts",
46
+ "default": "./cjs/dirname.js"
47
+ },
48
+ "./cjs/package.json": "./cjs/package.json",
49
+ "./detectOther": {
50
+ "types": "./detectOther.d.ts",
51
+ "require": "./detectOther.cjs",
52
+ "default": "./detectOther.js"
53
+ },
44
54
  "./detectPackage": {
45
55
  "types": "./detectPackage.d.ts",
46
56
  "require": "./detectPackage.cjs",
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-dapp',
12
- version: '0.42.5-5'
12
+ version: '0.42.5-9'
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-dapp',
6
- version: '0.42.5-5'
6
+ version: '0.42.5-9'
7
7
  };
package/util.cjs CHANGED
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.documentReadyPromise = documentReadyPromise;
7
7
 
8
- // Copyright 2019-2021 @polkadot/extension-dapp authors & contributors
8
+ // Copyright 2019-2022 @polkadot/extension-dapp authors & contributors
9
9
  // SPDX-License-Identifier: Apache-2.0
10
10
  function documentReadyPromise(creator) {
11
11
  return new Promise(resolve => {
package/util.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2021 @polkadot/extension-dapp authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension-dapp authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  export function documentReadyPromise(creator) {
4
4
  return new Promise(resolve => {
package/wrapBytes.cjs CHANGED
@@ -7,7 +7,7 @@ exports.wrapBytes = exports.unwrapBytes = exports.isWrapped = exports.PREFIX = e
7
7
 
8
8
  var _util = require("@polkadot/util");
9
9
 
10
- // Copyright 2019-2021 @polkadot/extension authors & contributors
10
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
11
11
  // SPDX-License-Identifier: Apache-2.0
12
12
  const ETHEREUM = _util.U8A_WRAP_ETHEREUM;
13
13
  exports.ETHEREUM = ETHEREUM;
package/wrapBytes.js CHANGED
@@ -1,4 +1,4 @@
1
- // Copyright 2019-2021 @polkadot/extension authors & contributors
1
+ // Copyright 2019-2022 @polkadot/extension authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import { U8A_WRAP_ETHEREUM, U8A_WRAP_POSTFIX, U8A_WRAP_PREFIX, u8aIsWrapped, u8aUnwrapBytes, u8aWrapBytes } from '@polkadot/util';
4
4
  export const ETHEREUM = U8A_WRAP_ETHEREUM;