@isardsat/editorial-server 6.8.0 → 6.8.1

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/lib/hooks.js CHANGED
@@ -8,7 +8,11 @@ export async function createHooks(configDirectory) {
8
8
  const hookFunction = typeof module.default === "function" ? module.default : null;
9
9
  return hookFunction;
10
10
  }
11
- catch {
11
+ catch (error) {
12
+ if (error instanceof Error) {
13
+ console.error(`Failed to load hook (${name}) with error: ${error.message}`);
14
+ }
15
+ console.error(`Failed to load hook (${name})`);
12
16
  return null;
13
17
  }
14
18
  }
@@ -58,6 +58,7 @@ export function createStorage(dataDirectory) {
58
58
  }
59
59
  async function updateItem(item) {
60
60
  const content = await getContent({ production: false });
61
+ content[item.type] = content[item.type] ?? {};
61
62
  const oldItem = content[item.type][item.id];
62
63
  const newItem = EditorialDataItemSchema.parse({
63
64
  ...oldItem,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isardsat/editorial-server",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
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.9.8",
15
15
  "yaml": "^2.8.1",
16
16
  "zod": "^4.1.11",
17
- "@isardsat/editorial-admin": "^6.8.0",
18
- "@isardsat/editorial-common": "^6.8.0"
17
+ "@isardsat/editorial-admin": "^6.8.1",
18
+ "@isardsat/editorial-common": "^6.8.1"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@tsconfig/node22": "^22.0.0",