@bounded-sh/client 0.0.55 → 0.0.56
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/{email-auth-provider-BaZceaov.js → email-auth-provider-4Df8dFOh.js} +2 -2
- package/dist/{email-auth-provider-BaZceaov.js.map → email-auth-provider-4Df8dFOh.js.map} +1 -1
- package/dist/{email-auth-provider-BKl9GgHV.mjs → email-auth-provider-BqX-o_sJ.mjs} +2 -2
- package/dist/{email-auth-provider-yBbGzH2e.mjs.map → email-auth-provider-BqX-o_sJ.mjs.map} +1 -1
- package/dist/{email-auth-provider-yBbGzH2e.mjs → email-auth-provider-By6SL0YS.mjs} +2 -2
- package/dist/{email-auth-provider-BKl9GgHV.mjs.map → email-auth-provider-By6SL0YS.mjs.map} +1 -1
- package/dist/{email-auth-provider-lVwM8vRR.js → email-auth-provider-CZ-xYVln.js} +2 -2
- package/dist/{email-auth-provider-lVwM8vRR.js.map → email-auth-provider-CZ-xYVln.js.map} +1 -1
- package/dist/{guest-auth-provider-Dgs8zcnC.mjs → guest-auth-provider-6bqnyX79.mjs} +2 -2
- package/dist/{guest-auth-provider-Dgs8zcnC.mjs.map → guest-auth-provider-6bqnyX79.mjs.map} +1 -1
- package/dist/{guest-auth-provider-DhN9PoAi.js → guest-auth-provider-D9A4SU4z.js} +2 -2
- package/dist/{guest-auth-provider-DhN9PoAi.js.map → guest-auth-provider-D9A4SU4z.js.map} +1 -1
- package/dist/{guest-auth-provider-DTKczntw.js → guest-auth-provider-DWcdRvLW.js} +2 -2
- package/dist/{guest-auth-provider-DTKczntw.js.map → guest-auth-provider-DWcdRvLW.js.map} +1 -1
- package/dist/{guest-auth-provider-BnugW3TI.mjs → guest-auth-provider-Q2wbjdHM.mjs} +2 -2
- package/dist/{guest-auth-provider-BnugW3TI.mjs.map → guest-auth-provider-Q2wbjdHM.mjs.map} +1 -1
- package/dist/{index-DkdIADby.mjs → index--jrXqxte.mjs} +23 -8
- package/dist/index--jrXqxte.mjs.map +1 -0
- package/dist/{index-CXVwyR6_.js → index-B_uRc6gn.js} +23 -8
- package/dist/index-B_uRc6gn.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{index.native-CouprxZp.js → index.native-BqK-14S8.js} +23 -8
- package/dist/{index.native-CouprxZp.js.map → index.native-BqK-14S8.js.map} +1 -1
- package/dist/{index.native-aSo8M0A8.mjs → index.native-CTVEq0VY.mjs} +23 -8
- package/dist/{index.native-aSo8M0A8.mjs.map → index.native-CTVEq0VY.mjs.map} +1 -1
- package/dist/index.native.js +1 -1
- package/dist/index.native.mjs +1 -1
- package/dist/{injected-evm-wallet-provider-D7fd42En.mjs → injected-evm-wallet-provider-BCR37kRN.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-D7fd42En.mjs.map → injected-evm-wallet-provider-BCR37kRN.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-BgiFW_kf.mjs → injected-evm-wallet-provider-BZPmj8bC.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-BgiFW_kf.mjs.map → injected-evm-wallet-provider-BZPmj8bC.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-CiCeS1n2.js → injected-evm-wallet-provider-CXfQT5sm.js} +2 -2
- package/dist/{injected-evm-wallet-provider-CiCeS1n2.js.map → injected-evm-wallet-provider-CXfQT5sm.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-CtrS-gLC.js → injected-evm-wallet-provider-xZ01LIw2.js} +2 -2
- package/dist/{injected-evm-wallet-provider-CtrS-gLC.js.map → injected-evm-wallet-provider-xZ01LIw2.js.map} +1 -1
- package/dist/{injected-wallet-provider-CRG9TaA9.mjs → injected-wallet-provider-1IRUHyB3.mjs} +2 -2
- package/dist/{injected-wallet-provider-CRG9TaA9.mjs.map → injected-wallet-provider-1IRUHyB3.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-Bic6GpDr.js → injected-wallet-provider-ClI_h_fy.js} +2 -2
- package/dist/{injected-wallet-provider-Bic6GpDr.js.map → injected-wallet-provider-ClI_h_fy.js.map} +1 -1
- package/dist/{injected-wallet-provider-BhpwmpgW.mjs → injected-wallet-provider-DHQGI0Yl.mjs} +2 -2
- package/dist/{injected-wallet-provider-BhpwmpgW.mjs.map → injected-wallet-provider-DHQGI0Yl.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-CST-B9EE.js → injected-wallet-provider-eMZ8tjas.js} +2 -2
- package/dist/{injected-wallet-provider-CST-B9EE.js.map → injected-wallet-provider-eMZ8tjas.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-CXVwyR6_.js.map +0 -1
- package/dist/index-DkdIADby.mjs.map +0 -1
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { W as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, V as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, U as BUILD_REVIEW_CAPABILITY_SCHEMA, M as BuildsApiError, S as FAILURE_REASONS, N as NON_TERMINAL_STATES, O as OffchainAuthProvider, Q as PARK_REASONS, P as PrivyExpoProvider, R as RUN_STATES, T as TERMINAL_STATES, G as apps, L as builds, z as completeLoginFromRedirect, B as completeLoginInPopup, k as defaultInjectedEvmProvider, d as defaultInjectedProvider, H as deserializeTransaction, q as getAuthLoading, v as getAuthProvider, m as getCurrentUser, I as getIdToken, g as getPlatform, l as init, t as login, A as loginWithPopup, x as loginWithPrivy, y as loginWithRedirect, u as logout, p as onAuthLoadingChanged, o as onAuthStateChanged, K as requestEip6963Providers, J as setPlatform, w as signInAnonymously, C as useAuth, F as useBuildRun, D as useQuery } from './index
|
|
1
|
+
export { W as BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA, V as BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA, U as BUILD_REVIEW_CAPABILITY_SCHEMA, M as BuildsApiError, S as FAILURE_REASONS, N as NON_TERMINAL_STATES, O as OffchainAuthProvider, Q as PARK_REASONS, P as PrivyExpoProvider, R as RUN_STATES, T as TERMINAL_STATES, G as apps, L as builds, z as completeLoginFromRedirect, B as completeLoginInPopup, k as defaultInjectedEvmProvider, d as defaultInjectedProvider, H as deserializeTransaction, q as getAuthLoading, v as getAuthProvider, m as getCurrentUser, I as getIdToken, g as getPlatform, l as init, t as login, A as loginWithPopup, x as loginWithPrivy, y as loginWithRedirect, u as logout, p as onAuthLoadingChanged, o as onAuthStateChanged, K as requestEip6963Providers, J as setPlatform, w as signInAnonymously, C as useAuth, F as useBuildRun, D as useQuery } from './index--jrXqxte.mjs';
|
|
2
2
|
export * from '@bounded-sh/core';
|
|
3
3
|
export { BoundedDeclineError, DECLINE_EVENT_NAME, RATE_LIMIT_EVENT_NAME, ScopedClientReadOnlyError, aggregate, count, createClient, deriveDecline, dispatchDeclineEvent, dispatchRateLimitEvent, docId, get, getConfig, getFiles, getMany, queryAggregate, runExpression, runExpressionMany, runQuery, runQueryMany, search, set, setFile, setMany, signAndSubmitTransaction, signMessage, signTransaction, subscribe } from '@bounded-sh/core';
|
|
4
4
|
import 'react';
|
|
@@ -4464,7 +4464,7 @@ async function getAuthProvider(config) {
|
|
|
4464
4464
|
// manager as legacy email sessions. Human login should be started
|
|
4465
4465
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4466
4466
|
// logout surface for those sessions.
|
|
4467
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-
|
|
4467
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./email-auth-provider-CZ-xYVln.js'); })).EmailAuthProvider();
|
|
4468
4468
|
break;
|
|
4469
4469
|
case "wallet":
|
|
4470
4470
|
case "phantom": {
|
|
@@ -4483,7 +4483,7 @@ async function getAuthProvider(config) {
|
|
|
4483
4483
|
if (!isWalletLoginEnabled(config)) {
|
|
4484
4484
|
throw walletLoginNotEnabledError(authMethod);
|
|
4485
4485
|
}
|
|
4486
|
-
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-
|
|
4486
|
+
const { InjectedWalletProvider } = await Promise.resolve().then(function () { return require('./injected-wallet-provider-eMZ8tjas.js'); });
|
|
4487
4487
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4488
4488
|
break;
|
|
4489
4489
|
}
|
|
@@ -4496,7 +4496,7 @@ async function getAuthProvider(config) {
|
|
|
4496
4496
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4497
4497
|
// to point at a specific wallet or set chainId/domain.
|
|
4498
4498
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4499
|
-
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-
|
|
4499
|
+
const { InjectedEvmWalletProvider } = await Promise.resolve().then(function () { return require('./injected-evm-wallet-provider-CXfQT5sm.js'); });
|
|
4500
4500
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4501
4501
|
break;
|
|
4502
4502
|
}
|
|
@@ -4524,7 +4524,7 @@ async function getAuthProvider(config) {
|
|
|
4524
4524
|
break;
|
|
4525
4525
|
case "guest":
|
|
4526
4526
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4527
|
-
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4527
|
+
currentAuthProvider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-D9A4SU4z.js'); })).GuestAuthProvider();
|
|
4528
4528
|
break;
|
|
4529
4529
|
}
|
|
4530
4530
|
if (!currentAuthProvider) {
|
|
@@ -4580,7 +4580,7 @@ async function signInAnonymously() {
|
|
|
4580
4580
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4581
4581
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4582
4582
|
// so bundle-splitting can see it.
|
|
4583
|
-
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-
|
|
4583
|
+
const provider = new (await Promise.resolve().then(function () { return require('./guest-auth-provider-D9A4SU4z.js'); })).GuestAuthProvider();
|
|
4584
4584
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4585
4585
|
const commit = (user) => {
|
|
4586
4586
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -5376,9 +5376,11 @@ const BUILD_REVIEW_CAPABILITY_SCHEMA = 'bounded.build-review-capability.v1';
|
|
|
5376
5376
|
const BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA = 'bounded.build-review-capability-refresh.v1';
|
|
5377
5377
|
const BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA = 'bounded.build-delegated-review-capability.v1';
|
|
5378
5378
|
|
|
5379
|
+
const FAST_POLL_MS = 1000;
|
|
5379
5380
|
const NORMAL_POLL_MS = 2000;
|
|
5380
5381
|
const PARKED_POLL_MS = 5000;
|
|
5381
5382
|
const LONG_RUNNING_POLL_MS = 10000;
|
|
5383
|
+
const THIRTY_SECONDS_MS = 30000;
|
|
5382
5384
|
const TWO_MINUTES_MS = 2 * 60000;
|
|
5383
5385
|
const TEN_MINUTES_MS = 10 * 60000;
|
|
5384
5386
|
const terminalStates = new Set(TERMINAL_STATES);
|
|
@@ -5387,6 +5389,10 @@ function pollCadence(state, elapsedMs) {
|
|
|
5387
5389
|
return LONG_RUNNING_POLL_MS;
|
|
5388
5390
|
if ((state === null || state === void 0 ? void 0 : state.startsWith('parked')) || elapsedMs >= TWO_MINUTES_MS)
|
|
5389
5391
|
return PARKED_POLL_MS;
|
|
5392
|
+
// The first 30s is where the user is staring at "waiting for a build slot" /
|
|
5393
|
+
// "building" and every transition matters most; poll fast, then relax.
|
|
5394
|
+
if (elapsedMs < THIRTY_SECONDS_MS)
|
|
5395
|
+
return FAST_POLL_MS;
|
|
5390
5396
|
return NORMAL_POLL_MS;
|
|
5391
5397
|
}
|
|
5392
5398
|
function retryCadence(error, state, elapsedMs) {
|
|
@@ -5472,9 +5478,18 @@ function watch(appId, runId, onUpdate, options = {}) {
|
|
|
5472
5478
|
const poll = async () => {
|
|
5473
5479
|
if (!active)
|
|
5474
5480
|
return;
|
|
5481
|
+
// Fire the view and the events page concurrently: the events cursor (lastSeq)
|
|
5482
|
+
// does not depend on the run view, so there is no reason to pay two serial
|
|
5483
|
+
// round-trips per tick. Error semantics below are unchanged — the run result
|
|
5484
|
+
// still gates, and a failed events page still publishes the run with no rows.
|
|
5485
|
+
const runPromise = get(appId, runId);
|
|
5486
|
+
const eventsPromise = events(appId, runId, lastSeq);
|
|
5487
|
+
// Keep the in-flight events page from becoming an unhandled rejection if the
|
|
5488
|
+
// run result makes us bail before awaiting it; the real await below still sees it.
|
|
5489
|
+
eventsPromise.catch(() => { });
|
|
5475
5490
|
let run;
|
|
5476
5491
|
try {
|
|
5477
|
-
const view = await
|
|
5492
|
+
const view = await runPromise;
|
|
5478
5493
|
if (!active)
|
|
5479
5494
|
return;
|
|
5480
5495
|
run = view.run;
|
|
@@ -5492,7 +5507,7 @@ function watch(appId, runId, onUpdate, options = {}) {
|
|
|
5492
5507
|
return;
|
|
5493
5508
|
}
|
|
5494
5509
|
try {
|
|
5495
|
-
const response = await
|
|
5510
|
+
const response = await eventsPromise;
|
|
5496
5511
|
if (!active)
|
|
5497
5512
|
return;
|
|
5498
5513
|
const deduped = newEvents(Array.isArray(response.events) ? response.events : [], lastSeq, seenSeqs);
|
|
@@ -6129,4 +6144,4 @@ exports.setPlatform = setPlatform;
|
|
|
6129
6144
|
exports.signInAnonymously = signInAnonymously;
|
|
6130
6145
|
exports.useAuth = useAuth;
|
|
6131
6146
|
exports.useBuildRun = useBuildRun;
|
|
6132
|
-
//# sourceMappingURL=index.native-
|
|
6147
|
+
//# sourceMappingURL=index.native-BqK-14S8.js.map
|