@axium/server 0.39.2 → 0.39.3

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/config.js CHANGED
@@ -98,7 +98,7 @@ export const defaultConfig = {
98
98
  audit: {
99
99
  allow_raw: false,
100
100
  retention: 30,
101
- min_severity: 'error',
101
+ min_severity: 'notice',
102
102
  auto_suspend: 'critical',
103
103
  },
104
104
  auth: {
package/dist/requests.js CHANGED
@@ -46,7 +46,14 @@ export async function parseBody(request, schema) {
46
46
  }
47
47
  export function parseSearch(request, schema) {
48
48
  const url = new URL(request.url);
49
- const searchParams = Object.fromEntries(url.searchParams.entries());
49
+ const searchParams = Object.fromEntries(url.searchParams.entries().map(([k, v]) => {
50
+ try {
51
+ return [k, JSON.parse(v)];
52
+ }
53
+ catch {
54
+ error(400, 'Invalid query parameter: ' + k);
55
+ }
56
+ }));
50
57
  try {
51
58
  return schema.parse(searchParams);
52
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axium/server",
3
- "version": "0.39.2",
3
+ "version": "0.39.3",
4
4
  "author": "James Prevett <axium@jamespre.dev>",
5
5
  "funding": {
6
6
  "type": "individual",
package/template.html CHANGED
@@ -11,7 +11,7 @@
11
11
  </head>
12
12
 
13
13
  <body>
14
- <div style="display: contents">%sveltekit.body%</div>
14
+ %sveltekit.body%
15
15
  <div id="toasts"></div>
16
16
  </body>
17
17
  </html>