@travetto/model-firestore 8.0.0-alpha.15 → 8.0.0-alpha.16

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.
Files changed (2) hide show
  1. package/package.json +7 -7
  2. package/src/service.ts +1 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/model-firestore",
3
- "version": "8.0.0-alpha.15",
3
+ "version": "8.0.0-alpha.16",
4
4
  "description": "Firestore backing for the travetto model module.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -25,14 +25,14 @@
25
25
  "directory": "module/model-firestore"
26
26
  },
27
27
  "dependencies": {
28
- "@google-cloud/firestore": "^8.3.0",
29
- "@travetto/config": "^8.0.0-alpha.13",
30
- "@travetto/model": "^8.0.0-alpha.13",
31
- "@travetto/model-indexed": "^8.0.0-alpha.15",
32
- "@travetto/runtime": "^8.0.0-alpha.12"
28
+ "@google-cloud/firestore": "^8.5.0",
29
+ "@travetto/config": "^8.0.0-alpha.14",
30
+ "@travetto/model": "^8.0.0-alpha.14",
31
+ "@travetto/model-indexed": "^8.0.0-alpha.16",
32
+ "@travetto/runtime": "^8.0.0-alpha.13"
33
33
  },
34
34
  "peerDependencies": {
35
- "@travetto/cli": "^8.0.0-alpha.18"
35
+ "@travetto/cli": "^8.0.0-alpha.19"
36
36
  },
37
37
  "peerDependenciesMeta": {
38
38
  "@travetto/cli": {
package/src/service.ts CHANGED
@@ -128,8 +128,7 @@ export class FirestoreModelService implements ModelCrudSupport, ModelStorageSupp
128
128
  async deleteStorage(): Promise<void> { }
129
129
 
130
130
  async deleteModel<T extends ModelType>(cls: Class<T>): Promise<void> {
131
- const docs = await this.#getCollection(cls).listDocuments();
132
- await Promise.all(docs.map(doc => doc.delete()));
131
+ await this.client.recursiveDelete(this.#getCollection(cls));
133
132
  }
134
133
 
135
134
  // Crud