@nexpress/core 0.3.9 → 0.3.11
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/auth.js +2 -2
- package/dist/{can-U5F4JBZ7.js → can-2CHRJ2FK.js} +3 -3
- package/dist/{chunk-6OUWW6JF.js → chunk-24JEFZMS.js} +3 -3
- package/dist/{chunk-SJ7M2VCC.js → chunk-3ZLWRPCQ.js} +7 -7
- package/dist/{chunk-XPD7EQML.js → chunk-5NCTIJEN.js} +3 -3
- package/dist/{chunk-EWVXP3GP.js → chunk-A3DPN2SP.js} +2 -2
- package/dist/{chunk-TSCXXBOM.js → chunk-AXOG2RJK.js} +15 -15
- package/dist/{chunk-TSCXXBOM.js.map → chunk-AXOG2RJK.js.map} +1 -1
- package/dist/{chunk-XU2GJJ6Z.js → chunk-BGEPMNVB.js} +2 -2
- package/dist/{chunk-QZ52U4ET.js → chunk-IPWHRKIC.js} +3 -3
- package/dist/{chunk-6MRTH734.js → chunk-KNSOZ2NN.js} +2 -2
- package/dist/{chunk-YEOQJ7WW.js → chunk-KS3S6TJS.js} +2 -2
- package/dist/{chunk-TIWJVQOO.js → chunk-LDY26JKB.js} +2 -2
- package/dist/{chunk-2X3GBJOT.js → chunk-MLQKHRW2.js} +2 -2
- package/dist/{chunk-U4QCCLAW.js → chunk-MYUCR3SE.js} +4 -3
- package/dist/{chunk-U4QCCLAW.js.map → chunk-MYUCR3SE.js.map} +1 -1
- package/dist/{chunk-3SW4L3DL.js → chunk-N2IW4JOR.js} +9 -9
- package/dist/{chunk-EAYUAXW3.js → chunk-PXVCVEXV.js} +2 -2
- package/dist/{chunk-K4CJ3KXB.js → chunk-X43DI2QJ.js} +2 -2
- package/dist/{chunk-2OWUHCFY.js → chunk-ZIG5A4TD.js} +2 -2
- package/dist/community.js +11 -11
- package/dist/{config-YDGNUDKP.js → config-V75MS3II.js} +5 -5
- package/dist/{digest-IWHMJPXI.js → digest-U4X45I74.js} +3 -3
- package/dist/{host-HG4QGD3L.js → host-IEQZ5A6K.js} +4 -4
- package/dist/i18n.js +2 -2
- package/dist/index.js +99 -18
- package/dist/index.js.map +1 -1
- package/dist/jobs.js +1 -1
- package/dist/media.js +2 -2
- package/dist/{mentions-LQRZWAGO.js → mentions-FRPM6LOO.js} +3 -3
- package/dist/{mutes-PQA6U5X7.js → mutes-2JEKADIG.js} +3 -3
- package/dist/{registry-WZVL5HH6.js → registry-JMMSOTJI.js} +2 -2
- package/dist/{scheduled-C2IKVZVK.js → scheduled-RFKXRC6T.js} +5 -5
- package/dist/seo.js +4 -4
- package/dist/{settings-NBAP7E5E.js → settings-5PH4SNIX.js} +2 -2
- package/dist/{strings-O2M7VSKV.js → strings-CKOSVH45.js} +3 -3
- package/package.json +1 -1
- /package/dist/{can-U5F4JBZ7.js.map → can-2CHRJ2FK.js.map} +0 -0
- /package/dist/{chunk-6OUWW6JF.js.map → chunk-24JEFZMS.js.map} +0 -0
- /package/dist/{chunk-SJ7M2VCC.js.map → chunk-3ZLWRPCQ.js.map} +0 -0
- /package/dist/{chunk-XPD7EQML.js.map → chunk-5NCTIJEN.js.map} +0 -0
- /package/dist/{chunk-EWVXP3GP.js.map → chunk-A3DPN2SP.js.map} +0 -0
- /package/dist/{chunk-XU2GJJ6Z.js.map → chunk-BGEPMNVB.js.map} +0 -0
- /package/dist/{chunk-QZ52U4ET.js.map → chunk-IPWHRKIC.js.map} +0 -0
- /package/dist/{chunk-6MRTH734.js.map → chunk-KNSOZ2NN.js.map} +0 -0
- /package/dist/{chunk-YEOQJ7WW.js.map → chunk-KS3S6TJS.js.map} +0 -0
- /package/dist/{chunk-TIWJVQOO.js.map → chunk-LDY26JKB.js.map} +0 -0
- /package/dist/{chunk-2X3GBJOT.js.map → chunk-MLQKHRW2.js.map} +0 -0
- /package/dist/{chunk-3SW4L3DL.js.map → chunk-N2IW4JOR.js.map} +0 -0
- /package/dist/{chunk-EAYUAXW3.js.map → chunk-PXVCVEXV.js.map} +0 -0
- /package/dist/{chunk-K4CJ3KXB.js.map → chunk-X43DI2QJ.js.map} +0 -0
- /package/dist/{chunk-2OWUHCFY.js.map → chunk-ZIG5A4TD.js.map} +0 -0
- /package/dist/{config-YDGNUDKP.js.map → config-V75MS3II.js.map} +0 -0
- /package/dist/{digest-IWHMJPXI.js.map → digest-U4X45I74.js.map} +0 -0
- /package/dist/{host-HG4QGD3L.js.map → host-IEQZ5A6K.js.map} +0 -0
- /package/dist/{mentions-LQRZWAGO.js.map → mentions-FRPM6LOO.js.map} +0 -0
- /package/dist/{mutes-PQA6U5X7.js.map → mutes-2JEKADIG.js.map} +0 -0
- /package/dist/{registry-WZVL5HH6.js.map → registry-JMMSOTJI.js.map} +0 -0
- /package/dist/{scheduled-C2IKVZVK.js.map → scheduled-RFKXRC6T.js.map} +0 -0
- /package/dist/{settings-NBAP7E5E.js.map → settings-5PH4SNIX.js.map} +0 -0
- /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-
|
|
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-
|
|
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-
|
|
7
|
-
import "./chunk-
|
|
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-
|
|
19
|
+
//# sourceMappingURL=can-2CHRJ2FK.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runHook
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AXOG2RJK.js";
|
|
4
4
|
import {
|
|
5
5
|
getAllCollectionSlugs,
|
|
6
6
|
getCollectionConfig,
|
|
7
7
|
getCollectionTable
|
|
8
|
-
} from "./chunk-
|
|
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-
|
|
83
|
+
//# sourceMappingURL=chunk-24JEFZMS.js.map
|
|
@@ -145,7 +145,7 @@ function registerBuiltinHandlers() {
|
|
|
145
145
|
registerJobHandler("notifications:sendDigest", handleNotificationsSendDigest);
|
|
146
146
|
}
|
|
147
147
|
async function handleContentPublishScheduled(_) {
|
|
148
|
-
const { publishScheduledDocuments } = await import("./scheduled-
|
|
148
|
+
const { publishScheduledDocuments } = await import("./scheduled-RFKXRC6T.js");
|
|
149
149
|
const result = await publishScheduledDocuments();
|
|
150
150
|
if (result.published > 0) {
|
|
151
151
|
console.info(
|
|
@@ -193,7 +193,7 @@ async function handleMediaCleanup(data) {
|
|
|
193
193
|
async function handlePluginScheduledTask(data) {
|
|
194
194
|
if (isRecord(data) && typeof data.pluginId === "string" && typeof data.taskId === "string") {
|
|
195
195
|
try {
|
|
196
|
-
const { runPluginScheduledTask } = await import("./host-
|
|
196
|
+
const { runPluginScheduledTask } = await import("./host-IEQZ5A6K.js");
|
|
197
197
|
await runPluginScheduledTask(data.pluginId, data.taskId);
|
|
198
198
|
return;
|
|
199
199
|
} catch (err) {
|
|
@@ -387,7 +387,7 @@ async function handleMemberSendPasswordReset(data) {
|
|
|
387
387
|
async function handleNotificationsSendDigest(data) {
|
|
388
388
|
const cadence = isRecord(data) && (data.cadence === "daily" || data.cadence === "weekly") ? data.cadence : "daily";
|
|
389
389
|
const siteName = isRecord(data) && typeof data.siteName === "string" ? data.siteName : void 0;
|
|
390
|
-
const { runDigestSweep } = await import("./digest-
|
|
390
|
+
const { runDigestSweep } = await import("./digest-U4X45I74.js");
|
|
391
391
|
const result = await runDigestSweep({ cadence, siteName });
|
|
392
392
|
console.info(
|
|
393
393
|
`[nexpress] notifications:sendDigest cadence=${cadence} considered=${result.considered} sent=${result.sent} skipped=${result.skipped} failed=${result.failed}`
|
|
@@ -673,7 +673,7 @@ var PgBossAdapter = class {
|
|
|
673
673
|
this.workRegistrations.push({ queueName, register });
|
|
674
674
|
await register();
|
|
675
675
|
}
|
|
676
|
-
const { getRegisteredPluginSchedules, runPluginScheduledTask } = await import("./host-
|
|
676
|
+
const { getRegisteredPluginSchedules, runPluginScheduledTask } = await import("./host-IEQZ5A6K.js");
|
|
677
677
|
for (const schedule of getRegisteredPluginSchedules()) {
|
|
678
678
|
const queueName = `${toQueueName("plugin:scheduledTask")}.${schedule.pluginId}.${schedule.taskId}`;
|
|
679
679
|
await this.boss.createQueue(queueName);
|
|
@@ -775,7 +775,7 @@ var PgBossAdapter = class {
|
|
|
775
775
|
});
|
|
776
776
|
await this.boss.schedule(digestQueue, "0 8 * * *", { cadence: "daily" }, { key: "daily" });
|
|
777
777
|
await this.boss.schedule(digestQueue, "0 8 * * 1", { cadence: "weekly" }, { key: "weekly" });
|
|
778
|
-
const { getRegisteredPluginSchedules } = await import("./host-
|
|
778
|
+
const { getRegisteredPluginSchedules } = await import("./host-IEQZ5A6K.js");
|
|
779
779
|
for (const schedule of getRegisteredPluginSchedules()) {
|
|
780
780
|
const pgBossName = `${toQueueName("plugin:scheduledTask")}.${schedule.pluginId}.${schedule.taskId}`;
|
|
781
781
|
await this.boss.schedule(pgBossName, schedule.cron, {
|
|
@@ -939,7 +939,7 @@ var PgBossAdapter = class {
|
|
|
939
939
|
* `workerOwnsRegistrations` so the admin UI can warn the operator.
|
|
940
940
|
*/
|
|
941
941
|
async reconcilePluginSchedules() {
|
|
942
|
-
const { getRegisteredPluginSchedules } = await import("./host-
|
|
942
|
+
const { getRegisteredPluginSchedules } = await import("./host-IEQZ5A6K.js");
|
|
943
943
|
const wantedList = getRegisteredPluginSchedules();
|
|
944
944
|
const wantedByName = /* @__PURE__ */ new Map();
|
|
945
945
|
for (const schedule of wantedList) {
|
|
@@ -1267,4 +1267,4 @@ export {
|
|
|
1267
1267
|
stopWorker,
|
|
1268
1268
|
stopProducer
|
|
1269
1269
|
};
|
|
1270
|
-
//# sourceMappingURL=chunk-
|
|
1270
|
+
//# sourceMappingURL=chunk-3ZLWRPCQ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NP_DEFAULT_SITE_ID
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
222
|
+
//# sourceMappingURL=chunk-5NCTIJEN.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getStorageAdapter
|
|
3
|
-
} from "./chunk-
|
|
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-
|
|
41
|
+
//# sourceMappingURL=chunk-A3DPN2SP.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getStorageAdapter,
|
|
5
5
|
listMedia,
|
|
6
6
|
uploadMedia
|
|
7
|
-
} from "./chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
1876
|
+
const { getPluginConfig } = await import("./config-V75MS3II.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-
|
|
1885
|
-
const { getPluginRegistration: getPluginRegistration2 } = await import("./host-
|
|
1884
|
+
const { setPluginConfig } = await import("./config-V75MS3II.js");
|
|
1885
|
+
const { getPluginRegistration: getPluginRegistration2 } = await import("./host-IEQZ5A6K.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.
|
|
2127
|
+
var FRAMEWORK_VERSION_FROM_PACKAGE = true ? "0.3.11" : "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-
|
|
2277
|
+
const { getPluginConfig } = await import("./config-V75MS3II.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-
|
|
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-
|
|
2788
|
+
//# sourceMappingURL=chunk-AXOG2RJK.js.map
|