@tempoxyz/id 0.0.0-pr-670.sha-b9e68f1 → 0.0.0-pr-838.sha-e7626ff

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.
@@ -4,9 +4,9 @@ import {
4
4
  name,
5
5
  parseName,
6
6
  pending
7
- } from "./chunk-BACPPQF2.js";
7
+ } from "./chunk-EKCODWTC.js";
8
8
  import "./chunk-FWGE6HXK.js";
9
- import "./chunk-G5KDETLX.js";
9
+ import "./chunk-PL4IO6RR.js";
10
10
  import "./chunk-MLKGABMK.js";
11
11
  export {
12
12
  attach,
@@ -6,7 +6,7 @@ import {
6
6
  import {
7
7
  PendingNotFoundError,
8
8
  RequestError
9
- } from "./chunk-G5KDETLX.js";
9
+ } from "./chunk-PL4IO6RR.js";
10
10
  import "./chunk-MLKGABMK.js";
11
11
 
12
12
  // ../../accounts/src/internal/handlers/Backend.ts
@@ -5,8 +5,8 @@ import {
5
5
  machines,
6
6
  prompt,
7
7
  waiting
8
- } from "./chunk-WUE2AEEH.js";
9
- import "./chunk-G5KDETLX.js";
8
+ } from "./chunk-YNXICVFC.js";
9
+ import "./chunk-PL4IO6RR.js";
10
10
  import "./chunk-MLKGABMK.js";
11
11
  export {
12
12
  create,
@@ -15,7 +15,7 @@ import {
15
15
  tempoAccount,
16
16
  tokens,
17
17
  user
18
- } from "./chunk-G5KDETLX.js";
18
+ } from "./chunk-PL4IO6RR.js";
19
19
  import {
20
20
  __export
21
21
  } from "./chunk-MLKGABMK.js";
@@ -2,7 +2,7 @@ import {
2
2
  create,
3
3
  prompt,
4
4
  waiting
5
- } from "./chunk-WUE2AEEH.js";
5
+ } from "./chunk-YNXICVFC.js";
6
6
  import {
7
7
  authPath,
8
8
  basePath
@@ -30,7 +30,7 @@ import {
30
30
  url,
31
31
  user,
32
32
  watchPopup
33
- } from "./chunk-G5KDETLX.js";
33
+ } from "./chunk-PL4IO6RR.js";
34
34
  import {
35
35
  __export
36
36
  } from "./chunk-MLKGABMK.js";
@@ -9,7 +9,7 @@ import {
9
9
  from,
10
10
  json,
11
11
  post
12
- } from "./chunk-G5KDETLX.js";
12
+ } from "./chunk-PL4IO6RR.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-MLKGABMK.js";
@@ -2,14 +2,14 @@ import {
2
2
  bind,
3
3
  from,
4
4
  passkey_exports
5
- } from "./chunk-6JGKPDPD.js";
5
+ } from "./chunk-AT4QGV7S.js";
6
6
  import {
7
7
  dialog_exports,
8
8
  redirect_exports
9
- } from "./chunk-34VRWCHW.js";
9
+ } from "./chunk-CYNDDGX7.js";
10
10
  import {
11
11
  connections_exports
12
- } from "./chunk-BACPPQF2.js";
12
+ } from "./chunk-EKCODWTC.js";
13
13
  import {
14
14
  AccessKeyRequiredError,
15
15
  AccessKey_exports,
@@ -47,7 +47,7 @@ import {
47
47
  unlisted,
48
48
  user,
49
49
  withoutKey
50
- } from "./chunk-G5KDETLX.js";
50
+ } from "./chunk-PL4IO6RR.js";
51
51
  import {
52
52
  __export
53
53
  } from "./chunk-MLKGABMK.js";
