@sveltejs/kit 1.0.0-next.241 → 1.0.0-next.242
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/cli.js +2 -2
- package/package.json +1 -1
- package/types/endpoint.d.ts +6 -4
package/dist/cli.js
CHANGED
|
@@ -933,7 +933,7 @@ async function launch(port, https) {
|
|
|
933
933
|
exec(`${cmd} ${https ? 'https' : 'http'}://localhost:${port}`);
|
|
934
934
|
}
|
|
935
935
|
|
|
936
|
-
const prog = sade('svelte-kit').version('1.0.0-next.
|
|
936
|
+
const prog = sade('svelte-kit').version('1.0.0-next.242');
|
|
937
937
|
|
|
938
938
|
prog
|
|
939
939
|
.command('dev')
|
|
@@ -1085,7 +1085,7 @@ async function check_port(port) {
|
|
|
1085
1085
|
function welcome({ port, host, https, open, loose, allow, cwd }) {
|
|
1086
1086
|
if (open) launch(port, https);
|
|
1087
1087
|
|
|
1088
|
-
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.
|
|
1088
|
+
console.log($.bold().cyan(`\n SvelteKit v${'1.0.0-next.242'}\n`));
|
|
1089
1089
|
|
|
1090
1090
|
const protocol = https ? 'https:' : 'http:';
|
|
1091
1091
|
const exposed = typeof host !== 'undefined' && host !== 'localhost' && host !== '127.0.0.1';
|
package/package.json
CHANGED
package/types/endpoint.d.ts
CHANGED
|
@@ -3,16 +3,18 @@ import { Either, JSONString, MaybePromise, ResponseHeaders } from './helper';
|
|
|
3
3
|
|
|
4
4
|
type Body = JSONString | Uint8Array | ReadableStream | import('stream').Readable;
|
|
5
5
|
|
|
6
|
-
export interface EndpointOutput {
|
|
6
|
+
export interface EndpointOutput<Output extends Body = Body> {
|
|
7
7
|
status?: number;
|
|
8
8
|
headers?: Headers | Partial<ResponseHeaders>;
|
|
9
|
-
body?:
|
|
9
|
+
body?: Output;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export interface Fallthrough {
|
|
13
13
|
fallthrough: true;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export interface RequestHandler<Locals = Record<string, any
|
|
17
|
-
(event: RequestEvent<Locals>): MaybePromise<
|
|
16
|
+
export interface RequestHandler<Locals = Record<string, any>, Output extends Body = Body> {
|
|
17
|
+
(event: RequestEvent<Locals>): MaybePromise<
|
|
18
|
+
Either<Response | EndpointOutput<Output>, Fallthrough>
|
|
19
|
+
>;
|
|
18
20
|
}
|