@isardsat/editorial-server 6.3.0 → 6.3.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/dist/app.js CHANGED
@@ -1,6 +1,7 @@
1
1
  import { serveStatic } from "@hono/node-server/serve-static";
2
2
  import { swaggerUI } from "@hono/swagger-ui";
3
3
  import { OpenAPIHono } from "@hono/zod-openapi";
4
+ import { cors } from "hono/cors";
4
5
  import { logger } from "hono/logger";
5
6
  import { createConfig } from "./lib/config.js";
6
7
  import { createHooks } from "./lib/hooks.js";
@@ -17,6 +18,10 @@ export async function createEditorialServer({ configDirectory = BASE_EDITORIAL_P
17
18
  const storage = createStorage(editorialDirectory);
18
19
  const hooks = await createHooks(configDirectory);
19
20
  app.use(logger());
21
+ // TODO: Formalize cors configuration
22
+ app.use("/api/v1/*", cors({
23
+ origin: "*",
24
+ }));
20
25
  app.route("/api/v1", createConfigRoutes(config));
21
26
  app.route("/api/v1", createDataRoutes(storage));
22
27
  app.route("/api/v1", createFilesRoutes());
@@ -75,7 +75,7 @@ export function createDataRoutes(storage) {
75
75
  if (lang) {
76
76
  const messages = await storage.getLocalisationMessages(lang);
77
77
  for (const [key, message] of Object.entries(messages)) {
78
- const [contentKey, typeKey, fieldKey, hash] = key.split(".");
78
+ const [contentKey, typeKey, fieldKey] = key.split(".");
79
79
  if (contentKey === itemType) {
80
80
  collection[typeKey][fieldKey] = message.defaultMessage;
81
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-server",
3
- "version": "6.3.0",
3
+ "version": "6.3.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  "hono": "^4.6.20",
15
15
  "yaml": "^2.7.0",
16
16
  "zod": "^3.24.1",
17
- "@isardsat/editorial-common": "^6.3.0",
18
- "@isardsat/editorial-admin": "^6.3.0"
17
+ "@isardsat/editorial-admin": "^6.3.2",
18
+ "@isardsat/editorial-common": "^6.3.2"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@tsconfig/node22": "^22.0.0",