@ledgerhq/context-module 0.0.3-nightly.0 → 0.0.3
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/lib/DefaultContextModule.d.ts +1 -1
- package/lib/DefaultContextModule.d.ts.map +1 -1
- package/lib/DefaultContextModule.js +16 -1
- package/lib/DefaultContextModule.js.map +1 -1
- package/lib/DefaultContextModule.test.js +1 -1
- package/lib/DefaultContextModule.test.js.map +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/package.json +1 -1
- package/lib/ContextModuleBuilder.d.ts +0 -27
- package/lib/ContextModuleBuilder.d.ts.map +0 -1
- package/lib/ContextModuleBuilder.js +0 -54
- package/lib/ContextModuleBuilder.js.map +0 -1
- package/lib/ContextModuleBuilder.test.d.ts +0 -2
- package/lib/ContextModuleBuilder.test.d.ts.map +0 -1
- package/lib/ContextModuleBuilder.test.js +0 -18
- package/lib/ContextModuleBuilder.test.js.map +0 -1
|
@@ -8,7 +8,7 @@ type DefaultContextModuleConstructorArgs = {
|
|
|
8
8
|
};
|
|
9
9
|
export declare class DefaultContextModule implements ContextModule {
|
|
10
10
|
private _loaders;
|
|
11
|
-
constructor(args
|
|
11
|
+
constructor(args?: DefaultContextModuleConstructorArgs);
|
|
12
12
|
getContexts(transaction: Transaction, options: LoaderOptions): Promise<ContextResponse[]>;
|
|
13
13
|
}
|
|
14
14
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultContextModule.d.ts","sourceRoot":"","sources":["../src/DefaultContextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"DefaultContextModule.d.ts","sourceRoot":"","sources":["../src/DefaultContextModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAOhD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIzD,KAAK,mCAAmC,GAAG;IACzC,OAAO,EAAE,aAAa,EAAE,CAAC;CAC1B,CAAC;AAEF,qBAAa,oBAAqB,YAAW,aAAa;IACxD,OAAO,CAAC,QAAQ,CAAkB;gBAEtB,IAAI,CAAC,EAAE,mCAAmC;IAUzC,WAAW,CACtB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,eAAe,EAAE,CAAC;CAK9B"}
|
|
@@ -10,9 +10,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.DefaultContextModule = void 0;
|
|
13
|
+
const HttpExternalPluginDataSource_1 = require("./external-plugin/data/HttpExternalPluginDataSource");
|
|
14
|
+
const ExternalPluginContextLoader_1 = require("./external-plugin/domain/ExternalPluginContextLoader");
|
|
15
|
+
const HttpForwardDomainDataSource_1 = require("./forward-domain/data/HttpForwardDomainDataSource");
|
|
16
|
+
const ForwardDomainContextLoader_1 = require("./forward-domain/domain/ForwardDomainContextLoader");
|
|
17
|
+
const HttpNftDataSource_1 = require("./nft/data/HttpNftDataSource");
|
|
18
|
+
const NftContextLoader_1 = require("./nft/domain/NftContextLoader");
|
|
19
|
+
const HttpTokenDataSource_1 = require("./token/data/HttpTokenDataSource");
|
|
20
|
+
const TokenContextLoader_1 = require("./token/domain/TokenContextLoader");
|
|
13
21
|
class DefaultContextModule {
|
|
14
22
|
constructor(args) {
|
|
15
|
-
|
|
23
|
+
var _a;
|
|
24
|
+
const tokenDataSource = new HttpTokenDataSource_1.HttpTokenDataSource();
|
|
25
|
+
this._loaders = (_a = args === null || args === void 0 ? void 0 : args.loaders) !== null && _a !== void 0 ? _a : [
|
|
26
|
+
new TokenContextLoader_1.TokenContextLoader(tokenDataSource),
|
|
27
|
+
new NftContextLoader_1.NftContextLoader(new HttpNftDataSource_1.HttpNftDataSource()),
|
|
28
|
+
new ForwardDomainContextLoader_1.ForwardDomainContextLoader(new HttpForwardDomainDataSource_1.HttpForwardDomainDataSource()),
|
|
29
|
+
new ExternalPluginContextLoader_1.ExternalPluginContextLoader(new HttpExternalPluginDataSource_1.HttpExternalPluginDataSource(), tokenDataSource),
|
|
30
|
+
];
|
|
16
31
|
}
|
|
17
32
|
getContexts(transaction, options) {
|
|
18
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultContextModule.js","sourceRoot":"","sources":["../src/DefaultContextModule.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DefaultContextModule.js","sourceRoot":"","sources":["../src/DefaultContextModule.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,sGAAmG;AACnG,sGAAmG;AACnG,mGAAgG;AAChG,mGAAgG;AAChG,oEAAiE;AACjE,oEAAiE;AAKjE,0EAAuE;AACvE,0EAAuE;AAMvE,MAAa,oBAAoB;IAG/B,YAAY,IAA0C;;QACpD,MAAM,eAAe,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,OAAO,mCAAI;YAC/B,IAAI,uCAAkB,CAAC,eAAe,CAAC;YACvC,IAAI,mCAAgB,CAAC,IAAI,qCAAiB,EAAE,CAAC;YAC7C,IAAI,uDAA0B,CAAC,IAAI,yDAA2B,EAAE,CAAC;YACjE,IAAI,yDAA2B,CAAC,IAAI,2DAA4B,EAAE,EAAE,eAAe,CAAC;SACrF,CAAC;IACJ,CAAC;IAEY,WAAW,CACtB,WAAwB,EACxB,OAAsB;;YAEtB,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;YAClF,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YAC9C,OAAO,SAAS,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC;KAAA;CACF;AArBD,oDAqBC"}
|
|
@@ -18,7 +18,7 @@ describe("DefaultContextModule", () => {
|
|
|
18
18
|
jest.restoreAllMocks();
|
|
19
19
|
});
|
|
20
20
|
it("should initialize the context module with all the default loaders", () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
-
const contextModule = new DefaultContextModule_1.DefaultContextModule(
|
|
21
|
+
const contextModule = new DefaultContextModule_1.DefaultContextModule();
|
|
22
22
|
const res = yield contextModule.getContexts({}, {});
|
|
23
23
|
expect(res).toEqual([]);
|
|
24
24
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultContextModule.test.js","sourceRoot":"","sources":["../src/DefaultContextModule.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iEAA8D;AAI9D,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAS,EAAE;QACjF,MAAM,aAAa,GAAG,IAAI,2CAAoB,
|
|
1
|
+
{"version":3,"file":"DefaultContextModule.test.js","sourceRoot":"","sources":["../src/DefaultContextModule.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,iEAA8D;AAI9D,MAAM,wBAAwB,GAAG,GAAG,EAAE;IACpC,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,UAAU,CAAC,GAAG,EAAE;QACd,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,GAAS,EAAE;QACjF,MAAM,aAAa,GAAG,IAAI,2CAAoB,EAAE,CAAC;QAEjD,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,EAAiB,EAAE,EAAmB,CAAC,CAAC;QAEpF,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,8CAA8C,EAAE,GAAS,EAAE;QAC5D,MAAM,aAAa,GAAG,IAAI,2CAAoB,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CAAC;QAEhE,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,EAAiB,EAAE,EAAmB,CAAC,CAAC;QAEpF,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IAC1B,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,oDAAoD,EAAE,GAAS,EAAE;QAClE,MAAM,MAAM,GAAG,wBAAwB,EAAE,CAAC;QAC1C,MAAM,aAAa,GAAG,IAAI,2CAAoB,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAE9E,MAAM,aAAa,CAAC,WAAW,CAAC,EAAiB,EAAE,EAAmB,CAAC,CAAC;QAExE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAA,CAAC,CAAC;IAEH,EAAE,CAAC,4CAA4C,EAAE,GAAS,EAAE;QAC1D,MAAM,MAAM,GAAG,wBAAwB,EAAE,CAAC;QAC1C,MAAM,SAAS,GAAG;YAChB,CAAC,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;YACnD;gBACE,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,UAAU,EAAE;gBACjD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,UAAU,EAAE;aAC3C;SACF,CAAC;QACF,IAAI;aACD,KAAK,CAAC,MAAM,EAAE,MAAM,CAAC;aACrB,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;aACnC,qBAAqB,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,aAAa,GAAG,IAAI,2CAAoB,CAAC,EAAE,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QAE9E,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,WAAW,CAAC,EAAiB,EAAE,EAAmB,CAAC,CAAC;QAEpF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QAC7C,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC;IACxC,CAAC,CAAA,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gCAAgC,CAAC;AAE/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oDAAoD,CAAC;AACnE,cAAc,sDAAsD,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -15,7 +15,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./ContextModule"), exports);
|
|
18
|
-
__exportStar(require("./ContextModuleBuilder"), exports);
|
|
19
18
|
__exportStar(require("./DefaultContextModule"), exports);
|
|
20
19
|
__exportStar(require("./shared/model/ContextResponse"), exports);
|
|
21
20
|
__exportStar(require("./token/domain/TokenContextLoader"), exports);
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,yDAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,yDAAuC;AACvC,iEAA+C;AAE/C,oEAAkD;AAClD,gEAA8C;AAC9C,qFAAmE;AACnE,uFAAqE"}
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ContextModule } from "./ContextModule";
|
|
2
|
-
import { ContextLoader } from "./shared/domain/ContextLoader";
|
|
3
|
-
export declare class ContextModuleBuilder {
|
|
4
|
-
private customLoaders;
|
|
5
|
-
private defaultLoaders;
|
|
6
|
-
constructor();
|
|
7
|
-
/**
|
|
8
|
-
* Remove default loaders from the list of loaders
|
|
9
|
-
*
|
|
10
|
-
* @returns this
|
|
11
|
-
*/
|
|
12
|
-
withoutDefaultLoaders(): this;
|
|
13
|
-
/**
|
|
14
|
-
* Add a custom loader to the list of loaders
|
|
15
|
-
*
|
|
16
|
-
* @param loader loader to add to the list of loaders
|
|
17
|
-
* @returns this
|
|
18
|
-
*/
|
|
19
|
-
addLoader(loader: ContextLoader): this;
|
|
20
|
-
/**
|
|
21
|
-
* Build the context module
|
|
22
|
-
*
|
|
23
|
-
* @returns the context module
|
|
24
|
-
*/
|
|
25
|
-
build(): ContextModule;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=ContextModuleBuilder.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextModuleBuilder.d.ts","sourceRoot":"","sources":["../src/ContextModuleBuilder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAQhD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAI9D,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAuB;;IAe7C;;;;OAIG;IACH,qBAAqB;IAKrB;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,aAAa;IAK/B;;;;OAIG;IACH,KAAK,IAAI,aAAa;CAIvB"}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ContextModuleBuilder = void 0;
|
|
4
|
-
const DefaultContextModule_1 = require("./DefaultContextModule");
|
|
5
|
-
const HttpExternalPluginDataSource_1 = require("./external-plugin/data/HttpExternalPluginDataSource");
|
|
6
|
-
const ExternalPluginContextLoader_1 = require("./external-plugin/domain/ExternalPluginContextLoader");
|
|
7
|
-
const HttpForwardDomainDataSource_1 = require("./forward-domain/data/HttpForwardDomainDataSource");
|
|
8
|
-
const ForwardDomainContextLoader_1 = require("./forward-domain/domain/ForwardDomainContextLoader");
|
|
9
|
-
const HttpNftDataSource_1 = require("./nft/data/HttpNftDataSource");
|
|
10
|
-
const NftContextLoader_1 = require("./nft/domain/NftContextLoader");
|
|
11
|
-
const HttpTokenDataSource_1 = require("./token/data/HttpTokenDataSource");
|
|
12
|
-
const TokenContextLoader_1 = require("./token/domain/TokenContextLoader");
|
|
13
|
-
class ContextModuleBuilder {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.customLoaders = [];
|
|
16
|
-
this.defaultLoaders = [];
|
|
17
|
-
const tokenDataSource = new HttpTokenDataSource_1.HttpTokenDataSource();
|
|
18
|
-
const tokenLoader = new TokenContextLoader_1.TokenContextLoader(tokenDataSource);
|
|
19
|
-
const nftLoader = new NftContextLoader_1.NftContextLoader(new HttpNftDataSource_1.HttpNftDataSource());
|
|
20
|
-
const forwardDomainLoader = new ForwardDomainContextLoader_1.ForwardDomainContextLoader(new HttpForwardDomainDataSource_1.HttpForwardDomainDataSource());
|
|
21
|
-
const externalPluginLoader = new ExternalPluginContextLoader_1.ExternalPluginContextLoader(new HttpExternalPluginDataSource_1.HttpExternalPluginDataSource(), tokenDataSource);
|
|
22
|
-
this.defaultLoaders = [tokenLoader, nftLoader, forwardDomainLoader, externalPluginLoader];
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Remove default loaders from the list of loaders
|
|
26
|
-
*
|
|
27
|
-
* @returns this
|
|
28
|
-
*/
|
|
29
|
-
withoutDefaultLoaders() {
|
|
30
|
-
this.defaultLoaders = [];
|
|
31
|
-
return this;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Add a custom loader to the list of loaders
|
|
35
|
-
*
|
|
36
|
-
* @param loader loader to add to the list of loaders
|
|
37
|
-
* @returns this
|
|
38
|
-
*/
|
|
39
|
-
addLoader(loader) {
|
|
40
|
-
this.customLoaders.push(loader);
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Build the context module
|
|
45
|
-
*
|
|
46
|
-
* @returns the context module
|
|
47
|
-
*/
|
|
48
|
-
build() {
|
|
49
|
-
const loaders = [...this.defaultLoaders, ...this.customLoaders];
|
|
50
|
-
return new DefaultContextModule_1.DefaultContextModule({ loaders });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
exports.ContextModuleBuilder = ContextModuleBuilder;
|
|
54
|
-
//# sourceMappingURL=ContextModuleBuilder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextModuleBuilder.js","sourceRoot":"","sources":["../src/ContextModuleBuilder.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAC9D,sGAAmG;AACnG,sGAAmG;AACnG,mGAAgG;AAChG,mGAAgG;AAChG,oEAAiE;AACjE,oEAAiE;AAEjE,0EAAuE;AACvE,0EAAuE;AAEvE,MAAa,oBAAoB;IAI/B;QAHQ,kBAAa,GAAoB,EAAE,CAAC;QACpC,mBAAc,GAAoB,EAAE,CAAC;QAG3C,MAAM,eAAe,GAAG,IAAI,yCAAmB,EAAE,CAAC;QAClD,MAAM,WAAW,GAAG,IAAI,uCAAkB,CAAC,eAAe,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,IAAI,mCAAgB,CAAC,IAAI,qCAAiB,EAAE,CAAC,CAAC;QAChE,MAAM,mBAAmB,GAAG,IAAI,uDAA0B,CAAC,IAAI,yDAA2B,EAAE,CAAC,CAAC;QAC9F,MAAM,oBAAoB,GAAG,IAAI,yDAA2B,CAC1D,IAAI,2DAA4B,EAAE,EAClC,eAAe,CAChB,CAAC;QAEF,IAAI,CAAC,cAAc,GAAG,CAAC,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IAC5F,CAAC;IAED;;;;OAIG;IACH,qBAAqB;QACnB,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,MAAqB;QAC7B,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;OAIG;IACH,KAAK;QACH,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,cAAc,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,CAAC;QAChE,OAAO,IAAI,2CAAoB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IAC/C,CAAC;CACF;AA/CD,oDA+CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextModuleBuilder.test.d.ts","sourceRoot":"","sources":["../src/ContextModuleBuilder.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const ContextModuleBuilder_1 = require("./ContextModuleBuilder");
|
|
4
|
-
const DefaultContextModule_1 = require("./DefaultContextModule");
|
|
5
|
-
describe("ContextModuleBuilder", () => {
|
|
6
|
-
it("should return a default context module", () => {
|
|
7
|
-
const contextModuleBuilder = new ContextModuleBuilder_1.ContextModuleBuilder();
|
|
8
|
-
const res = contextModuleBuilder.build();
|
|
9
|
-
expect(res).toBeInstanceOf(DefaultContextModule_1.DefaultContextModule);
|
|
10
|
-
});
|
|
11
|
-
it("should return a custom context module", () => {
|
|
12
|
-
const contextModuleBuilder = new ContextModuleBuilder_1.ContextModuleBuilder();
|
|
13
|
-
const customLoader = { load: jest.fn() };
|
|
14
|
-
const res = contextModuleBuilder.withoutDefaultLoaders().addLoader(customLoader).build();
|
|
15
|
-
expect(res).toBeInstanceOf(DefaultContextModule_1.DefaultContextModule);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=ContextModuleBuilder.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ContextModuleBuilder.test.js","sourceRoot":"","sources":["../src/ContextModuleBuilder.test.ts"],"names":[],"mappings":";;AAAA,iEAA8D;AAC9D,iEAA8D;AAE9D,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,wCAAwC,EAAE,GAAG,EAAE;QAChD,MAAM,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;QAExD,MAAM,GAAG,GAAG,oBAAoB,CAAC,KAAK,EAAE,CAAC;QAEzC,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,2CAAoB,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uCAAuC,EAAE,GAAG,EAAE;QAC/C,MAAM,oBAAoB,GAAG,IAAI,2CAAoB,EAAE,CAAC;QACxD,MAAM,YAAY,GAAG,EAAE,IAAI,EAAE,IAAI,CAAC,EAAE,EAAE,EAAE,CAAC;QAEzC,MAAM,GAAG,GAAG,oBAAoB,CAAC,qBAAqB,EAAE,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,KAAK,EAAE,CAAC;QAEzF,MAAM,CAAC,GAAG,CAAC,CAAC,cAAc,CAAC,2CAAoB,CAAC,CAAC;IACnD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|