@nexpress/core 0.3.9 → 0.3.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 (61) hide show
  1. package/dist/auth.js +2 -2
  2. package/dist/{can-U5F4JBZ7.js → can-2CHRJ2FK.js} +3 -3
  3. package/dist/{chunk-3SW4L3DL.js → chunk-2LNXTEBM.js} +9 -9
  4. package/dist/{chunk-XPD7EQML.js → chunk-5NCTIJEN.js} +3 -3
  5. package/dist/{chunk-EWVXP3GP.js → chunk-A3DPN2SP.js} +2 -2
  6. package/dist/{chunk-XU2GJJ6Z.js → chunk-BGEPMNVB.js} +2 -2
  7. package/dist/{chunk-QZ52U4ET.js → chunk-IT4JBQK4.js} +3 -3
  8. package/dist/{chunk-6OUWW6JF.js → chunk-JMNDARCQ.js} +3 -3
  9. package/dist/{chunk-TSCXXBOM.js → chunk-K4IYOAZJ.js} +15 -15
  10. package/dist/{chunk-TSCXXBOM.js.map → chunk-K4IYOAZJ.js.map} +1 -1
  11. package/dist/{chunk-6MRTH734.js → chunk-KNSOZ2NN.js} +2 -2
  12. package/dist/{chunk-YEOQJ7WW.js → chunk-KS3S6TJS.js} +2 -2
  13. package/dist/{chunk-TIWJVQOO.js → chunk-LDY26JKB.js} +2 -2
  14. package/dist/{chunk-2X3GBJOT.js → chunk-MLQKHRW2.js} +2 -2
  15. package/dist/{chunk-U4QCCLAW.js → chunk-MYUCR3SE.js} +4 -3
  16. package/dist/{chunk-U4QCCLAW.js.map → chunk-MYUCR3SE.js.map} +1 -1
  17. package/dist/{chunk-EAYUAXW3.js → chunk-PXVCVEXV.js} +2 -2
  18. package/dist/{chunk-2OWUHCFY.js → chunk-RCK73HJI.js} +2 -2
  19. package/dist/{chunk-SJ7M2VCC.js → chunk-UVLDAY4U.js} +7 -7
  20. package/dist/{chunk-K4CJ3KXB.js → chunk-X43DI2QJ.js} +2 -2
  21. package/dist/community.js +11 -11
  22. package/dist/{config-YDGNUDKP.js → config-WD2IMHKB.js} +5 -5
  23. package/dist/{digest-IWHMJPXI.js → digest-U4X45I74.js} +3 -3
  24. package/dist/{host-HG4QGD3L.js → host-6EAJQRCL.js} +4 -4
  25. package/dist/i18n.js +2 -2
  26. package/dist/index.js +99 -18
  27. package/dist/index.js.map +1 -1
  28. package/dist/jobs.js +1 -1
  29. package/dist/media.js +2 -2
  30. package/dist/{mentions-LQRZWAGO.js → mentions-FRPM6LOO.js} +3 -3
  31. package/dist/{mutes-PQA6U5X7.js → mutes-2JEKADIG.js} +3 -3
  32. package/dist/{registry-WZVL5HH6.js → registry-JMMSOTJI.js} +2 -2
  33. package/dist/{scheduled-C2IKVZVK.js → scheduled-N34EKDIJ.js} +5 -5
  34. package/dist/seo.js +4 -4
  35. package/dist/{settings-NBAP7E5E.js → settings-5PH4SNIX.js} +2 -2
  36. package/dist/{strings-O2M7VSKV.js → strings-CKOSVH45.js} +3 -3
  37. package/package.json +1 -1
  38. /package/dist/{can-U5F4JBZ7.js.map → can-2CHRJ2FK.js.map} +0 -0
  39. /package/dist/{chunk-3SW4L3DL.js.map → chunk-2LNXTEBM.js.map} +0 -0
  40. /package/dist/{chunk-XPD7EQML.js.map → chunk-5NCTIJEN.js.map} +0 -0
  41. /package/dist/{chunk-EWVXP3GP.js.map → chunk-A3DPN2SP.js.map} +0 -0
  42. /package/dist/{chunk-XU2GJJ6Z.js.map → chunk-BGEPMNVB.js.map} +0 -0
  43. /package/dist/{chunk-QZ52U4ET.js.map → chunk-IT4JBQK4.js.map} +0 -0
  44. /package/dist/{chunk-6OUWW6JF.js.map → chunk-JMNDARCQ.js.map} +0 -0
  45. /package/dist/{chunk-6MRTH734.js.map → chunk-KNSOZ2NN.js.map} +0 -0
  46. /package/dist/{chunk-YEOQJ7WW.js.map → chunk-KS3S6TJS.js.map} +0 -0
  47. /package/dist/{chunk-TIWJVQOO.js.map → chunk-LDY26JKB.js.map} +0 -0
  48. /package/dist/{chunk-2X3GBJOT.js.map → chunk-MLQKHRW2.js.map} +0 -0
  49. /package/dist/{chunk-EAYUAXW3.js.map → chunk-PXVCVEXV.js.map} +0 -0
  50. /package/dist/{chunk-2OWUHCFY.js.map → chunk-RCK73HJI.js.map} +0 -0
  51. /package/dist/{chunk-SJ7M2VCC.js.map → chunk-UVLDAY4U.js.map} +0 -0
  52. /package/dist/{chunk-K4CJ3KXB.js.map → chunk-X43DI2QJ.js.map} +0 -0
  53. /package/dist/{config-YDGNUDKP.js.map → config-WD2IMHKB.js.map} +0 -0
  54. /package/dist/{digest-IWHMJPXI.js.map → digest-U4X45I74.js.map} +0 -0
  55. /package/dist/{host-HG4QGD3L.js.map → host-6EAJQRCL.js.map} +0 -0
  56. /package/dist/{mentions-LQRZWAGO.js.map → mentions-FRPM6LOO.js.map} +0 -0
  57. /package/dist/{mutes-PQA6U5X7.js.map → mutes-2JEKADIG.js.map} +0 -0
  58. /package/dist/{registry-WZVL5HH6.js.map → registry-JMMSOTJI.js.map} +0 -0
  59. /package/dist/{scheduled-C2IKVZVK.js.map → scheduled-N34EKDIJ.js.map} +0 -0
  60. /package/dist/{settings-NBAP7E5E.js.map → settings-5PH4SNIX.js.map} +0 -0
  61. /package/dist/{strings-O2M7VSKV.js.map → strings-CKOSVH45.js.map} +0 -0
