@tanstack/vue-start-server 0.0.1 → 1.141.1
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/LICENSE +21 -0
- package/dist/esm/StartServer.d.ts +15 -0
- package/dist/esm/StartServer.js +20 -0
- package/dist/esm/StartServer.js.map +1 -0
- package/dist/esm/defaultRenderHandler.d.ts +1 -0
- package/dist/esm/defaultRenderHandler.js +15 -0
- package/dist/esm/defaultRenderHandler.js.map +1 -0
- package/dist/esm/defaultStreamHandler.d.ts +1 -0
- package/dist/esm/defaultStreamHandler.js +17 -0
- package/dist/esm/defaultStreamHandler.js.map +1 -0
- package/dist/esm/index.d.ts +5 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/index.js.map +1 -0
- package/package.json +72 -7
- package/src/StartServer.tsx +16 -0
- package/src/defaultRenderHandler.tsx +12 -0
- package/src/defaultStreamHandler.tsx +13 -0
- package/src/index.tsx +8 -0
- package/README.md +0 -45
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-present Tanner Linsley
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnyRouter } from '@tanstack/router-core';
|
|
2
|
+
import * as Vue from 'vue';
|
|
3
|
+
export declare const StartServer: Vue.DefineComponent<Vue.ExtractPropTypes<{
|
|
4
|
+
router: {
|
|
5
|
+
type: () => AnyRouter;
|
|
6
|
+
required: true;
|
|
7
|
+
};
|
|
8
|
+
}>, () => Vue.VNode<Vue.RendererNode, Vue.RendererElement, {
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}>, {}, {}, {}, Vue.ComponentOptionsMixin, Vue.ComponentOptionsMixin, {}, string, Vue.PublicProps, Readonly<Vue.ExtractPropTypes<{
|
|
11
|
+
router: {
|
|
12
|
+
type: () => AnyRouter;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
}>> & Readonly<{}>, {}, {}, {}, {}, string, Vue.ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as Vue from "vue";
|
|
2
|
+
import { RouterProvider } from "@tanstack/vue-router";
|
|
3
|
+
const StartServer = Vue.defineComponent({
|
|
4
|
+
name: "StartServer",
|
|
5
|
+
props: {
|
|
6
|
+
router: {
|
|
7
|
+
type: Object,
|
|
8
|
+
required: true
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
setup(props) {
|
|
12
|
+
return () => Vue.h(RouterProvider, {
|
|
13
|
+
router: props.router
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
StartServer
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=StartServer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StartServer.js","sources":["../../src/StartServer.tsx"],"sourcesContent":["import * as Vue from 'vue'\nimport { RouterProvider } from '@tanstack/vue-router'\nimport type { AnyRouter } from '@tanstack/router-core'\n\nexport const StartServer = Vue.defineComponent({\n name: 'StartServer',\n props: {\n router: {\n type: Object as () => AnyRouter,\n required: true,\n },\n },\n setup(props) {\n return () => Vue.h(RouterProvider, { router: props.router })\n },\n})\n"],"names":["StartServer","Vue","defineComponent","name","props","router","type","Object","required","setup","h","RouterProvider"],"mappings":";;MAIaA,cAAcC,IAAIC,gBAAgB;AAAA,EAC7CC,MAAM;AAAA,EACNC,OAAO;AAAA,IACLC,QAAQ;AAAA,MACNC,MAAMC;AAAAA,MACNC,UAAU;AAAA,IACZ;AAAA;EAEFC,MAAML,OAAO;AACX,WAAO,MAAMH,IAAIS,EAAEC,gBAAgB;AAAA,MAAEN,QAAQD,MAAMC;AAAAA,IAAO,CAAC;AAAA,EAC7D;AACF,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultRenderHandler: import('@tanstack/start-server-core').HandlerCallback<import('@tanstack/router-core').AnyRouter>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineHandlerCallback } from "@tanstack/start-server-core";
|
|
2
|
+
import { renderRouterToString } from "@tanstack/vue-router/ssr/server";
|
|
3
|
+
import { StartServer } from "./StartServer.js";
|
|
4
|
+
const defaultRenderHandler = defineHandlerCallback(({
|
|
5
|
+
router,
|
|
6
|
+
responseHeaders
|
|
7
|
+
}) => renderRouterToString({
|
|
8
|
+
router,
|
|
9
|
+
responseHeaders,
|
|
10
|
+
App: StartServer
|
|
11
|
+
}));
|
|
12
|
+
export {
|
|
13
|
+
defaultRenderHandler
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=defaultRenderHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultRenderHandler.js","sources":["../../src/defaultRenderHandler.tsx"],"sourcesContent":["import { defineHandlerCallback } from '@tanstack/start-server-core'\nimport { renderRouterToString } from '@tanstack/vue-router/ssr/server'\nimport { StartServer } from './StartServer'\n\nexport const defaultRenderHandler = defineHandlerCallback(\n ({ router, responseHeaders }) =>\n renderRouterToString({\n router,\n responseHeaders,\n App: StartServer,\n }),\n)\n"],"names":["defaultRenderHandler","defineHandlerCallback","router","responseHeaders","renderRouterToString","App","StartServer"],"mappings":";;;AAIO,MAAMA,uBAAuBC,sBAClC,CAAC;AAAA,EAAEC;AAAAA,EAAQC;AAAgB,MACzBC,qBAAqB;AAAA,EACnBF;AAAAA,EACAC;AAAAA,EACAE,KAAKC;AACP,CAAC,CACL;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const defaultStreamHandler: import('@tanstack/start-server-core').HandlerCallback<import('@tanstack/router-core').AnyRouter>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineHandlerCallback } from "@tanstack/start-server-core";
|
|
2
|
+
import { renderRouterToStream } from "@tanstack/vue-router/ssr/server";
|
|
3
|
+
import { StartServer } from "./StartServer.js";
|
|
4
|
+
const defaultStreamHandler = defineHandlerCallback(async ({
|
|
5
|
+
request,
|
|
6
|
+
router,
|
|
7
|
+
responseHeaders
|
|
8
|
+
}) => await renderRouterToStream({
|
|
9
|
+
request,
|
|
10
|
+
router,
|
|
11
|
+
responseHeaders,
|
|
12
|
+
App: StartServer
|
|
13
|
+
}));
|
|
14
|
+
export {
|
|
15
|
+
defaultStreamHandler
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=defaultStreamHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaultStreamHandler.js","sources":["../../src/defaultStreamHandler.tsx"],"sourcesContent":["import { defineHandlerCallback } from '@tanstack/start-server-core'\nimport { renderRouterToStream } from '@tanstack/vue-router/ssr/server'\nimport { StartServer } from './StartServer'\n\nexport const defaultStreamHandler = defineHandlerCallback(\n async ({ request, router, responseHeaders }) =>\n await renderRouterToStream({\n request,\n router,\n responseHeaders,\n App: StartServer,\n }),\n)\n"],"names":["defaultStreamHandler","defineHandlerCallback","request","router","responseHeaders","renderRouterToStream","App","StartServer"],"mappings":";;;AAIO,MAAMA,uBAAuBC,sBAClC,OAAO;AAAA,EAAEC;AAAAA,EAASC;AAAAA,EAAQC;AAAgB,MACxC,MAAMC,qBAAqB;AAAA,EACzBH;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAE,KAAKC;AACP,CAAC,CACL;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { StartServer } from './StartServer.js';
|
|
2
|
+
export { defaultStreamHandler } from './defaultStreamHandler.js';
|
|
3
|
+
export { defaultRenderHandler } from './defaultRenderHandler.js';
|
|
4
|
+
export type { RequestHandler, RequestOptions, } from '@tanstack/start-server-core';
|
|
5
|
+
export * from '@tanstack/start-server-core';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { StartServer } from "./StartServer.js";
|
|
2
|
+
import { defaultStreamHandler } from "./defaultStreamHandler.js";
|
|
3
|
+
import { defaultRenderHandler } from "./defaultRenderHandler.js";
|
|
4
|
+
export * from "@tanstack/start-server-core";
|
|
5
|
+
export {
|
|
6
|
+
StartServer,
|
|
7
|
+
defaultRenderHandler,
|
|
8
|
+
defaultStreamHandler
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-start-server",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.141.1",
|
|
4
|
+
"description": "Modern and scalable routing for Vue applications",
|
|
5
|
+
"author": "Tanner Linsley",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/TanStack/router.git",
|
|
10
|
+
"directory": "packages/vue-start-server"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://tanstack.com/start",
|
|
13
|
+
"funding": {
|
|
14
|
+
"type": "github",
|
|
15
|
+
"url": "https://github.com/sponsors/tannerlinsley"
|
|
16
|
+
},
|
|
5
17
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
18
|
+
"vue",
|
|
19
|
+
"location",
|
|
20
|
+
"router",
|
|
21
|
+
"routing",
|
|
22
|
+
"async",
|
|
23
|
+
"async router",
|
|
24
|
+
"typescript"
|
|
25
|
+
],
|
|
26
|
+
"type": "module",
|
|
27
|
+
"types": "dist/esm/index.d.ts",
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"import": {
|
|
31
|
+
"types": "./dist/esm/index.d.ts",
|
|
32
|
+
"default": "./dist/esm/index.js"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"./package.json": "./package.json"
|
|
36
|
+
},
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"src"
|
|
41
|
+
],
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22.12.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@tanstack/history": "1.141.0",
|
|
47
|
+
"@tanstack/router-core": "1.141.1",
|
|
48
|
+
"@tanstack/start-client-core": "1.141.1",
|
|
49
|
+
"@tanstack/start-server-core": "1.141.1",
|
|
50
|
+
"@tanstack/vue-router": "1.141.1"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@vitejs/plugin-vue-jsx": "^4.1.2",
|
|
54
|
+
"typescript": "^5.7.2",
|
|
55
|
+
"vue": "^3.5.25"
|
|
56
|
+
},
|
|
57
|
+
"peerDependencies": {
|
|
58
|
+
"vue": "^3.3.0"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"clean": "rimraf ./dist && rimraf ./coverage",
|
|
62
|
+
"test": "pnpm test:eslint && pnpm test:types && pnpm test:build && pnpm test:unit",
|
|
63
|
+
"test:unit": "exit 0; vitest",
|
|
64
|
+
"test:eslint": "eslint ./src",
|
|
65
|
+
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
|
|
66
|
+
"test:types:ts54": "node ../../node_modules/typescript54/lib/tsc.js",
|
|
67
|
+
"test:types:ts55": "node ../../node_modules/typescript55/lib/tsc.js",
|
|
68
|
+
"test:types:ts56": "node ../../node_modules/typescript56/lib/tsc.js",
|
|
69
|
+
"test:types:ts57": "node ../../node_modules/typescript57/lib/tsc.js",
|
|
70
|
+
"test:types:ts58": "node ../../node_modules/typescript58/lib/tsc.js",
|
|
71
|
+
"test:types:ts59": "tsc",
|
|
72
|
+
"test:build": "publint --strict && attw --ignore-rules no-resolution --pack .",
|
|
73
|
+
"build": "vite build"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as Vue from 'vue'
|
|
2
|
+
import { RouterProvider } from '@tanstack/vue-router'
|
|
3
|
+
import type { AnyRouter } from '@tanstack/router-core'
|
|
4
|
+
|
|
5
|
+
export const StartServer = Vue.defineComponent({
|
|
6
|
+
name: 'StartServer',
|
|
7
|
+
props: {
|
|
8
|
+
router: {
|
|
9
|
+
type: Object as () => AnyRouter,
|
|
10
|
+
required: true,
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
setup(props) {
|
|
14
|
+
return () => Vue.h(RouterProvider, { router: props.router })
|
|
15
|
+
},
|
|
16
|
+
})
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineHandlerCallback } from '@tanstack/start-server-core'
|
|
2
|
+
import { renderRouterToString } from '@tanstack/vue-router/ssr/server'
|
|
3
|
+
import { StartServer } from './StartServer'
|
|
4
|
+
|
|
5
|
+
export const defaultRenderHandler = defineHandlerCallback(
|
|
6
|
+
({ router, responseHeaders }) =>
|
|
7
|
+
renderRouterToString({
|
|
8
|
+
router,
|
|
9
|
+
responseHeaders,
|
|
10
|
+
App: StartServer,
|
|
11
|
+
}),
|
|
12
|
+
)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { defineHandlerCallback } from '@tanstack/start-server-core'
|
|
2
|
+
import { renderRouterToStream } from '@tanstack/vue-router/ssr/server'
|
|
3
|
+
import { StartServer } from './StartServer'
|
|
4
|
+
|
|
5
|
+
export const defaultStreamHandler = defineHandlerCallback(
|
|
6
|
+
async ({ request, router, responseHeaders }) =>
|
|
7
|
+
await renderRouterToStream({
|
|
8
|
+
request,
|
|
9
|
+
router,
|
|
10
|
+
responseHeaders,
|
|
11
|
+
App: StartServer,
|
|
12
|
+
}),
|
|
13
|
+
)
|
package/src/index.tsx
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { StartServer } from './StartServer'
|
|
2
|
+
export { defaultStreamHandler } from './defaultStreamHandler'
|
|
3
|
+
export { defaultRenderHandler } from './defaultRenderHandler'
|
|
4
|
+
export type {
|
|
5
|
+
RequestHandler,
|
|
6
|
+
RequestOptions,
|
|
7
|
+
} from '@tanstack/start-server-core'
|
|
8
|
+
export * from '@tanstack/start-server-core'
|
package/README.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
# @tanstack/vue-start-server
|
|
2
|
-
|
|
3
|
-
## ⚠️ IMPORTANT NOTICE ⚠️
|
|
4
|
-
|
|
5
|
-
**This package is created solely for the purpose of setting up OIDC (OpenID Connect) trusted publishing with npm.**
|
|
6
|
-
|
|
7
|
-
This is **NOT** a functional package and contains **NO** code or functionality beyond the OIDC setup configuration.
|
|
8
|
-
|
|
9
|
-
## Purpose
|
|
10
|
-
|
|
11
|
-
This package exists to:
|
|
12
|
-
1. Configure OIDC trusted publishing for the package name `@tanstack/vue-start-server`
|
|
13
|
-
2. Enable secure, token-less publishing from CI/CD workflows
|
|
14
|
-
3. Establish provenance for packages published under this name
|
|
15
|
-
|
|
16
|
-
## What is OIDC Trusted Publishing?
|
|
17
|
-
|
|
18
|
-
OIDC trusted publishing allows package maintainers to publish packages directly from their CI/CD workflows without needing to manage npm access tokens. Instead, it uses OpenID Connect to establish trust between the CI/CD provider (like GitHub Actions) and npm.
|
|
19
|
-
|
|
20
|
-
## Setup Instructions
|
|
21
|
-
|
|
22
|
-
To properly configure OIDC trusted publishing for this package:
|
|
23
|
-
|
|
24
|
-
1. Go to [npmjs.com](https://www.npmjs.com/) and navigate to your package settings
|
|
25
|
-
2. Configure the trusted publisher (e.g., GitHub Actions)
|
|
26
|
-
3. Specify the repository and workflow that should be allowed to publish
|
|
27
|
-
4. Use the configured workflow to publish your actual package
|
|
28
|
-
|
|
29
|
-
## DO NOT USE THIS PACKAGE
|
|
30
|
-
|
|
31
|
-
This package is a placeholder for OIDC configuration only. It:
|
|
32
|
-
- Contains no executable code
|
|
33
|
-
- Provides no functionality
|
|
34
|
-
- Should not be installed as a dependency
|
|
35
|
-
- Exists only for administrative purposes
|
|
36
|
-
|
|
37
|
-
## More Information
|
|
38
|
-
|
|
39
|
-
For more details about npm's trusted publishing feature, see:
|
|
40
|
-
- [npm Trusted Publishing Documentation](https://docs.npmjs.com/generating-provenance-statements)
|
|
41
|
-
- [GitHub Actions OIDC Documentation](https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/about-security-hardening-with-openid-connect)
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
**Maintained for OIDC setup purposes only**
|