snapback4 0.1.0 → 0.1.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 +11 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -144,11 +144,13 @@ mutation edit(messageId: messages, body: text <=4000):
|
|
|
144
144
|
|
|
145
145
|
`maintain counts: count messages by conversationId` (or `maintain totals:
|
|
146
146
|
sum posts of score by authorId`) keeps an aggregate table the engine
|
|
147
|
-
writes
|
|
148
|
-
|
|
149
|
-
`
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
writes. A program reads it by group and gets **the number**:
|
|
148
|
+
`counts[conversationId]` and `counts[.conversationId]` in a shape are an
|
|
149
|
+
`int`, 0 when the group has no row. (On the wire and on a device the
|
|
150
|
+
table's rows are `{ id, <by columns>, value }` with the group's canonical
|
|
151
|
+
key as the id; that shape only matters to sync.) It takes its own `read`
|
|
152
|
+
rule and inherits the source's `sync` when it groups by the audience
|
|
153
|
+
columns.
|
|
152
154
|
|
|
153
155
|
### Queries and mutations
|
|
154
156
|
|
|
@@ -329,8 +331,10 @@ An `image <=N` or `video <=N` column holds an upload: the client sends
|
|
|
329
331
|
the bytes first (`upload` → `{ id, type, bytes, width, height,
|
|
330
332
|
duration }`; the server sniffs JPEG, PNG, WebP and MP4 and refuses the
|
|
331
333
|
rest with `E_ASSET_TYPE`, and anything over the largest column's bound
|
|
332
|
-
with `E_ASSET_TOO_LARGE`), then places `{ id }` in the mutation
|
|
333
|
-
|
|
334
|
+
with `E_ASSET_TOO_LARGE`), then places `{ id }` in the mutation. Inside
|
|
335
|
+
the mutation the argument already carries the facts the server
|
|
336
|
+
established (`require clip.duration <= 60000 else TOO_LONG`; every key
|
|
337
|
+
is present, null where the kind has none), and the row carries them. One asset, one home: your own
|
|
334
338
|
upload, placed once (`E_ASSET_UNKNOWN`, `E_ASSET_PLACED`). Serving is
|
|
335
339
|
the home row's read rule: `client.asset(id)` fetches the bytes under the
|
|
336
340
|
viewer's credentials and returns a blob URL (`useAsset` in React;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "snapback4",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Snapback 4: the card (contract), the online and local-first clients (IndexedDB, SQLite), React hooks, sign-in, a labelled mock, and the `snapback4` CLI. LLP 3000.",
|
|
6
6
|
"bin": {
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"README.md"
|
|
43
43
|
],
|
|
44
44
|
"optionalDependencies": {
|
|
45
|
-
"snapback4-darwin-arm64": "0.1.
|
|
45
|
+
"snapback4-darwin-arm64": "0.1.2"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build": "tsc -p tsconfig.build.json",
|