@bounded-sh/client 0.0.53 → 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/builds/apps.d.ts +22 -0
- package/dist/{email-auth-provider-BZJ9EcnE.js → email-auth-provider-4Df8dFOh.js} +2 -2
- package/dist/{email-auth-provider-BZJ9EcnE.js.map → email-auth-provider-4Df8dFOh.js.map} +1 -1
- package/dist/{email-auth-provider-BGc8H93l.mjs → email-auth-provider-BqX-o_sJ.mjs} +2 -2
- package/dist/{email-auth-provider-CD7YIGxe.mjs.map → email-auth-provider-BqX-o_sJ.mjs.map} +1 -1
- package/dist/{email-auth-provider-CD7YIGxe.mjs → email-auth-provider-By6SL0YS.mjs} +2 -2
- package/dist/{email-auth-provider-BGc8H93l.mjs.map → email-auth-provider-By6SL0YS.mjs.map} +1 -1
- package/dist/{email-auth-provider-ChDGkDyY.js → email-auth-provider-CZ-xYVln.js} +2 -2
- package/dist/{email-auth-provider-ChDGkDyY.js.map → email-auth-provider-CZ-xYVln.js.map} +1 -1
- package/dist/{guest-auth-provider-BkkSRli_.mjs → guest-auth-provider-6bqnyX79.mjs} +2 -2
- package/dist/{guest-auth-provider-DZQWJu59.mjs.map → guest-auth-provider-6bqnyX79.mjs.map} +1 -1
- package/dist/{guest-auth-provider-C7u3RFEX.js → guest-auth-provider-D9A4SU4z.js} +2 -2
- package/dist/{guest-auth-provider-C7u3RFEX.js.map → guest-auth-provider-D9A4SU4z.js.map} +1 -1
- package/dist/{guest-auth-provider-B2CPHhym.js → guest-auth-provider-DWcdRvLW.js} +2 -2
- package/dist/{guest-auth-provider-B2CPHhym.js.map → guest-auth-provider-DWcdRvLW.js.map} +1 -1
- package/dist/{guest-auth-provider-DZQWJu59.mjs → guest-auth-provider-Q2wbjdHM.mjs} +2 -2
- package/dist/{guest-auth-provider-BkkSRli_.mjs.map → guest-auth-provider-Q2wbjdHM.mjs.map} +1 -1
- package/dist/{index-DuaMs1q-.mjs → index--jrXqxte.mjs} +45 -10
- package/dist/index--jrXqxte.mjs.map +1 -0
- package/dist/{index-CK36YlGT.js → index-B_uRc6gn.js} +45 -10
- package/dist/index-B_uRc6gn.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{index.native-DoWvYWaz.js → index.native-BqK-14S8.js} +45 -10
- package/dist/{index.native-DoWvYWaz.js.map → index.native-BqK-14S8.js.map} +1 -1
- package/dist/{index.native-C5SoJAZn.mjs → index.native-CTVEq0VY.mjs} +45 -10
- package/dist/{index.native-C5SoJAZn.mjs.map → index.native-CTVEq0VY.mjs.map} +1 -1
- package/dist/index.native.d.ts +2 -0
- package/dist/index.native.js +9 -1
- package/dist/index.native.js.map +1 -1
- package/dist/index.native.mjs +2 -2
- package/dist/{injected-evm-wallet-provider-CMZE-rJ7.mjs → injected-evm-wallet-provider-BCR37kRN.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-CMZE-rJ7.mjs.map → injected-evm-wallet-provider-BCR37kRN.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-bbFMPrsJ.mjs → injected-evm-wallet-provider-BZPmj8bC.mjs} +2 -2
- package/dist/{injected-evm-wallet-provider-bbFMPrsJ.mjs.map → injected-evm-wallet-provider-BZPmj8bC.mjs.map} +1 -1
- package/dist/{injected-evm-wallet-provider-9ephHduG.js → injected-evm-wallet-provider-CXfQT5sm.js} +2 -2
- package/dist/{injected-evm-wallet-provider-9ephHduG.js.map → injected-evm-wallet-provider-CXfQT5sm.js.map} +1 -1
- package/dist/{injected-evm-wallet-provider-GANZNy2j.js → injected-evm-wallet-provider-xZ01LIw2.js} +2 -2
- package/dist/{injected-evm-wallet-provider-GANZNy2j.js.map → injected-evm-wallet-provider-xZ01LIw2.js.map} +1 -1
- package/dist/{injected-wallet-provider-BHBiq-r2.mjs → injected-wallet-provider-1IRUHyB3.mjs} +2 -2
- package/dist/{injected-wallet-provider-BHBiq-r2.mjs.map → injected-wallet-provider-1IRUHyB3.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-CABVyh7K.js → injected-wallet-provider-ClI_h_fy.js} +2 -2
- package/dist/{injected-wallet-provider-CABVyh7K.js.map → injected-wallet-provider-ClI_h_fy.js.map} +1 -1
- package/dist/{injected-wallet-provider-DGN0kuf_.mjs → injected-wallet-provider-DHQGI0Yl.mjs} +2 -2
- package/dist/{injected-wallet-provider-DGN0kuf_.mjs.map → injected-wallet-provider-DHQGI0Yl.mjs.map} +1 -1
- package/dist/{injected-wallet-provider-C_EmEki7.js → injected-wallet-provider-eMZ8tjas.js} +2 -2
- package/dist/{injected-wallet-provider-C_EmEki7.js.map → injected-wallet-provider-eMZ8tjas.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-CK36YlGT.js.map +0 -1
- package/dist/index-DuaMs1q-.mjs.map +0 -1
|
@@ -4443,7 +4443,7 @@ async function getAuthProvider(config) {
|
|
|
4443
4443
|
// manager as legacy email sessions. Human login should be started
|
|
4444
4444
|
// with loginWithRedirect(); this provider is kept as the restore and
|
|
4445
4445
|
// logout surface for those sessions.
|
|
4446
|
-
currentAuthProvider = new (await import('./email-auth-provider-
|
|
4446
|
+
currentAuthProvider = new (await import('./email-auth-provider-BqX-o_sJ.mjs')).EmailAuthProvider();
|
|
4447
4447
|
break;
|
|
4448
4448
|
case "wallet":
|
|
4449
4449
|
case "phantom": {
|
|
@@ -4462,7 +4462,7 @@ async function getAuthProvider(config) {
|
|
|
4462
4462
|
if (!isWalletLoginEnabled(config)) {
|
|
4463
4463
|
throw walletLoginNotEnabledError(authMethod);
|
|
4464
4464
|
}
|
|
4465
|
-
const { InjectedWalletProvider } = await import('./injected-wallet-provider-
|
|
4465
|
+
const { InjectedWalletProvider } = await import('./injected-wallet-provider-1IRUHyB3.mjs');
|
|
4466
4466
|
currentAuthProvider = new InjectedWalletProvider(resolveInjectedWalletConfig(config), rpcUrl, configuredNetwork);
|
|
4467
4467
|
break;
|
|
4468
4468
|
}
|
|
@@ -4475,7 +4475,7 @@ async function getAuthProvider(config) {
|
|
|
4475
4475
|
// Selecting authMethod:'evm-wallet' IS the opt-in — pass evmWalletConfig
|
|
4476
4476
|
// to point at a specific wallet or set chainId/domain.
|
|
4477
4477
|
const evmWalletConfig = ((_a = config.evmWalletConfig) !== null && _a !== void 0 ? _a : {});
|
|
4478
|
-
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-
|
|
4478
|
+
const { InjectedEvmWalletProvider } = await import('./injected-evm-wallet-provider-BZPmj8bC.mjs');
|
|
4479
4479
|
currentAuthProvider = new InjectedEvmWalletProvider(evmWalletConfig);
|
|
4480
4480
|
break;
|
|
4481
4481
|
}
|
|
@@ -4503,7 +4503,7 @@ async function getAuthProvider(config) {
|
|
|
4503
4503
|
break;
|
|
4504
4504
|
case "guest":
|
|
4505
4505
|
// Anonymous auth: a device-local ed25519 keypair signs the challenge.
|
|
4506
|
-
currentAuthProvider = new (await import('./guest-auth-provider-
|
|
4506
|
+
currentAuthProvider = new (await import('./guest-auth-provider-6bqnyX79.mjs')).GuestAuthProvider();
|
|
4507
4507
|
break;
|
|
4508
4508
|
}
|
|
4509
4509
|
if (!currentAuthProvider) {
|
|
@@ -4559,7 +4559,7 @@ async function signInAnonymously() {
|
|
|
4559
4559
|
// Lazy-load the guest provider so its ed25519/web3 dependencies stay out of
|
|
4560
4560
|
// the main bundle for data-only apps. Specifier is a static string literal
|
|
4561
4561
|
// so bundle-splitting can see it.
|
|
4562
|
-
const provider = new (await import('./guest-auth-provider-
|
|
4562
|
+
const provider = new (await import('./guest-auth-provider-6bqnyX79.mjs')).GuestAuthProvider();
|
|
4563
4563
|
setAuthLoading(true); // reflect "signing in…" while the guest keypair session is minted
|
|
4564
4564
|
const commit = (user) => {
|
|
4565
4565
|
// No await/interleaving inside this block: provider/method/config/marker
|
|
@@ -5355,9 +5355,11 @@ const BUILD_REVIEW_CAPABILITY_SCHEMA = 'bounded.build-review-capability.v1';
|
|
|
5355
5355
|
const BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA = 'bounded.build-review-capability-refresh.v1';
|
|
5356
5356
|
const BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA = 'bounded.build-delegated-review-capability.v1';
|
|
5357
5357
|
|
|
5358
|
+
const FAST_POLL_MS = 1000;
|
|
5358
5359
|
const NORMAL_POLL_MS = 2000;
|
|
5359
5360
|
const PARKED_POLL_MS = 5000;
|
|
5360
5361
|
const LONG_RUNNING_POLL_MS = 10000;
|
|
5362
|
+
const THIRTY_SECONDS_MS = 30000;
|
|
5361
5363
|
const TWO_MINUTES_MS = 2 * 60000;
|
|
5362
5364
|
const TEN_MINUTES_MS = 10 * 60000;
|
|
5363
5365
|
const terminalStates = new Set(TERMINAL_STATES);
|
|
@@ -5366,6 +5368,10 @@ function pollCadence(state, elapsedMs) {
|
|
|
5366
5368
|
return LONG_RUNNING_POLL_MS;
|
|
5367
5369
|
if ((state === null || state === void 0 ? void 0 : state.startsWith('parked')) || elapsedMs >= TWO_MINUTES_MS)
|
|
5368
5370
|
return PARKED_POLL_MS;
|
|
5371
|
+
// The first 30s is where the user is staring at "waiting for a build slot" /
|
|
5372
|
+
// "building" and every transition matters most; poll fast, then relax.
|
|
5373
|
+
if (elapsedMs < THIRTY_SECONDS_MS)
|
|
5374
|
+
return FAST_POLL_MS;
|
|
5369
5375
|
return NORMAL_POLL_MS;
|
|
5370
5376
|
}
|
|
5371
5377
|
function retryCadence(error, state, elapsedMs) {
|
|
@@ -5451,9 +5457,18 @@ function watch(appId, runId, onUpdate, options = {}) {
|
|
|
5451
5457
|
const poll = async () => {
|
|
5452
5458
|
if (!active)
|
|
5453
5459
|
return;
|
|
5460
|
+
// Fire the view and the events page concurrently: the events cursor (lastSeq)
|
|
5461
|
+
// does not depend on the run view, so there is no reason to pay two serial
|
|
5462
|
+
// round-trips per tick. Error semantics below are unchanged — the run result
|
|
5463
|
+
// still gates, and a failed events page still publishes the run with no rows.
|
|
5464
|
+
const runPromise = get(appId, runId);
|
|
5465
|
+
const eventsPromise = events(appId, runId, lastSeq);
|
|
5466
|
+
// Keep the in-flight events page from becoming an unhandled rejection if the
|
|
5467
|
+
// run result makes us bail before awaiting it; the real await below still sees it.
|
|
5468
|
+
eventsPromise.catch(() => { });
|
|
5454
5469
|
let run;
|
|
5455
5470
|
try {
|
|
5456
|
-
const view = await
|
|
5471
|
+
const view = await runPromise;
|
|
5457
5472
|
if (!active)
|
|
5458
5473
|
return;
|
|
5459
5474
|
run = view.run;
|
|
@@ -5471,7 +5486,7 @@ function watch(appId, runId, onUpdate, options = {}) {
|
|
|
5471
5486
|
return;
|
|
5472
5487
|
}
|
|
5473
5488
|
try {
|
|
5474
|
-
const response = await
|
|
5489
|
+
const response = await eventsPromise;
|
|
5475
5490
|
if (!active)
|
|
5476
5491
|
return;
|
|
5477
5492
|
const deduped = newEvents(Array.isArray(response.events) ? response.events : [], lastSeq, seenSeqs);
|
|
@@ -5613,7 +5628,27 @@ async function create(options = {}) {
|
|
|
5613
5628
|
method: 'POST',
|
|
5614
5629
|
body,
|
|
5615
5630
|
});
|
|
5616
|
-
return Object.assign(Object.assign({ appId: app.appId }, (typeof app.slug === 'string' && app.slug ? { slug: app.slug } : {})), { url: app.url });
|
|
5631
|
+
return Object.assign(Object.assign(Object.assign(Object.assign({ appId: app.appId }, (typeof app.slug === 'string' && app.slug ? { slug: app.slug } : {})), { url: app.url }), (typeof app.prompt === 'string' && app.prompt ? { prompt: app.prompt } : {})), (typeof app.handoff === 'string' && app.handoff ? { handoff: app.handoff } : {}));
|
|
5632
|
+
}
|
|
5633
|
+
/**
|
|
5634
|
+
* F-1200: build the create-flow redirect the owner is sent to after `create()`, with the
|
|
5635
|
+
* prompt and handoff carried in the URL FRAGMENT (never the query - fragments never reach
|
|
5636
|
+
* servers, logs, or Referer). Encoding is byte-exact so the widget's `URLSearchParams`
|
|
5637
|
+
* parse + `.trim()` reproduces the SAME prompt string dev-api hashed into the handoff;
|
|
5638
|
+
* getting this wrong would make the widget reject a genuine token and degrade to prefill.
|
|
5639
|
+
* Callers (bounded.sh, oapps.fun) should use this instead of hand-building the URL.
|
|
5640
|
+
*
|
|
5641
|
+
* Returns `${url}#bounded_prompt=<prompt>` with no `&bounded_handoff=` when the server
|
|
5642
|
+
* minted no handoff (HANDOFF_SECRET unset) - the widget then prefills without auto-running.
|
|
5643
|
+
*/
|
|
5644
|
+
function buildCreateRedirectUrl(app) {
|
|
5645
|
+
const base = app.url;
|
|
5646
|
+
const prompt = typeof app.prompt === 'string' ? app.prompt.trim() : '';
|
|
5647
|
+
if (!prompt)
|
|
5648
|
+
return base;
|
|
5649
|
+
const params = `bounded_prompt=${encodeURIComponent(prompt)}`
|
|
5650
|
+
+ (app.handoff ? `&bounded_handoff=${encodeURIComponent(app.handoff)}` : '');
|
|
5651
|
+
return `${base}#${params}`;
|
|
5617
5652
|
}
|
|
5618
5653
|
async function list() {
|
|
5619
5654
|
// This legacy-compatible action shape is also used by oapps.fun listMyApps.
|
|
@@ -5646,7 +5681,7 @@ async function list() {
|
|
|
5646
5681
|
* Platform first-party surfaces only (bounded.sh, oapps.fun, localhost) —
|
|
5647
5682
|
* dev-api CORS blocks calls from generated-app origins. Server-side callers unaffected.
|
|
5648
5683
|
*/
|
|
5649
|
-
const apps = { create, list };
|
|
5684
|
+
const apps = { create, list, buildCreateRedirectUrl };
|
|
5650
5685
|
|
|
5651
5686
|
async function deserializeTransaction(tx) {
|
|
5652
5687
|
// Literal specifier so bundlers can code-split the lazy chunk.
|
|
@@ -6044,4 +6079,4 @@ class PrivyExpoProvider {
|
|
|
6044
6079
|
}
|
|
6045
6080
|
|
|
6046
6081
|
export { useAuth as A, useBuildRun as B, apps as C, deserializeTransaction as D, EMBEDDED_WALLET_UNSUPPORTED as E, getIdToken as F, setPlatform as G, builds as H, BuildsApiError as I, PARK_REASONS as J, FAILURE_REASONS as K, BUILD_REVIEW_CAPABILITY_SCHEMA as L, BUILD_REVIEW_CAPABILITY_REFRESH_SCHEMA as M, NON_TERMINAL_STATES as N, OffchainAuthProvider as O, PrivyExpoProvider as P, BUILD_DELEGATED_REVIEW_CAPABILITY_SCHEMA as Q, RUN_STATES as R, TERMINAL_STATES as T, hasEmbeddedEvmWallet as a, embeddedSignAndSubmit as b, setAuthLoading as c, bufferExports as d, embeddedRunEvmTransaction as e, bs58 as f, getPlatform as g, hasEmbeddedWallet as h, confirmAndCheckTransaction as i, init as j, getCurrentUser as k, onAuthLoadingChanged as l, getAuthLoading as m, normalizeSolanaRpcUrl as n, onAuthStateChanged as o, login as p, logout as q, resolveSolanaRpcUrl as r, setCurrentUser as s, getAuthProvider as t, signInAnonymously as u, loginWithPrivy as v, loginWithRedirect as w, completeLoginFromRedirect as x, loginWithPopup as y, completeLoginInPopup as z };
|
|
6047
|
-
//# sourceMappingURL=index.native-
|
|
6082
|
+
//# sourceMappingURL=index.native-CTVEq0VY.mjs.map
|