@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
package/dist/jobs.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
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, 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-
|
|
2
|
-
import './types-
|
|
1
|
+
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, 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';
|
|
2
|
+
import './types-D31ppGJw.js';
|
|
3
3
|
import 'pg-boss';
|
|
4
4
|
import './logger-DqGaOU_j.js';
|
package/dist/jobs.js
CHANGED
package/dist/media.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { D as DEFAULT_IMAGE_SIZES, q as DrizzleTransactionLike, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, r as NpProcessedImageSourceMetadata, 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, t as syncMediaRefs, u as uploadMedia } from './index-
|
|
2
|
-
import './types-
|
|
1
|
+
export { D as DEFAULT_IMAGE_SIZES, q as DrizzleTransactionLike, b as NpGetMediaUrlOptions, c as NpMediaUploader, d as NpMediaUploaderKindFilter, e as NpMediaVariantName, f as NpProcessedImageResult, r as NpProcessedImageSourceMetadata, 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, t as syncMediaRefs, u as uploadMedia } from './index-DymnczhP.js';
|
|
2
|
+
import './types-D31ppGJw.js';
|
|
3
3
|
import 'drizzle-orm';
|
|
4
4
|
import 'drizzle-orm/pg-core';
|
|
5
5
|
import 'node:stream/web';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
publishScheduledDocuments
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-HYYMUVUK.js";
|
|
4
|
+
import "./chunk-MXOHWU2P.js";
|
|
5
5
|
import "./chunk-2VZZ7M26.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-EFZH6UPY.js";
|
|
7
7
|
import "./chunk-4ZLMEKFX.js";
|
|
8
8
|
import "./chunk-U4QCCLAW.js";
|
|
9
9
|
import "./chunk-SBCVAC2Z.js";
|
|
@@ -18,4 +18,4 @@ import "./chunk-PZ5AY32C.js";
|
|
|
18
18
|
export {
|
|
19
19
|
publishScheduledDocuments
|
|
20
20
|
};
|
|
21
|
-
//# sourceMappingURL=scheduled-
|
|
21
|
+
//# sourceMappingURL=scheduled-7MSJIJLE.js.map
|
package/dist/seo.d.ts
CHANGED
|
@@ -150,11 +150,24 @@ interface NpPageMetadataInput {
|
|
|
150
150
|
*/
|
|
151
151
|
ogImage?: string | null;
|
|
152
152
|
/**
|
|
153
|
-
* Path of the current page (no origin).
|
|
154
|
-
*
|
|
155
|
-
*
|
|
153
|
+
* Path of the current page (no origin). Drives the OpenGraph
|
|
154
|
+
* `url` field (which represents "this resource"). Also serves
|
|
155
|
+
* as the default for `canonicalPath` when that's not set.
|
|
156
|
+
* Pass without trailing `/` — trailing slashes are normalized
|
|
157
|
+
* off — but query strings are preserved so paginated /
|
|
158
|
+
* filtered routes can identify themselves accurately.
|
|
156
159
|
*/
|
|
157
160
|
path?: string;
|
|
161
|
+
/**
|
|
162
|
+
* Override the canonical URL path when the page represents
|
|
163
|
+
* one resource but search engines should treat a different
|
|
164
|
+
* URL as authoritative. Defaults to `path`. Use when /blog
|
|
165
|
+
* canonicalises to / on a theme that renders the same content
|
|
166
|
+
* at both, or when a paginated route should dedupe to its
|
|
167
|
+
* first page. Leaving this unset means "canonical = self",
|
|
168
|
+
* which is correct for most pages.
|
|
169
|
+
*/
|
|
170
|
+
canonicalPath?: string;
|
|
158
171
|
/** OpenGraph type. Default `"website"`; posts use `"article"`. */
|
|
159
172
|
ogType?: "website" | "article" | "profile";
|
|
160
173
|
/**
|
package/dist/seo.js
CHANGED
|
@@ -12,10 +12,10 @@ import {
|
|
|
12
12
|
renderSitemapIndexXml,
|
|
13
13
|
renderSitemapXml,
|
|
14
14
|
validateSeoSettingsPatch
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-AOEN5EIX.js";
|
|
16
|
+
import "./chunk-MXOHWU2P.js";
|
|
17
17
|
import "./chunk-2VZZ7M26.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-EFZH6UPY.js";
|
|
19
19
|
import "./chunk-4ZLMEKFX.js";
|
|
20
20
|
import "./chunk-U4QCCLAW.js";
|
|
21
21
|
import "./chunk-SBCVAC2Z.js";
|
|
@@ -197,6 +197,22 @@ interface NpCheckboxField extends NpFieldBase {
|
|
|
197
197
|
}
|
|
198
198
|
interface NpDateField extends NpFieldBase {
|
|
199
199
|
type: "date";
|
|
200
|
+
/**
|
|
201
|
+
* Default value the Drizzle schema generator emits as a SQL
|
|
202
|
+
* `DEFAULT` clause. Accepted shapes:
|
|
203
|
+
*
|
|
204
|
+
* - `"now"` sentinel → `.defaultNow()` → `DEFAULT now()`
|
|
205
|
+
* - A `Date` instance → `.default(new Date("<iso>"))`
|
|
206
|
+
* - Any ISO 8601 string → parsed via `new Date(...)` and
|
|
207
|
+
* emitted identically to the Date case.
|
|
208
|
+
*
|
|
209
|
+
* Anything else is dropped silently at codegen time (mirroring
|
|
210
|
+
* the defensive shape used for other scalar fields). Required
|
|
211
|
+
* NOT NULL date columns paired with `defaultValue: "now"` let
|
|
212
|
+
* an `ALTER TABLE … ADD COLUMN` against a populated table
|
|
213
|
+
* succeed without a backfill step.
|
|
214
|
+
*/
|
|
215
|
+
defaultValue?: Date | string;
|
|
200
216
|
pickerOptions?: {
|
|
201
217
|
format?: string;
|
|
202
218
|
includeTime?: boolean;
|
|
@@ -1052,6 +1068,14 @@ interface NpFindWhereSystemTokens {
|
|
|
1052
1068
|
* a `locale` field (only i18n-enabled collections do).
|
|
1053
1069
|
*/
|
|
1054
1070
|
locale?: string;
|
|
1071
|
+
/**
|
|
1072
|
+
* Lifecycle status filter. Every collection in the framework
|
|
1073
|
+
* carries a `status` column (codegen-enforced), so exposing it
|
|
1074
|
+
* here lets a typed `where` clause filter to published rows
|
|
1075
|
+
* without the doc type having to redeclare it. Accepts a
|
|
1076
|
+
* single value or an array (IN match).
|
|
1077
|
+
*/
|
|
1078
|
+
status?: NpDocumentStatus | NpDocumentStatus[];
|
|
1055
1079
|
}
|
|
1056
1080
|
/**
|
|
1057
1081
|
* Strip `null` and unwrap arrays so a hasMany field like
|
|
@@ -1122,6 +1146,27 @@ interface NpFindResult<T = Record<string, unknown>> {
|
|
|
1122
1146
|
type NpDocumentStatus = "draft" | "scheduled" | "published" | "archived" | "pending";
|
|
1123
1147
|
interface NpSaveOptions {
|
|
1124
1148
|
status?: NpDocumentStatus;
|
|
1149
|
+
/**
|
|
1150
|
+
* Caller-owned Drizzle transaction handle. When provided, all
|
|
1151
|
+
* reads + writes in the save flow run against this transaction
|
|
1152
|
+
* instead of opening a private one — useful for batching many
|
|
1153
|
+
* saves (the seed loop) so a mid-batch failure rolls back the
|
|
1154
|
+
* pending writes as a unit.
|
|
1155
|
+
*
|
|
1156
|
+
* Typed as `unknown` here to avoid a circular import between
|
|
1157
|
+
* `config/types.ts` and `collections/pipeline.ts` (where the
|
|
1158
|
+
* structural type lives). Callers pass the `NpTransaction`
|
|
1159
|
+
* value exported from `@nexpress/core`; the pipeline narrows
|
|
1160
|
+
* with an internal cast at the boundary.
|
|
1161
|
+
*
|
|
1162
|
+
* Pre-write hooks still fire OUTSIDE the tx (they shouldn't see
|
|
1163
|
+
* pending state). Post-commit hooks (`content:afterSave` job,
|
|
1164
|
+
* plugin `content:afterCreate` / `content:afterUpdate`) fire
|
|
1165
|
+
* after the inner persist block but before the caller's outer
|
|
1166
|
+
* tx commits — their side effects can diverge from final DB
|
|
1167
|
+
* state on rollback. Same trade-off as `deleteDocument({ tx })`.
|
|
1168
|
+
*/
|
|
1169
|
+
tx?: unknown;
|
|
1125
1170
|
}
|
|
1126
1171
|
interface NpSaveResult {
|
|
1127
1172
|
doc: Record<string, unknown>;
|