@nestbridge/vite 2.1.3 → 2.1.4

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @nestbridge/vite
2
2
 
3
+ ## 2.1.4
4
+
5
+ ### Patch Changes
6
+
7
+ - @nestbridge/unplugin@2.1.4
8
+
3
9
  ## 2.1.3
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -18,9 +18,14 @@ This plugin is a thin `vite` binding around the bundler-agnostic
18
18
 
19
19
  ```bash
20
20
  yarn add -D @nestbridge/vite
21
- yarn add @nestbridge/runtime
21
+ yarn add nestbridge
22
22
  ```
23
23
 
24
+ The generated client modules and declarations import from `nestbridge`, so it
25
+ has to be a direct dependency of your app. If you would rather have one
26
+ dependency, `yarn add nestbridge` alone is enough: import the plugin from
27
+ `nestbridge/vite` (its default export) instead of `@nestbridge/vite`.
28
+
24
29
  ## Setup
25
30
 
26
31
  ```ts
@@ -53,7 +58,6 @@ files so the plugin can intercept them. A matching `paths` entry in
53
58
  ```json
54
59
  {
55
60
  "compilerOptions": {
56
- "baseUrl": ".",
57
61
  "paths": {
58
62
  "@server/*": ["./.nestbridge/server/src/*"]
59
63
  }
@@ -61,6 +65,9 @@ files so the plugin can intercept them. A matching `paths` entry in
61
65
  }
62
66
  ```
63
67
 
68
+ `paths` entries resolve relative to the `tsconfig.json` that declares them, so
69
+ no `baseUrl` is needed (TypeScript 7 removed that option).
70
+
64
71
  Add `.nestbridge/` (or your configured `outputDir`) to `.gitignore` — it's
65
72
  regenerated on every build and on every dev-server start.
66
73
 
@@ -68,11 +75,12 @@ regenerated on every build and on every dev-server start.
68
75
 
69
76
  ```ts
70
77
  interface NestBridgeOptions {
71
- controllers: string | string[]; // glob(s), resolved relative to the Vite root
78
+ controllers: string | string[]; // glob(s), resolved relative to `root`
72
79
  resolvers?: string | string[]; // glob(s) for GraphQL resolvers; defaults to none
73
- baseURL?: string; // informational; call configureNestBridge for the runtime effect
74
- debug?: boolean; // logs discovery/analysis/HMR activity
75
- outputDir?: string; // defaults to ".nestbridge"
80
+ baseURL?: string; // prefix for REST requests and the default GraphQL endpoint; applied to the runtime automatically
81
+ debug?: boolean; // logs discovery/analysis/watch activity
82
+ outputDir?: string; // defaults to ".nestbridge", resolved from the Vite root — independent of `root`
83
+ root?: string; // base for discovering controllers/resolvers and the bootstrap file; defaults to the Vite root
76
84
  }
77
85
  ```
78
86
 
@@ -80,9 +88,11 @@ Using webpack instead of Vite? See [`@nestbridge/webpack`'s README](../webpack/R
80
88
  for the equivalent setup — same options, same generated output, different
81
89
  bundler.
82
90
 
83
- Don't forget to call `configureNestBridge` from `@nestbridge/runtime` — this
84
- option only affects generated path text, not the runtime `fetch()`/GraphQL
85
- config (`baseURL`/`graphqlEndpoint`).
91
+ `baseURL` needs no extra runtime code: the plugin generates a module that
92
+ calls `setNestBridgeBaseURL(baseURL)` from `nestbridge`, and every generated
93
+ controller and resolver module imports it. Use `configureNestBridge` from
94
+ `nestbridge` only for headers, a custom `fetch`, or an explicit
95
+ `graphqlEndpoint`.
86
96
 
87
97
  ## License
88
98
 
@@ -1,7 +1,7 @@
1
1
  import { nestBridgeUnplugin } from "@nestbridge/unplugin";
2
2
  //#endregion
3
3
  //#region src/version.ts
4
- var VERSION = "2.1.3";
4
+ var VERSION = "2.1.4";
5
5
  //#endregion
6
6
  //#region src/main.ts
7
7
  var nestBridge = nestBridgeUnplugin.vite;
@@ -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\": \"2.1.3\",\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 NestBridgeOptions, nestBridgeUnplugin } from '@nestbridge/unplugin';\nimport type { Plugin } from 'vite';\n\nexport type { NestBridgeOptions } from '@nestbridge/unplugin';\nexport const nestBridge: (options: NestBridgeOptions) => Plugin = nestBridgeUnplugin.vite;\nexport { VERSION } from './version';\n"],"mappings":";;;ACEA,IAAa,UAAkB;;;ACE/B,IAAa,aAAqD,mBAAmB"}
1
+ {"version":3,"file":"nestbridge.vite.js","names":[],"sources":["../package.json","../src/version.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@nestbridge/vite\",\n \"version\": \"2.1.4\",\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 NestBridgeOptions, nestBridgeUnplugin } from '@nestbridge/unplugin';\nimport type { Plugin } from 'vite';\n\nexport type { NestBridgeOptions } from '@nestbridge/unplugin';\nexport const nestBridge: (options: NestBridgeOptions) => Plugin = nestBridgeUnplugin.vite;\nexport { VERSION } from './version';\n"],"mappings":";;;ACEA,IAAa,UAAkB;;;ACE/B,IAAa,aAAqD,mBAAmB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nestbridge/vite",
3
- "version": "2.1.3",
3
+ "version": "2.1.4",
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": "2.1.3"
29
+ "@nestbridge/unplugin": "2.1.4"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@types/node": "^26.4.1",