diff --git a/CHANGELOG.md b/CHANGELOG.md index ac36fc7..1579d04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,12 @@ because this is a development tool, not a production product. We do try to tell you about such changes in this `CHANGELOG.md` and we fix bugs as fast as we can. + +## 0.4.5 (2017-09-11) +Feature - offer separate `HttpClientInMemoryWebApiModule` and `HttpInMemoryWebApiModule`. + +closes #140 + ## 0.4.4 (2017-09-11) closes #136 diff --git a/README.md b/README.md index 0d8d32e..cbb0984 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ that emulates CRUD operations over a RESTy API. It intercepts Angular `Http` and `HttpClient` requests that would otherwise go to the remote server and redirects them to an in-memory data store that you control. --- -## **v0.4.0 supports `HttpClient`!** +## **v0.4 supports `HttpClient`!** >Release v0.4.0 (8 Sept 2017) is a major overhaul of this library. > >You don't have to change your existing application _code_ if your app uses this library without customizations. @@ -105,6 +105,7 @@ Usage: ``` ## Basic usage + Create an `InMemoryDataService` class that implements `InMemoryDbService`. At minimum it must implement `createDb` which @@ -129,17 +130,19 @@ export class InMemHeroService implements InMemoryDbService { >This library _currently_ assumes that every collection has a primary key called `id`. -Register this module and your data store service implementation in `AppModule.imports` -calling the `forRoot` static method with this service class and optional configuration object: +Register your data store service implementation with the `HttpClientInMemoryWebApiModule` +in your root `AppModule.imports` +calling the `forRoot` static method with this service class and an optional configuration object: ```ts -import { HttpClientModule } from '@angular/common/http'; -import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; +import { HttpClientModule } from '@angular/common/http'; +import { HttpClientInMemoryWebApiModule } from 'http-angular-in-memory-web-api'; + +import { InMemHeroService } from '../app/hero.service'; -import { InMemHeroService } from '../app/hero.service'; @NgModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(InMemHeroService), + HttpClientInMemoryWebApiModule.forRoot(InMemHeroService), ... ], ... @@ -154,38 +157,74 @@ the in-memory backed provider supersedes the Angular version. * You can setup the in-memory web api within a lazy loaded feature module by calling the `.forFeature` method as you would `.forRoot`. -* You can still use the in-memory web api with the older `Http` module. - - ```ts - import { HttpModule } from '@angular/http'; - import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; - - import { InMemHeroService } from '../app/hero.service'; - @NgModule({ - imports: [ - HttpModule, - InMemoryWebApiModule.forRoot(InMemHeroService), - ... - ], - ... - }) - export class AppModule { ... } - ``` - * The `createDb` method can be synchronous or asynchronous. so you can initialize your in-memory database service from a JSON file. Return the database object, an observable of that object, or a promise of that object. The in-mem web api service calls `createDb` (a) when it handles the _first_ `HttpClient` (or `Http`) request and (b) when it receives a `POST resetdb` request. -## In-memory web api examples -The tests (`src/app/*.spec.ts` files) in the [github repo](https://github.com/angular/in-memory-web-api/tree/master/src/app) are a good place to learn how to setup and use this in-memory web api library. +### Using with the older Angular _Http_ module + +You can still use the in-memory web api with the older `Http` module. + +```ts +import { HttpModule } from '@angular/http'; +import { HttpInMemoryWebApiModule } from 'http-angular-in-memory-web-api'; + +import { InMemHeroService } from '../app/hero.service'; + +@NgModule({ +imports: [ + HttpModule, + HttpInMemoryWebApiModule.forRoot(InMemHeroService), + ... +], +... +}) +export class AppModule { ... } +``` +### Using both Angular HTTP modules + +Perhaps you have a hybrid app with BOTH Angular modules +because you're migrating to `HttpClient` from 'Http`. +Or perhaps you've used this library before and you don't have time +at this moment to re-do your module setup. + +There's a combo-module +(`InMemoryWebApiModule`) that prepares for both of them. +It has the same syntax from pre-`v0.4.0` days and it should "_just work_" +as long as you aren't using the [advanced features described below](#advanced-features). + +```ts +import { HttpModule } from '@angular/http'; +import { HttpClientModule } from '@angular/common/http'; + +import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + +import { InMemHeroService } from '../app/hero.service'; + +@NgModule({ +imports: [ + HttpModule, + HttpClientModule, + InMemoryWebApiModule.forRoot(InMemHeroService), + ... +], +... +}) +export class AppModule { ... } +``` + +# Examples +The tests (`src/app/*.spec.ts` files) in the +[github repository](https://github.com/angular/in-memory-web-api/tree/master/src/app) +are a good place to learn how to setup and use this in-memory web api library. See also the example source code in the official Angular.io documentation such as the [HttpClient](https://angular.io/guide/http) guide and the [Tour of Heroes](https://angular.io/tutorial/toh-pt6). # Advanced Features -Some features are not readily apparent in the basic usage example. +Some features are not readily apparent in the basic usage described above. The `InMemoryBackendConfigArgs` defines a set of options. Add them as the second `forRoot` argument: ```ts @@ -343,23 +382,16 @@ createResponse$: (resOptionsFactory: () => ResponseOptions) => Observable; ``` ## In-memory Web Api Examples -The file `src/app/hero-in-mem-data.service.ts` is an example of a Hero-oriented `InMemoryDbService`, -such as you might see in an HTTP sample in the Angular documentation. +The [github repository](https://github.com/angular/in-memory-web-api/tree/master/src/app) +demonstrates library usage with tested examples. -To try it, add the following line to `AppModule.imports` -```ts -InMemoryWebApiModule.forRoot(HeroInMemDataService) -``` - -For examples of overriding service methods, -see the `src/app/hero-in-mem-data-override.service.ts` class. +The `HeroInMemDataService` class (in `src/app/hero-in-mem-data.service.ts`) is a Hero-oriented `InMemoryDbService` +such as you might see in an HTTP sample in the Angular documentation. -Add the following line to `AppModule.imports` to see this version of the data service in action: -```ts -InMemoryWebApiModule.forRoot(HeroInMemDataOverrideService) -``` +The `HeroInMemDataOverrideService` class (in `src/app/hero-in-mem-data-override.service.ts`) +demonstrates a few ways to override methods of the base `HeroInMemDataService`. -The tests (see below) exercise these examples. +The tests ([see below](#testing)) exercise these examples. # Build Instructions @@ -425,18 +457,18 @@ The `src/` folder is divided into >A real app would reference the in-memory web api node module; these tests reference the library source files. -The `karma-test-shim.js` add `in-mem` to the list of app folders that SystemJS should resolve. +The `karma-test-shim.js` adds the `in-mem` folder to the list of folders that SystemJS should resolve. ## Rollup The gulp "umd" task runs rollup for tree-shaking. -I don't remember it ever working without a lot of warnings. -In v.0.4.x, updated to v.0.49 ... which required updating of the `rollup.config.js`. +I don't remember if it ever worked without a lot of warnings. +The `v0.4.x` release updated to `rollup@0.49` which required updates to the `rollup.config.js`. -Still weirdly runs an unspecified `cjs` rollup config first that I can’t find (which produces numerous warnings) before doing the right thing and running the `umd` config. +Still weirdly runs `cjs` rollup config first that I can’t find (which produces numerous warnings) before doing the right thing and running the `umd` config. -Also does not work if follow instructions and use the `output` property of `rollup.config.js`; does work when config it “wrong” and put the options in the root. +Also does not work if you follow instructions and use the `output` property of `rollup.config.js`; does work when configure it “wrong” and put the options in the root. Ignoring these issues for now. diff --git a/bundles/in-memory-web-api.umd.js b/bundles/in-memory-web-api.umd.js index 1939c49..fd7dd44 100644 --- a/bundles/in-memory-web-api.umd.js +++ b/bundles/in-memory-web-api.umd.js @@ -1161,14 +1161,14 @@ var __extends = (undefined && undefined.__extends) || (function () { * Call `forRoot` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpModule } from '@angular/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... @@ -1273,14 +1273,14 @@ var __extends$1 = (undefined && undefined.__extends) || (function () { * Call `config` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpClientModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpClientModule } from '@angular/common/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... @@ -1347,23 +1347,120 @@ HttpClientBackendService.ctorParameters = function () { return [ { type: http$1.XhrFactory, }, ]; }; +////// Http-Only version //// // Internal - Creates the in-mem backend for the Http module // AoT requires factory to be exported function httpInMemBackendServiceFactory(injector, dbService, options) { var backend = new HttpBackendService(injector, dbService, options); return backend; } +var HttpInMemoryWebApiModule = (function () { + function HttpInMemoryWebApiModule() { + } + /** + * Redirect the Angular `Http` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + HttpInMemoryWebApiModule.forRoot = function (dbCreator, options) { + return { + ngModule: HttpInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + { provide: http.XHRBackend, + useFactory: httpInMemBackendServiceFactory, + deps: [core.Injector, InMemoryDbService, InMemoryBackendConfig] } + ] + }; + }; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + HttpInMemoryWebApiModule.forFeature = function (dbCreator, options) { + return HttpInMemoryWebApiModule.forRoot(dbCreator, options); + }; + return HttpInMemoryWebApiModule; +}()); +HttpInMemoryWebApiModule.decorators = [ + { type: core.NgModule, args: [{},] }, +]; +/** @nocollapse */ +HttpInMemoryWebApiModule.ctorParameters = function () { return []; }; + +////// HttpClient-Only version //// // Internal - Creates the in-mem backend for the HttpClient module // AoT requires factory to be exported function httpClientInMemBackendServiceFactory(dbService, options, xhrFactory) { var backend = new HttpClientBackendService(dbService, options, xhrFactory); return backend; } +var HttpClientInMemoryWebApiModule = (function () { + function HttpClientInMemoryWebApiModule() { + } + /** + * Redirect the Angular `HttpClient` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + HttpClientInMemoryWebApiModule.forRoot = function (dbCreator, options) { + return { + ngModule: HttpClientInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + { provide: http$1.HttpBackend, + useFactory: httpClientInMemBackendServiceFactory, + deps: [InMemoryDbService, InMemoryBackendConfig, http$1.XhrFactory] } + ] + }; + }; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + HttpClientInMemoryWebApiModule.forFeature = function (dbCreator, options) { + return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options); + }; + return HttpClientInMemoryWebApiModule; +}()); +HttpClientInMemoryWebApiModule.decorators = [ + { type: core.NgModule, args: [{},] }, +]; +/** @nocollapse */ +HttpClientInMemoryWebApiModule.ctorParameters = function () { return []; }; + +////// For apps with both Http and HttpClient //// var InMemoryWebApiModule = (function () { function InMemoryWebApiModule() { } /** - * Redirect both Angular `Http` and `HttpClient` XHR calls + * Redirect BOTH Angular `Http` and `HttpClient` XHR calls * to in-memory data store that implements `InMemoryDbService`. * with class that implements InMemoryDbService and creates an in-memory database. * @@ -1416,9 +1513,11 @@ exports.getStatusText = getStatusText; exports.isSuccess = isSuccess; exports.HttpBackendService = HttpBackendService; exports.HttpClientBackendService = HttpClientBackendService; +exports.InMemoryWebApiModule = InMemoryWebApiModule; exports.httpInMemBackendServiceFactory = httpInMemBackendServiceFactory; +exports.HttpInMemoryWebApiModule = HttpInMemoryWebApiModule; exports.httpClientInMemBackendServiceFactory = httpClientInMemBackendServiceFactory; -exports.InMemoryWebApiModule = InMemoryWebApiModule; +exports.HttpClientInMemoryWebApiModule = HttpClientInMemoryWebApiModule; exports.InMemoryDbService = InMemoryDbService; exports.InMemoryBackendConfigArgs = InMemoryBackendConfigArgs; exports.InMemoryBackendConfig = InMemoryBackendConfig; @@ -1429,4 +1528,4 @@ Object.defineProperty(exports, '__esModule', { value: true }); }))); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW4tbWVtb3J5LXdlYi1hcGkudW1kLmpzIiwic291cmNlcyI6WyIuLi9zcmMvaW4tbWVtL2h0dHAtc3RhdHVzLWNvZGVzLmpzIiwiLi4vc3JjL2luLW1lbS9pbnRlcmZhY2VzLmpzIiwiLi4vc3JjL2luLW1lbS9iYWNrZW5kLnNlcnZpY2UuanMiLCIuLi9zcmMvaW4tbWVtL2h0dHAtYmFja2VuZC5zZXJ2aWNlLmpzIiwiLi4vc3JjL2luLW1lbS9odHRwLWNsaWVudC1iYWNrZW5kLnNlcnZpY2UuanMiLCIuLi9zcmMvaW4tbWVtL2luLW1lbW9yeS13ZWItYXBpLm1vZHVsZS5qcyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdmFyIFNUQVRVUyA9IHtcbiAgICBDT05USU5VRTogMTAwLFxuICAgIFNXSVRDSElOR19QUk9UT0NPTFM6IDEwMSxcbiAgICBPSzogMjAwLFxuICAgIENSRUFURUQ6IDIwMSxcbiAgICBBQ0NFUFRFRDogMjAyLFxuICAgIE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OOiAyMDMsXG4gICAgTk9fQ09OVEVOVDogMjA0LFxuICAgIFJFU0VUX0NPTlRFTlQ6IDIwNSxcbiAgICBQQVJUSUFMX0NPTlRFTlQ6IDIwNixcbiAgICBNVUxUSVBMRV9DSE9JQ0VTOiAzMDAsXG4gICAgTU9WRURfUEVSTUFOVEVOVExZOiAzMDEsXG4gICAgRk9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dXJsOiB1cmwsXG4gICAgICAgICAgICB1dGlsczogdGhpcy5yZXF1ZXN0SW5mb1V0aWxzXG4gICAgICAgIH07XG4gICAgICAgIHZhciByZXNPcHRpb25zO1xuICAgICAgICBpZiAoL2NvbW1hbmRzXFwvPyQvaS50ZXN0KHJlcUluZm8uYXBpQmFzZSkpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbW1hbmRzKHJlcUluZm8pO1xuICAgICAgICB9XG4gICAgICAgIHZhciBtZXRob2RJbnRlcmNlcHRvciA9IHRoaXMuYmluZChyZXFJbmZvLm1ldGhvZCk7XG4gICAgICAgIGlmIChtZXRob2RJbnRlcmNlcHRvcikge1xuICAgICAgICAgICAgLy8gSW5NZW1vcnlEYlNlcnZpY2UgaW50ZXJjZXB0cyB0aGlzIEhUVFAgbWV0aG9kLlxuICAgICAgICAgICAgLy8gaWYgaW50ZXJjZXB0b3IgcHJvZHVjZWQgYSByZXNwb25zZSwgcmV0dXJuIGl0LlxuICAgICAgICAgICAgLy8gZWxzZSBJbk1lbW9yeURiU2VydmljZSBjaG9zZSBub3QgdG8gaW50ZXJjZXB0OyBjb250aW51ZSBwcm9jZXNzaW5nLlxuICAgICAgICAgICAgdmFyIGludGVyY2VwdG9yUmVzcG9uc2UgPSBtZXRob2RJbnRlcmNlcHRvcihyZXFJbmZvKTtcbiAgICAgICAgICAgIGlmIChpbnRlcmNlcHRvclJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGludGVyY2VwdG9yUmVzcG9uc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICA7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHRoaXMuZGJbY29sbGVjdGlvbk5hbWVdKSB7XG4gICAgICAgICAgICAvLyByZXF1ZXN0IGlzIGZvciBhIGtub3duIGNvbGxlY3Rpb24gb2YgdGhlIEluTWVtb3J5RGJTZXJ2aWNlXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVSZXNw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mlsdGVyKGZ1bmN0aW9uIChyb3cpIHtcbiAgICAgICAgICAgIHZhciBvayA9IHRydWU7XG4gICAgICAgICAgICB2YXIgaSA9IGxlbjtcbiAgICAgICAgICAgIHdoaWxlIChvayAmJiBpKSB7XG4gICAgICAgICAgICAgICAgaSAtPSAxO1xuICAgICAgICAgICAgICAgIHZhciBjb25kID0gY29uZGl0aW9uc1tpXTtcbiAgICAgICAgICAgICAgICBvayA9IGNvbmQucngudGVzdChyb3dbY29uZC5uYW1lXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb2s7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogR2V0IGEgbWV0aG9kIGZyb20gdGhlIGBJbk1lbW9yeURiU2VydmljZWAgKGlmIGl0IGV4aXN0cyksIGJvdW5kIHRvIHRoYXQgc2VydmljZVxuICAgICAqL1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5iaW5kID0gZnVuY3Rpb24gKG1ldGhvZE5hbWUpIHtcbiAgICAgICAgdmFyIGZuID0gdGhpcy5pbk1lbURiU2VydmljZVttZXRob2ROYW1lXTtcbiAgICAgICAgcmV0dXJuIGZuID8gZm4uYmluZCh0aGlzLmluTWVtRGJTZXJ2aWNlKSA6IHVuZGVmaW5lZDtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5ib2RpZnkgPSBmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICB2YXIgYm9keSA9IHRoaXMuY2xvbmUoZGF0YSk7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbmZpZy5kYXRhRW5jYXBzdWxhdGlvbiA/IHsgZGF0YTogYm9keSB9IDogYm9keTtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5jbG9uZSA9IGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgIHJldHVybiBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KGRhdGEpKTtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5jb2xsZWN0aW9uSGFuZGxlciA9IGZ1bmN0aW9uIChyZXFJbmZvKSB7XG4gICAgICAgIC8vIGNvbnN0IHJlcSA9IHJlcUluZm8ucmVxO1xuICAgICAgICB2YXIgcmVzT3B0aW9ucztcbiAgICAgICAgc3dpdGNoIChyZXFJbmZvLm1ldGhvZCkge1xuICAgICAgICAgICAgY2FzZSAnZ2V0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5nZXQocmVxSW5mbyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdwb3N0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5wb3N0KHJlcUluZm8pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAncHV0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5wdXQocmVxSW5mbyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdkZWxldGUnOlxuICAgICAgICAgICAgICAgIHJlc09wdGlvbnMgPSB0aGlzLmRlbGV0ZShyZXFJbmZvKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmVzT3B0aW9ucyA9IHRoaXMuY3JlYXRlRXJyb3JSZXNwb25zZU9wdGlvbnMocmVxSW5mby51cmwsIFNUQVRVUy5NRVRIT0RfTk9UX0FMTE9XRUQsICdNZXRob2Qgbm90IGFsbG93ZWQnKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICAvLyBJZiBgaW5NZW1EYlNlcnZpY2UucmVzcG9uc2VJbnRlcmNlcHRvcmAgZXhpc3RzLCBsZXQgaXQgbW9ycGggdGhlIHJlc3BvbnN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4gICAgICovXG4gICAgQmFja2VuZFNlcnZpY2UucHJvdG90eXBlLmNvbW1hbmRzID0gZnVuY3Rpb24gKHJlcUluZm8pIHtcbiAgICAgICAgdmFyIF90aGlzID0gdGhpcztcbiAgICAgICAgdmFyIGNvbW1hbmQgPSByZXFJbmZvLmNvbGxlY3Rpb25OYW1lLnRvTG93ZXJDYXNlKCk7XG4gICAgICAgIHZhciBtZXRob2QgPSByZXFJbmZvLm1ldGhvZDtcbiAgICAgICAgdmFyIHJlc09wdGlvbnMgPSB7XG4gICAgICAgICAgICBzdGF0dXM6IFNUQVRVUy5PSyxcbiAgICAgICAgICAgIHVybDogcmVxSW5mby51cmxcbiAgICAgICAgfTtcbiAgICAgICAgc3dpdGNoIChjb21tYW5kKSB7XG4gICAgICAgICAgICBjYXNlICdyZXNldGRiJzpcbiAgICAgICAgICAgICAgICByZXR1cm4gY29uY2F0TWFwLmNhbGwodGhpcy5yZXNldERiKHJlcUluZm8pLCBmdW5jdGlvbiAoKSB7IHJldHVybiBfdGhpcy5jcmVhdGVSZXNwb25zZSQoZnVuY3Rpb24gKCkgeyByZXR1cm4gcmVzT3B0aW9uczsgfSwgZmFsc2UgLyogbm8gZGVsYXkgKi8pOyB9KTtcbiAgICAgICAgICAgIGNhc2UgJ2NvbmZpZyc6XG4gICAgICAgICAgICAgICAgaWYgKG1ldGhvZCA9PT0gJ2dldCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVzT3B0aW9ucy5ib2R5ID0gdGhpcy5jbG9uZSh0aGlzLmNvbmZpZyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBhbnkgb3RoZXIgSFRUUCBtZXRob2QgaXMgYXNzdW1lZCB0byBiZSBhIGNvbmZpZyB1cGRhdGVcbiAgICAgICAgICAgICAgICAgICAgcmVzT3B0aW9ucy5zdGF0dXMgPSBTVEFUVVMuTk9fQ09OVEVOVDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJvZHkgPSB0aGlzLmdldEpzb25Cb2R5KHJlcUluZm8ucmVxKTtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbih0aGlzLmNvbmZpZywgYm9keSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFzc1RocnVCYWNrZW5kID0gdW5kZWZpbmVkOyAvLyByZS1jcmVhdGUgbmV4dCB0aW1lXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5jcmVhdGVFcnJvclJlc3BvbnNlT3B0aW9ucyhyZXFJbmZvLnVybCwgU1RBVFVTLklOVEVSTkFMX1NFUlZFUl9FUlJPUiwgXCJVbmtub3duIGNvbW1hbmQgXFxcIlwiICsgY29tbWFuZCArIFwiXFxcIlwiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVSZXNwb25zZSQoZnVuY3Rpb24gKCkgeyByZXR1cm4gcmVzT3B0aW9uczsgfSwgZmFsc2UgLyogbm8gZGVsYXkgKi8pO1xuICAgIH07XG4gICAgQmFja2VuZFNlcnZpY2UucHJvdG90eXBlLmNyZWF0ZUVycm9yUmVzcG9uc2VPcHRpb25zID0gZnVuY3Rpb24gKHVybCwgc3RhdHVzLCBtZXNzYWdlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBib2R5OiB7IGVycm9yOiBcIlwiICsgbWVzc2FnZSB9LFxuICAgICAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgICAgICBoZWFkZXJzOiB0aGlzLmNyZWF0ZUhlYWRlcnMoeyAnQ29udGVudC1UeXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nIH0pLFxuICAgICAgICAgICAgc3RhdHVzOiBzdGF0dXNcbiAgICAgICAgfTtcbiAgICB9O1xuICAgIC8qKlxuICAgICAq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lLnByb3RvdHlwZS5jcmVhdGVSZXNwb25zZU9wdGlvbnMkID0gZnVuY3Rpb24gKHJlc09wdGlvbnNGYWN0b3J5KSB7XG4gICAgICAgIHZhciBfdGhpcyA9IHRoaXM7XG4gICAgICAgIHJldHVybiBuZXcgT2JzZXJ2YWJsZShmdW5jdGlvbiAocmVzcG9uc2VPYnNlcnZlcikge1xuICAgICAgICAgICAgdmFyIHJlc09wdGlvbnM7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJlc09wdGlvbnMgPSByZXNPcHRpb25zRmFjdG9yeSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgdmFyIGVyciA9IGVycm9yLm1lc3NhZ2UgfHwgZXJyb3I7XG4gICAgICAgICAgICAgICAgcmVzT3B0aW9ucyA9IF90aGlzLmNyZWF0ZUVycm9yUmVzcG9uc2VPcHRpb25zKCcnLCBTVEFUVVMuSU5URVJOQUxfU0VSVkVSX0VSUk9SLCBcIlwiICsgZXJyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHZhciBzdGF0dXMgPSByZXNPcHRpb25zLnN0YXR1cztcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmVzT3B0aW9ucy5zdGF0dXNUZXh0ID0gZ2V0U3RhdHVzVGV4dChzdGF0dXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2F0Y2ggKGUpIHsgfVxuICAgICAgICAgICAgaWYgKGlzU3VjY2VzcyhzdGF0dXMpKSB7XG4gICAgICAgICAgICAgICAgcmVzcG9uc2VPYnNlcnZlci5uZXh0KHJlc09wdGlvbnMpO1xuICAgICAgICAgICAgICAgIHJlc3BvbnNlT2JzZXJ2ZXIuY29tcGxldGUoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIHJlc3BvbnNlT2JzZXJ2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JlIGluIGNvbmZpZy5hcGlCYXNlXG4gICAgICAgICAgICAvLyBEb2VzIE5PVCBjYXJlIHdoYXQgdGhlIGFwaSBiYXNlIGNoYXJzIGFjdHVhbGx5IGFyZS5cbiAgICAgICAgICAgIHZhciBhcGlCYXNlID0gdm9pZCAwO1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnRyaXBsZS1lcXVhbHNcbiAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5hcGlCYXNlID09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGFwaUJhc2UgPSBwYXRoU2VnbWVudHNbc2VnbWVudEl4KytdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgYXBpQmFzZSA9IHJlbW92ZVRyYWlsaW5nU2xhc2godGhpcy5jb25maWcuYXBpQmFzZS50cmltKCkpO1xuICAgICAgICAgICAgICAgIGlmIChhcGlCYXNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlZ21lbnRJeCA9IGFwaUJhc2Uuc3BsaXQoJy8nKS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzZWdtZW50SXggPSAwOyAvLyBubyBhcGkgYmFzZSBhdCBhbGw7IHVud2lzZSBidXQgYWxsb3dlZC5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhcGlCYXNlICs9ICcvJztcbiAgICAgICAgICAgIHZhciBjb2xsZWN0aW9uTmFtZSA9IHBhdGhTZWdtZW50c1tzZWdtZW50SXgrK107XG4gICAgICAgICAgICAvLyBpZ25vcmUgYW55dGhpbmcgYWZ0ZXIgYSAnLicgKGUuZy4sdGhlIFwianNvblwiIGluIFwiY3VzdG9tZXJzLmpzb25cIilcbiAgICAgICAgICAgIGNvbGxlY3Rpb25OYW1lID0gY29sbGVjdGlv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F9hLnVybDtcbiAgICAgICAgdmFyIGl0ZW0gPSB0aGlzLmdldEpzb25Cb2R5KHJlcSk7XG4gICAgICAgIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTp0cmlwbGUtZXF1YWxzXG4gICAgICAgIGlmIChpdGVtLmlkID09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpdGVtLmlkID0gaWQgfHwgdGhpcy5nZW5JZChjb2xsZWN0aW9uLCBjb2xsZWN0aW9uTmFtZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYXRjaCAoZXJyKSB7XG4gICAgICAgICAgICAgICAgdmFyIGVtc2cgPSBlcnIubWVzc2FnZSB8fCAnJztcbiAgICAgICAgICAgICAgICBpZiAoL2lkIHR5cGUgaXMgbm9uLW51bWVyaWMvLnRlc3QoZW1zZykpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlRXJyb3JSZXNwb25zZU9wdGlvbnModXJsLCBTVEFUVVMuVU5QUk9DRVNTQUJMRV9FTlRSWSwgZW1zZyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLmNyZWF0ZUVycm9yUmVzcG9uc2VPcHRpb25zKHVybCwgU1RBVFVTLklOVEVSTkFMX1NFUlZFUl9FUlJPUiwgXCJGYWlsZWQgdG8gZ2VuZXJhdGUgbmV3IGlkIGZvciAnXCIgKyBjb2xsZWN0aW9uTmFtZSArIFwiJ1wiKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGlkICYmIGlkICE9PSBpdGVtLmlkKSB7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVFcnJvclJlc3BvbnNlT3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UlkKGNvbGxlY3Rpb24sIGNvbGxlY3Rpb25OYW1lLCBwYXJzZWQuaWQpLFxuICAgICAgICAgICAgbWV0aG9kOiB0aGlzLmdldFJlcXVlc3RNZXRob2QocmVxKSxcbiAgICAgICAgICAgIHF1ZXJ5OiBwYXJzZWQucXVlcnksXG4gICAgICAgICAgICByZXNvdXJjZVVybDogcGFyc2VkLnJlc291cmNlVXJsLFxuICAgICAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgICAgICB1dGlsczogdGhpcy5yZXF1ZXN0SW5mb1V0aWxzXG4gICAgICAgIH07XG4gICAgICAgIHZhciByZXNPcHRpb25zO1xuICAgICAgICBpZiAoL2NvbW1hbmRzXFwvPyQvaS50ZXN0KHJlcUluZm8uYXBpQmFzZSkpIHtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmNvbW1hbmRzKHJlcUluZm8pO1xuICAgICAgICB9XG4gICAgICAgIHZhciBtZXRob2RJbnRlcmNlcHRvciA9IHRoaXMuYmluZChyZXFJbmZvLm1ldGhvZCk7XG4gICAgICAgIGlmIChtZXRob2RJbnRlcmNlcHRvcikge1xuICAgICAgICAgICAgLy8gSW5NZW1vcnlEYlNlcnZpY2UgaW50ZXJjZXB0cyB0aGlzIEhUVFAgbWV0aG9kLlxuICAgICAgICAgICAgLy8gaWYgaW50ZXJjZXB0b3IgcHJvZHVjZWQgYSByZXNwb25zZSwgcmV0dXJuIGl0LlxuICAgICAgICAgICAgLy8gZWxzZSBJbk1lbW9yeURiU2VydmljZSBjaG9zZSBub3QgdG8gaW50ZXJjZXB0OyBjb250aW51ZSBwcm9jZXNzaW5nLlxuICAgICAgICAgICAgdmFyIGludGVyY2VwdG9yUmVzcG9uc2UgPSBtZXRob2RJbnRlcmNlcHRvcihyZXFJbmZvKTtcbiAgICAgICAgICAgIGlmIChpbnRlcmNlcHRvclJlc3BvbnNlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGludGVyY2VwdG9yUmVzcG9uc2U7XG4gICAg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9KTtcbiAgICAgICAgfSk7XG4gICAgICAgIHZhciBsZW4gPSBjb25kaXRpb25zLmxlbmd0aDtcbiAgICAgICAgaWYgKCFsZW4pIHtcbiAgICAgICAgICAgIHJldHVybiBjb2xsZWN0aW9uO1xuICAgICAgICB9XG4gICAgICAgIC8vIEFORCB0aGUgUmVnRXhwIGNvbmRpdGlvbnNcbiAgICAgICAgcmV0dXJuIGNvbGxlY3Rpb24uZmlsdGVyKGZ1bmN0aW9uIChyb3cpIHtcbiAgICAgICAgICAgIHZhciBvayA9IHRydWU7XG4gICAgICAgICAgICB2YXIgaSA9IGxlbjtcbiAgICAgICAgICAgIHdoaWxlIChvayAmJiBpKSB7XG4gICAgICAgICAgICAgICAgaSAtPSAxO1xuICAgICAgICAgICAgICAgIHZhciBjb25kID0gY29uZGl0aW9uc1tpXTtcbiAgICAgICAgICAgICAgICBvayA9IGNvbmQucngudGVzdChyb3dbY29uZC5uYW1lXSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gb2s7XG4gICAgICAgIH0pO1xuICAgIH07XG4gICAgLyoqXG4gICAgICogR2V0IGEgbWV0aG9kIGZyb20gdGhlIGBJbk1lbW9yeURiU2VydmljZWAgKGlmIGl0IGV4aXN0cyksIGJvdW5kIHRvIHRoYXQgc2VydmljZVxuICAgICAqL1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5iaW5kID0gZnVuY3Rpb24gKG1ldGhvZE5hbWUpIHtcbiAgICAgICAgdmFyIGZuID0gdGhpcy5pbk1lbURiU2VydmljZVttZXRob2ROYW1lXTtcbiAgICAgICAgcmV0dXJuIGZuID8gZm4uYmluZCh0aGlzLmluTWVtRGJTZXJ2aWNlKSA6IHVuZGVmaW5lZDtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5ib2RpZnkgPSBmdW5jdGlvbiAoZGF0YSkge1xuICAgICAgICB2YXIgYm9keSA9IHRoaXMuY2xvbmUoZGF0YSk7XG4gICAgICAgIHJldHVybiB0aGlzLmNvbmZpZy5kYXRhRW5jYXBzdWxhdGlvbiA/IHsgZGF0YTogYm9keSB9IDogYm9keTtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5jbG9uZSA9IGZ1bmN0aW9uIChkYXRhKSB7XG4gICAgICAgIHJldHVybiBKU09OLnBhcnNlKEpTT04uc3RyaW5naWZ5KGRhdGEpKTtcbiAgICB9O1xuICAgIEJhY2tlbmRTZXJ2aWNlLnByb3RvdHlwZS5jb2xsZWN0aW9uSGFuZGxlciA9IGZ1bmN0aW9uIChyZXFJbmZvKSB7XG4gICAgICAgIC8vIGNvbnN0IHJlcSA9IHJlcUluZm8ucmVxO1xuICAgICAgICB2YXIgcmVzT3B0aW9ucztcbiAgICAgICAgc3dpdGNoIChyZXFJbmZvLm1ldGhvZCkge1xuICAgICAgICAgICAgY2FzZSAnZ2V0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5nZXQocmVxSW5mbyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdwb3N0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5wb3N0KHJlcUluZm8pO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSAncHV0JzpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5wdXQocmVxSW5mbyk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlICdkZWxldGUnOlxuICAgICAgICAgICAgICAgIHJlc09wdGlvbnMgPSB0aGlzLmRlbGV0ZShyZXFJbmZvKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgcmVzT3B0aW9ucyA9IHRoaXMuY3JlYXRlRXJyb3JSZXNwb25zZU9wdGlvbnMoc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ICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBhbnkgb3RoZXIgSFRUUCBtZXRob2QgaXMgYXNzdW1lZCB0byBiZSBhIGNvbmZpZyB1cGRhdGVcbiAgICAgICAgICAgICAgICAgICAgcmVzT3B0aW9ucy5zdGF0dXMgPSBTVEFUVVMuTk9fQ09OVEVOVDtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGJvZHkgPSB0aGlzLmdldEpzb25Cb2R5KHJlcUluZm8ucmVxKTtcbiAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbih0aGlzLmNvbmZpZywgYm9keSk7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMucGFzc1RocnVCYWNrZW5kID0gdW5kZWZpbmVkOyAvLyByZS1jcmVhdGUgbmV4dCB0aW1lXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICByZXNPcHRpb25zID0gdGhpcy5jcmVhdGVFcnJvclJlc3BvbnNlT3B0aW9ucyhyZXFJbmZvLnVybCwgU1RBVFVTLklOVEVSTkFMX1NFUlZFUl9FUlJPUiwgXCJVbmtub3duIGNvbW1hbmQgXFxcIlwiICsgY29tbWFuZCArIFwiXFxcIlwiKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcy5jcmVhdGVSZXNwb25zZSQoZnVuY3Rpb24gKCkgeyByZXR1cm4gcmVzT3B0aW9uczsgfSwgZmFsc2UgLyogbm8gZGVsYXkgKi8pO1xuICAgIH07XG4gICAgQmFja2VuZFNlcnZpY2UucHJvdG90eXBlLmNyZWF0ZUVycm9yUmVzcG9uc2VPcHRpb25zID0gZnVuY3Rpb24gKHVybCwgc3RhdHVzLCBtZXNzYWdlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBib2R5OiB7IGVycm9yOiBcIlw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ZnJvbnQgcGFydCBvZiB0aGUgcGF0aCBkZXZvdGVkIHRvIGdldHRpbmcgdG8gdGhlIGFwaSByb3V0ZVxuICAgICAgICAgICAgLy8gQXNzdW1lcyBmaXJzdCBwYXRoIHNlZ21lbnQgaWYgbm8gY29uZmlnLmFwaUJhc2VcbiAgICAgICAgICAgIC8vIGVsc2UgaWdub3JlcyBhcyBtYW55IHBhdGggc2VnbWVudHMgYXMgYXJlIGluIGNvbmZpZy5hcGlCYXNlXG4gICAgICAgICAgICAvLyBEb2VzIE5PVCBjYXJlIHdoYXQgdGhlIGFwaSBiYXNlIGNoYXJzIGFjdHVhbGx5IGFyZS5cbiAgICAgICAgICAgIHZhciBhcGlCYXNlID0gdm9pZCAwO1xuICAgICAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOnRyaXBsZS1lcXVhbHNcbiAgICAgICAgICAgIGlmICh0aGlzLmNvbmZpZy5hcGlCYXNlID09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgIGFwaUJhc2UgPSBwYXRoU2VnbWVudHNbc2VnbWVudEl4KytdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgYXBpQmFzZSA9IHJlbW92ZVRyYWlsaW5nU2xhc2godGhpcy5jb25maWcuYXBpQmFzZS50cmltKCkpO1xuICAgICAgICAgICAgICAgIGlmIChhcGlCYXNlKSB7XG4gICAgICAgICAgICAgICAgICAgIHNlZ21lbnRJeCA9IGFwaUJhc2Uuc3BsaXQoJy8nKS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBzZWdtZW50SXggPSAwOyAvLyBubyBhcGkgYmFzZSBhdCBhbGw7IHVud2lzZSBidXQgYWxsb3dlZC5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhcGlCYXNlICs9ICcvJztcb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0FDSixDQUFDO0tBQ0wsQ0FBQzs7Ozs7OztJQU9GLG9CQUFvQixDQUFDLFVBQVUsR0FBRyxVQUFVLFNBQVMsRUFBRSxPQUFPLEVBQUU7UUFDNUQsT0FBTyxvQkFBb0IsQ0FBQyxPQUFPLENBQUMsU0FBUyxFQUFFLE9BQU8sQ0FBQyxDQUFDO0tBQzNELENBQUM7SUFDRixPQUFPLG9CQUFvQixDQUFDO0NBQy9CLEVBQUUsQ0FBQyxDQUFDO0FBQ0wsQUFDQSxvQkFBb0IsQ0FBQyxVQUFVLEdBQUc7SUFDOUIsRUFBRSxJQUFJLEVBQUVDLGFBQVEsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLEVBQUUsRUFBRTtDQUNsQyxDQUFDOztBQUVGLG9CQUFvQixDQUFDLGNBQWMsR0FBRyxZQUFZLEVBQUUsT0FBTyxFQUFFLENBQUMsRUFBRSxDQUFDOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OyJ9 \ No newline at end of file diff --git a/http-backend.service.d.ts b/http-backend.service.d.ts index 7e6ac65..50c5850 100644 --- a/http-backend.service.d.ts +++ b/http-backend.service.d.ts @@ -15,14 +15,14 @@ import { BackendService } from './backend.service'; * Call `forRoot` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpModule } from '@angular/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/http-backend.service.js b/http-backend.service.js index 04ecff8..749db92 100644 --- a/http-backend.service.js +++ b/http-backend.service.js @@ -26,14 +26,14 @@ import { BackendService } from './backend.service'; * Call `forRoot` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpModule } from '@angular/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/http-backend.service.js.map b/http-backend.service.js.map index cb88505..f1e8475 100644 --- a/http-backend.service.js.map +++ b/http-backend.service.js.map @@ -1 +1 @@ -{"version":3,"sources":["http-backend.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,UAAA,EAAY,QAAA,EAAU,QAAA,EAAS,MAAO,eAAA,CAAgB;AAEvE,OAAO,EAAE,UAAA,EACA,OAAO,EAAE,UAAA,EAAqB,aAAA,EAC9B,QAAQ,EACR,eAAe,IAAI,mBAAA,EAEnB,eAAe,EACf,UAAU,EAAE,YAAA,EAAa,MAAO,eAAA,CAAgB;AAGzD,OAAO,EAAE,GAAA,EAAI,MAAO,mBAAA,CAAoB;AAExC,OAAO,EAAE,MAAA,EAAO,MAAO,qBAAA,CAAsB;AAE7C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EAElB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,cAAA,EAAe,MAAO,mBAAA,CAAoB;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;IAAwC,sCAAc;IAEpD,4BACU,QAAkB,EAC1B,cAAiC,EAC/B,MAAiC;QAHrC,YAKE,kBAAM,cAAc,EAAE,MAAM,CAAC,SAC9B;QALS,cAAQ,GAAR,QAAQ,CAAU;;IAK5B,CAAC;IAED,6CAAgB,GAAhB,UAAiB,GAAY;QAC3B,IAAI,QAA8B,CAAC;QACnC,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,yBAAyB,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAC;CACvH,EAJ6F,CAI7F,CAAC","file":"http-backend.service.js","sourceRoot":"","sourcesContent":["import { Inject, Injectable, Injector, Optional } from '@angular/core';\n\nimport { BrowserXhr, Connection, ConnectionBackend,\n Headers, ReadyState, Request, RequestMethod,\n Response,\n ResponseOptions as HttpResponseOptions,\n ResponseOptionsArgs,\n URLSearchParams,\n XHRBackend, XSRFStrategy } from '@angular/http';\n\nimport { Observable } from 'rxjs/Observable';\nimport { map } from 'rxjs/operator/map';\n\nimport { STATUS } from './http-status-codes';\n\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n InMemoryDbService,\n ResponseOptions\n} from './interfaces';\n\nimport { BackendService } from './backend.service';\n\n/**\n * For Angular `Http` simulate the behavior of a RESTy web api\n * backed by the simple in-memory data store provided by the injected `InMemoryDbService`.\n * Conforms mostly to behavior described here:\n * http://www.restapitutorial.com/lessons/httpmethods.html\n *\n * ### Usage\n *\n * Create an in-memory data store class that implements `InMemoryDbService`.\n * Call `forRoot` static method with this service class and optional configuration object:\n * ```\n * // other imports\n * import { HttpModule } from '@angular/http';\n * import { InMemoryWebApiModule } from 'angular-in-memory-web-api';\n *\n * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service';\n * @NgModule({\n * imports: [\n * HttpModule,\n * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig),\n * ...\n * ],\n * ...\n * })\n * export class AppModule { ... }\n * ```\n */\n\nexport class HttpBackendService extends BackendService implements ConnectionBackend {\n\n constructor(\n private injector: Injector,\n inMemDbService: InMemoryDbService,\n config: InMemoryBackendConfigArgs\n ) {\n super(inMemDbService, config);\n }\n\n createConnection(req: Request): Connection {\n let response: Observable;\n try {\n response = this.handleRequest(req);\n\n } catch (error) {\n const err = error.message || error;\n const resOptions = this.createErrorResponseOptions(req.url, STATUS.INTERNAL_SERVER_ERROR, `${err}`);\n response = this.createResponse$(() => resOptions);\n }\n\n return {\n readyState: ReadyState.Done,\n request: req,\n response\n };\n }\n\n //// protected overrides /////\n\n protected getJsonBody(req: Request): any {\n try {\n return req.json();\n } catch (e) {\n const msg = `'${req.url}' request body-to-json error\\n${JSON.stringify(e)}`;\n throw new Error(msg);\n }\n }\n\n protected getRequestMethod(req: Request): string {\n return RequestMethod[req.method || 0].toLowerCase();\n }\n\n protected createHeaders(headers: { [index: string]: string; }): Headers {\n return new Headers(headers);\n }\n\n protected createQueryMap(search: string): Map {\n return search ? new URLSearchParams(search).paramsMap : new Map();\n }\n\n protected createResponse$fromResponseOptions$(resOptions$: Observable): Observable {\n return map.call(resOptions$, (opts: ResponseOptionsArgs) => {\n return new Response(new HttpResponseOptions(opts));\n });\n }\n\n protected createPassThruBackend() {\n try {\n // copied from @angular/http/backends/xhr_backend\n const browserXhr = this.injector.get(BrowserXhr);\n const baseResponseOptions = this.injector.get(HttpResponseOptions);\n const xsrfStrategy = this.injector.get(XSRFStrategy);\n const xhrBackend = new XHRBackend(browserXhr, baseResponseOptions, xsrfStrategy);\n\n return {\n handle: (req: Request) => xhrBackend.createConnection(req).response\n };\n\n } catch (e) {\n e.message = 'Cannot create passThru404 backend; ' + (e.message || '');\n throw e;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Injector, },\n{type: InMemoryDbService, },\n{type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig, ] }, { type: Optional }, ]},\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file +{"version":3,"sources":["http-backend.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,UAAA,E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AAG,CAAC,YAAY,CAAC,CAAC;YACrD,IAAM,YAAU,GAAG,IAAI,UAAU,CAAC,UAAU,EAAE,mBAAmB,EAAE,YAAY,CAAC,CAAC;YAEjF,MAAM,CAAC;gBACL,MAAM,EAAE,UAAC,GAAY,IAAK,OAAA,YAAU,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAzC,CAAyC;aACpE,CAAC;QAEJ,CAAC;QAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACX,CAAC,CAAC,OAAO,GAAG,qCAAqC,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YACtE,MAAM,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAUH,yBAAC;AAAD,CAnFA,AAmFC,CAnFuC,cAAc;;AA0E/C,6BAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,iCAAc,GAAmE,cAAM,OAAA;IAC9F,EAAC,IAAI,EAAE,QAAQ,GAAG;IAClB,EAAC,IAAI,EAAE,iBAAiB,GAAG;IAC3B,EAAC,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAC;CACvH,EAJ6F,CAI7F,CAAC","file":"http-backend.service.js","sourceRoot":"","sourcesContent":["import { Inject, Injectable, Injector, Optional } from '@angular/core';\n\nimport { BrowserXhr, Connection, ConnectionBackend,\n Headers, ReadyState, Request, RequestMethod,\n Response,\n ResponseOptions as HttpResponseOptions,\n ResponseOptionsArgs,\n URLSearchParams,\n XHRBackend, XSRFStrategy } from '@angular/http';\n\nimport { Observable } from 'rxjs/Observable';\nimport { map } from 'rxjs/operator/map';\n\nimport { STATUS } from './http-status-codes';\n\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n InMemoryDbService,\n ResponseOptions\n} from './interfaces';\n\nimport { BackendService } from './backend.service';\n\n/**\n * For Angular `Http` simulate the behavior of a RESTy web api\n * backed by the simple in-memory data store provided by the injected `InMemoryDbService`.\n * Conforms mostly to behavior described here:\n * http://www.restapitutorial.com/lessons/httpmethods.html\n *\n * ### Usage\n *\n * Create an in-memory data store class that implements `InMemoryDbService`.\n * Call `forRoot` static method with this service class and optional configuration object:\n * ```\n * // other imports\n * import { HttpModule } from '@angular/http';\n * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';\n *\n * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service';\n * @NgModule({\n * imports: [\n * HttpModule,\n * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig),\n * ...\n * ],\n * ...\n * })\n * export class AppModule { ... }\n * ```\n */\n\nexport class HttpBackendService extends BackendService implements ConnectionBackend {\n\n constructor(\n private injector: Injector,\n inMemDbService: InMemoryDbService,\n config: InMemoryBackendConfigArgs\n ) {\n super(inMemDbService, config);\n }\n\n createConnection(req: Request): Connection {\n let response: Observable;\n try {\n response = this.handleRequest(req);\n\n } catch (error) {\n const err = error.message || error;\n const resOptions = this.createErrorResponseOptions(req.url, STATUS.INTERNAL_SERVER_ERROR, `${err}`);\n response = this.createResponse$(() => resOptions);\n }\n\n return {\n readyState: ReadyState.Done,\n request: req,\n response\n };\n }\n\n //// protected overrides /////\n\n protected getJsonBody(req: Request): any {\n try {\n return req.json();\n } catch (e) {\n const msg = `'${req.url}' request body-to-json error\\n${JSON.stringify(e)}`;\n throw new Error(msg);\n }\n }\n\n protected getRequestMethod(req: Request): string {\n return RequestMethod[req.method || 0].toLowerCase();\n }\n\n protected createHeaders(headers: { [index: string]: string; }): Headers {\n return new Headers(headers);\n }\n\n protected createQueryMap(search: string): Map {\n return search ? new URLSearchParams(search).paramsMap : new Map();\n }\n\n protected createResponse$fromResponseOptions$(resOptions$: Observable): Observable {\n return map.call(resOptions$, (opts: ResponseOptionsArgs) => {\n return new Response(new HttpResponseOptions(opts));\n });\n }\n\n protected createPassThruBackend() {\n try {\n // copied from @angular/http/backends/xhr_backend\n const browserXhr = this.injector.get(BrowserXhr);\n const baseResponseOptions = this.injector.get(HttpResponseOptions);\n const xsrfStrategy = this.injector.get(XSRFStrategy);\n const xhrBackend = new XHRBackend(browserXhr, baseResponseOptions, xsrfStrategy);\n\n return {\n handle: (req: Request) => xhrBackend.createConnection(req).response\n };\n\n } catch (e) {\n e.message = 'Cannot create passThru404 backend; ' + (e.message || '');\n throw e;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: Injector, },\n{type: InMemoryDbService, },\n{type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig, ] }, { type: Optional }, ]},\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/http-client-backend.service.d.ts b/http-client-backend.service.d.ts index 6756f90..cc6c09c 100644 --- a/http-client-backend.service.d.ts +++ b/http-client-backend.service.d.ts @@ -14,14 +14,14 @@ import { BackendService } from './backend.service'; * Call `config` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpClientModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpClientModule } from '@angular/common/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/http-client-backend.service.js b/http-client-backend.service.js index 00c251d..337efdc 100644 --- a/http-client-backend.service.js +++ b/http-client-backend.service.js @@ -26,14 +26,14 @@ import { BackendService } from './backend.service'; * Call `config` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpClientModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpClientModule } from '@angular/common/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/http-client-backend.service.js.map b/http-client-backend.service.js.map index 4a99024..0794ad1 100644 --- a/http-client-backend.service.js.map +++ b/http-client-backend.service.js.map @@ -1 +1 @@ -{"version":3,"sources":["http-client-backend.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,UAAA,EAAY,QAAA,EAAS,MAAO,eAAA,CAAgB;AAC7D,OAAO,EAEL,WAAW,EACX,UAAU,EAEV,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,sBAAA,CAAuB;AAG9B,OAAO,EAAE,GAAA,EAAI,MAAO,mBAAA,CAAoB;AAExC,OAAO,EAAE,MAAA,EAAO,MAAO,qBAAA,CAAsB;AAE7C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EAElB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,cAAA,EAAe,MAAO,mBAAA,CAAoB;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;IAA8C,4CAAc;IAE1D,kCACE,cAAiC,EAC/B,MAAiC,EAC3B,UAAsB;QAHhC,YAKE,kBAAM,cAAc,EAAE,MAAM,CAAC,SAC9B;QAHS,gBAAU,GAAV,UAAU,CAAY;;IAGhC,CAAC;IAED,yCAAM,GAAN,UAAO,GAAqB;QAC1B,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAA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C,IAAsB,IAAK,OAAA,IAAI,YAAY,CAAM,IAAI,CAAC,EAA3B,CAA2B,CAAC,CAAC;IAC7D,CAAC;IAES,wDAAqB,GAA/B;QACE,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC7C,CAAC;QAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACZ,EAAE,CAAC,OAAO,GAAG,qCAAqC,GAAG,CAAC,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YACxE,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IAUH,+BAAC;AAAD,CAlEA,AAkEC,CAlE6C,cAAc;;AAyDrD,mCAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,uCAAc,GAAmE,cAAM,OAAA;IAC9F,EAAC,IAAI,EAAE,iBAAiB,GAAG;IAC3B,EAAC,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAC;IACxH,EAAC,IAAI,EAAE,UAAU,GAAG;CACnB,EAJ6F,CAI7F,CAAC","file":"http-client-backend.service.js","sourceRoot":"","sourcesContent":["import { Inject, Injectable, Optional } from '@angular/core';\nimport {\n HttpBackend,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n HttpResponse, HttpResponseBase,\n HttpXhrBackend,\n XhrFactory\n} from '@angular/common/http';\n\nimport { Observable } from 'rxjs/Observable';\nimport { map } from 'rxjs/operator/map';\n\nimport { STATUS } from './http-status-codes';\n\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n InMemoryDbService,\n ResponseOptions\n} from './interfaces';\n\nimport { BackendService } from './backend.service';\n\n/**\n * For Angular `HttpClient` simulate the behavior of a RESTy web api\n * backed by the simple in-memory data store provided by the injected `InMemoryDbService`.\n * Conforms mostly to behavior described here:\n * http://www.restapitutorial.com/lessons/httpmethods.html\n *\n * ### Usage\n *\n * Create an in-memory data store class that implements `InMemoryDbService`.\n * Call `config` static method with this service class and optional configuration object:\n * ```\n * // other imports\n * import { HttpClientModule } from '@angular/http';\n * import { InMemoryWebApiModule } from 'angular-in-memory-web-api';\n *\n * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service';\n * @NgModule({\n * imports: [\n * HttpModule,\n * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig),\n * ...\n * ],\n * ...\n * })\n * export class AppModule { ... }\n * ```\n */\n\nexport class HttpClientBackendService extends BackendService implements HttpBackend {\n\n constructor(\n inMemDbService: InMemoryDbService,\n config: InMemoryBackendConfigArgs,\n private xhrFactory: XhrFactory\n ) {\n super(inMemDbService, config);\n }\n\n handle(req: HttpRequest): Observable> {\n try {\n return this.handleRequest(req);\n\n } catch (error) {\n const err = error.message || error;\n const resOptions = this.createErrorResponseOptions(req.url, STATUS.INTERNAL_SERVER_ERROR, `${err}`);\n return this.createResponse$(() => resOptions);\n }\n }\n\n //// protected overrides /////\n\n protected getJsonBody(req: HttpRequest): any {\n return req.body;\n }\n\n protected getRequestMethod(req: HttpRequest): string {\n return (req.method || 'get').toLowerCase();\n }\n\n protected createHeaders(headers: { [index: string]: string; }): HttpHeaders {\n return new HttpHeaders(headers);\n }\n\n protected createQueryMap(search: string): Map {\n const map = new Map();\n if (search) {\n const params = new HttpParams({fromString: search});\n params.keys().forEach(p => map.set(p, params.getAll(p)));\n }\n return map;\n }\n\n protected createResponse$fromResponseOptions$(resOptions$: Observable): Observable> {\n return map.call(resOptions$,\n (opts: HttpResponseBase) => new HttpResponse(opts));\n }\n\n protected createPassThruBackend() {\n try {\n return new HttpXhrBackend(this.xhrFactory);\n } catch (ex) {\n ex.message = 'Cannot create passThru404 backend; ' + (ex.message || '');\n throw ex;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: InMemoryDbService, },\n{type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig, ] }, { type: Optional }, ]},\n{type: XhrFactory, },\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file +{"version":3,"sources":["http-client-backend.service.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,OAAO,EAAE,MAAA,EAAQ,UAAA,EAAY,QAAA,EAAS,MAAO,eAAA,CAAgB;AAC7D,OAAO,EAEL,WAAW,EACX,UAAU,EAEV,YAAY,EACZ,cAAc,EACd,UAAU,EACX,MAAM,sBAAA,CAAuB;AAG9B,OAAO,EAAE,GAAA,EAAI,MAAO,mBAAA,CAAoB;AAExC,OAAO,EAAE,MAAA,EAAO,MAAO,qBAAA,CAAsB;AAE7C,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EAElB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,cAAA,EAAe,MAAO,mBAAA,CAAoB;AAEnD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH;IAA8C,4CAAc;IAE1D,kCACE,cAAiC,EAC/B,MAAiC,EAC3B,UAAsB;QAHhC,YAKE,kBAAM,cAAc,EAAE,MAAM,CAAC,SAC9B;QAHS,gBAAU,GAAV,UAAU,CAAY;;IAGhC,CAAC;IAED,yCAAM,GAAN,UAAO,GAAqB;QAC1B,IAAI,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAEjC,CAAC;QAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC;YACf,IAAM,GAAG,GAAG,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC;YACnC,IAAM,YAAU,GAAG,IAAI,CAAC,0BAA0B,CAAC,GAAG,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C,CAAC;QAC7C,CAAC;QAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACZ,EAAE,CAAC,OAAO,GAAG,qCAAqC,GAAG,CAAC,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;YACxE,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC;IAUH,+BAAC;AAAD,CAlEA,AAkEC,CAlE6C,cAAc;;AAyDrD,mCAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,UAAU,EAAE;CACnB,CAAC;AACF,kBAAkB;AACX,uCAAc,GAAmE,cAAM,OAAA;IAC9F,EAAC,IAAI,EAAE,iBAAiB,GAAG;IAC3B,EAAC,IAAI,EAAE,yBAAyB,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,qBAAqB,EAAG,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAG,EAAC;IACxH,EAAC,IAAI,EAAE,UAAU,GAAG;CACnB,EAJ6F,CAI7F,CAAC","file":"http-client-backend.service.js","sourceRoot":"","sourcesContent":["import { Inject, Injectable, Optional } from '@angular/core';\nimport {\n HttpBackend,\n HttpHeaders,\n HttpParams,\n HttpRequest,\n HttpResponse, HttpResponseBase,\n HttpXhrBackend,\n XhrFactory\n} from '@angular/common/http';\n\nimport { Observable } from 'rxjs/Observable';\nimport { map } from 'rxjs/operator/map';\n\nimport { STATUS } from './http-status-codes';\n\nimport {\n InMemoryBackendConfig,\n InMemoryBackendConfigArgs,\n InMemoryDbService,\n ResponseOptions\n} from './interfaces';\n\nimport { BackendService } from './backend.service';\n\n/**\n * For Angular `HttpClient` simulate the behavior of a RESTy web api\n * backed by the simple in-memory data store provided by the injected `InMemoryDbService`.\n * Conforms mostly to behavior described here:\n * http://www.restapitutorial.com/lessons/httpmethods.html\n *\n * ### Usage\n *\n * Create an in-memory data store class that implements `InMemoryDbService`.\n * Call `config` static method with this service class and optional configuration object:\n * ```\n * // other imports\n * import { HttpClientModule } from '@angular/common/http';\n * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api';\n *\n * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service';\n * @NgModule({\n * imports: [\n * HttpModule,\n * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig),\n * ...\n * ],\n * ...\n * })\n * export class AppModule { ... }\n * ```\n */\n\nexport class HttpClientBackendService extends BackendService implements HttpBackend {\n\n constructor(\n inMemDbService: InMemoryDbService,\n config: InMemoryBackendConfigArgs,\n private xhrFactory: XhrFactory\n ) {\n super(inMemDbService, config);\n }\n\n handle(req: HttpRequest): Observable> {\n try {\n return this.handleRequest(req);\n\n } catch (error) {\n const err = error.message || error;\n const resOptions = this.createErrorResponseOptions(req.url, STATUS.INTERNAL_SERVER_ERROR, `${err}`);\n return this.createResponse$(() => resOptions);\n }\n }\n\n //// protected overrides /////\n\n protected getJsonBody(req: HttpRequest): any {\n return req.body;\n }\n\n protected getRequestMethod(req: HttpRequest): string {\n return (req.method || 'get').toLowerCase();\n }\n\n protected createHeaders(headers: { [index: string]: string; }): HttpHeaders {\n return new HttpHeaders(headers);\n }\n\n protected createQueryMap(search: string): Map {\n const map = new Map();\n if (search) {\n const params = new HttpParams({fromString: search});\n params.keys().forEach(p => map.set(p, params.getAll(p)));\n }\n return map;\n }\n\n protected createResponse$fromResponseOptions$(resOptions$: Observable): Observable> {\n return map.call(resOptions$,\n (opts: HttpResponseBase) => new HttpResponse(opts));\n }\n\n protected createPassThruBackend() {\n try {\n return new HttpXhrBackend(this.xhrFactory);\n } catch (ex) {\n ex.message = 'Cannot create passThru404 backend; ' + (ex.message || '');\n throw ex;\n }\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: Injectable },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n{type: InMemoryDbService, },\n{type: InMemoryBackendConfigArgs, decorators: [{ type: Inject, args: [InMemoryBackendConfig, ] }, { type: Optional }, ]},\n{type: XhrFactory, },\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/http-client-in-memory-web-api.module.d.ts b/http-client-in-memory-web-api.module.d.ts new file mode 100644 index 0000000..a565daa --- /dev/null +++ b/http-client-in-memory-web-api.module.d.ts @@ -0,0 +1,29 @@ +import { ModuleWithProviders, Type } from '@angular/core'; +import { HttpBackend, XhrFactory } from '@angular/common/http'; +import { InMemoryBackendConfigArgs, InMemoryBackendConfig, InMemoryDbService } from './interfaces'; +export declare function httpClientInMemBackendServiceFactory(dbService: InMemoryDbService, options: InMemoryBackendConfig, xhrFactory: XhrFactory): HttpBackend; +export declare class HttpClientInMemoryWebApiModule { + /** + * Redirect the Angular `HttpClient` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders; +} diff --git a/http-client-in-memory-web-api.module.js b/http-client-in-memory-web-api.module.js new file mode 100644 index 0000000..a2e72ec --- /dev/null +++ b/http-client-in-memory-web-api.module.js @@ -0,0 +1,59 @@ +////// HttpClient-Only version //// +import { NgModule } from '@angular/core'; +import { HttpBackend, XhrFactory } from '@angular/common/http'; +import { InMemoryBackendConfig, InMemoryDbService } from './interfaces'; +import { HttpClientBackendService } from './http-client-backend.service'; +// Internal - Creates the in-mem backend for the HttpClient module +// AoT requires factory to be exported +export function httpClientInMemBackendServiceFactory(dbService, options, xhrFactory) { + var backend = new HttpClientBackendService(dbService, options, xhrFactory); + return backend; +} +var HttpClientInMemoryWebApiModule = (function () { + function HttpClientInMemoryWebApiModule() { + } + /** + * Redirect the Angular `HttpClient` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + HttpClientInMemoryWebApiModule.forRoot = function (dbCreator, options) { + return { + ngModule: HttpClientInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + { provide: HttpBackend, + useFactory: httpClientInMemBackendServiceFactory, + deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory] } + ] + }; + }; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + HttpClientInMemoryWebApiModule.forFeature = function (dbCreator, options) { + return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options); + }; + return HttpClientInMemoryWebApiModule; +}()); +export { HttpClientInMemoryWebApiModule }; +HttpClientInMemoryWebApiModule.decorators = [ + { type: NgModule, args: [{},] }, +]; +/** @nocollapse */ +HttpClientInMemoryWebApiModule.ctorParameters = function () { return []; }; +//# sourceMappingURL=http-client-in-memory-web-api.module.js.map \ No newline at end of file diff --git a/http-client-in-memory-web-api.module.js.map b/http-client-in-memory-web-api.module.js.map new file mode 100644 index 0000000..ecad6f5 --- /dev/null +++ b/http-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IAAI,EAAE,CAAC,EAAE,EAAG,EAAE;CAC/B,CAAC;AACF,kBAAkB;AACX,6CAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC","file":"http-client-in-memory-web-api.module.js","sourceRoot":"","sourcesContent":["////// HttpClient-Only version ////\n\nimport { NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { HttpBackend, XhrFactory } from '@angular/common/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryDbService\n} from './interfaces';\n\nimport { HttpClientBackendService } from './http-client-backend.service';\n\n// Internal - Creates the in-mem backend for the HttpClient module\n// AoT requires factory to be exported\nexport function httpClientInMemBackendServiceFactory(\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig,\n xhrFactory: XhrFactory,\n): HttpBackend {\n const backend: any = new HttpClientBackendService(dbService, options, xhrFactory);\n return backend;\n}\n\n\nexport class HttpClientInMemoryWebApiModule {\n /**\n * Redirect the Angular `HttpClient` XHR calls\n * to in-memory data store that implements `InMemoryDbService`.\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * Usually imported in the root application module.\n * Can import in a lazy feature module too, which will shadow modules loaded earlier\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * HttpInMemoryWebApiModule.forRoot(dbCreator);\n * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return {\n ngModule: HttpClientInMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n\n { provide: HttpBackend,\n useFactory: httpClientInMemBackendServiceFactory,\n deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory]}\n ]\n };\n }\n /**\n *\n * Enable and configure the in-memory web api in a lazy-loaded feature module.\n * Same as `forRoot`.\n * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.\n */\n static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/http-client-in-memory-web-api.module.metadata.json b/http-client-in-memory-web-api.module.metadata.json new file mode 100644 index 0000000..6d69309 --- /dev/null +++ b/http-client-in-memory-web-api.module.metadata.json @@ -0,0 +1 @@ +[{"__symbolic":"module","version":3,"metadata":{"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"HttpClientInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"HttpClientInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpClientInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}] \ No newline at end of file diff --git a/http-in-memory-web-api.module.d.ts b/http-in-memory-web-api.module.d.ts new file mode 100644 index 0000000..b4c6a56 --- /dev/null +++ b/http-in-memory-web-api.module.d.ts @@ -0,0 +1,29 @@ +import { Injector, ModuleWithProviders, Type } from '@angular/core'; +import { XHRBackend } from '@angular/http'; +import { InMemoryBackendConfigArgs, InMemoryBackendConfig, InMemoryDbService } from './interfaces'; +export declare function httpInMemBackendServiceFactory(injector: Injector, dbService: InMemoryDbService, options: InMemoryBackendConfig): XHRBackend; +export declare class HttpInMemoryWebApiModule { + /** + * Redirect the Angular `Http` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders; +} diff --git a/http-in-memory-web-api.module.js b/http-in-memory-web-api.module.js new file mode 100644 index 0000000..7ccfb66 --- /dev/null +++ b/http-in-memory-web-api.module.js @@ -0,0 +1,59 @@ +////// Http-Only version //// +import { Injector, NgModule } from '@angular/core'; +import { XHRBackend } from '@angular/http'; +import { InMemoryBackendConfig, InMemoryDbService } from './interfaces'; +import { HttpBackendService } from './http-backend.service'; +// Internal - Creates the in-mem backend for the Http module +// AoT requires factory to be exported +export function httpInMemBackendServiceFactory(injector, dbService, options) { + var backend = new HttpBackendService(injector, dbService, options); + return backend; +} +var HttpInMemoryWebApiModule = (function () { + function HttpInMemoryWebApiModule() { + } + /** + * Redirect the Angular `Http` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + HttpInMemoryWebApiModule.forRoot = function (dbCreator, options) { + return { + ngModule: HttpInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + { provide: XHRBackend, + useFactory: httpInMemBackendServiceFactory, + deps: [Injector, InMemoryDbService, InMemoryBackendConfig] } + ] + }; + }; + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + HttpInMemoryWebApiModule.forFeature = function (dbCreator, options) { + return HttpInMemoryWebApiModule.forRoot(dbCreator, options); + }; + return HttpInMemoryWebApiModule; +}()); +export { HttpInMemoryWebApiModule }; +HttpInMemoryWebApiModule.decorators = [ + { type: NgModule, args: [{},] }, +]; +/** @nocollapse */ +HttpInMemoryWebApiModule.ctorParameters = function () { return []; }; +//# sourceMappingURL=http-in-memory-web-api.module.js.map \ No newline at end of file diff --git a/http-in-memory-web-api.module.js.map b/http-in-memory-web-api.module.js.map new file mode 100644 index 0000000..6b140e1 --- /dev/null +++ b/http-in-memory-web-api.module.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["http-in-memory-web-api.module.ts"],"names":[],"mappings":"AAAA,6BAAC;AAED,OAAO,EAAE,QAAA,EAAU,QAAA,EAAoC,MAAO,eAAA,CAAgB;AAC9E,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAE3C,OAAO,EAEL,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,kBAAA,EAAmB,MAAa,wBAAA,CAAyB;AAElE,4DAA4D;AAC5D,sCAAsC;AACtC,MAAM,yCACJ,QAAU,EACV,SAAW,EACX,OAAS;IAET,IAAM,OAAA,GAAe,IAAI,kBAAA,CAAmB,QAAC,EAAS,SAAA,EAAW,OAAA,CAAQ,CAAC;IAC1E,MAAM,CAAC,OAAW,CAAW;AAC/B,CAAC;AAGD;IAAA;IA4CA,CAAC;IA3CC;;;;;;;;;;;;;;MAcE;IACK,gCAAO,GAAd,UAAe,SAAkC,EAAE,OAAmC;QACpF,MAAM,CAAC;YACL,QAAQ,EAAE,wBAAwB;YAClC,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,iBAAiB,EAAG,QAAQ,EAAE,SAAS,EAAE;gBACpD,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE;gBAErD,EAAE,OAAO,EAAE,UAAU;oBACnB,UAAU,EAAE,8BAA8B;oBAC1C,IAAI,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,CAAC,EAAC;aAC9D;SACF,CAAC;IACJ,CAAC;IACC;;;;;KAKC;IACI,mCAAU,GAAjB,UAAkB,SAAkC,EAAE,OAAmC;QACvF,MAAM,CAAC,wBAAwB,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC;IAOH,+BAAC;AAAD,CA5CA,AA4CC;;AANM,mCAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,EAAG,EAAE;CAC/B,CAAC;AACF,kBAAkB;AACX,uCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC","file":"http-in-memory-web-api.module.js","sourceRoot":"","sourcesContent":["////// Http-Only version ////\n\nimport { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { XHRBackend } from '@angular/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryDbService\n} from './interfaces';\n\nimport { HttpBackendService } from './http-backend.service';\n\n// Internal - Creates the in-mem backend for the Http module\n// AoT requires factory to be exported\nexport function httpInMemBackendServiceFactory(\n injector: Injector,\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig\n): XHRBackend {\n const backend: any = new HttpBackendService(injector, dbService, options);\n return backend as XHRBackend;\n}\n\n\nexport class HttpInMemoryWebApiModule {\n /**\n * Redirect the Angular `Http` XHR calls\n * to in-memory data store that implements `InMemoryDbService`.\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * Usually imported in the root application module.\n * Can import in a lazy feature module too, which will shadow modules loaded earlier\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * HttpInMemoryWebApiModule.forRoot(dbCreator);\n * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return {\n ngModule: HttpInMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n\n { provide: XHRBackend,\n useFactory: httpInMemBackendServiceFactory,\n deps: [Injector, InMemoryDbService, InMemoryBackendConfig]}\n ]\n };\n }\n /**\n *\n * Enable and configure the in-memory web api in a lazy-loaded feature module.\n * Same as `forRoot`.\n * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.\n */\n static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return HttpInMemoryWebApiModule.forRoot(dbCreator, options);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/http-in-memory-web-api.module.metadata.json b/http-in-memory-web-api.module.metadata.json new file mode 100644 index 0000000..725798e --- /dev/null +++ b/http-in-memory-web-api.module.metadata.json @@ -0,0 +1 @@ +[{"__symbolic":"module","version":3,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"HttpInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"HttpInMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"HttpInMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}] \ No newline at end of file diff --git a/in-memory-web-api.module.d.ts b/in-memory-web-api.module.d.ts index 4bb8a6e..a149ebc 100644 --- a/in-memory-web-api.module.d.ts +++ b/in-memory-web-api.module.d.ts @@ -1,12 +1,8 @@ -import { Injector, ModuleWithProviders, Type } from '@angular/core'; -import { XHRBackend } from '@angular/http'; -import { HttpBackend, XhrFactory } from '@angular/common/http'; -import { InMemoryBackendConfigArgs, InMemoryBackendConfig, InMemoryDbService } from './interfaces'; -export declare function httpInMemBackendServiceFactory(injector: Injector, dbService: InMemoryDbService, options: InMemoryBackendConfig): XHRBackend; -export declare function httpClientInMemBackendServiceFactory(dbService: InMemoryDbService, options: InMemoryBackendConfig, xhrFactory: XhrFactory): HttpBackend; +import { ModuleWithProviders, Type } from '@angular/core'; +import { InMemoryBackendConfigArgs, InMemoryDbService } from './interfaces'; export declare class InMemoryWebApiModule { /** - * Redirect both Angular `Http` and `HttpClient` XHR calls + * Redirect BOTH Angular `Http` and `HttpClient` XHR calls * to in-memory data store that implements `InMemoryDbService`. * with class that implements InMemoryDbService and creates an in-memory database. * diff --git a/in-memory-web-api.module.js b/in-memory-web-api.module.js index a3f71f7..3f63e7f 100644 --- a/in-memory-web-api.module.js +++ b/in-memory-web-api.module.js @@ -1,26 +1,15 @@ +////// For apps with both Http and HttpClient //// import { Injector, NgModule } from '@angular/core'; import { XHRBackend } from '@angular/http'; import { HttpBackend, XhrFactory } from '@angular/common/http'; import { InMemoryBackendConfig, InMemoryDbService } from './interfaces'; -import { HttpBackendService } from './http-backend.service'; -import { HttpClientBackendService } from './http-client-backend.service'; -// Internal - Creates the in-mem backend for the Http module -// AoT requires factory to be exported -export function httpInMemBackendServiceFactory(injector, dbService, options) { - var backend = new HttpBackendService(injector, dbService, options); - return backend; -} -// Internal - Creates the in-mem backend for the HttpClient module -// AoT requires factory to be exported -export function httpClientInMemBackendServiceFactory(dbService, options, xhrFactory) { - var backend = new HttpClientBackendService(dbService, options, xhrFactory); - return backend; -} +import { httpInMemBackendServiceFactory } from './http-in-memory-web-api.module'; +import { httpClientInMemBackendServiceFactory } from './http-client-in-memory-web-api.module'; var InMemoryWebApiModule = (function () { function InMemoryWebApiModule() { } /** - * Redirect both Angular `Http` and `HttpClient` XHR calls + * Redirect BOTH Angular `Http` and `HttpClient` XHR calls * to in-memory data store that implements `InMemoryDbService`. * with class that implements InMemoryDbService and creates an in-memory database. * diff --git a/in-memory-web-api.module.js.map b/in-memory-web-api.module.js.map index 33e3986..1c3ba3f 100644 --- a/in-memory-web-api.module.js.map +++ b/in-memory-web-api.module.js.map @@ -1 +1 @@ -{"version":3,"sources":["in-memory-web-api.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAA,EAAU,QAAA,EAAoC,MAAO,eAAA,CAAgB;AAC9E,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAC3C,OAAO,EAAE,WAAA,EAAa,UAAA,EAAW,MAAO,sBAAA,CAAuB;AAE/D,OAAO,EAEL,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,kBAAA,EAAmB,MAAa,wBAAA,CAAyB;AAClE,OAAO,EAAE,wBAAA,EAAyB,MAAO,+BAAA,CAAgC;AAEzE,4DAA4D;AAC5D,sCAAsC;AACtC,MAAM,yCACJ,QAAU,EACV,SAAW,EACX,OAAS;IAET,IAAM,OAAA,GAAe,IAAI,kBAAA,CAAmB,QAA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F,CAAC","file":"in-memory-web-api.module.js","sourceRoot":"","sourcesContent":["import { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { XHRBackend } from '@angular/http';\nimport { HttpBackend, XhrFactory } from '@angular/common/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryDbService\n} from './interfaces';\n\nimport { HttpBackendService } from './http-backend.service';\nimport { HttpClientBackendService } from './http-client-backend.service';\n\n// Internal - Creates the in-mem backend for the Http module\n// AoT requires factory to be exported\nexport function httpInMemBackendServiceFactory(\n injector: Injector,\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig\n): XHRBackend {\n const backend: any = new HttpBackendService(injector, dbService, options);\n return backend as XHRBackend;\n}\n\n// Internal - Creates the in-mem backend for the HttpClient module\n// AoT requires factory to be exported\nexport function httpClientInMemBackendServiceFactory(\n dbService: InMemoryDbService,\n options: InMemoryBackendConfig,\n xhrFactory: XhrFactory,\n): HttpBackend {\n const backend: any = new HttpClientBackendService(dbService, options, xhrFactory);\n return backend;\n}\n\n\nexport class InMemoryWebApiModule {\n /**\n * Redirect both Angular `Http` and `HttpClient` XHR calls\n * to in-memory data store that implements `InMemoryDbService`.\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * Usually imported in the root application module.\n * Can import in a lazy feature module too, which will shadow modules loaded earlier\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * InMemoryWebApiModule.forRoot(dbCreator);\n * InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return {\n ngModule: InMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n\n { provide: XHRBackend,\n useFactory: httpInMemBackendServiceFactory,\n deps: [Injector, InMemoryDbService, InMemoryBackendConfig]},\n\n { provide: HttpBackend,\n useFactory: httpClientInMemBackendServiceFactory,\n deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory]}\n ]\n };\n }\n\n /**\n *\n * Enable and configure the in-memory web api in a lazy-loaded feature module.\n * Same as `forRoot`.\n * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.\n */\n static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return InMemoryWebApiModule.forRoot(dbCreator, options);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file +{"version":3,"sources":["in-memory-web-api.module.ts"],"names":[],"mappings":"AAAA,kDAAC;AAED,OAAO,EAAE,QAAA,EAAU,QAAA,EAAoC,MAAO,eAAA,CAAgB;AAC9E,OAAO,EAAE,UAAA,EAAW,MAAO,eAAA,CAAgB;AAC3C,OAAO,EAAE,WAAA,EAAa,UAAA,EAAW,MAAO,sBAAA,CAAuB;AAE/D,OAAO,EAEL,qBAAqB,EACrB,iBAAiB,EAClB,MAAM,cAAA,CAAe;AAEtB,OAAO,EAAE,8BAAA,EAA+B,MAAO,iCAAA,CAAkC;AACjF,OAAO,EAAE,oCAAA,EAAqC,MAAO,wCAAA,CAAyC;AAG9F;IAAA;IAiDA,CAAC;IAhDC;;;;;;;;;;;;;;MAcE;IACK,4BAAO,GAAd,UAAe,SAAkC,EAAE,OAAmC;QACpF,MAAM,CAAC;YACL,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE;gBACT,EAAE,OAAO,EAAE,iBAAiB,EAAG,QAAQ,EAAE,SAAS,EAAE;gBACpD,EAAE,OAAO,EAAE,qBAAqB,EAAE,QAAQ,EAAE,OAAO,EAAE;gBAErD,EAAE,OAAO,EAAE,UAAU;oBACnB,UAAU,EAAE,8BAA8B;oBAC1C,IAAI,EAAE,CAAC,QAAQ,EAAE,iBAAiB,EAAE,qBAAqB,CAAC,EAAC;gBAE7D,EAAE,OAAO,EAAE,WAAW;oBACpB,UAAU,EAAE,oCAAoC;oBAChD,IAAI,EAAE,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,UAAU,CAAC,EAAC;aAChE;SACF,CAAC;IACJ,CAAC;IAED;;;;;OAKG;IACI,+BAAU,GAAjB,UAAkB,SAAkC,EAAE,OAAmC;QACvF,MAAM,CAAC,oBAAoB,CAAC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;IAOH,2BAAC;AAAD,CAjDA,AAiDC;;AANM,+BAAU,GAA0B;IAC3C,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,EAAG,EAAE;CAC/B,CAAC;AACF,kBAAkB;AACX,mCAAc,GAAmE,cAAM,OAAA,EAC7F,EAD6F,CAC7F,CAAC","file":"in-memory-web-api.module.js","sourceRoot":"","sourcesContent":["////// For apps with both Http and HttpClient ////\n\nimport { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core';\nimport { XHRBackend } from '@angular/http';\nimport { HttpBackend, XhrFactory } from '@angular/common/http';\n\nimport {\n InMemoryBackendConfigArgs,\n InMemoryBackendConfig,\n InMemoryDbService\n} from './interfaces';\n\nimport { httpInMemBackendServiceFactory } from './http-in-memory-web-api.module';\nimport { httpClientInMemBackendServiceFactory } from './http-client-in-memory-web-api.module';\n\n\nexport class InMemoryWebApiModule {\n /**\n * Redirect BOTH Angular `Http` and `HttpClient` XHR calls\n * to in-memory data store that implements `InMemoryDbService`.\n * with class that implements InMemoryDbService and creates an in-memory database.\n *\n * Usually imported in the root application module.\n * Can import in a lazy feature module too, which will shadow modules loaded earlier\n *\n * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService.\n * @param {InMemoryBackendConfigArgs} [options]\n *\n * @example\n * InMemoryWebApiModule.forRoot(dbCreator);\n * InMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}});\n */\n static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return {\n ngModule: InMemoryWebApiModule,\n providers: [\n { provide: InMemoryDbService, useClass: dbCreator },\n { provide: InMemoryBackendConfig, useValue: options },\n\n { provide: XHRBackend,\n useFactory: httpInMemBackendServiceFactory,\n deps: [Injector, InMemoryDbService, InMemoryBackendConfig]},\n\n { provide: HttpBackend,\n useFactory: httpClientInMemBackendServiceFactory,\n deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory]}\n ]\n };\n }\n\n /**\n *\n * Enable and configure the in-memory web api in a lazy-loaded feature module.\n * Same as `forRoot`.\n * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules.\n */\n static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders {\n return InMemoryWebApiModule.forRoot(dbCreator, options);\n }\nstatic decorators: DecoratorInvocation[] = [\n{ type: NgModule, args: [{}, ] },\n];\n/** @nocollapse */\nstatic ctorParameters: () => ({type: any, decorators?: DecoratorInvocation[]}|null)[] = () => [\n];\n}\n\ninterface DecoratorInvocation {\n type: Function;\n args?: any[];\n}\n"]} \ No newline at end of file diff --git a/in-memory-web-api.module.metadata.json b/in-memory-web-api.module.metadata.json index e53c3b5..80792b3 100644 --- a/in-memory-web-api.module.metadata.json +++ b/in-memory-web-api.module.metadata.json @@ -1 +1 @@ -[{"__symbolic":"module","version":3,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"httpInMemBackendServiceFactory":{"__symbolic":"function"},"httpClientInMemBackendServiceFactory":{"__symbolic":"function"},"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}] \ No newline at end of file +[{"__symbolic":"module","version":3,"metadata":{"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","module":"./http-in-memory-web-api.module","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","module":"./http-client-in-memory-web-api.module","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}},{"__symbolic":"module","version":1,"metadata":{"InMemoryWebApiModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"statics":{"forRoot":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"ngModule":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"providers":[{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},"useClass":{"__symbolic":"reference","name":"dbCreator"}},{"provide":{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},"useValue":{"__symbolic":"reference","name":"options"}},{"provide":{"__symbolic":"reference","module":"@angular/http","name":"XHRBackend"},"useFactory":{"__symbolic":"reference","module":"./http-in-memory-web-api.module","name":"httpInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"@angular/core","name":"Injector"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"}]},{"provide":{"__symbolic":"reference","module":"@angular/common/http","name":"HttpBackend"},"useFactory":{"__symbolic":"reference","module":"./http-client-in-memory-web-api.module","name":"httpClientInMemBackendServiceFactory"},"deps":[{"__symbolic":"reference","module":"./interfaces","name":"InMemoryDbService"},{"__symbolic":"reference","module":"./interfaces","name":"InMemoryBackendConfig"},{"__symbolic":"reference","module":"@angular/common/http","name":"XhrFactory"}]}]}},"forFeature":{"__symbolic":"function","parameters":["dbCreator","options"],"value":{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"InMemoryWebApiModule"},"member":"forRoot"},"arguments":[{"__symbolic":"reference","name":"dbCreator"},{"__symbolic":"reference","name":"options"}]}}}}}}] \ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 1a3b817..9b57d66 100644 --- a/index.d.ts +++ b/index.d.ts @@ -3,4 +3,6 @@ export * from './http-status-codes'; export * from './http-backend.service'; export * from './http-client-backend.service'; export * from './in-memory-web-api.module'; +export * from './http-in-memory-web-api.module'; +export * from './http-client-in-memory-web-api.module'; export * from './interfaces'; diff --git a/index.js b/index.js index 97d7640..b66def5 100644 --- a/index.js +++ b/index.js @@ -3,5 +3,7 @@ export * from './http-status-codes'; export * from './http-backend.service'; export * from './http-client-backend.service'; export * from './in-memory-web-api.module'; +export * from './http-in-memory-web-api.module'; +export * from './http-client-in-memory-web-api.module'; export * from './interfaces'; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/index.js.map b/index.js.map index d0c6626..a0df880 100644 --- a/index.js.map +++ b/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,cAAc,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export * from './backend.service';\nexport * from './http-status-codes';\nexport * from './http-backend.service';\nexport * from './http-client-backend.service';\nexport * from './in-memory-web-api.module';\nexport * from './interfaces';\n"]} \ No newline at end of file +{"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,cAAc,CAAC","file":"index.js","sourceRoot":"","sourcesContent":["export * from './backend.service';\nexport * from './http-status-codes';\nexport * from './http-backend.service';\nexport * from './http-client-backend.service';\nexport * from './in-memory-web-api.module';\nexport * from './http-in-memory-web-api.module';\nexport * from './http-client-in-memory-web-api.module';\nexport * from './interfaces';\n"]} \ No newline at end of file diff --git a/index.metadata.json b/index.metadata.json index 61539d9..7fdb93e 100644 --- a/index.metadata.json +++ b/index.metadata.json @@ -1 +1 @@ -[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./interfaces"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./interfaces"}]}] \ No newline at end of file +[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./http-in-memory-web-api.module"},{"from":"./http-client-in-memory-web-api.module"},{"from":"./interfaces"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./backend.service"},{"from":"./http-status-codes"},{"from":"./http-backend.service"},{"from":"./http-client-backend.service"},{"from":"./in-memory-web-api.module"},{"from":"./http-in-memory-web-api.module"},{"from":"./http-client-in-memory-web-api.module"},{"from":"./interfaces"}]}] \ No newline at end of file diff --git a/package.json b/package.json index 584f2cc..ce48ab2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "angular-in-memory-web-api", - "version": "0.4.4", + "version": "0.4.5", "description": "An in-memory web api for Angular demos and tests", "main": "bundles/in-memory-web-api.umd.js", "module": "index.js", diff --git a/src/in-mem/http-backend.service.spec.ts b/src/in-mem/http-backend.service.spec.ts index a8cc0ea..268ec87 100644 --- a/src/in-mem/http-backend.service.spec.ts +++ b/src/in-mem/http-backend.service.spec.ts @@ -10,7 +10,7 @@ import 'rxjs/add/operator/zip'; import { failure } from '../testing'; import { HttpBackendService } from './http-backend.service'; -import { InMemoryWebApiModule } from './in-memory-web-api.module'; +import { HttpInMemoryWebApiModule } from './http-in-memory-web-api.module'; import { Hero } from '../app/hero'; import { HeroService } from '../app/hero.service'; @@ -32,7 +32,7 @@ describe('Http Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) + HttpInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) ] }); @@ -253,7 +253,7 @@ describe('Http Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpModule, - InMemoryWebApiModule.forRoot(HeroInMemDataOverrideService, { delay }) + HttpInMemoryWebApiModule.forRoot(HeroInMemDataOverrideService, { delay }) ] }); @@ -398,7 +398,7 @@ describe('Http Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) + HttpInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) ], providers: [ { provide: HeroService, useClass: HttpHeroService } @@ -410,7 +410,6 @@ describe('Http Backend Service', () => { new HereServiceCoreSpec().run(); }); - //////////////// //////////////// describe('Http passThru', () => { let http: Http; @@ -421,7 +420,7 @@ describe('Http Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay, passThruUnknownUrl: true }) + HttpInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay, passThruUnknownUrl: true }) ] }); diff --git a/src/in-mem/http-backend.service.ts b/src/in-mem/http-backend.service.ts index 2b8c1ab..3cd9a70 100644 --- a/src/in-mem/http-backend.service.ts +++ b/src/in-mem/http-backend.service.ts @@ -34,14 +34,14 @@ import { BackendService } from './backend.service'; * Call `forRoot` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpModule } from '@angular/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/src/in-mem/http-client-backend.service.spec.ts b/src/in-mem/http-client-backend.service.spec.ts index bd0fc62..24a282e 100644 --- a/src/in-mem/http-client-backend.service.spec.ts +++ b/src/in-mem/http-client-backend.service.spec.ts @@ -22,7 +22,7 @@ import 'rxjs/add/operator/zip'; import { failure } from '../testing'; import { HttpClientBackendService } from './http-client-backend.service'; -import { InMemoryWebApiModule } from './in-memory-web-api.module'; +import { HttpClientInMemoryWebApiModule } from './http-client-in-memory-web-api.module'; import { Hero } from '../app/hero'; import { HeroService } from '../app/hero.service'; @@ -67,7 +67,7 @@ describe('HttpClient Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) + HttpClientInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) ] }); @@ -306,7 +306,7 @@ describe('HttpClient Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(HeroInMemDataOverrideService, { delay }) + HttpClientInMemoryWebApiModule.forRoot(HeroInMemDataOverrideService, { delay }) ] }); @@ -451,7 +451,7 @@ describe('HttpClient Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) + HttpClientInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) ], providers: [ { provide: HeroService, useClass: HttpClientHeroService } @@ -475,7 +475,7 @@ describe('HttpClient Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) + HttpClientInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay }) ], providers: [ // Add test interceptor just for this test suite @@ -547,7 +547,7 @@ describe('HttpClient Backend Service', () => { TestBed.configureTestingModule({ imports: [ HttpClientModule, - InMemoryWebApiModule.forRoot(HeroInMemDataService, { delay, passThruUnknownUrl: true }) + HttpClientInMemoryWebApiModule.forRoot(HeroInMemDataService, { delay, passThruUnknownUrl: true }) ] }); diff --git a/src/in-mem/http-client-backend.service.ts b/src/in-mem/http-client-backend.service.ts index e21fb77..1849934 100644 --- a/src/in-mem/http-client-backend.service.ts +++ b/src/in-mem/http-client-backend.service.ts @@ -35,14 +35,14 @@ import { BackendService } from './backend.service'; * Call `config` static method with this service class and optional configuration object: * ``` * // other imports - * import { HttpClientModule } from '@angular/http'; - * import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; + * import { HttpClientModule } from '@angular/common/http'; + * import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; * * import { InMemHeroService, inMemConfig } from '../api/in-memory-hero.service'; * @NgModule({ * imports: [ * HttpModule, - * InMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), + * HttpClientInMemoryWebApiModule.forRoot(InMemHeroService, inMemConfig), * ... * ], * ... diff --git a/src/in-mem/http-client-in-memory-web-api.module.ts b/src/in-mem/http-client-in-memory-web-api.module.ts new file mode 100644 index 0000000..e0a3ef6 --- /dev/null +++ b/src/in-mem/http-client-in-memory-web-api.module.ts @@ -0,0 +1,64 @@ +////// HttpClient-Only version //// + +import { NgModule, ModuleWithProviders, Type } from '@angular/core'; +import { HttpBackend, XhrFactory } from '@angular/common/http'; + +import { + InMemoryBackendConfigArgs, + InMemoryBackendConfig, + InMemoryDbService +} from './interfaces'; + +import { HttpClientBackendService } from './http-client-backend.service'; + +// Internal - Creates the in-mem backend for the HttpClient module +// AoT requires factory to be exported +export function httpClientInMemBackendServiceFactory( + dbService: InMemoryDbService, + options: InMemoryBackendConfig, + xhrFactory: XhrFactory, +): HttpBackend { + const backend: any = new HttpClientBackendService(dbService, options, xhrFactory); + return backend; +} + +@NgModule({}) +export class HttpClientInMemoryWebApiModule { + /** + * Redirect the Angular `HttpClient` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders { + return { + ngModule: HttpClientInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + + { provide: HttpBackend, + useFactory: httpClientInMemBackendServiceFactory, + deps: [InMemoryDbService, InMemoryBackendConfig, XhrFactory]} + ] + }; + } + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders { + return HttpClientInMemoryWebApiModule.forRoot(dbCreator, options); + } +} diff --git a/src/in-mem/http-in-memory-web-api.module.ts b/src/in-mem/http-in-memory-web-api.module.ts new file mode 100644 index 0000000..9285bd5 --- /dev/null +++ b/src/in-mem/http-in-memory-web-api.module.ts @@ -0,0 +1,64 @@ +////// Http-Only version //// + +import { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core'; +import { XHRBackend } from '@angular/http'; + +import { + InMemoryBackendConfigArgs, + InMemoryBackendConfig, + InMemoryDbService +} from './interfaces'; + +import { HttpBackendService } from './http-backend.service'; + +// Internal - Creates the in-mem backend for the Http module +// AoT requires factory to be exported +export function httpInMemBackendServiceFactory( + injector: Injector, + dbService: InMemoryDbService, + options: InMemoryBackendConfig +): XHRBackend { + const backend: any = new HttpBackendService(injector, dbService, options); + return backend as XHRBackend; +} + +@NgModule({}) +export class HttpInMemoryWebApiModule { + /** + * Redirect the Angular `Http` XHR calls + * to in-memory data store that implements `InMemoryDbService`. + * with class that implements InMemoryDbService and creates an in-memory database. + * + * Usually imported in the root application module. + * Can import in a lazy feature module too, which will shadow modules loaded earlier + * + * @param {Type} dbCreator - Class that creates seed data for in-memory database. Must implement InMemoryDbService. + * @param {InMemoryBackendConfigArgs} [options] + * + * @example + * HttpInMemoryWebApiModule.forRoot(dbCreator); + * HttpInMemoryWebApiModule.forRoot(dbCreator, {useValue: {delay:600}}); + */ + static forRoot(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders { + return { + ngModule: HttpInMemoryWebApiModule, + providers: [ + { provide: InMemoryDbService, useClass: dbCreator }, + { provide: InMemoryBackendConfig, useValue: options }, + + { provide: XHRBackend, + useFactory: httpInMemBackendServiceFactory, + deps: [Injector, InMemoryDbService, InMemoryBackendConfig]} + ] + }; + } + /** + * + * Enable and configure the in-memory web api in a lazy-loaded feature module. + * Same as `forRoot`. + * This is a feel-good method so you can follow the Angular style guide for lazy-loaded modules. + */ + static forFeature(dbCreator: Type, options?: InMemoryBackendConfigArgs): ModuleWithProviders { + return HttpInMemoryWebApiModule.forRoot(dbCreator, options); + } +} diff --git a/src/in-mem/in-memory-web-api.module.ts b/src/in-mem/in-memory-web-api.module.ts index fa955e4..fd8085f 100644 --- a/src/in-mem/in-memory-web-api.module.ts +++ b/src/in-mem/in-memory-web-api.module.ts @@ -1,3 +1,5 @@ +////// For apps with both Http and HttpClient //// + import { Injector, NgModule, ModuleWithProviders, Type } from '@angular/core'; import { XHRBackend } from '@angular/http'; import { HttpBackend, XhrFactory } from '@angular/common/http'; @@ -8,35 +10,13 @@ import { InMemoryDbService } from './interfaces'; -import { HttpBackendService } from './http-backend.service'; -import { HttpClientBackendService } from './http-client-backend.service'; - -// Internal - Creates the in-mem backend for the Http module -// AoT requires factory to be exported -export function httpInMemBackendServiceFactory( - injector: Injector, - dbService: InMemoryDbService, - options: InMemoryBackendConfig -): XHRBackend { - const backend: any = new HttpBackendService(injector, dbService, options); - return backend as XHRBackend; -} - -// Internal - Creates the in-mem backend for the HttpClient module -// AoT requires factory to be exported -export function httpClientInMemBackendServiceFactory( - dbService: InMemoryDbService, - options: InMemoryBackendConfig, - xhrFactory: XhrFactory, -): HttpBackend { - const backend: any = new HttpClientBackendService(dbService, options, xhrFactory); - return backend; -} +import { httpInMemBackendServiceFactory } from './http-in-memory-web-api.module'; +import { httpClientInMemBackendServiceFactory } from './http-client-in-memory-web-api.module'; @NgModule({}) export class InMemoryWebApiModule { /** - * Redirect both Angular `Http` and `HttpClient` XHR calls + * Redirect BOTH Angular `Http` and `HttpClient` XHR calls * to in-memory data store that implements `InMemoryDbService`. * with class that implements InMemoryDbService and creates an in-memory database. * diff --git a/src/in-mem/index.ts b/src/in-mem/index.ts index 1a3b817..9b57d66 100644 --- a/src/in-mem/index.ts +++ b/src/in-mem/index.ts @@ -3,4 +3,6 @@ export * from './http-status-codes'; export * from './http-backend.service'; export * from './http-client-backend.service'; export * from './in-memory-web-api.module'; +export * from './http-in-memory-web-api.module'; +export * from './http-client-in-memory-web-api.module'; export * from './interfaces';