strapi-plugin-comments 3.1.1 → 3.1.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.
- package/dist/_chunks/{index-CoArx2AB.mjs → index-111xj66k.mjs} +2 -2
- package/dist/_chunks/{index-CL3ZQ5c8.js → index-BYom1Ujm.js} +2 -2
- package/dist/_chunks/{index-s3cDVDHP.mjs → index-C4yRw0kg.mjs} +2 -2
- package/dist/_chunks/{index-D7OmqK1F.mjs → index-C6r-CX-i.mjs} +2 -2
- package/dist/_chunks/{index-BUbb2WGh.js → index-CQcJlyLz.js} +1 -1
- package/dist/_chunks/{index-Cpp_f9wq.js → index-DFSVVbXk.js} +1 -1
- package/dist/_chunks/{index-ZS4k_B_E.js → index-Ddsb0ILo.js} +1 -1
- package/dist/_chunks/{index-B7COUj1E.mjs → index-dty11bFS.mjs} +83 -83
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/api/client.d.ts +65 -65
- package/dist/admin/src/api/schemas.d.ts +537 -537
- package/dist/admin/src/contexts/UserContext.d.ts +1 -1
- package/dist/admin/src/hooks/useAPI.d.ts +66 -66
- package/dist/admin/src/hooks/useCommentMutations.d.ts +1 -1
- package/dist/admin/src/hooks/useCommentsAll.d.ts +4 -4
- package/dist/admin/src/hooks/useReports.d.ts +12 -12
- package/dist/admin/src/hooks/useUserContext.d.ts +1 -1
- package/dist/server/index.js +30 -30
- package/dist/server/index.mjs +281 -266
- package/dist/server/src/repositories/report.comment.repository.d.ts +66 -0
- package/dist/server/src/validators/repositories/comment.schema.d.ts +156 -0
- package/dist/server/src/validators/repositories/comment.validator.d.ts +16 -16
- package/dist/server/src/validators/repositories/reports.validator.d.ts +2709 -1149
- package/package.json +1 -1
package/dist/server/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z as v } from "zod";
|
|
2
|
-
import { isProfane as
|
|
2
|
+
import { isProfane as Ov, replaceProfanities as Cv } from "no-profanity";
|
|
3
3
|
import "fs";
|
|
4
4
|
import "path";
|
|
5
5
|
const mm = {
|
|
@@ -16,7 +16,7 @@ const mm = {
|
|
|
16
16
|
AUTHOR_BLOCKED_PROPS: "blockedAuthorProps"
|
|
17
17
|
};
|
|
18
18
|
var Ui = /* @__PURE__ */ ((i) => (i.PENDING = "PENDING", i.APPROVED = "APPROVED", i.REJECTED = "REJECTED", i))(Ui || {}), Zt = /* @__PURE__ */ ((i) => (i.BAD_LANGUAGE = "BAD_LANGUAGE", i.DISCRIMINATION = "DISCRIMINATION", i.OTHER = "OTHER", i))(Zt || {});
|
|
19
|
-
const
|
|
19
|
+
const Iv = "plugin::comments", xv = {
|
|
20
20
|
collectionName: "plugin_comments_comments",
|
|
21
21
|
info: {
|
|
22
22
|
tableName: "plugin-comments-comments",
|
|
@@ -110,9 +110,9 @@ const Cv = "plugin::comments", Iv = {
|
|
|
110
110
|
configurable: !1
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
}, xv = {
|
|
114
|
-
schema: Iv
|
|
115
113
|
}, Rv = {
|
|
114
|
+
schema: xv
|
|
115
|
+
}, Nv = {
|
|
116
116
|
collectionName: "plugin_comments_reports",
|
|
117
117
|
info: {
|
|
118
118
|
tableName: "plugin-comments-reports",
|
|
@@ -158,25 +158,25 @@ const Cv = "plugin::comments", Iv = {
|
|
|
158
158
|
configurable: !1
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
}, Nv = {
|
|
162
|
-
schema: Rv
|
|
163
161
|
}, Lv = {
|
|
164
|
-
|
|
165
|
-
"comment-report": Nv
|
|
162
|
+
schema: Nv
|
|
166
163
|
}, Pv = {
|
|
164
|
+
comment: Rv,
|
|
165
|
+
"comment-report": Lv
|
|
166
|
+
}, Dv = {
|
|
167
167
|
name: "comments",
|
|
168
168
|
plugin: "comments",
|
|
169
169
|
type: "json"
|
|
170
|
-
},
|
|
171
|
-
if (!
|
|
170
|
+
}, Fv = ({ strapi: i }) => {
|
|
171
|
+
if (!Uv({ strapi: i })) {
|
|
172
172
|
i.log.warn(
|
|
173
173
|
"[Comments Plugin] Custom fields disabled. Upgrade Strapi to use custom fields."
|
|
174
174
|
);
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
|
-
i.customFields.register(
|
|
178
|
-
},
|
|
179
|
-
|
|
177
|
+
i.customFields.register(Dv);
|
|
178
|
+
}, Uv = ({ strapi: i }) => !!i.customFields, ft = (i, u) => i.plugin("comments").service(u), Mv = (i) => {
|
|
179
|
+
Fv(i);
|
|
180
180
|
const u = ft(i.strapi, "common");
|
|
181
181
|
i.strapi.documents.use(async (o, h) => {
|
|
182
182
|
if (o.action === "delete" && o.uid.startsWith("api::")) {
|
|
@@ -196,7 +196,7 @@ const Cv = "plugin::comments", Iv = {
|
|
|
196
196
|
function vm(i) {
|
|
197
197
|
return typeof i == "string" ? i.split(":") : "createdAt:desc".split(":");
|
|
198
198
|
}
|
|
199
|
-
const
|
|
199
|
+
const Wv = (i) => {
|
|
200
200
|
const { gql: { auth: u = !1 } = {} } = i;
|
|
201
201
|
return {
|
|
202
202
|
"Query.findAllFlat": { auth: u },
|
|
@@ -206,7 +206,7 @@ const Mv = (i) => {
|
|
|
206
206
|
"Mutation.getRemoveComment": { auth: u },
|
|
207
207
|
"Mutation.getCreateAbuseReport": { auth: u }
|
|
208
208
|
};
|
|
209
|
-
},
|
|
209
|
+
}, Bv = (i, u) => {
|
|
210
210
|
const { nonNull: o } = u;
|
|
211
211
|
return {
|
|
212
212
|
type: o("Report"),
|
|
@@ -225,7 +225,7 @@ const Mv = (i) => {
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
},
|
|
228
|
+
}, $v = (i, u) => {
|
|
229
229
|
const { nonNull: o } = u;
|
|
230
230
|
return {
|
|
231
231
|
type: o("CommentSingle"),
|
|
@@ -244,7 +244,7 @@ const Mv = (i) => {
|
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
},
|
|
247
|
+
}, jv = (i, u) => {
|
|
248
248
|
const { nonNull: o } = u;
|
|
249
249
|
return {
|
|
250
250
|
type: o("CommentSingle"),
|
|
@@ -263,7 +263,7 @@ const Mv = (i) => {
|
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
|
-
},
|
|
266
|
+
}, kv = (i, u) => {
|
|
267
267
|
const { nonNull: o } = u;
|
|
268
268
|
return {
|
|
269
269
|
type: o("CommentSingle"),
|
|
@@ -282,12 +282,12 @@ const Mv = (i) => {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
};
|
|
285
|
-
},
|
|
285
|
+
}, Vv = (i, u) => {
|
|
286
286
|
const o = {
|
|
287
|
-
getCreateComment:
|
|
288
|
-
getUpdateComment:
|
|
289
|
-
getRemoveComment:
|
|
290
|
-
getCreateAbuseReport:
|
|
287
|
+
getCreateComment: $v,
|
|
288
|
+
getUpdateComment: kv,
|
|
289
|
+
getRemoveComment: jv,
|
|
290
|
+
getCreateAbuseReport: Bv
|
|
291
291
|
};
|
|
292
292
|
return u.extendType({
|
|
293
293
|
type: "Mutation",
|
|
@@ -4057,7 +4057,7 @@ const ua = (i) => {
|
|
|
4057
4057
|
fields: o,
|
|
4058
4058
|
omit: h
|
|
4059
4059
|
};
|
|
4060
|
-
},
|
|
4060
|
+
}, Gv = (i, u) => {
|
|
4061
4061
|
const { nonNull: o, stringArg: h } = u, { service: m } = i.plugin("graphql"), { args: A } = m("internals"), E = i.contentType(lr(i, "comment"));
|
|
4062
4062
|
return {
|
|
4063
4063
|
type: "ResponseFindAll",
|
|
@@ -4080,7 +4080,7 @@ const ua = (i) => {
|
|
|
4080
4080
|
);
|
|
4081
4081
|
}
|
|
4082
4082
|
};
|
|
4083
|
-
},
|
|
4083
|
+
}, zv = (i, u) => {
|
|
4084
4084
|
const { nonNull: o, list: h, stringArg: m } = u, { service: A } = i.plugin("graphql"), { args: E } = A("internals"), { naming: { getFiltersInputTypeName: C } } = A("utils"), x = i.contentType(lr(i, "comment"));
|
|
4085
4085
|
return {
|
|
4086
4086
|
type: o(h("CommentNested")),
|
|
@@ -4111,9 +4111,9 @@ const ua = (i) => {
|
|
|
4111
4111
|
}, ul = {
|
|
4112
4112
|
GENERIC: "GENERIC",
|
|
4113
4113
|
STRAPI: "STRAPI"
|
|
4114
|
-
},
|
|
4114
|
+
}, qv = {
|
|
4115
4115
|
relatedUid: /^(?<uid>[a-z0-9-]+\:{2}[a-z0-9-]+\.[a-z0-9-]+)\:{1}(?<id>[a-z0-9-]+)$/i
|
|
4116
|
-
},
|
|
4116
|
+
}, Hv = (i, u) => {
|
|
4117
4117
|
const { nonNull: o, intArg: h, arg: m } = u, { service: A } = i.plugin("graphql"), { args: E } = A("internals"), { naming: { getFiltersInputTypeName: C } } = A("utils"), x = i.contentType(lr(i, "comment"));
|
|
4118
4118
|
return {
|
|
4119
4119
|
type: "ResponseFindAllPerAuthor",
|
|
@@ -4138,11 +4138,11 @@ const ua = (i) => {
|
|
|
4138
4138
|
);
|
|
4139
4139
|
}
|
|
4140
4140
|
};
|
|
4141
|
-
},
|
|
4141
|
+
}, Yv = (i, u) => {
|
|
4142
4142
|
const o = {
|
|
4143
|
-
findAllFlat:
|
|
4144
|
-
findAllInHierarchy:
|
|
4145
|
-
findAllPerAuthor:
|
|
4143
|
+
findAllFlat: Gv,
|
|
4144
|
+
findAllInHierarchy: zv,
|
|
4145
|
+
findAllPerAuthor: Hv
|
|
4146
4146
|
};
|
|
4147
4147
|
return u.extendType({
|
|
4148
4148
|
type: "Query",
|
|
@@ -4153,36 +4153,36 @@ const ua = (i) => {
|
|
|
4153
4153
|
}
|
|
4154
4154
|
}
|
|
4155
4155
|
});
|
|
4156
|
-
},
|
|
4156
|
+
}, Qv = (i) => i.objectType({
|
|
4157
4157
|
name: "CommentSingle",
|
|
4158
4158
|
definition(u) {
|
|
4159
4159
|
u.id("id"), u.string("documentId"), u.nonNull.string("content"), u.boolean("blocked"), u.boolean("blockedThread"), u.boolean("removed"), u.string("approvalStatus"), u.field("threadOf", { type: "CommentSingle" }), u.field("author", { type: "CommentAuthor" }), u.string("createdAt"), u.string("updatedAt");
|
|
4160
4160
|
}
|
|
4161
|
-
}),
|
|
4161
|
+
}), Jv = (i) => i.objectType({
|
|
4162
4162
|
name: "CommentAuthor",
|
|
4163
4163
|
definition(u) {
|
|
4164
4164
|
u.id("id"), u.nonNull.string("name"), u.nonNull.string("email"), u.string("avatar");
|
|
4165
4165
|
}
|
|
4166
|
-
}),
|
|
4166
|
+
}), Xv = (i) => i.enumType({
|
|
4167
4167
|
name: "CommentAuthorType",
|
|
4168
4168
|
description: "User type which was the author of comment - Strapi built-in or generic",
|
|
4169
4169
|
members: Object.values(ul)
|
|
4170
|
-
}),
|
|
4170
|
+
}), Zv = (i) => i.objectType({
|
|
4171
4171
|
name: "CommentNested",
|
|
4172
4172
|
definition(u) {
|
|
4173
4173
|
u.id("id"), u.string("documentId"), u.nonNull.string("content"), u.boolean("blocked"), u.boolean("blockedThread"), u.string("approvalStatus"), u.boolean("removed"), u.field("threadOf", { type: "CommentSingle" }), u.list.field("children", { type: "CommentNested" }), u.field("author", { type: "CommentAuthor" }), u.string("createdAt"), u.string("updatedAt");
|
|
4174
4174
|
}
|
|
4175
|
-
}),
|
|
4175
|
+
}), Kv = (i) => i.inputObjectType({
|
|
4176
4176
|
name: "CreateComment",
|
|
4177
4177
|
definition(u) {
|
|
4178
4178
|
u.nonNull.string("content"), u.nonNull.string("relation"), u.id("threadOf"), u.field("author", { type: "CreateCommentAuthor" });
|
|
4179
4179
|
}
|
|
4180
|
-
}),
|
|
4180
|
+
}), e0 = (i) => i.inputObjectType({
|
|
4181
4181
|
name: "CreateCommentAuthor",
|
|
4182
4182
|
definition(u) {
|
|
4183
4183
|
u.nonNull.id("id"), u.nonNull.string("name"), u.string("email"), u.string("avatar");
|
|
4184
4184
|
}
|
|
4185
|
-
}),
|
|
4185
|
+
}), t0 = (i) => i.inputObjectType({
|
|
4186
4186
|
name: "CreateReport",
|
|
4187
4187
|
definition(u) {
|
|
4188
4188
|
u.id("commentId"), u.nonNull.string("relation"), u.nonNull.string("content"), u.field("reason", { type: "ReportReason" });
|
|
@@ -4195,17 +4195,17 @@ function He(i, u) {
|
|
|
4195
4195
|
function Ym(i) {
|
|
4196
4196
|
return typeof i == "object" && i !== null;
|
|
4197
4197
|
}
|
|
4198
|
-
function
|
|
4198
|
+
function n0(i, u) {
|
|
4199
4199
|
if (!!!i)
|
|
4200
4200
|
throw new Error(
|
|
4201
4201
|
"Unexpected invariant triggered."
|
|
4202
4202
|
);
|
|
4203
4203
|
}
|
|
4204
|
-
const
|
|
4204
|
+
const r0 = /\r\n|[\n\r]/g;
|
|
4205
4205
|
function ym(i, u) {
|
|
4206
4206
|
let o = 0, h = 1;
|
|
4207
|
-
for (const m of i.body.matchAll(
|
|
4208
|
-
if (typeof m.index == "number" ||
|
|
4207
|
+
for (const m of i.body.matchAll(r0)) {
|
|
4208
|
+
if (typeof m.index == "number" || n0(!1), m.index >= u)
|
|
4209
4209
|
break;
|
|
4210
4210
|
o = m.index + m[0].length, h += 1;
|
|
4211
4211
|
}
|
|
@@ -4214,7 +4214,7 @@ function ym(i, u) {
|
|
|
4214
4214
|
column: u + 1 - o
|
|
4215
4215
|
};
|
|
4216
4216
|
}
|
|
4217
|
-
function
|
|
4217
|
+
function i0(i) {
|
|
4218
4218
|
return Qm(
|
|
4219
4219
|
i.source,
|
|
4220
4220
|
ym(i.source, i.start)
|
|
@@ -4247,7 +4247,7 @@ function Nm(i) {
|
|
|
4247
4247
|
return u.map(([h, m]) => h.padStart(o) + (m ? " " + m : "")).join(`
|
|
4248
4248
|
`);
|
|
4249
4249
|
}
|
|
4250
|
-
function
|
|
4250
|
+
function o0(i) {
|
|
4251
4251
|
const u = i[0];
|
|
4252
4252
|
return u == null || "kind" in u || "length" in u ? {
|
|
4253
4253
|
nodes: u,
|
|
@@ -4299,7 +4299,7 @@ class $n extends Error {
|
|
|
4299
4299
|
*/
|
|
4300
4300
|
constructor(u, ...o) {
|
|
4301
4301
|
var h, m, A;
|
|
4302
|
-
const { nodes: E, source: C, positions: x, path: N, originalError: O, extensions: U } =
|
|
4302
|
+
const { nodes: E, source: C, positions: x, path: N, originalError: O, extensions: U } = o0(o);
|
|
4303
4303
|
super(u), this.name = "GraphQLError", this.path = N ?? void 0, this.originalError = O ?? void 0, this.nodes = Lm(
|
|
4304
4304
|
Array.isArray(E) ? E : E ? [E] : void 0
|
|
4305
4305
|
);
|
|
@@ -4349,7 +4349,7 @@ class $n extends Error {
|
|
|
4349
4349
|
for (const o of this.nodes)
|
|
4350
4350
|
o.loc && (u += `
|
|
4351
4351
|
|
|
4352
|
-
` +
|
|
4352
|
+
` + i0(o.loc));
|
|
4353
4353
|
else if (this.source && this.locations)
|
|
4354
4354
|
for (const o of this.locations)
|
|
4355
4355
|
u += `
|
|
@@ -4441,10 +4441,10 @@ const Jm = {
|
|
|
4441
4441
|
UnionTypeExtension: ["name", "directives", "types"],
|
|
4442
4442
|
EnumTypeExtension: ["name", "directives", "values"],
|
|
4443
4443
|
InputObjectTypeExtension: ["name", "directives", "fields"]
|
|
4444
|
-
},
|
|
4444
|
+
}, u0 = new Set(Object.keys(Jm));
|
|
4445
4445
|
function Pm(i) {
|
|
4446
4446
|
const u = i?.kind;
|
|
4447
|
-
return typeof u == "string" &&
|
|
4447
|
+
return typeof u == "string" && u0.has(u);
|
|
4448
4448
|
}
|
|
4449
4449
|
var Dm;
|
|
4450
4450
|
(function(i) {
|
|
@@ -4457,20 +4457,20 @@ var Xt;
|
|
|
4457
4457
|
function Fm(i) {
|
|
4458
4458
|
return i === 9 || i === 32;
|
|
4459
4459
|
}
|
|
4460
|
-
function
|
|
4460
|
+
function a0(i) {
|
|
4461
4461
|
return i >= 48 && i <= 57;
|
|
4462
4462
|
}
|
|
4463
4463
|
function Xm(i) {
|
|
4464
4464
|
return i >= 97 && i <= 122 || // A-Z
|
|
4465
4465
|
i >= 65 && i <= 90;
|
|
4466
4466
|
}
|
|
4467
|
-
function
|
|
4467
|
+
function s0(i) {
|
|
4468
4468
|
return Xm(i) || i === 95;
|
|
4469
4469
|
}
|
|
4470
|
-
function
|
|
4471
|
-
return Xm(i) ||
|
|
4470
|
+
function l0(i) {
|
|
4471
|
+
return Xm(i) || a0(i) || i === 95;
|
|
4472
4472
|
}
|
|
4473
|
-
function
|
|
4473
|
+
function c0(i, u) {
|
|
4474
4474
|
const o = i.replace(/"""/g, '\\"""'), h = o.split(/\r\n|[\n\r]/g), m = h.length === 1, A = h.length > 1 && h.slice(1).every((Q) => Q.length === 0 || Fm(Q.charCodeAt(0))), E = o.endsWith('\\"""'), C = i.endsWith('"') && !E, x = i.endsWith("\\"), N = C || x, O = (
|
|
4475
4475
|
// add leading and trailing new lines only if it improves readability
|
|
4476
4476
|
!m || i.length > 70 || N || A || E
|
|
@@ -4481,7 +4481,7 @@ function l0(i, u) {
|
|
|
4481
4481
|
`), U += o, (O || N) && (U += `
|
|
4482
4482
|
`), '"""' + U + '"""';
|
|
4483
4483
|
}
|
|
4484
|
-
const
|
|
4484
|
+
const f0 = 10, Zm = 2;
|
|
4485
4485
|
function jn(i) {
|
|
4486
4486
|
return Df(i, []);
|
|
4487
4487
|
}
|
|
@@ -4492,45 +4492,45 @@ function Df(i, u) {
|
|
|
4492
4492
|
case "function":
|
|
4493
4493
|
return i.name ? `[function ${i.name}]` : "[function]";
|
|
4494
4494
|
case "object":
|
|
4495
|
-
return
|
|
4495
|
+
return h0(i, u);
|
|
4496
4496
|
default:
|
|
4497
4497
|
return String(i);
|
|
4498
4498
|
}
|
|
4499
4499
|
}
|
|
4500
|
-
function
|
|
4500
|
+
function h0(i, u) {
|
|
4501
4501
|
if (i === null)
|
|
4502
4502
|
return "null";
|
|
4503
4503
|
if (u.includes(i))
|
|
4504
4504
|
return "[Circular]";
|
|
4505
4505
|
const o = [...u, i];
|
|
4506
|
-
if (
|
|
4506
|
+
if (p0(i)) {
|
|
4507
4507
|
const h = i.toJSON();
|
|
4508
4508
|
if (h !== i)
|
|
4509
4509
|
return typeof h == "string" ? h : Df(h, o);
|
|
4510
4510
|
} else if (Array.isArray(i))
|
|
4511
|
-
return
|
|
4512
|
-
return
|
|
4511
|
+
return g0(i, o);
|
|
4512
|
+
return d0(i, o);
|
|
4513
4513
|
}
|
|
4514
|
-
function
|
|
4514
|
+
function p0(i) {
|
|
4515
4515
|
return typeof i.toJSON == "function";
|
|
4516
4516
|
}
|
|
4517
|
-
function
|
|
4517
|
+
function d0(i, u) {
|
|
4518
4518
|
const o = Object.entries(i);
|
|
4519
|
-
return o.length === 0 ? "{}" : u.length > Zm ? "[" +
|
|
4519
|
+
return o.length === 0 ? "{}" : u.length > Zm ? "[" + m0(i) + "]" : "{ " + o.map(
|
|
4520
4520
|
([m, A]) => m + ": " + Df(A, u)
|
|
4521
4521
|
).join(", ") + " }";
|
|
4522
4522
|
}
|
|
4523
|
-
function
|
|
4523
|
+
function g0(i, u) {
|
|
4524
4524
|
if (i.length === 0)
|
|
4525
4525
|
return "[]";
|
|
4526
4526
|
if (u.length > Zm)
|
|
4527
4527
|
return "[Array]";
|
|
4528
|
-
const o = Math.min(
|
|
4528
|
+
const o = Math.min(f0, i.length), h = i.length - o, m = [];
|
|
4529
4529
|
for (let A = 0; A < o; ++A)
|
|
4530
4530
|
m.push(Df(i[A], u));
|
|
4531
4531
|
return h === 1 ? m.push("... 1 more item") : h > 1 && m.push(`... ${h} more items`), "[" + m.join(", ") + "]";
|
|
4532
4532
|
}
|
|
4533
|
-
function
|
|
4533
|
+
function m0(i) {
|
|
4534
4534
|
const u = Object.prototype.toString.call(i).replace(/^\[object /, "").replace(/]$/, "");
|
|
4535
4535
|
if (u === "Object" && typeof i.constructor == "function") {
|
|
4536
4536
|
const o = i.constructor.name;
|
|
@@ -4539,11 +4539,11 @@ function g0(i) {
|
|
|
4539
4539
|
}
|
|
4540
4540
|
return u;
|
|
4541
4541
|
}
|
|
4542
|
-
const
|
|
4542
|
+
const v0 = globalThis.process && // eslint-disable-next-line no-undef
|
|
4543
4543
|
process.env.NODE_ENV === "production", Mi = (
|
|
4544
4544
|
/* c8 ignore next 6 */
|
|
4545
4545
|
// FIXME: https://github.com/graphql/graphql-js/issues/2317
|
|
4546
|
-
|
|
4546
|
+
v0 ? function(u, o) {
|
|
4547
4547
|
return u instanceof o;
|
|
4548
4548
|
} : function(u, o) {
|
|
4549
4549
|
if (u instanceof o)
|
|
@@ -4572,8 +4572,8 @@ spurious results.`);
|
|
|
4572
4572
|
}
|
|
4573
4573
|
return !1;
|
|
4574
4574
|
}
|
|
4575
|
-
),
|
|
4576
|
-
function
|
|
4575
|
+
), y0 = 5;
|
|
4576
|
+
function _0(i, u) {
|
|
4577
4577
|
const [o, h] = u ? [i, u] : [void 0, i];
|
|
4578
4578
|
let m = " Did you mean ";
|
|
4579
4579
|
o && (m += o + " ");
|
|
@@ -4586,13 +4586,13 @@ function y0(i, u) {
|
|
|
4586
4586
|
case 2:
|
|
4587
4587
|
return m + A[0] + " or " + A[1] + "?";
|
|
4588
4588
|
}
|
|
4589
|
-
const E = A.slice(0,
|
|
4589
|
+
const E = A.slice(0, y0), C = E.pop();
|
|
4590
4590
|
return m + E.join(", ") + ", or " + C + "?";
|
|
4591
4591
|
}
|
|
4592
4592
|
function Um(i) {
|
|
4593
4593
|
return i;
|
|
4594
4594
|
}
|
|
4595
|
-
function
|
|
4595
|
+
function b0(i, u) {
|
|
4596
4596
|
const o = /* @__PURE__ */ Object.create(null);
|
|
4597
4597
|
for (const h of i)
|
|
4598
4598
|
o[u(h)] = h;
|
|
@@ -4610,7 +4610,7 @@ function Ff(i, u) {
|
|
|
4610
4610
|
o[h] = u(i[h], h);
|
|
4611
4611
|
return o;
|
|
4612
4612
|
}
|
|
4613
|
-
function
|
|
4613
|
+
function w0(i, u) {
|
|
4614
4614
|
let o = 0, h = 0;
|
|
4615
4615
|
for (; o < i.length && h < u.length; ) {
|
|
4616
4616
|
let m = i.charCodeAt(o), A = u.charCodeAt(h);
|
|
@@ -4637,22 +4637,22 @@ function b0(i, u) {
|
|
|
4637
4637
|
}
|
|
4638
4638
|
return i.length - u.length;
|
|
4639
4639
|
}
|
|
4640
|
-
const _m = 48,
|
|
4640
|
+
const _m = 48, A0 = 57;
|
|
4641
4641
|
function Ef(i) {
|
|
4642
|
-
return !isNaN(i) && _m <= i && i <=
|
|
4642
|
+
return !isNaN(i) && _m <= i && i <= A0;
|
|
4643
4643
|
}
|
|
4644
|
-
function
|
|
4645
|
-
const o = /* @__PURE__ */ Object.create(null), h = new
|
|
4644
|
+
function S0(i, u) {
|
|
4645
|
+
const o = /* @__PURE__ */ Object.create(null), h = new E0(i), m = Math.floor(i.length * 0.4) + 1;
|
|
4646
4646
|
for (const A of u) {
|
|
4647
4647
|
const E = h.measure(A, m);
|
|
4648
4648
|
E !== void 0 && (o[A] = E);
|
|
4649
4649
|
}
|
|
4650
4650
|
return Object.keys(o).sort((A, E) => {
|
|
4651
4651
|
const C = o[A] - o[E];
|
|
4652
|
-
return C !== 0 ? C :
|
|
4652
|
+
return C !== 0 ? C : w0(A, E);
|
|
4653
4653
|
});
|
|
4654
4654
|
}
|
|
4655
|
-
class
|
|
4655
|
+
class E0 {
|
|
4656
4656
|
constructor(u) {
|
|
4657
4657
|
this._input = u, this._inputLowerCase = u.toLowerCase(), this._inputArray = Mm(this._inputLowerCase), this._rows = [
|
|
4658
4658
|
new Array(u.length + 1).fill(0),
|
|
@@ -4719,14 +4719,14 @@ function Rr(i) {
|
|
|
4719
4719
|
u[o] = h;
|
|
4720
4720
|
return u;
|
|
4721
4721
|
}
|
|
4722
|
-
function
|
|
4723
|
-
return `"${i.replace(
|
|
4722
|
+
function T0(i) {
|
|
4723
|
+
return `"${i.replace(O0, C0)}"`;
|
|
4724
4724
|
}
|
|
4725
|
-
const
|
|
4726
|
-
function
|
|
4727
|
-
return
|
|
4725
|
+
const O0 = /[\x00-\x1f\x22\x5c\x7f-\x9f]/g;
|
|
4726
|
+
function C0(i) {
|
|
4727
|
+
return I0[i.charCodeAt(0)];
|
|
4728
4728
|
}
|
|
4729
|
-
const
|
|
4729
|
+
const I0 = [
|
|
4730
4730
|
"\\u0000",
|
|
4731
4731
|
"\\u0001",
|
|
4732
4732
|
"\\u0002",
|
|
@@ -4892,11 +4892,11 @@ const C0 = [
|
|
|
4892
4892
|
"\\u009D",
|
|
4893
4893
|
"\\u009E",
|
|
4894
4894
|
"\\u009F"
|
|
4895
|
-
],
|
|
4896
|
-
function
|
|
4895
|
+
], x0 = Object.freeze({});
|
|
4896
|
+
function R0(i, u, o = Jm) {
|
|
4897
4897
|
const h = /* @__PURE__ */ new Map();
|
|
4898
4898
|
for (const X of Object.values(Xt))
|
|
4899
|
-
h.set(X,
|
|
4899
|
+
h.set(X, N0(u, X));
|
|
4900
4900
|
let m, A = Array.isArray(i), E = [i], C = -1, x = [], N = i, O, U;
|
|
4901
4901
|
const M = [], Q = [];
|
|
4902
4902
|
do {
|
|
@@ -4927,7 +4927,7 @@ function x0(i, u, o = Jm) {
|
|
|
4927
4927
|
var j, J;
|
|
4928
4928
|
Pm(N) || He(!1, `Invalid AST Node: ${jn(N)}.`);
|
|
4929
4929
|
const Pe = X ? (j = h.get(N.kind)) === null || j === void 0 ? void 0 : j.leave : (J = h.get(N.kind)) === null || J === void 0 ? void 0 : J.enter;
|
|
4930
|
-
if (ve = Pe?.call(u, N, O, U, M, Q), ve ===
|
|
4930
|
+
if (ve = Pe?.call(u, N, O, U, M, Q), ve === x0)
|
|
4931
4931
|
break;
|
|
4932
4932
|
if (ve === !1) {
|
|
4933
4933
|
if (!X) {
|
|
@@ -4957,7 +4957,7 @@ function x0(i, u, o = Jm) {
|
|
|
4957
4957
|
} while (m !== void 0);
|
|
4958
4958
|
return x.length !== 0 ? x[x.length - 1][1] : i;
|
|
4959
4959
|
}
|
|
4960
|
-
function
|
|
4960
|
+
function N0(i, u) {
|
|
4961
4961
|
const o = i[u];
|
|
4962
4962
|
return typeof o == "object" ? o : typeof o == "function" ? {
|
|
4963
4963
|
enter: o,
|
|
@@ -4968,9 +4968,9 @@ function R0(i, u) {
|
|
|
4968
4968
|
};
|
|
4969
4969
|
}
|
|
4970
4970
|
function Wm(i) {
|
|
4971
|
-
return
|
|
4971
|
+
return R0(i, P0);
|
|
4972
4972
|
}
|
|
4973
|
-
const
|
|
4973
|
+
const L0 = 80, P0 = {
|
|
4974
4974
|
Name: {
|
|
4975
4975
|
leave: (i) => i.value
|
|
4976
4976
|
},
|
|
@@ -5006,7 +5006,7 @@ const N0 = 80, L0 = {
|
|
|
5006
5006
|
leave({ alias: i, name: u, arguments: o, directives: h, selectionSet: m }) {
|
|
5007
5007
|
const A = le("", i, ": ") + u;
|
|
5008
5008
|
let E = A + le("(", G(o, ", "), ")");
|
|
5009
|
-
return E.length >
|
|
5009
|
+
return E.length > L0 && (E = A + le(`(
|
|
5010
5010
|
`, If(G(o, `
|
|
5011
5011
|
`)), `
|
|
5012
5012
|
)`)), G([E, G(h, " "), m], " ");
|
|
@@ -5044,7 +5044,7 @@ const N0 = 80, L0 = {
|
|
|
5044
5044
|
leave: ({ value: i }) => i
|
|
5045
5045
|
},
|
|
5046
5046
|
StringValue: {
|
|
5047
|
-
leave: ({ value: i, block: u }) => u ?
|
|
5047
|
+
leave: ({ value: i, block: u }) => u ? c0(i) : T0(i)
|
|
5048
5048
|
},
|
|
5049
5049
|
BooleanValue: {
|
|
5050
5050
|
leave: ({ value: i }) => i ? "true" : "false"
|
|
@@ -5259,49 +5259,49 @@ function cr(i) {
|
|
|
5259
5259
|
if (i != null || He(!1, "Must provide name."), typeof i == "string" || He(!1, "Expected name to be a string."), i.length === 0)
|
|
5260
5260
|
throw new $n("Expected name to be a non-empty string.");
|
|
5261
5261
|
for (let u = 1; u < i.length; ++u)
|
|
5262
|
-
if (!
|
|
5262
|
+
if (!l0(i.charCodeAt(u)))
|
|
5263
5263
|
throw new $n(
|
|
5264
5264
|
`Names must only contain [_a-zA-Z0-9] but "${i}" does not.`
|
|
5265
5265
|
);
|
|
5266
|
-
if (!
|
|
5266
|
+
if (!s0(i.charCodeAt(0)))
|
|
5267
5267
|
throw new $n(
|
|
5268
5268
|
`Names must start with [_a-zA-Z] but "${i}" does not.`
|
|
5269
5269
|
);
|
|
5270
5270
|
return i;
|
|
5271
5271
|
}
|
|
5272
|
-
function
|
|
5272
|
+
function D0(i) {
|
|
5273
5273
|
if (i === "true" || i === "false" || i === "null")
|
|
5274
5274
|
throw new $n(`Enum values cannot be named: ${i}`);
|
|
5275
5275
|
return cr(i);
|
|
5276
5276
|
}
|
|
5277
5277
|
function ll(i) {
|
|
5278
|
-
return
|
|
5279
|
-
}
|
|
5280
|
-
function D0(i) {
|
|
5281
|
-
return Mi(i, tv);
|
|
5278
|
+
return F0(i) || U0(i) || M0(i) || W0(i) || B0(i) || $0(i) || j0(i) || Im(i);
|
|
5282
5279
|
}
|
|
5283
5280
|
function F0(i) {
|
|
5284
|
-
return Mi(i,
|
|
5281
|
+
return Mi(i, tv);
|
|
5285
5282
|
}
|
|
5286
5283
|
function U0(i) {
|
|
5287
|
-
return Mi(i,
|
|
5284
|
+
return Mi(i, z0);
|
|
5288
5285
|
}
|
|
5289
5286
|
function M0(i) {
|
|
5290
5287
|
return Mi(i, Y0);
|
|
5291
5288
|
}
|
|
5292
5289
|
function W0(i) {
|
|
5293
|
-
return Mi(i,
|
|
5290
|
+
return Mi(i, Q0);
|
|
5294
5291
|
}
|
|
5295
5292
|
function B0(i) {
|
|
5296
5293
|
return Mi(i, X0);
|
|
5297
5294
|
}
|
|
5298
5295
|
function $0(i) {
|
|
5299
|
-
return Mi(i,
|
|
5296
|
+
return Mi(i, Z0);
|
|
5300
5297
|
}
|
|
5301
|
-
function
|
|
5298
|
+
function j0(i) {
|
|
5302
5299
|
return Mi(i, k0);
|
|
5303
5300
|
}
|
|
5304
|
-
|
|
5301
|
+
function Im(i) {
|
|
5302
|
+
return Mi(i, V0);
|
|
5303
|
+
}
|
|
5304
|
+
class k0 {
|
|
5305
5305
|
constructor(u) {
|
|
5306
5306
|
ll(u) || He(!1, `Expected ${jn(u)} to be a GraphQL type.`), this.ofType = u;
|
|
5307
5307
|
}
|
|
@@ -5315,9 +5315,9 @@ class j0 {
|
|
|
5315
5315
|
return this.toString();
|
|
5316
5316
|
}
|
|
5317
5317
|
}
|
|
5318
|
-
class
|
|
5318
|
+
class V0 {
|
|
5319
5319
|
constructor(u) {
|
|
5320
|
-
|
|
5320
|
+
G0(u) || He(
|
|
5321
5321
|
!1,
|
|
5322
5322
|
`Expected ${jn(u)} to be a GraphQL nullable type.`
|
|
5323
5323
|
), this.ofType = u;
|
|
@@ -5332,7 +5332,7 @@ class k0 {
|
|
|
5332
5332
|
return this.toString();
|
|
5333
5333
|
}
|
|
5334
5334
|
}
|
|
5335
|
-
function
|
|
5335
|
+
function G0(i) {
|
|
5336
5336
|
return ll(i) && !Im(i);
|
|
5337
5337
|
}
|
|
5338
5338
|
function Km(i) {
|
|
@@ -5379,7 +5379,7 @@ class tv {
|
|
|
5379
5379
|
return this.toString();
|
|
5380
5380
|
}
|
|
5381
5381
|
}
|
|
5382
|
-
class
|
|
5382
|
+
class z0 {
|
|
5383
5383
|
constructor(u) {
|
|
5384
5384
|
var o;
|
|
5385
5385
|
this.name = cr(u.name), this.description = u.description, this.isTypeOf = u.isTypeOf, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = () => rv(u), this._interfaces = () => nv(u), u.isTypeOf == null || typeof u.isTypeOf == "function" || He(
|
|
@@ -5447,7 +5447,7 @@ function rv(i) {
|
|
|
5447
5447
|
name: cr(h),
|
|
5448
5448
|
description: o.description,
|
|
5449
5449
|
type: o.type,
|
|
5450
|
-
args:
|
|
5450
|
+
args: q0(A),
|
|
5451
5451
|
resolve: o.resolve,
|
|
5452
5452
|
subscribe: o.subscribe,
|
|
5453
5453
|
deprecationReason: o.deprecationReason,
|
|
@@ -5456,7 +5456,7 @@ function rv(i) {
|
|
|
5456
5456
|
};
|
|
5457
5457
|
});
|
|
5458
5458
|
}
|
|
5459
|
-
function
|
|
5459
|
+
function q0(i) {
|
|
5460
5460
|
return Object.entries(i).map(([u, o]) => ({
|
|
5461
5461
|
name: cr(u),
|
|
5462
5462
|
description: o.description,
|
|
@@ -5474,7 +5474,7 @@ function iv(i) {
|
|
|
5474
5474
|
return Ff(i, (u) => ({
|
|
5475
5475
|
description: u.description,
|
|
5476
5476
|
type: u.type,
|
|
5477
|
-
args:
|
|
5477
|
+
args: H0(u.args),
|
|
5478
5478
|
resolve: u.resolve,
|
|
5479
5479
|
subscribe: u.subscribe,
|
|
5480
5480
|
deprecationReason: u.deprecationReason,
|
|
@@ -5482,7 +5482,7 @@ function iv(i) {
|
|
|
5482
5482
|
astNode: u.astNode
|
|
5483
5483
|
}));
|
|
5484
5484
|
}
|
|
5485
|
-
function
|
|
5485
|
+
function H0(i) {
|
|
5486
5486
|
return Cm(
|
|
5487
5487
|
i,
|
|
5488
5488
|
(u) => u.name,
|
|
@@ -5496,7 +5496,7 @@ function q0(i) {
|
|
|
5496
5496
|
})
|
|
5497
5497
|
);
|
|
5498
5498
|
}
|
|
5499
|
-
class
|
|
5499
|
+
class Y0 {
|
|
5500
5500
|
constructor(u) {
|
|
5501
5501
|
var o;
|
|
5502
5502
|
this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._fields = rv.bind(void 0, u), this._interfaces = nv.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
|
|
@@ -5532,10 +5532,10 @@ class H0 {
|
|
|
5532
5532
|
return this.toString();
|
|
5533
5533
|
}
|
|
5534
5534
|
}
|
|
5535
|
-
class
|
|
5535
|
+
class Q0 {
|
|
5536
5536
|
constructor(u) {
|
|
5537
5537
|
var o;
|
|
5538
|
-
this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._types =
|
|
5538
|
+
this.name = cr(u.name), this.description = u.description, this.resolveType = u.resolveType, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this._types = J0.bind(void 0, u), u.resolveType == null || typeof u.resolveType == "function" || He(
|
|
5539
5539
|
!1,
|
|
5540
5540
|
`${this.name} must provide "resolveType" as a function, but got: ${jn(u.resolveType)}.`
|
|
5541
5541
|
);
|
|
@@ -5564,14 +5564,14 @@ class Y0 {
|
|
|
5564
5564
|
return this.toString();
|
|
5565
5565
|
}
|
|
5566
5566
|
}
|
|
5567
|
-
function
|
|
5567
|
+
function J0(i) {
|
|
5568
5568
|
const u = Km(i.types);
|
|
5569
5569
|
return Array.isArray(u) || He(
|
|
5570
5570
|
!1,
|
|
5571
5571
|
`Must provide Array of types or a function which returns such an array for Union ${i.name}.`
|
|
5572
5572
|
), u;
|
|
5573
5573
|
}
|
|
5574
|
-
class
|
|
5574
|
+
class X0 {
|
|
5575
5575
|
/* <T> */
|
|
5576
5576
|
constructor(u) {
|
|
5577
5577
|
var o;
|
|
@@ -5584,7 +5584,7 @@ class J0 {
|
|
|
5584
5584
|
return typeof this._values == "function" && (this._values = $m(this.name, this._values())), this._values;
|
|
5585
5585
|
}
|
|
5586
5586
|
getValue(u) {
|
|
5587
|
-
return this._nameLookup === null && (this._nameLookup =
|
|
5587
|
+
return this._nameLookup === null && (this._nameLookup = b0(this.getValues(), (o) => o.name)), this._nameLookup[u];
|
|
5588
5588
|
}
|
|
5589
5589
|
serialize(u) {
|
|
5590
5590
|
this._valueLookup === null && (this._valueLookup = new Map(
|
|
@@ -5662,8 +5662,8 @@ class J0 {
|
|
|
5662
5662
|
}
|
|
5663
5663
|
}
|
|
5664
5664
|
function Tf(i, u) {
|
|
5665
|
-
const o = i.getValues().map((m) => m.name), h =
|
|
5666
|
-
return
|
|
5665
|
+
const o = i.getValues().map((m) => m.name), h = S0(u, o);
|
|
5666
|
+
return _0("the enum value", h);
|
|
5667
5667
|
}
|
|
5668
5668
|
function $m(i, u) {
|
|
5669
5669
|
return aa(u) || He(
|
|
@@ -5673,7 +5673,7 @@ function $m(i, u) {
|
|
|
5673
5673
|
!1,
|
|
5674
5674
|
`${i}.${o} must refer to an object with a "value" key representing an internal value but got: ${jn(h)}.`
|
|
5675
5675
|
), {
|
|
5676
|
-
name:
|
|
5676
|
+
name: D0(o),
|
|
5677
5677
|
description: h.description,
|
|
5678
5678
|
value: h.value !== void 0 ? h.value : o,
|
|
5679
5679
|
deprecationReason: h.deprecationReason,
|
|
@@ -5681,10 +5681,10 @@ function $m(i, u) {
|
|
|
5681
5681
|
astNode: h.astNode
|
|
5682
5682
|
}));
|
|
5683
5683
|
}
|
|
5684
|
-
class
|
|
5684
|
+
class Z0 {
|
|
5685
5685
|
constructor(u) {
|
|
5686
5686
|
var o, h;
|
|
5687
|
-
this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this.isOneOf = (h = u.isOneOf) !== null && h !== void 0 ? h : !1, this._fields =
|
|
5687
|
+
this.name = cr(u.name), this.description = u.description, this.extensions = Rr(u.extensions), this.astNode = u.astNode, this.extensionASTNodes = (o = u.extensionASTNodes) !== null && o !== void 0 ? o : [], this.isOneOf = (h = u.isOneOf) !== null && h !== void 0 ? h : !1, this._fields = K0.bind(void 0, u);
|
|
5688
5688
|
}
|
|
5689
5689
|
get [Symbol.toStringTag]() {
|
|
5690
5690
|
return "GraphQLInputObjectType";
|
|
@@ -5718,7 +5718,7 @@ class X0 {
|
|
|
5718
5718
|
return this.toString();
|
|
5719
5719
|
}
|
|
5720
5720
|
}
|
|
5721
|
-
function
|
|
5721
|
+
function K0(i) {
|
|
5722
5722
|
const u = ev(i.fields);
|
|
5723
5723
|
return aa(u) || He(
|
|
5724
5724
|
!1,
|
|
@@ -5737,12 +5737,12 @@ function Z0(i) {
|
|
|
5737
5737
|
}));
|
|
5738
5738
|
}
|
|
5739
5739
|
function Wi(i) {
|
|
5740
|
-
const u =
|
|
5740
|
+
const u = ey(i);
|
|
5741
5741
|
if (u)
|
|
5742
5742
|
throw u;
|
|
5743
5743
|
return i;
|
|
5744
5744
|
}
|
|
5745
|
-
function
|
|
5745
|
+
function ey(i) {
|
|
5746
5746
|
if (typeof i == "string" || He(!1, "Expected name to be a string."), i.startsWith("__"))
|
|
5747
5747
|
return new $n(
|
|
5748
5748
|
`Name "${i}" must not begin with "__", which is reserved by GraphQL introspection.`
|
|
@@ -5753,7 +5753,7 @@ function K0(i) {
|
|
|
5753
5753
|
return u;
|
|
5754
5754
|
}
|
|
5755
5755
|
}
|
|
5756
|
-
const
|
|
5756
|
+
const ty = (i) => i.scalarType({
|
|
5757
5757
|
name: "ID",
|
|
5758
5758
|
asNexusMethod: "id",
|
|
5759
5759
|
description: "id as string or integer",
|
|
@@ -5765,77 +5765,77 @@ const ey = (i) => i.scalarType({
|
|
|
5765
5765
|
parseLiteral(u) {
|
|
5766
5766
|
return u.kind === Xt.INT || u.kind === Xt.STRING ? u.value : null;
|
|
5767
5767
|
}
|
|
5768
|
-
}),
|
|
5768
|
+
}), ny = (i) => i.inputObjectType({
|
|
5769
5769
|
name: "IdentifyCommentAuthor",
|
|
5770
5770
|
definition(u) {
|
|
5771
5771
|
u.nonNull.id("id");
|
|
5772
5772
|
}
|
|
5773
|
-
}),
|
|
5773
|
+
}), ry = (i) => i.inputObjectType({
|
|
5774
5774
|
name: "RemoveComment",
|
|
5775
5775
|
definition(u) {
|
|
5776
5776
|
u.id("id"), u.nonNull.string("relation"), u.field("author", { type: "IdentifyCommentAuthor" });
|
|
5777
5777
|
}
|
|
5778
|
-
}),
|
|
5778
|
+
}), iy = (i) => i.objectType({
|
|
5779
5779
|
name: "Report",
|
|
5780
5780
|
definition(u) {
|
|
5781
5781
|
u.id("id"), u.nonNull.string("content"), u.field("reason", { type: "ReportReason" }), u.field("related", { type: "CommentSingle" }), u.string("createdAt"), u.string("updatedAt");
|
|
5782
5782
|
}
|
|
5783
|
-
}),
|
|
5783
|
+
}), oy = (i, { reportReasons: u }) => i.enumType({
|
|
5784
5784
|
name: "ReportReason",
|
|
5785
5785
|
description: "Reason of abuse report",
|
|
5786
5786
|
members: Object.values(u)
|
|
5787
|
-
}),
|
|
5787
|
+
}), uy = (i) => i.objectType({
|
|
5788
5788
|
name: "ResponseFindAll",
|
|
5789
5789
|
definition(u) {
|
|
5790
5790
|
u.nonNull.list.field("data", { type: "CommentSingle" }), u.field("meta", { type: "ResponseMeta" });
|
|
5791
5791
|
}
|
|
5792
|
-
}),
|
|
5792
|
+
}), ay = (i) => i.objectType({
|
|
5793
5793
|
name: "ResponseFindAllPerAuthor",
|
|
5794
5794
|
definition(u) {
|
|
5795
5795
|
u.nonNull.list.field("data", { type: "CommentSingle" }), u.field("meta", { type: "ResponseMeta" });
|
|
5796
5796
|
}
|
|
5797
|
-
}),
|
|
5797
|
+
}), sy = (i) => i.objectType({
|
|
5798
5798
|
name: "ResponseMeta",
|
|
5799
5799
|
definition(u) {
|
|
5800
5800
|
u.field("pagination", { type: "ResponsePagination" });
|
|
5801
5801
|
}
|
|
5802
|
-
}),
|
|
5802
|
+
}), ly = (i) => i.objectType({
|
|
5803
5803
|
name: "ResponsePagination",
|
|
5804
5804
|
definition(u) {
|
|
5805
5805
|
u.int("page"), u.int("pageSize"), u.int("pageCount"), u.int("total"), u.int("start"), u.int("limit");
|
|
5806
5806
|
}
|
|
5807
|
-
}),
|
|
5807
|
+
}), cy = (i) => i.inputObjectType({
|
|
5808
5808
|
name: "UpdateComment",
|
|
5809
5809
|
definition(u) {
|
|
5810
5810
|
u.id("id"), u.nonNull.string("content"), u.nonNull.string("relation"), u.field("author", { type: "IdentifyCommentAuthor" });
|
|
5811
5811
|
}
|
|
5812
|
-
}),
|
|
5813
|
-
Yv,
|
|
5812
|
+
}), fy = [
|
|
5814
5813
|
Qv,
|
|
5815
5814
|
Jv,
|
|
5816
5815
|
Xv,
|
|
5817
5816
|
Zv,
|
|
5818
5817
|
Kv,
|
|
5819
5818
|
e0,
|
|
5820
|
-
|
|
5819
|
+
t0,
|
|
5821
5820
|
ty,
|
|
5822
5821
|
ny,
|
|
5823
|
-
|
|
5822
|
+
ry,
|
|
5824
5823
|
oy,
|
|
5825
5824
|
uy,
|
|
5826
5825
|
ay,
|
|
5827
5826
|
sy,
|
|
5828
5827
|
ly,
|
|
5829
|
-
|
|
5830
|
-
|
|
5828
|
+
cy,
|
|
5829
|
+
iy
|
|
5830
|
+
], hy = (i, u) => fy.map((o) => o(u, i)), ov = (i) => i.plugin("graphql").service("extension"), py = (i) => {
|
|
5831
5831
|
const u = ov(i);
|
|
5832
5832
|
u.shadowCRUD(lr(i, "comment")).disable(), u.shadowCRUD(lr(i, "comment")).disableQueries(), u.shadowCRUD(lr(i, "comment")).disableMutations(), u.shadowCRUD(lr(i, "comment-report")).disable(), u.shadowCRUD(lr(i, "comment-report")).disableQueries(), u.shadowCRUD(lr(i, "comment-report")).disableMutations();
|
|
5833
|
-
},
|
|
5834
|
-
i.plugin("graphql") && (
|
|
5835
|
-
},
|
|
5833
|
+
}, dy = async ({ strapi: i }) => {
|
|
5834
|
+
i.plugin("graphql") && (py(i), (await ft(i, "common").getConfig(oa.ENABLED_COLLECTIONS, [])).length && await gy(i));
|
|
5835
|
+
}, gy = async (i) => {
|
|
5836
5836
|
const u = ov(i), o = await ft(i, "common").getConfig();
|
|
5837
5837
|
u.use(({ strapi: h, nexus: m }) => {
|
|
5838
|
-
const A =
|
|
5838
|
+
const A = hy(o, m), E = Yv(h, m), C = Vv(h, m), x = Wv(o);
|
|
5839
5839
|
return {
|
|
5840
5840
|
types: [A, E, C],
|
|
5841
5841
|
resolversConfig: x
|
|
@@ -5854,8 +5854,8 @@ const ey = (i) => i.scalarType({
|
|
|
5854
5854
|
read: "settings-read",
|
|
5855
5855
|
change: "settings-change"
|
|
5856
5856
|
}
|
|
5857
|
-
},
|
|
5858
|
-
if (i.plugin("graphql") && await
|
|
5857
|
+
}, my = async ({ strapi: i }) => {
|
|
5858
|
+
if (i.plugin("graphql") && await dy({ strapi: i }), Object.keys(i.plugins).indexOf("users-permissions") === -1)
|
|
5859
5859
|
throw new Error(
|
|
5860
5860
|
"In order to make the comments plugin work the users-permissions plugin is required"
|
|
5861
5861
|
);
|
|
@@ -5898,7 +5898,7 @@ const ey = (i) => i.scalarType({
|
|
|
5898
5898
|
}
|
|
5899
5899
|
];
|
|
5900
5900
|
await i.admin.services.permission.actionProvider.registerMany(u);
|
|
5901
|
-
},
|
|
5901
|
+
}, vy = {
|
|
5902
5902
|
isValidationEnabled: !0,
|
|
5903
5903
|
enabledCollections: [],
|
|
5904
5904
|
moderatorRoles: [],
|
|
@@ -5912,13 +5912,13 @@ const ey = (i) => i.scalarType({
|
|
|
5912
5912
|
OTHER: Zt.OTHER
|
|
5913
5913
|
},
|
|
5914
5914
|
blockedAuthorProps: []
|
|
5915
|
-
},
|
|
5915
|
+
}, yy = v.object({
|
|
5916
5916
|
[Zt.BAD_LANGUAGE]: v.literal(Zt.BAD_LANGUAGE),
|
|
5917
5917
|
[Zt.OTHER]: v.literal(Zt.OTHER),
|
|
5918
5918
|
[Zt.DISCRIMINATION]: v.literal(Zt.DISCRIMINATION)
|
|
5919
5919
|
}), wm = v.object({
|
|
5920
5920
|
isValidationEnabled: v.boolean().optional(),
|
|
5921
|
-
reportReasons:
|
|
5921
|
+
reportReasons: yy.optional(),
|
|
5922
5922
|
isGQLPluginEnabled: v.boolean().optional(),
|
|
5923
5923
|
[Cr.ENABLED_COLLECTIONS]: v.array(v.string()),
|
|
5924
5924
|
[Cr.MODERATOR_ROLES]: v.array(v.string()),
|
|
@@ -5933,8 +5933,8 @@ const ey = (i) => i.scalarType({
|
|
|
5933
5933
|
url: v.string().nullable(),
|
|
5934
5934
|
contactEmail: v.string().nullable()
|
|
5935
5935
|
}).default({ url: null, contactEmail: null })
|
|
5936
|
-
}),
|
|
5937
|
-
default: wm.parse(
|
|
5936
|
+
}), _y = {
|
|
5937
|
+
default: wm.parse(vy),
|
|
5938
5938
|
validate: (i) => wm.safeParse(i)
|
|
5939
5939
|
}, Y = ({
|
|
5940
5940
|
left: i,
|
|
@@ -5953,7 +5953,7 @@ const ey = (i) => i.scalarType({
|
|
|
5953
5953
|
throw new Error(
|
|
5954
5954
|
"Received no left or right values at runtime when opening Either"
|
|
5955
5955
|
);
|
|
5956
|
-
},
|
|
5956
|
+
}, by = (i) => i.left !== void 0, pe = (i) => i.right !== void 0, uv = (i) => ({ left: i }), ol = (i) => ({ right: i });
|
|
5957
5957
|
let An = class av extends Error {
|
|
5958
5958
|
constructor(u, o, h = void 0) {
|
|
5959
5959
|
super(), this.name = "Strapi:Plugin:Comments", this.status = u || 500, this.message = o || "Internal error", this.payload = h, Object.setPrototypeOf(this, av.prototype);
|
|
@@ -5969,40 +5969,39 @@ let An = class av extends Error {
|
|
|
5969
5969
|
} : this;
|
|
5970
5970
|
}
|
|
5971
5971
|
};
|
|
5972
|
-
const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
|
|
5972
|
+
const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u, wy = v.union([
|
|
5973
5973
|
v.object({ $eq: v.string().min(1) }),
|
|
5974
5974
|
v.object({ $eqi: v.string().min(1) })
|
|
5975
|
-
]),
|
|
5975
|
+
]), Ay = v.union([
|
|
5976
5976
|
v.object({ $ne: v.string().min(1) }),
|
|
5977
5977
|
v.object({ $nei: v.string().min(1) })
|
|
5978
|
-
]),
|
|
5978
|
+
]), Sy = v.union([
|
|
5979
5979
|
v.object({ $gt: v.string().min(1) }),
|
|
5980
5980
|
v.object({ $gte: v.string().min(1) })
|
|
5981
|
-
]),
|
|
5981
|
+
]), Ey = v.union([
|
|
5982
5982
|
v.object({ $lt: v.string().min(1) }),
|
|
5983
5983
|
v.object({ $lte: v.string().min(1) })
|
|
5984
|
-
]),
|
|
5984
|
+
]), Ty = v.union([
|
|
5985
5985
|
v.object({ $startsWith: v.string().min(1) }),
|
|
5986
5986
|
v.object({ $startsWithi: v.string().min(1) })
|
|
5987
|
-
]),
|
|
5987
|
+
]), Oy = v.union([
|
|
5988
5988
|
v.object({ $endsWith: v.string().min(1) }),
|
|
5989
5989
|
v.object({ $endsWithi: v.string().min(1) })
|
|
5990
|
-
]),
|
|
5990
|
+
]), Cy = v.union([
|
|
5991
5991
|
v.object({ $contains: v.string().min(1) }),
|
|
5992
5992
|
v.object({ $containsi: v.string().min(1) })
|
|
5993
|
-
]),
|
|
5993
|
+
]), Iy = v.union([
|
|
5994
5994
|
v.object({ $notContains: v.string().min(1) }),
|
|
5995
5995
|
v.object({ $notContainsi: v.string().min(1) })
|
|
5996
|
-
]), Xr = v.union([v.string(), v.number()]).transform((i) => Number(i)).pipe(v.number()), Am = v.union([v.string(), v.boolean()]).transform((i) => typeof i == "string" ? ["t", "true"].includes(i) : i).pipe(v.boolean()),
|
|
5996
|
+
]), Xr = v.union([v.string(), v.number()]).transform((i) => Number(i)).pipe(v.number()), Am = v.union([v.string(), v.boolean()]).transform((i) => typeof i == "string" ? ["t", "true"].includes(i) : i).pipe(v.boolean()), xy = v.object({
|
|
5997
5997
|
_q: v.string().optional()
|
|
5998
5998
|
}), sv = v.string().regex(
|
|
5999
5999
|
// TODO: check sort options
|
|
6000
6000
|
/^(content|createdAt|updatedAt|id):(desc|asc|ASC|DESC)$/,
|
|
6001
6001
|
"Invalid orderBy options"
|
|
6002
|
-
),
|
|
6002
|
+
), Ry = v.union([
|
|
6003
6003
|
v.string(),
|
|
6004
6004
|
v.number(),
|
|
6005
|
-
by,
|
|
6006
6005
|
wy,
|
|
6007
6006
|
Ay,
|
|
6008
6007
|
Sy,
|
|
@@ -6010,13 +6009,14 @@ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
|
|
|
6010
6009
|
Ty,
|
|
6011
6010
|
Oy,
|
|
6012
6011
|
Cy,
|
|
6012
|
+
Iy,
|
|
6013
6013
|
v.object({ $null: Am }),
|
|
6014
6014
|
v.object({ $notNull: Am })
|
|
6015
6015
|
]), Sm = (i) => v.object(
|
|
6016
6016
|
Object.keys(i).reduce(
|
|
6017
6017
|
(u, o) => ({
|
|
6018
6018
|
...u,
|
|
6019
|
-
[o]:
|
|
6019
|
+
[o]: Ry.optional()
|
|
6020
6020
|
}),
|
|
6021
6021
|
{}
|
|
6022
6022
|
)
|
|
@@ -6032,10 +6032,10 @@ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
|
|
|
6032
6032
|
{}
|
|
6033
6033
|
);
|
|
6034
6034
|
return v.object(u);
|
|
6035
|
-
},
|
|
6035
|
+
}, Ny = v.object({
|
|
6036
6036
|
pageSize: Xr.default(10),
|
|
6037
6037
|
page: Xr.default(1)
|
|
6038
|
-
}).merge(
|
|
6038
|
+
}).merge(xy).merge(
|
|
6039
6039
|
v.object({
|
|
6040
6040
|
orderBy: sv.optional().nullable()
|
|
6041
6041
|
})
|
|
@@ -6067,23 +6067,23 @@ const ce = (i, u) => u instanceof An ? i.throw(u.status, JSON.stringify(u)) : u,
|
|
|
6067
6067
|
}).refine(
|
|
6068
6068
|
(u) => i.some((o) => u.startsWith(o)),
|
|
6069
6069
|
"Invalid relation or not enabled collections"
|
|
6070
|
-
),
|
|
6070
|
+
), Ly = v.object({
|
|
6071
6071
|
id: v.union([v.number(), v.string()]),
|
|
6072
6072
|
name: v.string().min(1).max(100).optional(),
|
|
6073
6073
|
email: v.string().email(),
|
|
6074
6074
|
avatar: v.string().url().optional()
|
|
6075
6075
|
});
|
|
6076
6076
|
v.union([v.string(), v.number(), v.boolean()]);
|
|
6077
|
-
const lv =
|
|
6077
|
+
const lv = Ny.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa({ id: Zr.single }).safeParse(i)), Py = (i) => Nt(lv.safeParse(i)), Dy = (i) => Nt(lv.safeParse(i)), Fy = (i, u) => {
|
|
6078
6078
|
const o = sa({ id: Zr.single }).merge(v.object({ removed: v.string().optional().transform((h) => h === "true") })).safeParse({ ...u, id: i });
|
|
6079
6079
|
return Nt(o);
|
|
6080
|
-
},
|
|
6080
|
+
}, Uy = (i) => Nt(sa({ id: Zr.single, reportId: Zr.single }).safeParse(i)), My = (i) => {
|
|
6081
6081
|
const u = sa({ id: Zr.single, reportIds: Zr.array }).safeParse(i);
|
|
6082
6082
|
return Nt(u);
|
|
6083
|
-
},
|
|
6083
|
+
}, Wy = (i) => {
|
|
6084
6084
|
const u = sa({ reportIds: Zr.array }).safeParse(i);
|
|
6085
6085
|
return Nt(u);
|
|
6086
|
-
},
|
|
6086
|
+
}, By = v.object({
|
|
6087
6087
|
id: v.union([v.string(), v.number()]),
|
|
6088
6088
|
email: v.string().email(),
|
|
6089
6089
|
lastname: v.string().nullable().optional(),
|
|
@@ -6092,28 +6092,28 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6092
6092
|
}), cv = v.object({
|
|
6093
6093
|
id: v.union([v.string(), v.number()]),
|
|
6094
6094
|
content: v.string(),
|
|
6095
|
-
author:
|
|
6096
|
-
}),
|
|
6095
|
+
author: By
|
|
6096
|
+
}), $y = (i) => Nt(cv.safeParse(i)), jy = (i) => Nt(cv.pick({ content: !0, id: !0 }).safeParse(i)), ky = (i) => Nt(wm.safeParse(i)), fv = (i) => v.object({
|
|
6097
6097
|
relation: Uf(i),
|
|
6098
6098
|
content: v.string().min(1),
|
|
6099
|
-
author:
|
|
6099
|
+
author: Ly.optional(),
|
|
6100
6100
|
threadOf: v.union([v.string(), v.number()]).optional(),
|
|
6101
6101
|
approvalStatus: v.nativeEnum(Ui).optional(),
|
|
6102
6102
|
locale: v.string().optional()
|
|
6103
|
-
}),
|
|
6103
|
+
}), Vy = (i, u, o) => Nt(fv(i).safeParse({
|
|
6104
6104
|
...o,
|
|
6105
6105
|
relation: u
|
|
6106
|
-
})),
|
|
6106
|
+
})), Gy = (i, u) => Nt(
|
|
6107
6107
|
fv(i).pick({ content: !0, relation: !0, author: !0 }).merge(sa({ commentId: Zr.single })).safeParse(u)
|
|
6108
|
-
),
|
|
6108
|
+
), zy = (i) => v.object({
|
|
6109
6109
|
relation: Uf(i)
|
|
6110
|
-
}),
|
|
6110
|
+
}), qy = v.object({
|
|
6111
6111
|
pagination: v.object({
|
|
6112
6112
|
pageSize: Xr.default(10),
|
|
6113
6113
|
page: Xr.default(1),
|
|
6114
6114
|
withCount: Am.optional().default(!1)
|
|
6115
6115
|
}).optional()
|
|
6116
|
-
}),
|
|
6116
|
+
}), Hy = v.record(v.union([
|
|
6117
6117
|
v.union([
|
|
6118
6118
|
v.boolean(),
|
|
6119
6119
|
v.literal("true").transform(() => !0),
|
|
@@ -6148,15 +6148,15 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6148
6148
|
})
|
|
6149
6149
|
).optional(),
|
|
6150
6150
|
isAdmin: v.boolean().optional().default(!1),
|
|
6151
|
-
populate:
|
|
6151
|
+
populate: Hy,
|
|
6152
6152
|
limit: Xr.optional(),
|
|
6153
6153
|
skip: Xr.optional(),
|
|
6154
6154
|
locale: v.string().optional()
|
|
6155
|
-
}).merge(
|
|
6156
|
-
},
|
|
6155
|
+
}).merge(zy(i)).merge(qy);
|
|
6156
|
+
}, Yy = (i, u, o) => Nt(xm(i).safeParse({
|
|
6157
6157
|
...o,
|
|
6158
6158
|
relation: u
|
|
6159
|
-
})),
|
|
6159
|
+
})), Qy = (i, u, o) => {
|
|
6160
6160
|
const h = xm(i).pick({
|
|
6161
6161
|
sort: !0,
|
|
6162
6162
|
fields: !0,
|
|
@@ -6177,7 +6177,7 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6177
6177
|
...o,
|
|
6178
6178
|
relation: u
|
|
6179
6179
|
}));
|
|
6180
|
-
},
|
|
6180
|
+
}, Jy = (i, u) => {
|
|
6181
6181
|
const o = xm([]).pick({
|
|
6182
6182
|
sort: !0,
|
|
6183
6183
|
fields: !0,
|
|
@@ -6197,33 +6197,33 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6197
6197
|
...u,
|
|
6198
6198
|
...i
|
|
6199
6199
|
}));
|
|
6200
|
-
},
|
|
6200
|
+
}, Xy = (i) => v.object({
|
|
6201
6201
|
relation: Uf(i[Cr.ENABLED_COLLECTIONS]),
|
|
6202
6202
|
commentId: Xr,
|
|
6203
6203
|
content: v.string().min(1),
|
|
6204
6204
|
reason: v.nativeEnum(i.reportReasons)
|
|
6205
|
-
}),
|
|
6205
|
+
}), Zy = (i, u) => Nt(Xy(i).safeParse(u)), Ky = (i) => v.object({
|
|
6206
6206
|
relation: Uf(i),
|
|
6207
6207
|
commentId: v.union([v.string(), v.number()]),
|
|
6208
6208
|
authorId: v.union([v.string(), v.number()])
|
|
6209
|
-
}),
|
|
6209
|
+
}), e_ = (i, u) => Nt(Ky(i).safeParse(u)), t_ = ({ strapi: i }) => ({
|
|
6210
6210
|
getService(u) {
|
|
6211
6211
|
return ft(i, u);
|
|
6212
6212
|
},
|
|
6213
6213
|
async findAll(u) {
|
|
6214
|
-
const o =
|
|
6214
|
+
const o = Py(u.query);
|
|
6215
6215
|
if (pe(o))
|
|
6216
6216
|
return this.getService("admin").findAll(Y(o));
|
|
6217
6217
|
throw ce(u, Y(o));
|
|
6218
6218
|
},
|
|
6219
6219
|
async findReports(u) {
|
|
6220
|
-
const o =
|
|
6220
|
+
const o = Dy(u.query);
|
|
6221
6221
|
if (pe(o))
|
|
6222
6222
|
return this.getService("admin").findReports(Y(o));
|
|
6223
6223
|
throw ce(u, Y(o));
|
|
6224
6224
|
},
|
|
6225
6225
|
async findOne(u) {
|
|
6226
|
-
const o =
|
|
6226
|
+
const o = Fy(u.params.id, u.query);
|
|
6227
6227
|
if (pe(o))
|
|
6228
6228
|
return this.getService("admin").findOneAndThread(Y(o));
|
|
6229
6229
|
throw ce(u, Y(o));
|
|
@@ -6259,13 +6259,13 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6259
6259
|
throw ce(u, Y(o));
|
|
6260
6260
|
},
|
|
6261
6261
|
async resolveAbuseReport(u) {
|
|
6262
|
-
const o =
|
|
6262
|
+
const o = Uy(u.params);
|
|
6263
6263
|
if (pe(o))
|
|
6264
6264
|
return this.getService("admin").resolveAbuseReport(Y(o));
|
|
6265
6265
|
throw ce(u, Y(o));
|
|
6266
6266
|
},
|
|
6267
6267
|
async resolveCommentMultipleAbuseReports(u) {
|
|
6268
|
-
const o =
|
|
6268
|
+
const o = My({
|
|
6269
6269
|
...u.request.body,
|
|
6270
6270
|
id: u.params.id
|
|
6271
6271
|
});
|
|
@@ -6286,13 +6286,13 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6286
6286
|
throw ce(u, Y(o));
|
|
6287
6287
|
},
|
|
6288
6288
|
async resolveMultipleAbuseReports(u) {
|
|
6289
|
-
const o =
|
|
6289
|
+
const o = Wy(u.request.body);
|
|
6290
6290
|
if (pe(o))
|
|
6291
6291
|
return this.getService("admin").resolveMultipleAbuseReports(Y(o));
|
|
6292
6292
|
throw ce(u, Y(o));
|
|
6293
6293
|
},
|
|
6294
6294
|
async postComment(u) {
|
|
6295
|
-
const o =
|
|
6295
|
+
const o = $y({
|
|
6296
6296
|
id: u.params.id,
|
|
6297
6297
|
content: u.request.body.content,
|
|
6298
6298
|
author: u.request.body.author
|
|
@@ -6302,7 +6302,7 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6302
6302
|
throw ce(u, Y(o));
|
|
6303
6303
|
},
|
|
6304
6304
|
async updateComment(u) {
|
|
6305
|
-
const o =
|
|
6305
|
+
const o = jy({
|
|
6306
6306
|
id: u.params.id,
|
|
6307
6307
|
content: u.request.body.content
|
|
6308
6308
|
});
|
|
@@ -6326,7 +6326,7 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6326
6326
|
url: v.string(),
|
|
6327
6327
|
name: v.string(),
|
|
6328
6328
|
hash: v.string()
|
|
6329
|
-
}),
|
|
6329
|
+
}), hv = v.object({
|
|
6330
6330
|
id: v.number(),
|
|
6331
6331
|
...nl.shape,
|
|
6332
6332
|
formats: v.object({
|
|
@@ -6335,7 +6335,7 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6335
6335
|
medium: nl.optional(),
|
|
6336
6336
|
large: nl.optional()
|
|
6337
6337
|
}).optional()
|
|
6338
|
-
}).nullable().optional(),
|
|
6338
|
+
}).nullable().optional(), pv = v.object({
|
|
6339
6339
|
id: v.number(),
|
|
6340
6340
|
documentId: v.string().nullable(),
|
|
6341
6341
|
content: v.string(),
|
|
@@ -6359,16 +6359,16 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6359
6359
|
id: v.number(),
|
|
6360
6360
|
username: v.string(),
|
|
6361
6361
|
email: v.string().email(),
|
|
6362
|
-
avatar:
|
|
6362
|
+
avatar: hv
|
|
6363
6363
|
})
|
|
6364
6364
|
]).optional().nullable(),
|
|
6365
6365
|
locale: v.string().nullable()
|
|
6366
|
-
}),
|
|
6366
|
+
}), dv = v.object({
|
|
6367
6367
|
page: v.number(),
|
|
6368
6368
|
pageSize: v.number(),
|
|
6369
6369
|
pageCount: v.number(),
|
|
6370
6370
|
total: v.number()
|
|
6371
|
-
}), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o),
|
|
6371
|
+
}), Fi = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), gv = (i, u) => (o) => i ? u.parseAsync(o) : Promise.resolve(o), n_ = v.object({
|
|
6372
6372
|
id: v.number(),
|
|
6373
6373
|
documentId: v.string().nullable(),
|
|
6374
6374
|
content: v.string(),
|
|
@@ -6378,13 +6378,13 @@ const lv = Ry.merge(v.object({ _q: v.string().optional() })), Jr = (i) => Nt(sa(
|
|
|
6378
6378
|
updatedAt: v.string(),
|
|
6379
6379
|
publishedAt: v.string().nullable(),
|
|
6380
6380
|
locale: v.string().nullable()
|
|
6381
|
-
}), jm =
|
|
6381
|
+
}), jm = pv.merge(
|
|
6382
6382
|
v.object(
|
|
6383
6383
|
{
|
|
6384
6384
|
gotThread: v.boolean().nullable().optional(),
|
|
6385
6385
|
threadFirstItemId: v.number().nullable().optional(),
|
|
6386
6386
|
reports: v.array(n_).default([]),
|
|
6387
|
-
author: v.any()
|
|
6387
|
+
author: v.any().nullable().optional()
|
|
6388
6388
|
}
|
|
6389
6389
|
)
|
|
6390
6390
|
), al = jm.extend({
|
|
@@ -6400,7 +6400,7 @@ al.omit({ related: !0 }).extend({
|
|
|
6400
6400
|
related: r_.nullable().optional()
|
|
6401
6401
|
});
|
|
6402
6402
|
const i_ = v.array(al), o_ = v.object({
|
|
6403
|
-
pagination:
|
|
6403
|
+
pagination: dv,
|
|
6404
6404
|
results: v.array(al)
|
|
6405
6405
|
}), ia = {
|
|
6406
6406
|
findMany: i_,
|
|
@@ -6414,10 +6414,19 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6414
6414
|
blocked: v.boolean(),
|
|
6415
6415
|
blockedThread: v.boolean(),
|
|
6416
6416
|
blockReason: v.string().nullable(),
|
|
6417
|
-
authorId: v.string(),
|
|
6418
|
-
authorName: v.string(),
|
|
6419
|
-
authorEmail: v.string(),
|
|
6417
|
+
authorId: v.string().nullable(),
|
|
6418
|
+
authorName: v.string().nullable(),
|
|
6419
|
+
authorEmail: v.string().nullable(),
|
|
6420
6420
|
authorAvatar: v.string().nullable(),
|
|
6421
|
+
authorUser: v.union([
|
|
6422
|
+
v.string(),
|
|
6423
|
+
v.object({
|
|
6424
|
+
id: v.number(),
|
|
6425
|
+
username: v.string(),
|
|
6426
|
+
email: v.string().email(),
|
|
6427
|
+
avatar: hv
|
|
6428
|
+
})
|
|
6429
|
+
]).optional().nullable(),
|
|
6421
6430
|
isAdminComment: v.boolean().nullable(),
|
|
6422
6431
|
removed: v.boolean().nullable(),
|
|
6423
6432
|
approvalStatus: v.string().nullable(),
|
|
@@ -6426,7 +6435,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6426
6435
|
updatedAt: v.string(),
|
|
6427
6436
|
publishedAt: v.string(),
|
|
6428
6437
|
locale: v.string().nullable()
|
|
6429
|
-
}),
|
|
6438
|
+
}), mv = v.object({
|
|
6430
6439
|
id: v.number(),
|
|
6431
6440
|
documentId: v.string().nullable(),
|
|
6432
6441
|
content: v.string(),
|
|
@@ -6438,8 +6447,8 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6438
6447
|
locale: v.string().nullable(),
|
|
6439
6448
|
related: u_.nullable().optional()
|
|
6440
6449
|
}), a_ = v.object({
|
|
6441
|
-
results: v.array(
|
|
6442
|
-
pagination:
|
|
6450
|
+
results: v.array(mv),
|
|
6451
|
+
pagination: dv
|
|
6443
6452
|
}), s_ = v.object({
|
|
6444
6453
|
id: v.number(),
|
|
6445
6454
|
documentId: v.string().nullable(),
|
|
@@ -6460,12 +6469,12 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6460
6469
|
updatedAt: v.string(),
|
|
6461
6470
|
publishedAt: v.string().nullable(),
|
|
6462
6471
|
locale: v.string().nullable(),
|
|
6463
|
-
related:
|
|
6472
|
+
related: pv.nullable()
|
|
6464
6473
|
})), Of = {
|
|
6465
6474
|
findMany: l_,
|
|
6466
6475
|
findPage: a_,
|
|
6467
6476
|
update: s_,
|
|
6468
|
-
create:
|
|
6477
|
+
create: mv
|
|
6469
6478
|
}, c_ = (i) => {
|
|
6470
6479
|
const u = lr(i, "comment-report"), o = i.query(u);
|
|
6471
6480
|
return {
|
|
@@ -6475,7 +6484,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6475
6484
|
},
|
|
6476
6485
|
async findMany(h) {
|
|
6477
6486
|
const m = await Ir(i, "isValidationEnabled", !1);
|
|
6478
|
-
return o.findMany(h).then(
|
|
6487
|
+
return o.findMany(h).then(gv(m, Of.findMany));
|
|
6479
6488
|
},
|
|
6480
6489
|
async update(h) {
|
|
6481
6490
|
const m = await Ir(i, "isValidationEnabled", !1);
|
|
@@ -6494,7 +6503,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6494
6503
|
return {
|
|
6495
6504
|
async findMany(o) {
|
|
6496
6505
|
const h = await Ir(i, "isValidationEnabled", !1);
|
|
6497
|
-
return i.query(u).findMany(o).then(
|
|
6506
|
+
return i.query(u).findMany(o).then(gv(h, ia.findMany));
|
|
6498
6507
|
},
|
|
6499
6508
|
async findWithCount(o) {
|
|
6500
6509
|
const h = await Ir(i, "isValidationEnabled", !1);
|
|
@@ -6525,7 +6534,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6525
6534
|
};
|
|
6526
6535
|
}, it = Le.once(f_), h_ = (i) => ({
|
|
6527
6536
|
getLocalConfig(u, o) {
|
|
6528
|
-
return i.config.get([
|
|
6537
|
+
return i.config.get([Iv, u].filter(Boolean).join("."), o);
|
|
6529
6538
|
},
|
|
6530
6539
|
async getStore() {
|
|
6531
6540
|
return await i.store({ type: "plugin", name: "comments" });
|
|
@@ -6594,7 +6603,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6594
6603
|
async post(u) {
|
|
6595
6604
|
const o = await this.getStoreRepository().get(!0);
|
|
6596
6605
|
if (pe(o)) {
|
|
6597
|
-
const h = Y(o), m =
|
|
6606
|
+
const h = Y(o), m = Vy(h.enabledCollections, u.params.relation, u.request.body);
|
|
6598
6607
|
if (pe(m))
|
|
6599
6608
|
return this.getService("client").create(m.right, u.state.user);
|
|
6600
6609
|
throw ce(u, Y(m));
|
|
@@ -6604,7 +6613,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6604
6613
|
async findAllFlat(u) {
|
|
6605
6614
|
const o = await this.getStoreRepository().get(!0);
|
|
6606
6615
|
if (pe(o)) {
|
|
6607
|
-
const h = Y(o), m =
|
|
6616
|
+
const h = Y(o), m = Yy(h.enabledCollections, u.params.relation, u.query);
|
|
6608
6617
|
if (pe(m))
|
|
6609
6618
|
return this.getService("common").findAllFlat(
|
|
6610
6619
|
ua(m.right)
|
|
@@ -6616,7 +6625,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6616
6625
|
async findAllInHierarchy(u) {
|
|
6617
6626
|
const o = await this.getStoreRepository().get(!0);
|
|
6618
6627
|
if (pe(o)) {
|
|
6619
|
-
const h = Y(o), m =
|
|
6628
|
+
const h = Y(o), m = Qy(h.enabledCollections, u.params.relation, u.query);
|
|
6620
6629
|
if (pe(m))
|
|
6621
6630
|
return this.getService("common").findAllInHierarchy(
|
|
6622
6631
|
ua(m.right)
|
|
@@ -6626,7 +6635,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6626
6635
|
throw ce(u, Y(o));
|
|
6627
6636
|
},
|
|
6628
6637
|
async findAllPerAuthor(u) {
|
|
6629
|
-
const o =
|
|
6638
|
+
const o = Jy(u.params, u.query);
|
|
6630
6639
|
if (pe(o))
|
|
6631
6640
|
return this.getService("common").findAllPerAuthor(
|
|
6632
6641
|
ua(o.right),
|
|
@@ -6637,7 +6646,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6637
6646
|
async put(u) {
|
|
6638
6647
|
const { user: o } = u.state, h = await this.getStoreRepository().get(!0);
|
|
6639
6648
|
if (pe(h)) {
|
|
6640
|
-
const m = Y(h), A =
|
|
6649
|
+
const m = Y(h), A = Gy(m.enabledCollections, {
|
|
6641
6650
|
...u.params,
|
|
6642
6651
|
content: u.request.body.content,
|
|
6643
6652
|
author: u.request.body.author
|
|
@@ -6654,7 +6663,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6654
6663
|
async reportAbuse(u) {
|
|
6655
6664
|
const { state: o } = u, { user: h } = o, m = await this.getStoreRepository().get(!0);
|
|
6656
6665
|
if (pe(m)) {
|
|
6657
|
-
const A = Y(m), E =
|
|
6666
|
+
const A = Y(m), E = Zy(A, {
|
|
6658
6667
|
...u.request.body,
|
|
6659
6668
|
...u.params
|
|
6660
6669
|
});
|
|
@@ -6670,7 +6679,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6670
6679
|
async removeComment(u) {
|
|
6671
6680
|
const { state: o } = u, { user: h } = o, m = await this.getStoreRepository().get(!0);
|
|
6672
6681
|
if (pe(m)) {
|
|
6673
|
-
const A = Y(m), E =
|
|
6682
|
+
const A = Y(m), E = e_(A.enabledCollections, {
|
|
6674
6683
|
...u.query,
|
|
6675
6684
|
...u.params
|
|
6676
6685
|
});
|
|
@@ -6701,7 +6710,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6701
6710
|
}
|
|
6702
6711
|
},
|
|
6703
6712
|
async update(o) {
|
|
6704
|
-
const h =
|
|
6713
|
+
const h = ky(o.request.body);
|
|
6705
6714
|
if (pe(h))
|
|
6706
6715
|
return await u.update(Y(h));
|
|
6707
6716
|
throw ce(o, Y(h));
|
|
@@ -6722,7 +6731,7 @@ const i_ = v.array(al), o_ = v.object({
|
|
|
6722
6731
|
}
|
|
6723
6732
|
};
|
|
6724
6733
|
}, g_ = {
|
|
6725
|
-
admin:
|
|
6734
|
+
admin: t_,
|
|
6726
6735
|
client: p_,
|
|
6727
6736
|
settings: d_
|
|
6728
6737
|
}, m_ = [
|
|
@@ -7044,7 +7053,7 @@ class fn extends Error {
|
|
|
7044
7053
|
} : this;
|
|
7045
7054
|
}
|
|
7046
7055
|
}
|
|
7047
|
-
const km = (i) => i.split(
|
|
7056
|
+
const km = (i) => i.split(qv.relatedUid).filter((u) => u && u.length > 0), vv = (i) => i && {
|
|
7048
7057
|
...i,
|
|
7049
7058
|
reports: (i.reports || []).filter((u) => !u.resolved)
|
|
7050
7059
|
}, Vm = (i, u, o = []) => {
|
|
@@ -7198,12 +7207,18 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7198
7207
|
m,
|
|
7199
7208
|
A,
|
|
7200
7209
|
o
|
|
7201
|
-
), { pagination:
|
|
7210
|
+
), C = il(i), { pagination: x, results: N } = await Di(i).findPage({
|
|
7202
7211
|
...E,
|
|
7203
|
-
populate:
|
|
7204
|
-
|
|
7212
|
+
populate: {
|
|
7213
|
+
related: {
|
|
7214
|
+
populate: {
|
|
7215
|
+
authorUser: C
|
|
7216
|
+
}
|
|
7217
|
+
}
|
|
7218
|
+
}
|
|
7219
|
+
}), O = N.map((j) => typeof j.related == "object" ? j.related.id : null).filter(Boolean), U = await it(i).findMany({
|
|
7205
7220
|
where: {
|
|
7206
|
-
threadOf:
|
|
7221
|
+
threadOf: O
|
|
7207
7222
|
},
|
|
7208
7223
|
populate: ["threadOf"],
|
|
7209
7224
|
limit: Number.MAX_SAFE_INTEGER
|
|
@@ -7211,7 +7226,7 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7211
7226
|
new Set(U.map(({ threadOf: j }) => typeof j == "object" ? j.id : null).filter(Boolean))
|
|
7212
7227
|
);
|
|
7213
7228
|
return {
|
|
7214
|
-
result:
|
|
7229
|
+
result: N.map((j) => {
|
|
7215
7230
|
const J = M.includes(j.related.id), te = this.getCommonService(), X = {
|
|
7216
7231
|
...j,
|
|
7217
7232
|
related: te.sanitizeCommentEntity(
|
|
@@ -7221,8 +7236,8 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7221
7236
|
},
|
|
7222
7237
|
[]
|
|
7223
7238
|
)
|
|
7224
|
-
}, me = typeof
|
|
7225
|
-
return
|
|
7239
|
+
}, me = typeof C != "boolean" ? C?.populate : {};
|
|
7240
|
+
return vv(
|
|
7226
7241
|
te.sanitizeCommentEntity(
|
|
7227
7242
|
X,
|
|
7228
7243
|
[],
|
|
@@ -7231,7 +7246,7 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7231
7246
|
)
|
|
7232
7247
|
);
|
|
7233
7248
|
}),
|
|
7234
|
-
pagination:
|
|
7249
|
+
pagination: x
|
|
7235
7250
|
};
|
|
7236
7251
|
},
|
|
7237
7252
|
async findOneAndThread({ id: o, removed: h, ...m }) {
|
|
@@ -7471,7 +7486,7 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7471
7486
|
async () => m ? await this.getCommonService().findOne({ id: m, related: o, locale: C || null }) : null,
|
|
7472
7487
|
new fn(400, "Thread does not exist")
|
|
7473
7488
|
);
|
|
7474
|
-
if (
|
|
7489
|
+
if (by(J))
|
|
7475
7490
|
throw Y(J);
|
|
7476
7491
|
const te = Y(J);
|
|
7477
7492
|
if (!A && !this.getCommonService().isValidUserContext(x))
|
|
@@ -7886,7 +7901,7 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7886
7901
|
if (!o)
|
|
7887
7902
|
throw new An(400, "Comment does not exist. Check your payload please.");
|
|
7888
7903
|
const h = await this.getConfig(Cr.AUTHOR_BLOCKED_PROPS, []), m = this.sanitizeCommentEntity(o, h);
|
|
7889
|
-
return
|
|
7904
|
+
return vv(m);
|
|
7890
7905
|
},
|
|
7891
7906
|
async findMany(u) {
|
|
7892
7907
|
return it(i).findMany(u);
|
|
@@ -7993,14 +8008,14 @@ const km = (i) => i.split(zv.relatedUid).filter((u) => u && u.length > 0), mv =
|
|
|
7993
8008
|
}
|
|
7994
8009
|
},
|
|
7995
8010
|
async checkBadWords(u) {
|
|
7996
|
-
if (await this.getConfig(Cr.BAD_WORDS, !0) && u &&
|
|
8011
|
+
if (await this.getConfig(Cr.BAD_WORDS, !0) && u && Ov({ testString: u }))
|
|
7997
8012
|
throw new An(
|
|
7998
8013
|
400,
|
|
7999
8014
|
"Bad language used! Please polite your comment...",
|
|
8000
8015
|
{
|
|
8001
8016
|
content: {
|
|
8002
8017
|
original: u,
|
|
8003
|
-
filtered: u &&
|
|
8018
|
+
filtered: u && Cv({ testString: u })
|
|
8004
8019
|
}
|
|
8005
8020
|
}
|
|
8006
8021
|
);
|
|
@@ -11148,7 +11163,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
11148
11163
|
Hn ? ((Hn.exports = mn)._ = mn, Da._ = mn) : at._ = mn;
|
|
11149
11164
|
}).call(xr);
|
|
11150
11165
|
})(Rf, Rf.exports);
|
|
11151
|
-
var x_ = Rf.exports,
|
|
11166
|
+
var x_ = Rf.exports, yv = {};
|
|
11152
11167
|
(function(i) {
|
|
11153
11168
|
i.aliasToReal = {
|
|
11154
11169
|
// Lodash aliases.
|
|
@@ -11651,8 +11666,8 @@ var x_ = Rf.exports, vv = {};
|
|
|
11651
11666
|
zipObject: !0,
|
|
11652
11667
|
zipObjectDeep: !0
|
|
11653
11668
|
};
|
|
11654
|
-
})(
|
|
11655
|
-
var R_ = {}, ct =
|
|
11669
|
+
})(yv);
|
|
11670
|
+
var R_ = {}, ct = yv, N_ = R_, Gm = Array.prototype.push;
|
|
11656
11671
|
function L_(i, u) {
|
|
11657
11672
|
return u == 2 ? function(o, h) {
|
|
11658
11673
|
return i.apply(void 0, arguments);
|
|
@@ -11912,16 +11927,16 @@ function j_(i) {
|
|
|
11912
11927
|
return !!(i && typeof sl.get(i, $_) == "function");
|
|
11913
11928
|
}
|
|
11914
11929
|
function k_(i) {
|
|
11915
|
-
return V_(i) ||
|
|
11930
|
+
return V_(i) || _v(i);
|
|
11916
11931
|
}
|
|
11917
11932
|
function V_(i) {
|
|
11918
11933
|
return !!(i && sl.has(i, Nf) && la(sl.get(i, Nf)));
|
|
11919
11934
|
}
|
|
11920
|
-
function
|
|
11935
|
+
function _v(i) {
|
|
11921
11936
|
return !!(i && sl.has(i, Nf) && typeof sl.get(i, Nf) == "function");
|
|
11922
11937
|
}
|
|
11923
11938
|
function Rm(i) {
|
|
11924
|
-
return j_(i) || k_(i) ||
|
|
11939
|
+
return j_(i) || k_(i) || _v(i);
|
|
11925
11940
|
}
|
|
11926
11941
|
class G_ {
|
|
11927
11942
|
constructor(u) {
|
|
@@ -11980,7 +11995,7 @@ const sl = {
|
|
|
11980
11995
|
return (o = Object.getOwnPropertyDescriptor(i, u)) === null || o === void 0 ? void 0 : o.value;
|
|
11981
11996
|
}
|
|
11982
11997
|
};
|
|
11983
|
-
class
|
|
11998
|
+
class bv {
|
|
11984
11999
|
constructor(u, o) {
|
|
11985
12000
|
this.name = u, this.config = o;
|
|
11986
12001
|
}
|
|
@@ -11988,13 +12003,13 @@ class _v {
|
|
|
11988
12003
|
return this.config;
|
|
11989
12004
|
}
|
|
11990
12005
|
}
|
|
11991
|
-
bt(
|
|
12006
|
+
bt(bv, Ie.Arg);
|
|
11992
12007
|
function Bf(i) {
|
|
11993
12008
|
if (!i.type)
|
|
11994
12009
|
throw new Error('You must provide a "type" for the arg()');
|
|
11995
|
-
return new
|
|
12010
|
+
return new bv(typeof i.type == "string" ? i.type : i.type.name, i);
|
|
11996
12011
|
}
|
|
11997
|
-
function
|
|
12012
|
+
function wv(i) {
|
|
11998
12013
|
return Bf(Object.assign({ type: "String" }, i));
|
|
11999
12014
|
}
|
|
12000
12015
|
function $f(i) {
|
|
@@ -12014,8 +12029,8 @@ class Tm {
|
|
|
12014
12029
|
}
|
|
12015
12030
|
}
|
|
12016
12031
|
bt(Tm, Ie.NonNull);
|
|
12017
|
-
function
|
|
12018
|
-
return
|
|
12032
|
+
function Av(i) {
|
|
12033
|
+
return Sv(i) || Im(i) ? i : Ev(i) ? new Tm(i.ofNexusType) : new Tm(i);
|
|
12019
12034
|
}
|
|
12020
12035
|
class Om {
|
|
12021
12036
|
constructor(u) {
|
|
@@ -12025,16 +12040,16 @@ class Om {
|
|
|
12025
12040
|
}
|
|
12026
12041
|
bt(Om, Ie.Null);
|
|
12027
12042
|
function Lf(i) {
|
|
12028
|
-
return
|
|
12043
|
+
return Sv(i) ? new Om(i.ofNexusType) : Ev(i) ? i : new Om(i);
|
|
12029
12044
|
}
|
|
12030
12045
|
Ie.Enum, Ie.Object, Ie.Scalar, Ie.Union, Ie.Interface, Ie.InputObject;
|
|
12031
12046
|
function la(i) {
|
|
12032
12047
|
return i && !!i[Wf];
|
|
12033
12048
|
}
|
|
12034
|
-
function
|
|
12049
|
+
function Sv(i) {
|
|
12035
12050
|
return la(i) && i[Wf] === Ie.NonNull;
|
|
12036
12051
|
}
|
|
12037
|
-
function
|
|
12052
|
+
function Ev(i) {
|
|
12038
12053
|
return la(i) && i[Wf] === Ie.Null;
|
|
12039
12054
|
}
|
|
12040
12055
|
class H_ {
|
|
@@ -12063,14 +12078,14 @@ class Q_ {
|
|
|
12063
12078
|
bt(Q_, Ie.DynamicOutputMethod);
|
|
12064
12079
|
const J_ = {
|
|
12065
12080
|
first: Lf($f({ description: "Returns the first n elements from the list." })),
|
|
12066
|
-
after: Lf(
|
|
12081
|
+
after: Lf(wv({ description: "Returns the elements in the list that come after the specified cursor" }))
|
|
12067
12082
|
};
|
|
12068
|
-
Object.assign(Object.assign({}, J_), { first:
|
|
12083
|
+
Object.assign(Object.assign({}, J_), { first: Av($f({ description: "Returns the first n elements from the list." })) });
|
|
12069
12084
|
const X_ = {
|
|
12070
12085
|
last: Lf($f({ description: "Returns the last n elements from the list." })),
|
|
12071
|
-
before: Lf(
|
|
12086
|
+
before: Lf(wv({ description: "Returns the elements in the list that come before the specified cursor" }))
|
|
12072
12087
|
};
|
|
12073
|
-
Object.assign(Object.assign({}, X_), { last:
|
|
12088
|
+
Object.assign(Object.assign({}, X_), { last: Av($f({ description: "Returns the last n elements from the list." })) });
|
|
12074
12089
|
var Pf = typeof Symbol == "function" ? Symbol : void 0;
|
|
12075
12090
|
Pf && Pf.iterator;
|
|
12076
12091
|
Pf && Pf.asyncIterator;
|
|
@@ -12094,7 +12109,7 @@ class Z_ {
|
|
|
12094
12109
|
}
|
|
12095
12110
|
}
|
|
12096
12111
|
bt(Z_, Ie.Enum);
|
|
12097
|
-
class
|
|
12112
|
+
class Tv {
|
|
12098
12113
|
constructor(u, o) {
|
|
12099
12114
|
this.name = u, this.config = o, Wi(u);
|
|
12100
12115
|
}
|
|
@@ -12113,9 +12128,9 @@ class Ev {
|
|
|
12113
12128
|
return Bf(Object.assign(Object.assign({}, u), { type: this }));
|
|
12114
12129
|
}
|
|
12115
12130
|
}
|
|
12116
|
-
bt(
|
|
12131
|
+
bt(Tv, Ie.InputObject);
|
|
12117
12132
|
function K_(i) {
|
|
12118
|
-
return new
|
|
12133
|
+
return new Tv(i.name, i);
|
|
12119
12134
|
}
|
|
12120
12135
|
class e1 {
|
|
12121
12136
|
constructor(u, o) {
|
|
@@ -12256,13 +12271,13 @@ const Hm = ["id"], i1 = (i, u, o) => {
|
|
|
12256
12271
|
settings: a1,
|
|
12257
12272
|
gql: u1
|
|
12258
12273
|
}, p1 = {
|
|
12259
|
-
register:
|
|
12260
|
-
bootstrap:
|
|
12261
|
-
config:
|
|
12274
|
+
register: Mv,
|
|
12275
|
+
bootstrap: my,
|
|
12276
|
+
config: _y,
|
|
12262
12277
|
controllers: g_,
|
|
12263
12278
|
routes: b_,
|
|
12264
12279
|
services: s1,
|
|
12265
|
-
contentTypes:
|
|
12280
|
+
contentTypes: Pv
|
|
12266
12281
|
};
|
|
12267
12282
|
export {
|
|
12268
12283
|
p1 as default
|