@nexpress/core 0.3.1 → 0.3.3
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.d.ts +2 -2
- package/dist/{chunk-UIQYA3Y7.js → chunk-2TOS5BYT.js} +2 -2
- package/dist/{chunk-HVHV3IHF.js → chunk-AOEN5EIX.js} +7 -4
- package/dist/chunk-AOEN5EIX.js.map +1 -0
- package/dist/{chunk-P5WGQRSG.js → chunk-EFZH6UPY.js} +5 -2
- package/dist/chunk-EFZH6UPY.js.map +1 -0
- package/dist/{chunk-HUESWYZJ.js → chunk-HYYMUVUK.js} +2 -2
- package/dist/{chunk-AEKO4MXK.js → chunk-LMPYQLMH.js} +17 -2
- package/dist/chunk-LMPYQLMH.js.map +1 -0
- package/dist/{chunk-6IEYOY2L.js → chunk-MXOHWU2P.js} +60 -17
- package/dist/chunk-MXOHWU2P.js.map +1 -0
- package/dist/{chunk-DKOCKZVG.js → chunk-WG3B2GNE.js} +6 -6
- package/dist/{chunk-56ZK5PWM.js → chunk-WOLMQGW7.js} +2 -2
- package/dist/community.d.ts +1 -1
- package/dist/community.js +4 -4
- package/dist/{config-44MFLLIX.js → config-CO6TXCA6.js} +5 -5
- package/dist/db-schema.d.ts +2 -2
- package/dist/db.d.ts +3 -3
- package/dist/db.js +1 -1
- package/dist/fields.d.ts +1 -1
- package/dist/fields.js +1 -1
- package/dist/{host-DKOWZWKA.js → host-HDRI7WIP.js} +3 -3
- package/dist/i18n.d.ts +1 -1
- package/dist/{index-C-jKU1St.d.ts → index-CPp-zGgL.d.ts} +2 -2
- package/dist/{index-BmR3Z8Y5.d.ts → index-DKoSaszT.d.ts} +1 -1
- package/dist/{index-Ca-WUDH5.d.ts → index-DymnczhP.d.ts} +1 -1
- package/dist/{index-lACZ9sON.d.ts → index-UZn29S3i.d.ts} +1 -1
- package/dist/index.d.ts +100 -12
- package/dist/index.js +14 -12
- package/dist/index.js.map +1 -1
- package/dist/jobs.d.ts +2 -2
- package/dist/jobs.js +1 -1
- package/dist/media.d.ts +2 -2
- package/dist/{scheduled-VEOGI5EW.js → scheduled-7MSJIJLE.js} +4 -4
- package/dist/seo.d.ts +16 -3
- package/dist/seo.js +3 -3
- package/dist/{types-BY1UmEiY.d.ts → types-D31ppGJw.d.ts} +45 -0
- package/package.json +1 -1
- package/dist/chunk-6IEYOY2L.js.map +0 -1
- package/dist/chunk-AEKO4MXK.js.map +0 -1
- package/dist/chunk-HVHV3IHF.js.map +0 -1
- package/dist/chunk-P5WGQRSG.js.map +0 -1
- /package/dist/{chunk-UIQYA3Y7.js.map → chunk-2TOS5BYT.js.map} +0 -0
- /package/dist/{chunk-HUESWYZJ.js.map → chunk-HYYMUVUK.js.map} +0 -0
- /package/dist/{chunk-DKOCKZVG.js.map → chunk-WG3B2GNE.js.map} +0 -0
- /package/dist/{chunk-56ZK5PWM.js.map → chunk-WOLMQGW7.js.map} +0 -0
- /package/dist/{config-44MFLLIX.js.map → config-CO6TXCA6.js.map} +0 -0
- /package/dist/{host-DKOWZWKA.js.map → host-HDRI7WIP.js.map} +0 -0
- /package/dist/{scheduled-VEOGI5EW.js.map → scheduled-7MSJIJLE.js.map} +0 -0
|
@@ -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-7MSJIJLE.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-HDRI7WIP.js");
|
|
197
197
|
await runPluginScheduledTask(data.pluginId, data.taskId);
|
|
198
198
|
return;
|
|
199
199
|
} catch (err) {
|
|
@@ -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-HDRI7WIP.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-HDRI7WIP.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-HDRI7WIP.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-WG3B2GNE.js.map
|
|
@@ -29,7 +29,7 @@ import {
|
|
|
29
29
|
findDocuments,
|
|
30
30
|
getDocumentById,
|
|
31
31
|
saveDocument
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-MXOHWU2P.js";
|
|
33
33
|
import {
|
|
34
34
|
deleteMedia
|
|
35
35
|
} from "./chunk-2VZZ7M26.js";
|
|
@@ -1956,4 +1956,4 @@ export {
|
|
|
1956
1956
|
revokeMemberRole,
|
|
1957
1957
|
purgeMemberContent
|
|
1958
1958
|
};
|
|
1959
|
-
//# sourceMappingURL=chunk-
|
|
1959
|
+
//# sourceMappingURL=chunk-WOLMQGW7.js.map
|
package/dist/community.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
2
|
-
import { H as NpPrincipal, e as NpAuthUser } from './types-
|
|
2
|
+
import { H as NpPrincipal, e as NpAuthUser } from './types-D31ppGJw.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Community role registry. Maps a role name + scope type to the
|
package/dist/community.js
CHANGED
|
@@ -33,8 +33,8 @@ import {
|
|
|
33
33
|
unfollow,
|
|
34
34
|
unresolvedReportCount,
|
|
35
35
|
updateComment
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
36
|
+
} from "./chunk-WOLMQGW7.js";
|
|
37
|
+
import "./chunk-HYYMUVUK.js";
|
|
38
38
|
import {
|
|
39
39
|
buildDigestEmail,
|
|
40
40
|
runDigestSweep
|
|
@@ -94,7 +94,7 @@ import {
|
|
|
94
94
|
setProfanityAdapter
|
|
95
95
|
} from "./chunk-KU5M27ZC.js";
|
|
96
96
|
import "./chunk-2N53KKIL.js";
|
|
97
|
-
import "./chunk-
|
|
97
|
+
import "./chunk-MXOHWU2P.js";
|
|
98
98
|
import "./chunk-2VZZ7M26.js";
|
|
99
99
|
import "./chunk-EQ2Z3KMD.js";
|
|
100
100
|
import {
|
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
updateCommunitySettings,
|
|
108
108
|
validateCommunitySettingsPatch
|
|
109
109
|
} from "./chunk-RKM4GDWM.js";
|
|
110
|
-
import "./chunk-
|
|
110
|
+
import "./chunk-EFZH6UPY.js";
|
|
111
111
|
import "./chunk-4ZLMEKFX.js";
|
|
112
112
|
import "./chunk-U4QCCLAW.js";
|
|
113
113
|
import "./chunk-SBCVAC2Z.js";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
isVersionedPluginConfig,
|
|
6
6
|
pluginConfigCacheTag,
|
|
7
7
|
setPluginConfig
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-2TOS5BYT.js";
|
|
9
|
+
import "./chunk-MXOHWU2P.js";
|
|
10
10
|
import "./chunk-2VZZ7M26.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-LMPYQLMH.js";
|
|
12
12
|
import "./chunk-2KNG5KMM.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-EFZH6UPY.js";
|
|
14
14
|
import "./chunk-4ZLMEKFX.js";
|
|
15
15
|
import "./chunk-U4QCCLAW.js";
|
|
16
16
|
import "./chunk-SBCVAC2Z.js";
|
|
@@ -30,4 +30,4 @@ export {
|
|
|
30
30
|
pluginConfigCacheTag,
|
|
31
31
|
setPluginConfig
|
|
32
32
|
};
|
|
33
|
-
//# sourceMappingURL=config-
|
|
33
|
+
//# sourceMappingURL=config-CO6TXCA6.js.map
|
package/dist/db-schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
1
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
2
2
|
import 'drizzle-orm/pg-core';
|
|
3
|
-
import './types-
|
|
3
|
+
import './types-D31ppGJw.js';
|
|
4
4
|
import 'drizzle-orm';
|
package/dist/db.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CreateDbConnectionConfig, c as createDbConnection, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-
|
|
2
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
1
|
+
export { C as CreateDbConnectionConfig, c as createDbConnection, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-CPp-zGgL.js';
|
|
2
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
3
3
|
import 'drizzle-orm/node-postgres';
|
|
4
4
|
import 'pg';
|
|
5
|
-
import './types-
|
|
5
|
+
import './types-D31ppGJw.js';
|
|
6
6
|
import 'drizzle-orm/pg-core';
|
|
7
7
|
import 'drizzle-orm';
|
package/dist/db.js
CHANGED
package/dist/fields.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { n as NpFieldConfig, B as NpFieldCondition, C as NpFieldConditionExpr, d as NpCollectionConfig } from './types-
|
|
2
|
+
import { n as NpFieldConfig, B as NpFieldCondition, C as NpFieldConditionExpr, d as NpCollectionConfig } from './types-D31ppGJw.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Evaluate a field condition — handles both the legacy function
|
package/dist/fields.js
CHANGED
|
@@ -16,9 +16,9 @@ import {
|
|
|
16
16
|
runHookAndCollect,
|
|
17
17
|
runPluginScheduledTask,
|
|
18
18
|
schedulePluginTask
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-MXOHWU2P.js";
|
|
20
20
|
import "./chunk-2VZZ7M26.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-EFZH6UPY.js";
|
|
22
22
|
import "./chunk-4ZLMEKFX.js";
|
|
23
23
|
import "./chunk-U4QCCLAW.js";
|
|
24
24
|
import "./chunk-SBCVAC2Z.js";
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
runPluginScheduledTask,
|
|
50
50
|
schedulePluginTask
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=host-
|
|
52
|
+
//# sourceMappingURL=host-HDRI7WIP.js.map
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as drizzle_orm_node_postgres from 'drizzle-orm/node-postgres';
|
|
2
2
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
3
3
|
import { Pool } from 'pg';
|
|
4
|
-
import { V as schema } from './index-
|
|
5
|
-
import { d as NpCollectionConfig } from './types-
|
|
4
|
+
import { V as schema } from './index-DKoSaszT.js';
|
|
5
|
+
import { d as NpCollectionConfig } from './types-D31ppGJw.js';
|
|
6
6
|
|
|
7
7
|
declare function setDb(db: NodePgDatabase<Record<string, unknown>>): void;
|
|
8
8
|
declare function getDb(): NodePgDatabase<Record<string, unknown>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
|
|
2
|
-
import { N as NpRichTextContent, a as NpNavItem, b as NpBlockInstance } from './types-
|
|
2
|
+
import { N as NpRichTextContent, a as NpNavItem, b as NpBlockInstance } from './types-D31ppGJw.js';
|
|
3
3
|
import * as drizzle_orm from 'drizzle-orm';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as NpFindResult, J as NpImageSize, n as NpFieldConfig } from './types-
|
|
1
|
+
import { i as NpFindResult, J as NpImageSize, n as NpFieldConfig } from './types-D31ppGJw.js';
|
|
2
2
|
import { and } from 'drizzle-orm';
|
|
3
3
|
import { PgTable } from 'drizzle-orm/pg-core';
|
|
4
4
|
import { ReadableStream } from 'node:stream/web';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { K as NpJobType, d as NpCollectionConfig, e as NpAuthUser, H as NpPrincipal } from './types-
|
|
1
|
+
import { K as NpJobType, d as NpCollectionConfig, e as NpAuthUser, H as NpPrincipal } from './types-D31ppGJw.js';
|
|
2
2
|
import { ConstructorOptions, PgBoss } from 'pg-boss';
|
|
3
3
|
import { N as NpLogLevel } from './logger-DqGaOU_j.js';
|
|
4
4
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { c as NpConfig, d as NpCollectionConfig, e as NpAuthUser, f as NpSaveOptions, g as NpSaveResult, h as NpFindOptions, i as NpFindResult, a as NpNavItem, j as NpRegisteredTheme, k as NpThemeFieldRequirement, l as NpThemeManifest, m as NpUserRole, n as NpFieldConfig, o as NpPluginConfig } from './types-
|
|
2
|
-
export { p as NpAccessFunction, q as NpAdminGroupMeta, r as NpArrayField, s as NpBlockConfig, b as NpBlockInstance, t as NpBlocksField, u as NpCheckboxField, v as NpCollapsibleField, w as NpCollectionHook, x as NpDateField, y as NpDocumentStatus, z as NpEditorConfig, A as NpEmailField, B as NpFieldCondition, C as NpFieldConditionExpr, D as NpFieldValidator, E as NpFindWhere, F as NpFindWhereSystemTokens, G as NpGroupField, H as NpHookPrincipal, I as NpI18nConfig, J as NpImageSize, K as NpJobType, L as NpJsonField, M as NpNumberField, O as NpPluginContext, H as NpPrincipal, P as NpRadioField, Q as NpRelationshipField, R as NpResolvedPluginLike, N as NpRichTextContent, S as NpRichTextField, T as NpRowField, U as NpSelectField, V as NpTextField, W as NpTextareaField, X as NpThemeCollectionKind, Y as NpThemeCollectionRequirement, Z as NpUploadConfig, _ as NpUploadField, $ as ROLE_HIERARCHY } from './types-
|
|
1
|
+
import { c as NpConfig, d as NpCollectionConfig, e as NpAuthUser, f as NpSaveOptions, g as NpSaveResult, h as NpFindOptions, i as NpFindResult, a as NpNavItem, j as NpRegisteredTheme, k as NpThemeFieldRequirement, l as NpThemeManifest, m as NpUserRole, n as NpFieldConfig, o as NpPluginConfig } from './types-D31ppGJw.js';
|
|
2
|
+
export { p as NpAccessFunction, q as NpAdminGroupMeta, r as NpArrayField, s as NpBlockConfig, b as NpBlockInstance, t as NpBlocksField, u as NpCheckboxField, v as NpCollapsibleField, w as NpCollectionHook, x as NpDateField, y as NpDocumentStatus, z as NpEditorConfig, A as NpEmailField, B as NpFieldCondition, C as NpFieldConditionExpr, D as NpFieldValidator, E as NpFindWhere, F as NpFindWhereSystemTokens, G as NpGroupField, H as NpHookPrincipal, I as NpI18nConfig, J as NpImageSize, K as NpJobType, L as NpJsonField, M as NpNumberField, O as NpPluginContext, H as NpPrincipal, P as NpRadioField, Q as NpRelationshipField, R as NpResolvedPluginLike, N as NpRichTextContent, S as NpRichTextField, T as NpRowField, U as NpSelectField, V as NpTextField, W as NpTextareaField, X as NpThemeCollectionKind, Y as NpThemeCollectionRequirement, Z as NpUploadConfig, _ as NpUploadField, $ as ROLE_HIERARCHY } from './types-D31ppGJw.js';
|
|
3
3
|
export { ARGON2_OPTIONS, ArcticLikeProvider, ArcticLikeTokens, FromArcticOptions, IssuedOAuthState, NpCapability, NpConsumeMemberEmailVerifyResult, NpConsumeMemberResetResult, NpConsumeResetTokenOptions, NpConsumeResetTokenResult, NpCreateResetTokenOptions, NpIssuedMemberToken, NpIssuedResetToken, NpMemberAuthRow, NpMemberIdentityRow, NpMemberResetRequestResult, NpMemberTokenPayload, NpPasswordResetPurpose, NpResetRequestResult, NpTokenPayload, NpUserBasic, NpUserIdentityRow, OAuthAuthorizeParams, OAuthExchangeParams, OAuthProfile, OAuthProvider, OAuthStatePayload, ResolveMemberOAuthLoginInput, ResolveMemberOAuthLoginResult, ResolveOAuthLoginInput, ResolveOAuthLoginResult, ResolvedOAuthMember, ResolvedOAuthUser, VerifyOAuthStateResult, authenticated, can, consumeMemberEmailVerifyToken, consumeMemberPasswordReset, consumePasswordResetToken, createMemberEmailVerifyToken, createPasswordResetToken, fromArctic, getMemberFromTokenPayload, getOAuthProvider, getUserById, hashPassword, invalidateAllMemberSessions, invalidateAllSessions, isAdmin, isEditorOrAbove, isOwnerOrAdmin, isTokenVerificationError, issueOAuthState, listMemberIdentities, listOAuthProviders, listUserIdentities, registerOAuthProvider, requestMemberPasswordReset, requestPasswordReset, resetOAuthProviders, resolveMemberOAuthLogin, resolveOAuthLogin, revokeMemberIdentity, revokeUserIdentity, sha256, signMemberToken, signToken, verifyCsrf, verifyMemberToken, verifyOAuthState, verifyPassword, verifyToken, verifyTokenFull } from './auth.js';
|
|
4
|
-
import { SQL } from 'drizzle-orm';
|
|
4
|
+
import { SQL, sql } from 'drizzle-orm';
|
|
5
5
|
import { NpSitemapEntry, NpFeedEntry } from './seo.js';
|
|
6
6
|
export { ArticleJsonLd, ArticleJsonLdInput, BuildAtomFeedOptions, BuildJsonLdContext, BuildSitemapOptions, DEFAULT_SITE_SEO_SETTINGS, DiscussionForumPostingJsonLd, NpPageMetadata, NpPageMetadataInput, NpSeoSettingsPatch, NpSiteSeoSettings, NpSitemapIndexEntry, PersonJsonLd, PersonJsonLdInput, WebSiteJsonLd, buildArticleJsonLd, buildAtomFeed, buildDiscussionForumPostingJsonLd, buildPageMetadata, buildPersonJsonLd, buildSitemap, buildWebSiteJsonLd, getSiteSeoSettings, renderAtomFeed, renderSitemapIndexXml, renderSitemapXml, validateSeoSettingsPatch } from './seo.js';
|
|
7
|
-
export { c as createDbConnection, g as generateDocumentsModule, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-
|
|
7
|
+
export { c as createDbConnection, g as generateDocumentsModule, a as generateDrizzleSchema, b as generateTypeScript, d as getDb, s as setDb } from './index-CPp-zGgL.js';
|
|
8
|
+
import { PgTable } from 'drizzle-orm/pg-core';
|
|
8
9
|
export { buildZodSchema, collectHiddenFieldNames, evaluateFieldCondition, getCollectionZodSchema } from './fields.js';
|
|
9
10
|
import { z, ZodTypeAny } from 'zod';
|
|
10
|
-
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-
|
|
11
|
-
export { D as DEFAULT_JOB_LOG_RETENTION_MS, L as ListJobLogsOptions, N as NpJobCountOptions, a as NpJobHandler, b as NpJobListOptions, c as NpJobListResult, d as NpJobLogEntry, e as NpJobQueue, f as NpJobState, g as NpJobStateCounts, h as NpJobSummary, i as NpJobsPauseState, j as NpPluginScheduleStats, k as NpReconcileSchedulesResult, l as NpScheduleSummary, m as NpWorkerHealthSummary, n as NpWorkerHeartbeat, P as PAUSE_SYNC_INTERVAL_MS, o as PgBossAdapter, S as SetJobsPauseStateInput, W as WORKER_HEARTBEAT_INTERVAL_MS, p as WORKER_STALE_THRESHOLD_MS, q as configureBuiltinJobContext, r as countAliveWorkers, s as countJobLogs, t as enqueueJob, u as getAllJobHandlers, v as getCurrentJobId, w as getJobHandler, x as getJobQueue, y as getJobsPauseState, z as getOptionalJobQueue, A as listJobLogs, B as listWorkerHealth, C as markWorkerStopped, E as pruneJobLogsOlderThan, F as purgeStaleWorkers, G as recordHeartbeat, H as recordJobLog, I as registerBuiltinHandlers, J as registerJobHandler, K as runInJobContext, M as setJobQueue, O as setJobsPauseState, Q as startProducer, R as startWorker, T as stopProducer, U as stopWorker } from './index-
|
|
12
|
-
import { N as NpStorageAdapter, a as NpFileMetadata } from './index-
|
|
13
|
-
export { D as DEFAULT_IMAGE_SIZES, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, g as NpProcessedImageVariant, h as cleanupDeletedMedia, i as deleteMedia, j as extractMediaIds, k as getMediaById, l as getMediaUrl, m as getStorageAdapter, n as listMedia, p as processImage, o as processMediaImage, s as setStorageAdapter, u as uploadMedia } from './index-
|
|
11
|
+
export { N as NP_GLOBAL_PLUGIN_SITE_ID, n as npAuditEvents, a as npBanKindEnum, b as npBanScopeEnum, c as npBans, d as npCommentStatusEnum, e as npComments, f as npFollows, g as npJobLogs, h as npMedia, i as npMediaFolders, j as npMediaFoldersRelations, k as npMediaRefs, l as npMediaRefsRelations, m as npMediaRelations, o as npMediaStatusEnum, p as npMemberIdentities, q as npMemberMutes, r as npMemberRoleScopeEnum, s as npMemberRoles, t as npMemberSessions, u as npMemberStatusEnum, v as npMembers, w as npNavigation, x as npNavigationRelations, y as npNotifications, z as npPasswordResetPurposeEnum, A as npPluginStorage, B as npPlugins, C as npReactions, D as npReports, E as npRevisionStatusEnum, F as npRevisions, G as npRevisionsRelations, H as npSessions, I as npSessionsRelations, J as npSettings, K as npSettingsRelations, L as npSiteMemberships, M as npSites, O as npSlugHistory, P as npStringOverrides, Q as npUserOAuthIdentities, R as npUserRoleEnum, S as npUsers, T as npUsersRelations, U as npWorkerHeartbeats } from './index-DKoSaszT.js';
|
|
12
|
+
export { D as DEFAULT_JOB_LOG_RETENTION_MS, L as ListJobLogsOptions, N as NpJobCountOptions, a as NpJobHandler, b as NpJobListOptions, c as NpJobListResult, d as NpJobLogEntry, e as NpJobQueue, f as NpJobState, g as NpJobStateCounts, h as NpJobSummary, i as NpJobsPauseState, j as NpPluginScheduleStats, k as NpReconcileSchedulesResult, l as NpScheduleSummary, m as NpWorkerHealthSummary, n as NpWorkerHeartbeat, P as PAUSE_SYNC_INTERVAL_MS, o as PgBossAdapter, S as SetJobsPauseStateInput, W as WORKER_HEARTBEAT_INTERVAL_MS, p as WORKER_STALE_THRESHOLD_MS, q as configureBuiltinJobContext, r as countAliveWorkers, s as countJobLogs, t as enqueueJob, u as getAllJobHandlers, v as getCurrentJobId, w as getJobHandler, x as getJobQueue, y as getJobsPauseState, z as getOptionalJobQueue, A as listJobLogs, B as listWorkerHealth, C as markWorkerStopped, E as pruneJobLogsOlderThan, F as purgeStaleWorkers, G as recordHeartbeat, H as recordJobLog, I as registerBuiltinHandlers, J as registerJobHandler, K as runInJobContext, M as setJobQueue, O as setJobsPauseState, Q as startProducer, R as startWorker, T as stopProducer, U as stopWorker } from './index-UZn29S3i.js';
|
|
13
|
+
import { N as NpStorageAdapter, a as NpFileMetadata } from './index-DymnczhP.js';
|
|
14
|
+
export { D as DEFAULT_IMAGE_SIZES, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, g as NpProcessedImageVariant, h as cleanupDeletedMedia, i as deleteMedia, j as extractMediaIds, k as getMediaById, l as getMediaUrl, m as getStorageAdapter, n as listMedia, p as processImage, o as processMediaImage, s as setStorageAdapter, u as uploadMedia } from './index-DymnczhP.js';
|
|
14
15
|
import { ReadableStream } from 'node:stream/web';
|
|
15
16
|
export { NpLocaleDirection, NpResolveLocaleInput, NpResolveLocaleResult, NpStringOverrideRow, NpTranslationBundle, NpTranslationParams, addStrings, clearStringOverrideCacheForSite, deleteStringOverride, formatDate, formatNumber, formatRelativeTime, getAllStrings, getCurrentLocale, getI18nConfig, getLocaleDirection, getStringOverride, getStringOverridesForSite, getStrings, listStringOverridesForSite, loadStringOverridesForSite, resetI18nConfig, resetIntlFormatterCache, resetStringOverrideCache, resetStrings, resetTranslationCache, resolveLocale, setI18nConfig, setStringOverride, setStrings, t, tSync } from './i18n.js';
|
|
16
17
|
import { NodePgDatabase } from 'drizzle-orm/node-postgres';
|
|
@@ -21,7 +22,6 @@ export { AuditActor, AuditActorKind, AuditEventRow, BanKind, BanScope, BuildDige
|
|
|
21
22
|
export { NpCustomRoute, clearCustomRoutes, getCustomRoutes, registerCustomRoute } from './routes.js';
|
|
22
23
|
import '@node-rs/argon2';
|
|
23
24
|
import 'pg';
|
|
24
|
-
import 'drizzle-orm/pg-core';
|
|
25
25
|
import 'pg-boss';
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -203,6 +203,75 @@ declare function getCollectionTable(slug: string): unknown;
|
|
|
203
203
|
declare function getCollectionRegistration(slug: string): CollectionRegistration;
|
|
204
204
|
declare function getAllCollectionSlugs(): string[];
|
|
205
205
|
|
|
206
|
+
type QueryCondition = ReturnType<typeof sql>;
|
|
207
|
+
interface SelectQuery extends Promise<unknown[]> {
|
|
208
|
+
where(condition: QueryCondition): SelectQuery;
|
|
209
|
+
orderBy(order: QueryCondition): SelectQuery;
|
|
210
|
+
limit(limit: number): SelectQuery;
|
|
211
|
+
offset(offset: number): SelectQuery;
|
|
212
|
+
}
|
|
213
|
+
interface InsertValuesQuery extends Promise<unknown> {
|
|
214
|
+
returning(): Promise<unknown[]>;
|
|
215
|
+
}
|
|
216
|
+
interface DrizzleTransactionLike {
|
|
217
|
+
insert(table: PgTable): {
|
|
218
|
+
values(values: Record<string, unknown> | Record<string, unknown>[]): InsertValuesQuery;
|
|
219
|
+
};
|
|
220
|
+
update(table: PgTable): {
|
|
221
|
+
set(values: Record<string, unknown>): {
|
|
222
|
+
where(condition: QueryCondition): {
|
|
223
|
+
returning(): Promise<unknown[]>;
|
|
224
|
+
};
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
delete(table: PgTable): {
|
|
228
|
+
where(condition: QueryCondition): Promise<unknown>;
|
|
229
|
+
};
|
|
230
|
+
select(selection?: Record<string, unknown>): {
|
|
231
|
+
from(table: PgTable): SelectQuery;
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Opaque transaction handle that external callers can thread into
|
|
236
|
+
* pipeline write functions to make a sequence of writes atomic.
|
|
237
|
+
*
|
|
238
|
+
* Today only `deleteDocument` accepts a `{ tx }` option (used by
|
|
239
|
+
* `wipeSeededContent` so a multi-row wipe rolls back as a unit on
|
|
240
|
+
* failure). Callers obtain a handle by wrapping their batch in
|
|
241
|
+
* Drizzle's `db.transaction(async (tx) => { … })`; the `tx` value
|
|
242
|
+
* passed to the callback IS the handle to thread on through.
|
|
243
|
+
*
|
|
244
|
+
* The shape is intentionally minimal — just the Drizzle methods
|
|
245
|
+
* the pipeline actually uses — to keep external code from poking
|
|
246
|
+
* Drizzle internals and to leave room for swapping the backing
|
|
247
|
+
* implementation if `getDb()` ever moves off Drizzle.
|
|
248
|
+
*/
|
|
249
|
+
type NpTransaction = DrizzleTransactionLike;
|
|
250
|
+
/**
|
|
251
|
+
* Wrap a callback in a "deferred post-commit" scope. Any
|
|
252
|
+
* `runPostCommit` calls made during the callback queue their work
|
|
253
|
+
* instead of firing. After the callback resolves successfully,
|
|
254
|
+
* queued hooks drain in FIFO order — each wrapped in its own
|
|
255
|
+
* try/catch (failures are logged, never surfaced to the caller,
|
|
256
|
+
* subsequent hooks still fire). If the callback throws, the queue
|
|
257
|
+
* is discarded and hooks never run.
|
|
258
|
+
*
|
|
259
|
+
* Use this around batch operations that pair an outer transaction
|
|
260
|
+
* with per-row post-commit side-effects — the reseed POST handler
|
|
261
|
+
* is the motivating case: wipe + setActiveThemeId + seed run inside
|
|
262
|
+
* one `db.transaction`; without deferral the per-row
|
|
263
|
+
* `content:afterDelete` / `content:afterSave` hooks would fire
|
|
264
|
+
* during the tx (committing audit log writes and pg-boss job
|
|
265
|
+
* inserts through separate connections) even if the tx later
|
|
266
|
+
* rolls back, leaving ghost entries that don't match the final DB
|
|
267
|
+
* state. With deferral the queue drains only after commit and
|
|
268
|
+
* vanishes on rollback.
|
|
269
|
+
*
|
|
270
|
+
* Re-entrant: nested calls run their inner queue independently;
|
|
271
|
+
* the inner queue drains when the inner callback resolves, before
|
|
272
|
+
* control returns to the outer.
|
|
273
|
+
*/
|
|
274
|
+
declare function withDeferredPostCommit<T>(callback: () => Promise<T>): Promise<T>;
|
|
206
275
|
declare function saveDocument(collection: string, docId: string | null, data: Record<string, unknown>, user: NpAuthUser, options?: NpSaveOptions): Promise<NpSaveResult>;
|
|
207
276
|
/**
|
|
208
277
|
* Member-side document create. Only valid when
|
|
@@ -254,7 +323,9 @@ declare function autosaveRevision(collection: string, documentId: string, data:
|
|
|
254
323
|
createdAt: Date;
|
|
255
324
|
reused: boolean;
|
|
256
325
|
}>;
|
|
257
|
-
declare function deleteDocument(collection: string, docId: string, user: NpAuthUser
|
|
326
|
+
declare function deleteDocument(collection: string, docId: string, user: NpAuthUser, options?: {
|
|
327
|
+
tx?: NpTransaction;
|
|
328
|
+
}): Promise<void>;
|
|
258
329
|
/**
|
|
259
330
|
* Member-side delete. Owner-only — the existing row's
|
|
260
331
|
* `member_author_id` must match the caller. Fires
|
|
@@ -586,6 +657,15 @@ declare function getTranslationProgress(): Promise<NpTranslationProgress | null>
|
|
|
586
657
|
interface NpThemeColors {
|
|
587
658
|
primary: string;
|
|
588
659
|
primaryForeground: string;
|
|
660
|
+
/**
|
|
661
|
+
* Soft / tinted variant of `primary` — used for backgrounds
|
|
662
|
+
* behind links and accent regions. Optional; themes that omit
|
|
663
|
+
* it inherit a CSS-side `color-mix(in oklab, var(--np-color-primary) 10%, transparent)`
|
|
664
|
+
* fallback wherever the var is referenced. The framework still
|
|
665
|
+
* emits the var when a value is set so themes can pick a
|
|
666
|
+
* branded tint rather than the algorithmic mix.
|
|
667
|
+
*/
|
|
668
|
+
primarySoft?: string;
|
|
589
669
|
background: string;
|
|
590
670
|
foreground: string;
|
|
591
671
|
muted: string;
|
|
@@ -981,8 +1061,16 @@ declare function getActiveTheme(): Promise<NpRegisteredTheme | null>;
|
|
|
981
1061
|
* an admin can't pick a string that doesn't resolve to anything
|
|
982
1062
|
* (which would silently fall back to the default and confuse
|
|
983
1063
|
* the operator).
|
|
1064
|
+
*
|
|
1065
|
+
* Accepts an optional outer transaction so the active-theme flip
|
|
1066
|
+
* can sit inside the same atomic scope as a wipe + seed batch
|
|
1067
|
+
* (see `wipeSeededContent` / `seedAll`'s `tx` option). Without
|
|
1068
|
+
* an outer tx, the write runs against the pool handle and
|
|
1069
|
+
* commits standalone.
|
|
984
1070
|
*/
|
|
985
|
-
declare function setActiveThemeId(id: string, updatedBy?: string | null
|
|
1071
|
+
declare function setActiveThemeId(id: string, updatedBy?: string | null, options?: {
|
|
1072
|
+
tx?: unknown;
|
|
1073
|
+
}): Promise<void>;
|
|
986
1074
|
/**
|
|
987
1075
|
* Phase 11.3 — surface the active theme's templates for a
|
|
988
1076
|
* given collection so admin pickers and the catch-all renderer
|
|
@@ -2058,4 +2146,4 @@ declare function checkNexpressCompat(manifest: {
|
|
|
2058
2146
|
};
|
|
2059
2147
|
}, framework?: string): NexpressCompatResult;
|
|
2060
2148
|
|
|
2061
|
-
export { type CreateSiteInput, DEFAULT_THEME, LocalStorageAdapter, NP_DEFAULT_SITE_ID, type NexpressCompatResult, NoopEmailAdapter, NpAuthError, NpAuthUser, NpCollectionConfig, type NpCollectionTranslationProgress, NpConfig, NpConflictError, type NpDeleteSiteOptions, type NpEmailAdapter, type NpEmailMessage, type NpEmailTemplate, NpError, type NpErrorCode, type NpErrorCodeInput, NpFeedEntry, NpFieldConfig, NpFileMetadata, NpFindOptions, NpFindResult, NpForbiddenError, type NpListPendingDocsOptions, type NpListPendingDocsResult, NpNavItem, NpNotFoundError, type NpPasswordResetTemplateData, type NpPendingDocSummary, NpPluginConfig, type NpPluginConfigResult, type NpPluginState, type NpPluginStateUpdate, NpRateLimitError, NpRegisteredTheme, type NpRevision, type NpRevisionListOptions, type NpRevisionListResult, type NpRevisionStatus, type NpRevisionSummary, NpSaveOptions, NpSaveResult, type NpSearchAdapter, type NpSearchAdapterContext, type NpSearchVectorParts, type NpSite, NpSiteContextMissingError, type NpSiteUsage, NpSitemapEntry, NpStorageAdapter, type NpThemeColors, NpThemeFieldRequirement, NpThemeManifest, type NpThemeNavLocationDescriptor, type NpThemeRequirementMissingField, type NpThemeRequirementRelationConflict, type NpThemeRequirementResult, type NpThemeRequirementTypeConflict, type NpThemeSeoHooksExtracted, type NpThemeSettingsArrayField, type NpThemeSettingsBooleanField, type NpThemeSettingsColorField, type NpThemeSettingsEnumField, type NpThemeSettingsField, type NpThemeSettingsNumberField, type NpThemeSettingsObjectField, type NpThemeSettingsResult, type NpThemeSettingsTextField, type NpThemeSettingsTextareaField, type NpThemeSettingsUnsupportedField, type NpThemeSettingsUrlField, type NpThemeShape, type NpThemeTemplateSummary, type NpThemeTokens, type NpThemeTokensOverlay, type NpThemeTypography, type NpTranslationProgress, type NpTranslationProgressLocaleStats, NpUserRole, NpValidationError, type PluginAdminExtension, type PluginHookHandler, type PluginPageRouteEntry, type PluginRouteHandler, type PluginRouteRequest, type PluginRouteResponse, type PublishScheduledResult, type ReindexResult, type ResolvedCollectionTab, type ResolvedDashboardWidget, S3StorageAdapter, type SearchCollectionsOptions, type SearchResult, type SearchResultItem, type SiteMembership, SmtpEmailAdapter, type SmtpEmailAdapterOptions, activeThemeContributesSeo, autosaveRevision, buildInviteEmail, buildResetEmail, buildSearchVector, buildSearchVectorParts, buildWeightedSearchVectorSql, checkNexpressCompat, checkThemeRequirements, collectionConfigSchema, compareSemver, createMemberDocument, createSite, createStorageAdapter, createTranslation, defineCollection, defineConfig, deleteDocument, deleteMemberDocument, deleteSite, dispatchPluginAction, ensureDefaultSite, extractErrorComponent, extractMembersNotFoundComponent, extractNotFoundComponent, extractSeoHooks, findDocuments, findPosts, findSlugRedirect, findTranslations, getActiveTheme, getActiveThemeError, getActiveThemeId, getActiveThemeMembersNotFound, getActiveThemeNavLocations, getActiveThemeNotFound, getActiveThemeSeoHooks, getAllCollectionSlugs, getAllPageSlugs, getAllPluginIds, getCollectionConfig, getCollectionRegistration, getCollectionTable, getCollectionTabsForSlug, getCurrentSiteId, getDashboardWidgetsFromPlugins, getDefaultSite, getDocumentById, getEmailAdapter, getFrameworkVersion, getMembership, getNavigation, getPageBySlug, getPluginAdminExtension, getPluginConfig, getPluginConfigWithStatus, getPluginPageRoutes, getPluginRegistration, getPluginRoutes, getPluginState, getPluginTemplatesForCollection, getPostBySlug, getRegisteredPluginSchedules, getRegisteredThemes, getRevision, getSearchAdapter, getSetting, getSiteByHostname, getSiteById, getSiteUsageSummary, getTheme, getThemeById, getThemeSettings, getThemeSettingsWithStatus, getThemeTemplateSummaries, getTranslationProgress, grantSiteMembership, hasRoleOnSite, introspectThemeSettingsSchema, invalidatePluginEnabled, isPluginEnabled, isSuperAdmin, listMembershipsForUser, listPendingMemberDocs, listPluginStates, listRevisions, listSiteMemberships, listSites, loadPlugins, mergeThemeRequirements, npConfigSchema, pluginConfigCacheTag, promoteMemberDocument, publishScheduledDocuments, registerCollection, registerPluginTemplates, registerThemes, reindexCollection, resetCurrentSiteResolver, resetEmailAdapter, resetPluginTemplates, resetPlugins, resetSearchAdapter, resetThemes, resolveSiteForHostname, resolveTemplateComponent, resolveUserRoleOnSite, restoreRevision, revokeSiteMembership, runHook, runHookAndCollect, runPluginScheduledTask, sanitizeTokenValue, saveDocument, schedulePluginTask, searchCollections, setActiveThemeId, setCurrentSiteResolver, setEmailAdapter, setPluginConfig, setSearchAdapter, setSuperAdmin, setThemeSettings, syncPluginRegistrations, updateMemberDocument, updatePluginState, updateSite, withCurrentSite };
|
|
2149
|
+
export { type CreateSiteInput, DEFAULT_THEME, LocalStorageAdapter, NP_DEFAULT_SITE_ID, type NexpressCompatResult, NoopEmailAdapter, NpAuthError, NpAuthUser, NpCollectionConfig, type NpCollectionTranslationProgress, NpConfig, NpConflictError, type NpDeleteSiteOptions, type NpEmailAdapter, type NpEmailMessage, type NpEmailTemplate, NpError, type NpErrorCode, type NpErrorCodeInput, NpFeedEntry, NpFieldConfig, NpFileMetadata, NpFindOptions, NpFindResult, NpForbiddenError, type NpListPendingDocsOptions, type NpListPendingDocsResult, NpNavItem, NpNotFoundError, type NpPasswordResetTemplateData, type NpPendingDocSummary, NpPluginConfig, type NpPluginConfigResult, type NpPluginState, type NpPluginStateUpdate, NpRateLimitError, NpRegisteredTheme, type NpRevision, type NpRevisionListOptions, type NpRevisionListResult, type NpRevisionStatus, type NpRevisionSummary, NpSaveOptions, NpSaveResult, type NpSearchAdapter, type NpSearchAdapterContext, type NpSearchVectorParts, type NpSite, NpSiteContextMissingError, type NpSiteUsage, NpSitemapEntry, NpStorageAdapter, type NpThemeColors, NpThemeFieldRequirement, NpThemeManifest, type NpThemeNavLocationDescriptor, type NpThemeRequirementMissingField, type NpThemeRequirementRelationConflict, type NpThemeRequirementResult, type NpThemeRequirementTypeConflict, type NpThemeSeoHooksExtracted, type NpThemeSettingsArrayField, type NpThemeSettingsBooleanField, type NpThemeSettingsColorField, type NpThemeSettingsEnumField, type NpThemeSettingsField, type NpThemeSettingsNumberField, type NpThemeSettingsObjectField, type NpThemeSettingsResult, type NpThemeSettingsTextField, type NpThemeSettingsTextareaField, type NpThemeSettingsUnsupportedField, type NpThemeSettingsUrlField, type NpThemeShape, type NpThemeTemplateSummary, type NpThemeTokens, type NpThemeTokensOverlay, type NpThemeTypography, type NpTransaction, type NpTranslationProgress, type NpTranslationProgressLocaleStats, NpUserRole, NpValidationError, type PluginAdminExtension, type PluginHookHandler, type PluginPageRouteEntry, type PluginRouteHandler, type PluginRouteRequest, type PluginRouteResponse, type PublishScheduledResult, type ReindexResult, type ResolvedCollectionTab, type ResolvedDashboardWidget, S3StorageAdapter, type SearchCollectionsOptions, type SearchResult, type SearchResultItem, type SiteMembership, SmtpEmailAdapter, type SmtpEmailAdapterOptions, activeThemeContributesSeo, autosaveRevision, buildInviteEmail, buildResetEmail, buildSearchVector, buildSearchVectorParts, buildWeightedSearchVectorSql, checkNexpressCompat, checkThemeRequirements, collectionConfigSchema, compareSemver, createMemberDocument, createSite, createStorageAdapter, createTranslation, defineCollection, defineConfig, deleteDocument, deleteMemberDocument, deleteSite, dispatchPluginAction, ensureDefaultSite, extractErrorComponent, extractMembersNotFoundComponent, extractNotFoundComponent, extractSeoHooks, findDocuments, findPosts, findSlugRedirect, findTranslations, getActiveTheme, getActiveThemeError, getActiveThemeId, getActiveThemeMembersNotFound, getActiveThemeNavLocations, getActiveThemeNotFound, getActiveThemeSeoHooks, getAllCollectionSlugs, getAllPageSlugs, getAllPluginIds, getCollectionConfig, getCollectionRegistration, getCollectionTable, getCollectionTabsForSlug, getCurrentSiteId, getDashboardWidgetsFromPlugins, getDefaultSite, getDocumentById, getEmailAdapter, getFrameworkVersion, getMembership, getNavigation, getPageBySlug, getPluginAdminExtension, getPluginConfig, getPluginConfigWithStatus, getPluginPageRoutes, getPluginRegistration, getPluginRoutes, getPluginState, getPluginTemplatesForCollection, getPostBySlug, getRegisteredPluginSchedules, getRegisteredThemes, getRevision, getSearchAdapter, getSetting, getSiteByHostname, getSiteById, getSiteUsageSummary, getTheme, getThemeById, getThemeSettings, getThemeSettingsWithStatus, getThemeTemplateSummaries, getTranslationProgress, grantSiteMembership, hasRoleOnSite, introspectThemeSettingsSchema, invalidatePluginEnabled, isPluginEnabled, isSuperAdmin, listMembershipsForUser, listPendingMemberDocs, listPluginStates, listRevisions, listSiteMemberships, listSites, loadPlugins, mergeThemeRequirements, npConfigSchema, pluginConfigCacheTag, promoteMemberDocument, publishScheduledDocuments, registerCollection, registerPluginTemplates, registerThemes, reindexCollection, resetCurrentSiteResolver, resetEmailAdapter, resetPluginTemplates, resetPlugins, resetSearchAdapter, resetThemes, resolveSiteForHostname, resolveTemplateComponent, resolveUserRoleOnSite, restoreRevision, revokeSiteMembership, runHook, runHookAndCollect, runPluginScheduledTask, sanitizeTokenValue, saveDocument, schedulePluginTask, searchCollections, setActiveThemeId, setCurrentSiteResolver, setEmailAdapter, setPluginConfig, setSearchAdapter, setSuperAdmin, setThemeSettings, syncPluginRegistrations, updateMemberDocument, updatePluginState, updateSite, withCurrentSite, withDeferredPostCommit };
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
introspectThemeSettingsSchema,
|
|
5
5
|
pluginConfigCacheTag,
|
|
6
6
|
setPluginConfig
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-2TOS5BYT.js";
|
|
8
8
|
import {
|
|
9
9
|
getPluginTemplatesForCollection,
|
|
10
10
|
registerPluginTemplates,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
renderSitemapIndexXml,
|
|
42
42
|
renderSitemapXml,
|
|
43
43
|
validateSeoSettingsPatch
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-AOEN5EIX.js";
|
|
45
45
|
import {
|
|
46
46
|
ARGON2_OPTIONS,
|
|
47
47
|
authenticated,
|
|
@@ -130,10 +130,10 @@ import {
|
|
|
130
130
|
unfollow,
|
|
131
131
|
unresolvedReportCount,
|
|
132
132
|
updateComment
|
|
133
|
-
} from "./chunk-
|
|
133
|
+
} from "./chunk-WOLMQGW7.js";
|
|
134
134
|
import {
|
|
135
135
|
publishScheduledDocuments
|
|
136
|
-
} from "./chunk-
|
|
136
|
+
} from "./chunk-HYYMUVUK.js";
|
|
137
137
|
import {
|
|
138
138
|
buildDigestEmail,
|
|
139
139
|
runDigestSweep
|
|
@@ -227,8 +227,9 @@ import {
|
|
|
227
227
|
runPluginScheduledTask,
|
|
228
228
|
saveDocument,
|
|
229
229
|
schedulePluginTask,
|
|
230
|
-
updateMemberDocument
|
|
231
|
-
|
|
230
|
+
updateMemberDocument,
|
|
231
|
+
withDeferredPostCommit
|
|
232
|
+
} from "./chunk-MXOHWU2P.js";
|
|
232
233
|
import {
|
|
233
234
|
DEFAULT_IMAGE_SIZES,
|
|
234
235
|
cleanupDeletedMedia,
|
|
@@ -259,7 +260,7 @@ import {
|
|
|
259
260
|
generateDocumentsModule,
|
|
260
261
|
generateDrizzleSchema,
|
|
261
262
|
generateTypeScript
|
|
262
|
-
} from "./chunk-
|
|
263
|
+
} from "./chunk-LMPYQLMH.js";
|
|
263
264
|
import {
|
|
264
265
|
npMediaFoldersRelations,
|
|
265
266
|
npMediaRefsRelations,
|
|
@@ -275,7 +276,7 @@ import {
|
|
|
275
276
|
collectHiddenFieldNames,
|
|
276
277
|
evaluateFieldCondition,
|
|
277
278
|
getCollectionZodSchema
|
|
278
|
-
} from "./chunk-
|
|
279
|
+
} from "./chunk-EFZH6UPY.js";
|
|
279
280
|
import {
|
|
280
281
|
formatDate,
|
|
281
282
|
formatNumber,
|
|
@@ -365,7 +366,7 @@ import {
|
|
|
365
366
|
startWorker,
|
|
366
367
|
stopProducer,
|
|
367
368
|
stopWorker
|
|
368
|
-
} from "./chunk-
|
|
369
|
+
} from "./chunk-WG3B2GNE.js";
|
|
369
370
|
import {
|
|
370
371
|
DEFAULT_JOB_LOG_RETENTION_MS,
|
|
371
372
|
countJobLogs,
|
|
@@ -1145,7 +1146,7 @@ async function getActiveTheme() {
|
|
|
1145
1146
|
const first = registry.values().next();
|
|
1146
1147
|
return first.done ? null : first.value;
|
|
1147
1148
|
}
|
|
1148
|
-
async function setActiveThemeId(id, updatedBy = null) {
|
|
1149
|
+
async function setActiveThemeId(id, updatedBy = null, options = {}) {
|
|
1149
1150
|
if (!registry.has(id)) {
|
|
1150
1151
|
throw new NpValidationError("Invalid input", [
|
|
1151
1152
|
{
|
|
@@ -1154,10 +1155,10 @@ async function setActiveThemeId(id, updatedBy = null) {
|
|
|
1154
1155
|
}
|
|
1155
1156
|
]);
|
|
1156
1157
|
}
|
|
1157
|
-
const
|
|
1158
|
+
const dbHandle = options.tx ?? getDb();
|
|
1158
1159
|
const now = /* @__PURE__ */ new Date();
|
|
1159
1160
|
const siteId = await getCurrentSiteId() ?? NP_DEFAULT_SITE_ID;
|
|
1160
|
-
await
|
|
1161
|
+
await dbHandle.insert(npSettings).values({ siteId, key: "activeTheme", value: id, updatedAt: now, updatedBy }).onConflictDoUpdate({
|
|
1161
1162
|
target: [npSettings.siteId, npSettings.key],
|
|
1162
1163
|
set: { value: id, updatedAt: now, updatedBy }
|
|
1163
1164
|
});
|
|
@@ -2503,6 +2504,7 @@ export {
|
|
|
2503
2504
|
verifyToken,
|
|
2504
2505
|
verifyTokenFull,
|
|
2505
2506
|
withCurrentSite,
|
|
2507
|
+
withDeferredPostCommit,
|
|
2506
2508
|
withMemberWrite
|
|
2507
2509
|
};
|
|
2508
2510
|
//# sourceMappingURL=index.js.map
|