@tanstack/start-server-core 1.143.3 → 1.143.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.
- package/dist/esm/createSsrRpc.d.ts +1 -1
- package/dist/esm/createSsrRpc.js +1 -1
- package/dist/esm/createSsrRpc.js.map +1 -1
- package/dist/esm/{fake-start-server-fn-manifest.js → fake-start-server-fn-resolver.js} +1 -1
- package/dist/esm/fake-start-server-fn-resolver.js.map +1 -0
- package/dist/esm/getServerFnById.d.ts +1 -1
- package/dist/esm/serializer/ServerFunctionSerializationAdapter.js +1 -1
- package/dist/esm/server-functions-handler.js +1 -1
- package/dist/esm/virtual-modules.d.ts +1 -1
- package/dist/esm/virtual-modules.js +1 -1
- package/dist/esm/virtual-modules.js.map +1 -1
- package/package.json +6 -6
- package/src/createSsrRpc.ts +1 -1
- package/src/getServerFnById.ts +1 -1
- package/src/tanstack-start.d.ts +2 -2
- package/src/virtual-modules.ts +1 -1
- package/dist/esm/fake-start-server-fn-manifest.js.map +0 -1
- /package/dist/esm/{fake-start-server-fn-manifest.d.ts → fake-start-server-fn-resolver.d.ts} +0 -0
- /package/src/{fake-start-server-fn-manifest.ts → fake-start-server-fn-resolver.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TSS_SERVER_FUNCTION } from '@tanstack/start-client-core';
|
|
2
|
-
import { ServerFn } from '#tanstack-start-server-fn-
|
|
2
|
+
import { ServerFn } from '#tanstack-start-server-fn-resolver';
|
|
3
3
|
export type SsrRpcImporter = () => Promise<ServerFn>;
|
|
4
4
|
export declare const createSsrRpc: (functionId: string, importer?: SsrRpcImporter) => ((...args: Array<any>) => Promise<any>) & {
|
|
5
5
|
url: string;
|
package/dist/esm/createSsrRpc.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TSS_SERVER_FUNCTION } from "@tanstack/start-client-core";
|
|
2
|
-
import { getServerFnById } from "#tanstack-start-server-fn-
|
|
2
|
+
import { getServerFnById } from "#tanstack-start-server-fn-resolver";
|
|
3
3
|
const createSsrRpc = (functionId, importer) => {
|
|
4
4
|
const url = process.env.TSS_SERVER_FN_BASE + functionId;
|
|
5
5
|
const fn = async (...args) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSsrRpc.js","sources":["../../src/createSsrRpc.ts"],"sourcesContent":["import { TSS_SERVER_FUNCTION } from '@tanstack/start-client-core'\nimport { getServerFnById } from './getServerFnById'\nimport type { ServerFn } from '#tanstack-start-server-fn-
|
|
1
|
+
{"version":3,"file":"createSsrRpc.js","sources":["../../src/createSsrRpc.ts"],"sourcesContent":["import { TSS_SERVER_FUNCTION } from '@tanstack/start-client-core'\nimport { getServerFnById } from './getServerFnById'\nimport type { ServerFn } from '#tanstack-start-server-fn-resolver'\n\nexport type SsrRpcImporter = () => Promise<ServerFn>\n\nexport const createSsrRpc = (functionId: string, importer?: SsrRpcImporter) => {\n const url = process.env.TSS_SERVER_FN_BASE + functionId\n const fn = async (...args: Array<any>): Promise<any> => {\n // If an importer is provided, use it directly (server-to-server call within the SSR environment)\n // Otherwise, fall back to manifest lookup (client-to-server call, server functions that are only referenced on the server or if the provider environment is not SSR)\n const serverFn = importer\n ? await importer()\n : await getServerFnById(functionId)\n return serverFn(...args)\n }\n\n return Object.assign(fn, {\n url,\n functionId,\n [TSS_SERVER_FUNCTION]: true,\n })\n}\n"],"names":[],"mappings":";;AAMO,MAAM,eAAe,CAAC,YAAoB,aAA8B;AAC7E,QAAM,MAAM,QAAQ,IAAI,qBAAqB;AAC7C,QAAM,KAAK,UAAU,SAAmC;AAGtD,UAAM,WAAW,WACb,MAAM,aACN,MAAM,gBAAgB,UAAU;AACpC,WAAO,SAAS,GAAG,IAAI;AAAA,EACzB;AAEA,SAAO,OAAO,OAAO,IAAI;AAAA,IACvB;AAAA,IACA;AAAA,IACA,CAAC,mBAAmB,GAAG;AAAA,EAAA,CACxB;AACH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fake-start-server-fn-resolver.js","sources":["../../src/fake-start-server-fn-resolver.ts"],"sourcesContent":["export async function getServerFnById(): Promise<any> {}\n"],"names":[],"mappings":"AAAA,eAAsB,kBAAgC;AAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getServerFnById } from '#tanstack-start-server-fn-
|
|
1
|
+
export { getServerFnById } from '#tanstack-start-server-fn-resolver';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createSerializationAdapter } from "@tanstack/router-core";
|
|
2
2
|
import { TSS_SERVER_FUNCTION } from "@tanstack/start-client-core";
|
|
3
3
|
import { createServerRpc } from "../createServerRpc.js";
|
|
4
|
-
import { getServerFnById } from "#tanstack-start-server-fn-
|
|
4
|
+
import { getServerFnById } from "#tanstack-start-server-fn-resolver";
|
|
5
5
|
const ServerFunctionSerializationAdapter = createSerializationAdapter({
|
|
6
6
|
key: "$TSS/serverfn",
|
|
7
7
|
test: (v) => {
|
|
@@ -3,7 +3,7 @@ import invariant from "tiny-invariant";
|
|
|
3
3
|
import { getDefaultSerovalPlugins, TSS_FORMDATA_CONTEXT, X_TSS_RAW_RESPONSE, X_TSS_SERIALIZED } from "@tanstack/start-client-core";
|
|
4
4
|
import { fromJSON, toCrossJSONStream, toCrossJSONAsync } from "seroval";
|
|
5
5
|
import { getResponse } from "./request-response.js";
|
|
6
|
-
import { getServerFnById } from "#tanstack-start-server-fn-
|
|
6
|
+
import { getServerFnById } from "#tanstack-start-server-fn-resolver";
|
|
7
7
|
let regex = void 0;
|
|
8
8
|
const handleServerAction = async ({
|
|
9
9
|
request,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const VIRTUAL_MODULES: {
|
|
2
2
|
readonly startManifest: "tanstack-start-manifest:v";
|
|
3
3
|
readonly injectedHeadScripts: "tanstack-start-injected-head-scripts:v";
|
|
4
|
-
readonly
|
|
4
|
+
readonly serverFnResolver: "#tanstack-start-server-fn-resolver";
|
|
5
5
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const VIRTUAL_MODULES = {
|
|
2
2
|
startManifest: "tanstack-start-manifest:v",
|
|
3
3
|
injectedHeadScripts: "tanstack-start-injected-head-scripts:v",
|
|
4
|
-
|
|
4
|
+
serverFnResolver: "#tanstack-start-server-fn-resolver"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
VIRTUAL_MODULES
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-modules.js","sources":["../../src/virtual-modules.ts"],"sourcesContent":["export const VIRTUAL_MODULES = {\n startManifest: 'tanstack-start-manifest:v',\n injectedHeadScripts: 'tanstack-start-injected-head-scripts:v',\n
|
|
1
|
+
{"version":3,"file":"virtual-modules.js","sources":["../../src/virtual-modules.ts"],"sourcesContent":["export const VIRTUAL_MODULES = {\n startManifest: 'tanstack-start-manifest:v',\n injectedHeadScripts: 'tanstack-start-injected-head-scripts:v',\n serverFnResolver: '#tanstack-start-server-fn-resolver',\n} as const\n"],"names":[],"mappings":"AAAO,MAAM,kBAAkB;AAAA,EAC7B,eAAe;AAAA,EACf,qBAAqB;AAAA,EACrB,kBAAkB;AACpB;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/start-server-core",
|
|
3
|
-
"version": "1.143.
|
|
3
|
+
"version": "1.143.5",
|
|
4
4
|
"description": "Modern and scalable routing for React applications",
|
|
5
5
|
"author": "Tanner Linsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"./package.json": "./package.json"
|
|
48
48
|
},
|
|
49
49
|
"imports": {
|
|
50
|
-
"#tanstack-start-server-fn-
|
|
51
|
-
"default": "./dist/esm/fake-start-server-fn-
|
|
50
|
+
"#tanstack-start-server-fn-resolver": {
|
|
51
|
+
"default": "./dist/esm/fake-start-server-fn-resolver.js"
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false,
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"seroval": "^1.4.1",
|
|
65
65
|
"tiny-invariant": "^1.3.3",
|
|
66
66
|
"@tanstack/history": "1.141.0",
|
|
67
|
-
"@tanstack/start-client-core": "1.143.
|
|
68
|
-
"@tanstack/
|
|
69
|
-
"@tanstack/
|
|
67
|
+
"@tanstack/start-client-core": "1.143.4",
|
|
68
|
+
"@tanstack/router-core": "1.143.4",
|
|
69
|
+
"@tanstack/start-storage-context": "1.143.4"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@standard-schema/spec": "^1.0.0",
|
package/src/createSsrRpc.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TSS_SERVER_FUNCTION } from '@tanstack/start-client-core'
|
|
2
2
|
import { getServerFnById } from './getServerFnById'
|
|
3
|
-
import type { ServerFn } from '#tanstack-start-server-fn-
|
|
3
|
+
import type { ServerFn } from '#tanstack-start-server-fn-resolver'
|
|
4
4
|
|
|
5
5
|
export type SsrRpcImporter = () => Promise<ServerFn>
|
|
6
6
|
|
package/src/getServerFnById.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getServerFnById } from '#tanstack-start-server-fn-
|
|
1
|
+
export { getServerFnById } from '#tanstack-start-server-fn-resolver'
|
package/src/tanstack-start.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ declare module 'tanstack-start-route-tree:v' {
|
|
|
10
10
|
export const routeTree: AnyRoute | undefined
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
declare module '#tanstack-start-server-fn-
|
|
14
|
-
type ServerFn = (...args: Array<any>) => Promise<any>
|
|
13
|
+
declare module '#tanstack-start-server-fn-resolver' {
|
|
14
|
+
export type ServerFn = (...args: Array<any>) => Promise<any>
|
|
15
15
|
export function getServerFnById(
|
|
16
16
|
id: string,
|
|
17
17
|
opts?: { fromClient?: boolean },
|
package/src/virtual-modules.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export const VIRTUAL_MODULES = {
|
|
2
2
|
startManifest: 'tanstack-start-manifest:v',
|
|
3
3
|
injectedHeadScripts: 'tanstack-start-injected-head-scripts:v',
|
|
4
|
-
|
|
4
|
+
serverFnResolver: '#tanstack-start-server-fn-resolver',
|
|
5
5
|
} as const
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fake-start-server-fn-manifest.js","sources":["../../src/fake-start-server-fn-manifest.ts"],"sourcesContent":["export async function getServerFnById(): Promise<any> {}\n"],"names":[],"mappings":"AAAA,eAAsB,kBAAgC;AAAC;"}
|
|
File without changes
|
|
File without changes
|