зеркало из https://github.com/microsoft/paris.git
fixed a bug where entities with loadAll would stop working if destination unsubscribes/errors before completion (#32)
This commit is contained in:
Родитель
af71cd8c0e
Коммит
0c6dc525fe
|
@ -15,12 +15,11 @@ import {HttpOptions} from "../../data_access/http.service";
|
|||
import {Paris} from "../../paris";
|
||||
import {IReadonlyRepository} from "./repository.interface";
|
||||
import {DataQuery} from "../../data_access/data-query";
|
||||
import { catchError, map, mergeMap, share, tap, take, refCount } from "rxjs/operators";
|
||||
import {catchError, map, mergeMap, shareReplay, take, tap} from "rxjs/operators";
|
||||
import {DataSet} from "../../data_access/dataset";
|
||||
import {DataOptions, defaultDataOptions} from "../../data_access/data.options";
|
||||
import {DataAvailability} from "../../data_access/data-availability.enum";
|
||||
import {queryToHttpOptions} from "../../data_access/query-to-http";
|
||||
import { publishReplay } from 'rxjs/internal/operators/publishReplay';
|
||||
|
||||
/**
|
||||
* A Repository is a service through which all of an Entity's data is fetched, cached and saved back to the backend.
|
||||
|
@ -126,8 +125,7 @@ export class ReadonlyRepository<TEntity extends ModelBase, TRawData = any> imple
|
|||
this._allValues.forEach((value: TEntity) => this._allValuesMap.set(String(value instanceof EntityModelBase ? value.id : value.toString()), value));
|
||||
}),
|
||||
map((dataSet:DataSet<TEntity>) => dataSet.items),
|
||||
publishReplay(),
|
||||
refCount()
|
||||
shareReplay({refCount: true}),
|
||||
);
|
||||
|
||||
return this._allItemsBeingSet$;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@microsoft/paris",
|
||||
"version": "1.8.0",
|
||||
"version": "1.9.0",
|
||||
"description": "Library for the implementation of Domain Driven Design with TypeScript + RxJS",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
@ -74,7 +74,7 @@
|
|||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-plugin-typescript": "^0.8.1",
|
||||
"run-sequence": "^2.2.0",
|
||||
"rxjs": "^6.0.0",
|
||||
"rxjs": "^6.4.0",
|
||||
"standard-version": "^3.0.0",
|
||||
"systemjs": ">=0.20.12",
|
||||
"ts-jest": "^24.0.0",
|
||||
|
@ -84,7 +84,7 @@
|
|||
"zone.js": ">=0.8.7"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rxjs": ">=6.0.0",
|
||||
"rxjs": ">=6.4.0",
|
||||
"lodash-es": "4.5.0"
|
||||
},
|
||||
"bundledDependencies": [
|
||||
|
|
Загрузка…
Ссылка в новой задаче