@nestbridge/vite 2.6.1 → 3.0.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/CHANGELOG.md +8 -0
- package/README.md +10 -8
- package/build/nestbridge.vite.js +1 -1
- package/build/nestbridge.vite.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -42,8 +42,9 @@ export default defineConfig({
|
|
|
42
42
|
},
|
|
43
43
|
plugins: [
|
|
44
44
|
nestBridge({
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
root: '../server',
|
|
46
|
+
controllers: 'src/**/*.controller.ts',
|
|
47
|
+
resolvers: 'src/**/*.resolver.ts',
|
|
47
48
|
baseURL: '/api',
|
|
48
49
|
}),
|
|
49
50
|
],
|
|
@@ -59,7 +60,7 @@ files so the plugin can intercept them. A matching `paths` entry in
|
|
|
59
60
|
{
|
|
60
61
|
"compilerOptions": {
|
|
61
62
|
"paths": {
|
|
62
|
-
"@server/*": ["../../../.nestbridge/
|
|
63
|
+
"@server/*": ["../../../.nestbridge/web-server/src/*"]
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
66
|
}
|
|
@@ -94,8 +95,9 @@ nestBridge([
|
|
|
94
95
|
```
|
|
95
96
|
|
|
96
97
|
A relative `root` resolves against Vite's `root`. Declarations land in
|
|
97
|
-
`<outputDir>/<name
|
|
98
|
-
|
|
98
|
+
`<outputDir>/<package name>/` — named after the package at each `root`, not after
|
|
99
|
+
`name` — so add one alias and one `paths` entry per app
|
|
100
|
+
(`"@identity/*": ["../../.nestbridge/identity-server/src/*"]`), and each app keeps its own
|
|
99
101
|
`baseURL`, bootstrap file, global prefix and versioning. See
|
|
100
102
|
[Several server apps](../../README.md#several-server-apps) in the repository
|
|
101
103
|
README, and [`MIGRATION.md`](../../MIGRATION.md) when upgrading from 2.1.
|
|
@@ -104,7 +106,7 @@ README, and [`MIGRATION.md`](../../MIGRATION.md) when upgrading from 2.1.
|
|
|
104
106
|
|
|
105
107
|
```ts
|
|
106
108
|
interface NestBridgeOptions {
|
|
107
|
-
name?: string; // names the server app; required, and unique, when you pass several apps
|
|
109
|
+
name?: string; // names the server app's runtime service; required, and unique, when you pass several apps; does not affect declaration paths
|
|
108
110
|
controllers: string | string[]; // glob(s), resolved relative to `root`
|
|
109
111
|
resolvers?: string | string[]; // glob(s) for GraphQL resolvers; defaults to none
|
|
110
112
|
baseURL?: string; // origin (or mount path) for this app's REST requests and its default GraphQL endpoint; applied to the runtime automatically
|
|
@@ -113,8 +115,8 @@ interface NestBridgeOptions {
|
|
|
113
115
|
versioning?: VersioningOption | false; // replaces the versioning read from `enableVersioning()`; `false` ignores it
|
|
114
116
|
debug?: boolean; // logs discovery/analysis/watch activity
|
|
115
117
|
logLevel?: 'info' | 'warn' | 'error' | 'silent'; // how much the plugin logs; defaults to the bundler's own level (Vite's logLevel, webpack's infrastructureLogging.level)
|
|
116
|
-
outputDir?: string; // defaults to ".nestbridge" at the workspace root (nearest nx.json / pnpm-workspace.yaml / turbo.json / lerna.json / package.json with "workspaces"), or at the project root when there is no workspace; an explicit value is resolved from the bundler's own root
|
|
117
|
-
root?: string; // base for
|
|
118
|
+
outputDir?: string; // defaults to ".nestbridge" at the workspace root (nearest nx.json / pnpm-workspace.yaml / turbo.json / lerna.json / package.json with "workspaces"), or at the project root when there is no workspace; an explicit value is resolved from the bundler's own root; either way a server's declarations go into <outputDir>/<its package name>/
|
|
119
|
+
root?: string; // the server package; its package.json needs a "name", which names the declarations folder; base directory for its controllers, resolvers and bootstrap file; relative paths resolve against the bundler's root (process.cwd() under webpack), which is also the default
|
|
118
120
|
}
|
|
119
121
|
|
|
120
122
|
interface GlobalPrefixOption {
|
package/build/nestbridge.vite.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestbridge.vite.js","names":[],"sources":["../package.json","../src/version.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@nestbridge/vite\",\n \"version\": \"
|
|
1
|
+
{"version":3,"file":"nestbridge.vite.js","names":[],"sources":["../package.json","../src/version.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@nestbridge/vite\",\n \"version\": \"3.0.0\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/MDReal32/nestbridge.git\",\n \"directory\": \"packages/vite\"\n },\n \"main\": \"./build/nestbridge.vite.js\",\n \"types\": \"./build/nestbridge.vite.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./build/nestbridge.vite.d.ts\",\n \"import\": \"./build/nestbridge.vite.js\"\n }\n },\n \"files\": [\n \"build\"\n ],\n \"scripts\": {\n \"build\": \"vite build\",\n \"test\": \"vitest run\",\n \"typecheck\": \"tsc -p tsconfig.json --noEmit\",\n \"lint\": \"biome check .\"\n },\n \"dependencies\": {\n \"@nestbridge/unplugin\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/node\": \"^26.4.1\",\n \"rolldown-plugin-dts\": \"^0.28.5\",\n \"typescript\": \"^7.0.2\",\n \"vite\": \"^8.2.2\",\n \"vitest\": \"^5.0.0\"\n },\n \"peerDependencies\": {\n \"vite\": \"^8.2.2\"\n }\n}\n","import { version } from '../package.json';\n\nexport const VERSION: string = version;\n","import { type NestBridgePluginOptions, nestBridgeUnplugin } from '@nestbridge/unplugin';\nimport type { Plugin } from 'vite';\n\nexport type {\n GlobalPrefixOption,\n NestBridgeLogLevel,\n NestBridgeOptions,\n NestBridgePluginOptions,\n VersioningOption,\n} from '@nestbridge/unplugin';\nexport const nestBridge: (options: NestBridgePluginOptions) => Plugin = nestBridgeUnplugin.vite;\nexport { VERSION } from './version';\n"],"mappings":";;;ACEA,IAAa,UAAkB;;;ACQ/B,IAAa,aAA2D,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestbridge/vite",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"lint": "biome check ."
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@nestbridge/unplugin": "
|
|
29
|
+
"@nestbridge/unplugin": "3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.4.1",
|