@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.
- package/README.md +13 -1
- package/build.mjs +18 -1
- package/dist/authoring.d.ts +468 -61
- package/dist/authoring.js +317 -65
- package/dist/avatar.d.ts +29 -0
- package/dist/avatar.js +21 -0
- package/dist/browser.d.ts +241 -2213
- package/dist/browser.js +6 -6
- package/dist/chunk-4LBUTHD6.js +171 -0
- package/dist/{chunk-OQ4ZNOC7.js → chunk-7Q4BGGT6.js} +26 -5
- package/dist/{chunk-BGN3CQC6.js → chunk-P6FK43GG.js} +22 -8
- package/dist/chunk-PHU5VDLR.js +1003 -0
- package/dist/chunk-QR7ZA2BJ.js +257 -0
- package/dist/chunk-V7UKZLHA.js +35 -0
- package/dist/chunk-X2F2RAR3.js +1407 -0
- package/dist/chunk-YYD4QUBO.js +2348 -0
- package/dist/chunk-ZWY3R6B3.js +26 -0
- package/dist/client-CT4-S5vc.d.ts +2716 -0
- package/dist/collection-BGneJ6Bk.d.ts +114 -0
- package/dist/images-BTgk6OmC.d.ts +1564 -0
- package/dist/index.d.ts +11 -13133
- package/dist/index.js +20 -690
- package/dist/integrations-Ba5TtqTv.d.ts +410 -0
- package/dist/internal.d.ts +121 -0
- package/dist/internal.js +125 -0
- package/dist/pages-D3titw5B.d.ts +4193 -0
- package/dist/point-ledgers-iS00Z_v0.d.ts +37 -0
- package/dist/portal-proxy.js +8 -9
- package/dist/profiles-DDMFBRKe.d.ts +297 -0
- package/dist/react/index.d.ts +275 -2229
- package/dist/react/index.js +23 -19
- package/dist/schema-Di3aLSiK.d.ts +3532 -0
- package/dist/schema.d.ts +3168 -2395
- package/dist/schema.js +561 -3
- package/dist/streaks-CwGReWGt.d.ts +73 -0
- package/dist/submission-input-0OOGaq8c.d.ts +2672 -0
- package/dist/units-CwgsPB_r.d.ts +9 -0
- package/dist/wallet-BGOfFkG9.d.ts +231 -0
- package/package.json +18 -5
- package/dist/chunk-IZYXEXUO.js +0 -1847
- package/dist/chunk-QEN4GHL7.js +0 -624
- package/dist/chunk-UI4N4XRZ.js +0 -373
- package/dist/chunk-UPWID5KS.js +0 -1833
- 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
|
-
|
|
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
|
-
|
|
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
|
? {
|