@webda/gcp 4.0.0-beta.2 → 4.0.0-beta.3

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 (68) hide show
  1. package/README.md +54 -4
  2. package/lib/index.d.ts +4 -4
  3. package/lib/index.d.ts.map +1 -1
  4. package/lib/index.js +4 -4
  5. package/lib/index.js.map +1 -1
  6. package/lib/services/firestore.service.d.ts +236 -0
  7. package/lib/services/firestore.service.d.ts.map +1 -0
  8. package/lib/services/firestore.service.js +692 -0
  9. package/lib/services/firestore.service.js.map +1 -0
  10. package/lib/services/index.d.ts +1 -1
  11. package/lib/services/index.d.ts.map +1 -1
  12. package/lib/services/index.js +1 -1
  13. package/lib/services/index.js.map +1 -1
  14. package/lib/services/{kms.d.ts → kms.service.d.ts} +14 -15
  15. package/lib/services/kms.service.d.ts.map +1 -0
  16. package/lib/services/{kms.js → kms.service.js} +18 -16
  17. package/lib/services/kms.service.js.map +1 -0
  18. package/lib/services/{pubsub.d.ts → pubsub.service.d.ts} +23 -4
  19. package/lib/services/pubsub.service.d.ts.map +1 -0
  20. package/lib/services/{pubsub.js → pubsub.service.js} +36 -10
  21. package/lib/services/pubsub.service.js.map +1 -0
  22. package/lib/services/{queue.d.ts → queue.service.d.ts} +32 -16
  23. package/lib/services/queue.service.d.ts.map +1 -0
  24. package/lib/services/{queue.js → queue.service.js} +63 -32
  25. package/lib/services/queue.service.js.map +1 -0
  26. package/lib/services/storage.service.d.ts +268 -0
  27. package/lib/services/storage.service.d.ts.map +1 -0
  28. package/lib/services/{storage.js → storage.service.js} +116 -69
  29. package/lib/services/storage.service.js.map +1 -0
  30. package/package.json +33 -43
  31. package/webda.module.json +1122 -1440
  32. package/lib/index.spec.d.ts +0 -5
  33. package/lib/index.spec.d.ts.map +0 -1
  34. package/lib/index.spec.js +0 -7
  35. package/lib/index.spec.js.map +0 -1
  36. package/lib/services/firestore.d.ts +0 -135
  37. package/lib/services/firestore.d.ts.map +0 -1
  38. package/lib/services/firestore.js +0 -423
  39. package/lib/services/firestore.js.map +0 -1
  40. package/lib/services/firestore.spec.d.ts +0 -2
  41. package/lib/services/firestore.spec.d.ts.map +0 -1
  42. package/lib/services/firestore.spec.js +0 -187
  43. package/lib/services/firestore.spec.js.map +0 -1
  44. package/lib/services/kms.d.ts.map +0 -1
  45. package/lib/services/kms.js.map +0 -1
  46. package/lib/services/kms.spec.d.ts +0 -2
  47. package/lib/services/kms.spec.d.ts.map +0 -1
  48. package/lib/services/kms.spec.js +0 -53
  49. package/lib/services/kms.spec.js.map +0 -1
  50. package/lib/services/pubsub.d.ts.map +0 -1
  51. package/lib/services/pubsub.js.map +0 -1
  52. package/lib/services/pubsub.spec.d.ts +0 -2
  53. package/lib/services/pubsub.spec.d.ts.map +0 -1
  54. package/lib/services/pubsub.spec.js +0 -95
  55. package/lib/services/pubsub.spec.js.map +0 -1
  56. package/lib/services/queue.d.ts.map +0 -1
  57. package/lib/services/queue.js.map +0 -1
  58. package/lib/services/queue.spec.d.ts +0 -2
  59. package/lib/services/queue.spec.d.ts.map +0 -1
  60. package/lib/services/queue.spec.js +0 -117
  61. package/lib/services/queue.spec.js.map +0 -1
  62. package/lib/services/storage.d.ts +0 -215
  63. package/lib/services/storage.d.ts.map +0 -1
  64. package/lib/services/storage.js.map +0 -1
  65. package/lib/services/storage.spec.d.ts +0 -2
  66. package/lib/services/storage.spec.d.ts.map +0 -1
  67. package/lib/services/storage.spec.js +0 -224
  68. package/lib/services/storage.spec.js.map +0 -1
package/README.md CHANGED
@@ -13,16 +13,66 @@ This module is part of Webda Application Framework that allows you to quickly de
13
13
 
14
14
  <!-- README_HEADER -->
15
15
 
16
- This project allows you to use Cloud Storage ... soon
16
+ # @webda/gcp
17
17
 
