@fave1/create-app 0.1.4 → 0.1.5
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/package.json +2 -2
- package/templates/break/README.md +3 -2
- package/templates/break/types/fave1.d.ts +132 -64
- package/templates/minimal/README.md +3 -2
- package/templates/minimal/types/fave1.d.ts +132 -64
- package/templates/panel/README.md +3 -2
- package/templates/panel/types/fave1.d.ts +132 -64
- package/templates/storage/README.md +3 -2
- package/templates/storage/types/fave1.d.ts +132 -64
|
@@ -92,23 +92,28 @@ type Fave1ErrorCode =
|
|
|
92
92
|
| 'signed-out' // needs a Fave1 account and there isn't one here
|
|
93
93
|
| 'not-installed' // this person hasn't added the app (a sideloaded run)
|
|
94
94
|
| 'too-large' | 'quota' | 'invalid'
|
|
95
|
-
| 'rate' // too fast — pub writes in a row, file uploads (`err.scope` 'hour' | 'month')
|
|
95
|
+
| 'rate' // too fast — pub writes in a row, file uploads (`err.scope` 'hour' | 'month'), file reads ('read'), shared.get() (per network),
|
|
96
|
+
// ctx.ai (20 a minute and 2 at once per app — `err.reason` 'busy', 60 a minute across all apps — 'minute'), or a second purchases.buy() while one is open: wait, then carry on
|
|
96
97
|
| 'cancelled' // they said "Not now"
|
|
97
98
|
| 'conflict' // shared.set() with a stale base — err.current is the row now; merge and set() again
|
|
98
|
-
| 'not-found' // shared.access() · delete() on a link that isn't yours or is gone · room.direct() to a sid that isn't in the room
|
|
99
|
+
| 'not-found' // shared.access() · delete() on a link that isn't yours or is gone · room.direct() to a sid that isn't in the room ·
|
|
100
|
+
// purchases.buy() an item you don't sell · finish() a receipt that isn't there
|
|
99
101
|
| 'declined' // room.direct(): their app doesn't take direct lines (no room.on('direct') and no direct() back within 3 s)
|
|
100
|
-
| 'no-key' // ctx.ai: no AI key and no Fave1 credits (`err.reason` 'none' | 'credits-empty') — Fave1 already told them where to add one
|
|
102
|
+
| 'no-key' // ctx.ai: no AI key and no Fave1 credits (`err.reason` 'none' | 'credits-empty' | 'fave1-only' | 'choice') — Fave1 already told them where to add one
|
|
101
103
|
| 'key-broken' // ctx.ai: their provider turned the key down — Fave1 already told them
|
|
102
104
|
| 'limit' // ctx.ai: this month's limit (`err.scope` 'app' | 'all', `err.resetAt`) — don't retry before then
|
|
103
|
-
| 'too-big' // ctx.ai: too much
|
|
105
|
+
| 'too-big' // ctx.ai: too much for one call (`err.reason` 'messages' | 'images' | 'text' | 'style', or none when the whole call is over —
|
|
106
|
+
// a system prompt over 20,000 characters, a schema over 16,000, about 120,000 tokens in all)
|
|
104
107
|
| 'provider' // ctx.ai: the AI service failed (`err.reason` 'busy' | 'refused' | …, `err.retryable`)
|
|
105
|
-
| 'aborted' // ctx.ai: stopped — your signal, the tab went to the background, or the app closed
|
|
106
|
-
| 'no-voice' // ctx.ai.speak():
|
|
107
|
-
|
|
108
|
-
| '
|
|
108
|
+
| 'aborted' // ctx.ai: stopped — your signal, the tab went to the background (`err.reason` 'hidden'), or the app closed
|
|
109
|
+
| 'no-voice' // ctx.ai.speak(): voices run on Fave1 credits only (`err.reason` 'credits' — none left, Fave1 already told them · 'undeclared' — your
|
|
110
|
+
// manifest has no `"voice": true` · 'maker' — Fave1 can't speak that company's voices right now · 'choice' — `ai` isn't openai · google · xai)
|
|
111
|
+
| 'blocked' // ctx.camera · ctx.mic: this site doesn't allow a camera / microphone (`err.reason` 'site') · ctx.notify: Fave1 stopped this app
|
|
112
|
+
| 'unavailable' // ctx.camera · ctx.mic: none here ('none'), the page isn't https ('insecure'), or no camera gives that size ('size')
|
|
109
113
|
| 'busy' // ctx.camera · ctx.mic: another tab or app is using it
|
|
110
114
|
| 'credits' // ctx.purchases.buy(): not enough Fave1 credits (`err.balance`, `err.needed`) — Fave1 already showed Get credits
|
|
111
115
|
| 'not-yet' // ctx.purchases: in-app purchases aren't open to your app yet
|
|
116
|
+
| 'needs-tap' // ctx.notify.send(): they haven't said yes to your notifications yet and Fave1 couldn't ask here (the card is hidden) — show your card and call again
|
|
112
117
|
| 'unreachable' | 'timeout' | 'server';
|
|
113
118
|
|
|
114
119
|
/** What `ctx` rejects with — an `Error` carrying a `code`. `catch (err) { const e = err as Fave1Error; … }` */
|
|
@@ -122,8 +127,8 @@ interface Fave1Error extends Error {
|
|
|
122
127
|
* (more on paid plans): it won't clear today, so tell them. From `files.get()`: `'read'` — 600 reads in a minute, all apps
|
|
123
128
|
* together: back off, it clears within the minute.
|
|
124
129
|
* An older runtime may leave it out; read `quota` as `'account'`, `rate` from `put()` as `'hour'` and from `get()` as `'read'`. */
|
|
125
|
-
scope?: 'app' | 'account' | 'hour' | 'month' | 'read' | 'shared' | 'stickers' | 'all';
|
|
126
|
-
/** ctx.ai: more about why — `denied` 'undeclared' | 'off-in-settings' | 'paused' | 'not-now', `no-key` 'none' | 'credits-empty' | 'fave1-only' (your app is a voice app — it runs on Fave1 AI only), `provider` 'busy' (overloaded — try again) | 'rate' (the person's key hit its per-minute limit — wait a minute) | 'billing' (their key's account has no credit) | 'quota' (their key hit its daily or free-plan limit) | 'refused' | 'model' | 'bad' | 'json' | 'length' — Fave1 tells the person about billing and quota, so don't offer a retry for those, `invalid` 'messages' | 'image' | 'json' | 'tools'. */
|
|
130
|
+
scope?: 'app' | 'account' | 'hour' | 'month' | 'read' | 'shared' | 'stickers' | 'all' | 'day' | 'pending';
|
|
131
|
+
/** ctx.ai: more about why — `denied` 'undeclared' | 'off-in-settings' | 'paused' | 'not-now' | 'off' (Fave1 paused AI for your app), `no-key` 'none' | 'credits-empty' | 'fave1-only' (your app is a voice app — it runs on Fave1 AI only), `provider` 'busy' (overloaded — try again) | 'rate' (the person's key hit its per-minute limit — wait a minute) | 'billing' (their key's account has no credit) | 'quota' (their key hit its daily or free-plan limit) | 'refused' | 'model' | 'bad' | 'json' | 'length' (from `speak()` only 'busy' · 'billing' · 'model' · 'bad' · 'refused', with no `err.by`) — Fave1 tells the person about billing and quota, so don't offer a retry for those, `invalid` 'messages' | 'system' | 'model' | 'maxTokens' | 'image' | 'json' | 'tools' | 'cache' | 'ai' | 'maxSteps' | 'text' | 'voice' | 'style' | 'speed'. */
|
|
127
132
|
reason?: string;
|
|
128
133
|
/** ctx.ai `limit`: when it resets (ISO time — the 1st of next month, UTC). */
|
|
129
134
|
resetAt?: string;
|
|
@@ -131,15 +136,20 @@ interface Fave1Error extends Error {
|
|
|
131
136
|
retryAfter?: number;
|
|
132
137
|
/** ctx.ai: worth trying the same call again a bit later. */
|
|
133
138
|
retryable?: boolean;
|
|
139
|
+
/** ctx.ai: what exactly was wrong — on `invalid`, and on `provider` with `reason` 'json' (which part of the answer didn't fit your schema). */
|
|
140
|
+
detail?: string;
|
|
141
|
+
/** ctx.ai `provider` · 'json': the answer as the model wrote it, before it failed your schema. */
|
|
142
|
+
text?: string;
|
|
134
143
|
/** ctx.ai: which AI said no — 'anthropic' | 'openai' | 'google' | 'xai' (on `key-broken` and `provider`). `err.message` already names it in plain words. */
|
|
135
144
|
by?: string;
|
|
136
145
|
/** ctx.ai: the person can fix this themselves (replace their key, switch to Fave1 AI, get credits, raise a limit) — show `err.message` and a button that calls `ctx.ai.setup()`. */
|
|
137
146
|
fixable?: boolean;
|
|
138
147
|
/** ctx.ai: Fave1 already showed the person a card about this with their options — keep your message short and don't stack another popup. */
|
|
139
148
|
shown?: boolean;
|
|
140
|
-
/** On `conflict` from `shared.set()`: the row as it is now
|
|
149
|
+
/** On `conflict` from `shared.set()`: the row as it is now — its `value` and `v` (the base to use next). */
|
|
141
150
|
current?: Shared;
|
|
142
|
-
/** ctx.purchases `credits`: their balance (when Fave1 may tell you — at home, or on a site your app is allowed on) and the item's price.
|
|
151
|
+
/** ctx.purchases `credits`: their balance (when Fave1 may tell you — at home, or on a site your app is allowed on) and the item's price.
|
|
152
|
+
* Fave1 shows Get credits the first time this happens while your app is open — after that it's yours to say. */
|
|
143
153
|
balance?: number;
|
|
144
154
|
needed?: number;
|
|
145
155
|
/** ctx.purchases `cancelled`: `true` when they chose Not now (rather than the panel closing). */
|
|
@@ -157,7 +167,7 @@ interface PubRow<T = any> {
|
|
|
157
167
|
value: T;
|
|
158
168
|
/** ISO time of their last write. */
|
|
159
169
|
updatedAt: string;
|
|
160
|
-
/** This row belongs to the person using the app. */
|
|
170
|
+
/** This row belongs to the person using the app. Always `false` on a site that hasn't said yes to your app yet. */
|
|
161
171
|
me: boolean;
|
|
162
172
|
}
|
|
163
173
|
|
|
@@ -166,7 +176,8 @@ interface PubQuery {
|
|
|
166
176
|
* for an array that holds a matching item. Up to 2 KB. */
|
|
167
177
|
where?: unknown;
|
|
168
178
|
/** The field to sort by: `'best'`, `'-best'` (largest first), `'stats.best'`, or a key path like
|
|
169
|
-
* `['runs', 'amazon.com', 'ms']` when a key has a dot in it
|
|
179
|
+
* `['runs', 'amazon.com', 'ms']` when a key has a dot in it — up to 6 levels, each 1–64 characters (`invalid` past that).
|
|
180
|
+
* Ties go to whoever wrote first. */
|
|
170
181
|
order?: string | string[];
|
|
171
182
|
/** Largest first. `'-best'` already means this. */
|
|
172
183
|
desc?: boolean;
|
|
@@ -179,7 +190,7 @@ type PubReportReason = 'inappropriate' | 'scam' | 'exposes_personal_data' | 'oth
|
|
|
179
190
|
|
|
180
191
|
/** `pub` — one JSON value per person, up to 4 KB, that everyone using this app can read. Only its owner writes it.
|
|
181
192
|
* Writing needs a Fave1 account: when nobody's signed in, `ctx.can('pub')` is false and only `list()` works — other people's
|
|
182
|
-
* rows,
|
|
193
|
+
* rows, with an initial and a color and never a name. Show the board anyway and ask people to sign in to get on it.
|
|
183
194
|
* The first write from a new site asks the person once ("Post to …?"), so `set()` can take a moment — and can
|
|
184
195
|
* reject with `cancelled`. On the app's own page (`<id>.fave1.app`) it never asks. DEV builds use a sandbox in this browser
|
|
185
196
|
* unless Data is set to "My account" in the DEV panel.
|
|
@@ -191,7 +202,7 @@ interface Pub<T = any> {
|
|
|
191
202
|
set(value: T): Promise<void>;
|
|
192
203
|
delete(): Promise<void>;
|
|
193
204
|
list(query?: PubQuery): Promise<PubRow<T>[]>;
|
|
194
|
-
/** Your place in the same query — `null` when your value doesn't match or has no `order` field. */
|
|
205
|
+
/** Your place in the same query — `null` when your value doesn't match or has no `order` field, and on a site that hasn't said yes to your app yet. */
|
|
195
206
|
rank(query: PubQuery & { order: string | string[] }): Promise<{ rank: number; total: number } | null>;
|
|
196
207
|
/** Report someone else's row — `id` from `list()`. Fave1 looks at it; whoever posted it is never told who reported.
|
|
197
208
|
* On a third-party site the first report asks once (Report). If your app shows other people's text, give people a way to do this. */
|
|
@@ -250,9 +261,8 @@ interface DirectLine {
|
|
|
250
261
|
* (an `error` event says which). Never waits, never throws. `true` means Fave1 has it; on a lossy line it can still be dropped on the way. */
|
|
251
262
|
send(data: unknown): boolean;
|
|
252
263
|
on(type: 'message', handler: (data: unknown) => void): () => void;
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
* and they come back with a new sid — open a new line then); `gone` — the app closed. A dropped direct connection is not a close: the line
|
|
264
|
+
/** `closed` — either side called `close()`, or you left the room; `left` — they left the room; `lost` — your own room connection dropped (Fave1 reconnects the room
|
|
265
|
+
* and they come back with a new sid — open a new line then); `gone` — your app closed. A dropped direct connection is not a close: the line
|
|
256
266
|
* moves to the room (`via`). */
|
|
257
267
|
on(type: 'close', handler: (ev: { reason: 'closed' | 'left' | 'lost' | 'gone' }) => void): () => void;
|
|
258
268
|
on(type: 'error', handler: (ev: { code: 'too-large' | 'rate' | 'invalid' }) => void): () => void;
|
|
@@ -275,7 +285,9 @@ interface LiveRoom {
|
|
|
275
285
|
/** A copy of the whole table. */
|
|
276
286
|
all(): Record<string, unknown>;
|
|
277
287
|
/** Set one key for everyone. Applied here at once (a `change` with `me: true`), then sent. Values are JSON up to 8 KB; the room
|
|
278
|
-
* holds up to 2,000 keys / 256 KB.
|
|
288
|
+
* holds up to 2,000 keys / 256 KB. A key is 1–160 characters with no control characters (`invalid`). When two people set the same key
|
|
289
|
+
* at the same moment, the one the server gets last wins. If the room refuses the write (an `error` event with that `key`), Fave1 puts
|
|
290
|
+
* the room's value back here with a `change` (`me: false`, `by: null`). */
|
|
279
291
|
set(key: string, value: unknown): Promise<void>;
|
|
280
292
|
del(key: string): Promise<void>;
|
|
281
293
|
/** Share where you are or what you're doing — a cursor, a selection, "typing". Not saved; sent to the others at most every 40 ms,
|
|
@@ -296,11 +308,12 @@ interface LiveRoom {
|
|
|
296
308
|
/** Fires after a reconnect (`join()` itself resolves once the room is open) — the table may have moved on; `change` events for the
|
|
297
309
|
* differences come first. */
|
|
298
310
|
on(type: 'open', handler: (ev: { reconnected: true }) => void): () => void;
|
|
299
|
-
/** `lost` — dropped, Fave1 is reconnecting
|
|
300
|
-
*
|
|
311
|
+
/** `lost` — dropped, Fave1 is reconnecting (also when the same person opens a fifth tab in this room — each person keeps up to 4);
|
|
312
|
+
* `left` — you called `leave()`; `server` — the room closed it (nobody used it for 45 days); `gone` — your app closed. */
|
|
301
313
|
on(type: 'close', handler: (ev: { code: number; reason: 'lost' | 'left' | 'server' | 'gone' }) => void): () => void;
|
|
302
|
-
/** The room refused something — `too-large`, `quota` (room full of keys/bytes), `rate` (over 40 writes a second), `invalid`. */
|
|
314
|
+
/** The room refused something — `too-large`, `quota` (room full of keys/bytes), `rate` (over 40 writes a second from this tab), `invalid`. */
|
|
303
315
|
on(type: 'error', handler: (ev: { code: string; key?: string }) => void): () => void;
|
|
316
|
+
/** Leaves the room — `close` fires with `left`, and your direct lines close with `closed`. */
|
|
304
317
|
leave(): Promise<void>;
|
|
305
318
|
}
|
|
306
319
|
|
|
@@ -309,8 +322,9 @@ interface LiveRoom {
|
|
|
309
322
|
* the same yes that covers posting. Anyone who joins a room with the same name sees the same table, so put something only your
|
|
310
323
|
* people know into the name (an invite code, a link). DEV builds get a sandbox room in this browser — tabs on the same site share it. */
|
|
311
324
|
interface Live {
|
|
312
|
-
/** `what` names what people are joining in the permission line — `Join the {what} on <your app>?` —
|
|
313
|
-
* (a Collab calls it a project). Older launchers ignore it.
|
|
325
|
+
/** `what` names what people are joining in the permission line — `Join the {what} on <your app>?` — up to 20 letters, spaces and hyphens,
|
|
326
|
+
* default `room` (anything else falls back to it; a Collab calls it a project). Older launchers ignore it.
|
|
327
|
+
* `room` is 1–200 characters (else `invalid`). If it rejects (`timeout`, `server`, `unreachable` …) there is no room to wait on — call `join()` again. */
|
|
314
328
|
join(room: string, opts?: { what?: string }): Promise<LiveRoom>;
|
|
315
329
|
}
|
|
316
330
|
|
|
@@ -337,7 +351,7 @@ interface Files {
|
|
|
337
351
|
* A `File` keeps its own name unless `opts.name` gives one. Empty files and HTML reject with `invalid`, over 25 MB with `too-large`.
|
|
338
352
|
* Uploads have two limits, all apps together: 600 an hour and 3,000 in 30 days on Free (more on paid plans); deleting a file
|
|
339
353
|
* doesn't give the upload back. Past either, `rate` with `err.scope` `'hour'` or `'month'` — stop, keep your place, carry on later. */
|
|
340
|
-
put(blob: Blob, opts?: { name?: string; onProgress?(
|
|
354
|
+
put(blob: Blob, opts?: { name?: string; /** 0 to 1 — how much of the upload has gone. */ onProgress?(fraction: number): void }): Promise<FileInfo>;
|
|
341
355
|
/** The file, or `null` if it's gone. Never throws for a missing file. A file has no link of its own — to show it, make an object
|
|
342
356
|
* URL, set it as an `<img>` src, and `URL.revokeObjectURL()` it on load or error. Don't keep the URL; make a new one to draw again.
|
|
343
357
|
* Get files as they come into view: past 600 reads a minute (all apps together), `rate` with `err.scope` `'read'`. */
|
|
@@ -376,11 +390,12 @@ interface PageAccess {
|
|
|
376
390
|
/** A full-screen layer over the page for what you draw yourself — a game canvas, a score bar, confetti. Fave1 keeps it
|
|
377
391
|
* above everything on the page and below its own card, and removes it when your app closes. It lets clicks through:
|
|
378
392
|
* give `pointer-events: auto` to what should catch them. Same element on every call. `{ over: 'card' }` lifts it above
|
|
379
|
-
* the card for a moment (a celebration) — up there it takes no clicks; call `layer()` again to put it back.
|
|
393
|
+
* the card for a moment (a celebration) — up there it takes no clicks; call `layer()` again to put it back.
|
|
394
|
+
* After your app closed it returns `null` — don't call it from a late timer. */
|
|
380
395
|
layer(options?: { over?: 'page' | 'card' }): HTMLElement;
|
|
381
396
|
/** True when a node or event target is Fave1’s own chrome — the card, its frames, the top-layer box, or the app-layer
|
|
382
|
-
* element itself. What you put inside `layer()` is still yours (`layer.contains`). A node with slot `f1-under`
|
|
383
|
-
* page. Skip chrome when you walk the page, and let its clicks through when you catch input on the page. */
|
|
397
|
+
* element itself. What you put inside `layer()` is still yours (`layer.contains`). A node with slot `f1-under` (something you
|
|
398
|
+
* slipped under the card yourself) counts as the page. Skip chrome when you walk the page, and let its clicks through when you catch input on the page. */
|
|
384
399
|
isFave1(node: EventTarget | null): boolean;
|
|
385
400
|
/** Pull fixed layers the page stacked above the card back under it. Fave1 puts them back when the app closes. */
|
|
386
401
|
sinkFloaters(): void;
|
|
@@ -416,6 +431,20 @@ interface Shared<T = unknown> {
|
|
|
416
431
|
editor: { initial: string; color: string } | null;
|
|
417
432
|
}
|
|
418
433
|
|
|
434
|
+
/** One of this person's shared links, as `shared.list()` returns it — no value: read it with `get(ref)`. */
|
|
435
|
+
interface SharedLink {
|
|
436
|
+
id: string; key: string; ref: string;
|
|
437
|
+
v: number;
|
|
438
|
+
edit: boolean;
|
|
439
|
+
/** Size of the value as JSON, in bytes — it counts toward their Fave1 storage. */
|
|
440
|
+
bytes: number;
|
|
441
|
+
updatedAt: string;
|
|
442
|
+
/** Someone other than the owner has written to it. */
|
|
443
|
+
edited: boolean;
|
|
444
|
+
/** Always `true` — `list()` only gives this person's own links. */
|
|
445
|
+
mine: boolean;
|
|
446
|
+
owner: { initial: string; color: string } | null;
|
|
447
|
+
}
|
|
419
448
|
/** `shared` — one value shared by one link: a note, a list, a board. Declared with `storage` (no new permission).
|
|
420
449
|
* The owner creates it; anyone with the link reads it — signed out, or without your app added; and if the owner turned
|
|
421
450
|
* `edit` on, any signed-in person with the link can write. The owner can change that or take the link back at any time.
|
|
@@ -427,16 +456,18 @@ interface SharedApi {
|
|
|
427
456
|
/** Share a value. `edit` lets people with the link write (default read-only). Rejects with `quota` — `err.scope` `'shared'`
|
|
428
457
|
* at 100 shared values, `'account'` when their Fave1 storage is full. */
|
|
429
458
|
create<T = unknown>(value: T, opts?: { edit?: boolean }): Promise<Shared<T>>;
|
|
430
|
-
/** Read by link. `null` when it's gone or the link is wrong — never throws for that. Works signed out.
|
|
459
|
+
/** Read by link. `null` when it's gone or the link is wrong — never throws for that. Works signed out.
|
|
460
|
+
* Reads are limited per network (`rate`) — read again when your page comes back into view, not in a tight loop. */
|
|
431
461
|
get<T = unknown>(ref: string): Promise<Shared<T> | null>;
|
|
432
462
|
/** Write by link — as the owner, or as a signed-in person when `edit` is on (`denied` otherwise, `signed-out` with no account).
|
|
433
463
|
* Pass `base` (the `v` you read) and, if someone wrote in between, it rejects with `conflict` carrying `err.current`
|
|
434
|
-
* (the row now
|
|
464
|
+
* (the row now — `value` and `v` are the server's; `owner` · `editor` are `null` and `updatedAt` is only roughly right there):
|
|
465
|
+
* merge, then call `set()` again with its `v`. Without `base` it overwrites. */
|
|
435
466
|
set<T = unknown>(ref: string, value: T, opts?: { base?: number }): Promise<{ v: number }>;
|
|
436
467
|
/** Owner only: let people with the link write, or stop that. Takes the `id` or the `ref`. */
|
|
437
468
|
access(idOrRef: string, opts: { edit: boolean }): Promise<void>;
|
|
438
|
-
/** Everything this person shares from your app — with the keys, so you can show the links again. */
|
|
439
|
-
list(): Promise<
|
|
469
|
+
/** Everything this person shares from your app — with the keys, so you can show the links again. No values: `get(ref)` one to read it. */
|
|
470
|
+
list(): Promise<SharedLink[]>;
|
|
440
471
|
/** Owner only: take the link back. Whoever has it gets `null` from then on. Resolves even if it was already gone. */
|
|
441
472
|
delete(idOrRef: string): Promise<void>;
|
|
442
473
|
}
|
|
@@ -449,7 +480,7 @@ interface StickerInfo {
|
|
|
449
480
|
name: string;
|
|
450
481
|
/** The picture's file id — it's one of your `files` too (`files.list()` shows it as `Sticker · <name>`). Deleting that file takes the sticker back. */
|
|
451
482
|
file: string;
|
|
452
|
-
/** ISO times it was first given and last changed. */
|
|
483
|
+
/** ISO times it was first given and last changed (`give()` on an id you already gave answers with now for both — `list()` keeps the first). */
|
|
453
484
|
createdAt: string;
|
|
454
485
|
updatedAt: string;
|
|
455
486
|
}
|
|
@@ -462,7 +493,8 @@ interface StickersApi {
|
|
|
462
493
|
/** Give a sticker. `image` is a Blob, a canvas or an ImageBitmap — Fave1 fits it in 512 × 512 and keeps it transparent (a PNG with
|
|
463
494
|
* see-through edges looks best). Giving the same `id` again swaps the picture and name and keeps it where they stuck it.
|
|
464
495
|
* `id` is up to 32 lowercase letters, digits and dashes; `name` 1 to 40 characters (`invalid` otherwise). Up to 24 stickers per person
|
|
465
|
-
* from your app — past that, `quota` with `err.scope` `'stickers'`.
|
|
496
|
+
* from your app — past that, `quota` with `err.scope` `'stickers'`. The fitted picture is up to 1 MB (`too-large`). A canvas with another
|
|
497
|
+
* site's picture drawn on it can't be read (`invalid`). */
|
|
466
498
|
give(sticker: { id: string; name: string; image: Blob | HTMLCanvasElement | ImageBitmap }): Promise<StickerInfo>;
|
|
467
499
|
/** What your app gave this person, newest first. */
|
|
468
500
|
list(): Promise<StickerInfo[]>;
|
|
@@ -479,7 +511,8 @@ interface StickersApi {
|
|
|
479
511
|
* Beyond text: pictures (`{ type: 'image', image }`), answers in a shape you choose (`json` → `data`) and tools the model can
|
|
480
512
|
* call (`tools` → `calls`, or let `ctx.ai.run()` call them for you until it's done). */
|
|
481
513
|
/** A slice of JSON Schema — `type` (one, or one plus `'null'`), `properties`, `required`, `items`, `enum`, `description`, and the
|
|
482
|
-
* checks `minimum` · `maximum` · `minLength` · `maxLength` · `minItems` · `maxItems`. Up to 6 levels
|
|
514
|
+
* checks `minimum` · `maximum` · `minLength` · `maxLength` · `minItems` · `maxItems`. Up to 6 levels of nesting below the top, 16,000 characters
|
|
515
|
+
* as JSON. Objects never get extra keys. */
|
|
483
516
|
interface AiSchema {
|
|
484
517
|
type: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | ['object' | 'array' | 'string' | 'number' | 'integer' | 'boolean', 'null'];
|
|
485
518
|
description?: string;
|
|
@@ -502,24 +535,26 @@ type AiPart =
|
|
|
502
535
|
/** In an `assistant` turn — what the model needs back next time (its reasoning, sealed). Opaque — keep it exactly as `result.message` gave it. */
|
|
503
536
|
| { type: 'state'; state: string };
|
|
504
537
|
/** A plain string is shorthand for one text part. */
|
|
538
|
+
/** Up to 64 parts in one turn. */
|
|
505
539
|
interface AiMessage { role: 'user' | 'assistant'; content: string | (AiPart | string)[] }
|
|
506
540
|
interface AiTool {
|
|
507
541
|
/** Letters, digits, `_` and `-`, up to 64 — unique in the call. */
|
|
508
542
|
name: string;
|
|
509
|
-
/** When to call it — the model reads this to decide. */
|
|
543
|
+
/** When to call it — the model reads this to decide. Up to 2,000 characters. */
|
|
510
544
|
description: string;
|
|
511
545
|
/** What it takes — an object schema. */
|
|
512
546
|
input: AiSchema;
|
|
513
547
|
}
|
|
514
548
|
interface AiOptions {
|
|
515
|
-
/** One string is one user turn. Otherwise turns alternate, first and last are `'user'`. Up to 100 turns, 120,000 characters
|
|
549
|
+
/** One string is one user turn. Otherwise turns alternate, first and last are `'user'`. Up to 100 turns, and 120,000 characters for
|
|
550
|
+
* everything the call sends — messages, `system`, your `json` schema and your tool definitions together. */
|
|
516
551
|
messages: string | AiMessage[];
|
|
517
552
|
/** Instructions for the model — up to 20,000 characters. */
|
|
518
553
|
system?: string;
|
|
519
554
|
/** `'fast'` (default) — quick and cheap, right for most features. `'smart'` — slower, for harder thinking. Fave1 picks the
|
|
520
555
|
* model on whichever provider the person uses; you don't name one. */
|
|
521
556
|
model?: 'fast' | 'smart';
|
|
522
|
-
/** Cap on the answer's length in tokens — 1 to 4,096 (default 1,024). Lower is cheaper for them. */
|
|
557
|
+
/** Cap on the answer's length in tokens — 1 to 4,096 (default 1,024; more is lowered to 4,096). Lower is cheaper for them. */
|
|
523
558
|
maxTokens?: number;
|
|
524
559
|
/** Answer in this shape — `result.data` is the parsed value, already checked against the schema. */
|
|
525
560
|
json?: AiSchema;
|
|
@@ -549,7 +584,7 @@ interface AiResult {
|
|
|
549
584
|
message: AiMessage;
|
|
550
585
|
/** Tokens — `cached` is the part of `input` read from the provider's cache (cheaper). */
|
|
551
586
|
usage: { input: number; output: number; cached: number };
|
|
552
|
-
/** `'anthropic' | 'openai' | 'google' | 'xai'`, or `'mock'` in a DEV build
|
|
587
|
+
/** `'anthropic' | 'openai' | 'google' | 'xai'`, or `'mock'` · `'mock2'` (the two sandbox AIs) in a DEV build. */
|
|
553
588
|
provider: string;
|
|
554
589
|
model: string;
|
|
555
590
|
/** True for the stand-in answer a DEV build gets when you have no key or credits — the whole flow runs, nothing is charged.
|
|
@@ -569,7 +604,7 @@ interface AiRunOptions extends Omit<AiOptions, 'tools'> {
|
|
|
569
604
|
tools: AiRunTool[];
|
|
570
605
|
/** On by default here — every step resends the conversation so far. `false` turns it off. */
|
|
571
606
|
cache?: boolean;
|
|
572
|
-
/** Calls to the model at most — 1 to 10 (default 6). Each step is one call and counts against their limit. */
|
|
607
|
+
/** Calls to the model at most — 1 to 10 (default 6; more is lowered to 10). Each step is one call and counts against their limit. */
|
|
573
608
|
maxSteps?: number;
|
|
574
609
|
/** After each round of tool calls. */
|
|
575
610
|
onStep?(step: { step: number; calls: AiToolCall[]; results: AiPart[]; text: string }): void;
|
|
@@ -621,9 +656,10 @@ interface Ai {
|
|
|
621
656
|
* let your app use them yet: `choices({ ask: true })` shows Fave1's one-time OK and resolves with the list (unchanged if they say no).
|
|
622
657
|
* Where AI can't be used right now, `current` is `null`. In the sandbox you get two mock AIs to build with. */
|
|
623
658
|
choices(options?: { ask?: boolean }): Promise<AiChoices>;
|
|
624
|
-
/** Text to a voice. Pick a voice from `voices()` and that voice's company speaks it
|
|
625
|
-
*
|
|
626
|
-
*
|
|
659
|
+
/** Text to a voice. Pick a voice from `voices()` and that voice's company speaks it, on the person's Fave1 credits — whatever AI they
|
|
660
|
+
* use for text. **Your manifest needs `"voice": true`** (live, without it every call rejects `no-voice` · 'undeclared'; a DEV build lets it
|
|
661
|
+
* through, so set it before you submit). A voice app runs on Fave1 AI only, `chat()` included. Same Allow, limit and rules as `chat()`.
|
|
662
|
+
* Up to 1,200 characters; speak a song or a story line by line. A string is the text: `ctx.ai.speak('Hey you')`. */
|
|
627
663
|
speak(text: string | AiSpeakOptions, options?: Omit<AiSpeakOptions, 'text'>): Promise<AiSpeech>;
|
|
628
664
|
/** The eighteen voices — six tones each from OpenAI, Gemini and Grok — and whether each can speak for this person right now.
|
|
629
665
|
* Show them, let the person pick, pass the `id` to `speak()`. Where AI can't be used yet every voice is `ready: false`;
|
|
@@ -642,9 +678,9 @@ interface AiVoice {
|
|
|
642
678
|
tone: AiVoiceTone;
|
|
643
679
|
/** Would speak right now. */
|
|
644
680
|
ready: boolean;
|
|
645
|
-
/** Who pays: `
|
|
646
|
-
pays: '
|
|
647
|
-
/**
|
|
681
|
+
/** Who pays: `credits` — their Fave1 credits (voices always run on credits) · `null` — not ready. */
|
|
682
|
+
pays: 'credits' | null;
|
|
683
|
+
/** About how many Fave1 credits 1,000 characters cost. `null` when it isn't ready. */
|
|
648
684
|
credits: number | null;
|
|
649
685
|
}
|
|
650
686
|
interface AiSpeakOptions {
|
|
@@ -655,7 +691,7 @@ interface AiSpeakOptions {
|
|
|
655
691
|
style?: string;
|
|
656
692
|
/** 0.5 – 2, default 1. */
|
|
657
693
|
speed?: number;
|
|
658
|
-
/** With a tone: which company to use — `openai` · `google` · `xai
|
|
694
|
+
/** With a tone: which company to use — `openai` · `google` · `xai` (anything else rejects `no-voice` · 'choice'). A voice `id` already names its company. */
|
|
659
695
|
ai?: string;
|
|
660
696
|
signal?: AbortSignal;
|
|
661
697
|
}
|
|
@@ -668,8 +704,8 @@ interface AiSpeech {
|
|
|
668
704
|
voice: string;
|
|
669
705
|
/** Which company spoke it — `openai` · `google` · `xai`, `mock` in the sandbox. */
|
|
670
706
|
provider: string | null;
|
|
671
|
-
/** Who paid — their
|
|
672
|
-
paid: '
|
|
707
|
+
/** Who paid — their Fave1 `credits`. `null` in the sandbox. */
|
|
708
|
+
paid: 'credits' | null;
|
|
673
709
|
/** True in the sandbox — a short tone the length of your text. */
|
|
674
710
|
mock: boolean;
|
|
675
711
|
}
|
|
@@ -683,8 +719,8 @@ interface CameraFeed {
|
|
|
683
719
|
}
|
|
684
720
|
interface Camera {
|
|
685
721
|
/** Turns their camera on — Fave1 asks first (once each time your app opens), then the browser asks for that site. Video only.
|
|
686
|
-
* Rejects `denied` · `blocked` · `unavailable` · `busy`. Call it from a tap, not at launch. */
|
|
687
|
-
open(options?: { facing?: 'user' | 'environment'; width?: number; height?: number }): Promise<CameraFeed>;
|
|
722
|
+
* Rejects `denied` (`err.reason` 'not-now' · 'browser' · 'closed' if it lands after your app closed) · `blocked` · `unavailable` · `busy`. Call it from a tap, not at launch. */
|
|
723
|
+
open(options?: { facing?: 'user' | 'environment'; /** Ideal size, 64–1920 (default 720 on the long side); the browser picks the nearest. */ width?: number; height?: number }): Promise<CameraFeed>;
|
|
688
724
|
/** Every camera your app opened goes off. Closing your app does this too. */
|
|
689
725
|
close(): void;
|
|
690
726
|
readonly active: boolean;
|
|
@@ -703,7 +739,7 @@ interface MicFeed {
|
|
|
703
739
|
interface Mic {
|
|
704
740
|
/** Turns their microphone on — Fave1 asks first (once each time your app opens), then the browser asks for that site. Sound only.
|
|
705
741
|
* `echo` · `noise` · `gain` (all default true) are the browser's echo cancelling, noise suppression and automatic level — turn them off for
|
|
706
|
-
* someone on earphones. Rejects `denied` · `blocked` · `unavailable` · `busy`. Call it from a tap, not at launch. */
|
|
742
|
+
* someone on earphones. Rejects `denied` (`err.reason` 'not-now' · 'browser' · 'closed' if it lands after your app closed) · `blocked` · `unavailable` · `busy`. Call it from a tap, not at launch. */
|
|
707
743
|
open(options?: { echo?: boolean; noise?: boolean; gain?: boolean }): Promise<MicFeed>;
|
|
708
744
|
/** Every microphone your app opened goes off. Closing your app does this too. */
|
|
709
745
|
close(): void;
|
|
@@ -718,24 +754,50 @@ interface PurchaseItem { id: string; name: string; qty: number; credits: number
|
|
|
718
754
|
/** What `buy()` and `pending()` give back. `id` is the receipt — write it next to the thing you deliver. */
|
|
719
755
|
interface PurchaseReceipt { id: string; item: string; name: string; qty: number; credits: number }
|
|
720
756
|
interface Purchases {
|
|
721
|
-
/** Your items, in your order, and their credit balance — `null` when signed out,
|
|
757
|
+
/** Your items, in your order, and their credit balance — `null` when signed out, on a site your app isn't allowed on yet, and in a DEV build. */
|
|
722
758
|
items(): Promise<{ items: PurchaseItem[]; balance: number | null }>;
|
|
723
759
|
/** Shows Fave1's confirm line — the Buy button is Fave1's, with Fave1's price on it. Resolves with a receipt once the credits
|
|
724
760
|
* are taken. Put the thing in your storage **with the receipt id in the same write**, then `finish()`. */
|
|
725
761
|
buy(item: string): Promise<PurchaseReceipt>;
|
|
726
762
|
/** Commits a receipt after you delivered. `'returned'` — 7 days passed without `finish()`, Fave1 already gave the credits back. */
|
|
763
|
+
/** `invalid` if `receipt` isn't a receipt id from `buy()` or `pending()`. */
|
|
727
764
|
finish(receipt: string): Promise<'done' | 'returned'>;
|
|
728
|
-
/** Receipts paid for but not finished — call on open, deliver what your storage doesn't show yet, then `finish()`.
|
|
765
|
+
/** Receipts paid for but not finished — call on open, deliver what your storage doesn't show yet, then `finish()`.
|
|
766
|
+
* In a DEV build `pending()` and `finish()` stay in this browser (`[]` and `not-found` until a sandbox buy), while `items()` and `buy()`
|
|
767
|
+
* still ask Fave1 — so they say `not-yet` until in-app purchases open to your app. */
|
|
729
768
|
pending(): Promise<PurchaseReceipt[]>;
|
|
730
769
|
}
|
|
731
770
|
|
|
771
|
+
/** What `notify.send()` gives back — `id` is yours when you passed one, `at` (ISO time) is when it shows up. */
|
|
772
|
+
interface NotifyReceipt { id: string; at: string }
|
|
773
|
+
interface Notify {
|
|
774
|
+
/** Sends **this person** a notification from your app: a number on your icon and on their avatar, a row in their Fave1 notifications.
|
|
775
|
+
* It is for things they asked for themselves — a reminder they set, a timer they started. Never news, offers or "come back".
|
|
776
|
+
* `title` 1–80 characters, `body` up to 240, plain text. `at` (a `Date`, a timestamp or an ISO string, up to a year ahead) schedules it;
|
|
777
|
+
* leave it out to send now. `id` (letters, digits, `_ . : -`, up to 64) names it: sending the same `id` again replaces that one, and
|
|
778
|
+
* `cancel(id)` takes it back. `open` (up to 200 characters) comes back as `ctx.notify.opened` when they open your app from the row.
|
|
779
|
+
* The first call shows Fave1's "Let <app> send you reminders?" line — once per app, not per site. "Not now" rejects `cancelled`. At home, or
|
|
780
|
+
* on a site that already allowed your app, that turns your notifications off until they turn them on in Settings › Notifications
|
|
781
|
+
* (after that every call rejects `denied`); anywhere else it holds for this visit and the next visit asks again.
|
|
782
|
+
* Five a day per person (`rate`, `err.scope` 'day'), fifty waiting at once (`err.scope` 'pending'). No manifest permission. */
|
|
783
|
+
send(note: { title: string; body?: string; at?: Date | number | string; id?: string; open?: string }): Promise<NotifyReceipt>;
|
|
784
|
+
/** Takes one back by `id` — one still waiting, or one already delivered. `true` if there was one. */
|
|
785
|
+
cancel(id: string): Promise<boolean>;
|
|
786
|
+
/** `'on'` — they said yes. `'ask'` — the next `send()` asks. `'off'` — they said no or turned it off in Settings: don't call `send()`,
|
|
787
|
+
* point them at Settings › Notifications instead. Never asks anything itself. */
|
|
788
|
+
status(): Promise<'on' | 'ask' | 'off' | 'signed-out' | 'not-installed'>;
|
|
789
|
+
/** The `open` value of the notification that opened your app this time — read it in `onLaunch` and go there. `null` otherwise. */
|
|
790
|
+
readonly opened: string | null;
|
|
791
|
+
}
|
|
792
|
+
|
|
732
793
|
interface Ctx {
|
|
733
794
|
ui: Ui;
|
|
734
795
|
/** Where you're running: `'page'` — on someone's site, opened from the bookmarklet;
|
|
735
796
|
* `'app'` — at your own `<id>.fave1.app`, opened from My Fave1. Same bundle, split screens. */
|
|
736
797
|
surface: 'page' | 'app';
|
|
737
|
-
/** The language this person uses — `'en'`, `'ko'`, `'pt-BR'`… (what they picked in Fave1 Settings, else their browser's)
|
|
738
|
-
*
|
|
798
|
+
/** The language this person uses — `'en'`, `'ko'`, `'pt-BR'`… (what they picked in Fave1 Settings, else their browser's), as far as
|
|
799
|
+
* Fave1 itself speaks it: a language Fave1 doesn't offer yet comes back as `'en'` (today Fave1 offers English and Korean).
|
|
800
|
+
* Not the page's language — that's `page.lang` — except on Fave1's own pages at www.fave1.com, where it's that page's language. */
|
|
739
801
|
readonly locale: string;
|
|
740
802
|
/** Your app's text in their language, from `locales/<language>.json` (shipped by `npm run submit`). `{name}` fills from `vars`;
|
|
741
803
|
* pass `{ count }` to pick `key_one` · `key_other` …. Falls back to their base language, then `en.json`, then the key itself. */
|
|
@@ -754,6 +816,7 @@ interface Ctx {
|
|
|
754
816
|
* Big things go in `files`; keep the index and settings here. */
|
|
755
817
|
storage: {
|
|
756
818
|
get(key: string): Promise<unknown>;
|
|
819
|
+
/** Any JSON value except `null` (`invalid` — use `delete()` to clear a key). */
|
|
757
820
|
set(key: string, value: unknown): Promise<void>;
|
|
758
821
|
delete(key: string): Promise<void>;
|
|
759
822
|
list(): Promise<string[]>;
|
|
@@ -767,8 +830,9 @@ interface Ctx {
|
|
|
767
830
|
* your code can't change it), `null` at home. Read it with `get(key)`; trim or edit it with `set` · `delete` like any value.
|
|
768
831
|
* An item is JSON up to 4 KB (`too-large`); when the list passes 64 KB the oldest rows drop off. If `key` already holds
|
|
769
832
|
* something that isn't a list, `invalid`. Because it only adds and can't read, it asks once for your app — not once per
|
|
770
|
-
* site: "Keep your <what> in <app>?" (`opts.what`,
|
|
771
|
-
*
|
|
833
|
+
* site: "Keep your <what> in <app>?" (`opts.what`, up to 24 letters and spaces — anything else falls back to the default `history`).
|
|
834
|
+
* `cancelled` if they say not now. A site that already allowed your app never asks. `quota` when their storage or your app's share is full.
|
|
835
|
+
* Never asks at home; `site` is `'local'` for a file opened from their computer. */
|
|
772
836
|
append(key: string, item: unknown, opts?: { what?: string }): Promise<void>;
|
|
773
837
|
/** Forget the once-for-every-site OK that `append()` asked for — the next `append()` on a site asks again (call it when
|
|
774
838
|
* someone turns your history off). Keeps the data. */
|
|
@@ -780,8 +844,9 @@ interface Ctx {
|
|
|
780
844
|
/** One small settings object for this app — a pen color, a switch, the last tab. **No one-time OK, ever**: it opens on any
|
|
781
845
|
* site, even one that never said yes, so your app can open with the person's own settings everywhere. The price is that any
|
|
782
846
|
* page your app opens on can read and change it — **never put anything private here.** Up to 2 KB as JSON (`too-large`),
|
|
783
|
-
* one plain object (`invalid` otherwise); `set(null)` clears it. `get()` never asks and never waits for a tap: it's
|
|
784
|
-
*
|
|
847
|
+
* one plain object (`invalid` otherwise); `set(null)` clears it. `get()` never asks and never waits for a tap: it's the value as it was
|
|
848
|
+
* when your app opened (plus what this tab `set()` since) — a change made in another tab or on another site shows up the next time your
|
|
849
|
+
* app opens. It's `null` when nobody is signed in, before the first `set()`, or if Fave1 couldn't be reached — keep a local copy and open with that.
|
|
785
850
|
* It rejects with `denied` when `storage` isn't declared or was switched off — check `ctx.can('storage')` first. `set()` needs a signed-in person (`signed-out` · `denied` otherwise). Not counted in `usage()`.
|
|
786
851
|
* Cleared with the rest when they clear your app in Fave1 Settings › Storage. A DEV build's sandbox keeps it in this browser. */
|
|
787
852
|
prefs: {
|
|
@@ -803,7 +868,7 @@ interface Ctx {
|
|
|
803
868
|
/** In-app purchases paid with Fave1 credits — declared with `storage`. **Not open to your app yet**: every call rejects with
|
|
804
869
|
* `not-yet` until Fave1 opens it (see /docs/ctx-purchases). */
|
|
805
870
|
purchases: Purchases;
|
|
806
|
-
/** Is this permission live right now? `pub` also
|
|
871
|
+
/** Is this permission live right now? `storage` and `pub` also need a signed-in person (and `pub` one who hasn't switched it off). */
|
|
807
872
|
can(permission: Permission): boolean;
|
|
808
873
|
/** Opens this app's permission screen in Fave1 settings. Only the person can turn things on. */
|
|
809
874
|
perms: { open(): void };
|
|
@@ -820,11 +885,14 @@ interface Ctx {
|
|
|
820
885
|
camera: Camera;
|
|
821
886
|
/** Their microphone, live, while your app is open — `mic` permission, separate from the camera. The sound stays on their page. */
|
|
822
887
|
mic: Mic;
|
|
888
|
+
/** Notifications to this person from your app — reminders they set. Fave1 asks them once, the first time you send. */
|
|
889
|
+
notify: Notify;
|
|
823
890
|
/** Your app's settings, edited in the developer console (Config tab) and loaded before `onLaunch` — a plain JSON object.
|
|
824
891
|
* It ships without review, so it holds **values, not code** and nothing secret: every person who opens the app receives it.
|
|
825
892
|
* While you build, `fave1 dev` serves the `config.json` next to your manifest. Missing or unreachable → `{}`. */
|
|
826
893
|
readonly config: Readonly<Record<string, unknown>>;
|
|
827
|
-
/** Who is here. `signedIn` is known at once — true when someone's signed in to Fave1.
|
|
894
|
+
/** Who is here. `signedIn` is known at once — true when someone's signed in to Fave1. At home, an app that declares only `page.*` or
|
|
895
|
+
* `clipboard` never asks the account, so there `signedIn` is `false`, `plus` `'free'` and `tier` `null` even for someone signed in. `id` is this person's id **as your app sees it** — opaque, different in every app,
|
|
828
896
|
* the same value as `me` rows in ctx.pub — and only for apps that declare `storage` or `pub`; undefined until the runtime
|
|
829
897
|
* has asked the server, when nobody is signed in, and in a DEV build's sandbox. `await ctx.user.load()` waits for that answer.
|
|
830
898
|
* On someone else's site it also stays undefined until that site has said yes to your app (`granted`) — it fills in after the
|
|
@@ -841,7 +909,7 @@ interface Ctx {
|
|
|
841
909
|
readonly tier?: 'free' | 'basic' | 'plus' | 'ultra' | null;
|
|
842
910
|
readonly id?: string;
|
|
843
911
|
readonly granted?: boolean;
|
|
844
|
-
load(): Promise<{ readonly signedIn: boolean; readonly id?: string; readonly granted?: boolean }>;
|
|
912
|
+
load(): Promise<{ readonly signedIn: boolean; readonly id?: string; readonly granted?: boolean; readonly plus?: 'plus' | 'free'; readonly tier?: 'free' | 'basic' | 'plus' | 'ultra' | null }>;
|
|
845
913
|
};
|
|
846
914
|
}
|
|
847
915
|
|
|
@@ -76,8 +76,9 @@ An exported `FAVE1_KEY` in your terminal or CI wins over `.env.local`, which win
|
|
|
76
76
|
over `.env`.
|
|
77
77
|
|
|
78
78
|
**Uploading does not make it public.** The build lands in **Versions** as Ready;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
run the pre-check on it there, then press **Submit for review** at the top of the
|
|
80
|
+
app in the console. That split is deliberate — Submit waits until your listing is
|
|
81
|
+
complete.
|
|
81
82
|
|
|
82
83
|
Next to each build in Versions, **Test** gives you the same kind of link — Safari,
|
|
83
84
|
an iPad, a teammate's laptop. While a build is still Ready, `npm run submit` with
|