@moneypot/hub 1.19.15 → 1.19.16
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/dashboard/assets/index-Bl5lLFHa.css +1 -0
- package/dist/dashboard/assets/index-QbfKgHTj.js +350 -0
- package/dist/dashboard/index.html +2 -2
- package/dist/src/plugins/hub-add-casino.js +5 -1
- package/dist/src/plugins/validate-fields.d.ts +7 -0
- package/dist/src/plugins/validate-fields.js +1 -1
- package/package.json +1 -1
- package/dist/dashboard/assets/index-32DtKox_.css +0 -5
- package/dist/dashboard/assets/index-BlgWJql2.js +0 -418
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/dashboard/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/dashboard/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/dashboard/assets/index-QbfKgHTj.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/dashboard/assets/index-Bl5lLFHa.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
|
@@ -56,6 +56,7 @@ export const HubAddCasinoPlugin = makeExtendSchemaPlugin((build) => {
|
|
|
56
56
|
throw new GraphQLError("Unauthorized");
|
|
57
57
|
}
|
|
58
58
|
assert(is(input));
|
|
59
|
+
logger.info(input, "Input");
|
|
59
60
|
const { name, baseUrl, graphqlUrl, apiKey } = input;
|
|
60
61
|
const graphqlClient = new GraphQLClient(graphqlUrl, {
|
|
61
62
|
headers: {
|
|
@@ -68,7 +69,7 @@ export const HubAddCasinoPlugin = makeExtendSchemaPlugin((build) => {
|
|
|
68
69
|
.catch((e) => {
|
|
69
70
|
if (e.cause?.code === "ECONNREFUSED" ||
|
|
70
71
|
e.cause?.code === "ENOTFOUND") {
|
|
71
|
-
throw new GraphQLError(`Cannot connect to graphqlUrl`);
|
|
72
|
+
throw new GraphQLError(`Cannot connect to casino graphql url: ${graphqlUrl}`);
|
|
72
73
|
}
|
|
73
74
|
throw e;
|
|
74
75
|
});
|
|
@@ -145,6 +146,9 @@ export const HubAddCasinoPlugin = makeExtendSchemaPlugin((build) => {
|
|
|
145
146
|
pool: superuserPool,
|
|
146
147
|
});
|
|
147
148
|
return casino.id;
|
|
149
|
+
}).catch((e) => {
|
|
150
|
+
logger.error(e, "Error adding casino");
|
|
151
|
+
throw e;
|
|
148
152
|
});
|
|
149
153
|
});
|
|
150
154
|
return object({
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
import z from "zod/v4";
|
|
2
|
+
export declare const AddCasinoSchema: z.ZodObject<{
|
|
3
|
+
name: z.ZodString;
|
|
4
|
+
baseUrl: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<URL, string>>, z.ZodTransform<string, URL>>;
|
|
5
|
+
graphqlUrl: z.ZodPipe<z.ZodPipe<z.ZodString, z.ZodTransform<URL, string>>, z.ZodTransform<string, URL>>;
|
|
6
|
+
apiKey: z.ZodUUID;
|
|
7
|
+
}, z.core.$strict>;
|
|
1
8
|
export declare const ValidateCasinoFieldsPlugin: GraphileConfig.Plugin;
|
|
@@ -23,7 +23,7 @@ const CasinoPatchSchema = z.strictObject({
|
|
|
23
23
|
graphqlUrl: v.graphqlUrl().optional(),
|
|
24
24
|
baseUrl: v.baseUrl().optional(),
|
|
25
25
|
});
|
|
26
|
-
const AddCasinoSchema = z.strictObject({
|
|
26
|
+
export const AddCasinoSchema = z.strictObject({
|
|
27
27
|
name: z.string().trim().min(1),
|
|
28
28
|
baseUrl: v.baseUrl(),
|
|
29
29
|
graphqlUrl: v.graphqlUrl(),
|