18
- ## Run local tests
18
+ > Google Cloud Platform integration bundle for Webda — Firestore Store, Cloud Storage Binary, Cloud Pub/Sub, GCP Queue, and KMS encryption service in one package.
19
19
 
20
- The test credentials need to be provided by the author
20
+ ## When to use it
21
21
 
22
+ - You are deploying a Webda application on GCP and need cloud-native backing services.
23
+ - You want to replace `MemoryStore` / `FileBinary` / `MemoryQueue` with GCP-managed equivalents for production.
24
+ - You need envelope encryption via Google Cloud KMS for stored model data.
25
+
26
+ ## Install
27
+
28
+ ```bash
29
+ pnpm add @webda/gcp
30
+ ```
31
+
32
+ ## What's inside
33
+
34
+ - `FireStore` — Firestore-backed Store for any Webda model ([source](./src/services/firestore.ts))
35
+ - `Storage` — Cloud Storage-backed Binary service for file uploads/downloads ([source](./src/services/storage.ts))
36
+ - `GCPQueue` — Cloud Pub/Sub-backed Queue for reliable task delivery ([source](./src/services/queue.ts))
37
+ - `GCPPubSubService` — Cloud Pub/Sub fan-out pub/sub messaging ([source](./src/services/pubsub.ts))
38
+ - `GCPKMSService` — Cloud KMS-based encryption/decryption ([source](./src/services/kms.ts))
39
+
40
+ ## Quick config example
41
+
42
+ ```json
43
+ {
44
+ "services": {
45
+ "userStore": {
46
+ "type": "FireStore",
47
+ "model": "MyApp/User",
48
+ "project": "my-gcp-project",
49
+ "collection": "users"
50
+ },
51
+ "uploads": {
52
+ "type": "Storage",
53
+ "bucket": "my-app-uploads"
54
+ },
55
+ "taskQueue": {
56
+ "type": "GCPQueue",
57
+ "topic": "my-app-tasks",
58
+ "subscription": "my-app-tasks-sub"
59
+ }
60
+ }
61
+ }
22
62
  ```
23
- GOOGLE_APPLICATION_CREDENTIALS=`pwd`/webda-dev-750c62811e3b.json yarn test
63
+
64
+ Authentication uses Application Default Credentials. Set `GOOGLE_APPLICATION_CREDENTIALS` to a service account key file for local development:
65
+
66
+ ```bash
67
+ GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json webda serve
24
68
  ```
25
69
 
