@tanstack/router-core 1.142.8 → 1.142.11
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/cjs/ssr/json.cjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const headers = require("./headers.cjs");
|
|
4
3
|
function json(payload, init) {
|
|
5
|
-
return
|
|
6
|
-
...init,
|
|
7
|
-
headers: headers.mergeHeaders(
|
|
8
|
-
{ "content-type": "application/json" },
|
|
9
|
-
init?.headers
|
|
10
|
-
)
|
|
11
|
-
});
|
|
4
|
+
return Response.json(payload, init);
|
|
12
5
|
}
|
|
13
6
|
exports.json = json;
|
|
14
7
|
//# sourceMappingURL=json.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.cjs","sources":["../../../src/ssr/json.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"json.cjs","sources":["../../../src/ssr/json.ts"],"sourcesContent":["/**\n * @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.\n */\nexport interface JsonResponse<TData> extends Response {\n json: () => Promise<TData>\n}\n\n/**\n * @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.\n */\nexport function json<TData>(\n payload: TData,\n init?: ResponseInit,\n): JsonResponse<TData> {\n return Response.json(payload, init)\n}\n"],"names":[],"mappings":";;AAUO,SAAS,KACd,SACA,MACqB;AACrB,SAAO,SAAS,KAAK,SAAS,IAAI;AACpC;;"}
|
package/dist/cjs/ssr/json.d.cts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
3
|
+
*/
|
|
1
4
|
export interface JsonResponse<TData> extends Response {
|
|
2
5
|
json: () => Promise<TData>;
|
|
3
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
9
|
+
*/
|
|
4
10
|
export declare function json<TData>(payload: TData, init?: ResponseInit): JsonResponse<TData>;
|
package/dist/esm/ssr/json.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
3
|
+
*/
|
|
1
4
|
export interface JsonResponse<TData> extends Response {
|
|
2
5
|
json: () => Promise<TData>;
|
|
3
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
9
|
+
*/
|
|
4
10
|
export declare function json<TData>(payload: TData, init?: ResponseInit): JsonResponse<TData>;
|
package/dist/esm/ssr/json.js
CHANGED
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import { mergeHeaders } from "./headers.js";
|
|
2
1
|
function json(payload, init) {
|
|
3
|
-
return
|
|
4
|
-
...init,
|
|
5
|
-
headers: mergeHeaders(
|
|
6
|
-
{ "content-type": "application/json" },
|
|
7
|
-
init?.headers
|
|
8
|
-
)
|
|
9
|
-
});
|
|
2
|
+
return Response.json(payload, init);
|
|
10
3
|
}
|
|
11
4
|
export {
|
|
12
5
|
json
|
package/dist/esm/ssr/json.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.js","sources":["../../../src/ssr/json.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"json.js","sources":["../../../src/ssr/json.ts"],"sourcesContent":["/**\n * @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.\n */\nexport interface JsonResponse<TData> extends Response {\n json: () => Promise<TData>\n}\n\n/**\n * @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.\n */\nexport function json<TData>(\n payload: TData,\n init?: ResponseInit,\n): JsonResponse<TData> {\n return Response.json(payload, init)\n}\n"],"names":[],"mappings":"AAUO,SAAS,KACd,SACA,MACqB;AACrB,SAAO,SAAS,KAAK,SAAS,IAAI;AACpC;"}
|
package/package.json
CHANGED
package/src/ssr/json.ts
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
3
|
+
*/
|
|
3
4
|
export interface JsonResponse<TData> extends Response {
|
|
4
5
|
json: () => Promise<TData>
|
|
5
6
|
}
|
|
6
7
|
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use [`Response.json`](https://developer.mozilla.org/en-US/docs/Web/API/Response/json_static) from the standard Web API directly.
|
|
10
|
+
*/
|
|
7
11
|
export function json<TData>(
|
|
8
12
|
payload: TData,
|
|
9
13
|
init?: ResponseInit,
|
|
10
14
|
): JsonResponse<TData> {
|
|
11
|
-
return
|
|
12
|
-
...init,
|
|
13
|
-
headers: mergeHeaders(
|
|
14
|
-
{ 'content-type': 'application/json' },
|
|
15
|
-
init?.headers,
|
|
16
|
-
),
|
|
17
|
-
})
|
|
15
|
+
return Response.json(payload, init)
|
|
18
16
|
}
|