package/dist/auth.js CHANGED
@@ -38,12 +38,12 @@ import {
38
38
  verifyPassword,
39
39
  verifyToken,
40
40
  verifyTokenFull
41
- } from "./chunk-TIWJVQOO.js";
41
+ } from "./chunk-LDY26JKB.js";
42
42
  import {
43
43
  can
44
44
  } from "./chunk-EQ2Z3KMD.js";
45
45
  import "./chunk-5C22NDW4.js";
46
- import "./chunk-6MRTH734.js";
46
+ import "./chunk-KNSOZ2NN.js";
47
47
  import "./chunk-SBCVAC2Z.js";
48
48
  import "./chunk-ZCINJSS4.js";
49
49
  import "./chunk-OROPGO65.js";
@@ -3,8 +3,8 @@ import {
3
3
  isMemberBanned,
4
4
  memberCan,
5
5
  withMemberWrite
6
- } from "./chunk-XU2GJJ6Z.js";
7
- import "./chunk-U4QCCLAW.js";
6
+ } from "./chunk-BGEPMNVB.js";
7
+ import "./chunk-MYUCR3SE.js";
8
8
  import "./chunk-SBCVAC2Z.js";
9
9
  import "./chunk-ZCINJSS4.js";
10
10
  import "./chunk-XANPEOJC.js";
@@ -16,4 +16,4 @@ export {
16
16
  memberCan,
17
17
  withMemberWrite
18
18
  };
19
- //# sourceMappingURL=can-U5F4JBZ7.js.map
19
+ //# sourceMappingURL=can-2CHRJ2FK.js.map
@@ -2,15 +2,15 @@ import {
2
2
  getCommunityRole,
3
3
  memberCan,
4
4
  withMemberWrite
5
- } from "./chunk-XU2GJJ6Z.js";
5
+ } from "./chunk-BGEPMNVB.js";
6
6
  import {
7
7
  getMutedTargetIds
8
- } from "./chunk-YEOQJ7WW.js";
8
+ } from "./chunk-KS3S6TJS.js";
9
9
  import {
10
10
  createNotification,
11
11
  extractMentionHandles,
12
12
  fanOutMentionNotifications
13
- } from "./chunk-XPD7EQML.js";
13
+ } from "./chunk-5NCTIJEN.js";
14
14
  import {
15
15
  applyReputation
16
16
  } from "./chunk-VBVLYFSZ.js";
