firetender 0.7.0 → 0.7.2
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 +47 -5
- package/dist/proxies.js +49 -13
- package/dist/proxies.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,55 @@
|
|
|
1
1
|
# Firetender
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
Firetender takes your [Zod](https://github.com/colinhacks/zod) data schema ...
|
|
4
|
+
|
|
5
|
+
```javascript
|
|
6
|
+
const itemSchema = z.object({
|
|
7
|
+
description: z.string().optional(),
|
|
8
|
+
count: z.number().nonnegative().integer(),
|
|
9
|
+
tags: z.array(z.string()).default([]),
|
|
10
|
+
});
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
associates it with a Firestore collection ...
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
const itemCollection = new FiretenderCollection(itemSchema, db, "items");
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
and provides you with typesafe, validated Firestore documents that are easy to
|
|
20
|
+
use and understand.
|
|
21
|
+
|
|
22
|
+
```javascript
|
|
23
|
+
// Add a document to the collection.
|
|
24
|
+
await itemCollection.newDoc("foo", { count: 0, tags: ["needs +1"] }).write();
|
|
25
|
+
|
|
26
|
+
// Read the document "bar", then update it.
|
|
27
|
+
const itemDoc = await itemCollection.existingDoc("bar").load();
|
|
28
|
+
const count = itemDoc.r.count;
|
|
29
|
+
await itemDoc.update((item) => {
|
|
30
|
+
item.tags.push("needs +1");
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
// Increment the count of all docs with a "needs +1" tag.
|
|
34
|
+
await Promise.all(
|
|
35
|
+
itemCollection
|
|
36
|
+
.query(where("tags", "array-contains", "needs +1"))
|
|
37
|
+
.map((itemDoc) =>
|
|
38
|
+
itemDoc.update((item) => {
|
|
39
|
+
item.count += 1;
|
|
40
|
+
delete item.tags["needs +1"];
|
|
41
|
+
})
|
|
42
|
+
)
|
|
43
|
+
);
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Changes to the document data are monitored, and only modified fields are updated
|
|
47
|
+
on Firestore.
|
|
6
48
|
|
|
7
49
|
## Usage
|
|
8
50
|
|
|
9
|
-
To illustrate, let's run through the basics of defining,
|
|
10
|
-
and copying a Firestore document.
|
|
51
|
+
To illustrate in more detail, let's run through the basics of defining,
|
|
52
|
+
creating, modifying, and copying a Firestore document.
|
|
11
53
|
|
|
12
54
|
### Initialize Cloud Firestore
|
|
13
55
|
|
package/dist/proxies.js
CHANGED
|
@@ -8,7 +8,7 @@ const ts_helpers_1 = require("./ts-helpers");
|
|
|
8
8
|
* Given a Zod schema representing a collection, returns the sub-schema of the
|
|
9
9
|
* specified property.
|
|
10
10
|
*/
|
|
11
|
-
function getPropertySchema(parentSchema, propertyKey) {
|
|
11
|
+
function getPropertySchema(parent, parentSchema, propertyKey) {
|
|
12
12
|
let schema = parentSchema;
|
|
13
13
|
// eslint-disable-next-line no-constant-condition
|
|
14
14
|
while (true) {
|
|
@@ -32,11 +32,21 @@ function getPropertySchema(parentSchema, propertyKey) {
|
|
|
32
32
|
return schema.element;
|
|
33
33
|
case zod_1.z.ZodFirstPartyTypeKind.ZodObject:
|
|
34
34
|
return schema.shape[propertyKey];
|
|
35
|
+
case zod_1.z.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:
|
|
36
|
+
// TODO: replace "options" with "optionsMap" for Zod 3.20.0+.
|
|
37
|
+
return schema.options.get(parent[schema.discriminator]);
|
|
38
|
+
// If the parent is of type ZodAny, so are its properties.
|
|
39
|
+
case zod_1.z.ZodFirstPartyTypeKind.ZodAny:
|
|
40
|
+
return zod_1.z.any();
|
|
35
41
|
default:
|
|
36
42
|
throw TypeError(`Unsupported schema type for property "${propertyKey}": ${schema._def.typeName}`);
|
|
37
43
|
}
|
|
38
44
|
}
|
|
39
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* Getting this symbol from one of our proxies returns the proxy's target.
|
|
48
|
+
*/
|
|
49
|
+
const PROXY_TARGET_SYMBOL = Symbol("proxy_target");
|
|
40
50
|
/**
|
|
41
51
|
* Wraps a top-level array, its elements, or its elements' subfields in a proxy
|
|
42
52
|
* that watches for changes.
|
|
@@ -85,12 +95,15 @@ function watchArrayForChanges(arrayPath, array, fieldSchema, field, addToUpdateL
|
|
|
85
95
|
return result;
|
|
86
96
|
}
|
|
87
97
|
if (typeof propertyKey === "symbol") {
|
|
88
|
-
|
|
98
|
+
if (propertyKey === PROXY_TARGET_SYMBOL) {
|
|
99
|
+
return target;
|
|
100
|
+
}
|
|
101
|
+
// Allow all other symbols to pass through.
|
|
89
102
|
return property;
|
|
90
103
|
}
|
|
91
104
|
if (property instanceof Object) {
|
|
92
105
|
// Wrap nested objects, including nested arrays, in child proxies.
|
|
93
|
-
return watchArrayForChanges(arrayPath, array, getPropertySchema(fieldSchema, propertyKey), property, addToUpdateList);
|
|
106
|
+
return watchArrayForChanges(arrayPath, array, getPropertySchema(field, fieldSchema, propertyKey), property, addToUpdateList);
|
|
94
107
|
}
|
|
95
108
|
// Otherwise we must be getting a primitive. No need to wrap it.
|
|
96
109
|
return property;
|
|
@@ -100,12 +113,22 @@ function watchArrayForChanges(arrayPath, array, fieldSchema, field, addToUpdateL
|
|
|
100
113
|
// Allow symbols to pass through.
|
|
101
114
|
return Reflect.set(target, propertyKey, value);
|
|
102
115
|
}
|
|
116
|
+
let processedValue = value;
|
|
117
|
+
// If the new value is an object wrapped in a Firetender proxy, which can
|
|
118
|
+
// commonly happen when referencing it inside a mutator function passed to
|
|
119
|
+
// FiretenderDoc.prototype.update(), unwrap it.
|
|
120
|
+
if (value instanceof Object) {
|
|
121
|
+
const valueTarget = value[PROXY_TARGET_SYMBOL];
|
|
122
|
+
if (valueTarget !== undefined) {
|
|
123
|
+
processedValue = valueTarget;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
103
126
|
// An array element or one of its subfields is being set to a new value.
|
|
104
127
|
// Parse the new value with the appropriate schema, set it in the local
|
|
105
128
|
// data, and mark the entire top-level array as needing to be written.
|
|
106
|
-
const propertySchema = getPropertySchema(fieldSchema, propertyKey);
|
|
107
|
-
|
|
108
|
-
const result = Reflect.set(target, propertyKey,
|
|
129
|
+
const propertySchema = getPropertySchema(field, fieldSchema, propertyKey);
|
|
130
|
+
processedValue = propertySchema.parse(processedValue);
|
|
131
|
+
const result = Reflect.set(target, propertyKey, processedValue);
|
|
109
132
|
addToUpdateList(arrayPath, array);
|
|
110
133
|
return result;
|
|
111
134
|
},
|
|
@@ -163,18 +186,21 @@ function watchFieldForChanges(fieldPath, fieldSchema, field, addToUpdateList) {
|
|
|
163
186
|
return (...args) => property.apply(field, args);
|
|
164
187
|
}
|
|
165
188
|
if (typeof propertyKey === "symbol") {
|
|
166
|
-
|
|
189
|
+
if (propertyKey === PROXY_TARGET_SYMBOL) {
|
|
190
|
+
return target;
|
|
191
|
+
}
|
|
192
|
+
// Allow all other symbols to pass through.
|
|
167
193
|
return property;
|
|
168
194
|
}
|
|
169
195
|
if (property instanceof Array) {
|
|
170
196
|
// Wrap array subfields in the watchArrayForChanges proxy. It is
|
|
171
197
|
// necessarily a top-level array, because otherwise we would be in
|
|
172
198
|
// watchArrayForChanges already.
|
|
173
|
-
return watchArrayForChanges([...fieldPath, propertyKey], property, getPropertySchema(fieldSchema, propertyKey), property, addToUpdateList);
|
|
199
|
+
return watchArrayForChanges([...fieldPath, propertyKey], property, getPropertySchema(field, fieldSchema, propertyKey), property, addToUpdateList);
|
|
174
200
|
}
|
|
175
201
|
if (property instanceof Object) {
|
|
176
202
|
// Wrap nested objects in another instance of this proxy.
|
|
177
|
-
return watchFieldForChanges([...fieldPath, propertyKey], getPropertySchema(fieldSchema, propertyKey), property, addToUpdateList);
|
|
203
|
+
return watchFieldForChanges([...fieldPath, propertyKey], getPropertySchema(field, fieldSchema, propertyKey), property, addToUpdateList);
|
|
178
204
|
}
|
|
179
205
|
// Otherwise we must be getting a primitive. No need to wrap it.
|
|
180
206
|
return property;
|
|
@@ -184,13 +210,23 @@ function watchFieldForChanges(fieldPath, fieldSchema, field, addToUpdateList) {
|
|
|
184
210
|
// Allow symbols to pass through.
|
|
185
211
|
return Reflect.set(target, propertyKey, value);
|
|
186
212
|
}
|
|
213
|
+
let processedValue = value;
|
|
214
|
+
// If the new value is an object wrapped in a Firetender proxy, which can
|
|
215
|
+
// commonly happen when referencing it inside a mutator function passed to
|
|
216
|
+
// FiretenderDoc.prototype.update(), unwrap it.
|
|
217
|
+
if (value instanceof Object) {
|
|
218
|
+
const valueTarget = value[PROXY_TARGET_SYMBOL];
|
|
219
|
+
if (valueTarget !== undefined) {
|
|
220
|
+
processedValue = valueTarget;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
187
223
|
// A property of this object is being set to a new value. Parse the new
|
|
188
224
|
// value with the appropriate schema, set it in the local data, and mark
|
|
189
225
|
// the entire top-level array as needing to be written.
|
|
190
|
-
const propertySchema = getPropertySchema(fieldSchema, propertyKey);
|
|
191
|
-
|
|
192
|
-
addToUpdateList([...fieldPath, propertyKey],
|
|
193
|
-
return Reflect.set(target, propertyKey,
|
|
226
|
+
const propertySchema = getPropertySchema(field, fieldSchema, propertyKey);
|
|
227
|
+
processedValue = propertySchema.parse(processedValue);
|
|
228
|
+
addToUpdateList([...fieldPath, propertyKey], processedValue);
|
|
229
|
+
return Reflect.set(target, propertyKey, processedValue);
|
|
194
230
|
},
|
|
195
231
|
deleteProperty(target, propertyKey) {
|
|
196
232
|
(0, ts_helpers_1.assertKeyIsString)(propertyKey);
|
package/dist/proxies.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxies.js","sourceRoot":"","sources":["../src/proxies.ts"],"names":[],"mappings":";;;AAAA,kDAA8D;AAC9D,6BAAwB;AAExB,6CAAiD;AAEjD;;;GAGG;AACH,SAAS,iBAAiB,CACxB,YAA0B,EAC1B,WAAmB;IAEnB,IA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E,YAAY;YACZ,eAAe,CAAC,CAAC,GAAG,SAAS,EAAE,WAAW,CAAC,EAAE,IAAA,uBAAW,GAAE,CAAC,CAAC;YAC5D,OAAO,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QACrD,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AA3ED,oDA2EC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "firetender",
|
|
3
3
|
"displayName": "Firetender",
|
|
4
4
|
"description": "Typescript wrapper for Firestore documents",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.2",
|
|
6
6
|
"author": "Jake Hartman",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"homepage": "https://github.com/jakes-space/firetender",
|