easy-cms 0.40.0 → 0.42.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-IXNAWT6G.js";
4
+ } from "./chunk-73JSCLZP.js";
5
5
 
6
6
  // src/bin.ts
7
7
  process.exitCode = await run(process.argv.slice(2));
@@ -21,7 +21,7 @@ import { watch } from "fs";
21
21
  import { createServer } from "http";
22
22
  import { Readable } from "stream";
23
23
  import { pipeline } from "stream/promises";
24
- import { createAdminHandler } from "@easy-cms/admin";
24
+ import { adminHandlerFor } from "@easy-cms/admin";
25
25
  import {
26
26
  createEasyCMS,
27
27
  createRestHandler,
@@ -34,13 +34,7 @@ function createStandaloneHandler(cms) {
34
34
  const getClientIp = (request) => clientIps.get(request);
35
35
  const api = createRestHandler(cms, { getClientIp });
36
36
  const rootEndpoints = createRootEndpointHandler(cms, { getClientIp });
37
- const admin = createAdminHandler({
38
- basePath: adminPath,
39
- apiPath: config.routes.api,
40
- locale: config.admin.locale,
41
- brand: config.admin.brand,
42
- siteUrl: config.admin.siteUrl
43
- });
37
+ const admin = adminHandlerFor(config, {});
44
38
  const under = (path, base) => path === base || path.startsWith(`${base}/`);
45
39
  return async (request, clientIp) => {
46
40
  const { pathname } = new URL(request.url);
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createStandaloneHandler,
3
3
  run,
4
4
  startServer
5
- } from "./chunk-IXNAWT6G.js";
5
+ } from "./chunk-73JSCLZP.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": "0.40.0",
3
+ "version": "0.42.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.40.0",
25
- "@easy-cms/admin": "^0.40.0"
24
+ "@easy-cms/core": "^0.42.0",
25
+ "@easy-cms/admin": "^0.42.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@easy-cms/db-sqlite": "^0.40.0"
28
+ "@easy-cms/db-sqlite": "^0.42.0"
29
29
  },
30
30
  "publishConfig": {
31
31
  "access": "public"