@@ -304,7 +304,7 @@ async function request(auth2, options) {
304
304
  if (!(error2 instanceof RequestError) || transient(error2)) throw error2;
305
305
  if (error2.code === "authorization_pending" || error2.code === "slow_down")
306
306
  return error2.code;
307
- if (error2.code in messages)
307
+ if (error2.code in messages && error2.reason === void 0)
308
308
  throw new RequestError({
309
309
  code: error2.code,
310
310
  message: messages[error2.code],
@@ -431,7 +431,7 @@ async function signIn2(auth2, options) {
431
431
  return { ...next, options: next.options };
432
432
  })();
433
433
  if (creation && prepared.key && options.accessKey) {
434
- const { register } = await import("./passkey-IERPYG6C.js");
434
+ const { register } = await import("./passkey-LLLIVWOZ.js");
435
435
  const registered = await register(auth2, {
436
436
  accessKey: { ...options.accessKey, account: prepared.key.accessKey },
437
437
  challenge: options.challenge,
@@ -1016,7 +1016,7 @@ async function approve(auth, options) {
1016
1016
  let unwatch;
1017
1017
  try {
1018
1018
  return await new Promise((resolve3, reject) => {
1019
- void import("./Sheet-RNX43JGQ.js").then(
1019
+ void import("./Sheet-4HO75LGQ.js").then(
1020
1020
  (Sheet2) => {
1021
1021
  if (settled) return;
1022
1022
  unblock = Sheet2.waiting({
@@ -1062,7 +1062,7 @@ async function approve(auth, options) {
1062
1062
  if (popup === null) throw new BlockedError();
1063
1063
  return await watch2(popup);
1064
1064
  }
1065
- const Sheet = await import("./Sheet-RNX43JGQ.js");
1065
+ const Sheet = await import("./Sheet-4HO75LGQ.js");
1066
1066
  signal?.throwIfAborted();
1067
1067
  let abort;
1068
1068
  let close;
@@ -1916,7 +1916,7 @@ function create(options) {
1916
1916
  );
1917
1917
  }
1918
1918
  function startHydrate(actor2, writes2) {
1919
- if (hydrating === "read") return Promise.resolve();
1919
+ if (hydrating === "read") return Promise.resolve(void 0);
1920
1920
  hydrating ??= (async () => {
1921
1921
  const [stored, loaded] = await Promise.all([
1922
1922
  writes2.storage.getItem(name),
@@ -1926,20 +1926,21 @@ function create(options) {
1926
1926
  const expired3 = session !== void 0 && expired2(session);
1927
1927
  actor2.send({ expired: expired3, session, type: "hydrate" });
1928
1928
  hydrating = "read";
1929
+ return stored?.session;
1929
1930
  })();
1930
1931
  return hydrating;
1931
1932
  }
1932
1933
  async function hydrate() {
1933
- if (!actor) return false;
1934
- if (!writes) return false;
1935
- if (hydrating === "read") return false;
1934
+ if (!actor) return void 0;
1935
+ if (!writes) return void 0;
1936
+ if (hydrating === "read") return void 0;
1936
1937
  const attempt = startHydrate(actor, writes);
1937
1938
  return await attempt.then(
1938
- () => true,
1939
+ (stored) => ({ stored }),
1939
1940
  () => {
1940
1941
  if (hydrating === attempt) hydrating = void 0;
1941
1942
  if (unclaimed === attempt) unclaimed = void 0;
1942
- return false;
1943
+ return void 0;
1943
1944
  }
1944
1945
  );
1945
1946
  }
@@ -2610,13 +2611,13 @@ function create(options) {
2610
2611
  }
2611
2612
  };
2612
2613
  async function end(options2) {
2613
- await hydrate();
2614
+ const hydrated = await hydrate();
2614
2615
  await writes?.flush().catch(() => void 0);
2615
2616
  const local = actor ? context().session : void 0;
2616
2617
  const unsaved = !!local && writes?.unsaved() === local;
2617
2618
  const logouts = obtainedLogouts;
2618
2619
  const since = obtained;
2619
- const before = await read2();
2620
+ const before = hydrated && context().version === 0 ? hydrated.stored : await read2();
2620
2621
  actor?.send({ type: "signOut" });
2621
2622
  const ownSignIns = actor ? context().signIns : 0;
2622
2623
  rotated.clear();
@@ -3697,7 +3698,7 @@ var signInIds = /* @__PURE__ */ new Set([
3697
3698
  function plugin() {
3698
3699
  let loading;
3699
3700
  function load() {
3700
- loading ??= import("./dialog-TETZ75QJ.js").then((module) => module.dialog()).catch((error3) => {
3701
+ loading ??= import("./dialog-W5UTSLPK.js").then((module) => module.dialog()).catch((error3) => {
3701
3702
  loading = void 0;
3702
3703
  throw error3;
3703
3704
  });
@@ -3994,7 +3995,7 @@ async function open(auth, options) {
3994
3995
  throw new OriginError2({ origin: window.location.origin, redirectUri });
3995
3996
  if (mode === "popup" && options.mode !== "popup" && !activated()) {
3996
3997
  const address = await abortable(read2(), { signal });
3997
- const Sheet = await import("./Sheet-RNX43JGQ.js");
3998
+ const Sheet = await import("./Sheet-4HO75LGQ.js");
3998
3999
  return await new Promise((resolve3, reject) => {
3999
4000
  const abort = () => {
4000
4001
  close();
@@ -4057,7 +4058,7 @@ async function preload(auth, options) {
4057
4058
  const entry = { ready: Promise.resolve(), sheet: void 0, url: url2 };
4058
4059
  preloads.set(auth, entry);
4059
4060
  entry.ready = (async () => {
4060
- const Sheet = await import("./Sheet-RNX43JGQ.js").catch(() => void 0);
4061
+ const Sheet = await import("./Sheet-4HO75LGQ.js").catch(() => void 0);
4061
4062
  if (!document.body)
4062
4063
  await new Promise(
4063
4064
  (resolve3) => document.addEventListener("DOMContentLoaded", resolve3, {
@@ -4083,7 +4084,7 @@ async function watch(auth, options) {
4083
4084
  try {
4084
4085
  return await new Promise(
4085
4086
  (resolve3, reject) => {
4086
- void import("./Sheet-RNX43JGQ.js").then(
4087
+ void import("./Sheet-4HO75LGQ.js").then(
4087
4088
  (Sheet) => {
4088
4089
  if (settled) return;
4089
4090
  unblock = Sheet.waiting({
@@ -4182,7 +4183,7 @@ function parse(url2, options) {
4182
4183
  async function frame(auth, options) {
4183
4184
  const { redirectUri, signal, toUrl } = options;
4184
4185
  const address = await abortable(options.address, { signal });
4185
- const Sheet = await import("./Sheet-RNX43JGQ.js");
4186
+ const Sheet = await import("./Sheet-4HO75LGQ.js");
4186
4187
  signal?.throwIfAborted();
4187
4188
  const url2 = toUrl(address);
4188
4189
  const held = preloads.get(auth);
@@ -4708,7 +4709,7 @@ function create4(options = {}) {
4708
4709
  function connections2() {
4709
4710
  if (!connectionsOptions)
4710
4711
  return Promise.reject(new ConnectionsRequiredError());
4711
- attached ??= import("./Connections-FTIDTXKE.js").then(
4712
+ attached ??= import("./Connections-M4GVM5H3.js").then(
4712
4713
  (module) => module.attach(config, connectionsOptions)
4713
4714
  );
4714
4715
  return attached;
@@ -4765,7 +4766,7 @@ function create4(options = {}) {
4765
4766
  },
4766
4767
  handler: {
4767
4768
  async fetch(request2) {
4768
- server ??= import("./Server-FKLOQC7W.js").then(
4769
+ server ??= import("./Server-7PN3SAIE.js").then(
4769
4770
  (module) => module.create({
4770
4771
  accessKeys: connectionsOptions ? async () => (await connections2()).keyEndpoint : void 0,
4771
4772
  // The `backend` plugin's actions sit on the instance under its `id`.
@@ -2,7 +2,7 @@ import {
2
2
  openPopup,
3
3
  received,
4
4
  watchPopup
5
- } from "./chunk-G5KDETLX.js";
5
+ } from "./chunk-PL4IO6RR.js";
6
6
 
7
7
  // ../../accounts/src/internal/Sheet.ts
8
8
  import {
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  env,
3
3
  login
4
- } from "../chunk-4IHSJ6EC.js";
5
- import "../chunk-6JGKPDPD.js";
6
- import "../chunk-34VRWCHW.js";
7
- import "../chunk-WUE2AEEH.js";
8
- import "../chunk-BACPPQF2.js";
4
+ } from "../chunk-PAGBRLPT.js";
5
+ import "../chunk-AT4QGV7S.js";
6
+ import "../chunk-CYNDDGX7.js";
7
+ import "../chunk-YNXICVFC.js";
8
+ import "../chunk-EKCODWTC.js";
9
9
  import "../chunk-FWGE6HXK.js";
10
- import "../chunk-G5KDETLX.js";
10
+ import "../chunk-PL4IO6RR.js";
11
11
  import "../chunk-MLKGABMK.js";
12
12
 
13
13
  // src/commands/login.ts
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  env,
3
3
  remove
4
- } from "../chunk-4IHSJ6EC.js";
5
- import "../chunk-6JGKPDPD.js";
6
- import "../chunk-34VRWCHW.js";
7
- import "../chunk-WUE2AEEH.js";
8
- import "../chunk-BACPPQF2.js";
4
+ } from "../chunk-PAGBRLPT.js";
5
+ import "../chunk-AT4QGV7S.js";
6
+ import "../chunk-CYNDDGX7.js";
7
+ import "../chunk-YNXICVFC.js";
8
+ import "../chunk-EKCODWTC.js";
9
9
  import "../chunk-FWGE6HXK.js";
10
- import "../chunk-G5KDETLX.js";
10
+ import "../chunk-PL4IO6RR.js";
11
11
  import "../chunk-MLKGABMK.js";
12
12
 
13
13
  // src/commands/logout.ts
@@ -2,13 +2,13 @@ import {
2
2
  env,
3
3
  signedOut,
4
4
  whoami
5
- } from "../chunk-4IHSJ6EC.js";
6
- import "../chunk-6JGKPDPD.js";
7
- import "../chunk-34VRWCHW.js";
8
- import "../chunk-WUE2AEEH.js";
9
- import "../chunk-BACPPQF2.js";
5
+ } from "../chunk-PAGBRLPT.js";
6
+ import "../chunk-AT4QGV7S.js";
7
+ import "../chunk-CYNDDGX7.js";
8
+ import "../chunk-YNXICVFC.js";
9
+ import "../chunk-EKCODWTC.js";
10
10
  import "../chunk-FWGE6HXK.js";
11
- import "../chunk-G5KDETLX.js";
11
+ import "../chunk-PL4IO6RR.js";
12
12
  import "../chunk-MLKGABMK.js";
13
13
 
14
14
  // src/commands/whoami.ts
@@ -3,8 +3,8 @@ import {
3
3
  preload,
4
4
  signIn,
5
5
  signMessage
6
- } from "./chunk-34VRWCHW.js";
7
- import "./chunk-WUE2AEEH.js";
6
+ } from "./chunk-CYNDDGX7.js";
7
+ import "./chunk-YNXICVFC.js";
8
8
  import {
9
9
  authPath,
10
10
  basePath
@@ -18,7 +18,7 @@ import {
18
18
  revokeAccessKey,
19
19
  toSession,
20
20
  updateAccessKey
21
- } from "./chunk-G5KDETLX.js";
21
+ } from "./chunk-PL4IO6RR.js";
22
22
  import "./chunk-MLKGABMK.js";
23
23
 
24
24
  // ../../accounts/src/plugins/dialog.ts
@@ -3,8 +3,8 @@ import {
3
3
  prepare,
4
4
  register,
5
5
  signIn
6
- } from "./chunk-6JGKPDPD.js";
7
- import "./chunk-G5KDETLX.js";
6
+ } from "./chunk-AT4QGV7S.js";
7
+ import "./chunk-PL4IO6RR.js";
8
8
  import "./chunk-MLKGABMK.js";
9
9
  export {
10
10
  available,
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "node": ">=24.21"
10
10
  },
11
11
  "name": "@tempoxyz/id",
12
- "version": "0.0.0-pr-670.sha-b9e68f1",
12
+ "version": "0.0.0-pr-838.sha-e7626ff",
13
13
  "description": "The tempo-id CLI: sign in to Tempo ID, and call its API and the Admin API.",
14
14
  "type": "module",
15
15
  "bin": {