@nexpress/core 0.3.7 → 0.3.8
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/{audit-43OLHR3U.js → audit-ZLNKBIDO.js} +3 -3
- package/dist/auth.js +4 -4
- package/dist/{can-UJ2NAOIR.js → can-U5F4JBZ7.js} +2 -2
- package/dist/{chunk-2GXH7566.js → chunk-2O2KMHLO.js} +10 -10
- package/dist/chunk-2O2KMHLO.js.map +1 -0
- package/dist/{chunk-ELK6AVW5.js → chunk-2X3GBJOT.js} +2 -2
- package/dist/{chunk-ML2E3P3X.js → chunk-5C22NDW4.js} +2 -2
- package/dist/chunk-5C22NDW4.js.map +1 -0
- package/dist/{chunk-RKM4GDWM.js → chunk-6MRTH734.js} +1 -1
- package/dist/chunk-6MRTH734.js.map +1 -0
- package/dist/{chunk-HNX7COHQ.js → chunk-6PFUXZJ6.js} +12 -12
- package/dist/chunk-6PFUXZJ6.js.map +1 -0
- package/dist/{chunk-MLXKZK6G.js → chunk-CD74WQK7.js} +76 -28
- package/dist/chunk-CD74WQK7.js.map +1 -0
- package/dist/{chunk-QBIJZZ5V.js → chunk-CGLJBRRX.js} +2 -2
- package/dist/chunk-CGLJBRRX.js.map +1 -0
- package/dist/{chunk-2VZZ7M26.js → chunk-EAYUAXW3.js} +3 -3
- package/dist/chunk-EAYUAXW3.js.map +1 -0
- package/dist/{chunk-2N53KKIL.js → chunk-EWVXP3GP.js} +2 -2
- package/dist/{chunk-CAS4Z6IN.js → chunk-I4FSVEJK.js} +1 -1
- package/dist/chunk-I4FSVEJK.js.map +1 -0
- package/dist/{chunk-OMGQZ4Q5.js → chunk-JKTU67A7.js} +2 -2
- package/dist/{chunk-OMGQZ4Q5.js.map → chunk-JKTU67A7.js.map} +1 -1
- package/dist/{chunk-LN6NTH6E.js → chunk-K4CJ3KXB.js} +3 -3
- package/dist/chunk-K4CJ3KXB.js.map +1 -0
- package/dist/{chunk-B7DTNT4O.js → chunk-MWLSXK6Y.js} +2 -2
- package/dist/{chunk-PW43RCJK.js → chunk-PPUHXOWZ.js} +2 -2
- package/dist/{chunk-NFHS7CFV.js → chunk-Q7MK5ZKG.js} +2 -2
- package/dist/{chunk-6UV2P5MW.js → chunk-TIWJVQOO.js} +3 -3
- package/dist/chunk-TIWJVQOO.js.map +1 -0
- package/dist/{chunk-L6VG7IK6.js → chunk-VBVLYFSZ.js} +2 -2
- package/dist/chunk-VBVLYFSZ.js.map +1 -0
- package/dist/{chunk-PUV3VZPD.js → chunk-VX3HM5TF.js} +2 -2
- package/dist/{chunk-RDTTK27V.js → chunk-XPD7EQML.js} +3 -3
- package/dist/chunk-XPD7EQML.js.map +1 -0
- package/dist/{chunk-RJ76SKWQ.js → chunk-XU2GJJ6Z.js} +1 -1
- package/dist/chunk-XU2GJJ6Z.js.map +1 -0
- package/dist/{chunk-WJJ5MBH5.js → chunk-YEOQJ7WW.js} +1 -1
- package/dist/chunk-YEOQJ7WW.js.map +1 -0
- package/dist/community.js +14 -14
- package/dist/{config-YHUEYQ66.js → config-2CV7KZ3D.js} +5 -5
- package/dist/{digest-ZODDTXA2.js → digest-IWHMJPXI.js} +4 -4
- package/dist/{host-XBGYIQEE.js → host-C5PGUXX7.js} +4 -4
- package/dist/i18n.js +2 -2
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/{job-log-N3IGI4NA.js → job-log-UY6ERPQZ.js} +3 -3
- package/dist/jobs.js +3 -3
- package/dist/{logger-2WUTTELV.js → logger-6ZGEKEMK.js} +2 -2
- package/dist/media.js +3 -3
- package/dist/{mentions-U4JACYI6.js → mentions-LQRZWAGO.js} +2 -2
- package/dist/{mutes-MNQP6ACF.js → mutes-PQA6U5X7.js} +2 -2
- package/dist/{notification-prefs-H4HFVCL7.js → notification-prefs-62NX2GBF.js} +2 -2
- package/dist/observability.js +2 -2
- package/dist/{reputation-ICIXDGPM.js → reputation-5DJLDBZY.js} +3 -3
- package/dist/{scheduled-S6IO47JD.js → scheduled-PF2HECSF.js} +5 -5
- package/dist/seo.js +4 -4
- package/dist/{settings-OZWM6L2K.js → settings-NBAP7E5E.js} +2 -2
- package/dist/{strings-4EWJYDOG.js → strings-O2M7VSKV.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-2GXH7566.js.map +0 -1
- package/dist/chunk-2VZZ7M26.js.map +0 -1
- package/dist/chunk-6UV2P5MW.js.map +0 -1
- package/dist/chunk-CAS4Z6IN.js.map +0 -1
- package/dist/chunk-HNX7COHQ.js.map +0 -1
- package/dist/chunk-L6VG7IK6.js.map +0 -1
- package/dist/chunk-LN6NTH6E.js.map +0 -1
- package/dist/chunk-ML2E3P3X.js.map +0 -1
- package/dist/chunk-MLXKZK6G.js.map +0 -1
- package/dist/chunk-QBIJZZ5V.js.map +0 -1
- package/dist/chunk-RDTTK27V.js.map +0 -1
- package/dist/chunk-RJ76SKWQ.js.map +0 -1
- package/dist/chunk-RKM4GDWM.js.map +0 -1
- package/dist/chunk-WJJ5MBH5.js.map +0 -1
- /package/dist/{audit-43OLHR3U.js.map → audit-ZLNKBIDO.js.map} +0 -0
- /package/dist/{can-UJ2NAOIR.js.map → can-U5F4JBZ7.js.map} +0 -0
- /package/dist/{chunk-ELK6AVW5.js.map → chunk-2X3GBJOT.js.map} +0 -0
- /package/dist/{chunk-2N53KKIL.js.map → chunk-EWVXP3GP.js.map} +0 -0
- /package/dist/{chunk-B7DTNT4O.js.map → chunk-MWLSXK6Y.js.map} +0 -0
- /package/dist/{chunk-PW43RCJK.js.map → chunk-PPUHXOWZ.js.map} +0 -0
- /package/dist/{chunk-NFHS7CFV.js.map → chunk-Q7MK5ZKG.js.map} +0 -0
- /package/dist/{chunk-PUV3VZPD.js.map → chunk-VX3HM5TF.js.map} +0 -0
- /package/dist/{config-YHUEYQ66.js.map → config-2CV7KZ3D.js.map} +0 -0
- /package/dist/{digest-ZODDTXA2.js.map → digest-IWHMJPXI.js.map} +0 -0
- /package/dist/{host-XBGYIQEE.js.map → host-C5PGUXX7.js.map} +0 -0
- /package/dist/{job-log-N3IGI4NA.js.map → job-log-UY6ERPQZ.js.map} +0 -0
- /package/dist/{logger-2WUTTELV.js.map → logger-6ZGEKEMK.js.map} +0 -0
- /package/dist/{mentions-U4JACYI6.js.map → mentions-LQRZWAGO.js.map} +0 -0
- /package/dist/{mutes-MNQP6ACF.js.map → mutes-PQA6U5X7.js.map} +0 -0
- /package/dist/{notification-prefs-H4HFVCL7.js.map → notification-prefs-62NX2GBF.js.map} +0 -0
- /package/dist/{reputation-ICIXDGPM.js.map → reputation-5DJLDBZY.js.map} +0 -0
- /package/dist/{scheduled-S6IO47JD.js.map → scheduled-PF2HECSF.js.map} +0 -0
- /package/dist/{settings-OZWM6L2K.js.map → settings-NBAP7E5E.js.map} +0 -0
- /package/dist/{strings-4EWJYDOG.js.map → strings-O2M7VSKV.js.map} +0 -0
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
getStorageAdapter,
|
|
5
5
|
listMedia,
|
|
6
6
|
uploadMedia
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EAYUAXW3.js";
|
|
8
8
|
import {
|
|
9
9
|
getCollectionZodSchema
|
|
10
10
|
} from "./chunk-EFZH6UPY.js";
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
import {
|
|
36
36
|
getLogger,
|
|
37
37
|
getScopedLogger
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-Q7MK5ZKG.js";
|
|
39
39
|
import {
|
|
40
40
|
getDb
|
|
41
41
|
} from "./chunk-XANPEOJC.js";
|
|
@@ -53,7 +53,8 @@ import {
|
|
|
53
53
|
} from "./chunk-X7K5F2UI.js";
|
|
54
54
|
|
|
55
55
|
// src/plugins/context.ts
|
|
56
|
-
import {
|
|
56
|
+
import { randomUUID as randomUUID2 } from "crypto";
|
|
57
|
+
import { and, asc as asc2, eq as eq2, gt, isNull, like, or } from "drizzle-orm";
|
|
57
58
|
|
|
58
59
|
// src/collections/pipeline.ts
|
|
59
60
|
import { AsyncLocalStorage } from "async_hooks";
|
|
@@ -198,7 +199,7 @@ async function withDeferredPostCommit(callback) {
|
|
|
198
199
|
try {
|
|
199
200
|
await hook.fn();
|
|
200
201
|
} catch (err) {
|
|
201
|
-
const { getLogger: getLogger2 } = await import("./logger-
|
|
202
|
+
const { getLogger: getLogger2 } = await import("./logger-6ZGEKEMK.js");
|
|
202
203
|
getLogger2().error(
|
|
203
204
|
`deferred post-commit ${hook.label} failed \u2014 outer scope committed, follow-up skipped`,
|
|
204
205
|
{
|
|
@@ -223,7 +224,7 @@ async function runPostCommit(label, context, fn) {
|
|
|
223
224
|
try {
|
|
224
225
|
await fn();
|
|
225
226
|
} catch (err) {
|
|
226
|
-
const { getLogger: getLogger2 } = await import("./logger-
|
|
227
|
+
const { getLogger: getLogger2 } = await import("./logger-6ZGEKEMK.js");
|
|
227
228
|
getLogger2().error(
|
|
228
229
|
`post-commit ${label} failed \u2014 document persisted, follow-up skipped`,
|
|
229
230
|
{
|
|
@@ -257,7 +258,7 @@ async function updateMemberDocument(collection, docId, data, memberId, options)
|
|
|
257
258
|
if (authorId !== memberId) {
|
|
258
259
|
throw new NpForbiddenError(collection, "update");
|
|
259
260
|
}
|
|
260
|
-
const { assertNotBanned } = await import("./can-
|
|
261
|
+
const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
|
|
261
262
|
await assertNotBanned(memberId);
|
|
262
263
|
const moderation = await runMemberDocModeration({
|
|
263
264
|
collection,
|
|
@@ -275,7 +276,7 @@ async function updateMemberDocument(collection, docId, data, memberId, options)
|
|
|
275
276
|
{ kind: "member", memberId },
|
|
276
277
|
memberOptions
|
|
277
278
|
);
|
|
278
|
-
const { recordAuditEvent } = await import("./audit-
|
|
279
|
+
const { recordAuditEvent } = await import("./audit-ZLNKBIDO.js");
|
|
279
280
|
await recordAuditEvent({
|
|
280
281
|
actor: { kind: "member", memberId },
|
|
281
282
|
action: moderation.flaggedBy.length > 0 ? "document.flag" : "document.update",
|
|
@@ -291,7 +292,7 @@ async function updateMemberDocument(collection, docId, data, memberId, options)
|
|
|
291
292
|
});
|
|
292
293
|
const resultStatus = result.doc.status;
|
|
293
294
|
if (resultStatus === "published") {
|
|
294
|
-
const { extractMentionHandlesFromDocData, fanOutMentionNotifications } = await import("./mentions-
|
|
295
|
+
const { extractMentionHandlesFromDocData, fanOutMentionNotifications } = await import("./mentions-LQRZWAGO.js");
|
|
295
296
|
const previousHandles = new Set(extractMentionHandlesFromDocData(originalDoc));
|
|
296
297
|
await fanOutMentionNotifications({
|
|
297
298
|
actorMemberId: memberId,
|
|
@@ -311,7 +312,7 @@ async function createMemberDocument(collection, data, memberId, options) {
|
|
|
311
312
|
if (!config.community?.memberWrite?.create) {
|
|
312
313
|
throw new NpForbiddenError(collection, "create");
|
|
313
314
|
}
|
|
314
|
-
const { assertNotBanned } = await import("./can-
|
|
315
|
+
const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
|
|
315
316
|
await assertNotBanned(memberId);
|
|
316
317
|
const defaultStatus = config.community?.memberWrite?.defaultStatus === "pending" ? "pending" : "published";
|
|
317
318
|
const moderation = await runMemberDocModeration({
|
|
@@ -330,8 +331,8 @@ async function createMemberDocument(collection, data, memberId, options) {
|
|
|
330
331
|
{ kind: "member", memberId },
|
|
331
332
|
memberOptions
|
|
332
333
|
);
|
|
333
|
-
const { applyReputation } = await import("./reputation-
|
|
334
|
-
const { recordAuditEvent } = await import("./audit-
|
|
334
|
+
const { applyReputation } = await import("./reputation-5DJLDBZY.js");
|
|
335
|
+
const { recordAuditEvent } = await import("./audit-ZLNKBIDO.js");
|
|
335
336
|
const documentId = getRecordId(result.doc);
|
|
336
337
|
await recordAuditEvent({
|
|
337
338
|
actor: { kind: "member", memberId },
|
|
@@ -355,7 +356,7 @@ async function createMemberDocument(collection, data, memberId, options) {
|
|
|
355
356
|
});
|
|
356
357
|
}
|
|
357
358
|
if (spamStatus === "published") {
|
|
358
|
-
const { fanOutMentionNotifications } = await import("./mentions-
|
|
359
|
+
const { fanOutMentionNotifications } = await import("./mentions-LQRZWAGO.js");
|
|
359
360
|
await fanOutMentionNotifications({
|
|
360
361
|
actorMemberId: memberId,
|
|
361
362
|
kind: "document.mention",
|
|
@@ -373,7 +374,7 @@ async function runMemberDocModeration(input) {
|
|
|
373
374
|
const config = getCollectionConfig(collection);
|
|
374
375
|
const { getSpamAdapter } = await import("./spam-adapter-XX3G737Z.js");
|
|
375
376
|
const { getProfanityAdapter } = await import("./profanity-adapter-NU2JQSLX.js");
|
|
376
|
-
const { getLogger: getLogger2 } = await import("./logger-
|
|
377
|
+
const { getLogger: getLogger2 } = await import("./logger-6ZGEKEMK.js");
|
|
377
378
|
const moderationText = buildSearchVector(config, data);
|
|
378
379
|
const ctx = {
|
|
379
380
|
memberId,
|
|
@@ -475,7 +476,7 @@ async function validateActorAccess(ctx) {
|
|
|
475
476
|
);
|
|
476
477
|
return;
|
|
477
478
|
}
|
|
478
|
-
const { assertNotBanned } = await import("./can-
|
|
479
|
+
const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
|
|
479
480
|
if (ctx.operation === "create") {
|
|
480
481
|
if (!ctx.config.community?.memberWrite?.create) {
|
|
481
482
|
throw new NpForbiddenError(ctx.collection, "create");
|
|
@@ -818,8 +819,8 @@ async function deleteMemberDocument(collection, docId, memberId) {
|
|
|
818
819
|
const original = await getDocumentByIdInternal(db, table, collection, docId);
|
|
819
820
|
const wasPublished = typeof original?.status === "string" && original.status === "published";
|
|
820
821
|
await deleteDocumentImpl(collection, docId, { kind: "member", memberId });
|
|
821
|
-
const { applyReputation } = await import("./reputation-
|
|
822
|
-
const { recordAuditEvent } = await import("./audit-
|
|
822
|
+
const { applyReputation } = await import("./reputation-5DJLDBZY.js");
|
|
823
|
+
const { recordAuditEvent } = await import("./audit-ZLNKBIDO.js");
|
|
823
824
|
await recordAuditEvent({
|
|
824
825
|
actor: { kind: "member", memberId },
|
|
825
826
|
action: "document.delete",
|
|
@@ -882,8 +883,8 @@ async function promoteMemberDocument(collection, docId, staffUserId) {
|
|
|
882
883
|
]);
|
|
883
884
|
}
|
|
884
885
|
const persistedDoc = toRecord(updated[0]);
|
|
885
|
-
const { applyReputation } = await import("./reputation-
|
|
886
|
-
const { recordAuditEvent } = await import("./audit-
|
|
886
|
+
const { applyReputation } = await import("./reputation-5DJLDBZY.js");
|
|
887
|
+
const { recordAuditEvent } = await import("./audit-ZLNKBIDO.js");
|
|
887
888
|
await recordAuditEvent({
|
|
888
889
|
actor: { kind: "staff", userId: staffUserId },
|
|
889
890
|
action: "document.promote",
|
|
@@ -927,7 +928,7 @@ async function deleteDocumentImpl(collection, docId, actor, options) {
|
|
|
927
928
|
if (authorId !== actor.memberId) {
|
|
928
929
|
throw new NpForbiddenError(collection, "delete");
|
|
929
930
|
}
|
|
930
|
-
const { assertNotBanned } = await import("./can-
|
|
931
|
+
const { assertNotBanned } = await import("./can-U5F4JBZ7.js");
|
|
931
932
|
await assertNotBanned(actor.memberId);
|
|
932
933
|
}
|
|
933
934
|
const userForHooks = actorUserOrNull(actor);
|
|
@@ -1597,6 +1598,7 @@ var pluginPrincipal = (pluginId) => ({
|
|
|
1597
1598
|
tokenVersion: 0
|
|
1598
1599
|
});
|
|
1599
1600
|
var pluginCache = /* @__PURE__ */ new Map();
|
|
1601
|
+
var pluginStorageAppendCounter = 0;
|
|
1600
1602
|
function cacheKey(pluginId, key) {
|
|
1601
1603
|
return `${pluginId}:${key}`;
|
|
1602
1604
|
}
|
|
@@ -1622,7 +1624,10 @@ function createPluginRuntimeContext(options) {
|
|
|
1622
1624
|
const db = () => getDb();
|
|
1623
1625
|
const principal = pluginPrincipal(pluginId);
|
|
1624
1626
|
const pluginLog = getScopedLogger({ pluginId });
|
|
1625
|
-
|
|
1627
|
+
function registerAction(actionName, handler) {
|
|
1628
|
+
registration.actions.set(actionName, (data) => handler(data, runtimeContext));
|
|
1629
|
+
}
|
|
1630
|
+
const runtimeContext = {
|
|
1626
1631
|
pluginId,
|
|
1627
1632
|
config,
|
|
1628
1633
|
capabilities,
|
|
@@ -1787,6 +1792,38 @@ function createPluginRuntimeContext(options) {
|
|
|
1787
1792
|
)
|
|
1788
1793
|
).limit(1);
|
|
1789
1794
|
return rows.length > 0;
|
|
1795
|
+
},
|
|
1796
|
+
async append(prefix, value, opts) {
|
|
1797
|
+
assertCap(pluginId, capabilities, "storage:kv");
|
|
1798
|
+
const normalizedPrefix = prefix.length > 0 ? prefix : "append:";
|
|
1799
|
+
pluginStorageAppendCounter = (pluginStorageAppendCounter + 1) % 1e6;
|
|
1800
|
+
const sequence = String(pluginStorageAppendCounter).padStart(6, "0");
|
|
1801
|
+
const key = `${normalizedPrefix}${(/* @__PURE__ */ new Date()).toISOString()}:${sequence}:${randomUUID2()}`;
|
|
1802
|
+
const siteId = await resolveStorageSiteId();
|
|
1803
|
+
const expiresAt = opts?.ttl && opts.ttl > 0 ? new Date(Date.now() + opts.ttl * 1e3) : null;
|
|
1804
|
+
await db().insert(npPluginStorage).values({
|
|
1805
|
+
pluginId,
|
|
1806
|
+
siteId,
|
|
1807
|
+
key,
|
|
1808
|
+
value,
|
|
1809
|
+
expiresAt,
|
|
1810
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
1811
|
+
});
|
|
1812
|
+
return key;
|
|
1813
|
+
},
|
|
1814
|
+
async listValues(prefix) {
|
|
1815
|
+
assertCap(pluginId, capabilities, "storage:kv");
|
|
1816
|
+
const siteId = await resolveStorageSiteId();
|
|
1817
|
+
const now = /* @__PURE__ */ new Date();
|
|
1818
|
+
const rows = await db().select({ key: npPluginStorage.key, value: npPluginStorage.value }).from(npPluginStorage).where(
|
|
1819
|
+
and(
|
|
1820
|
+
eq2(npPluginStorage.pluginId, pluginId),
|
|
1821
|
+
eq2(npPluginStorage.siteId, siteId),
|
|
1822
|
+
like(npPluginStorage.key, `${prefix}%`),
|
|
1823
|
+
or(isNull(npPluginStorage.expiresAt), gt(npPluginStorage.expiresAt, now))
|
|
1824
|
+
)
|
|
1825
|
+
).orderBy(asc2(npPluginStorage.key));
|
|
1826
|
+
return rows;
|
|
1790
1827
|
}
|
|
1791
1828
|
},
|
|
1792
1829
|
cache: {
|
|
@@ -1836,7 +1873,7 @@ function createPluginRuntimeContext(options) {
|
|
|
1836
1873
|
return row.value;
|
|
1837
1874
|
},
|
|
1838
1875
|
async getPlugin() {
|
|
1839
|
-
const { getPluginConfig } = await import("./config-
|
|
1876
|
+
const { getPluginConfig } = await import("./config-2CV7KZ3D.js");
|
|
1840
1877
|
const value = await getPluginConfig(pluginId);
|
|
1841
1878
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
1842
1879
|
return value;
|
|
@@ -1844,8 +1881,8 @@ function createPluginRuntimeContext(options) {
|
|
|
1844
1881
|
return {};
|
|
1845
1882
|
},
|
|
1846
1883
|
async setPlugin(data) {
|
|
1847
|
-
const { setPluginConfig } = await import("./config-
|
|
1848
|
-
const { getPluginRegistration: getPluginRegistration2 } = await import("./host-
|
|
1884
|
+
const { setPluginConfig } = await import("./config-2CV7KZ3D.js");
|
|
1885
|
+
const { getPluginRegistration: getPluginRegistration2 } = await import("./host-C5PGUXX7.js");
|
|
1849
1886
|
const reg = getPluginRegistration2(pluginId);
|
|
1850
1887
|
if (reg?.configSchema) {
|
|
1851
1888
|
await setPluginConfig(pluginId, data, null);
|
|
@@ -1906,6 +1943,7 @@ function createPluginRuntimeContext(options) {
|
|
|
1906
1943
|
);
|
|
1907
1944
|
}
|
|
1908
1945
|
const hostMatches = allowedHosts.some((pattern) => {
|
|
1946
|
+
if (pattern === "*") return true;
|
|
1909
1947
|
if (pattern === target.hostname) return true;
|
|
1910
1948
|
if (pattern.startsWith("*.") && target.hostname.endsWith(pattern.slice(1))) return true;
|
|
1911
1949
|
return false;
|
|
@@ -2005,7 +2043,16 @@ function createPluginRuntimeContext(options) {
|
|
|
2005
2043
|
},
|
|
2006
2044
|
actions: {
|
|
2007
2045
|
register(actionName, handler) {
|
|
2008
|
-
|
|
2046
|
+
registerAction(actionName, handler);
|
|
2047
|
+
},
|
|
2048
|
+
registerMetric(actionName, handler) {
|
|
2049
|
+
registerAction(actionName, handler);
|
|
2050
|
+
},
|
|
2051
|
+
registerStatus(actionName, handler) {
|
|
2052
|
+
registerAction(actionName, handler);
|
|
2053
|
+
},
|
|
2054
|
+
registerTable(actionName, handler) {
|
|
2055
|
+
registerAction(actionName, handler);
|
|
2009
2056
|
},
|
|
2010
2057
|
async dispatch(targetPluginId, actionName, data) {
|
|
2011
2058
|
const target = lookupRegistration(targetPluginId);
|
|
@@ -2020,6 +2067,7 @@ function createPluginRuntimeContext(options) {
|
|
|
2020
2067
|
}
|
|
2021
2068
|
}
|
|
2022
2069
|
};
|
|
2070
|
+
return runtimeContext;
|
|
2023
2071
|
}
|
|
2024
2072
|
|
|
2025
2073
|
// src/plugins/enabled-gate.ts
|
|
@@ -2076,7 +2124,7 @@ function invalidatePluginEnabled(pluginId) {
|
|
|
2076
2124
|
var fetchOverride = null;
|
|
2077
2125
|
|
|
2078
2126
|
// src/plugins/compat.ts
|
|
2079
|
-
var FRAMEWORK_VERSION_FROM_PACKAGE = true ? "0.3.
|
|
2127
|
+
var FRAMEWORK_VERSION_FROM_PACKAGE = true ? "0.3.8" : "0.0.0-dev";
|
|
2080
2128
|
var frameworkVersion = FRAMEWORK_VERSION_FROM_PACKAGE;
|
|
2081
2129
|
function getFrameworkVersion() {
|
|
2082
2130
|
return frameworkVersion;
|
|
@@ -2226,7 +2274,7 @@ function insertSortedByPriority(list, entry) {
|
|
|
2226
2274
|
list.sort((a, b) => a.priority - b.priority);
|
|
2227
2275
|
}
|
|
2228
2276
|
async function loadPluginConfig(pluginId) {
|
|
2229
|
-
const { getPluginConfig } = await import("./config-
|
|
2277
|
+
const { getPluginConfig } = await import("./config-2CV7KZ3D.js");
|
|
2230
2278
|
const value = await getPluginConfig(pluginId);
|
|
2231
2279
|
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
2232
2280
|
return value;
|
|
@@ -2402,7 +2450,7 @@ async function loadResolvedPlugin(plugin) {
|
|
|
2402
2450
|
}
|
|
2403
2451
|
const i18nBundles = plugin.i18n;
|
|
2404
2452
|
if (i18nBundles && typeof i18nBundles === "object") {
|
|
2405
|
-
const { addStrings } = await import("./strings-
|
|
2453
|
+
const { addStrings } = await import("./strings-O2M7VSKV.js");
|
|
2406
2454
|
for (const [locale, bundle] of Object.entries(i18nBundles)) {
|
|
2407
2455
|
if (bundle && typeof bundle === "object") {
|
|
2408
2456
|
addStrings(locale, bundle);
|
|
@@ -2737,4 +2785,4 @@ export {
|
|
|
2737
2785
|
findDocuments,
|
|
2738
2786
|
getDocumentById
|
|
2739
2787
|
};
|
|
2740
|
-
//# sourceMappingURL=chunk-
|
|
2788
|
+
//# sourceMappingURL=chunk-CD74WQK7.js.map
|