@flipstream/sdk 0.12.0 → 0.14.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/CHANGELOG.md +65 -0
- package/README.md +128 -30
- package/dist/api/backend.d.ts +18 -3
- package/dist/api/backend.js +33 -6
- package/dist/api/backend.js.map +1 -1
- package/dist/api/credentials.js +4 -4
- package/dist/api/credentials.js.map +1 -1
- package/dist/api/datasets.js +30 -50
- package/dist/api/datasets.js.map +1 -1
- package/dist/api/handoff.d.ts +1 -1
- package/dist/api/handoff.js +7 -0
- package/dist/api/handoff.js.map +1 -1
- package/dist/api/log.d.ts +4 -4
- package/dist/api/log.js +23 -42
- package/dist/api/log.js.map +1 -1
- package/dist/api/me.d.ts +5 -3
- package/dist/api/me.js +5 -4
- package/dist/api/me.js.map +1 -1
- package/dist/api/members.d.ts +40 -17
- package/dist/api/members.js +66 -29
- package/dist/api/members.js.map +1 -1
- package/dist/api/ownRecord.d.ts +46 -0
- package/dist/api/ownRecord.js +57 -0
- package/dist/api/ownRecord.js.map +1 -0
- package/dist/api/refusal.d.ts +14 -0
- package/dist/api/refusal.js +23 -0
- package/dist/api/refusal.js.map +1 -0
- package/dist/api/wallet.d.ts +2 -1
- package/dist/api/wallet.js +18 -21
- package/dist/api/wallet.js.map +1 -1
- package/dist/api/workspaces.d.ts +14 -9
- package/dist/api/workspaces.js +21 -15
- package/dist/api/workspaces.js.map +1 -1
- package/dist/auth/discovery.js +3 -1
- package/dist/auth/discovery.js.map +1 -1
- package/dist/core/call.d.ts +12 -2
- package/dist/core/call.js +5 -2
- package/dist/core/call.js.map +1 -1
- package/dist/core/identify.d.ts +65 -14
- package/dist/core/identify.js +69 -27
- package/dist/core/identify.js.map +1 -1
- package/dist/core/inPlaceOf.d.ts +6 -0
- package/dist/core/inPlaceOf.js +17 -0
- package/dist/core/inPlaceOf.js.map +1 -0
- package/dist/core/invalid.d.ts +32 -6
- package/dist/core/invalid.js +36 -17
- package/dist/core/invalid.js.map +1 -1
- package/dist/core/notFound.d.ts +2 -2
- package/dist/core/notFound.js.map +1 -1
- package/dist/core/read.d.ts +6 -3
- package/dist/core/read.js +5 -6
- package/dist/core/read.js.map +1 -1
- package/dist/core/result.d.ts +16 -8
- package/dist/core/result.js +1 -0
- package/dist/core/result.js.map +1 -1
- package/dist/core/shared.d.ts +43 -0
- package/dist/core/shared.js +178 -0
- package/dist/core/shared.js.map +1 -0
- package/dist/core/signal.d.ts +12 -0
- package/dist/core/signal.js +25 -0
- package/dist/core/signal.js.map +1 -0
- package/dist/flipstream.d.ts +160 -22
- package/dist/flipstream.js +207 -81
- package/dist/flipstream.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/node/clientSecret.js +2 -1
- package/dist/node/clientSecret.js.map +1 -1
- package/dist/node/keychainChild.js +60 -25
- package/dist/node/keychainChild.js.map +1 -1
- package/dist/node/keychainError.d.ts +4 -1
- package/dist/node/keychainError.js.map +1 -1
- package/dist/node/keychainStore.js +42 -8
- package/dist/node/keychainStore.js.map +1 -1
- package/dist/node/loopback.d.ts +5 -2
- package/dist/node/loopback.js +28 -3
- package/dist/node/loopback.js.map +1 -1
- package/dist/node/session.js +11 -5
- package/dist/node/session.js.map +1 -1
- package/dist/query/query.d.ts +52 -8
- package/dist/query/query.js +133 -19
- package/dist/query/query.js.map +1 -1
- package/dist/version.gen.js +1 -1
- package/docs/admin.md +108 -4
- package/docs/node-sign-in.md +11 -5
- package/package.json +1 -1
package/docs/node-sign-in.md
CHANGED
|
@@ -42,7 +42,9 @@ if (!signedIn.ok) throw new Error(`sign-in failed: ${signedIn.error.kind}`)
|
|
|
42
42
|
sign-in's own address, then its state. A paste that fails ends the sign-in with its reason, such
|
|
43
43
|
as `wrong_state`, and nothing is exchanged.
|
|
44
44
|
- **A reader that rejects** ends the sign-in as `paste_failed`. `readPasted` is called once, just
|
|
45
|
-
after `open`.
|
|
45
|
+
after `open`. One given that isn't a function is a `TypeError` naming it, before any port opens,
|
|
46
|
+
as is an `open` that isn't one or a `signal` with no `aborted` or no `addEventListener` method,
|
|
47
|
+
whatever `timeoutMs`.
|
|
46
48
|
- **`timeoutMs` is the time from opening the browser until a redirect arrives,** on the port or
|
|
47
49
|
pasted: 5 minutes when left out or `null`. Opening the port and the code's exchange (with its own
|
|
48
50
|
deadline) aren't in it. It's taken in whole ms, rounded down, up to 2147483647, as a call's
|
|
@@ -205,7 +207,11 @@ if (signedOut.cleared === 'failed') {
|
|
|
205
207
|
reboot;
|
|
206
208
|
- `refused`: any other refusal, in the keychain's own words;
|
|
207
209
|
- `timeout`: the step took longer than its `timeoutMs`;
|
|
208
|
-
- `helper`: the helper process couldn't start, or ended before it answered (`exit` says how)
|
|
210
|
+
- `helper`: the helper process couldn't start, or ended before it answered (`exit` says how).
|
|
211
|
+
One that couldn't start for want of file descriptors (`EMFILE`, your process's own limit, or
|
|
212
|
+
`ENFILE`, the whole system's table) has the spawn's own error, with that `code`, as the
|
|
213
|
+
error's `cause`, when Node reports it in time: a hint for your logs, not a promise, so never
|
|
214
|
+
let your app depend on it;
|
|
209
215
|
- `missing`: `@napi-rs/keyring` isn't installed, and the message names it;
|
|
210
216
|
- `too-long`: the tokens are over 2,560 bytes, so nothing was saved.
|
|
211
217
|
|
|
@@ -240,9 +246,9 @@ if (signedOut.cleared === 'failed') {
|
|
|
240
246
|
the same 30 s. The helper never keeps your app running. It's `process.execPath`, so it needs a
|
|
241
247
|
Node that runs a script: not an Electron app (without `ELECTRON_RUN_AS_NODE`), a Node
|
|
242
248
|
single-executable application, or a compiled Bun binary. A bundle must keep `keychainChild.js`
|
|
243
|
-
beside the module, with
|
|
244
|
-
|
|
245
|
-
|
|
249
|
+
beside the module, with `@napi-rs/keyring` resolvable from there, and `import.meta.url` set.
|
|
250
|
+
Where it doesn't (an esbuild CommonJS bundle, say), only the keychain's steps fail, as
|
|
251
|
+
`store_failed`.
|
|
246
252
|
- Through `session.token()`, a keychain read that takes longer than the caller's wait, 15 s
|
|
247
253
|
unless you pass `createSession({ waitMs })`, is `unavailable`. On macOS a read can wait on
|
|
248
254
|
an access dialog, every time, for an item another program saved: give `waitMs` as long as
|