@@ -22,17 +22,17 @@ import {
22
22
  } from "./chunk-KU5M27ZC.js";
23
23
  import {
24
24
  getMediaUrl
25
- } from "./chunk-EWVXP3GP.js";
25
+ } from "./chunk-A3DPN2SP.js";
26
26
  import {
27
27
  buildWeightedSearchVectorSql,
28
28
  deleteDocument,
29
29
  findDocuments,
30
30
  getDocumentById,
31
31
  saveDocument
32
- } from "./chunk-TSCXXBOM.js";
32
+ } from "./chunk-K4IYOAZJ.js";
33
33
  import {
34
34
  deleteMedia
35
- } from "./chunk-EAYUAXW3.js";
35
+ } from "./chunk-PXVCVEXV.js";
36
36
  import {
37
37
  can
38
38
  } from "./chunk-EQ2Z3KMD.js";
@@ -41,7 +41,7 @@ import {
41
41
  } from "./chunk-5C22NDW4.js";
42
42
  import {
43
43
  getCommunitySettings
44
- } from "./chunk-6MRTH734.js";
44
+ } from "./chunk-KNSOZ2NN.js";
45
45
  import {
46
46
  getI18nConfig
47
47
  } from "./chunk-4ZLMEKFX.js";
@@ -51,7 +51,7 @@ import {
51
51
  getCollectionConfig,
52
52
  getCollectionRegistration,
53
53
  getCollectionTable
54
- } from "./chunk-U4QCCLAW.js";
54
+ } from "./chunk-MYUCR3SE.js";
55
55
  import {
56
56
  getCurrentSiteId,
57
57
  requireSiteId
@@ -1956,4 +1956,4 @@ export {
1956
1956
  revokeMemberRole,
1957
1957
  purgeMemberContent
1958
1958
  };
1959
- //# sourceMappingURL=chunk-3SW4L3DL.js.map
1959
+ //# sourceMappingURL=chunk-2LNXTEBM.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NP_DEFAULT_SITE_ID
3
- } from "./chunk-U4QCCLAW.js";
3
+ } from "./chunk-MYUCR3SE.js";
4
4
  import {
5
5
  getCurrentSiteId,
6
6
  requireSiteId
@@ -24,7 +24,7 @@ import { inArray as inArray2 } from "drizzle-orm";
24
24
  import { and, count, desc, eq, isNull, inArray } from "drizzle-orm";
25
25
  async function createNotification(input) {
26
26
  if (input.actorMemberId && input.actorMemberId !== input.memberId) {
27
- const { isMuted } = await import("./mutes-PQA6U5X7.js");
27
+ const { isMuted } = await import("./mutes-2JEKADIG.js");
28
28
  const muted = await isMuted({
29
29
  memberId: input.memberId,
30
30
  targetId: input.actorMemberId
@@ -219,4 +219,4 @@ export {
219
219
  resolveMentionedMembers,
220
220
  fanOutMentionNotifications
221
221
  };
222
- //# sourceMappingURL=chunk-XPD7EQML.js.map
222
+ //# sourceMappingURL=chunk-5NCTIJEN.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getStorageAdapter
3
- } from "./chunk-EAYUAXW3.js";
3
+ } from "./chunk-PXVCVEXV.js";
4
4
  import {
5
5
  getDb
6
6
  } from "./chunk-XANPEOJC.js";
@@ -38,4 +38,4 @@ async function getMediaUrl(id, options = {}) {
38
38
  export {
39
39
  getMediaUrl
40
40
  };
41
- //# sourceMappingURL=chunk-EWVXP3GP.js.map
41
+ //# sourceMappingURL=chunk-A3DPN2SP.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  NP_DEFAULT_SITE_ID
3
- } from "./chunk-U4QCCLAW.js";
3
+ } from "./chunk-MYUCR3SE.js";
4
4
  import {
5
5
  getCurrentSiteId
6
6
  } from "./chunk-SBCVAC2Z.js";
@@ -176,4 +176,4 @@ export {
176
176
  withMemberWrite,
177
177
  memberCan
178
178
  };
179
- //# sourceMappingURL=chunk-XU2GJJ6Z.js.map
179
+ //# sourceMappingURL=chunk-BGEPMNVB.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  findDocuments
3
- } from "./chunk-TSCXXBOM.js";
3
+ } from "./chunk-K4IYOAZJ.js";
4
4
  import {
5
5
  getI18nConfig
6
6
  } from "./chunk-4ZLMEKFX.js";
