@civitai/app-sdk 0.48.0 β 0.49.0
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/dist/blocks/appStorageErrors.d.ts +390 -0
- package/dist/blocks/appStorageErrors.d.ts.map +1 -0
- package/dist/blocks/appStorageErrors.js +429 -0
- package/dist/blocks/appStorageErrors.js.map +1 -0
- package/dist/blocks/index.d.ts +33 -0
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +32 -0
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/messages.d.ts.map +1 -1
- package/dist/blocks/messages.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,390 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The App Storage rejection MESSAGES the host puts on the wire β the only site
|
|
3
|
+
* in this repository that spells them **in executable code**, sibling of
|
|
4
|
+
* `appStorageLimits.ts`, which owns the numbers.
|
|
5
|
+
*
|
|
6
|
+
* π΄ **"IN EXECUTABLE CODE" IS THE WHOLE CLAIM β do not read it wider.** What
|
|
7
|
+
* `tests/guards/app-storage-error-strings.test.mjs` actually enforces is
|
|
8
|
+
* narrower still: every `error:` value inside an `APP_STORAGE_*_RESULT` payload
|
|
9
|
+
* in the scanned mocks must NAME a constant from this module. It sees nothing
|
|
10
|
+
* else. Hand-typed copies of these six strings live today in
|
|
11
|
+
* `mockHost.ts`'s option docblocks (which ship in the published `.d.ts`),
|
|
12
|
+
* in `blocks-react/test/validate.test.ts`'s fixture, in this guard's own
|
|
13
|
+
* control assertions, and in both READMEs β and every one of them is invisible
|
|
14
|
+
* to the guard. If the host rewords a message they go stale silently. Grep the
|
|
15
|
+
* literal, not just the identifier, when a message moves.
|
|
16
|
+
*
|
|
17
|
+
* π΄ **THE WIRE CARRIES A MESSAGE, NOT A CODE.** The host's router throws a
|
|
18
|
+
* `TRPCError` that has BOTH: `code: 'PAYLOAD_TOO_LARGE'` and a per-site
|
|
19
|
+
* `message`. The bridge that answers `APP_STORAGE_SET` forwards
|
|
20
|
+
* **`err.message`** and never the code, so `PAYLOAD_TOO_LARGE` is a string a
|
|
21
|
+
* block CANNOT receive. `createMockHost` emitted it anyway for three releases:
|
|
22
|
+
* a block that branched on it took the actionable branch under `dev:mock` and
|
|
23
|
+
* the generic one in production, and nothing local could see the difference.
|
|
24
|
+
* That is civitai/civitai-app-starters#343, and this module is its fix β one
|
|
25
|
+
* spelling, shared by the mock, the example harness and any block matcher.
|
|
26
|
+
*
|
|
27
|
+
* ## π΄ There is NO list here of "every string a block can receive" β on purpose
|
|
28
|
+
*
|
|
29
|
+
* **This is the THIRD attempt at this section, and the absence of that list is
|
|
30
|
+
* what the first two attempts cost. It is not an omission to be helpfully
|
|
31
|
+
* filled in.** Both earlier drafts shipped, and each was wrong by more than its
|
|
32
|
+
* author had checked:
|
|
33
|
+
*
|
|
34
|
+
* 1. **Draft 1 (RETRACTED)** presented six strings as "every storage-rejection
|
|
35
|
+
* string the host can put on the wire". It had read only the
|
|
36
|
+
* `PAYLOAD_TOO_LARGE` sites, so it missed the entire authorization family.
|
|
37
|
+
* 2. **Draft 2 (RETRACTED)** kept the six, added a table of eight
|
|
38
|
+
* authorization messages "measured in the same read", and presented THAT
|
|
39
|
+
* as the surface. Also wrong. It missed, in the same file: `Apps are not
|
|
40
|
+
* enabled`, thrown from TWO different gates with one spelling β the
|
|
41
|
+
* `enforceAppBlocksFlag` middleware (defined `:249`, throws at `:255`
|
|
42
|
+
* query / `:257` mutation), which is `.use()`d on all five storage
|
|
43
|
+
* procedures at `:470`, `:509`, `:938`, `:1022`, `:1106` BEFORE their
|
|
44
|
+
* `.input()`, so it fires before anything else on every call; and
|
|
45
|
+
* `assertAppBlocksEnabledForTokenUser` (`:139-155`, throwing at `:153`),
|
|
46
|
+
* reached from `resolveStorageContext`. Grepping `enforceAppBlocksFlag`
|
|
47
|
+
* will NOT find `:153`. Also missed: `block token subject could
|
|
48
|
+
* not be resolved` (`:148`, called unconditionally from
|
|
49
|
+
* `resolveStorageContext`), `review token subject could not be resolved`
|
|
50
|
+
* (`:82`) and `Apps authoring is not enabled for this account` (`:89`).
|
|
51
|
+
* `Apps are not enabled` is a feature-flag kill switch β neither a ceiling
|
|
52
|
+
* nor an authorization failure, so it fit neither published table.
|
|
53
|
+
*
|
|
54
|
+
* Each enumeration was wider than the last and each was still short; the
|
|
55
|
+
* router carries **21** `throw new TRPCError` sites and **17** distinct
|
|
56
|
+
* messages, against draft 2's 14. A third list would be the same defect a third
|
|
57
|
+
* time.
|
|
58
|
+
*
|
|
59
|
+
* π΄ **The completeness claim is the wrong SHAPE, not merely a stale list.** The
|
|
60
|
+
* failure is not "this might go out of date" β it is that "the set of strings a
|
|
61
|
+
* block can receive" is the host's whole error surface, which this repository
|
|
62
|
+
* does not own, cannot observe from here, and has now mis-measured twice while
|
|
63
|
+
* believing otherwise. Do not soften this into "the list below may be
|
|
64
|
+
* incomplete" and restore one. What replaces it needs no completeness at all:
|
|
65
|
+
*
|
|
66
|
+
* - **This module classifies the `PAYLOAD_TOO_LARGE` family plus the bridge's
|
|
67
|
+
* fallback β a set THIS REPOSITORY CHOSE, not a set the host guarantees
|
|
68
|
+
* closed.** It is the five `PAYLOAD_TOO_LARGE` throws in `apps.router.ts`
|
|
69
|
+
* (`:568`, `:783`, `:791`, `:845`, `:853`) and the `'storage request failed'`
|
|
70
|
+
* literal at `IframeHost.tsx:287`. Naming what it classifies is a decision
|
|
71
|
+
* about scope; it needs no completeness claim to be useful, and it must not
|
|
72
|
+
* be dressed as one. π΄ **A ceiling the host enforces OUTSIDE that family
|
|
73
|
+
* already exists** β see "Ceilings outside this set" below.
|
|
74
|
+
* - **Every OTHER host rejection reaches a block on the same `error` field and
|
|
75
|
+
* classifies `null`.** This is the whole of what a block author needs, it
|
|
76
|
+
* requires no enumeration, and it stays true when the host adds, rewords or
|
|
77
|
+
* deletes a message. It holds STRUCTURALLY, from two facts rather than from a
|
|
78
|
+
* survey: the bridge's catch arms are **blanket** `catch (err)` with no code
|
|
79
|
+
* filter (`IframeHost.tsx:2395` GET, `:2427` SET, `:2458` DELETE, `:2508`
|
|
80
|
+
* LIST, `:2535` QUOTA), each forwarding `err.message` verbatim via
|
|
81
|
+
* `storageErrorMessage()`; and {@link classifyAppStorageError} answers `null`
|
|
82
|
+
* for everything outside the ceiling patterns, which is checkable in this
|
|
83
|
+
* file without consulting the host at all.
|
|
84
|
+
* - **The RECIPE beats any prose in this repository β and is still NOT a
|
|
85
|
+
* completeness check.** It is strictly wider than every list anyone has
|
|
86
|
+
* written: it found all 21 `TRPCError` sites, including the four draft 2
|
|
87
|
+
* missed. It is NECESSARY, NOT SUFFICIENT β see "What the recipe cannot
|
|
88
|
+
* see" under "Re-deriving it".
|
|
89
|
+
*
|
|
90
|
+
* ## Ceilings outside this set
|
|
91
|
+
*
|
|
92
|
+
* π΄ **The host enforces size ceilings that are NOT `TRPCError` throws and are
|
|
93
|
+
* therefore invisible to both the recipe and this module.** They are zod
|
|
94
|
+
* `.max()` bounds on the procedures' `.input()` schemas, so tRPC refuses the
|
|
95
|
+
* call with `BAD_REQUEST` before any handler runs. Measured in
|
|
96
|
+
* `apps.router.ts` on `civitai/civitai` `main`, 2026-09-21:
|
|
97
|
+
*
|
|
98
|
+
* - `const keyInput = z.string().min(1).max(200)` (`:460`) β the `key`
|
|
99
|
+
* argument of `get` (`:471`), `set` (`:511`) and `delete` (`:939`);
|
|
100
|
+
* - `list` (`:1025-1027`): `prefix: z.string().max(200)`,
|
|
101
|
+
* `cursor: z.string().max(400)`, `limit: β¦int().min(1).max(200)`.
|
|
102
|
+
*
|
|
103
|
+
* π΄ **The 200-character KEY cap is the one a real block hits with no local
|
|
104
|
+
* warning.** Derive a key from a URL, a model name or a title and 201
|
|
105
|
+
* characters is ordinary. Nothing in this repository caps it: `useAppStorage`
|
|
106
|
+
* and `createMockHost` forward the key verbatim and the mock enforces no length
|
|
107
|
+
* gate (civitai/civitai-app-starters#370), so the write succeeds under
|
|
108
|
+
* `dev:mock` and fails forever in production. The zod refusal arrives on the
|
|
109
|
+
* same `error` field as everything else, so {@link classifyAppStorageError}
|
|
110
|
+
* answers `null` β and the recommended `null` copy ("try reloading the page")
|
|
111
|
+
* is WRONG for it: reloading re-mints the token and the write fails
|
|
112
|
+
* identically. If a block builds keys from untrusted-length input, cap or hash
|
|
113
|
+
* them at the block, and do not rely on a local run to tell you.
|
|
114
|
+
*
|
|
115
|
+
* π΄ **So: wherever a list of host strings still appears β in this repo's
|
|
116
|
+
* READMEs, in the changeset, in `messages.ts`, in `@civitai/blocks-react`'s
|
|
117
|
+
* `src/hooks/useAppStorage.ts`, in the `kv-storage` example's `src/App.tsx`
|
|
118
|
+
* (which is where the "try reloading" copy lives), or in
|
|
119
|
+
* `test/blocks/appStorageErrors.test.ts` β it is ILLUSTRATIVE, NOT EXHAUSTIVE,
|
|
120
|
+
* and must be labelled as such.** Its job is to show a reader what the `null`
|
|
121
|
+
* bucket typically contains, never to bound it.
|
|
122
|
+
*
|
|
123
|
+
* ## Re-deriving it
|
|
124
|
+
*
|
|
125
|
+
* π΄ **Not a `PAYLOAD_TOO_LARGE`-only grep** β that is structurally incapable of
|
|
126
|
+
* seeing anything but the ceiling family, and is how draft 1 came to claim a
|
|
127
|
+
* completeness it had not measured.
|
|
128
|
+
*
|
|
129
|
+
* ```sh
|
|
130
|
+
* # EVERY throw, not one code. Read the whole output; do not count from memory.
|
|
131
|
+
* gh api repos/civitai/civitai/contents/src/server/routers/apps.router.ts \
|
|
132
|
+
* --jq '.content' | base64 -d | grep -n "new TRPCError" -A4
|
|
133
|
+
* # β¦and confirm the catch arms are still blanket (no code filter), which is
|
|
134
|
+
* # what makes "everything else classifies null" true:
|
|
135
|
+
* gh api repos/civitai/civitai/contents/src/components/AppBlocks/IframeHost.tsx \
|
|
136
|
+
* --jq '.content' | base64 -d | grep -n "storageErrorMessage" -B12
|
|
137
|
+
* # β¦and the zod caps, which throw no TRPCError and so appear in NEITHER of the
|
|
138
|
+
* # two commands above:
|
|
139
|
+
* gh api repos/civitai/civitai/contents/src/server/routers/apps.router.ts \
|
|
140
|
+
* --jq '.content' | base64 -d | grep -n "z\.string()\|z\.number()\|\.max("
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* ### What the recipe cannot see
|
|
144
|
+
*
|
|
145
|
+
* π΄ **A clean run of the three commands above is NOT proof of completeness β
|
|
146
|
+
* do not treat it as one.** Measured blind spots, both of which bit this file:
|
|
147
|
+
*
|
|
148
|
+
* - **zod-enforced caps.** They are `.input()` bounds, not throws, so
|
|
149
|
+
* `grep "new TRPCError"` cannot see them at all. That is why the third
|
|
150
|
+
* command exists β and why "a new ceiling can only arrive as a new
|
|
151
|
+
* `PAYLOAD_TOO_LARGE` throw" was deleted from this header: it was false
|
|
152
|
+
* when it was written. See "Ceilings outside this set" above.
|
|
153
|
+
* - **the bridge's own literal.** `'storage request failed'` is at
|
|
154
|
+
* `IframeHost.tsx:287`, and `grep β¦ -B12` prints the twelve lines BEFORE
|
|
155
|
+
* each match β for the definition at `:282` that is 270β282, so line 287
|
|
156
|
+
* never appears in the output. The recipe enumerates the CALL SITES of
|
|
157
|
+
* `storageErrorMessage`, not its fallback. Read the function body.
|
|
158
|
+
*
|
|
159
|
+
* π΄ **DO NOT re-derive the ceiling strings from this comment** β re-read the
|
|
160
|
+
* host. These are prose a server engineer wrote, not a published contract: they
|
|
161
|
+
* can be reworded in any deploy, and nothing will tell you. Which is also why
|
|
162
|
+
* {@link classifyAppStorageError} answers `null` rather than guessing, and why
|
|
163
|
+
* a block must branch on the CLASSIFICATION and render its OWN copy β see the
|
|
164
|
+
* warning on that function.
|
|
165
|
+
*
|
|
166
|
+
* One consequence worth stating plainly: `null` is a **BUSY** bucket, and its
|
|
167
|
+
* dominant real-world occupant is an expired or revoked token, not a rare
|
|
168
|
+
* unknown. Do not write a `default:` arm that assumes `null` means "transient,
|
|
169
|
+
* retry" β see the warning on {@link classifyAppStorageError}.
|
|
170
|
+
*
|
|
171
|
+
* ## Which ceiling each message names
|
|
172
|
+
*
|
|
173
|
+
* Two scopes, and the remedies differ:
|
|
174
|
+
*
|
|
175
|
+
* - **per-user** (`'per-user storage quota exceeded'`, `'per-user row limit
|
|
176
|
+
* exceeded'`) β this viewer has filled their own budget for this app. The
|
|
177
|
+
* ceilings are `APP_STORAGE_MAX_BYTES` / `APP_STORAGE_MAX_ROWS`;
|
|
178
|
+
* the viewer can free space by deleting their own rows.
|
|
179
|
+
* - **app-wide** (`'app quota exceeded'`, `'app row limit exceeded'`) β the
|
|
180
|
+
* app has filled a far larger umbrella shared across every viewer. One
|
|
181
|
+
* viewer's delete will not reliably clear it; this is the developer's
|
|
182
|
+
* problem, and `appStorageLimits.ts` deliberately does not export the
|
|
183
|
+
* umbrella's value because nothing reports usage against it.
|
|
184
|
+
*
|
|
185
|
+
* A block will normally hit the per-user pair. Both are reachable, so a
|
|
186
|
+
* matcher that handles only one is a matcher with a silent hole.
|
|
187
|
+
*/
|
|
188
|
+
/**
|
|
189
|
+
* The host's per-value-cap message, as a function of the cap β a mirror of the
|
|
190
|
+
* template literal at `apps.router.ts:569`, which divides by 1024 and appends
|
|
191
|
+
* `KB cap`.
|
|
192
|
+
*
|
|
193
|
+
* π΄ **THIS IS A TEMPLATE ON THE HOST, SO IT IS A TEMPLATE HERE.** Writing
|
|
194
|
+
* `'value exceeds 64KB cap'` as a literal would be true only while the cap is
|
|
195
|
+
* 64KB, and a string that silently stops matching the host the day the cap
|
|
196
|
+
* moves is the exact defect #343 is about β one spelling that drifts, with
|
|
197
|
+
* nothing able to notice. Derived from {@link APP_STORAGE_MAX_VALUE_BYTES} so
|
|
198
|
+
* the two move together.
|
|
199
|
+
*
|
|
200
|
+
* Exported from this module (not from `@civitai/app-sdk/blocks`) so a test can
|
|
201
|
+
* feed it a cap the constant cannot equal and watch the output move. Blocks
|
|
202
|
+
* want {@link APP_STORAGE_ERROR_VALUE_TOO_LARGE}.
|
|
203
|
+
*/
|
|
204
|
+
export declare function appStorageValueTooLargeMessage(capBytes?: number): string;
|
|
205
|
+
/**
|
|
206
|
+
* A single value exceeded the per-value wire cap
|
|
207
|
+
* ({@link APP_STORAGE_MAX_VALUE_BYTES}). `apps.router.ts:568-569`.
|
|
208
|
+
*
|
|
209
|
+
* The only one of the six ceiling messages that is not a fixed string on the
|
|
210
|
+
* host β see {@link appStorageValueTooLargeMessage}.
|
|
211
|
+
*/
|
|
212
|
+
export declare const APP_STORAGE_ERROR_VALUE_TOO_LARGE: string;
|
|
213
|
+
/** The APP-wide byte umbrella is full. `apps.router.ts:782-785`. */
|
|
214
|
+
export declare const APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED = "app quota exceeded";
|
|
215
|
+
/** The APP-wide row umbrella is full. `apps.router.ts:790-793`. */
|
|
216
|
+
export declare const APP_STORAGE_ERROR_APP_ROW_LIMIT = "app row limit exceeded";
|
|
217
|
+
/**
|
|
218
|
+
* This viewer's byte budget for this app (`APP_STORAGE_MAX_BYTES`) is
|
|
219
|
+
* full. `apps.router.ts:844-847`.
|
|
220
|
+
*/
|
|
221
|
+
export declare const APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED = "per-user storage quota exceeded";
|
|
222
|
+
/**
|
|
223
|
+
* This viewer's row budget for this app (`APP_STORAGE_MAX_ROWS`) is
|
|
224
|
+
* full. `apps.router.ts:852-855`.
|
|
225
|
+
*
|
|
226
|
+
* The ceiling a block reaches first in practice: rows run out long before
|
|
227
|
+
* bytes do.
|
|
228
|
+
*/
|
|
229
|
+
export declare const APP_STORAGE_ERROR_USER_ROW_LIMIT = "per-user row limit exceeded";
|
|
230
|
+
/**
|
|
231
|
+
* The bridge's fallback, used for any storage failure whose error carries no
|
|
232
|
+
* usable message β a transport fault, a non-`Error` throw, an upstream 5xx.
|
|
233
|
+
* `IframeHost.tsx:287`.
|
|
234
|
+
*
|
|
235
|
+
* π΄ It is NOT specific to writes. Every `APP_STORAGE_*` catch arm goes
|
|
236
|
+
* through the same helper, so a `get`, `delete`, `list` or `getQuota` can
|
|
237
|
+
* reject with it too. Retryable, unlike the five ceilings.
|
|
238
|
+
*/
|
|
239
|
+
export declare const APP_STORAGE_ERROR_REQUEST_FAILED = "storage request failed";
|
|
240
|
+
/**
|
|
241
|
+
* The **`PAYLOAD_TOO_LARGE` family** β one string per `PAYLOAD_TOO_LARGE` site
|
|
242
|
+
* in `apps.router.ts` β plus the bridge's fallback, as of the measurement in
|
|
243
|
+
* this file's header.
|
|
244
|
+
*
|
|
245
|
+
* π΄ **NOT "every ceiling string the host can put on the wire", and NOT "every
|
|
246
|
+
* string a block can receive".** Two separate reasons, and both are load-
|
|
247
|
+
* bearing:
|
|
248
|
+
*
|
|
249
|
+
* - The bridge's catch arms are blanket, so every other rejection the host
|
|
250
|
+
* raises arrives on the SAME field and is absent here on purpose. `invalid
|
|
251
|
+
* block token`, `block instance revoked`, `Apps are not enabled` and the
|
|
252
|
+
* `storage β¦ scope` template are examples of what that covers β
|
|
253
|
+
* **illustrations, not a bound.** See this file's header for why no list
|
|
254
|
+
* of them lives in this repository.
|
|
255
|
+
* - π΄ The host also enforces **size ceilings zod-side** (`key` capped at 200
|
|
256
|
+
* characters on the `.input()` schema, and three more on `list`). Those
|
|
257
|
+
* throw no `TRPCError`, so they are invisible to the re-derivation recipe
|
|
258
|
+
* AND absent from this array, while being ceilings in every sense a block
|
|
259
|
+
* cares about. See "Ceilings outside this set" in this file's header.
|
|
260
|
+
*
|
|
261
|
+
* This is the set `createMockHost` and the starter harnesses must draw from β
|
|
262
|
+
* enforced by `tests/guards/app-storage-error-strings.test.mjs`, so a
|
|
263
|
+
* hand-typed string cannot reappear at a mock rejection site.
|
|
264
|
+
*
|
|
265
|
+
* π΄ **NOT RE-EXPORTED FROM `@civitai/app-sdk/blocks`, ON PURPOSE.** Publishing
|
|
266
|
+
* this array invites `APP_STORAGE_HOST_ERROR_MESSAGES.includes(err.message)`,
|
|
267
|
+
* which is EQUALITY against a frozen snapshot β narrower than
|
|
268
|
+
* {@link isAppStorageHostErrorMessage}, and narrower than
|
|
269
|
+
* {@link classifyAppStorageError}, by exactly the per-value message, whose cap
|
|
270
|
+
* the host is free to move. That is the matcher shape #343 exists to
|
|
271
|
+
* eliminate, so it must not become public API. Reach it by file path from a
|
|
272
|
+
* test or a guard; a block branches on the classifier's reason.
|
|
273
|
+
*
|
|
274
|
+
* π΄ **A CLOSED SET IS A CLAIM ABOUT A MEASUREMENT, NOT A CONTRACT β and this
|
|
275
|
+
* measurement is narrow by construction, not merely stale.** Three separate
|
|
276
|
+
* gaps, and only the first is about the future:
|
|
277
|
+
*
|
|
278
|
+
* 1. The host can add a `PAYLOAD_TOO_LARGE` site or reword an existing one
|
|
279
|
+
* in any deploy, and nothing here will notice.
|
|
280
|
+
* 2. **Today, already**, every non-ceiling rejection the host raises reaches
|
|
281
|
+
* the block on the same field and is not in this array. π΄ This is not a
|
|
282
|
+
* hole to be filled β two drafts tried and both came up short (see this
|
|
283
|
+
* file's header). Those strings are the host's session, approval and
|
|
284
|
+
* feature-flag prose, not ceiling vocabulary, and enumerating them here
|
|
285
|
+
* would invite exactly the equality matching the rest of this comment
|
|
286
|
+
* argues against.
|
|
287
|
+
* 3. π΄ **Today, already, a SIZE ceiling the host enforces is missing from
|
|
288
|
+
* here too** β the zod caps, which are not `TRPCError` throws at all.
|
|
289
|
+
* Unlike gap 2 this one IS ceiling vocabulary, which is why the array's
|
|
290
|
+
* scope is spelled as "the `PAYLOAD_TOO_LARGE` family" above rather than
|
|
291
|
+
* as "the ceilings". See "Ceilings outside this set" in this file's
|
|
292
|
+
* header.
|
|
293
|
+
*
|
|
294
|
+
* So an unrecognised string is "some storage failure, unknown which" β NOT
|
|
295
|
+
* "some ceiling", and never "impossible".
|
|
296
|
+
*/
|
|
297
|
+
export declare const APP_STORAGE_HOST_ERROR_MESSAGES: readonly [string, "app quota exceeded", "app row limit exceeded", "per-user storage quota exceeded", "per-user row limit exceeded", "storage request failed"];
|
|
298
|
+
/**
|
|
299
|
+
* Which rejection site a storage failure came from, as a closed set. `null`
|
|
300
|
+
* means the string matched nothing known β see {@link classifyAppStorageError}.
|
|
301
|
+
*/
|
|
302
|
+
export type AppStorageRejectionReason = 'value-too-large' | 'app-quota-exceeded' | 'app-row-limit' | 'user-quota-exceeded' | 'user-row-limit' | 'request-failed';
|
|
303
|
+
/**
|
|
304
|
+
* Turn a rejection β the `Error` `useAppStorage().set()` throws, or its raw
|
|
305
|
+
* message β into the rejection site it came from, or `null` when the string
|
|
306
|
+
* matches nothing this SDK version knows about.
|
|
307
|
+
*
|
|
308
|
+
* Branch on the RESULT; render your OWN copy.
|
|
309
|
+
*
|
|
310
|
+
* π΄ **NEVER RENDER THE MESSAGE ITSELF TO A VIEWER.** It is host-authored
|
|
311
|
+
* server prose in the same class as a workflow `snapshot.error`: not
|
|
312
|
+
* localized, not written for an end user, and free to change. Log it for
|
|
313
|
+
* yourself (`console.warn`) and show copy your app owns.
|
|
314
|
+
*
|
|
315
|
+
* π΄ **`null` IS A REAL OUTCOME, NOT AN ERROR IN YOUR CODE β AND IT DOES NOT
|
|
316
|
+
* MEAN "TRANSIENT".** THREE different things land here, and only one is a
|
|
317
|
+
* retry:
|
|
318
|
+
*
|
|
319
|
+
* - a ceiling message this SDK version has not seen (the host reworded one,
|
|
320
|
+
* or added a site, and your block compiled against an older SDK);
|
|
321
|
+
* - π΄ **and, far more often in production, an authorization or kill-switch
|
|
322
|
+
* failure.** The bridge's catch arms are blanket, so every other rejection
|
|
323
|
+
* the host raises arrives on the same field and classifies `null` β for
|
|
324
|
+
* example `invalid block token` (an expired token mid-session), `block
|
|
325
|
+
* instance revoked`, `storage set requires the apps:storage:write scope`,
|
|
326
|
+
* or `Apps are not enabled` (the feature flag, which fires before anything
|
|
327
|
+
* else on every storage call). π΄ **Those are ILLUSTRATIONS, not the set**:
|
|
328
|
+
* see this module's header for why no list of them lives here.
|
|
329
|
+
* - π΄ **and a zod INPUT-VALIDATION refusal, which never reaches a handler at
|
|
330
|
+
* all.** tRPC parses `.input()` before the procedure body, so a bound
|
|
331
|
+
* violated there is a `BAD_REQUEST` with a zod-generated message β no
|
|
332
|
+
* `TRPCError` anywhere in the router, and nothing this module classifies.
|
|
333
|
+
* The one a real block hits: the host caps `key` at **200 characters**
|
|
334
|
+
* (`z.string().min(1).max(200)`), and neither `useAppStorage` nor
|
|
335
|
+
* `createMockHost` caps it locally, so a key derived from a URL or a model
|
|
336
|
+
* name can save fine under `dev:mock` and fail forever in production. π΄
|
|
337
|
+
* **A RELOAD DOES NOT FIX THAT ONE** β see "Ceilings outside this set" in
|
|
338
|
+
* this module's header.
|
|
339
|
+
*
|
|
340
|
+
* So **"Please try again" is the wrong copy for the `null` arm.** Retrying an
|
|
341
|
+
* expired token forever is the failure this warning exists to prevent. Write a
|
|
342
|
+
* generic arm that offers a RELOAD (which re-mints the token, and also covers
|
|
343
|
+
* a genuine transport blip) and concedes that saving may be unavailable β and
|
|
344
|
+
* keep `'request-failed'` separate if you want honest retry copy, since that
|
|
345
|
+
* reason really is the transport one.
|
|
346
|
+
*
|
|
347
|
+
* @example
|
|
348
|
+
* try {
|
|
349
|
+
* await storage.set(key, note);
|
|
350
|
+
* } catch (err) {
|
|
351
|
+
* console.warn('[my-app] save failed:', err);
|
|
352
|
+
* switch (classifyAppStorageError(err)) {
|
|
353
|
+
* case 'value-too-large':
|
|
354
|
+
* return 'That note is too long to save. Try shortening it.';
|
|
355
|
+
* case 'user-row-limit':
|
|
356
|
+
* case 'app-row-limit':
|
|
357
|
+
* return 'You have no note slots left. Delete one to make room.';
|
|
358
|
+
* case 'request-failed':
|
|
359
|
+
* // The bridge's fallback: genuinely a transport fault. Retry is honest.
|
|
360
|
+
* return 'Could not save that note. Please try again.';
|
|
361
|
+
* default:
|
|
362
|
+
* // `null`: an unknown ceiling OR β usually β an expired/revoked token.
|
|
363
|
+
* return 'Could not save that note. Try reloading the page; if it keeps ' +
|
|
364
|
+
* 'happening, saving may be unavailable for this app right now.';
|
|
365
|
+
* }
|
|
366
|
+
* }
|
|
367
|
+
*/
|
|
368
|
+
export declare function classifyAppStorageError(error: unknown): AppStorageRejectionReason | null;
|
|
369
|
+
/**
|
|
370
|
+
* Is `message` one of the `PAYLOAD_TOO_LARGE`-family strings above (or the
|
|
371
|
+
* bridge's fallback)?
|
|
372
|
+
*
|
|
373
|
+
* π΄ Not "a string the host can produce", and not "a ceiling" either β it
|
|
374
|
+
* answers `false` for every non-ceiling rejection the host raises, all of which
|
|
375
|
+
* the host produces and the bridge forwards on the same field, AND for the
|
|
376
|
+
* host's zod-enforced size caps, which are ceilings it does not know about (see
|
|
377
|
+
* "Ceilings outside this set" in this file's header). It is a membership test
|
|
378
|
+
* over {@link APP_STORAGE_HOST_ERROR_MESSAGES}, nothing wider.
|
|
379
|
+
*
|
|
380
|
+
* Wider than `APP_STORAGE_HOST_ERROR_MESSAGES.includes(β¦)` by exactly one
|
|
381
|
+
* case: the per-value message is a template on the host, so any cap spelling
|
|
382
|
+
* is admitted β see {@link classifyAppStorageError}.
|
|
383
|
+
*
|
|
384
|
+
* Module-internal, like the array: it is a `classifyAppStorageError(β¦) !== null`
|
|
385
|
+
* convenience for `tests/guards/app-storage-error-strings.test.mjs`, which
|
|
386
|
+
* imports this file by PATH. A block wants the classifier's reason, not a
|
|
387
|
+
* yes/no on host prose.
|
|
388
|
+
*/
|
|
389
|
+
export declare function isAppStorageHostErrorMessage(message: unknown): message is string;
|
|
390
|
+
//# sourceMappingURL=appStorageErrors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appStorageErrors.d.ts","sourceRoot":"","sources":["../../src/blocks/appStorageErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0LG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,GAAE,MAAoC,GAC7C,MAAM,CAER;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iCAAiC,QAAmC,CAAC;AAElF,oEAAoE;AACpE,eAAO,MAAM,oCAAoC,uBAAuB,CAAC;AAEzE,mEAAmE;AACnE,eAAO,MAAM,+BAA+B,2BAA2B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qCAAqC,oCAAoC,CAAC;AAEvF;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,gCAAgC,CAAC;AAE9E;;;;;;;;GAQG;AACH,eAAO,MAAM,gCAAgC,2BAA2B,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,eAAO,MAAM,+BAA+B,+JAOlC,CAAC;AAEX;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GACjC,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,GACf,qBAAqB,GACrB,gBAAgB,GAChB,gBAAgB,CAAC;AAErB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,GAAG,IAAI,CA4BxF;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,IAAI,MAAM,CAEhF"}
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The App Storage rejection MESSAGES the host puts on the wire β the only site
|
|
3
|
+
* in this repository that spells them **in executable code**, sibling of
|
|
4
|
+
* `appStorageLimits.ts`, which owns the numbers.
|
|
5
|
+
*
|
|
6
|
+
* π΄ **"IN EXECUTABLE CODE" IS THE WHOLE CLAIM β do not read it wider.** What
|
|
7
|
+
* `tests/guards/app-storage-error-strings.test.mjs` actually enforces is
|
|
8
|
+
* narrower still: every `error:` value inside an `APP_STORAGE_*_RESULT` payload
|
|
9
|
+
* in the scanned mocks must NAME a constant from this module. It sees nothing
|
|
10
|
+
* else. Hand-typed copies of these six strings live today in
|
|
11
|
+
* `mockHost.ts`'s option docblocks (which ship in the published `.d.ts`),
|
|
12
|
+
* in `blocks-react/test/validate.test.ts`'s fixture, in this guard's own
|
|
13
|
+
* control assertions, and in both READMEs β and every one of them is invisible
|
|
14
|
+
* to the guard. If the host rewords a message they go stale silently. Grep the
|
|
15
|
+
* literal, not just the identifier, when a message moves.
|
|
16
|
+
*
|
|
17
|
+
* π΄ **THE WIRE CARRIES A MESSAGE, NOT A CODE.** The host's router throws a
|
|
18
|
+
* `TRPCError` that has BOTH: `code: 'PAYLOAD_TOO_LARGE'` and a per-site
|
|
19
|
+
* `message`. The bridge that answers `APP_STORAGE_SET` forwards
|
|
20
|
+
* **`err.message`** and never the code, so `PAYLOAD_TOO_LARGE` is a string a
|
|
21
|
+
* block CANNOT receive. `createMockHost` emitted it anyway for three releases:
|
|
22
|
+
* a block that branched on it took the actionable branch under `dev:mock` and
|
|
23
|
+
* the generic one in production, and nothing local could see the difference.
|
|
24
|
+
* That is civitai/civitai-app-starters#343, and this module is its fix β one
|
|
25
|
+
* spelling, shared by the mock, the example harness and any block matcher.
|
|
26
|
+
*
|
|
27
|
+
* ## π΄ There is NO list here of "every string a block can receive" β on purpose
|
|
28
|
+
*
|
|
29
|
+
* **This is the THIRD attempt at this section, and the absence of that list is
|
|
30
|
+
* what the first two attempts cost. It is not an omission to be helpfully
|
|
31
|
+
* filled in.** Both earlier drafts shipped, and each was wrong by more than its
|
|
32
|
+
* author had checked:
|
|
33
|
+
*
|
|
34
|
+
* 1. **Draft 1 (RETRACTED)** presented six strings as "every storage-rejection
|
|
35
|
+
* string the host can put on the wire". It had read only the
|
|
36
|
+
* `PAYLOAD_TOO_LARGE` sites, so it missed the entire authorization family.
|
|
37
|
+
* 2. **Draft 2 (RETRACTED)** kept the six, added a table of eight
|
|
38
|
+
* authorization messages "measured in the same read", and presented THAT
|
|
39
|
+
* as the surface. Also wrong. It missed, in the same file: `Apps are not
|
|
40
|
+
* enabled`, thrown from TWO different gates with one spelling β the
|
|
41
|
+
* `enforceAppBlocksFlag` middleware (defined `:249`, throws at `:255`
|
|
42
|
+
* query / `:257` mutation), which is `.use()`d on all five storage
|
|
43
|
+
* procedures at `:470`, `:509`, `:938`, `:1022`, `:1106` BEFORE their
|
|
44
|
+
* `.input()`, so it fires before anything else on every call; and
|
|
45
|
+
* `assertAppBlocksEnabledForTokenUser` (`:139-155`, throwing at `:153`),
|
|
46
|
+
* reached from `resolveStorageContext`. Grepping `enforceAppBlocksFlag`
|
|
47
|
+
* will NOT find `:153`. Also missed: `block token subject could
|
|
48
|
+
* not be resolved` (`:148`, called unconditionally from
|
|
49
|
+
* `resolveStorageContext`), `review token subject could not be resolved`
|
|
50
|
+
* (`:82`) and `Apps authoring is not enabled for this account` (`:89`).
|
|
51
|
+
* `Apps are not enabled` is a feature-flag kill switch β neither a ceiling
|
|
52
|
+
* nor an authorization failure, so it fit neither published table.
|
|
53
|
+
*
|
|
54
|
+
* Each enumeration was wider than the last and each was still short; the
|
|
55
|
+
* router carries **21** `throw new TRPCError` sites and **17** distinct
|
|
56
|
+
* messages, against draft 2's 14. A third list would be the same defect a third
|
|
57
|
+
* time.
|
|
58
|
+
*
|
|
59
|
+
* π΄ **The completeness claim is the wrong SHAPE, not merely a stale list.** The
|
|
60
|
+
* failure is not "this might go out of date" β it is that "the set of strings a
|
|
61
|
+
* block can receive" is the host's whole error surface, which this repository
|
|
62
|
+
* does not own, cannot observe from here, and has now mis-measured twice while
|
|
63
|
+
* believing otherwise. Do not soften this into "the list below may be
|
|
64
|
+
* incomplete" and restore one. What replaces it needs no completeness at all:
|
|
65
|
+
*
|
|
66
|
+
* - **This module classifies the `PAYLOAD_TOO_LARGE` family plus the bridge's
|
|
67
|
+
* fallback β a set THIS REPOSITORY CHOSE, not a set the host guarantees
|
|
68
|
+
* closed.** It is the five `PAYLOAD_TOO_LARGE` throws in `apps.router.ts`
|
|
69
|
+
* (`:568`, `:783`, `:791`, `:845`, `:853`) and the `'storage request failed'`
|
|
70
|
+
* literal at `IframeHost.tsx:287`. Naming what it classifies is a decision
|
|
71
|
+
* about scope; it needs no completeness claim to be useful, and it must not
|
|
72
|
+
* be dressed as one. π΄ **A ceiling the host enforces OUTSIDE that family
|
|
73
|
+
* already exists** β see "Ceilings outside this set" below.
|
|
74
|
+
* - **Every OTHER host rejection reaches a block on the same `error` field and
|
|
75
|
+
* classifies `null`.** This is the whole of what a block author needs, it
|
|
76
|
+
* requires no enumeration, and it stays true when the host adds, rewords or
|
|
77
|
+
* deletes a message. It holds STRUCTURALLY, from two facts rather than from a
|
|
78
|
+
* survey: the bridge's catch arms are **blanket** `catch (err)` with no code
|
|
79
|
+
* filter (`IframeHost.tsx:2395` GET, `:2427` SET, `:2458` DELETE, `:2508`
|
|
80
|
+
* LIST, `:2535` QUOTA), each forwarding `err.message` verbatim via
|
|
81
|
+
* `storageErrorMessage()`; and {@link classifyAppStorageError} answers `null`
|
|
82
|
+
* for everything outside the ceiling patterns, which is checkable in this
|
|
83
|
+
* file without consulting the host at all.
|
|
84
|
+
* - **The RECIPE beats any prose in this repository β and is still NOT a
|
|
85
|
+
* completeness check.** It is strictly wider than every list anyone has
|
|
86
|
+
* written: it found all 21 `TRPCError` sites, including the four draft 2
|
|
87
|
+
* missed. It is NECESSARY, NOT SUFFICIENT β see "What the recipe cannot
|
|
88
|
+
* see" under "Re-deriving it".
|
|
89
|
+
*
|
|
90
|
+
* ## Ceilings outside this set
|
|
91
|
+
*
|
|
92
|
+
* π΄ **The host enforces size ceilings that are NOT `TRPCError` throws and are
|
|
93
|
+
* therefore invisible to both the recipe and this module.** They are zod
|
|
94
|
+
* `.max()` bounds on the procedures' `.input()` schemas, so tRPC refuses the
|
|
95
|
+
* call with `BAD_REQUEST` before any handler runs. Measured in
|
|
96
|
+
* `apps.router.ts` on `civitai/civitai` `main`, 2026-09-21:
|
|
97
|
+
*
|
|
98
|
+
* - `const keyInput = z.string().min(1).max(200)` (`:460`) β the `key`
|
|
99
|
+
* argument of `get` (`:471`), `set` (`:511`) and `delete` (`:939`);
|
|
100
|
+
* - `list` (`:1025-1027`): `prefix: z.string().max(200)`,
|
|
101
|
+
* `cursor: z.string().max(400)`, `limit: β¦int().min(1).max(200)`.
|
|
102
|
+
*
|
|
103
|
+
* π΄ **The 200-character KEY cap is the one a real block hits with no local
|
|
104
|
+
* warning.** Derive a key from a URL, a model name or a title and 201
|
|
105
|
+
* characters is ordinary. Nothing in this repository caps it: `useAppStorage`
|
|
106
|
+
* and `createMockHost` forward the key verbatim and the mock enforces no length
|
|
107
|
+
* gate (civitai/civitai-app-starters#370), so the write succeeds under
|
|
108
|
+
* `dev:mock` and fails forever in production. The zod refusal arrives on the
|
|
109
|
+
* same `error` field as everything else, so {@link classifyAppStorageError}
|
|
110
|
+
* answers `null` β and the recommended `null` copy ("try reloading the page")
|
|
111
|
+
* is WRONG for it: reloading re-mints the token and the write fails
|
|
112
|
+
* identically. If a block builds keys from untrusted-length input, cap or hash
|
|
113
|
+
* them at the block, and do not rely on a local run to tell you.
|
|
114
|
+
*
|
|
115
|
+
* π΄ **So: wherever a list of host strings still appears β in this repo's
|
|
116
|
+
* READMEs, in the changeset, in `messages.ts`, in `@civitai/blocks-react`'s
|
|
117
|
+
* `src/hooks/useAppStorage.ts`, in the `kv-storage` example's `src/App.tsx`
|
|
118
|
+
* (which is where the "try reloading" copy lives), or in
|
|
119
|
+
* `test/blocks/appStorageErrors.test.ts` β it is ILLUSTRATIVE, NOT EXHAUSTIVE,
|
|
120
|
+
* and must be labelled as such.** Its job is to show a reader what the `null`
|
|
121
|
+
* bucket typically contains, never to bound it.
|
|
122
|
+
*
|
|
123
|
+
* ## Re-deriving it
|
|
124
|
+
*
|
|
125
|
+
* π΄ **Not a `PAYLOAD_TOO_LARGE`-only grep** β that is structurally incapable of
|
|
126
|
+
* seeing anything but the ceiling family, and is how draft 1 came to claim a
|
|
127
|
+
* completeness it had not measured.
|
|
128
|
+
*
|
|
129
|
+
* ```sh
|
|
130
|
+
* # EVERY throw, not one code. Read the whole output; do not count from memory.
|
|
131
|
+
* gh api repos/civitai/civitai/contents/src/server/routers/apps.router.ts \
|
|
132
|
+
* --jq '.content' | base64 -d | grep -n "new TRPCError" -A4
|
|
133
|
+
* # β¦and confirm the catch arms are still blanket (no code filter), which is
|
|
134
|
+
* # what makes "everything else classifies null" true:
|
|
135
|
+
* gh api repos/civitai/civitai/contents/src/components/AppBlocks/IframeHost.tsx \
|
|
136
|
+
* --jq '.content' | base64 -d | grep -n "storageErrorMessage" -B12
|
|
137
|
+
* # β¦and the zod caps, which throw no TRPCError and so appear in NEITHER of the
|
|
138
|
+
* # two commands above:
|
|
139
|
+
* gh api repos/civitai/civitai/contents/src/server/routers/apps.router.ts \
|
|
140
|
+
* --jq '.content' | base64 -d | grep -n "z\.string()\|z\.number()\|\.max("
|
|
141
|
+
* ```
|
|
142
|
+
*
|
|
143
|
+
* ### What the recipe cannot see
|
|
144
|
+
*
|
|
145
|
+
* π΄ **A clean run of the three commands above is NOT proof of completeness β
|
|
146
|
+
* do not treat it as one.** Measured blind spots, both of which bit this file:
|
|
147
|
+
*
|
|
148
|
+
* - **zod-enforced caps.** They are `.input()` bounds, not throws, so
|
|
149
|
+
* `grep "new TRPCError"` cannot see them at all. That is why the third
|
|
150
|
+
* command exists β and why "a new ceiling can only arrive as a new
|
|
151
|
+
* `PAYLOAD_TOO_LARGE` throw" was deleted from this header: it was false
|
|
152
|
+
* when it was written. See "Ceilings outside this set" above.
|
|
153
|
+
* - **the bridge's own literal.** `'storage request failed'` is at
|
|
154
|
+
* `IframeHost.tsx:287`, and `grep β¦ -B12` prints the twelve lines BEFORE
|
|
155
|
+
* each match β for the definition at `:282` that is 270β282, so line 287
|
|
156
|
+
* never appears in the output. The recipe enumerates the CALL SITES of
|
|
157
|
+
* `storageErrorMessage`, not its fallback. Read the function body.
|
|
158
|
+
*
|
|
159
|
+
* π΄ **DO NOT re-derive the ceiling strings from this comment** β re-read the
|
|
160
|
+
* host. These are prose a server engineer wrote, not a published contract: they
|
|
161
|
+
* can be reworded in any deploy, and nothing will tell you. Which is also why
|
|
162
|
+
* {@link classifyAppStorageError} answers `null` rather than guessing, and why
|
|
163
|
+
* a block must branch on the CLASSIFICATION and render its OWN copy β see the
|
|
164
|
+
* warning on that function.
|
|
165
|
+
*
|
|
166
|
+
* One consequence worth stating plainly: `null` is a **BUSY** bucket, and its
|
|
167
|
+
* dominant real-world occupant is an expired or revoked token, not a rare
|
|
168
|
+
* unknown. Do not write a `default:` arm that assumes `null` means "transient,
|
|
169
|
+
* retry" β see the warning on {@link classifyAppStorageError}.
|
|
170
|
+
*
|
|
171
|
+
* ## Which ceiling each message names
|
|
172
|
+
*
|
|
173
|
+
* Two scopes, and the remedies differ:
|
|
174
|
+
*
|
|
175
|
+
* - **per-user** (`'per-user storage quota exceeded'`, `'per-user row limit
|
|
176
|
+
* exceeded'`) β this viewer has filled their own budget for this app. The
|
|
177
|
+
* ceilings are `APP_STORAGE_MAX_BYTES` / `APP_STORAGE_MAX_ROWS`;
|
|
178
|
+
* the viewer can free space by deleting their own rows.
|
|
179
|
+
* - **app-wide** (`'app quota exceeded'`, `'app row limit exceeded'`) β the
|
|
180
|
+
* app has filled a far larger umbrella shared across every viewer. One
|
|
181
|
+
* viewer's delete will not reliably clear it; this is the developer's
|
|
182
|
+
* problem, and `appStorageLimits.ts` deliberately does not export the
|
|
183
|
+
* umbrella's value because nothing reports usage against it.
|
|
184
|
+
*
|
|
185
|
+
* A block will normally hit the per-user pair. Both are reachable, so a
|
|
186
|
+
* matcher that handles only one is a matcher with a silent hole.
|
|
187
|
+
*/
|
|
188
|
+
import { APP_STORAGE_MAX_VALUE_BYTES } from './appStorageLimits.js';
|
|
189
|
+
/**
|
|
190
|
+
* The host's per-value-cap message, as a function of the cap β a mirror of the
|
|
191
|
+
* template literal at `apps.router.ts:569`, which divides by 1024 and appends
|
|
192
|
+
* `KB cap`.
|
|
193
|
+
*
|
|
194
|
+
* π΄ **THIS IS A TEMPLATE ON THE HOST, SO IT IS A TEMPLATE HERE.** Writing
|
|
195
|
+
* `'value exceeds 64KB cap'` as a literal would be true only while the cap is
|
|
196
|
+
* 64KB, and a string that silently stops matching the host the day the cap
|
|
197
|
+
* moves is the exact defect #343 is about β one spelling that drifts, with
|
|
198
|
+
* nothing able to notice. Derived from {@link APP_STORAGE_MAX_VALUE_BYTES} so
|
|
199
|
+
* the two move together.
|
|
200
|
+
*
|
|
201
|
+
* Exported from this module (not from `@civitai/app-sdk/blocks`) so a test can
|
|
202
|
+
* feed it a cap the constant cannot equal and watch the output move. Blocks
|
|
203
|
+
* want {@link APP_STORAGE_ERROR_VALUE_TOO_LARGE}.
|
|
204
|
+
*/
|
|
205
|
+
export function appStorageValueTooLargeMessage(capBytes = APP_STORAGE_MAX_VALUE_BYTES) {
|
|
206
|
+
return `value exceeds ${capBytes / 1024}KB cap`;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A single value exceeded the per-value wire cap
|
|
210
|
+
* ({@link APP_STORAGE_MAX_VALUE_BYTES}). `apps.router.ts:568-569`.
|
|
211
|
+
*
|
|
212
|
+
* The only one of the six ceiling messages that is not a fixed string on the
|
|
213
|
+
* host β see {@link appStorageValueTooLargeMessage}.
|
|
214
|
+
*/
|
|
215
|
+
export const APP_STORAGE_ERROR_VALUE_TOO_LARGE = appStorageValueTooLargeMessage();
|
|
216
|
+
/** The APP-wide byte umbrella is full. `apps.router.ts:782-785`. */
|
|
217
|
+
export const APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED = 'app quota exceeded';
|
|
218
|
+
/** The APP-wide row umbrella is full. `apps.router.ts:790-793`. */
|
|
219
|
+
export const APP_STORAGE_ERROR_APP_ROW_LIMIT = 'app row limit exceeded';
|
|
220
|
+
/**
|
|
221
|
+
* This viewer's byte budget for this app (`APP_STORAGE_MAX_BYTES`) is
|
|
222
|
+
* full. `apps.router.ts:844-847`.
|
|
223
|
+
*/
|
|
224
|
+
export const APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED = 'per-user storage quota exceeded';
|
|
225
|
+
/**
|
|
226
|
+
* This viewer's row budget for this app (`APP_STORAGE_MAX_ROWS`) is
|
|
227
|
+
* full. `apps.router.ts:852-855`.
|
|
228
|
+
*
|
|
229
|
+
* The ceiling a block reaches first in practice: rows run out long before
|
|
230
|
+
* bytes do.
|
|
231
|
+
*/
|
|
232
|
+
export const APP_STORAGE_ERROR_USER_ROW_LIMIT = 'per-user row limit exceeded';
|
|
233
|
+
/**
|
|
234
|
+
* The bridge's fallback, used for any storage failure whose error carries no
|
|
235
|
+
* usable message β a transport fault, a non-`Error` throw, an upstream 5xx.
|
|
236
|
+
* `IframeHost.tsx:287`.
|
|
237
|
+
*
|
|
238
|
+
* π΄ It is NOT specific to writes. Every `APP_STORAGE_*` catch arm goes
|
|
239
|
+
* through the same helper, so a `get`, `delete`, `list` or `getQuota` can
|
|
240
|
+
* reject with it too. Retryable, unlike the five ceilings.
|
|
241
|
+
*/
|
|
242
|
+
export const APP_STORAGE_ERROR_REQUEST_FAILED = 'storage request failed';
|
|
243
|
+
/**
|
|
244
|
+
* The **`PAYLOAD_TOO_LARGE` family** β one string per `PAYLOAD_TOO_LARGE` site
|
|
245
|
+
* in `apps.router.ts` β plus the bridge's fallback, as of the measurement in
|
|
246
|
+
* this file's header.
|
|
247
|
+
*
|
|
248
|
+
* π΄ **NOT "every ceiling string the host can put on the wire", and NOT "every
|
|
249
|
+
* string a block can receive".** Two separate reasons, and both are load-
|
|
250
|
+
* bearing:
|
|
251
|
+
*
|
|
252
|
+
* - The bridge's catch arms are blanket, so every other rejection the host
|
|
253
|
+
* raises arrives on the SAME field and is absent here on purpose. `invalid
|
|
254
|
+
* block token`, `block instance revoked`, `Apps are not enabled` and the
|
|
255
|
+
* `storage β¦ scope` template are examples of what that covers β
|
|
256
|
+
* **illustrations, not a bound.** See this file's header for why no list
|
|
257
|
+
* of them lives in this repository.
|
|
258
|
+
* - π΄ The host also enforces **size ceilings zod-side** (`key` capped at 200
|
|
259
|
+
* characters on the `.input()` schema, and three more on `list`). Those
|
|
260
|
+
* throw no `TRPCError`, so they are invisible to the re-derivation recipe
|
|
261
|
+
* AND absent from this array, while being ceilings in every sense a block
|
|
262
|
+
* cares about. See "Ceilings outside this set" in this file's header.
|
|
263
|
+
*
|
|
264
|
+
* This is the set `createMockHost` and the starter harnesses must draw from β
|
|
265
|
+
* enforced by `tests/guards/app-storage-error-strings.test.mjs`, so a
|
|
266
|
+
* hand-typed string cannot reappear at a mock rejection site.
|
|
267
|
+
*
|
|
268
|
+
* π΄ **NOT RE-EXPORTED FROM `@civitai/app-sdk/blocks`, ON PURPOSE.** Publishing
|
|
269
|
+
* this array invites `APP_STORAGE_HOST_ERROR_MESSAGES.includes(err.message)`,
|
|
270
|
+
* which is EQUALITY against a frozen snapshot β narrower than
|
|
271
|
+
* {@link isAppStorageHostErrorMessage}, and narrower than
|
|
272
|
+
* {@link classifyAppStorageError}, by exactly the per-value message, whose cap
|
|
273
|
+
* the host is free to move. That is the matcher shape #343 exists to
|
|
274
|
+
* eliminate, so it must not become public API. Reach it by file path from a
|
|
275
|
+
* test or a guard; a block branches on the classifier's reason.
|
|
276
|
+
*
|
|
277
|
+
* π΄ **A CLOSED SET IS A CLAIM ABOUT A MEASUREMENT, NOT A CONTRACT β and this
|
|
278
|
+
* measurement is narrow by construction, not merely stale.** Three separate
|
|
279
|
+
* gaps, and only the first is about the future:
|
|
280
|
+
*
|
|
281
|
+
* 1. The host can add a `PAYLOAD_TOO_LARGE` site or reword an existing one
|
|
282
|
+
* in any deploy, and nothing here will notice.
|
|
283
|
+
* 2. **Today, already**, every non-ceiling rejection the host raises reaches
|
|
284
|
+
* the block on the same field and is not in this array. π΄ This is not a
|
|
285
|
+
* hole to be filled β two drafts tried and both came up short (see this
|
|
286
|
+
* file's header). Those strings are the host's session, approval and
|
|
287
|
+
* feature-flag prose, not ceiling vocabulary, and enumerating them here
|
|
288
|
+
* would invite exactly the equality matching the rest of this comment
|
|
289
|
+
* argues against.
|
|
290
|
+
* 3. π΄ **Today, already, a SIZE ceiling the host enforces is missing from
|
|
291
|
+
* here too** β the zod caps, which are not `TRPCError` throws at all.
|
|
292
|
+
* Unlike gap 2 this one IS ceiling vocabulary, which is why the array's
|
|
293
|
+
* scope is spelled as "the `PAYLOAD_TOO_LARGE` family" above rather than
|
|
294
|
+
* as "the ceilings". See "Ceilings outside this set" in this file's
|
|
295
|
+
* header.
|
|
296
|
+
*
|
|
297
|
+
* So an unrecognised string is "some storage failure, unknown which" β NOT
|
|
298
|
+
* "some ceiling", and never "impossible".
|
|
299
|
+
*/
|
|
300
|
+
export const APP_STORAGE_HOST_ERROR_MESSAGES = [
|
|
301
|
+
APP_STORAGE_ERROR_VALUE_TOO_LARGE,
|
|
302
|
+
APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED,
|
|
303
|
+
APP_STORAGE_ERROR_APP_ROW_LIMIT,
|
|
304
|
+
APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED,
|
|
305
|
+
APP_STORAGE_ERROR_USER_ROW_LIMIT,
|
|
306
|
+
APP_STORAGE_ERROR_REQUEST_FAILED,
|
|
307
|
+
];
|
|
308
|
+
/**
|
|
309
|
+
* Turn a rejection β the `Error` `useAppStorage().set()` throws, or its raw
|
|
310
|
+
* message β into the rejection site it came from, or `null` when the string
|
|
311
|
+
* matches nothing this SDK version knows about.
|
|
312
|
+
*
|
|
313
|
+
* Branch on the RESULT; render your OWN copy.
|
|
314
|
+
*
|
|
315
|
+
* π΄ **NEVER RENDER THE MESSAGE ITSELF TO A VIEWER.** It is host-authored
|
|
316
|
+
* server prose in the same class as a workflow `snapshot.error`: not
|
|
317
|
+
* localized, not written for an end user, and free to change. Log it for
|
|
318
|
+
* yourself (`console.warn`) and show copy your app owns.
|
|
319
|
+
*
|
|
320
|
+
* π΄ **`null` IS A REAL OUTCOME, NOT AN ERROR IN YOUR CODE β AND IT DOES NOT
|
|
321
|
+
* MEAN "TRANSIENT".** THREE different things land here, and only one is a
|
|
322
|
+
* retry:
|
|
323
|
+
*
|
|
324
|
+
* - a ceiling message this SDK version has not seen (the host reworded one,
|
|
325
|
+
* or added a site, and your block compiled against an older SDK);
|
|
326
|
+
* - π΄ **and, far more often in production, an authorization or kill-switch
|
|
327
|
+
* failure.** The bridge's catch arms are blanket, so every other rejection
|
|
328
|
+
* the host raises arrives on the same field and classifies `null` β for
|
|
329
|
+
* example `invalid block token` (an expired token mid-session), `block
|
|
330
|
+
* instance revoked`, `storage set requires the apps:storage:write scope`,
|
|
331
|
+
* or `Apps are not enabled` (the feature flag, which fires before anything
|
|
332
|
+
* else on every storage call). π΄ **Those are ILLUSTRATIONS, not the set**:
|
|
333
|
+
* see this module's header for why no list of them lives here.
|
|
334
|
+
* - π΄ **and a zod INPUT-VALIDATION refusal, which never reaches a handler at
|
|
335
|
+
* all.** tRPC parses `.input()` before the procedure body, so a bound
|
|
336
|
+
* violated there is a `BAD_REQUEST` with a zod-generated message β no
|
|
337
|
+
* `TRPCError` anywhere in the router, and nothing this module classifies.
|
|
338
|
+
* The one a real block hits: the host caps `key` at **200 characters**
|
|
339
|
+
* (`z.string().min(1).max(200)`), and neither `useAppStorage` nor
|
|
340
|
+
* `createMockHost` caps it locally, so a key derived from a URL or a model
|
|
341
|
+
* name can save fine under `dev:mock` and fail forever in production. π΄
|
|
342
|
+
* **A RELOAD DOES NOT FIX THAT ONE** β see "Ceilings outside this set" in
|
|
343
|
+
* this module's header.
|
|
344
|
+
*
|
|
345
|
+
* So **"Please try again" is the wrong copy for the `null` arm.** Retrying an
|
|
346
|
+
* expired token forever is the failure this warning exists to prevent. Write a
|
|
347
|
+
* generic arm that offers a RELOAD (which re-mints the token, and also covers
|
|
348
|
+
* a genuine transport blip) and concedes that saving may be unavailable β and
|
|
349
|
+
* keep `'request-failed'` separate if you want honest retry copy, since that
|
|
350
|
+
* reason really is the transport one.
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* try {
|
|
354
|
+
* await storage.set(key, note);
|
|
355
|
+
* } catch (err) {
|
|
356
|
+
* console.warn('[my-app] save failed:', err);
|
|
357
|
+
* switch (classifyAppStorageError(err)) {
|
|
358
|
+
* case 'value-too-large':
|
|
359
|
+
* return 'That note is too long to save. Try shortening it.';
|
|
360
|
+
* case 'user-row-limit':
|
|
361
|
+
* case 'app-row-limit':
|
|
362
|
+
* return 'You have no note slots left. Delete one to make room.';
|
|
363
|
+
* case 'request-failed':
|
|
364
|
+
* // The bridge's fallback: genuinely a transport fault. Retry is honest.
|
|
365
|
+
* return 'Could not save that note. Please try again.';
|
|
366
|
+
* default:
|
|
367
|
+
* // `null`: an unknown ceiling OR β usually β an expired/revoked token.
|
|
368
|
+
* return 'Could not save that note. Try reloading the page; if it keeps ' +
|
|
369
|
+
* 'happening, saving may be unavailable for this app right now.';
|
|
370
|
+
* }
|
|
371
|
+
* }
|
|
372
|
+
*/
|
|
373
|
+
export function classifyAppStorageError(error) {
|
|
374
|
+
const message = error instanceof Error
|
|
375
|
+
? error.message
|
|
376
|
+
: typeof error === 'string'
|
|
377
|
+
? error
|
|
378
|
+
: typeof error === 'object' && error !== null && 'message' in error
|
|
379
|
+
? String(error.message)
|
|
380
|
+
: '';
|
|
381
|
+
// CONTAINMENT, not equality. `useAppStorage` throws `new Error(result.error)`
|
|
382
|
+
// verbatim, so equality would be enough for a rejection caught directly off
|
|
383
|
+
// `set()` β but a block that re-wraps ("could not save: <cause>") or logs a
|
|
384
|
+
// joined string is ordinary, and equality would silently stop classifying it.
|
|
385
|
+
// Containment costs nothing here: no host message is a substring of another
|
|
386
|
+
// (checked by a control in `test/blocks/appStorageErrors.test.ts`).
|
|
387
|
+
if (message.includes(APP_STORAGE_ERROR_USER_ROW_LIMIT))
|
|
388
|
+
return 'user-row-limit';
|
|
389
|
+
if (message.includes(APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED))
|
|
390
|
+
return 'user-quota-exceeded';
|
|
391
|
+
if (message.includes(APP_STORAGE_ERROR_APP_ROW_LIMIT))
|
|
392
|
+
return 'app-row-limit';
|
|
393
|
+
if (message.includes(APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED))
|
|
394
|
+
return 'app-quota-exceeded';
|
|
395
|
+
if (message.includes(APP_STORAGE_ERROR_REQUEST_FAILED))
|
|
396
|
+
return 'request-failed';
|
|
397
|
+
// LAST, and matched as a FAMILY rather than against the compiled constant.
|
|
398
|
+
// The cap is the host's, this SDK carries a snapshot of it, and the two can
|
|
399
|
+
// disagree across a release β so `value exceeds 32KB cap` from a host that
|
|
400
|
+
// has moved the cap must still classify, which an equality test against
|
|
401
|
+
// `APP_STORAGE_ERROR_VALUE_TOO_LARGE` would not do.
|
|
402
|
+
if (/\bvalue exceeds \d+(?:\.\d+)?KB cap\b/.test(message))
|
|
403
|
+
return 'value-too-large';
|
|
404
|
+
return null;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Is `message` one of the `PAYLOAD_TOO_LARGE`-family strings above (or the
|
|
408
|
+
* bridge's fallback)?
|
|
409
|
+
*
|
|
410
|
+
* π΄ Not "a string the host can produce", and not "a ceiling" either β it
|
|
411
|
+
* answers `false` for every non-ceiling rejection the host raises, all of which
|
|
412
|
+
* the host produces and the bridge forwards on the same field, AND for the
|
|
413
|
+
* host's zod-enforced size caps, which are ceilings it does not know about (see
|
|
414
|
+
* "Ceilings outside this set" in this file's header). It is a membership test
|
|
415
|
+
* over {@link APP_STORAGE_HOST_ERROR_MESSAGES}, nothing wider.
|
|
416
|
+
*
|
|
417
|
+
* Wider than `APP_STORAGE_HOST_ERROR_MESSAGES.includes(β¦)` by exactly one
|
|
418
|
+
* case: the per-value message is a template on the host, so any cap spelling
|
|
419
|
+
* is admitted β see {@link classifyAppStorageError}.
|
|
420
|
+
*
|
|
421
|
+
* Module-internal, like the array: it is a `classifyAppStorageError(β¦) !== null`
|
|
422
|
+
* convenience for `tests/guards/app-storage-error-strings.test.mjs`, which
|
|
423
|
+
* imports this file by PATH. A block wants the classifier's reason, not a
|
|
424
|
+
* yes/no on host prose.
|
|
425
|
+
*/
|
|
426
|
+
export function isAppStorageHostErrorMessage(message) {
|
|
427
|
+
return typeof message === 'string' && classifyAppStorageError(message) !== null;
|
|
428
|
+
}
|
|
429
|
+
//# sourceMappingURL=appStorageErrors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appStorageErrors.js","sourceRoot":"","sources":["../../src/blocks/appStorageErrors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0LG;AAEH,OAAO,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAEpE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,8BAA8B,CAC5C,WAAmB,2BAA2B;IAE9C,OAAO,iBAAiB,QAAQ,GAAG,IAAI,QAAQ,CAAC;AAClD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,8BAA8B,EAAE,CAAC;AAElF,oEAAoE;AACpE,MAAM,CAAC,MAAM,oCAAoC,GAAG,oBAAoB,CAAC;AAEzE,mEAAmE;AACnE,MAAM,CAAC,MAAM,+BAA+B,GAAG,wBAAwB,CAAC;AAExE;;;GAGG;AACH,MAAM,CAAC,MAAM,qCAAqC,GAAG,iCAAiC,CAAC;AAEvF;;;;;;GAMG;AACH,MAAM,C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AAC;QAAE,OAAO,gBAAgB,CAAC;IAChF,2EAA2E;IAC3E,4EAA4E;IAC5E,2EAA2E;IAC3E,wEAAwE;IACxE,oDAAoD;IACpD,IAAI,uCAAuC,CAAC,IAAI,CAAC,OAAO,CAAC;QAAE,OAAO,iBAAiB,CAAC;IACpF,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,4BAA4B,CAAC,OAAgB;IAC3D,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,uBAAuB,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;AAClF,CAAC"}
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -28,6 +28,39 @@ export type { BlockScope, BlockScopeKey, BlockCategory } from './scopes.js';
|
|
|
28
28
|
export { BrowsingLevel, SFW_LEVELS, NSFW_LEVELS, isSfwCeiling, isLevelAllowed, effectiveBrowsingCeiling, } from './browsingLevel.js';
|
|
29
29
|
export type { BrowsingLevelKey, BrowsingLevelBit, ColorDomain } from './browsingLevel.js';
|
|
30
30
|
export { APP_STORAGE_MAX_VALUE_BYTES, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_ROWS, } from './appStorageLimits.js';
|
|
31
|
+
/**
|
|
32
|
+
* {@link classifyAppStorageError} β the matcher a block branches on β plus the
|
|
33
|
+
* four rejection messages a MOCK HOST has to emit. The wire carries a
|
|
34
|
+
* host-authored message, never the TRPC code; see `appStorageErrors.ts` for the
|
|
35
|
+
* measurement, and #343 for the bug it closes.
|
|
36
|
+
*
|
|
37
|
+
* π΄ **THE PUBLIC BRANCHING SURFACE IS THE REASON, NOT THE STRING.** A block
|
|
38
|
+
* switches on {@link AppStorageRejectionReason}; it never needs to hold a host
|
|
39
|
+
* message. So this barrel deliberately exports LESS than
|
|
40
|
+
* `appStorageErrors.ts` does, and the omissions are each a decision:
|
|
41
|
+
*
|
|
42
|
+
* - `APP_STORAGE_HOST_ERROR_MESSAGES` β the frozen array. Publishing it invites
|
|
43
|
+
* `MESSAGES.includes(err.message)`, which is EQUALITY against a snapshot and
|
|
44
|
+
* stops matching the day the host moves its per-value cap. That is the
|
|
45
|
+
* matcher shape #343 exists to eliminate; `classifyAppStorageError` is
|
|
46
|
+
* strictly wider (see its note on the per-value FAMILY).
|
|
47
|
+
* - `isAppStorageHostErrorMessage` β a thin `classifyAppStorageError(β¦) !==
|
|
48
|
+
* null`. Its only caller is `tests/guards/app-storage-error-strings.test.mjs`,
|
|
49
|
+
* which imports the module by FILE PATH.
|
|
50
|
+
* - `APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED` / `_APP_ROW_LIMIT` β the app-wide
|
|
51
|
+
* umbrella pair. No mock in this repository can emit them (nothing models the
|
|
52
|
+
* umbrella), and a block reaches them through the `'app-quota-exceeded'` /
|
|
53
|
+
* `'app-row-limit'` reasons, which ARE exported.
|
|
54
|
+
* - `appStorageValueTooLargeMessage` β the builder, so a test can prove the
|
|
55
|
+
* per-value string is DERIVED from `APP_STORAGE_MAX_VALUE_BYTES` rather than
|
|
56
|
+
* hardcoded.
|
|
57
|
+
*
|
|
58
|
+
* All five stay exported from `appStorageErrors.ts` itself, so a test or a
|
|
59
|
+
* guard reaches them by path. Adding one here later is a `minor`; removing one
|
|
60
|
+
* once published is not.
|
|
61
|
+
*/
|
|
62
|
+
export { APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, classifyAppStorageError, } from './appStorageErrors.js';
|
|
63
|
+
export type { AppStorageRejectionReason } from './appStorageErrors.js';
|
|
31
64
|
export { BLOCK_INIT_FRAGMENT_MARKER_KEY, BLOCK_INIT_FRAGMENT_VERSION, BLOCK_INIT_FRAGMENT_KEYS, encodeBlockInitFragment, parseBlockInitFragment, stripBlockInitFragment, } from './initFragment.js';
|
|
32
65
|
export type { BlockInitFragment } from './initFragment.js';
|
|
33
66
|
export { isMessage, BLOCK_TO_PARENT_MESSAGE_TYPES, OTHER_MESSAGE_TYPE_LABEL, boundBlockToParentMessageType, } from './messages.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAQH,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACnF,YAAY,EAAE,wBAAwB,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE1F;;;;;;;;;;GAUG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OAAO,EACL,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,GACzB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EACL,aAAa,EACb,UAAU,EACV,WAAW,EACX,YAAY,EACZ,cAAc,EACd,wBAAwB,GACzB,MAAM,oBAAoB,CAAC;AAC5B,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE1F,OAAO,EACL,2BAA2B,EAC3B,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EACL,SAAS,EACT,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,YAAY,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,8BAA8B,EAC9B,WAAW,EACX,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,2BAA2B,EAC3B,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AA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,yBAAyB,EACzB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,EACrB,kBAAkB,EAClB,YAAY,EACZ,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,eAAe,CAAC;AAEvB;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,YAAY,EACV,YAAY,EACZ,WAAW,EACX,WAAW,EACX,eAAe,EACf,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,eAAe,EACf,oBAAoB,EACpB,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,KAAK,EACL,UAAU,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,aAAa,EACb,YAAY,EACZ,uBAAuB,EACvB,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,eAAe,EACf,gBAAgB,EAChB,2BAA2B,EAC3B,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,8BAA8B,EAC9B,WAAW,EACX,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,8BAA8B,EAC9B,2BAA2B,EAC3B,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
|
package/dist/blocks/index.js
CHANGED
|
@@ -31,6 +31,38 @@ export { BlockManifestError } from './manifestError.js';
|
|
|
31
31
|
export { BLOCK_SCOPES, BLOCK_SCOPE_PATTERN, BLOCK_CATEGORIES, BLOCK_TAGLINE_MAX_LENGTH, } from './scopes.js';
|
|
32
32
|
export { BrowsingLevel, SFW_LEVELS, NSFW_LEVELS, isSfwCeiling, isLevelAllowed, effectiveBrowsingCeiling, } from './browsingLevel.js';
|
|
33
33
|
export { APP_STORAGE_MAX_VALUE_BYTES, APP_STORAGE_MAX_BYTES, APP_STORAGE_MAX_ROWS, } from './appStorageLimits.js';
|
|
34
|
+
/**
|
|
35
|
+
* {@link classifyAppStorageError} β the matcher a block branches on β plus the
|
|
36
|
+
* four rejection messages a MOCK HOST has to emit. The wire carries a
|
|
37
|
+
* host-authored message, never the TRPC code; see `appStorageErrors.ts` for the
|
|
38
|
+
* measurement, and #343 for the bug it closes.
|
|
39
|
+
*
|
|
40
|
+
* π΄ **THE PUBLIC BRANCHING SURFACE IS THE REASON, NOT THE STRING.** A block
|
|
41
|
+
* switches on {@link AppStorageRejectionReason}; it never needs to hold a host
|
|
42
|
+
* message. So this barrel deliberately exports LESS than
|
|
43
|
+
* `appStorageErrors.ts` does, and the omissions are each a decision:
|
|
44
|
+
*
|
|
45
|
+
* - `APP_STORAGE_HOST_ERROR_MESSAGES` β the frozen array. Publishing it invites
|
|
46
|
+
* `MESSAGES.includes(err.message)`, which is EQUALITY against a snapshot and
|
|
47
|
+
* stops matching the day the host moves its per-value cap. That is the
|
|
48
|
+
* matcher shape #343 exists to eliminate; `classifyAppStorageError` is
|
|
49
|
+
* strictly wider (see its note on the per-value FAMILY).
|
|
50
|
+
* - `isAppStorageHostErrorMessage` β a thin `classifyAppStorageError(β¦) !==
|
|
51
|
+
* null`. Its only caller is `tests/guards/app-storage-error-strings.test.mjs`,
|
|
52
|
+
* which imports the module by FILE PATH.
|
|
53
|
+
* - `APP_STORAGE_ERROR_APP_QUOTA_EXCEEDED` / `_APP_ROW_LIMIT` β the app-wide
|
|
54
|
+
* umbrella pair. No mock in this repository can emit them (nothing models the
|
|
55
|
+
* umbrella), and a block reaches them through the `'app-quota-exceeded'` /
|
|
56
|
+
* `'app-row-limit'` reasons, which ARE exported.
|
|
57
|
+
* - `appStorageValueTooLargeMessage` β the builder, so a test can prove the
|
|
58
|
+
* per-value string is DERIVED from `APP_STORAGE_MAX_VALUE_BYTES` rather than
|
|
59
|
+
* hardcoded.
|
|
60
|
+
*
|
|
61
|
+
* All five stay exported from `appStorageErrors.ts` itself, so a test or a
|
|
62
|
+
* guard reaches them by path. Adding one here later is a `minor`; removing one
|
|
63
|
+
* once published is not.
|
|
64
|
+
*/
|
|
65
|
+
export { APP_STORAGE_ERROR_VALUE_TOO_LARGE, APP_STORAGE_ERROR_USER_QUOTA_EXCEEDED, APP_STORAGE_ERROR_USER_ROW_LIMIT, APP_STORAGE_ERROR_REQUEST_FAILED, classifyAppStorageError, } from './appStorageErrors.js';
|
|
34
66
|
export { BLOCK_INIT_FRAGMENT_MARKER_KEY, BLOCK_INIT_FRAGMENT_VERSION, BLOCK_INIT_FRAGMENT_KEYS, encodeBlockInitFragment, parseBlockInitFragment, stripBlockInitFragment, } from './initFragment.js';
|
|
35
67
|
export { isMessage, BLOCK_TO_PARENT_MESSAGE_TYPES, OTHER_MESSAGE_TYPE_LABEL, boundBlockToParentMessageType, } from './messages.js';
|
|
36
68
|
/**
|
package/dist/blocks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,2EAA2E;AAC3E,+EAA+E;AAC/E,6EAA6E;AAC7E,4EAA4E;AAC5E,8EAA8E;AAC9E,mEAAmE;AACnE,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAGnF;;;;;;;;;;GAUG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExD,OA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BAAqB,EACrB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAE/B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,EACL,iCAAiC,EACjC,qCAAqC,EACrC,gCAAgC,EAChC,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,8BAA8B,EAC9B,2BAA2B,EAC3B,wBAAwB,EACxB,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,SAAS,EACT,6BAA6B,EAC7B,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,eAAe,CAAC;AAiBvB;;;;GAIG;AACH,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEnE;;;;GAIG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/blocks/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,8BAA8B,EAC9B,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,aAAa,EACb,KAAK,EACL,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,8BAA8B,EAC9B,WAAW,EACX,iBAAiB,EACjB,0BAA0B,EAC1B,WAAW,EACX,eAAe,EACf,8BAA8B,EAC9B,2BAA2B,EAC3B,eAAe,EACf,qBAAqB,EACtB,MAAM,YAAY,CAAC;AAMpB;;;;;GAKG;AACH,MAAM,WAAW,2BAA2B;IAC1C,sGAAsG;IACtG,WAAW,CAAC,EAAE,MAA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YAAY,EAAE,MAAM,CAAC;QACrB,2CAA2C;QAC3C,MAAM,EAAE,OAAO,CAAC;KACjB,CAAC;CACH,CAAC;AAEN,MAAM,MAAM,wBAAwB,GAAG,oBAAoB,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,eAAO,MAAM,6BAA6B,q6BAgDhC,CAAC;AA4BX;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAMhD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAElE;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,oBAAoB,GAAG,oBAAoB,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAClG,IAAI,EAAE,OAAO,EACb,IAAI,EAAE,CAAC,GACN,IAAI,IAAI,OAAO,CAAC,CAAC,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAOjC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/blocks/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/blocks/messages.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAi5CH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC3C,aAAa;IACb,aAAa;IACb,aAAa;IACb,wBAAwB;IACxB,eAAe;IACf,eAAe;IACf,iBAAiB;IACjB,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,oBAAoB;IACpB,kBAAkB;IAClB,YAAY;IACZ,uBAAuB;IACvB,mBAAmB;IACnB,wBAAwB;IACxB,mBAAmB;IACnB,q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