@travetto/model-firestore 5.0.0-rc.0 → 5.0.0-rc.10

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/README.md CHANGED
@@ -39,7 +39,7 @@ where the [FirestoreModelConfig](https://github.com/travetto/travetto/tree/main/
39
39
 
40
40
  **Code: Structure of FirestoreModelConfig**
41
41
  ```typescript
42
- import { RuntimeResources } from '@travetto/base';
42
+ import { RuntimeResources } from '@travetto/runtime';
43
43
  import { Config } from '@travetto/config';
44
44
 
45
45
  @Config('model.firestore')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-firestore",
3
- "version": "5.0.0-rc.0",
3
+ "version": "5.0.0-rc.10",
4
4
  "description": "Firestore backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@google-cloud/firestore": "^7.9.0",
29
- "@travetto/base": "^5.0.0-rc.0",
30
- "@travetto/config": "^5.0.0-rc.0",
31
- "@travetto/model": "^5.0.0-rc.0"
29
+ "@travetto/runtime": "^5.0.0-rc.9",
30
+ "@travetto/config": "^5.0.0-rc.10",
31
+ "@travetto/model": "^5.0.0-rc.10"
32
32
  },
33
33
  "peerDependencies": {
34
- "@travetto/command": "^5.0.0-rc.0"
34
+ "@travetto/command": "^5.0.0-rc.9"
35
35
  },
36
36
  "peerDependenciesMeta": {
37
37
  "@travetto/command": {
package/src/config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { RuntimeResources } from '@travetto/base';
1
+ import { RuntimeResources } from '@travetto/runtime';
2
2
  import { Config } from '@travetto/config';
3
3
 
4
4
  @Config('model.firestore')
package/src/service.ts CHANGED
@@ -1,11 +1,10 @@
1
- import { DocumentData, FieldValue, Firestore, PartialWithFieldValue, Query, UpdateData } from '@google-cloud/firestore';
1
+ import { DocumentData, FieldValue, Firestore, PartialWithFieldValue, Query } from '@google-cloud/firestore';
2
2
 
3
- import { ShutdownManager, type Class } from '@travetto/base';
4
- import { DeepPartial } from '@travetto/schema';
3
+ import { ShutdownManager, type Class, type DeepPartial } from '@travetto/runtime';
5
4
  import { Injectable } from '@travetto/di';
6
5
  import {
7
6
  ModelCrudSupport, ModelRegistry, ModelStorageSupport,
8
- ModelIndexedSupport, ModelType, NotFoundError, OptionalId
7
+ ModelIndexedSupport, ModelType, NotFoundError, OptionalId,
9
8
  } from '@travetto/model';
10
9
 
11
10
  import { ModelCrudUtil } from '@travetto/model/src/internal/service/crud';
@@ -75,8 +74,7 @@ export class FirestoreModelService implements ModelCrudSupport, ModelStorageSupp
75
74
  async update<T extends ModelType>(cls: Class<T>, item: T): Promise<T> {
76
75
  ModelCrudUtil.ensureNotSubType(cls);
77
76
  const prepped = await ModelCrudUtil.preStore(cls, item, this);
78
- // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
79
- await this.#getCollection(cls).doc(item.id).update(clone(prepped) as unknown as UpdateData<DocumentData>);
77
+ await this.#getCollection(cls).doc(item.id).update(clone<DocumentData>(prepped));
80
78
  return prepped;
81
79
  }
82
80