7
7
  import {
8
8
  getAllCollectionSlugs,
9
9
  getCollectionConfig
10
- } from "./chunk-U4QCCLAW.js";
10
+ } from "./chunk-MYUCR3SE.js";
11
11
  import {
12
12
  getDb
13
13
  } from "./chunk-XANPEOJC.js";
@@ -597,4 +597,4 @@ export {
597
597
  buildDiscussionForumPostingJsonLd,
598
598
  buildPersonJsonLd
599
599
  };
600
- //# sourceMappingURL=chunk-QZ52U4ET.js.map
600
+ //# sourceMappingURL=chunk-IT4JBQK4.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  runHook
3
- } from "./chunk-TSCXXBOM.js";
3
+ } from "./chunk-K4IYOAZJ.js";
4
4
  import {
5
5
  getAllCollectionSlugs,
6
6
  getCollectionConfig,
7
7
  getCollectionTable
8
- } from "./chunk-U4QCCLAW.js";
8
+ } from "./chunk-MYUCR3SE.js";
9
9
  import {
10
10
  enqueueJob
11
11
  } from "./chunk-V2UNHGAP.js";
@@ -80,4 +80,4 @@ async function publishScheduledDocuments(atTime = /* @__PURE__ */ new Date()) {
80
80
  export {
81
81
  publishScheduledDocuments
82
82
  };
83
- //# sourceMappingURL=chunk-6OUWW6JF.js.map
83
+ //# sourceMappingURL=chunk-JMNDARCQ.js.map
@@ -4,7 +4,7 @@ import {
4
4
  getStorageAdapter,
5
5
  listMedia,
6
6
  uploadMedia
7
- } from "./chunk-EAYUAXW3.js";
7
+ } from "./chunk-PXVCVEXV.js";
8
8
  import {
9
9
  getCollectionZodSchema
10
10
  } from "./chunk-EFZH6UPY.js";
@@ -16,7 +16,7 @@ import {
16
16
  getCollectionConfig,
17
17
  getCollectionRegistration,
18
18
  getCollectionTable
19
- } from "./chunk-U4QCCLAW.js";
19
+ } from "./chunk-MYUCR3SE.js";
20
20
  import {
21
21
  getCurrentSiteId
22
22
  } from "./chunk-SBCVAC2Z.js";
@@ -258,7 +258,7 @@ async function updateMemberDocument(collection, docId, data, memberId, options)
258
258
  if (authorId !== memberId) {
259
259
  throw new NpForbiddenError(collection, "update");
260
260
  }
261
- const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
261
+ const { assertNotBanned } = await import("./can-2CHRJ2FK.js");
262
262
  await assertNotBanned(memberId);
263
263
  const moderation = await runMemberDocModeration({
264
264
  collection,
@@ -292,7 +292,7 @@ async function updateMemberDocument(collection, docId, data, memberId, options)
292
292
  });
293
293
  const resultStatus = result.doc.status;
