@domino-sdk/relay 1.0.0-next.0 → 1.0.0-next.10

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.
Files changed (44) hide show
  1. package/README.md +13 -1
  2. package/build.mjs +18 -1
  3. package/dist/authoring.d.ts +468 -61
  4. package/dist/authoring.js +317 -65
  5. package/dist/avatar.d.ts +29 -0
  6. package/dist/avatar.js +21 -0
  7. package/dist/browser.d.ts +241 -2213
  8. package/dist/browser.js +6 -6
  9. package/dist/chunk-4LBUTHD6.js +171 -0
  10. package/dist/{chunk-OQ4ZNOC7.js → chunk-7Q4BGGT6.js} +26 -5
  11. package/dist/{chunk-BGN3CQC6.js → chunk-P6FK43GG.js} +22 -8
  12. package/dist/chunk-PHU5VDLR.js +1003 -0
  13. package/dist/chunk-QR7ZA2BJ.js +257 -0
  14. package/dist/chunk-V7UKZLHA.js +35 -0
  15. package/dist/chunk-X2F2RAR3.js +1407 -0
  16. package/dist/chunk-YYD4QUBO.js +2348 -0
  17. package/dist/chunk-ZWY3R6B3.js +26 -0
  18. package/dist/client-CT4-S5vc.d.ts +2716 -0
  19. package/dist/collection-BGneJ6Bk.d.ts +114 -0
  20. package/dist/images-BTgk6OmC.d.ts +1564 -0
  21. package/dist/index.d.ts +11 -13133
  22. package/dist/index.js +20 -690
  23. package/dist/integrations-Ba5TtqTv.d.ts +410 -0
  24. package/dist/internal.d.ts +121 -0
  25. package/dist/internal.js +125 -0
  26. package/dist/pages-D3titw5B.d.ts +4193 -0
  27. package/dist/point-ledgers-iS00Z_v0.d.ts +37 -0
  28. package/dist/portal-proxy.js +8 -9
  29. package/dist/profiles-DDMFBRKe.d.ts +297 -0
  30. package/dist/react/index.d.ts +275 -2229
  31. package/dist/react/index.js +23 -19
  32. package/dist/schema-Di3aLSiK.d.ts +3532 -0
  33. package/dist/schema.d.ts +3168 -2395
  34. package/dist/schema.js +561 -3
  35. package/dist/streaks-CwGReWGt.d.ts +73 -0
  36. package/dist/submission-input-0OOGaq8c.d.ts +2672 -0
  37. package/dist/units-CwgsPB_r.d.ts +9 -0
  38. package/dist/wallet-BGOfFkG9.d.ts +231 -0
  39. package/package.json +18 -5
  40. package/dist/chunk-IZYXEXUO.js +0 -1847
  41. package/dist/chunk-QEN4GHL7.js +0 -624
  42. package/dist/chunk-UI4N4XRZ.js +0 -373
  43. package/dist/chunk-UPWID5KS.js +0 -1833
  44. package/dist/submission-input-JDwq3EVK.d.ts +0 -4986
package/README.md CHANGED
@@ -6,6 +6,18 @@ Author quests and connect an application to Domino Relay.
6
6
  pnpm add @domino-sdk/relay
7
7
  ```
8
8
 
9
- Use `@domino-sdk/relay/authoring` for quest definitions, `/browser` for browser integrations, `/portal-proxy` for server proxies, and `/build` for bundling authored modules.
9
+ | Import | For |
10
+ | -------------------------------- | ------------------------------------------------------------------------------------------ |
11
+ | `@domino-sdk/relay` | The participant client (`createRelayClient`), `RelayError`, and the types it returns |
12
+ | `@domino-sdk/relay/browser` | The browser client with durable submission recovery, wallet signers and sign-in options |
13
+ | `@domino-sdk/relay/react` | React hooks over the browser client |
14
+ | `@domino-sdk/relay/avatar` | Generated default avatars (`avatarSrc`, `defaultAvatar`) |
15
+ | `@domino-sdk/relay/authoring` | Quest, tracker, leaderboard, referral and engagement definitions, and evaluator types |
16
+ | `@domino-sdk/relay/schema` | Zod schemas of Relay's API bodies, deployments, tracker records and observations |
17
+ | `@domino-sdk/relay/build` | Bundling authored modules; needs `esbuild` installed |
18
+ | `@domino-sdk/relay/portal-proxy` | Server proxies and hosted app Workers |
19
+ | `@domino-sdk/relay/vite` | The Vite plugin that keeps server code out of the browser build |
20
+
21
+ `@domino-sdk/relay/internal` is shared by Relay's own services and Console. It is not a supported API and can change in any release.
10
22
 
11
23
  Requires Node.js 24 for tooling. Proprietary software; `UNLICENSED`.
package/build.mjs CHANGED
@@ -1,5 +1,21 @@
1
1
  import { resolve, dirname } from "node:path"
2
- import { build } from "esbuild"
2
+
3
+ // esbuild is an optional peer dependency: only quest builds need it, so apps that use the runtime
4
+ // client do not install its native binary. `@domino-sdk/relay-cli` depends on it.
5
+ async function esbuild() {
6
+ try {
7
+ return await import("esbuild")
8
+ } catch (error) {
9
+ if (error?.code === "ERR_MODULE_NOT_FOUND") {
10
+ throw new Error(
11
+ "@domino-sdk/relay/build needs esbuild. Install it next to @domino-sdk/relay, or build with the domino CLI (@domino-sdk/relay-cli).",
12
+ { cause: error }
13
+ )
14
+ }
15
+
16
+ throw error
17
+ }
18
+ }
3
19
 
4
20
  /** Bundle an authored quest without evaluating developer code in the build process. */
5
21
  export async function buildQuest(entry, options = {}) {
@@ -10,6 +26,7 @@ export async function buildQuest(entry, options = {}) {
10
26
  throw new Error("Invalid quest export name")
11
27
  }
12
28
 
29
+ const { build } = await esbuild()
13
30
  const result = await build({
14
31
  ...(options.exportName
15
32
  ? {