user 6 лет назад
Родитель
Сommit
d7ad2b3653
5 измененных файлов с 33 добавлено и 3 удалено
  1. 2 2
      __tests__/index.test.ts
  2. 11 0
      lib/index.d.ts
  3. 7 0
      lib/index.js
  4. 1 1
      lib/index.js.map
  5. 12 0
      src/index.ts

+ 2 - 2
__tests__/index.test.ts

@@ -1,12 +1,12 @@
 import nock from 'nock';
 import { BankClient } from '../src/index';
+import { StorageNode } from '../src/storage-node';
 import { IWebClient } from '../src/webclient';
 import WebClientNode from '../src/webclient-node';
-import { Storage } from './../src/storage';
 import { IWebClientOptions } from './../src/webclient-options';
 
 describe('BankClient', () => {
-    const storage = new Storage('bankConfig');
+    const storage = new StorageNode('bankConfig');
 
     test('should successfully bootstrap', async () => {
       class FakeWebClient implements IWebClient {

+ 11 - 0
lib/index.d.ts

@@ -2,6 +2,17 @@ import { Storage } from './storage';
 import { IWebClient } from './webclient';
 import { ContentItem } from './content-item';
 import { UploadItemParameters } from './upload-item-parameters';
+export * from './storage';
+export * from './storage-node';
+export * from './webclient';
+export * from './webclient-fetch';
+export * from './webclient-options';
+export * from './content-item';
+export * from './content-link';
+export * from './content-params';
+export * from './upload-item-link';
+export * from './upload-item-parameters';
+export * from './util';
 export declare class BankClient {
     private urlBase;
     private ipfsUrlBase;

+ 7 - 0
lib/index.js

@@ -7,6 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
         step((generator = generator.apply(thisArg, _arguments || [])).next());
     });
 };
+function __export(m) {
+    for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
+}
 var __importDefault = (this && this.__importDefault) || function (mod) {
     return (mod && mod.__esModule) ? mod : { "default": mod };
 };
@@ -19,6 +22,10 @@ const ws_1 = __importDefault(require("ws"));
 const content_item_1 = require("./content-item");
 const util_1 = require("./util");
 const webclient_node_1 = __importDefault(require("./webclient-node"));
+__export(require("./storage-node"));
+__export(require("./webclient-fetch"));
+__export(require("./content-item"));
+__export(require("./util"));
 class BankClient {
     constructor(urlBase, ipfsUrlBase, storage = new storage_node_1.StorageNode('bankClient'), webClient = new webclient_node_1.default()) {
         this.urlBase = urlBase;

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
lib/index.js.map


+ 12 - 0
src/index.ts

@@ -12,6 +12,18 @@ import { UploadItemParameters } from './upload-item-parameters';
 import { encodeHex, mergeDeep, uuid } from './util';
 import WebClientNode from './webclient-node';
 
+export * from './storage';
+export * from './storage-node';
+export * from './webclient';
+export * from './webclient-fetch';
+export * from './webclient-options';
+export * from './content-item';
+export * from './content-link';
+export * from './content-params';
+export * from './upload-item-link';
+export * from './upload-item-parameters';
+export * from './util';
+
 export class BankClient {
 
   public static parseBankLink(bankLink: string) {