@dokebi/template-inertia 0.4.4 → 0.4.5

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.
@@ -80,11 +80,14 @@ const escapeHtml = (value) => value
80
80
  function textsFor(settings, language) {
81
81
  const tag = (language ?? '').toLowerCase();
82
82
  const primary = tag.split('-')[0] ?? '';
83
- const builtIn = BUILT_IN[primary] ?? BUILT_IN.en;
83
+ // Own keys only: Content-Language is any text the app set (`constructor`, `__proto__` named
84
+ // Object.prototype members and left the texts undefined: the page answered 500).
85
+ const own = (table, key) => Object.hasOwn(table, key) ? table[key] : undefined;
86
+ const builtIn = own(BUILT_IN, primary) ?? BUILT_IN.en;
84
87
  return {
85
88
  ...builtIn,
86
- ...settings.messages[primary],
87
- ...settings.messages[tag],
89
+ ...own(settings.messages, primary),
90
+ ...own(settings.messages, tag),
88
91
  };
89
92
  }
90
93
  /**
package/dist/index.js CHANGED
@@ -980,7 +980,7 @@ class InertiaRuntime {
980
980
  }
981
981
  export const createPlugin = definePlugin({
982
982
  name: 'dokebi-template-inertia',
983
- version: '0.4.4',
983
+ version: '0.4.5',
984
984
  core: '^0.4.2',
985
985
  options,
986
986
  entry: parseEntry,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dokebi/template-inertia",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Inertia v3 server adapter for Dokebi: page JSON, Vite manifest assets and optional server-side rendering.",
5
5
  "keywords": [
6
6
  "dokebi",
@@ -135,9 +135,9 @@
135
135
  ]
136
136
  },
137
137
  "devDependencies": {
138
- "@dokebi/i18n": "0.2.0",
139
- "@dokebi/session": "0.4.4",
140
- "@dokebi/web": "0.4.3",
138
+ "@dokebi/i18n": "0.2.1",
139
+ "@dokebi/session": "0.4.6",
140
+ "@dokebi/web": "0.4.4",
141
141
  "@dokebi/websocket": "0.4.2",
142
142
  "@dokebi/websocket-hub": "0.4.2",
143
143
  "@inertiajs/vue3": "3.9.1",