@contello/store 1.4.1 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -37,7 +37,6 @@ module.exports = __toCommonJS(index_exports);
37
37
 
38
38
  // src/store.ts
39
39
  var import_client = require("@contello/client");
40
- var import_media = require("@contello/media");
41
40
 
42
41
  // src/assets.ts
43
42
  var import_projected = require("projected");
@@ -1300,7 +1299,6 @@ var Store = class {
1300
1299
  _resolver;
1301
1300
  _watcher;
1302
1301
  updates$;
1303
- media;
1304
1302
  constructor(options) {
1305
1303
  const { url, project, token, operations } = options;
1306
1304
  this._client = (0, import_client.createContelloClient)({
@@ -1317,7 +1315,6 @@ var Store = class {
1317
1315
  this._resolver = new ModelResolver(options.models);
1318
1316
  this._watcher = createInternalWatcher(this._client, this._resolver);
1319
1317
  this.updates$ = this._watcher.updates$;
1320
- this.media = (0, import_media.createMediaResolver)(options.media ?? {});
1321
1318
  this.ping = () => this._client.ping();
1322
1319
  }
1323
1320
  async init() {
package/dist/index.d.cts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { OperationMap, ContelloClient, ConnectionEvents, UploadData, UploadMetadata, UploadOptions, DownloadResult, ProxyResult } from '@contello/client';
2
- import { MediaResolverOptions, MediaResolver } from '@contello/media';
3
2
  import { Observable } from 'rxjs';
4
3
  import { MaybePromise } from 'projected';
5
4
 
@@ -113,7 +112,6 @@ type CreateStoreOptions<TOps extends OperationMap | undefined = undefined, TMode
113
112
  onReconnecting?: (() => void) | undefined;
114
113
  onError?: ((error: unknown) => void) | undefined;
115
114
  connectionEvents?: ConnectionEvents | undefined;
116
- media?: MediaResolverOptions | undefined;
117
115
  };
118
116
  /** Cache options for non-lazy collections and singletons. */
119
117
  type CacheOptions = {
@@ -318,7 +316,6 @@ declare class Store<TOps extends OperationMap | undefined = undefined, TModels e
318
316
  private _resolver;
319
317
  private _watcher;
320
318
  readonly updates$: Observable<UpdateBatch>;
321
- readonly media: MediaResolver;
322
319
  constructor(options: CreateStoreOptions<TOps, TModels>);
323
320
  init(): Promise<void>;
324
321
  destroy(): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { OperationMap, ContelloClient, ConnectionEvents, UploadData, UploadMetadata, UploadOptions, DownloadResult, ProxyResult } from '@contello/client';
2
- import { MediaResolverOptions, MediaResolver } from '@contello/media';
3
2
  import { Observable } from 'rxjs';
4
3
  import { MaybePromise } from 'projected';
5
4
 
@@ -113,7 +112,6 @@ type CreateStoreOptions<TOps extends OperationMap | undefined = undefined, TMode
113
112
  onReconnecting?: (() => void) | undefined;
114
113
  onError?: ((error: unknown) => void) | undefined;
115
114
  connectionEvents?: ConnectionEvents | undefined;
116
- media?: MediaResolverOptions | undefined;
117
115
  };
118
116
  /** Cache options for non-lazy collections and singletons. */
119
117
  type CacheOptions = {
@@ -318,7 +316,6 @@ declare class Store<TOps extends OperationMap | undefined = undefined, TModels e
318
316
  private _resolver;
319
317
  private _watcher;
320
318
  readonly updates$: Observable<UpdateBatch>;
321
- readonly media: MediaResolver;
322
319
  constructor(options: CreateStoreOptions<TOps, TModels>);
323
320
  init(): Promise<void>;
324
321
  destroy(): Promise<void>;
package/dist/index.js CHANGED
@@ -1,6 +1,5 @@
1
1
  // src/store.ts
2
2
  import { createContelloClient } from "@contello/client";
3
- import { createMediaResolver } from "@contello/media";
4
3
 
5
4
  // src/assets.ts
6
5
  import { ProjectedLazyMap } from "projected";
@@ -1263,7 +1262,6 @@ var Store = class {
1263
1262
  _resolver;
1264
1263
  _watcher;
1265
1264
  updates$;
1266
- media;
1267
1265
  constructor(options) {
1268
1266
  const { url, project, token, operations } = options;
1269
1267
  this._client = createContelloClient({
@@ -1280,7 +1278,6 @@ var Store = class {
1280
1278
  this._resolver = new ModelResolver(options.models);
1281
1279
  this._watcher = createInternalWatcher(this._client, this._resolver);
1282
1280
  this.updates$ = this._watcher.updates$;
1283
- this.media = createMediaResolver(options.media ?? {});
1284
1281
  this.ping = () => this._client.ping();
1285
1282
  }
1286
1283
  async init() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contello/store",
3
- "version": "1.4.1",
3
+ "version": "1.5.0",
4
4
  "description": "Framework-agnostic store for Contello CMS with reactive collections and automatic dependency tracking",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -12,17 +12,19 @@
12
12
  },
13
13
  "peerDependencies": {
14
14
  "projected": "^2.0.0",
15
- "rxjs": "^7.0.0"
15
+ "rxjs": "^7.0.0",
16
+ "@contello/client": "^1.1.0",
17
+ "@contello/media": "^1.0.0"
16
18
  },
17
19
  "dependencies": {
18
20
  "backoff-rxjs": "^7.0.0",
19
- "lru-cache": "^11.3.5",
20
- "@contello/client": "^1.1.0",
21
- "@contello/media": "^1.0.0"
21
+ "lru-cache": "^11.3.5"
22
22
  },
23
23
  "devDependencies": {
24
24
  "projected": "^2.2.1",
25
- "rxjs": "^7.8.2"
25
+ "rxjs": "^7.8.2",
26
+ "@contello/client": "^1.1.0",
27
+ "@contello/media": "^1.0.0"
26
28
  },
27
29
  "files": [
28
30
  "dist",