@aphexcms/cms-core 11.3.0 → 12.0.0-next.20261109084846
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/admin/client-auth.svelte.d.ts +120 -0
- package/dist/admin/client-auth.svelte.d.ts.map +1 -0
- package/dist/admin/client-auth.svelte.js +14 -0
- package/dist/admin/client-config.d.ts +72 -0
- package/dist/admin/client-config.d.ts.map +1 -0
- package/dist/admin/client-config.js +1 -0
- package/dist/admin/settings-header-actions.d.ts +12 -0
- package/dist/admin/settings-header-actions.d.ts.map +1 -0
- package/dist/admin/settings-header-actions.js +1 -0
- package/dist/admin/view-data.d.ts +189 -0
- package/dist/admin/view-data.d.ts.map +1 -0
- package/dist/admin/view-data.js +1 -0
- package/dist/admin.css +6 -0
- package/dist/api/invitations.d.ts +2 -2
- package/dist/api/invitations.d.ts.map +1 -1
- package/dist/api/organizations.d.ts +5 -4
- package/dist/api/organizations.d.ts.map +1 -1
- package/dist/api/organizations.js +2 -3
- package/dist/api/user.d.ts +6 -1
- package/dist/api/user.d.ts.map +1 -1
- package/dist/api/user.js +7 -0
- package/dist/app-augment.d.ts +2 -3
- package/dist/app-augment.d.ts.map +1 -1
- package/dist/app.d.ts +1 -1
- package/dist/auth/auth-errors.d.ts +6 -0
- package/dist/auth/auth-errors.d.ts.map +1 -1
- package/dist/auth/auth-errors.js +8 -0
- package/dist/auth/auth-hooks.d.ts.map +1 -1
- package/dist/auth/auth-hooks.js +36 -17
- package/dist/auth/invitation-email.d.ts +9 -0
- package/dist/auth/invitation-email.d.ts.map +1 -0
- package/dist/auth/invitation-email.js +49 -0
- package/dist/auth/pages.d.ts +16 -0
- package/dist/auth/pages.d.ts.map +1 -0
- package/dist/auth/pages.js +23 -0
- package/dist/auth/provider.d.ts +31 -1
- package/dist/auth/provider.d.ts.map +1 -1
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +9 -0
- package/dist/client/ui.d.ts +16 -0
- package/dist/client/ui.d.ts.map +1 -1
- package/dist/client/ui.js +26 -1
- package/dist/components/AphexStudio.svelte +268 -0
- package/dist/components/AphexStudio.svelte.d.ts +16 -0
- package/dist/components/AphexStudio.svelte.d.ts.map +1 -0
- package/dist/components/admin/AccountSettings.svelte +339 -0
- package/dist/components/admin/AccountSettings.svelte.d.ts +8 -0
- package/dist/components/admin/AccountSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/AccountSettingsView.svelte +61 -0
- package/dist/components/admin/AccountSettingsView.svelte.d.ts +19 -0
- package/dist/components/admin/AccountSettingsView.svelte.d.ts.map +1 -0
- package/dist/components/admin/ApiKeysSettings.svelte +435 -0
- package/dist/components/admin/ApiKeysSettings.svelte.d.ts +15 -0
- package/dist/components/admin/ApiKeysSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/AuthPageShell.svelte +32 -0
- package/dist/components/admin/AuthPageShell.svelte.d.ts +16 -0
- package/dist/components/admin/AuthPageShell.svelte.d.ts.map +1 -0
- package/dist/components/admin/CreateOrganization.svelte +158 -0
- package/dist/components/admin/CreateOrganization.svelte.d.ts +11 -0
- package/dist/components/admin/CreateOrganization.svelte.d.ts.map +1 -0
- package/dist/components/admin/DeleteAccountSettings.svelte +124 -0
- package/dist/components/admin/DeleteAccountSettings.svelte.d.ts +7 -0
- package/dist/components/admin/DeleteAccountSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/DeleteOrganizationSettings.svelte +123 -0
- package/dist/components/admin/DeleteOrganizationSettings.svelte.d.ts +11 -0
- package/dist/components/admin/DeleteOrganizationSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/DocumentEditor.svelte +92 -22
- package/dist/components/admin/DocumentEditor.svelte.d.ts.map +1 -1
- package/dist/components/admin/GeneralSettings.svelte +45 -0
- package/dist/components/admin/GeneralSettings.svelte.d.ts +10 -0
- package/dist/components/admin/GeneralSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/GodModeView.svelte +112 -0
- package/dist/components/admin/GodModeView.svelte.d.ts +9 -0
- package/dist/components/admin/GodModeView.svelte.d.ts.map +1 -0
- package/dist/components/admin/InvitationsView.svelte +277 -0
- package/dist/components/admin/InvitationsView.svelte.d.ts +11 -0
- package/dist/components/admin/InvitationsView.svelte.d.ts.map +1 -0
- package/dist/components/admin/InviteView.svelte +98 -0
- package/dist/components/admin/InviteView.svelte.d.ts +9 -0
- package/dist/components/admin/InviteView.svelte.d.ts.map +1 -0
- package/dist/components/admin/LoginView.svelte +478 -0
- package/dist/components/admin/LoginView.svelte.d.ts +5 -0
- package/dist/components/admin/LoginView.svelte.d.ts.map +1 -0
- package/dist/components/admin/MembersSettings.svelte +25 -3
- package/dist/components/admin/MembersSettings.svelte.d.ts +5 -1
- package/dist/components/admin/MembersSettings.svelte.d.ts.map +1 -1
- package/dist/components/admin/OrganizationSettings.svelte +367 -0
- package/dist/components/admin/OrganizationSettings.svelte.d.ts +9 -0
- package/dist/components/admin/OrganizationSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/OrganizationsList.svelte +92 -0
- package/dist/components/admin/OrganizationsList.svelte.d.ts +8 -0
- package/dist/components/admin/OrganizationsList.svelte.d.ts.map +1 -0
- package/dist/components/admin/OrganizationsView.svelte +31 -0
- package/dist/components/admin/OrganizationsView.svelte.d.ts +9 -0
- package/dist/components/admin/OrganizationsView.svelte.d.ts.map +1 -0
- package/dist/components/admin/PasswordInput.svelte +43 -0
- package/dist/components/admin/PasswordInput.svelte.d.ts +8 -0
- package/dist/components/admin/PasswordInput.svelte.d.ts.map +1 -0
- package/dist/components/admin/PasswordSettings.svelte +179 -0
- package/dist/components/admin/PasswordSettings.svelte.d.ts +4 -0
- package/dist/components/admin/PasswordSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/PreferencesSettings.svelte +80 -0
- package/dist/components/admin/PreferencesSettings.svelte.d.ts +20 -0
- package/dist/components/admin/PreferencesSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/ResetPasswordView.svelte +117 -0
- package/dist/components/admin/ResetPasswordView.svelte.d.ts +9 -0
- package/dist/components/admin/ResetPasswordView.svelte.d.ts.map +1 -0
- package/dist/components/admin/RolesSettings.svelte +360 -0
- package/dist/components/admin/RolesSettings.svelte.d.ts +11 -0
- package/dist/components/admin/RolesSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/SchemaField.svelte +2 -1
- package/dist/components/admin/SchemaField.svelte.d.ts.map +1 -1
- package/dist/components/admin/SettingsHeaderActions.svelte +25 -0
- package/dist/components/admin/SettingsHeaderActions.svelte.d.ts +8 -0
- package/dist/components/admin/SettingsHeaderActions.svelte.d.ts.map +1 -0
- package/dist/components/admin/SettingsShell.svelte +136 -0
- package/dist/components/admin/SettingsShell.svelte.d.ts +9 -0
- package/dist/components/admin/SettingsShell.svelte.d.ts.map +1 -0
- package/dist/components/admin/TwoFactorChallengeView.svelte +377 -0
- package/dist/components/admin/TwoFactorChallengeView.svelte.d.ts +11 -0
- package/dist/components/admin/TwoFactorChallengeView.svelte.d.ts.map +1 -0
- package/dist/components/admin/TwoFactorSettings.svelte +436 -0
- package/dist/components/admin/TwoFactorSettings.svelte.d.ts +7 -0
- package/dist/components/admin/TwoFactorSettings.svelte.d.ts.map +1 -0
- package/dist/components/admin/fields/ImageField.svelte +4 -2
- package/dist/components/admin/fields/richtext/PortableTextImageView.svelte +3 -2
- package/dist/components/admin/fields/richtext/RichtextField.svelte +48 -6
- package/dist/components/admin/fields/richtext/RichtextField.svelte.d.ts.map +1 -1
- package/dist/components/layout/sidebar/NavUser.svelte +2 -2
- package/dist/config.d.ts +2 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/email/index.d.ts +1 -0
- package/dist/email/index.d.ts.map +1 -1
- package/dist/email/index.js +2 -0
- package/dist/email/interfaces/email.d.ts +2 -0
- package/dist/email/interfaces/email.d.ts.map +1 -1
- package/dist/email/link-email.d.ts +15 -0
- package/dist/email/link-email.d.ts.map +1 -0
- package/dist/email/link-email.js +30 -0
- package/dist/field-validation/utils.d.ts +29 -0
- package/dist/field-validation/utils.d.ts.map +1 -1
- package/dist/field-validation/utils.js +138 -5
- package/dist/graphql/index.d.ts.map +1 -1
- package/dist/graphql/index.js +1 -1
- package/dist/hooks.d.ts +6 -3
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +53 -17
- package/dist/jobs/recurring.d.ts +4 -1
- package/dist/jobs/recurring.d.ts.map +1 -1
- package/dist/jobs/recurring.js +28 -0
- package/dist/local-api/auth-helpers.d.ts +4 -4
- package/dist/local-api/auth-helpers.js +4 -4
- package/dist/local-api/collection-api.d.ts +10 -1
- package/dist/local-api/collection-api.d.ts.map +1 -1
- package/dist/local-api/collection-api.js +25 -7
- package/dist/local-api/index.d.ts +1 -1
- package/dist/local-api/index.d.ts.map +1 -1
- package/dist/local-api/index.js +7 -5
- package/dist/local-api/types.d.ts +1 -1
- package/dist/preview/perspective.d.ts +1 -1
- package/dist/preview/perspective.js +1 -1
- package/dist/resolve-config.d.ts +22 -0
- package/dist/resolve-config.d.ts.map +1 -0
- package/dist/resolve-config.js +106 -0
- package/dist/routes/assets-cdn.d.ts +7 -2
- package/dist/routes/assets-cdn.d.ts.map +1 -1
- package/dist/routes/assets-cdn.js +1 -1
- package/dist/server/api/index.d.ts +1 -2
- package/dist/server/api/index.d.ts.map +1 -1
- package/dist/server/api/index.js +10 -3
- package/dist/server/api/openapi/registry.d.ts.map +1 -1
- package/dist/server/api/openapi/registry.js +62 -0
- package/dist/server/api/routes/api-keys.d.ts +4 -0
- package/dist/server/api/routes/api-keys.d.ts.map +1 -0
- package/dist/server/api/routes/api-keys.js +88 -0
- package/dist/server/api/routes/documents-by-id.d.ts.map +1 -1
- package/dist/server/api/routes/documents-by-id.js +16 -1
- package/dist/server/api/routes/documents-publish.d.ts.map +1 -1
- package/dist/server/api/routes/documents-publish.js +11 -1
- package/dist/server/api/routes/documents.d.ts.map +1 -1
- package/dist/server/api/routes/documents.js +16 -2
- package/dist/server/api/routes/instance-settings.d.ts +4 -0
- package/dist/server/api/routes/instance-settings.d.ts.map +1 -0
- package/dist/server/api/routes/instance-settings.js +47 -0
- package/dist/server/api/routes/invitations.d.ts +9 -0
- package/dist/server/api/routes/invitations.d.ts.map +1 -0
- package/dist/server/api/routes/invitations.js +79 -0
- package/dist/server/api/routes/organizations-invitations.d.ts +0 -6
- package/dist/server/api/routes/organizations-invitations.d.ts.map +1 -1
- package/dist/server/api/routes/organizations-invitations.js +6 -7
- package/dist/server/api/routes/organizations-team.d.ts.map +1 -1
- package/dist/server/api/routes/organizations-team.js +2 -52
- package/dist/server/api/routes/organizations.d.ts.map +1 -1
- package/dist/server/api/routes/organizations.js +35 -9
- package/dist/server/core-routes.d.ts +8 -0
- package/dist/server/core-routes.d.ts.map +1 -0
- package/dist/server/core-routes.js +67 -0
- package/dist/server/index.d.ts +5 -1
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +7 -1
- package/dist/server/pages/admin.d.ts +24 -0
- package/dist/server/pages/admin.d.ts.map +1 -0
- package/dist/server/pages/admin.js +468 -0
- package/dist/server/queries/organization-team.d.ts +14 -0
- package/dist/server/queries/organization-team.d.ts.map +1 -0
- package/dist/server/queries/organization-team.js +65 -0
- package/dist/server/queries/pending-invitations.d.ts +8 -0
- package/dist/server/queries/pending-invitations.d.ts.map +1 -0
- package/dist/server/queries/pending-invitations.js +24 -0
- package/dist/types/api-key.d.ts +18 -0
- package/dist/types/api-key.d.ts.map +1 -0
- package/dist/types/api-key.js +1 -0
- package/dist/types/auth.d.ts +35 -0
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/capabilities.d.ts +1 -2
- package/dist/types/capabilities.d.ts.map +1 -1
- package/dist/types/config.d.ts +124 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/filters.d.ts +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +1 -0
- package/dist/types/organization.d.ts +1 -1
- package/dist/vite/index.d.ts.map +1 -1
- package/dist/vite/index.js +46 -39
- package/package.json +19 -29
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** Anything interpolated here may be user-controlled, such as a name or organization. */
|
|
2
|
+
function escapeHtml(value) {
|
|
3
|
+
return value
|
|
4
|
+
.replace(/&/g, '&')
|
|
5
|
+
.replace(/</g, '<')
|
|
6
|
+
.replace(/>/g, '>')
|
|
7
|
+
.replace(/"/g, '"')
|
|
8
|
+
.replace(/'/g, ''');
|
|
9
|
+
}
|
|
10
|
+
/** A plain, dependency-free email carrying one link. Apps that care supply their own. */
|
|
11
|
+
export function renderLinkEmail({ subject, greeting, intro, action, url, note }) {
|
|
12
|
+
const opening = greeting
|
|
13
|
+
? `<p style="margin:0 0 16px;font-size:16px;">${escapeHtml(greeting)}</p>`
|
|
14
|
+
: '';
|
|
15
|
+
return {
|
|
16
|
+
text: [...(greeting ? [greeting, ''] : []), intro, '', url, '', note].join('\n'),
|
|
17
|
+
html: `<!doctype html>
|
|
18
|
+
<html>
|
|
19
|
+
<body style="margin:0;padding:24px;background:#f9fafb;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;color:#374151;">
|
|
20
|
+
<div style="max-width:480px;margin:0 auto;background:#ffffff;border-radius:12px;padding:32px;">
|
|
21
|
+
<h1 style="margin:0 0 16px;font-size:24px;color:#1f2937;">${escapeHtml(subject)}</h1>
|
|
22
|
+
${opening}
|
|
23
|
+
<p style="margin:0 0 24px;font-size:16px;">${escapeHtml(intro)}</p>
|
|
24
|
+
<p style="margin:0 0 24px;"><a href="${escapeHtml(url)}" style="display:inline-block;padding:12px 20px;background:#1f2937;border-radius:8px;color:#ffffff;text-decoration:none;font-size:16px;">${escapeHtml(action)}</a></p>
|
|
25
|
+
<p style="margin:0;font-size:14px;color:#6b7280;">${escapeHtml(note)}</p>
|
|
26
|
+
</div>
|
|
27
|
+
</body>
|
|
28
|
+
</html>`
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -63,6 +63,35 @@ export declare function isFieldRequired(field: Field): boolean;
|
|
|
63
63
|
* admin's in-progress edit states don't trip it.
|
|
64
64
|
*/
|
|
65
65
|
export declare function validateValueShape(field: Field, value: unknown): string | null;
|
|
66
|
+
/** One failure, with its full path, so a client can place it without parsing prose. */
|
|
67
|
+
export interface FieldIssue extends FieldErrors {
|
|
68
|
+
/** The full path, e.g. `layout[2].items[0].title`. `field` stays the top-level name. */
|
|
69
|
+
path: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* One entry per failure, with the full path pulled out of the message, so a
|
|
73
|
+
* client can put each error next to its field without parsing prose. `field`
|
|
74
|
+
* stays the top-level name it has always been.
|
|
75
|
+
*/
|
|
76
|
+
export declare function toFieldIssues(errors: FieldErrors[]): FieldIssue[];
|
|
77
|
+
export interface HumanizeOptions {
|
|
78
|
+
/** The top-level field the message is about, for its title and nested titles. */
|
|
79
|
+
field?: Field;
|
|
80
|
+
/** Its name, when the field itself isn't at hand. */
|
|
81
|
+
fieldName?: string;
|
|
82
|
+
/** The field's current value, to name array items by their type. */
|
|
83
|
+
value?: unknown;
|
|
84
|
+
/** Registered schemas, to title named item types (`{ type: 'cta' }`). */
|
|
85
|
+
schemas?: SchemaType[];
|
|
86
|
+
/** Keep the field's own title. Off for a message shown directly under that field. */
|
|
87
|
+
includeRoot?: boolean;
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* A validator message as a sentence for a non-technical editor:
|
|
91
|
+
* `Field "layout[2].items[0].title" Required` becomes
|
|
92
|
+
* "Layout › FAQ (item 3) › Question (item 1) › Title: This is required."
|
|
93
|
+
*/
|
|
94
|
+
export declare function humanizeValidationMessage(message: string, options?: HumanizeOptions): string;
|
|
66
95
|
/**
|
|
67
96
|
* Validate a field value against its validation rules
|
|
68
97
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/field-validation/utils.ts"],"names":[],"mappings":"AAAA,OAAO,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F;IACrF,WAAW,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,eAAoB,GAAG,MAAM,CAiBhG;AAwND;;GAEG;AACH,wBAAsB,aAAa,CAClC,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,GAAG,EACV,OAAO,GAAE,GAAQ,GACf,OAAO,CAAC;IACV,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,eAAe,EAAE,CAAC;CAC1B,CAAC,CAgLD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,CAO/D;AAkFD;;;;;;;;;;;;;GAaG;AACH,wBAAsB,oBAAoB,CACzC,MAAM,EAAE,UAAU,EAClB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,OAAO,GAAE,yBAA8B,GACrC,OAAO,CAAC,wBAAwB,CAAC,CA2BnC"}
|
|
@@ -130,6 +130,133 @@ function splitFieldMessage(message) {
|
|
|
130
130
|
? { path: match[1] ?? null, reason: match[2] ?? message }
|
|
131
131
|
: { path: null, reason: message };
|
|
132
132
|
}
|
|
133
|
+
/**
|
|
134
|
+
* One entry per failure, with the full path pulled out of the message, so a
|
|
135
|
+
* client can put each error next to its field without parsing prose. `field`
|
|
136
|
+
* stays the top-level name it has always been.
|
|
137
|
+
*/
|
|
138
|
+
export function toFieldIssues(errors) {
|
|
139
|
+
return errors.flatMap((entry) => entry.errors.map((message) => {
|
|
140
|
+
const { path, reason } = splitFieldMessage(message);
|
|
141
|
+
return { field: entry.field, path: path ?? entry.field, errors: [reason], kind: entry.kind };
|
|
142
|
+
}));
|
|
143
|
+
}
|
|
144
|
+
/** "teamGridBlock" -> "Team grid block", for anything without a schema title. */
|
|
145
|
+
function humanizeName(name) {
|
|
146
|
+
const words = name
|
|
147
|
+
.replace(/[_-]+/g, ' ')
|
|
148
|
+
.replace(/([a-z0-9])([A-Z])/g, '$1 $2')
|
|
149
|
+
.trim()
|
|
150
|
+
.toLowerCase();
|
|
151
|
+
return words.charAt(0).toUpperCase() + words.slice(1);
|
|
152
|
+
}
|
|
153
|
+
const WRONG_KIND = {
|
|
154
|
+
string: 'text',
|
|
155
|
+
number: 'a number',
|
|
156
|
+
boolean: 'yes or no',
|
|
157
|
+
array: 'a list',
|
|
158
|
+
object: 'a group of fields'
|
|
159
|
+
};
|
|
160
|
+
/** Item types whose type name says nothing to an editor, so an item is just "Item 3". */
|
|
161
|
+
const UNTITLED_ITEM_TYPES = new Set([
|
|
162
|
+
'string',
|
|
163
|
+
'text',
|
|
164
|
+
'number',
|
|
165
|
+
'boolean',
|
|
166
|
+
'url',
|
|
167
|
+
'reference',
|
|
168
|
+
'image',
|
|
169
|
+
'file'
|
|
170
|
+
]);
|
|
171
|
+
/**
|
|
172
|
+
* One validator reason in words an editor can act on. The validator's own text
|
|
173
|
+
* stays as it is, because API clients and agents need the exact shape it names;
|
|
174
|
+
* this is only the rendering for a person. A schema's own `Rule` messages are
|
|
175
|
+
* already written for people and pass through untouched.
|
|
176
|
+
*/
|
|
177
|
+
function plainReason(reason) {
|
|
178
|
+
const text = reason.trim();
|
|
179
|
+
if (text === 'Required')
|
|
180
|
+
return 'This is required.';
|
|
181
|
+
const kind = text.match(/^expected an? (string|number|boolean|array|object), got /);
|
|
182
|
+
if (kind?.[1]) {
|
|
183
|
+
return `This has the wrong kind of value (it should be ${WRONG_KIND[kind[1]]}). Clear it and enter it again.`;
|
|
184
|
+
}
|
|
185
|
+
if (/^expected a reference object/.test(text)) {
|
|
186
|
+
return 'This link to another item is broken. Remove it and choose the item again.';
|
|
187
|
+
}
|
|
188
|
+
const asset = text.match(/^expected an? (image|file) object/) ?? text.match(/^(image|file) asset must be/);
|
|
189
|
+
if (asset?.[1])
|
|
190
|
+
return `This ${asset[1]} couldn't be read. Remove it and choose it again.`;
|
|
191
|
+
if (/is missing a "_type"|which is not one of the declared array item types/.test(text)) {
|
|
192
|
+
return "This item's type isn't recognised, usually because it was made with an older version of the site. Remove it and add it again.";
|
|
193
|
+
}
|
|
194
|
+
if (/^Unknown field "/.test(text)) {
|
|
195
|
+
return "This holds old data from a field that no longer exists. It can't be fixed here, so please ask your web team to clear it.";
|
|
196
|
+
}
|
|
197
|
+
if (/^"(style|listItem|level|children|markDefs)" must be|^child\[\d+\]|^markDefs\[\d+\]|Portable Text|"_key"/.test(text)) {
|
|
198
|
+
return "Part of this text has formatting the editor can't read. Delete that paragraph and type it again.";
|
|
199
|
+
}
|
|
200
|
+
return text;
|
|
201
|
+
}
|
|
202
|
+
/** The fields an object field or inline item declares, if any. */
|
|
203
|
+
function childFields(field) {
|
|
204
|
+
return field && 'fields' in field && Array.isArray(field.fields) ? field.fields : [];
|
|
205
|
+
}
|
|
206
|
+
/** The item types an array field declares, if it is one. */
|
|
207
|
+
function itemTypes(field) {
|
|
208
|
+
return field?.type === 'array' ? field.of : undefined;
|
|
209
|
+
}
|
|
210
|
+
/** `layout[2].items[0].title` as the titles an editor sees on screen. */
|
|
211
|
+
function describePath(tokens, field, value, schemas) {
|
|
212
|
+
const labels = [];
|
|
213
|
+
let fields = field ? [field] : [];
|
|
214
|
+
let of;
|
|
215
|
+
let current = field ? { [field.name]: value } : undefined;
|
|
216
|
+
for (const token of tokens) {
|
|
217
|
+
if (typeof token === 'number') {
|
|
218
|
+
const item = Array.isArray(current) ? current[token] : undefined;
|
|
219
|
+
const ref = of ? resolveArrayItemTypeRef(of, item) : undefined;
|
|
220
|
+
const registered = ref && !ref.fields ? schemas.find((schema) => schema.name === ref.type) : undefined;
|
|
221
|
+
const named = ref && !UNTITLED_ITEM_TYPES.has(ref.type) ? humanizeName(ref.name ?? ref.type) : undefined;
|
|
222
|
+
const title = ref?.title ?? registered?.title ?? named;
|
|
223
|
+
labels.push(title ? `${title} (item ${token + 1})` : `Item ${token + 1}`);
|
|
224
|
+
fields = ref?.fields ?? registered?.fields ?? [];
|
|
225
|
+
of = undefined;
|
|
226
|
+
current = item;
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
const found = fields.find((candidate) => candidate.name === token);
|
|
230
|
+
labels.push(found?.title ?? humanizeName(token));
|
|
231
|
+
fields = childFields(found);
|
|
232
|
+
of = itemTypes(found);
|
|
233
|
+
current = isPlainObject(current) ? current[token] : undefined;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return labels;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* A validator message as a sentence for a non-technical editor:
|
|
240
|
+
* `Field "layout[2].items[0].title" Required` becomes
|
|
241
|
+
* "Layout › FAQ (item 3) › Question (item 1) › Title: This is required."
|
|
242
|
+
*/
|
|
243
|
+
export function humanizeValidationMessage(message, options = {}) {
|
|
244
|
+
const { field, fieldName, value, schemas = [], includeRoot = false } = options;
|
|
245
|
+
const { path, reason } = splitFieldMessage(message);
|
|
246
|
+
// The one '; ' the validator writes inside a single reason is this suffix.
|
|
247
|
+
const parts = reason.split('; ').filter((part) => !part.startsWith('declared array item types:'));
|
|
248
|
+
const plain = [...new Set(parts.map(plainReason))].join(' ');
|
|
249
|
+
const root = field?.name ?? fieldName;
|
|
250
|
+
const tokens = path
|
|
251
|
+
? [...path.matchAll(/\[(\d+)\]|[^.[\]]+/g)].map((match) => match[1] === undefined ? match[0] : Number(match[1]))
|
|
252
|
+
: root
|
|
253
|
+
? [root]
|
|
254
|
+
: [];
|
|
255
|
+
const labels = describePath(tokens, field, value, schemas);
|
|
256
|
+
if (!includeRoot)
|
|
257
|
+
labels.shift();
|
|
258
|
+
return labels.length > 0 ? `${labels.join(' › ')}: ${plain}` : plain;
|
|
259
|
+
}
|
|
133
260
|
/**
|
|
134
261
|
* Shape-check a single Portable Text text block (`_type: 'block'`) — `_key`, `children`
|
|
135
262
|
* (spans and/or inline objects), and `markDefs` all need to be the shape
|
|
@@ -335,11 +462,17 @@ export async function validateField(field, value, context = {}) {
|
|
|
335
462
|
if (field.type === 'object' && isPlainObject(value) && Array.isArray(field.fields)) {
|
|
336
463
|
const nested = await validateFieldSet(field.fields, value, context);
|
|
337
464
|
for (const err of nested) {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
465
|
+
// Split rather than wrap: a child that is itself an array or object has
|
|
466
|
+
// already formatted its message, and wrapping that again produced
|
|
467
|
+
// `Field "seo.actions" Field "actions[0].text" Required`.
|
|
468
|
+
for (const rawMessage of err.errors) {
|
|
469
|
+
const { path, reason } = splitFieldMessage(rawMessage);
|
|
470
|
+
allErrors.push({
|
|
471
|
+
level: 'error',
|
|
472
|
+
message: `Field "${field.name}.${path ?? err.field}" ${reason}`,
|
|
473
|
+
kind: err.kind
|
|
474
|
+
});
|
|
475
|
+
}
|
|
343
476
|
}
|
|
344
477
|
}
|
|
345
478
|
// Array items are never validated by the shape check above (it only confirms
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/graphql/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/graphql/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAQlD,MAAM,WAAW,aAAa;IAC7B,kBAAkB,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC3C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,oBAAoB;IACpC,OAAO,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;IAC/D,QAAQ,EAAE,eAAe,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAsB,oBAAoB,CACzC,GAAG,EAAE,YAAY,EACjB,WAAW,EAAE,UAAU,EAAE,EACzB,OAAO,GAAE,aAAkB,GACzB,OAAO,CAAC,oBAAoB,CAAC,CAgG/B"}
|
package/dist/graphql/index.js
CHANGED
|
@@ -42,7 +42,7 @@ export async function createGraphQLHandler(cms, schemaTypes, options = {}) {
|
|
|
42
42
|
fetchAPI: { Response },
|
|
43
43
|
context: async (event) => {
|
|
44
44
|
// Extract auth and localAPI from event.locals (set by auth hook)
|
|
45
|
-
const auth = event.locals.
|
|
45
|
+
const auth = event.locals.aphexAuth;
|
|
46
46
|
const localAPI = event.locals.aphexCMS?.localAPI;
|
|
47
47
|
if (!auth || auth.type === 'partial_session') {
|
|
48
48
|
throw new Error('Unauthorized: Authentication required for GraphQL');
|
package/dist/hooks.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Handle } from '@sveltejs/kit';
|
|
2
2
|
import type { Hono } from 'hono';
|
|
3
|
-
import type { CMSConfig } from './types/index.js';
|
|
3
|
+
import type { CMSConfig, CMSConfigInput } from './types/index.js';
|
|
4
4
|
import type { DatabaseAdapter } from './db/index.js';
|
|
5
5
|
import type { AssetService } from './services/asset-service.js';
|
|
6
6
|
import type { StorageAdapter } from './storage/interfaces/storage.js';
|
|
7
7
|
import type { EmailAdapter } from './email/index.js';
|
|
8
8
|
import type { AIProviderAdapter } from './ai/index.js';
|
|
9
9
|
import type { AuthProvider } from './auth/provider.js';
|
|
10
|
+
import type { AuthFeatures } from './types/auth.js';
|
|
10
11
|
import type { GraphQLSettings } from './graphql/index.js';
|
|
11
12
|
import type { Logger } from './utils/logger.js';
|
|
12
13
|
import { RolesService } from './services/roles-service.js';
|
|
@@ -29,6 +30,8 @@ export interface CMSInstances {
|
|
|
29
30
|
pluginSettingsService: PluginSettingsService;
|
|
30
31
|
logger: Logger;
|
|
31
32
|
auth?: AuthProvider;
|
|
33
|
+
/** Auth feature flags the admin UI branches on, from `config.auth.features`. */
|
|
34
|
+
authFeatures?: AuthFeatures;
|
|
32
35
|
graphqlSettings?: GraphQLSettings | null;
|
|
33
36
|
apiApp: Hono<AphexEnv>;
|
|
34
37
|
/** Indexed plugin parts (routes, document actions, admin tools, field components). */
|
|
@@ -44,6 +47,6 @@ export interface CMSInstances {
|
|
|
44
47
|
* share the same cms-core instance through Vite's module graph, so this
|
|
45
48
|
* setter mutates the same `activeConfig` the hook reads on each request.
|
|
46
49
|
*/
|
|
47
|
-
export declare function __notifyAphexConfigChanged(newConfig:
|
|
48
|
-
export declare function createCMSHook(config:
|
|
50
|
+
export declare function __notifyAphexConfigChanged(newConfig: CMSConfigInput): void;
|
|
51
|
+
export declare function createCMSHook(config: CMSConfigInput): Handle;
|
|
49
52
|
//# sourceMappingURL=hooks.d.ts.map
|
package/dist/hooks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/lib/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../src/lib/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,MAAM,CAAC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AY,CAAC;IAC3B,uEAAuE;IACvE,qBAAqB,EAAE,qBAAqB,CAAC;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,gFAAgF;IAChF,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACzC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvB,sFAAsF;IACtF,YAAY,EAAE,YAAY,CAAC;CAC3B;AAsCD;;;;;;;;;GASG;AACH,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAG1E;AAgBD,wBAAgB,aAAa,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CA2P5D"}
|
package/dist/hooks.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { isBuilding, resolveCMSConfig } from './resolve-config.js';
|
|
1
2
|
import { handleAuthHook } from './auth/auth-hooks.js';
|
|
3
|
+
import { serveCoreRoute } from './server/core-routes.js';
|
|
2
4
|
import { getPreviewPerspective } from './preview/perspective.js';
|
|
3
5
|
import { resolveCapabilities } from './types/capabilities.js';
|
|
4
6
|
import { cmsLogger, setLogLevel, setLogger } from './utils/logger.js';
|
|
@@ -83,7 +85,7 @@ export function createCMSHook(config) {
|
|
|
83
85
|
return async ({ event, resolve }) => {
|
|
84
86
|
// Use the latest config that the HMR plugin handed us; falls back to
|
|
85
87
|
// the one captured at hook construction time.
|
|
86
|
-
const
|
|
88
|
+
const declaredConfig = activeConfig ?? config;
|
|
87
89
|
// Note: In dev mode, /storage/ might be accessible via Vite dev server
|
|
88
90
|
// In production, only /static/ folder is served - /storage/ is private
|
|
89
91
|
// Initialize CMS instances once at application startup
|
|
@@ -107,6 +109,17 @@ export function createCMSHook(config) {
|
|
|
107
109
|
let resolveInit;
|
|
108
110
|
initPromise = new Promise((r) => (resolveInit = r));
|
|
109
111
|
cmsLogger.info('[CMS]', 'Initializing...');
|
|
112
|
+
let currentConfig;
|
|
113
|
+
try {
|
|
114
|
+
currentConfig = await resolveCMSConfig(declaredConfig);
|
|
115
|
+
}
|
|
116
|
+
catch (error) {
|
|
117
|
+
// Release the lock, or every later request waits on it forever instead of
|
|
118
|
+
// retrying once the database is reachable.
|
|
119
|
+
initPromise = null;
|
|
120
|
+
resolveInit();
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
110
123
|
const databaseAdapter = currentConfig.database;
|
|
111
124
|
// Use the storage adapter from config, or create the default local one.
|
|
112
125
|
const storageAdapter = currentConfig.storage ?? createDefaultStorageAdapter();
|
|
@@ -148,7 +161,14 @@ export function createCMSHook(config) {
|
|
|
148
161
|
await cmsEngine.initialize();
|
|
149
162
|
}
|
|
150
163
|
catch (error) {
|
|
151
|
-
|
|
164
|
+
// The build doesn't migrate, so a page prerendered without a provisioned
|
|
165
|
+
// database lands here. That's fine unless the page reads content.
|
|
166
|
+
if (await isBuilding()) {
|
|
167
|
+
cmsLogger.warn('[CMS]', 'No provisioned database during this build, so prerendered pages cannot read content.');
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
cmsLogger.error('[CMS]', 'Failed to initialize:', error);
|
|
171
|
+
}
|
|
152
172
|
schemaError = error instanceof Error ? error : new Error(String(error));
|
|
153
173
|
}
|
|
154
174
|
// Initialize built-in GraphQL (enabled by default, opt-out with graphql: false)
|
|
@@ -204,6 +224,7 @@ export function createCMSHook(config) {
|
|
|
204
224
|
pluginSettingsService,
|
|
205
225
|
logger: cmsLogger,
|
|
206
226
|
auth: currentConfig.auth?.provider,
|
|
227
|
+
authFeatures: currentConfig.auth?.features,
|
|
207
228
|
graphqlSettings,
|
|
208
229
|
apiApp,
|
|
209
230
|
partResolver
|
|
@@ -227,21 +248,36 @@ export function createCMSHook(config) {
|
|
|
227
248
|
}
|
|
228
249
|
// Inject shared CMS services into locals (reuse singleton instances)
|
|
229
250
|
event.locals.aphexCMS = cmsInstances;
|
|
230
|
-
//
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
251
|
+
// A prerendered page has no visitor: nobody to authenticate, and SvelteKit throws if
|
|
252
|
+
// the URL's query string is read. It renders published content only.
|
|
253
|
+
if (await isBuilding()) {
|
|
254
|
+
event.locals.previewPerspective = 'published';
|
|
255
|
+
return resolve(event);
|
|
235
256
|
}
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
257
|
+
const instances = cmsInstances;
|
|
258
|
+
const runCMS = async (event, options) => {
|
|
259
|
+
// Auth protection if configured
|
|
260
|
+
if (instances.auth) {
|
|
261
|
+
const authResponse = await handleAuthHook(event, instances.config, instances.auth, instances.databaseAdapter, instances.rolesService);
|
|
262
|
+
if (authResponse)
|
|
263
|
+
return authResponse;
|
|
264
|
+
}
|
|
265
|
+
// Resolve the read perspective once per request so site loads inherit it
|
|
266
|
+
// (published normally / draft in an authenticated `?aphex-preview` session)
|
|
267
|
+
// via `locals.previewPerspective` — no per-load wiring. Apps can override the
|
|
268
|
+
// policy with `config.preview.resolvePerspective`.
|
|
269
|
+
event.locals.previewPerspective =
|
|
270
|
+
instances.config.preview?.resolvePerspective?.({
|
|
271
|
+
auth: event.locals.aphexAuth,
|
|
272
|
+
url: event.url
|
|
273
|
+
}) ?? getPreviewPerspective(event.locals.aphexAuth, event.url);
|
|
274
|
+
return (await serveCoreRoute(event)) ?? resolve(event, options);
|
|
275
|
+
};
|
|
276
|
+
// Let the auth provider answer its own routes first. Those requests never
|
|
277
|
+
// reach the CMS's auth checks, which is what lets an unauthenticated sign-in
|
|
278
|
+
// through.
|
|
279
|
+
return instances.auth?.handle
|
|
280
|
+
? instances.auth.handle({ event, resolve: runCMS })
|
|
281
|
+
: runCMS(event);
|
|
246
282
|
};
|
|
247
283
|
}
|
package/dist/jobs/recurring.d.ts
CHANGED
|
@@ -73,6 +73,9 @@ export interface ScheduleNextTickOptions {
|
|
|
73
73
|
* Note the interval is measured from `from` (now by default), not from the tick's
|
|
74
74
|
* scheduled time — so a chain that falls behind spaces out rather than trying to
|
|
75
75
|
* catch up with a burst.
|
|
76
|
+
*
|
|
77
|
+
* When a live tick already exists for this type, that job is returned and nothing
|
|
78
|
+
* is inserted: a chain has exactly one successor.
|
|
76
79
|
*/
|
|
77
|
-
export declare function scheduleNextTick(adapter:
|
|
80
|
+
export declare function scheduleNextTick(adapter: RecurringJobScheduler, job: Job, options: ScheduleNextTickOptions): Promise<Job>;
|
|
78
81
|
//# sourceMappingURL=recurring.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recurring.d.ts","sourceRoot":"","sources":["../../src/lib/jobs/recurring.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC/D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE3C;;;;;;GAMG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,CAAC,CAAC;AAEtF,MAAM,WAAW,yBAAyB;IACzC,cAAc,EAAE,MAAM,CAAC;IACvB,6FAA6F;IAC7F,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,wBAAwB;IACxC,iFAAiF;IACjF,KAAK,EAAE,OAAO,CAAC;IACf,uFAAuF;IACvF,GAAG,EAAE,GAAG,CAAC;CACT;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,kBAAkB,CACvC,OAAO,EAAE,q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AE,MAAM,CAAC;IACnB,kFAAkF;IAClF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,4FAA4F;IAC5F,IAAI,CAAC,EAAE,IAAI,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,gBAAgB,CACrC,OAAO,EAAE,qBAAqB,EAC9B,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,uBAAuB,GAC9B,OAAO,CAAC,GAAG,CAAC,CAkCd"}
|
package/dist/jobs/recurring.js
CHANGED
|
@@ -56,8 +56,36 @@ export async function ensureRecurringJob(adapter, options) {
|
|
|
56
56
|
* Note the interval is measured from `from` (now by default), not from the tick's
|
|
57
57
|
* scheduled time — so a chain that falls behind spaces out rather than trying to
|
|
58
58
|
* catch up with a burst.
|
|
59
|
+
*
|
|
60
|
+
* When a live tick already exists for this type, that job is returned and nothing
|
|
61
|
+
* is inserted: a chain has exactly one successor.
|
|
59
62
|
*/
|
|
60
63
|
export async function scheduleNextTick(adapter, job, options) {
|
|
64
|
+
// A chain has exactly one live tick. Anything else pending or leased for this
|
|
65
|
+
// type *is* the next tick, so inserting another forks the chain, and a fork is
|
|
66
|
+
// permanent, because both halves go on rescheduling forever.
|
|
67
|
+
//
|
|
68
|
+
// The case that bites is a retry. A handler that reschedules in `finally` looks
|
|
69
|
+
// careful: a failed run still queues its successor. But the queue retries the
|
|
70
|
+
// *same row*, so the successor already exists, and every failed attempt adds a
|
|
71
|
+
// parallel chain. With the default budget one bad run multiplies the schedule
|
|
72
|
+
// fivefold, silently. A two-hour upstream outage took one hourly sync to 125
|
|
73
|
+
// runs an hour.
|
|
74
|
+
//
|
|
75
|
+
// Checking here rather than asking handlers to get it right also covers the
|
|
76
|
+
// other ways to double up: a handler that reschedules *and* calls
|
|
77
|
+
// `ensureRecurringJob`, or two workers racing the same tick.
|
|
78
|
+
const live = await adapter.listJobs({
|
|
79
|
+
organizationId: job.organizationId,
|
|
80
|
+
type: job.type,
|
|
81
|
+
status: ['pending', 'leased'],
|
|
82
|
+
// Not 1: this job is itself leased while its handler runs, so it comes back
|
|
83
|
+
// in its own query and a limit of 1 could return nothing else.
|
|
84
|
+
limit: 5
|
|
85
|
+
});
|
|
86
|
+
const successor = live.items.find((existing) => existing.id !== job.id);
|
|
87
|
+
if (successor)
|
|
88
|
+
return successor;
|
|
61
89
|
const base = options.from ?? new Date();
|
|
62
90
|
return adapter.scheduleJob({
|
|
63
91
|
organizationId: job.organizationId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Auth } from '../types/auth.js';
|
|
2
2
|
import type { LocalAPIContext } from './types.js';
|
|
3
3
|
/**
|
|
4
|
-
* Convert SvelteKit locals.
|
|
4
|
+
* Convert SvelteKit locals.aphexAuth to LocalAPIContext
|
|
5
5
|
*
|
|
6
6
|
* This helper bridges the gap between the authentication system
|
|
7
7
|
* (handled in the app layer and enriched by handleAuthHook) and
|
|
@@ -10,7 +10,7 @@ import type { LocalAPIContext } from './types.js';
|
|
|
10
10
|
* Preserves the full Auth object in context.auth so custom permission
|
|
11
11
|
* logic can access any custom fields added via module augmentation.
|
|
12
12
|
*
|
|
13
|
-
* @param auth - Auth object from locals.
|
|
13
|
+
* @param auth - Auth object from locals.aphexAuth (already validated by handleAuthHook)
|
|
14
14
|
* @returns LocalAPIContext for use with LocalAPI operations
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
@@ -20,7 +20,7 @@ import type { LocalAPIContext } from './types.js';
|
|
|
20
20
|
*
|
|
21
21
|
* export const GET: RequestHandler = async ({ locals }) => {
|
|
22
22
|
* const api = locals.aphexCMS.localAPI;
|
|
23
|
-
* const context = authToContext(locals.
|
|
23
|
+
* const context = authToContext(locals.aphexAuth);
|
|
24
24
|
*
|
|
25
25
|
* const pages = await api.collections.page.find(context, {
|
|
26
26
|
* where: { status: { equals: 'published' } }
|
|
@@ -35,7 +35,7 @@ export declare function authToContext(auth: Auth | null | undefined): LocalAPICo
|
|
|
35
35
|
* Check if auth exists and convert to context
|
|
36
36
|
* Alias for authToContext - more semantic in some contexts
|
|
37
37
|
*
|
|
38
|
-
* @param auth - Auth object from locals.
|
|
38
|
+
* @param auth - Auth object from locals.aphexAuth
|
|
39
39
|
* @returns LocalAPIContext
|
|
40
40
|
* @throws Error if auth is missing or invalid
|
|
41
41
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
//
|
|
3
3
|
// Helper utilities to convert between Auth types and LocalAPIContext
|
|
4
4
|
/**
|
|
5
|
-
* Convert SvelteKit locals.
|
|
5
|
+
* Convert SvelteKit locals.aphexAuth to LocalAPIContext
|
|
6
6
|
*
|
|
7
7
|
* This helper bridges the gap between the authentication system
|
|
8
8
|
* (handled in the app layer and enriched by handleAuthHook) and
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* Preserves the full Auth object in context.auth so custom permission
|
|
12
12
|
* logic can access any custom fields added via module augmentation.
|
|
13
13
|
*
|
|
14
|
-
* @param auth - Auth object from locals.
|
|
14
|
+
* @param auth - Auth object from locals.aphexAuth (already validated by handleAuthHook)
|
|
15
15
|
* @returns LocalAPIContext for use with LocalAPI operations
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*
|
|
22
22
|
* export const GET: RequestHandler = async ({ locals }) => {
|
|
23
23
|
* const api = locals.aphexCMS.localAPI;
|
|
24
|
-
* const context = authToContext(locals.
|
|
24
|
+
* const context = authToContext(locals.aphexAuth);
|
|
25
25
|
*
|
|
26
26
|
* const pages = await api.collections.page.find(context, {
|
|
27
27
|
* where: { status: { equals: 'published' } }
|
|
@@ -66,7 +66,7 @@ export function authToContext(auth) {
|
|
|
66
66
|
* Check if auth exists and convert to context
|
|
67
67
|
* Alias for authToContext - more semantic in some contexts
|
|
68
68
|
*
|
|
69
|
-
* @param auth - Auth object from locals.
|
|
69
|
+
* @param auth - Auth object from locals.aphexAuth
|
|
70
70
|
* @returns LocalAPIContext
|
|
71
71
|
* @throws Error if auth is missing or invalid
|
|
72
72
|
*/
|
|
@@ -8,7 +8,7 @@ import type { Document } from '../types/document.js';
|
|
|
8
8
|
import type { LocalAPIContext } from './types.js';
|
|
9
9
|
import type { SchemaType } from '../types/schemas.js';
|
|
10
10
|
import { PermissionChecker } from './permissions.js';
|
|
11
|
-
import { type DocumentValidationResult, type FieldErrors } from '../field-validation/utils.js';
|
|
11
|
+
import { type DocumentValidationResult, type FieldErrors, type FieldIssue } from '../field-validation/utils.js';
|
|
12
12
|
import type { AppendEventInput, Job } from '../types/events.js';
|
|
13
13
|
/**
|
|
14
14
|
* Result from create/update operations that includes validation
|
|
@@ -41,6 +41,15 @@ export declare class DocumentValidationError extends Error {
|
|
|
41
41
|
readonly errors: FieldErrors[];
|
|
42
42
|
constructor(message: string, errors: FieldErrors[]);
|
|
43
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* A publish refused because the document isn't finished. Carries one issue per
|
|
46
|
+
* failure with its full path (`issues`), so the editor can name the field in words
|
|
47
|
+
* and an API client can place each error without parsing `message`.
|
|
48
|
+
*/
|
|
49
|
+
export declare class PublishValidationError extends Error {
|
|
50
|
+
readonly issues: FieldIssue[];
|
|
51
|
+
constructor(message: string, issues: FieldIssue[]);
|
|
52
|
+
}
|
|
44
53
|
/**
|
|
45
54
|
* Subset of CollectionAPI methods that are valid on a singleton schema.
|
|
46
55
|
* Codegen emits this type for singleton entries in the Collections interface
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection-api.d.ts","sourceRoot":"","sources":["../../src/lib/local-api/collection-api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;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