easy-cms 0.5.0 → 0.7.0
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/bin.js +1 -1
- package/dist/{chunk-AAFZW525.js → chunk-ACQWSB2M.js} +22 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/dist/bin.js
CHANGED
|
@@ -194,6 +194,7 @@ Commands:
|
|
|
194
194
|
generate:types Write TypeScript types for your collections and globals
|
|
195
195
|
create-admin Create an admin user
|
|
196
196
|
serve Run the CMS as its own server (admin + REST API)
|
|
197
|
+
run-scheduled Run due scheduled publishes and webhook retries
|
|
197
198
|
|
|
198
199
|
Options:
|
|
199
200
|
--config <file> Config file (default: easy-cms.config.ts)
|
|
@@ -225,6 +226,11 @@ The file has no imports, so a frontend in another repository can copy it.
|
|
|
225
226
|
|
|
226
227
|
Creates a user (role "admin" unless --role is given). The password is asked for in the
|
|
227
228
|
terminal, or read from EASY_CMS_ADMIN_PASSWORD when there is no terminal.
|
|
229
|
+
`,
|
|
230
|
+
"run-scheduled": `Usage: easy-cms run-scheduled [options]
|
|
231
|
+
|
|
232
|
+
Runs due scheduled publishes and unpublishes, and retries failed webhook deliveries, once:
|
|
233
|
+
for a cron job where no server process keeps running. Servers do this every minute on their own.
|
|
228
234
|
`,
|
|
229
235
|
serve: `Usage: easy-cms serve [--port <n>] [--host <host>] [--watch] [--trust-proxy] [options]
|
|
230
236
|
|
|
@@ -280,9 +286,24 @@ async function run(argv, io = defaultIO) {
|
|
|
280
286
|
return 0;
|
|
281
287
|
}
|
|
282
288
|
const schema = command === "create-admin" && process.env.NODE_ENV !== "production" ? "push" : "skip";
|
|
283
|
-
const cms = await createEasyCMS2(config, {
|
|
289
|
+
const cms = await createEasyCMS2(config, {
|
|
290
|
+
cwd,
|
|
291
|
+
schema,
|
|
292
|
+
logger,
|
|
293
|
+
interactive: io.interactive,
|
|
294
|
+
scheduler: false
|
|
295
|
+
});
|
|
284
296
|
try {
|
|
285
297
|
switch (command) {
|
|
298
|
+
case "run-scheduled": {
|
|
299
|
+
const { ran, failed, webhooks } = await cms.runJobs();
|
|
300
|
+
io.out(`Ran ${ran} scheduled job(s)${failed ? `, ${failed} failed` : ""}.`);
|
|
301
|
+
if (webhooks.sent || webhooks.failed)
|
|
302
|
+
io.out(
|
|
303
|
+
`Retried webhooks: ${webhooks.sent} sent${webhooks.failed ? `, ${webhooks.failed} gave up` : ""}.`
|
|
304
|
+
);
|
|
305
|
+
return failed ? 1 : 0;
|
|
306
|
+
}
|
|
286
307
|
case "migrate": {
|
|
287
308
|
const applied = await cms.db.migrate();
|
|
288
309
|
io.out(
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easy-cms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Command line tool for Easy CMS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"node": ">=22.12"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@easy-cms/core": "^0.
|
|
25
|
-
"@easy-cms/admin": "^0.
|
|
24
|
+
"@easy-cms/core": "^0.7.0",
|
|
25
|
+
"@easy-cms/admin": "^0.7.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@easy-cms/db-sqlite": "^0.
|
|
28
|
+
"@easy-cms/db-sqlite": "^0.7.0"
|
|
29
29
|
},
|
|
30
30
|
"publishConfig": {
|
|
31
31
|
"access": "public"
|