@tempoxyz/id 0.0.0-pr-670.sha-37c445d → 0.0.0-pr-795.sha-be03fbe

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-76XNJYCT.js";
7
+ } from "./chunk-RUVB2W7L.js";
8
8
  import "./chunk-FWGE6HXK.js";
9
- import "./chunk-LFCZMBVQ.js";
9
+ import "./chunk-BMVKOTQV.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-LFCZMBVQ.js";
9
+ } from "./chunk-BMVKOTQV.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-HET3PM5A.js";
9
- import "./chunk-LFCZMBVQ.js";
8
+ } from "./chunk-QV32ZP3X.js";
9
+ import "./chunk-BMVKOTQV.js";
10
10
  import "./chunk-MLKGABMK.js";
11
11
  export {
12
12
  create,
@@ -967,7 +967,7 @@ async function approve(auth, options) {
967
967
  let unwatch;
968
968
  try {
969
969
  return await new Promise((resolve3, reject) => {
970
- void import("./Sheet-TZ25HK7T.js").then(
970
+ void import("./Sheet-DRJAUI5N.js").then(
971
971
  (Sheet2) => {
972
972
  if (settled) return;
973
973
  unblock = Sheet2.waiting({
@@ -1013,7 +1013,7 @@ async function approve(auth, options) {
1013
1013
  if (popup === null) throw new BlockedError();
1014
1014
  return await watch2(popup);
1015
1015
  }
1016
- const Sheet = await import("./Sheet-TZ25HK7T.js");
1016
+ const Sheet = await import("./Sheet-DRJAUI5N.js");
1017
1017
  signal?.throwIfAborted();
1018
1018
  let abort;
1019
1019
  let close;
@@ -3231,16 +3231,6 @@ var machines;
3231
3231
  };
3232
3232
  }
3233
3233
  machines2.keeps = keeps;
3234
- function keepsAccount(options) {
3235
- const { accessToken: accessToken2, account: account2, chainId, selected: selected2, session: session2 } = options;
3236
- if (!session2 || session2.account) return false;
3237
- if (session2.accessToken !== accessToken2) return false;
3238
- if (selected2 !== chainId) return false;
3239
- if (!session2.key) return true;
3240
- if (Number(session2.key.chainId) !== chainId) return false;
3241
- return session2.key.account.toLowerCase() === account2.address.toLowerCase();
3242
- }
3243
- machines2.keepsAccount = keepsAccount;
3244
3234
  function idle(snapshot) {
3245
3235
  if (snapshot.matches("signedIn")) return true;
3246
3236
  const { authorizations, delegations } = snapshot.context;
@@ -3607,7 +3597,7 @@ var signInIds = /* @__PURE__ */ new Set([
3607
3597
  function plugin() {
3608
3598
  let loading;
3609
3599
  function load() {
3610
- loading ??= import("./dialog-DXVM6HU3.js").then((module) => module.dialog()).catch((error3) => {
3600
+ loading ??= import("./dialog-FRMZDXSN.js").then((module) => module.dialog()).catch((error3) => {
3611
3601
  loading = void 0;
3612
3602
  throw error3;
3613
3603
  });
@@ -3720,16 +3710,11 @@ function create3(options) {
3720
3710
  chainId = next;
3721
3711
  for (const listener of listeners) listener(next, previous);
3722
3712
  }
3723
- async function read2() {
3724
- const stored = await store2?.getItem(key2);
3725
- if (typeof stored === "number" && Number.isSafeInteger(stored) && chains.includes(stored))
3726
- return stored;
3727
- return void 0;
3728
- }
3729
3713
  function load() {
3730
3714
  loading ??= (async () => {
3731
- const stored = await read2();
3732
- if (stored !== void 0) apply(stored);
3715
+ const stored = await store2.getItem(key2);
3716
+ if (typeof stored === "number" && Number.isSafeInteger(stored) && chains.includes(stored))
3717
+ apply(stored);
3733
3718
  })().catch((error3) => {
3734
3719
  loading = void 0;
3735
3720
  throw error3;
@@ -3741,7 +3726,6 @@ function create3(options) {
3741
3726
  get: () => chainId,
3742
3727
  load,
3743
3728
  serves: (next) => chains.includes(next),
3744
- stored: async () => await read2() ?? options.chainId,
3745
3729
  async set(next) {
3746
3730
  await load().catch(() => void 0);
3747
3731
  await store2?.setItem(key2, next);
@@ -3870,7 +3854,7 @@ async function open(auth, options) {
3870
3854
  throw new OriginError2({ origin: window.location.origin, redirectUri });
3871
3855
  if (mode === "popup" && options.mode !== "popup" && !activated()) {
3872
3856
  const address = await abortable(read2(), { signal });
3873
- const Sheet = await import("./Sheet-TZ25HK7T.js");
3857
+ const Sheet = await import("./Sheet-DRJAUI5N.js");
3874
3858
  return await new Promise((resolve3, reject) => {
3875
3859
  const abort = () => {
3876
3860
  close();
@@ -3933,7 +3917,7 @@ async function preload(auth, options) {
3933
3917
  const entry = { ready: Promise.resolve(), sheet: void 0, url };
3934
3918
  preloads.set(auth, entry);
3935
3919
  entry.ready = (async () => {
3936
- const Sheet = await import("./Sheet-TZ25HK7T.js").catch(() => void 0);
3920
+ const Sheet = await import("./Sheet-DRJAUI5N.js").catch(() => void 0);
3937
3921
  if (!document.body)
3938
3922
  await new Promise(
3939
3923
  (resolve3) => document.addEventListener("DOMContentLoaded", resolve3, {
@@ -3959,7 +3943,7 @@ async function watch(auth, options) {
3959
3943
  try {
3960
3944
  return await new Promise(
3961
3945
  (resolve3, reject) => {
3962
- void import("./Sheet-TZ25HK7T.js").then(
3946
+ void import("./Sheet-DRJAUI5N.js").then(
3963
3947
  (Sheet) => {
3964
3948
  if (settled) return;
3965
3949
  unblock = Sheet.waiting({
@@ -4058,7 +4042,7 @@ function parse(url, options) {
4058
4042
  async function frame(auth, options) {
4059
4043
  const { redirectUri, signal, toUrl } = options;
4060
4044
  const address = await abortable(options.address, { signal });
4061
- const Sheet = await import("./Sheet-TZ25HK7T.js");
4045
+ const Sheet = await import("./Sheet-DRJAUI5N.js");
4062
4046
  signal?.throwIfAborted();
4063
4047
  const url = toUrl(address);
4064
4048
  const held = preloads.get(auth);
@@ -4583,7 +4567,7 @@ function create4(options = {}) {
4583
4567
  function connections2() {
4584
4568
  if (!connectionsOptions)
4585
4569
  return Promise.reject(new ConnectionsRequiredError());
4586
- attached ??= import("./Connections-UZNSNHHK.js").then(
4570
+ attached ??= import("./Connections-IG7BPSNM.js").then(
4587
4571
  (module) => module.attach(config, connectionsOptions)
4588
4572
  );
4589
4573
  return attached;
@@ -4593,18 +4577,10 @@ function create4(options = {}) {
4593
4577
  const instance = {
4594
4578
  ...namespaces,
4595
4579
  account: {
4596
- get: async (parameters = {}) => {
4597
- const accessToken3 = parameters.accessToken ?? await ownAccessToken();
4598
- const chainId = parameters.chainId ?? chain.get();
4599
- const account2 = await getAccount(context, {
4600
- ...parameters,
4601
- accessToken: accessToken3,
4602
- chainId
4603
- });
4604
- if (account2 && accessToken3)
4605
- keepAccount(account2, { accessToken: accessToken3, chainId });
4606
- return account2;
4607
- },
4580
+ get: async (parameters = {}) => getAccount(context, {
4581
+ ...parameters,
4582
+ accessToken: parameters.accessToken ?? await ownAccessToken()
4583
+ }),
4608
4584
  upgrade: (parameters) => upgradeAccount(context, parameters)
4609
4585
  },
4610
4586
  authorize: (parameters) => authorize3(context, {
@@ -4640,7 +4616,7 @@ function create4(options = {}) {
4640
4616
  },
4641
4617
  handler: {
4642
4618
  async fetch(request2) {
4643
- server ??= import("./Server-VDDCTE7C.js").then(
4619
+ server ??= import("./Server-WJMGROFK.js").then(
4644
4620
  (module) => module.create({
4645
4621
  accessKeys: connectionsOptions ? async () => (await connections2()).keyEndpoint : void 0,
4646
4622
  // The `backend` plugin's actions sit on the instance under its `id`.
@@ -4728,26 +4704,6 @@ function create4(options = {}) {
4728
4704
  );
4729
4705
  return held[key];
4730
4706
  }
4731
- function keepAccount(account2, options2) {
4732
- const { accessToken: accessToken3, chainId } = options2;
4733
- const keeps = (held) => machines.keepsAccount({
4734
- accessToken: accessToken3,
4735
- account: account2,
4736
- chainId,
4737
- selected: chain.get(),
4738
- session: held
4739
- });
4740
- if (!keeps(session.get())) return;
4741
- void session.exclusive(async () => {
4742
- const [latest, stored] = await Promise.all([
4743
- session.reload(),
4744
- chain.stored()
4745
- ]);
4746
- if (!latest || !keeps(latest)) return;
4747
- if (stored !== chainId) return;
4748
- await session.change({ update: true }).commit({ ...latest, account: account2 });
4749
- }).catch(() => void 0);
4750
- }
4751
4707
  function readMoved(moved2) {
4752
4708
  const chainId = chain.get();
4753
4709
  void (async () => {
@@ -2,7 +2,7 @@ import {
2
2
  create,
3
3
  prompt,
4
4
  waiting
5
- } from "./chunk-HET3PM5A.js";
5
+ } from "./chunk-QV32ZP3X.js";
6
6
  import {
7
7
  authPath,
8
8
  basePath
@@ -29,7 +29,7 @@ import {
29
29
  tokens,
30
30
  user,
31
31
  watchPopup
32
- } from "./chunk-LFCZMBVQ.js";
32
+ } from "./chunk-BMVKOTQV.js";
33
33
  import {
34
34
  __export
35
35
  } from "./chunk-MLKGABMK.js";
@@ -2,7 +2,7 @@ import {
2
2
  openPopup,
3
3
  received,
4
4
  watchPopup
5
- } from "./chunk-LFCZMBVQ.js";
5
+ } from "./chunk-BMVKOTQV.js";
6
6
 
7
7
  // ../../accounts/src/internal/Sheet.ts
8
8
  import {
@@ -9,7 +9,7 @@ import {
9
9
  from,
10
10
  json,
11
11
  post
12
- } from "./chunk-LFCZMBVQ.js";
12
+ } from "./chunk-BMVKOTQV.js";
13
13
  import {
14
14
  __export
15
15
  } from "./chunk-MLKGABMK.js";
@@ -15,7 +15,7 @@ import {
15
15
  tempoAccount,
16
16
  tokens,
17
17
  user
18
- } from "./chunk-LFCZMBVQ.js";
18
+ } from "./chunk-BMVKOTQV.js";
19
19
  import {
20
20
  __export
21
21
  } from "./chunk-MLKGABMK.js";
@@ -2,14 +2,14 @@ import {
2
2
  bind,
3
3
  from,
4
4
  passkey_exports
5
- } from "./chunk-BG5R7DWZ.js";
5
+ } from "./chunk-SY3XO5Q5.js";
6
6
  import {
7
7
  dialog_exports,
8
8
  redirect_exports
9
- } from "./chunk-5BMEYTWL.js";
9
+ } from "./chunk-DE5X2NOS.js";
10
10
  import {
11
11
  connections_exports
12
- } from "./chunk-76XNJYCT.js";
12
+ } from "./chunk-RUVB2W7L.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-LFCZMBVQ.js";
50
+ } from "./chunk-BMVKOTQV.js";
51
51
  import {
52
52
  __export
53
53
  } from "./chunk-MLKGABMK.js";
@@ -420,7 +420,7 @@ async function signIn2(auth2, options) {
420
420
  }
421
421
  })();
422
422
  if (body.passkey_account && body.registration && prepared.key && options.accessKey) {
423
- const { register } = await import("./passkey-YRMARUDY.js");
423
+ const { register } = await import("./passkey-YPTBYBYG.js");
424
424
  const registered = await register(auth2, {
425
425
  accessKey: { ...options.accessKey, account: prepared.key.accessKey },
426
426
  challenge: options.challenge,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  env,
3
3
  login
4
- } from "../chunk-B5QLHT6G.js";
5
- import "../chunk-BG5R7DWZ.js";
6
- import "../chunk-5BMEYTWL.js";
7
- import "../chunk-HET3PM5A.js";
8
- import "../chunk-76XNJYCT.js";
4
+ } from "../chunk-VXCFANA3.js";
5
+ import "../chunk-SY3XO5Q5.js";
6
+ import "../chunk-DE5X2NOS.js";
7
+ import "../chunk-QV32ZP3X.js";
8
+ import "../chunk-RUVB2W7L.js";
9
9
  import "../chunk-FWGE6HXK.js";
10
- import "../chunk-LFCZMBVQ.js";
10
+ import "../chunk-BMVKOTQV.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-B5QLHT6G.js";
5
- import "../chunk-BG5R7DWZ.js";
6
- import "../chunk-5BMEYTWL.js";
7
- import "../chunk-HET3PM5A.js";
8
- import "../chunk-76XNJYCT.js";
4
+ } from "../chunk-VXCFANA3.js";
5
+ import "../chunk-SY3XO5Q5.js";
6
+ import "../chunk-DE5X2NOS.js";
7
+ import "../chunk-QV32ZP3X.js";
8
+ import "../chunk-RUVB2W7L.js";
9
9
  import "../chunk-FWGE6HXK.js";
10
- import "../chunk-LFCZMBVQ.js";
10
+ import "../chunk-BMVKOTQV.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-B5QLHT6G.js";
6
- import "../chunk-BG5R7DWZ.js";
7
- import "../chunk-5BMEYTWL.js";
8
- import "../chunk-HET3PM5A.js";
9
- import "../chunk-76XNJYCT.js";
5
+ } from "../chunk-VXCFANA3.js";
6
+ import "../chunk-SY3XO5Q5.js";
7
+ import "../chunk-DE5X2NOS.js";
8
+ import "../chunk-QV32ZP3X.js";
9
+ import "../chunk-RUVB2W7L.js";
10
10
  import "../chunk-FWGE6HXK.js";
11
- import "../chunk-LFCZMBVQ.js";
11
+ import "../chunk-BMVKOTQV.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-5BMEYTWL.js";
7
- import "./chunk-HET3PM5A.js";
6
+ } from "./chunk-DE5X2NOS.js";
7
+ import "./chunk-QV32ZP3X.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-LFCZMBVQ.js";
21
+ } from "./chunk-BMVKOTQV.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-BG5R7DWZ.js";
7
- import "./chunk-LFCZMBVQ.js";
6
+ } from "./chunk-SY3XO5Q5.js";
7
+ import "./chunk-BMVKOTQV.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-37c445d",
12
+ "version": "0.0.0-pr-795.sha-be03fbe",
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": {