@leofcoin/codec-format-interface 1.5.1 → 1.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/dist/index.js CHANGED
@@ -1243,6 +1243,11 @@ var codecs = {
1243
1243
  }
1244
1244
  };
1245
1245
 
1246
+ var codecs$1 = /*#__PURE__*/Object.freeze({
1247
+ __proto__: null,
1248
+ default: codecs
1249
+ });
1250
+
1246
1251
  var Codec$1 = /** @class */ (function (_super) {
1247
1252
  __extends(Codec, _super);
1248
1253
  function Codec(buffer) {
@@ -1649,7 +1654,6 @@ var FormatInterface$1 = /** @class */ (function (_super) {
1649
1654
  var BasicInterface = BasicInterface$1;
1650
1655
  var FormatInterface = FormatInterface$1;
1651
1656
  var CodecHash = CodecHash$1;
1652
- var Codec = Codec$1;
1653
- var Codecs = codecs;
1657
+ var Codec = Codec$1;
1654
1658
 
1655
- export { BasicInterface, Codec, CodecHash, Codecs, FormatInterface };
1659
+ export { BasicInterface, Codec, CodecHash, FormatInterface, codecs$1 as codecs };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/codec-format-interface",
3
- "version": "1.5.1",
3
+ "version": "1.5.2",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -2,10 +2,9 @@ import basicInterface from './basic-interface.js'
2
2
  import formatInterface from './codec-format-interface.js'
3
3
  import codecHash from './codec-hash.js'
4
4
  import codec from './codec.js'
5
- import codecs from './codecs.js'
5
+ export * as codecs from './codecs.js'
6
6
 
7
7
  export const BasicInterface = basicInterface
8
8
  export const FormatInterface = formatInterface
9
9
  export const CodecHash = codecHash
10
10
  export const Codec = codec
11
- export const Codecs = codecs
package/test/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import test from 'tape'
2
- import {FormatInterface} from './../dist/index.js'
2
+ import {FormatInterface, codecs} from './../dist/index.js'
3
3
 
4
4
  globalThis.peernet = {codecs: {}}
5
5
  class FormatTest extends FormatInterface {
@@ -31,4 +31,9 @@ test('format can hash', async (tape) => {
31
31
  const hash = await message.hash()
32
32
  tape.ok(hash, 'can hash')
33
33
 
34
+ })
35
+
36
+ test('has codecs', async (tape) => {
37
+ tape.plan(1)
38
+ tape.ok(Object.keys(codecs).length !== 0)
34
39
  })
@@ -5,8 +5,11 @@ declare class Codec {
5
5
  construct():any
6
6
  }
7
7
 
8
+ declare const codecs: object
9
+
8
10
  declare module '@leofcoin/code-format-interface' {
9
11
  export module basicInterface {}
10
12
  export module formatInterface {}
11
13
  export module codec {}
14
+ export module codecs {}
12
15
  }