@sveltejs/kit 1.13.0 → 1.14.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltejs/kit",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -1,3 +1,4 @@
1
+ import { DEV } from 'esm-env';
1
2
  import { json, text } from '../../exports/index.js';
2
3
  import { coalesce_to_error } from '../../utils/error.js';
3
4
  import { negotiate } from '../../utils/http.js';
@@ -52,7 +53,14 @@ export function allowed_methods(mod) {
52
53
  * @param {string} message
53
54
  */
54
55
  export function static_error_page(options, status, message) {
55
- return text(options.templates.error({ status, message }), {
56
+ let page = options.templates.error({ status, message });
57
+
58
+ if (DEV) {
59
+ // inject Vite HMR client, for easier debugging
60
+ page = page.replace('</head>', '<script type="module" src="/@vite/client"></script></head>');
61
+ }
62
+
63
+ return text(page, {
56
64
  headers: { 'content-type': 'text/html; charset=utf-8' },
57
65
  status
58
66
  });
package/types/index.d.ts CHANGED
@@ -1264,6 +1264,7 @@ export interface SubmitFunction<
1264
1264
  data: FormData;
1265
1265
  form: HTMLFormElement;
1266
1266
  controller: AbortController;
1267
+ submitter: HTMLElement | null;
1267
1268
  cancel(): void;
1268
1269
  }): MaybePromise<
1269
1270
  | void