@easy-cms/core 1.22.0 → 1.23.1
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/README.md +2 -2
- package/dist/{chunk-YW3BCMO6.js → chunk-VZNL7HWC.js} +49 -7
- package/dist/{config-CD9cGivz.d.ts → config-BQ53ulBF.d.ts} +6 -1
- package/dist/{handler-Clq3qUlJ.d.ts → handler-B4GC_p5n.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/{plugin-BW9NbI0p.d.ts → plugin-I5C-9kXl.d.ts} +4 -2
- package/dist/plugin.d.ts +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -48,11 +48,11 @@ The Nuxt and Next.js adapters (or `easy-cms serve`) serve the admin and REST API
|
|
|
48
48
|
`useEasyCMS()` / `getEasyCMS(config)` give you the Local API, typed from it.
|
|
49
49
|
|
|
50
50
|
> From 1.0, breaking changes come only in a major release, with an upgrade guide. See
|
|
51
|
-
> [Versions and deprecations](https://
|
|
51
|
+
> [Versions and deprecations](https://easycms.dev/docs/versioning) and the
|
|
52
52
|
> [changelog](https://github.com/maritonx/easy-cms/blob/main/packages/core/CHANGELOG.md).
|
|
53
53
|
|
|
54
54
|
## Links
|
|
55
55
|
|
|
56
|
-
[Configuration](https://
|
|
56
|
+
[Configuration](https://easycms.dev/docs/configuration) · [Local API](https://easycms.dev/docs/local-api) · [Documentation](https://easycms.dev/docs) ([ภาษาไทย](https://easycms.dev/th/docs)) · [GitHub](https://github.com/maritonx/easy-cms)
|
|
57
57
|
|
|
58
58
|
MIT License
|
|
@@ -5142,6 +5142,7 @@ var BUILTIN_NAV = [
|
|
|
5142
5142
|
}
|
|
5143
5143
|
];
|
|
5144
5144
|
var MEDIA_ORDER = 10;
|
|
5145
|
+
var CALENDAR_ORDER = 5;
|
|
5145
5146
|
var LABEL_ORDER = 500;
|
|
5146
5147
|
var NAV_ID = /^[a-z][a-z0-9-]*$/;
|
|
5147
5148
|
function mergeGroups(lists, parent = "") {
|
|
@@ -7456,7 +7457,7 @@ function cacheableResponse(request, body, status, headers, times, tags) {
|
|
|
7456
7457
|
}
|
|
7457
7458
|
|
|
7458
7459
|
// src/version.ts
|
|
7459
|
-
var VERSION = true ? "1.
|
|
7460
|
+
var VERSION = true ? "1.23.1" : "0.0.0-dev";
|
|
7460
7461
|
|
|
7461
7462
|
// src/telemetry.ts
|
|
7462
7463
|
var DB_CALLS = /* @__PURE__ */ new Set([
|
|
@@ -9653,15 +9654,28 @@ var EasyCMS = class {
|
|
|
9653
9654
|
}
|
|
9654
9655
|
/**
|
|
9655
9656
|
* The next pending jobs across all collections and globals, soonest first; with access
|
|
9656
|
-
* enforced, only those the user may update.
|
|
9657
|
+
* enforced, only those the user may update. `from` and `to` (ISO) keep those due in that
|
|
9658
|
+
* range, e.g. for a calendar; `collection` (and `docs`, its ids) those of a list page.
|
|
9657
9659
|
*/
|
|
9658
9660
|
async upcomingSchedules(options = {}) {
|
|
9659
9661
|
if (!this.config.collections.some((c) => c.slug === SCHEDULED_JOBS)) return [];
|
|
9660
9662
|
const guard = guardOf(options);
|
|
9661
9663
|
const limit = options.limit ?? 10;
|
|
9664
|
+
const due = {
|
|
9665
|
+
...options.from !== void 0 ? { gte: options.from } : {},
|
|
9666
|
+
...options.to !== void 0 ? { lt: options.to } : {}
|
|
9667
|
+
};
|
|
9662
9668
|
const rows = await this.db.find({
|
|
9663
9669
|
collection: SCHEDULED_JOBS,
|
|
9664
|
-
where: {
|
|
9670
|
+
where: {
|
|
9671
|
+
and: [
|
|
9672
|
+
{ state: { equals: "pending" } },
|
|
9673
|
+
...Object.keys(due).length ? [{ runAt: due }] : [],
|
|
9674
|
+
...options.collection !== void 0 ? [{ parent: { equals: options.collection } }] : [],
|
|
9675
|
+
// Jobs keep the document's id as a number (`doc`).
|
|
9676
|
+
...options.docs !== void 0 ? [{ doc: { in: options.docs.map(Number) } }] : []
|
|
9677
|
+
]
|
|
9678
|
+
},
|
|
9665
9679
|
sort: ["runAt"],
|
|
9666
9680
|
limit: limit * 5,
|
|
9667
9681
|
page: 1
|
|
@@ -10706,6 +10720,9 @@ var has = (config, slug2) => config.collections.some((c) => c.slug === slug2);
|
|
|
10706
10720
|
function hasJobsPage(config) {
|
|
10707
10721
|
return config.jobs.length > 0 || has(config, SCHEDULED_JOBS) || has(config, OUTBOX);
|
|
10708
10722
|
}
|
|
10723
|
+
function hasCalendarPage(config) {
|
|
10724
|
+
return config.collections.some((c) => c.admin?.calendar !== void 0 || c.schedule === true);
|
|
10725
|
+
}
|
|
10709
10726
|
var text2 = (value) => typeof value === "string" && value !== "" ? value : null;
|
|
10710
10727
|
async function adminJobs(cms, user) {
|
|
10711
10728
|
const { config } = cms;
|
|
@@ -10980,7 +10997,8 @@ var Roles = class {
|
|
|
10980
10997
|
if ((id === "deliveries" || id === "jobs") && user.scoped === true) return false;
|
|
10981
10998
|
if (id === "audit" && user.role === "admin" && user.scoped === true && this.config.audit !== false && typeof this.config.audit.scope === "function")
|
|
10982
10999
|
return true;
|
|
10983
|
-
if (!this.enabled)
|
|
11000
|
+
if (!this.enabled)
|
|
11001
|
+
return id === "calendar" || id.startsWith("page:") || id.startsWith("widget:");
|
|
10984
11002
|
return (await this.permissionsOf(user.role)).admin?.includes(id) ?? false;
|
|
10985
11003
|
}
|
|
10986
11004
|
/**
|
|
@@ -11264,6 +11282,7 @@ var Roles = class {
|
|
|
11264
11282
|
(c) => c.slug === WEBHOOK_DELIVERIES || c.slug === EMAIL_DELIVERIES
|
|
11265
11283
|
) ? [{ id: "deliveries" }] : [],
|
|
11266
11284
|
...hasJobsPage(this.config) ? [{ id: "jobs" }] : [],
|
|
11285
|
+
...hasCalendarPage(this.config) ? [{ id: "calendar" }] : [],
|
|
11267
11286
|
...this.config.admin.pages.map((page) => ({ id: viewId.page(page.path), label: page.label })),
|
|
11268
11287
|
...this.config.admin.dashboard.map((widget) => ({
|
|
11269
11288
|
id: viewId.widget(widget.id ?? tagOf(widget.component)),
|
|
@@ -11928,7 +11947,8 @@ async function adminSchema(cms, user, origin, context = {}) {
|
|
|
11928
11947
|
email: admin,
|
|
11929
11948
|
roles: admin && cms.roles.enabled,
|
|
11930
11949
|
sso: admin && cms.auth.sso.enabled,
|
|
11931
|
-
audit: cms.audit.enabled && await cms.roles.canView(user, "audit")
|
|
11950
|
+
audit: cms.audit.enabled && await cms.roles.canView(user, "audit"),
|
|
11951
|
+
calendar: hasCalendarPage(cms.config) && await cms.roles.canView(user, "calendar")
|
|
11932
11952
|
};
|
|
11933
11953
|
const roles = await cms.roles.options();
|
|
11934
11954
|
const adminCollections = await Promise.all(
|
|
@@ -12139,6 +12159,7 @@ function buildNav(cms, collections, globals, pageRefs, views) {
|
|
|
12139
12159
|
if (own.length)
|
|
12140
12160
|
root.push({ order: LABEL_ORDER + i++, node: { kind: "group", id, label, items: own } });
|
|
12141
12161
|
}
|
|
12162
|
+
if (views.calendar) root.push({ order: CALENDAR_ORDER, node: { kind: "view", view: "calendar" } });
|
|
12142
12163
|
if (media) root.push({ order: MEDIA_ORDER, node: { kind: "collection", slug: MEDIA } });
|
|
12143
12164
|
return root.sort((a, b) => a.order - b.order).map((r) => r.node);
|
|
12144
12165
|
}
|
|
@@ -12433,6 +12454,7 @@ function parseDepth(url) {
|
|
|
12433
12454
|
}
|
|
12434
12455
|
|
|
12435
12456
|
// src/rest/handler.ts
|
|
12457
|
+
var SCHEDULED_RANGE_LIMIT = 500;
|
|
12436
12458
|
var CSRF_COOKIE = "ecms-csrf";
|
|
12437
12459
|
var CSRF_HEADER = "x-csrf-token";
|
|
12438
12460
|
var MAX_BODY_BYTES = 1024 * 1024;
|
|
@@ -13160,14 +13182,34 @@ async function route(cms, ctx, method, path, options) {
|
|
|
13160
13182
|
if (!await cms.roles.canView(ctx.user, "status")) throw new ForbiddenError();
|
|
13161
13183
|
return { body: await adminStatus(cms) };
|
|
13162
13184
|
}
|
|
13163
|
-
if (second === "scheduled" && third === void 0)
|
|
13185
|
+
if (second === "scheduled" && third === void 0) {
|
|
13186
|
+
const moment = (name) => {
|
|
13187
|
+
const value = ctx.url.searchParams.get(name);
|
|
13188
|
+
if (value === null) return void 0;
|
|
13189
|
+
if (Number.isNaN(Date.parse(value)))
|
|
13190
|
+
throw new HttpError(`${name} must be an ISO date and time`, 400);
|
|
13191
|
+
return new Date(value).toISOString();
|
|
13192
|
+
};
|
|
13193
|
+
const from = moment("from");
|
|
13194
|
+
const to = moment("to");
|
|
13195
|
+
const collection4 = ctx.url.searchParams.get("collection") ?? void 0;
|
|
13196
|
+
const docs = ctx.url.searchParams.get("docs")?.split(",").filter(Boolean);
|
|
13197
|
+
if (docs && docs.length > SCHEDULED_RANGE_LIMIT)
|
|
13198
|
+
throw new HttpError(`docs: at most ${SCHEDULED_RANGE_LIMIT}`, 400);
|
|
13199
|
+
const ranged = from !== void 0 || to !== void 0 || collection4 !== void 0;
|
|
13164
13200
|
return {
|
|
13165
13201
|
body: await cms.upcomingSchedules({
|
|
13166
13202
|
user: ctx.user,
|
|
13167
13203
|
context: ctx.context,
|
|
13168
|
-
overrideAccess: false
|
|
13204
|
+
overrideAccess: false,
|
|
13205
|
+
...from !== void 0 ? { from } : {},
|
|
13206
|
+
...to !== void 0 ? { to } : {},
|
|
13207
|
+
...collection4 !== void 0 ? { collection: collection4 } : {},
|
|
13208
|
+
...docs !== void 0 ? { docs } : {},
|
|
13209
|
+
...ranged ? { limit: SCHEDULED_RANGE_LIMIT } : {}
|
|
13169
13210
|
})
|
|
13170
13211
|
};
|
|
13212
|
+
}
|
|
13171
13213
|
const [, , collection3, id2, extra] = segments;
|
|
13172
13214
|
if (second === "access" && collection3 && id2 && extra === void 0) {
|
|
13173
13215
|
if (INTERNAL_COLLECTIONS.has(collection3) || !cms.config.collections.some((c) => c.slug === collection3)) {
|
|
@@ -2242,10 +2242,15 @@ declare class EasyCMS<C extends Config = Config> {
|
|
|
2242
2242
|
private addJob;
|
|
2243
2243
|
/**
|
|
2244
2244
|
* The next pending jobs across all collections and globals, soonest first; with access
|
|
2245
|
-
* enforced, only those the user may update.
|
|
2245
|
+
* enforced, only those the user may update. `from` and `to` (ISO) keep those due in that
|
|
2246
|
+
* range, e.g. for a calendar; `collection` (and `docs`, its ids) those of a list page.
|
|
2246
2247
|
*/
|
|
2247
2248
|
upcomingSchedules(options?: AccessOptions & {
|
|
2248
2249
|
limit?: number;
|
|
2250
|
+
from?: string;
|
|
2251
|
+
to?: string;
|
|
2252
|
+
collection?: string;
|
|
2253
|
+
docs?: readonly ID[];
|
|
2249
2254
|
}): Promise<(ScheduledPublish & {
|
|
2250
2255
|
collection?: string;
|
|
2251
2256
|
global?: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { I as ID, C as Config, E as EasyCMS, L as LocalizationConfig, F as Field, a as FieldError, b as FilterOptions, c as CreateEasyCMSOptions, R as ResolvedConfig } from './config-
|
|
1
|
+
import { I as ID, C as Config, E as EasyCMS, L as LocalizationConfig, F as Field, a as FieldError, b as FilterOptions, c as CreateEasyCMSOptions, R as ResolvedConfig } from './config-BQ53ulBF.js';
|
|
2
2
|
|
|
3
3
|
/** Decrypts a file from `encryptBackup`; throws for another key or a changed file. */
|
|
4
4
|
declare function decryptBackup(data: Uint8Array, encryptionKey: string): Uint8Array;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { P as PaginatedDocs, I as ID, d as EmailSetting, W as WebhookPayload } from './config-
|
|
2
|
-
export { A as ADAPTER_API_VERSION, e as ADMIN_ICONS, f as Access, g as AccessArgs, h as AccessOptions, i as AdminBrand, j as AdminCommand, k as AdminComponent, l as AdminConfig, m as AdminFieldArgs, n as AdminIcon, o as AdminLocale, p as AdminPage, q as AdminRole, r as AdminRoleChange, s as AdminRoleField, t as AdminRoleTarget, u as AdminRoleView, v as AdminRoles, w as AdminSso, x as AdminSwitcher, y as AdminViewAccess, z as AfterChangeHook, B as AfterDeleteHook, D as AfterReadHook, G as ApiKeyContext, H as ApiKeyGlobalOperation, J as ApiKeyOperation, K as ApiKeyPermissions, M as ArrayField, N as AuditChange, O as AuditConfig, Q as AuditEntry, S as AuditLog, T as AuditPage, U as AuditVerification, V as Auth, X as AuthConfig, Y as AuthProvider, Z as AuthProviderProfile, _ as AuthProviderRequest, $ as AuthUser, a0 as BackupsConfig, a1 as BeforeChangeHook, a2 as BeforeDeleteHook, a3 as BeforeValidateHook, a4 as Block, a5 as BlocksField, a6 as BooleanField, a7 as BuiltinApiKeysCollection, a8 as BuiltinMediaCollection, a9 as BuiltinMediaFoldersCollection, aa as BuiltinUsersCollection, ab as BundleHints, ac as CliCommand, ad as CollectionAccess, ae as CollectionAdmin, af as CollectionCalendarAdmin, ag as CollectionConfig, ah as CollectionDocument, ai as CollectionHooks, aj as CollectionListAdmin, ak as CollectionSearch, al as CollectionSlug, C as Config, am as ConfigError, an as ConfigIssue, ao as ContainerAdmin, c as CreateEasyCMSOptions, ap as CreateInput, aq as CreateMigrationResult, ar as CursorDocs, as as CustomField, at as CustomFieldTypes, au as DashboardWidget, av as Database, aw as DatabaseAdapter, ax as DatabaseInitArgs, ay as DatabaseTransfer, az as DateField, aA as DepthOptions, aB as DirectUpload, aC as DiskStorageOptions, aD as DocumentOf, E as EasyCMS, aE as EasyCMSError, aF as EmailAdapter, aG as EmailField, aH as EmailMessage, aI as Endpoint, aJ as EndpointRequest, aK as ErrorCode, aL as FIELD_TYPES, F as Field, aM as FieldAccess, aN as FieldAccessFn, aO as FieldAdmin, a as FieldError, aP as FieldRule, aQ as FieldType, aR as FieldTypeBase, aS as FieldTypeDefinition, aT as FieldTypeValidateContext, aU as FieldValidate, aV as FieldValidateContext, aW as FieldValue, aX as FieldsInput, aY as FieldsValue, b as FilterOptions, aZ as FilterOptionsArgs, a_ as FindAfterArgs, a$ as FindArgs, b0 as FindOptions, b1 as FolderLevel, b2 as FolderPermissions, b3 as ForbiddenError, b4 as GlobalAccess, b5 as GlobalConfig, b6 as GlobalDocument, b7 as GlobalHooks, b8 as GlobalInput, b9 as GlobalSlug, ba as GroupField, bb as ImageSize, bc as IncrementOptions, bd as InferCollection, be as InferGlobal, bf as JobConfig, bg as JsonField, bh as KeysetPage, bi as Label, bj as LayoutNode, bk as LivePreview, bl as LocaleOf, L as LocalizationConfig, bm as LogDetails, bn as Logger, bo as LoginArgs, bp as LogsConfig, bq as MediaDocument, br as MediaSize, bs as MembersConfig, bt as MembersSignup, bu as MigrationInfo, bv as NavGroup, bw as NotFoundError, bx as NumberField, by as OnRequest, bz as OnRequestArgs, bA as Operation, bB as OutboxRow, bC as PLUGIN_API_VERSION, bD as PasswordEmail, bE as PasswordEmailArgs, bF as PasswordEmailFn, bG as PasswordLinkOptions, bH as PayloadTooLargeError, bI as Plugin, bJ as PluginInfo, bK as PluginTypes, bL as PreviewTarget, bM as PreviewURL, bN as QueryError, bO as ROLE_OPERATIONS, bP as RawDocument, bQ as ReadOptions, bR as RelationshipField, bS as RequestContext, R as ResolvedConfig, bT as RichTextDocument, bU as RichTextField, bV as Role, bW as RoleOperation, bX as RolePermissions, bY as Roles, bZ as RoutesConfig, b_ as ScheduledPublish, b$ as SchemaError, c0 as SchemaMode, c1 as SearchAdapter, c2 as SearchEntry, c3 as SearchHits, c4 as SearchOptions, c5 as SearchQuery, c6 as SearchResults, c7 as SearchSetting, c8 as SelectField, c9 as SelectOption, ca as Session, cb as SidebarPanel, cc as SignupArgs, cd as SignupResult, ce as SingleSignOn, cf as SlugField, cg as SlugOf, ch as SsoOutcome, ci as SsoProviderRef, cj as StorageAdapter, ck as StoredFile, cl as TRIGRAM_LIKE_MIN, cm as TelemetryConfig, cn as TextField, co as TextareaField, cp as TooManyRequestsError, cq as TypedPlugin, cr as UnauthorizedError, cs as UncountedDocs, ct as UpdateInput, cu as UpdateOptions, cv as UploadConfig, cw as UploadField, cx as UploadFromURLConfig, cy as UserIdentity, cz as ValidationError, cA as Version, cB as VersionSummary, cC as VersionsConfig, cD as WEBHOOK_EVENTS, cE as WebhookConfig, cF as WebhookEvent, cG as Where, cH as WhereOperators, cI as anyone, cJ as consoleEmail, cK as consoleLogger, cL as createEasyCMS, cM as defineConfig, cN as defineFieldType, cO as definePlugin, cP as diskStorage, cQ as hasRows, cR as isAdmin, cS as isHasMany, cT as isSignedIn, cU as isStaff, cV as isSystemAdmin, cW as jsonLogger, cX as memorySearch, cY as mimeAllowedBy, cZ as rowFields, c_ as silentLogger, c$ as uniqueWithinOf } from './config-
|
|
3
|
-
export { A as ADMIN_API_VERSION, a as AdminCollection, b as AdminComponentRef, c as AdminElementProps, d as AdminField, e as AdminGlobal, f as AdminLayoutNode, g as AdminNavGroup, h as AdminNavItem, i as AdminNavNode, j as AdminPageRef, k as AdminPageRoute, l as AdminSchema, m as AdminWidgetRef, S as SetFieldDetail, w as warnDeprecated } from './plugin-
|
|
4
|
-
export { A as AdminBackup, a as AdminBackups, b as ApiHandlerOptions, B as BackupState, L as LoadConfigOptions, R as RestHandler, c as RestHandlerOptions, d as createApiHandler, e as createRestHandler, l as loadConfig, r as resolveConfig, s as sharedEasyCMS, f as slugify } from './handler-
|
|
1
|
+
import { P as PaginatedDocs, I as ID, d as EmailSetting, W as WebhookPayload } from './config-BQ53ulBF.js';
|
|
2
|
+
export { A as ADAPTER_API_VERSION, e as ADMIN_ICONS, f as Access, g as AccessArgs, h as AccessOptions, i as AdminBrand, j as AdminCommand, k as AdminComponent, l as AdminConfig, m as AdminFieldArgs, n as AdminIcon, o as AdminLocale, p as AdminPage, q as AdminRole, r as AdminRoleChange, s as AdminRoleField, t as AdminRoleTarget, u as AdminRoleView, v as AdminRoles, w as AdminSso, x as AdminSwitcher, y as AdminViewAccess, z as AfterChangeHook, B as AfterDeleteHook, D as AfterReadHook, G as ApiKeyContext, H as ApiKeyGlobalOperation, J as ApiKeyOperation, K as ApiKeyPermissions, M as ArrayField, N as AuditChange, O as AuditConfig, Q as AuditEntry, S as AuditLog, T as AuditPage, U as AuditVerification, V as Auth, X as AuthConfig, Y as AuthProvider, Z as AuthProviderProfile, _ as AuthProviderRequest, $ as AuthUser, a0 as BackupsConfig, a1 as BeforeChangeHook, a2 as BeforeDeleteHook, a3 as BeforeValidateHook, a4 as Block, a5 as BlocksField, a6 as BooleanField, a7 as BuiltinApiKeysCollection, a8 as BuiltinMediaCollection, a9 as BuiltinMediaFoldersCollection, aa as BuiltinUsersCollection, ab as BundleHints, ac as CliCommand, ad as CollectionAccess, ae as CollectionAdmin, af as CollectionCalendarAdmin, ag as CollectionConfig, ah as CollectionDocument, ai as CollectionHooks, aj as CollectionListAdmin, ak as CollectionSearch, al as CollectionSlug, C as Config, am as ConfigError, an as ConfigIssue, ao as ContainerAdmin, c as CreateEasyCMSOptions, ap as CreateInput, aq as CreateMigrationResult, ar as CursorDocs, as as CustomField, at as CustomFieldTypes, au as DashboardWidget, av as Database, aw as DatabaseAdapter, ax as DatabaseInitArgs, ay as DatabaseTransfer, az as DateField, aA as DepthOptions, aB as DirectUpload, aC as DiskStorageOptions, aD as DocumentOf, E as EasyCMS, aE as EasyCMSError, aF as EmailAdapter, aG as EmailField, aH as EmailMessage, aI as Endpoint, aJ as EndpointRequest, aK as ErrorCode, aL as FIELD_TYPES, F as Field, aM as FieldAccess, aN as FieldAccessFn, aO as FieldAdmin, a as FieldError, aP as FieldRule, aQ as FieldType, aR as FieldTypeBase, aS as FieldTypeDefinition, aT as FieldTypeValidateContext, aU as FieldValidate, aV as FieldValidateContext, aW as FieldValue, aX as FieldsInput, aY as FieldsValue, b as FilterOptions, aZ as FilterOptionsArgs, a_ as FindAfterArgs, a$ as FindArgs, b0 as FindOptions, b1 as FolderLevel, b2 as FolderPermissions, b3 as ForbiddenError, b4 as GlobalAccess, b5 as GlobalConfig, b6 as GlobalDocument, b7 as GlobalHooks, b8 as GlobalInput, b9 as GlobalSlug, ba as GroupField, bb as ImageSize, bc as IncrementOptions, bd as InferCollection, be as InferGlobal, bf as JobConfig, bg as JsonField, bh as KeysetPage, bi as Label, bj as LayoutNode, bk as LivePreview, bl as LocaleOf, L as LocalizationConfig, bm as LogDetails, bn as Logger, bo as LoginArgs, bp as LogsConfig, bq as MediaDocument, br as MediaSize, bs as MembersConfig, bt as MembersSignup, bu as MigrationInfo, bv as NavGroup, bw as NotFoundError, bx as NumberField, by as OnRequest, bz as OnRequestArgs, bA as Operation, bB as OutboxRow, bC as PLUGIN_API_VERSION, bD as PasswordEmail, bE as PasswordEmailArgs, bF as PasswordEmailFn, bG as PasswordLinkOptions, bH as PayloadTooLargeError, bI as Plugin, bJ as PluginInfo, bK as PluginTypes, bL as PreviewTarget, bM as PreviewURL, bN as QueryError, bO as ROLE_OPERATIONS, bP as RawDocument, bQ as ReadOptions, bR as RelationshipField, bS as RequestContext, R as ResolvedConfig, bT as RichTextDocument, bU as RichTextField, bV as Role, bW as RoleOperation, bX as RolePermissions, bY as Roles, bZ as RoutesConfig, b_ as ScheduledPublish, b$ as SchemaError, c0 as SchemaMode, c1 as SearchAdapter, c2 as SearchEntry, c3 as SearchHits, c4 as SearchOptions, c5 as SearchQuery, c6 as SearchResults, c7 as SearchSetting, c8 as SelectField, c9 as SelectOption, ca as Session, cb as SidebarPanel, cc as SignupArgs, cd as SignupResult, ce as SingleSignOn, cf as SlugField, cg as SlugOf, ch as SsoOutcome, ci as SsoProviderRef, cj as StorageAdapter, ck as StoredFile, cl as TRIGRAM_LIKE_MIN, cm as TelemetryConfig, cn as TextField, co as TextareaField, cp as TooManyRequestsError, cq as TypedPlugin, cr as UnauthorizedError, cs as UncountedDocs, ct as UpdateInput, cu as UpdateOptions, cv as UploadConfig, cw as UploadField, cx as UploadFromURLConfig, cy as UserIdentity, cz as ValidationError, cA as Version, cB as VersionSummary, cC as VersionsConfig, cD as WEBHOOK_EVENTS, cE as WebhookConfig, cF as WebhookEvent, cG as Where, cH as WhereOperators, cI as anyone, cJ as consoleEmail, cK as consoleLogger, cL as createEasyCMS, cM as defineConfig, cN as defineFieldType, cO as definePlugin, cP as diskStorage, cQ as hasRows, cR as isAdmin, cS as isHasMany, cT as isSignedIn, cU as isStaff, cV as isSystemAdmin, cW as jsonLogger, cX as memorySearch, cY as mimeAllowedBy, cZ as rowFields, c_ as silentLogger, c$ as uniqueWithinOf } from './config-BQ53ulBF.js';
|
|
3
|
+
export { A as ADMIN_API_VERSION, a as AdminCollection, b as AdminComponentRef, c as AdminElementProps, d as AdminField, e as AdminGlobal, f as AdminLayoutNode, g as AdminNavGroup, h as AdminNavItem, i as AdminNavNode, j as AdminPageRef, k as AdminPageRoute, l as AdminSchema, m as AdminWidgetRef, S as SetFieldDetail, w as warnDeprecated } from './plugin-I5C-9kXl.js';
|
|
4
|
+
export { A as AdminBackup, a as AdminBackups, b as ApiHandlerOptions, B as BackupState, L as LoadConfigOptions, R as RestHandler, c as RestHandlerOptions, d as createApiHandler, e as createRestHandler, l as loadConfig, r as resolveConfig, s as sharedEasyCMS, f as slugify } from './handler-B4GC_p5n.js';
|
|
5
5
|
export { FieldCondition, matchesCondition } from './conditions.js';
|
|
6
6
|
|
|
7
7
|
type DeliveryKind = 'webhook' | 'email';
|
package/dist/index.js
CHANGED
package/dist/internal.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Config, Database, EasyCMS, NavGroup, CollectionConfig, ID, RawDocument, Field, ResolvedConfig, ConfigIssue } from './index.js';
|
|
2
|
-
export { d0 as API_KEYS, d1 as API_KEY_GLOBAL_OPERATIONS, d2 as API_KEY_OPERATIONS, d3 as DEFAULT_MAX_VERSIONS, d4 as DEFAULT_PASSWORD_EMAILS, d5 as FIELD_TYPE_BASES, d6 as FOLDER_LEVELS, d7 as MediaFolders, d8 as SSO_COOKIE, d9 as Secrets, cl as TRIGRAM_LIKE_MIN, da as codeOfStatus, cQ as hasRows, cS as isHasMany, db as isJsonLogger, dc as keyAllows, dd as logFormat, cY as mimeAllowedBy, cZ as rowFields, de as secretsOf, c$ as uniqueWithinOf } from './config-
|
|
3
|
-
export { C as CONFIG_FILE_NAMES, g as CSRF_COOKIE, h as CSRF_HEADER, D as DEFAULT_ADMIN_PATH, i as DEFAULT_API_PATH, j as DEFAULT_MAX_FILE_SIZE, k as DEFAULT_TOKEN_EXPIRATION, m as applyDefaults, n as applyPlugins, o as createRootEndpointHandler, p as decryptBackup, q as fillMissing, t as findConfigFile, u as forwardedClientIp, v as generateSlugs, w as importConfig, x as isEmail, y as mergeForUpdate, z as parseId, E as platformClientIp, F as readCookie, G as validateFields, H as writeBackupFile } from './handler-
|
|
2
|
+
export { d0 as API_KEYS, d1 as API_KEY_GLOBAL_OPERATIONS, d2 as API_KEY_OPERATIONS, d3 as DEFAULT_MAX_VERSIONS, d4 as DEFAULT_PASSWORD_EMAILS, d5 as FIELD_TYPE_BASES, d6 as FOLDER_LEVELS, d7 as MediaFolders, d8 as SSO_COOKIE, d9 as Secrets, cl as TRIGRAM_LIKE_MIN, da as codeOfStatus, cQ as hasRows, cS as isHasMany, db as isJsonLogger, dc as keyAllows, dd as logFormat, cY as mimeAllowedBy, cZ as rowFields, de as secretsOf, c$ as uniqueWithinOf } from './config-BQ53ulBF.js';
|
|
3
|
+
export { C as CONFIG_FILE_NAMES, g as CSRF_COOKIE, h as CSRF_HEADER, D as DEFAULT_ADMIN_PATH, i as DEFAULT_API_PATH, j as DEFAULT_MAX_FILE_SIZE, k as DEFAULT_TOKEN_EXPIRATION, m as applyDefaults, n as applyPlugins, o as createRootEndpointHandler, p as decryptBackup, q as fillMissing, t as findConfigFile, u as forwardedClientIp, v as generateSlugs, w as importConfig, x as isEmail, y as mergeForUpdate, z as parseId, E as platformClientIp, F as readCookie, G as validateFields, H as writeBackupFile } from './handler-B4GC_p5n.js';
|
|
4
4
|
export { conditionIssues } from './conditions.js';
|
|
5
5
|
|
|
6
6
|
/** The session cookie the REST API sets at login. */
|
package/dist/internal.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bi as Label, F as Field, I as ID, o as AdminLocale, x as AdminSwitcher, ci as SsoProviderRef } from './config-
|
|
1
|
+
import { bi as Label, F as Field, I as ID, o as AdminLocale, x as AdminSwitcher, ci as SsoProviderRef } from './config-BQ53ulBF.js';
|
|
2
2
|
import { FieldCondition } from './conditions.js';
|
|
3
3
|
|
|
4
4
|
/** A Web Component from an admin module, with its `props` (plain JSON). */
|
|
@@ -39,7 +39,7 @@ type AdminNavItem = {
|
|
|
39
39
|
path: string;
|
|
40
40
|
} | {
|
|
41
41
|
kind: 'view';
|
|
42
|
-
view: 'roles' | 'sso' | 'backups' | 'email' | 'deliveries' | 'jobs' | 'audit';
|
|
42
|
+
view: 'roles' | 'sso' | 'backups' | 'email' | 'deliveries' | 'jobs' | 'audit' | 'calendar';
|
|
43
43
|
};
|
|
44
44
|
/** A group of the admin menu (`admin.nav`), with what this user may open in it. */
|
|
45
45
|
interface AdminNavGroup {
|
|
@@ -276,6 +276,8 @@ interface AdminSchema {
|
|
|
276
276
|
roles: boolean;
|
|
277
277
|
sso: boolean;
|
|
278
278
|
audit: boolean;
|
|
279
|
+
/** The Calendar page (#272): documents with `admin.calendar` and scheduled publishing. */
|
|
280
|
+
calendar: boolean;
|
|
279
281
|
};
|
|
280
282
|
/** Roles from the admin are on (`auth.rbac`): documents have owners. */
|
|
281
283
|
rbac: boolean;
|
package/dist/plugin.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { e as ADMIN_ICONS, k as AdminComponent, n as AdminIcon, $ as AuthUser, ac as CliCommand, ad as CollectionAccess, ag as CollectionConfig, C as Config, am as ConfigError, au as DashboardWidget, aE as EasyCMSError, aI as Endpoint, aJ as EndpointRequest, aK as ErrorCode, F as Field, aM as FieldAccess, a as FieldError, aR as FieldTypeBase, aS as FieldTypeDefinition, aT as FieldTypeValidateContext, b3 as ForbiddenError, b5 as GlobalConfig, I as ID, bf as JobConfig, bi as Label, bv as NavGroup, bw as NotFoundError, by as OnRequest, bz as OnRequestArgs, bC as PLUGIN_API_VERSION, bH as PayloadTooLargeError, bI as Plugin, bJ as PluginInfo, bK as PluginTypes, bN as QueryError, bS as RequestContext, cp as TooManyRequestsError, cq as TypedPlugin, cr as UnauthorizedError, cz as ValidationError, cG as Where, cN as defineFieldType, cO as definePlugin } from './config-
|
|
2
|
-
export { A as ADMIN_API_VERSION, c as AdminElementProps, k as AdminPageRoute, S as SetFieldDetail, w as warnDeprecated } from './plugin-
|
|
1
|
+
export { e as ADMIN_ICONS, k as AdminComponent, n as AdminIcon, $ as AuthUser, ac as CliCommand, ad as CollectionAccess, ag as CollectionConfig, C as Config, am as ConfigError, au as DashboardWidget, aE as EasyCMSError, aI as Endpoint, aJ as EndpointRequest, aK as ErrorCode, F as Field, aM as FieldAccess, a as FieldError, aR as FieldTypeBase, aS as FieldTypeDefinition, aT as FieldTypeValidateContext, b3 as ForbiddenError, b5 as GlobalConfig, I as ID, bf as JobConfig, bi as Label, bv as NavGroup, bw as NotFoundError, by as OnRequest, bz as OnRequestArgs, bC as PLUGIN_API_VERSION, bH as PayloadTooLargeError, bI as Plugin, bJ as PluginInfo, bK as PluginTypes, bN as QueryError, bS as RequestContext, cp as TooManyRequestsError, cq as TypedPlugin, cr as UnauthorizedError, cz as ValidationError, cG as Where, cN as defineFieldType, cO as definePlugin } from './config-BQ53ulBF.js';
|
|
2
|
+
export { A as ADMIN_API_VERSION, c as AdminElementProps, k as AdminPageRoute, S as SetFieldDetail, w as warnDeprecated } from './plugin-I5C-9kXl.js';
|
|
3
3
|
import './conditions.js';
|