magic-editor-x 2.5.0 → 2.5.2
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/CHANGELOG.md +24 -0
- package/README.md +21 -66
- package/dist/server/index.js +5 -2
- package/dist/server/index.mjs +5 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.5.2](https://github.com/Schero94/Magic-Editor-X/compare/v2.5.1...v2.5.2) (2026-11-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* **link-check:** show the next scheduled run on Strapi before 5.61 ([#13](https://github.com/Schero94/Magic-Editor-X/issues/13)) ([2228217](https://github.com/Schero94/Magic-Editor-X/commit/22282172f528840747a6f867546ab6d0c176af64))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Settings > Configuration shows the next run of the scheduled link check on Strapi 5.38 to 5.60 again. Those releases schedule cron jobs with node-schedule, whose next run is a cron-parser date object instead of a `Date`, so `nextRunAt` was always empty there.
|
|
14
|
+
|
|
15
|
+
## [2.5.1](https://github.com/Schero94/Magic-Editor-X/compare/v2.5.0...v2.5.1) (2026-11-17)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **readme:** make images and links work on the Strapi marketplace ([#12](https://github.com/Schero94/Magic-Editor-X/issues/12)) ([85a95eb](https://github.com/Schero94/Magic-Editor-X/commit/85a95eb620ef8609de691f766cabf97bceaba7b4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- The README now works outside GitHub, on npm and on the Strapi marketplace: images load from the docs site (absolute URLs) and links to the license, guides, security reviews and other repository files point to GitHub instead of relative paths that led nowhere. The Screenshots section shows eight chosen screens and links the full gallery on the docs site instead of 61 images. A test fails on any relative image or link in the README and caps the number of screenshots.
|
|
26
|
+
|
|
3
27
|
# [2.5.0](https://github.com/Schero94/Magic-Editor-X/compare/v2.4.0...v2.5.0) (2026-11-16)
|
|
4
28
|
|
|
5
29
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<img src="https://
|
|
2
|
+
<img src="https://schero94.github.io/Magic-Editor-X/img/icon.svg" alt="Magic Editor X" width="96" height="96" />
|
|
3
3
|
</p>
|
|
4
4
|
|
|
5
5
|
# Magic Editor X
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
Block editor for Strapi 5: an [Editor.js](https://editorjs.io/) custom field with Media Library uploads, custom blocks, templates, tables with merged cells, math and footnotes, comments on blocks and on selected text with @mentions, block suggestions, version history, an audit trail, live collaboration across several servers, rendered Content API and GraphQL output, React and Vue components, and optional AI and grammar assistants that use your own provider. Free and open source under the MIT license.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/magic-editor-x)
|
|
10
|
-
[](
|
|
10
|
+
[](https://github.com/Schero94/Magic-Editor-X/blob/main/LICENSE)
|
|
11
11
|
|
|
12
12
|
Live docs: <https://schero94.github.io/Magic-Editor-X/>
|
|
13
13
|
|
|
@@ -102,59 +102,14 @@ Every feature is available in every installation. There is nothing to activate,
|
|
|
102
102
|
|
|
103
103
|
## Screenshots
|
|
104
104
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|  |  |
|
|
114
|
-
|  |  |
|
|
115
|
-
|  |  |
|
|
116
|
-
|
|
117
|
-
New in 2.3:
|
|
118
|
-
|
|
119
|
-
| | |
|
|
120
|
-
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
121
|
-
|  |  |
|
|
122
|
-
|  |  |
|
|
123
|
-
|  |  |
|
|
124
|
-
|  |  |
|
|
125
|
-
|  |  |
|
|
126
|
-
|  |  |
|
|
127
|
-
|  |  |
|
|
128
|
-
|  |  |
|
|
129
|
-
|
|
130
|
-
| | | |
|
|
131
|
-
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------- | ----------------------------------------------------------------- |
|
|
132
|
-
|  |  |  |
|
|
133
|
-
|
|
134
|
-
New in 2.4:
|
|
135
|
-
|
|
136
|
-
| | |
|
|
137
|
-
| ---------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
138
|
-
|  |  |
|
|
139
|
-
|  |  |
|
|
140
|
-
|  |  |
|
|
141
|
-
|  |  |
|
|
142
|
-
|  |  |
|
|
143
|
-
|  |  |
|
|
144
|
-
|  |  |
|
|
145
|
-
|  |  |
|
|
146
|
-
|
|
147
|
-
New in 2.5:
|
|
148
|
-
|
|
149
|
-
| | |
|
|
150
|
-
| ---------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
151
|
-
|  |  |
|
|
152
|
-
|  |  |
|
|
153
|
-
|  |  |
|
|
154
|
-
|  |  |
|
|
155
|
-
|  |  |
|
|
156
|
-
|
|
157
|
-
All screenshots use synthetic data (acceptance host: Strapi 5.61.1).
|
|
105
|
+
| | |
|
|
106
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
107
|
+
|  |  |
|
|
108
|
+
|  |  |
|
|
109
|
+
|  |  |
|
|
110
|
+
|  |  |
|
|
111
|
+
|
|
112
|
+
All screenshots use synthetic data (acceptance host: Strapi 5.61.1). Every screen, from tables, math and footnotes to suggestions, templates and the AI assistant, is in the [full gallery on the docs site](https://schero94.github.io/Magic-Editor-X/#screens).
|
|
158
113
|
|
|
159
114
|
## Core concepts
|
|
160
115
|
|
|
@@ -208,7 +163,7 @@ All screenshots use synthetic data (acceptance host: Strapi 5.61.1).
|
|
|
208
163
|
- The admin uses the React, React Router, react-intl, styled-components and Design System versions of the Strapi admin (React 18, Design System 2.2.4 in Strapi 5.61, 2.3.1 in 5.62).
|
|
209
164
|
- Dropping files onto a field uses the Media Library drop zone that Strapi registers from 5.61; with an older Strapi or the legacy Media Library (`useLegacyMediaLibrary`) Editor.js keeps its own file drop.
|
|
210
165
|
- Console messages you may see in the admin that come from Strapi itself, not from the plugin: the `useRBAC` deprecation warning, React Router future-flag warnings, the styled-components `attribute` prop warning, and the upgrade check to api.github.com when outgoing requests are blocked.
|
|
211
|
-
- The editor uses Editor.js 2.31.7. Editor.js 2.32.0 is still a release candidate on npm (`2.32.0-rc.3` on the `next` tag, checked 2026-11-12) and is not used. Why the plugin stays on Editor.js is explained in [docs/engine-decision.md](
|
|
166
|
+
- The editor uses Editor.js 2.31.7. Editor.js 2.32.0 is still a release candidate on npm (`2.32.0-rc.3` on the `next` tag, checked 2026-11-12) and is not used. Why the plugin stays on Editor.js is explained in [docs/engine-decision.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/engine-decision.md).
|
|
212
167
|
- Formulas are rendered with Temml 0.14 (MIT), loaded by the admin only when a field shows math.
|
|
213
168
|
- `magic-editor-x/react` works with React 18 and 19 (peer `^18.0.0 || ^19.0.0`), in the browser and in server rendering, including React Server Components.
|
|
214
169
|
- `magic-editor-x/vue` needs Vue 3.5 or later (optional peer `^3.5.0`; it is never installed by the plugin).
|
|
@@ -392,7 +347,7 @@ The plugin creates these tables on startup. They are not content types, so Strap
|
|
|
392
347
|
|
|
393
348
|
Behind a proxy, also set `server.proxy` in `config/server` (`koa: true` and the number of trusted hops in `maxIpsCount`) so Strapi sees the real client address.
|
|
394
349
|
|
|
395
|
-
The acceptance run with several processes is described in [CONTRIBUTING.md](
|
|
350
|
+
The acceptance run with several processes is described in [CONTRIBUTING.md](https://github.com/Schero94/Magic-Editor-X/blob/main/CONTRIBUTING.md).
|
|
396
351
|
|
|
397
352
|
## AI assistant
|
|
398
353
|
|
|
@@ -814,7 +769,7 @@ import { MagicEditorXContent } from 'magic-editor-x/react';
|
|
|
814
769
|
|
|
815
770
|
- Props: `value`, `options` (every option above) and `components` (per block type, receives `{ block, helpers, children }`; `children` is the default output). Vue also takes scoped slots `block-<type>`, which win over `components`.
|
|
816
771
|
- React 18 and 19, server rendering and React Server Components (the copy button needs a client component or `enhanceCodeBlocks()`); Vue 3.5 or later, also with Nuxt server rendering.
|
|
817
|
-
- Guides: [React](docs/guides/react.md), [Vue and Nuxt](docs/guides/vue-nuxt.md), [Astro](docs/guides/astro.md) (`renderHtml` with `set:html`, or the components as server-rendered islands, plus the CSS for line numbers and copy buttons).
|
|
772
|
+
- Guides: [React](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/guides/react.md), [Vue and Nuxt](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/guides/vue-nuxt.md), [Astro](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/guides/astro.md) (`renderHtml` with `set:html`, or the components as server-rendered islands, plus the CSS for line numbers and copy buttons).
|
|
818
773
|
|
|
819
774
|
## Content API and GraphQL output
|
|
820
775
|
|
|
@@ -887,7 +842,7 @@ export const calloutCard = defineBlock({
|
|
|
887
842
|
- **Frontend:** pass `blocks: [calloutCard]` to `renderHtml`, `renderText`, `renderMarkdown` or the React/Vue components; give the definition a `render`, `text` or `markdown` function for your own output, or get a neutral default.
|
|
888
843
|
- Field types: `text`, `inline`, `url`, `enum`, `number`, `boolean`, `array`, `object`. `blockJsonSchema(definition)` returns the JSON Schema of the stored shape.
|
|
889
844
|
|
|
890
|
-
The full guide with the admin tool, field types and security notes is [docs/guides/custom-blocks-sdk.md](docs/guides/custom-blocks-sdk.md).
|
|
845
|
+
The full guide with the admin tool, field types and security notes is [docs/guides/custom-blocks-sdk.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/guides/custom-blocks-sdk.md).
|
|
891
846
|
|
|
892
847
|
## Strapi AI translations and Releases
|
|
893
848
|
|
|
@@ -1055,17 +1010,17 @@ Content-Type: application/json
|
|
|
1055
1010
|
Link previews, images and media by URL and the link checks only fetch public http(s) addresses: the host is resolved once, every address must be public, the connection is pinned to that address, redirects are re-checked (at most 3), and size, type and time are limited. AI and LanguageTool base URLs must be public https URLs unless `ai.allowPrivateBaseUrl` or `languageTool.allowPrivateBaseUrl` is on; origins on private networks need `qualityChecks.externalLinks.allowPrivateOrigins` (link checks), `uploads.allowPrivateOrigins` (images and media by URL) or `ai.altText.allowPrivateOrigins` (alt text images); redirects from them are never followed.
|
|
1056
1011
|
|
|
1057
1012
|
- **Uploads** are checked by their first bytes (not by the file name or the browser's MIME type) and stored through the Media Library with the admin as creator.
|
|
1058
|
-
- **Collaboration:** tokens are signed, bound to admin, document, locale and field, expire after `collaboration.tokenTtlSeconds` and work once on any process; the socket accepts the admin and server origins and `collaboration.allowedOrigins` and only clients of the current protocol; every update is checked (allowed structures only, no prototype keys, dependencies present, touched blocks valid) before it is stored or relayed, and a socket that keeps sending invalid updates is closed; names and colours of other people come from the server, never from a client; remote content is sanitised before the editor renders it; updates, sessions, sockets and rooms per admin are rate limited; viewers cannot write. See [docs/security-audit-2.1.md](
|
|
1013
|
+
- **Collaboration:** tokens are signed, bound to admin, document, locale and field, expire after `collaboration.tokenTtlSeconds` and work once on any process; the socket accepts the admin and server origins and `collaboration.allowedOrigins` and only clients of the current protocol; every update is checked (allowed structures only, no prototype keys, dependencies present, touched blocks valid) before it is stored or relayed, and a socket that keeps sending invalid updates is closed; names and colours of other people come from the server, never from a client; remote content is sanitised before the editor renders it; updates, sessions, sockets and rooms per admin are rate limited; viewers cannot write. See [docs/security-audit-2.1.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/security-audit-2.1.md).
|
|
1059
1014
|
- **Field presets** are enforced on the server (save middleware and realtime guard), not only in the editor; see [Field presets](#field-presets).
|
|
1060
|
-
- **Paste, import and rendering:** pasted and imported HTML/Markdown is parsed into an inert document and rebuilt from the editor's own tags only, then sanitised again on save; `magic-editor-x/render` re-parses stored inline HTML and never trusts it. The link check fetches external URLs only when the owner turns it on, through the SSRF-protected fetcher, rate limited, without logging URLs. See [docs/security-audit-2.2.md](
|
|
1015
|
+
- **Paste, import and rendering:** pasted and imported HTML/Markdown is parsed into an inert document and rebuilt from the editor's own tags only, then sanitised again on save; `magic-editor-x/render` re-parses stored inline HTML and never trusts it. The link check fetches external URLs only when the owner turns it on, through the SSRF-protected fetcher, rate limited, without logging URLs. See [docs/security-audit-2.2.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/security-audit-2.2.md).
|
|
1061
1016
|
- **Content API and GraphQL output (2.3):** `?mex=` and the GraphQL fields resolve internal links, mentions, embedded entries, media and synced blocks with the caller's own permissions (`find` on the target type, upload `find` for media), read published versions unless the request asks for drafts, and pass every row through Strapi's output sanitising. Targets the caller may not read are handled like missing ones, so the output reveals neither their existence nor their titles or slugs. Without `?mex` the response is the stored value, which still carries stored hrefs and embedded-entry snapshots, as in 2.2.
|
|
1062
1017
|
- **React and Vue components (2.3)** use the same render tree as `renderHtml`; text is rendered as text and raw HTML only through your `sanitizeRaw`. The XSS corpus is rendered through all three outputs in the tests.
|
|
1063
1018
|
- **Comments, templates and synced blocks (2.3):** comment routes check the plugin actions and Content Manager read on the document, locale and field (404 otherwise); admin ids are never returned; comment text is plain text. Templates and synced sources are cleaned with the field sanitiser on every write and filtered by the field preset when inserted or expanded; a synced source cannot contain another synced block. Synced sources have no Draft & Publish, so an edit is live in published output at once.
|
|
1064
|
-
- **2.4 surfaces:** field keys come from the server, are checked against the stored draft and never decide access on their own; legacy rows are mapped only on block-id evidence and are otherwise read-only. Table merges, alignment and captions are validated and bounded on save and on the live channel. Math is rendered by Temml with `trust: false` and every renderer passes MathML through an allow-list (no links, styles, ids or event handlers); footnote notes follow the inline policy. Comment anchors, mentions and notifications are checked server-side (Content Manager read on the field for every mentioned person, ids only in notification rows, e-mails without comment text and with header-safe names). Suggestions are sanitised and preset-checked, decided once (conditional updates) and need update access to accept. The audit trail holds no content. AI translations by Strapi receive only text. See [docs/security-audit-2.4.md](
|
|
1019
|
+
- **2.4 surfaces:** field keys come from the server, are checked against the stored draft and never decide access on their own; legacy rows are mapped only on block-id evidence and are otherwise read-only. Table merges, alignment and captions are validated and bounded on save and on the live channel. Math is rendered by Temml with `trust: false` and every renderer passes MathML through an allow-list (no links, styles, ids or event handlers); footnote notes follow the inline policy. Comment anchors, mentions and notifications are checked server-side (Content Manager read on the field for every mentioned person, ids only in notification rows, e-mails without comment text and with header-safe names). Suggestions are sanitised and preset-checked, decided once (conditional updates) and need update access to accept. The audit trail holds no content. AI translations by Strapi receive only text. See [docs/security-audit-2.4.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/security-audit-2.4.md).
|
|
1065
1020
|
- **Secrets:** the AI key and the LanguageTool key are encrypted with AES-256-GCM (random IV, versioned format, separate key derivation per purpose) and never returned. Changing the AI provider or base URL, or the LanguageTool base URL or user name, requires entering the key again, so a stored key cannot be sent to another host.
|
|
1066
1021
|
- **Logs** contain operation names and error codes only, never content, URLs with queries, tokens, user ids or email addresses.
|
|
1067
1022
|
- **Stored data:** custom block definitions, versions (field content and the admin who saved it), live rooms (Yjs updates, removed `collaboration.roomTtlMinutes` after the last person left), presence rows (admin display name, colour, caret position; removed when the socket closes or after missed heartbeats), comments (text, author id and display name; deleted with the document locale, anonymised when the admin is deleted), templates, patterns and synced sources (with the creator's display name) and their versions (with the saver's name), suggestions (proposed blocks, author and decider names; deleted with the document locale, anonymised when the admin is deleted), notifications (ids only), the audit trail (event, target, counts, block ids, admin id and name; pruned after `audit.retentionDays`) and, with the scheduled link check, the external URLs of editor fields with their last status.
|
|
1068
|
-
- **Reviews:** [docs/security-audit-2.4.md](
|
|
1023
|
+
- **Reviews:** [docs/security-audit-2.4.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/security-audit-2.4.md) covers every 2.4 surface (findings MEX-24-01 to MEX-24-18), [docs/security-audit-2.3.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/security-audit-2.3.md) every 2.3 surface (MEX-23-01 to MEX-23-15), each with controls, tests and residual risks.
|
|
1069
1024
|
- **Content Security Policy:** Editor.js and the Design System add inline styles, which Strapi's default `style-src 'unsafe-inline'` allows. The socket connects to the same origin as the admin, which `connect-src 'self'` covers; add the `wss:` origin only when the admin runs on another host. Embeds and external images in the editor preview need `frame-src` and `img-src` sources; see [Content Security Policy](#content-security-policy) below.
|
|
1070
1025
|
|
|
1071
1026
|
Report vulnerabilities privately through GitHub security advisories on the repository.
|
|
@@ -1195,7 +1150,7 @@ A custom block named `toc`, `gallery`, `video`, `audio`, `synced` or `mention` t
|
|
|
1195
1150
|
|
|
1196
1151
|
## Migrating from 1.x
|
|
1197
1152
|
|
|
1198
|
-
2.0 is a major release. Stored content keeps working; routes, permissions and configuration changed. The full guide is in the [CHANGELOG](
|
|
1153
|
+
2.0 is a major release. Stored content keeps working; routes, permissions and configuration changed. The full guide is in the [CHANGELOG](https://github.com/Schero94/Magic-Editor-X/blob/main/CHANGELOG.md). In short:
|
|
1199
1154
|
|
|
1200
1155
|
1. Update the package and rebuild the admin: `npm install magic-editor-x@2 && npm run build`.
|
|
1201
1156
|
2. Remove 1.x configuration keys (`enabledTools`, `linkPreviewTimeout`, `maxImageSize`, `maxFileSize`, `allowedImageTypes`, `collaboration.wsPath`, `wsUrl`, `sessionTTL`, `allowedAdminRoles`, `allowedAdminUserIds`, `cors`) and use the new keys above.
|
|
@@ -1218,7 +1173,7 @@ npm run verify
|
|
|
1218
1173
|
MEX_HOST_URL=http://127.0.0.1:1421 MEX_CREDS=/path/to/creds.json npm run test:integration
|
|
1219
1174
|
```
|
|
1220
1175
|
|
|
1221
|
-
[docs/engine-decision.md](
|
|
1176
|
+
[docs/engine-decision.md](https://github.com/Schero94/Magic-Editor-X/blob/main/docs/engine-decision.md) records why the plugin stays on Editor.js for 2.x. [CONTRIBUTING.md](https://github.com/Schero94/Magic-Editor-X/blob/main/CONTRIBUTING.md) explains the isolated acceptance host, the integration suite on SQLite and PostgreSQL and the multi-process acceptance run. [AGENTS.md](https://github.com/Schero94/Magic-Editor-X/blob/main/AGENTS.md) is the contract for coding agents.
|
|
1222
1177
|
|
|
1223
1178
|
## Maintenance status
|
|
1224
1179
|
|
|
@@ -1230,4 +1185,4 @@ The admin is translated into English, German (formal Sie), French, Spanish and P
|
|
|
1230
1185
|
|
|
1231
1186
|
## License
|
|
1232
1187
|
|
|
1233
|
-
[MIT](
|
|
1188
|
+
[MIT](https://github.com/Schero94/Magic-Editor-X/blob/main/LICENSE) © 2025-2026 Schero D.
|
package/dist/server/index.js
CHANGED
|
@@ -22358,7 +22358,9 @@ var require_link_schedule = __commonJS({
|
|
|
22358
22358
|
},
|
|
22359
22359
|
/**
|
|
22360
22360
|
* Next planned run of this process's cron job (from the job handle's
|
|
22361
|
-
* `nextInvocation()`), or null.
|
|
22361
|
+
* `nextInvocation()`), or null. Strapi 5.61+ (croner) returns a Date;
|
|
22362
|
+
* earlier 5.x releases (node-schedule 2) return a cron-parser `CronDate`,
|
|
22363
|
+
* which is converted with its `toDate()`.
|
|
22362
22364
|
* @returns {Date|null} Next fire time.
|
|
22363
22365
|
*/
|
|
22364
22366
|
nextRun() {
|
|
@@ -22366,7 +22368,8 @@ var require_link_schedule = __commonJS({
|
|
|
22366
22368
|
const entry = (strapi.cron && Array.isArray(strapi.cron.jobs) ? strapi.cron.jobs : []).find(
|
|
22367
22369
|
(job) => job && job.name === CRON_NAME
|
|
22368
22370
|
);
|
|
22369
|
-
const
|
|
22371
|
+
const raw = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
|
|
22372
|
+
const next = raw && typeof raw.toDate === "function" ? raw.toDate() : raw;
|
|
22370
22373
|
return next instanceof Date && !Number.isNaN(next.getTime()) ? next : null;
|
|
22371
22374
|
} catch {
|
|
22372
22375
|
return null;
|
package/dist/server/index.mjs
CHANGED
|
@@ -22354,7 +22354,9 @@ var require_link_schedule = __commonJS({
|
|
|
22354
22354
|
},
|
|
22355
22355
|
/**
|
|
22356
22356
|
* Next planned run of this process's cron job (from the job handle's
|
|
22357
|
-
* `nextInvocation()`), or null.
|
|
22357
|
+
* `nextInvocation()`), or null. Strapi 5.61+ (croner) returns a Date;
|
|
22358
|
+
* earlier 5.x releases (node-schedule 2) return a cron-parser `CronDate`,
|
|
22359
|
+
* which is converted with its `toDate()`.
|
|
22358
22360
|
* @returns {Date|null} Next fire time.
|
|
22359
22361
|
*/
|
|
22360
22362
|
nextRun() {
|
|
@@ -22362,7 +22364,8 @@ var require_link_schedule = __commonJS({
|
|
|
22362
22364
|
const entry = (strapi.cron && Array.isArray(strapi.cron.jobs) ? strapi.cron.jobs : []).find(
|
|
22363
22365
|
(job) => job && job.name === CRON_NAME
|
|
22364
22366
|
);
|
|
22365
|
-
const
|
|
22367
|
+
const raw = entry && entry.job && entry.job.nextInvocation ? entry.job.nextInvocation() : null;
|
|
22368
|
+
const next = raw && typeof raw.toDate === "function" ? raw.toDate() : raw;
|
|
22366
22369
|
return next instanceof Date && !Number.isNaN(next.getTime()) ? next : null;
|
|
22367
22370
|
} catch {
|
|
22368
22371
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "magic-editor-x",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Free, open-source block editor for Strapi 5: Editor.js custom field with Media Library uploads, custom blocks, version history, live collaboration across several servers and an optional AI assistant with your own provider.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"strapi",
|