70
+ ## Reference
71
+
72
+ - API reference: see the auto-generated typedoc at `docs/pages/Modules/gcp/`.
73
+ - Source: [`packages/gcp`](https://github.com/loopingz/webda.io/tree/main/packages/gcp)
74
+ - Related: [`@webda/core`](../core) for the `Store`, `Binary`, and `Queue` base classes; [`@webda/async`](../async) for job orchestration on top of GCPQueue; [`@webda/aws`](../aws) for the AWS equivalent.
75
+
26
76
  <!-- README_FOOTER -->
27
77
  ## Sponsors
28
78
 
package/lib/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./services/firestore.js";
2
- export * from "./services/pubsub.js";
3
- export * from "./services/queue.js";
4
- export * from "./services/storage.js";
1
+ export * from "./services/firestore.service.js";
2
+ export * from "./services/pubsub.service.js";
3
+ export * from "./services/queue.service.js";
4
+ export * from "./services/storage.service.js";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./services/firestore.js";
2
- export * from "./services/pubsub.js";
3
- export * from "./services/queue.js";
4
- export * from "./services/storage.js";
1
+ export * from "./services/firestore.service.js";
2
+ export * from "./services/pubsub.service.js";
3
+ export * from "./services/queue.service.js";
4
+ export * from "./services/storage.service.js";
5
5
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC"}
@@ -0,0 +1,236 @@
1
+ import { DocumentReference, Firestore } from "@google-cloud/firestore";
2
+ import { MemoryRepository, Store, StoreParameters } from "@webda/core";
3
+ import type { ModelClass, Repository } from "@webda/core";
4
+ import * as WebdaQL from "@webda/ql";
5
+ /**
6
+ * Definition of a FireStore index
7
+ */
8
+ export type FireStoreIndex = {
9
+ [key: string]: "asc" | "desc";
10
+ };
11
+ /**
12
+ * Stored version of indexes
13
+ */
14
+ export type FireStoreIndexOrder = {
15
+ [key: string]: Set<"asc" | "desc">;
16
+ };
17
+ /**
18
+ * Result of a Firestore find, `filter` is the part of the query that Firestore
19
+ * could not apply natively and that was applied in memory (`true` if none)
20
+ */
21
+ export interface FireStoreFindResult<T> {
22
+ results: T[];
23
+ filter: WebdaQL.Expression | true;
24
+ continuationToken?: string;
25
+ }
26
+ /**
27
+ * Firebase parameters
28
+ */
29
+ export declare class FireStoreParameters extends StoreParameters {
30
+ /**
31
+ * Collection to use
32
+ */
33
+ collection: string;
34
+ /**
35
+ * Per-model collection overrides.
36
+ * Maps a model identifier (e.g. "Webda/User") to a collection name.
37
+ * When not specified, the first model uses `collection` and others use their identifier
38
+ * lowercased with "/" replaced by "_".
39
+ */
40
+ collections?: {
41
+ [modelIdentifier: string]: string;
42
+ };
43
+ /**
44
+ * To allow efficient query on several fields
45
+ *
46
+ * @see https://firebase.google.com/docs/firestore/query-data/queries
47
+ */
48
+ compoundIndexes?: FireStoreIndex[];
49
+ /**
50
+ * @override
51
+ * @param params - raw parameters
52
+ * @returns this
53
+ */
54
+ load(params?: any): this;
55
+ }
56
+ /**
57
+ * Recursively convert a value to what Firestore can store
58
+ *
59
+ * Dates are kept as is (Firestore stores them as Timestamp), objects exposing a
60
+ * `toJSON` (models, binaries) are serialized first, functions and undefined are dropped
61
+ *
62
+ * @param value - the value to convert
63
+ * @returns the Firestore compatible value
64
+ */
65
+ export declare function toFirestore(value: any): any;
66
+ /**
67
+ * Recursively replace Timestamp by Date
68
+ * @param doc - the Firestore document data
69
+ * @returns the data with Date objects
70
+ */
71
+ export declare function giveDatesBack(doc: any): any;
72
+ /**
73
+ * Firestore-backed repository for a single model class
74
+ *
75
+ * Every object is stored as a document of the collection, keyed by its primary key.
76
+ * The inherited MemoryRepository is only used for its helpers, every storage
77
+ * method hits Firestore.
78
+ */
79
+ export declare class FireStoreRepository<T extends ModelClass> extends MemoryRepository<T> {
80
+ protected readonly firestore: Firestore;
81
+ protected readonly collection: string;
82
+ protected readonly log: (level: any, ...args: any[]) => void;
83
+ /**
84
+ * Compound indexes available, keyed by the sorted fields joined with "/"
85
+ */
86
+ protected compoundIndexes: {
87
+ [key: string]: FireStoreIndexOrder;
88
+ };
89
+ /**
90
+ * @param model - the model class
91
+ * @param pks - primary key field names
92
+ * @param firestore - the Firestore client
93
+ * @param collection - the collection name
94
+ * @param indexes - compound indexes declared on the store
95
+ * @param log - logger of the store
96
+ */
97
+ constructor(model: T, pks: string[], firestore: Firestore, collection: string, indexes?: FireStoreIndex[], log?: (level: any, ...args: any[]) => void);
98
+ /**
99
+ * The backing collection name for this repository's model
100
+ * @returns the collection name
101
+ */
102
+ getCollection(): string;
103
+ /**
104
+ * Get Document Reference
105
+ * @param primaryKey - the object or primary key
106
+ * @returns the document reference
107
+ */
108
+ getDocumentRef(primaryKey: any): DocumentReference;
109
+ /**
110
+ * Deserialize a Firestore document into a model instance
111
+ * @param data - the document data
112
+ * @returns the model instance
113
+ */
114
+ protected fromFirestore(data: any): InstanceType<T>;
115
+ /**
116
+ * Verify a write condition
117
+ * @param uid - the object key, for the error
118
+ * @param data - the current data
119
+ * @param field - the field to check
120
+ * @param condition - the expected value
121
+ */
122
+ protected checkFirestoreCondition(uid: string, data: any, field: string, condition: any): void;
123
+ /**
124
+ * Translate Firestore not found error
125
+ * @param uid - the object key
126
+ * @param err - the error raised
127
+ */
128
+ protected translateError(uid: string, err: any): never;
129
+ /** @override */
130
+ get(primaryKey: any): Promise<any>;
131
+ /** @override */
132
+ exists(primaryKey: any): Promise<boolean>;
133
+ /** @override */
134
+ create(data: any, save?: boolean): Promise<any>;
135
+ /**
136
+ * Implement both update and patch
137
+ * @param merge - merge with the existing document (patch) or replace it (update)
138
+ * @param primaryKey - the object or primary key
139
+ * @param data - the data to write
140
+ * @param conditionField - the field to check
141
+ * @param condition - the expected value
142
+ */
143
+ protected setDocument(merge: boolean, primaryKey: any, data: any, conditionField?: string, condition?: any): Promise<void>;
144
+ /** @override */
145
+ update(data: any, conditionField?: any, condition?: any): Promise<void>;
146
+ /** @override */
147
+ patch(primaryKey: any, data: any, conditionField?: any, condition?: any): Promise<void>;
148
+ /** @override */
149
+ delete(primaryKey: any, conditionField?: any, condition?: any): Promise<void>;
150
+ /** @override */
151
+ removeAttribute(primaryKey: any, attribute: any, conditionField?: any, condition?: any): Promise<void>;
152
+ /** @override */
153
+ incrementAttributes(primaryKey: any, info: any, _conditionField?: any, _condition?: any): Promise<void>;
154
+ /** @override */
155
+ upsertItemToCollection(primaryKey: any, collection: any, item: any, index?: number, itemWriteConditionField?: any, itemWriteCondition?: any): Promise<void>;
156
+ /** @override */
157
+ deleteItemFromCollection(primaryKey: any, collection: any, index: number, itemWriteConditionField?: any, itemWriteCondition?: any): Promise<void>;
158
+ /**
159
+ * Run a parsed query against Firestore
160
+ *
161
+ * Firestore has strong limitations on what can be queried natively, the part of the
162
+ * query that cannot be translated is applied in memory and returned as `filter`
163
+ *
164
+ * @param parsedQuery - the parsed WebdaQL query
165
+ * @returns the results, the in-memory filter and the continuation token
166
+ */
167
+ find(parsedQuery: WebdaQL.Query): Promise<FireStoreFindResult<InstanceType<T>>>;
168
+ /**
169
+ * Manage OrderBy complex condition on Firebase
170
+ * @param query - the Firestore query
171
+ * @param orderBy - the requested order
172
+ * @param rangeAttribute - the attribute used in a range condition if any
173
+ * @returns the Firestore query with ordering
174
+ */
175
+ handleOrderBy(query: FirebaseFirestore.Query<FirebaseFirestore.DocumentData>, orderBy: WebdaQL.OrderBy[], rangeAttribute: string): FirebaseFirestore.Query<FirebaseFirestore.DocumentData>;
176
+ /** @override */
177
+ query(query: string | any): Promise<{
178
+ results: InstanceType<T>[];
179
+ continuationToken?: string;
180
+ }>;
181
+ /** @override */
182
+ iterate(query: string): AsyncGenerator<InstanceType<T>, any, any>;
183
+ /**
184
+ * Delete every document of the collection (used in tests)
185
+ */
186
+ clear(): Promise<void>;
187
+ }
188
+ /**
189
+ * Implement Firebase abstraction within Webda
190
+ *
191
+ * @WebdaModda GoogleCloudFireStore
192
+ */
193
+ export default class FireStore<K extends FireStoreParameters = FireStoreParameters> extends Store<K> {
194
+ firestore: Firestore;
195
+ /**
196
+ * Create the Firestore client
197
+ * @override
198
+ */
199
+ computeParameters(): void;
200
+ /**
201
+ * Terminate the Firestore client
202
+ * @override
203
+ */
204
+ stop(): Promise<void>;
205
+ /**
206
+ * Resolve the collection name for a given model class
207
+ *
208
+ * Resolution order:
209
+ * 1. `parameters.collections[meta.Identifier]` — explicit per-model override
210
+ * 2. `parameters.collection` for the first model configured or when a single model is managed
211
+ * 3. Default — model identifier lowercased with "/" replaced by "_"
212
+ *
213
+ * @param model - the model class
214
+ * @returns the collection name
215
+ */
216
+ resolveCollection(model: ModelClass): string;
217
+ /**
218
+ * Build and return a FireStoreRepository for the given model
219
+ *
220
+ * The result is cached per model class via `@InstanceCache`.
221
+ * @param model - the model class
222
+ * @returns a repository backed by Firestore
223
+ */
224
+ getRepository<T extends ModelClass>(model: T): Repository<T>;
225
+ /**
226
+ * Return the underlying FireStoreRepository for each model this store manages
227
+ * @returns the per-model FireStoreRepository instances
228
+ */
229
+ getRepositories(): FireStoreRepository<any>[];
230
+ /**
231
+ * Delete every document of the managed collections (used in tests)
232
+ */
233
+ __clean(): Promise<void>;
234
+ }
235
+ export { FireStore };
236
+ //# sourceMappingURL=firestore.service.d.ts.map
@@ -0,0 +1 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