294
294
  if (resultStatus === "published") {
295
- const { extractMentionHandlesFromDocData, fanOutMentionNotifications } = await import("./mentions-LQRZWAGO.js");
295
+ const { extractMentionHandlesFromDocData, fanOutMentionNotifications } = await import("./mentions-FRPM6LOO.js");
296
296
  const previousHandles = new Set(extractMentionHandlesFromDocData(originalDoc));
297
297
  await fanOutMentionNotifications({
298
298
  actorMemberId: memberId,
@@ -312,7 +312,7 @@ async function createMemberDocument(collection, data, memberId, options) {
312
312
  if (!config.community?.memberWrite?.create) {
313
313
  throw new NpForbiddenError(collection, "create");
314
314
  }
315
- const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
315
+ const { assertNotBanned } = await import("./can-2CHRJ2FK.js");
316
316
  await assertNotBanned(memberId);
317
317
  const defaultStatus = config.community?.memberWrite?.defaultStatus === "pending" ? "pending" : "published";
318
318
  const moderation = await runMemberDocModeration({
@@ -356,7 +356,7 @@ async function createMemberDocument(collection, data, memberId, options) {
356
356
  });
357
357
  }
358
358
  if (spamStatus === "published") {
359
- const { fanOutMentionNotifications } = await import("./mentions-LQRZWAGO.js");
359
+ const { fanOutMentionNotifications } = await import("./mentions-FRPM6LOO.js");
360
360
  await fanOutMentionNotifications({
361
361
  actorMemberId: memberId,
362
362
  kind: "document.mention",
@@ -476,7 +476,7 @@ async function validateActorAccess(ctx) {
476
476
  );
477
477
  return;
478
478
  }
479
- const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
479
+ const { assertNotBanned } = await import("./can-2CHRJ2FK.js");
480
480
  if (ctx.operation === "create") {
481
481
  if (!ctx.config.community?.memberWrite?.create) {
482
482
  throw new NpForbiddenError(ctx.collection, "create");
@@ -928,7 +928,7 @@ async function deleteDocumentImpl(collection, docId, actor, options) {
928
928
  if (authorId !== actor.memberId) {
929
929
  throw new NpForbiddenError(collection, "delete");
930
930
  }
931
- const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
931
+ const { assertNotBanned } = await import("./can-2CHRJ2FK.js");
932
932
  await assertNotBanned(actor.memberId);
933
933
  }
934
934
  const userForHooks = actorUserOrNull(actor);
@@ -1873,7 +1873,7 @@ function createPluginRuntimeContext(options) {
1873
1873
  return row.value;
1874
1874
  },
1875
1875
  async getPlugin() {
1876
- const { getPluginConfig } = await import("./config-YDGNUDKP.js");
1876
+ const { getPluginConfig } = await import("./config-WD2IMHKB.js");
1877
1877
  const value = await getPluginConfig(pluginId);
1878
1878
  if (value && typeof value === "object" && !Array.isArray(value)) {
1879
1879
  return value;
@@ -1881,8 +1881,8 @@ function createPluginRuntimeContext(options) {
1881
1881
  return {};
1882
1882
  },
1883
1883
  async setPlugin(data) {
1884
- const { setPluginConfig } = await import("./config-YDGNUDKP.js");
1885
- const { getPluginRegistration: getPluginRegistration2 } = await import("./host-HG4QGD3L.js");
1884
+ const { setPluginConfig } = await import("./config-WD2IMHKB.js");
1885
+ const { getPluginRegistration: getPluginRegistration2 } = await import("./host-6EAJQRCL.js");
1886
1886
  const reg = getPluginRegistration2(pluginId);
1887
1887
  if (reg?.configSchema) {
1888
1888
  await setPluginConfig(pluginId, data, null);
@@ -2124,7 +2124,7 @@ function invalidatePluginEnabled(pluginId) {
2124
2124
  var fetchOverride = null;
2125
2125
 
2126
2126
  // src/plugins/compat.ts
2127
- var FRAMEWORK_VERSION_FROM_PACKAGE = true ? "0.3.9" : "0.0.0-dev";
2127
+ var FRAMEWORK_VERSION_FROM_PACKAGE = true ? "0.3.10" : "0.0.0-dev";
2128
2128
  var frameworkVersion = FRAMEWORK_VERSION_FROM_PACKAGE;
2129
2129
  function getFrameworkVersion() {
2130
2130
  return frameworkVersion;
@@ -2274,7 +2274,7 @@ function insertSortedByPriority(list, entry) {
2274
2274
  list.sort((a, b) => a.priority - b.priority);
2275
2275
  }
2276
2276
  async function loadPluginConfig(pluginId) {
2277
- const { getPluginConfig } = await import("./config-YDGNUDKP.js");
2277
+ const { getPluginConfig } = await import("./config-WD2IMHKB.js");
2278
2278
  const value = await getPluginConfig(pluginId);
2279
2279
  if (value && typeof value === "object" && !Array.isArray(value)) {
2280
2280
  return value;
@@ -2450,7 +2450,7 @@ async function loadResolvedPlugin(plugin) {
2450
2450
  }
2451
2451
  const i18nBundles = plugin.i18n;
2452
2452
  if (i18nBundles && typeof i18nBundles === "object") {
2453
- const { addStrings } = await import("./strings-O2M7VSKV.js");
2453
+ const { addStrings } = await import("./strings-CKOSVH45.js");
2454
2454
  for (const [locale, bundle] of Object.entries(i18nBundles)) {
2455
2455
  if (bundle && typeof bundle === "object") {
2456
2456
  addStrings(locale, bundle);
@@ -2785,4 +2785,4 @@ export {
2785
2785
  findDocuments,
2786
2786
  getDocumentById
2787
2787
  };
2788
- //# sourceMappingURL=chunk-TSCXXBOM.js.map
2788
+ //# sourceMappingURL=chunk-K4IYOAZJ.js.map