@moneypot/hub 1.16.0 → 1.16.2

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 (34) hide show
  1. package/dist/cli/add-casino.js +6 -3
  2. package/dist/dashboard/assets/index-32DtKox_.css +5 -0
  3. package/dist/dashboard/assets/index-B4xPUnuF.js +412 -0
  4. package/dist/dashboard/index.html +2 -2
  5. package/dist/src/__generated__/graphql.d.ts +74 -32
  6. package/dist/src/__generated__/graphql.js +23 -14
  7. package/dist/src/db/index.d.ts +2 -4
  8. package/dist/src/db/index.js +31 -64
  9. package/dist/src/db/transaction.d.ts +17 -0
  10. package/dist/src/db/transaction.js +93 -0
  11. package/dist/src/hash-chain/db-hash-chain.js +0 -2
  12. package/dist/src/hash-chain/reveal-hash-chain.js +0 -2
  13. package/dist/src/pg-advisory-lock.js +0 -4
  14. package/dist/src/plugins/chat/hub-chat-subscription.d.ts +1 -1
  15. package/dist/src/plugins/hub-authenticate.js +1 -1
  16. package/dist/src/plugins/hub-make-outcome-bet.d.ts +4 -44
  17. package/dist/src/plugins/hub-make-outcome-bet.js +1 -1
  18. package/dist/src/plugins/hub-put-alert.js +2 -2
  19. package/dist/src/plugins/listen-with-filter.d.ts +4 -3
  20. package/dist/src/plugins/listen-with-filter.js +65 -8
  21. package/dist/src/plugins/validate-fields.js +25 -33
  22. package/dist/src/process-transfers/index.js +1 -1
  23. package/dist/src/process-transfers/polling-processor.js +0 -6
  24. package/dist/src/process-transfers/process-transfer.js +15 -0
  25. package/dist/src/risk-policy.js +1 -1
  26. package/dist/src/services/jwt-service.js +1 -1
  27. package/dist/src/take-request/process-take-request.js +19 -19
  28. package/dist/src/validate-zod.d.ts +3 -0
  29. package/dist/src/validate-zod.js +19 -0
  30. package/package.json +3 -4
  31. package/dist/dashboard/assets/index-D7SlWXgD.js +0 -383
  32. package/dist/dashboard/assets/index-LZVcTrKv.css +0 -5
  33. package/dist/src/validate.d.ts +0 -9
  34. package/dist/src/validate.js +0 -91
@@ -0,0 +1,19 @@
1
+ import z from "zod/v4";
2
+ export const baseUrl = () => z
3
+ .string()
4
+ .trim()
5
+ .min(1, "Base URL is required")
6
+ .refine((val) => URL.canParse(val), "Base URL is not a valid URL")
7
+ .transform((val) => new URL(val))
8
+ .refine((val) => val.protocol === "http:" || val.protocol === "https:", "Base URL must use http or https protocol")
9
+ .refine((val) => val.pathname === "/" && val.search === "" && val.hash === "", "Base URL must have no path, query, nor hash")
10
+ .transform((val) => val.toString().replace(/\/$/, ""));
11
+ export const graphqlUrl = () => z
12
+ .string()
13
+ .trim()
14
+ .min(1, "GraphQL URL is required")
15
+ .refine((val) => URL.canParse(val), "GraphQL URL is not a valid URL")
16
+ .transform((val) => new URL(val))
17
+ .refine((val) => val.protocol === "http:" || val.protocol === "https:", "GraphQL URL must use http or https protocol")
18
+ .refine((val) => val.pathname === "/graphql", "GraphQL URL must have /graphql path")
19
+ .transform((val) => val.toString().replace(/\/$/, ""));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moneypot/hub",
3
- "version": "1.16.0",
3
+ "version": "1.16.2",
4
4
  "author": "moneypot.com",
5
5
  "homepage": "https://moneypot.com/hub",
6
6
  "keywords": [
@@ -59,10 +59,9 @@
59
59
  "pg": "^8.12.0",
60
60
  "pg-connection-string": "^2.6.4",
61
61
  "pino": "^9.7.0",
62
- "postgraphile": "^5.0.0-beta.48",
62
+ "postgraphile": "^5.0.0-beta.49",
63
63
  "tsafe": "^1.6.6",
64
- "yup": "^1.6.1",
65
- "zod": "^3.23.5"
64
+ "zod": "^4.1.12"
66
65
  },
67
66
  "devDependencies": {
68
67
  "@eslint/js": "^9.8.0",