easy-cms 1.16.0 → 1.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  run
4
- } from "./chunk-L3XDY7HM.js";
4
+ } from "./chunk-HLBEIQSJ.js";
5
5
 
6
6
  // src/bin.ts
7
7
  process.exitCode = await run(process.argv.slice(2));
@@ -211,6 +211,7 @@ Commands:
211
211
  serve Run the CMS as its own server (admin + REST API)
212
212
  jobs:run Run due scheduled publishes, jobs, webhook and email retries (also: run-scheduled)
213
213
  search:reindex [slug] Build the search index again from the database
214
+ audit:resign After a new secret: sign the audit log with it
214
215
  backup <file> Copy the database to a SQLite file while the CMS runs
215
216
  backup:decrypt <file> Decrypt a backup made with backups.encryptionKey
216
217
  copy --from <config> Copy all content from another config's database into this one
@@ -423,6 +424,15 @@ async function run(argv, io = defaultIO) {
423
424
  );
424
425
  return failed ? 1 : 0;
425
426
  }
427
+ case "audit:resign": {
428
+ const { checked, resigned, invalid } = await cms.audit.resign();
429
+ io.out(`Checked ${checked} audit entries: ${resigned} signed with the current secret.`);
430
+ if (invalid.length === 0) return 0;
431
+ io.err(
432
+ `${invalid.length} entries match no secret (changed after they were written), left as they are: #${invalid.slice(0, 20).join(", #")}${invalid.length > 20 ? ", \u2026" : ""}`
433
+ );
434
+ return 1;
435
+ }
426
436
  case "search:reindex": {
427
437
  if (!cms.config.search) {
428
438
  io.err("Set `search` in the config first, e.g. search: memorySearch().");
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createStandaloneHandler,
3
3
  run,
4
4
  startServer
5
- } from "./chunk-L3XDY7HM.js";
5
+ } from "./chunk-HLBEIQSJ.js";
6
6
  export {
7
7
  createStandaloneHandler,
8
8
  run,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-cms",
3
- "version": "1.16.0",
3
+ "version": "1.18.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": "^1.16.0",
25
- "@easy-cms/admin": "^1.16.0"
24
+ "@easy-cms/core": "^1.18.0",
25
+ "@easy-cms/admin": "^1.18.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@easy-cms/db-sqlite": "^1.16.0"
28
+ "@easy-cms/db-sqlite": "^1.18.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"