@leofcoin/codec-format-interface 1.2.0 → 1.2.1

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/index.js CHANGED
@@ -582,8 +582,8 @@ var codecFormatInterface = /*#__PURE__*/Object.freeze({
582
582
  'default': FormatInterface
583
583
  });
584
584
 
585
- exports.BasicInterface = basicInterface;
586
- exports.Codec = codec;
585
+ exports.BasicInterface = basicInterface.default;
586
+ exports.Codec = codec.default;
587
587
  exports.CodecHash = codecHash;
588
- exports.FormatInterface = codecFormatInterface;
589
- exports.codecs = codecs$1;
588
+ exports.FormatInterface = codecFormatInterface.default;
589
+ exports.codecs = codecs$1.default;
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@leofcoin/codec-format-interface",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
- "c": "rollup -c"
9
+ "c": "rollup -c && node transform.js"
10
10
  },
11
11
  "repository": {
12
12
  "type": "git",
@@ -28,7 +28,7 @@
28
28
  "varint": "^6.0.0"
29
29
  },
30
30
  "devDependencies": {
31
- "rollup": "^2.74.1",
31
+ "rollup": "^2.75.5",
32
32
  "tape": "^5.5.3"
33
33
  }
34
34
  }
package/transform.js ADDED
@@ -0,0 +1,12 @@
1
+ const { readFile, writeFileSync } = require('fs')
2
+
3
+ readFile('dist/index.js', (error, data) => {
4
+ data = data.toString()
5
+ data = data.replace('exports.BasicInterface = basicInterface', 'exports.BasicInterface = basicInterface.default')
6
+ data = data.replace('exports.Codec = codec', 'exports.Codec = codec.default')
7
+ data = data.replace('exports.codecHash = codecHash', 'exports.codecHash = codecHash.default')
8
+ data = data.replace('exports.FormatInterface = codecFormatInterface', 'exports.FormatInterface = codecFormatInterface.default')
9
+ data = data.replace('exports.codecs = codecs$1', 'exports.codecs = codecs$1.default')
10
+
11
+ writeFileSync('dist/index.js', data)
12
+ })