@nestbridge/webpack 2.6.1 → 3.1.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 +15 -0
- package/README.md +11 -9
- package/build/nestbridge.webpack.js +1 -1
- package/build/nestbridge.webpack.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @nestbridge/webpack
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [531bf3e]
|
|
8
|
+
- @nestbridge/unplugin@3.1.0
|
|
9
|
+
|
|
10
|
+
## 3.0.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [b5009b4]
|
|
15
|
+
- Updated dependencies [b5009b4]
|
|
16
|
+
- @nestbridge/unplugin@3.0.0
|
|
17
|
+
|
|
3
18
|
## 2.6.1
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -45,8 +45,9 @@ module.exports = {
|
|
|
45
45
|
},
|
|
46
46
|
plugins: [
|
|
47
47
|
nestBridge({
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
root: '../server',
|
|
49
|
+
controllers: 'src/**/*.controller.ts',
|
|
50
|
+
resolvers: 'src/**/*.resolver.ts',
|
|
50
51
|
baseURL: '/api',
|
|
51
52
|
}),
|
|
52
53
|
],
|
|
@@ -62,7 +63,7 @@ files so the plugin can intercept them. A matching `paths` entry in
|
|
|
62
63
|
{
|
|
63
64
|
"compilerOptions": {
|
|
64
65
|
"paths": {
|
|
65
|
-
"@server/*": ["../../../.nestbridge/
|
|
66
|
+
"@server/*": ["../../../.nestbridge/web-server/src/*"]
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
}
|
|
@@ -102,8 +103,9 @@ nestBridge([
|
|
|
102
103
|
```
|
|
103
104
|
|
|
104
105
|
A relative `root` resolves against `process.cwd()`. Declarations land in
|
|
105
|
-
`<outputDir>/<name
|
|
106
|
-
|
|
106
|
+
`<outputDir>/<package name>/` — named after the package at each `root`, not after
|
|
107
|
+
`name` — so add one `resolve.alias` and one `paths` entry per app
|
|
108
|
+
(`"@identity/*": ["../../.nestbridge/identity-server/src/*"]`), and each app keeps its own
|
|
107
109
|
`baseURL`, bootstrap file, global prefix and versioning. See
|
|
108
110
|
[Several server apps](../../README.md#several-server-apps) in the repository
|
|
109
111
|
README, and [`MIGRATION.md`](../../MIGRATION.md) when upgrading from 2.1.
|
|
@@ -112,18 +114,18 @@ README, and [`MIGRATION.md`](../../MIGRATION.md) when upgrading from 2.1.
|
|
|
112
114
|
|
|
113
115
|
```ts
|
|
114
116
|
interface NestBridgeOptions {
|
|
115
|
-
name?: string; // names the server app; required, and unique, when you pass several apps
|
|
117
|
+
name?: string; // names the server app's runtime service; required, and unique, when you pass several apps; does not affect declaration paths
|
|
116
118
|
controllers: string | string[]; // glob(s), resolved relative to `root`
|
|
117
119
|
resolvers?: string | string[]; // glob(s) for GraphQL resolvers; defaults to none
|
|
118
|
-
messagePatterns?: boolean; //
|
|
120
|
+
messagePatterns?: boolean; // generates client methods for the @EventPattern/@MessagePattern handlers of `controllers`; needs `name`; defaults to false; declarations always include them
|
|
119
121
|
baseURL?: string; // origin (or mount path) for this app's REST requests and its default GraphQL endpoint; applied to the runtime automatically
|
|
120
122
|
bootstrap?: string; // the app's bootstrap file, relative to `root`; skips the `main.ts` search
|
|
121
123
|
globalPrefix?: string | GlobalPrefixOption | false; // replaces the prefix read from `setGlobalPrefix()`; `false` ignores it
|
|
122
124
|
versioning?: VersioningOption | false; // replaces the versioning read from `enableVersioning()`; `false` ignores it
|
|
123
125
|
debug?: boolean; // logs discovery/analysis/watch activity
|
|
124
126
|
logLevel?: 'info' | 'warn' | 'error' | 'silent'; // how much the plugin logs; defaults to the bundler's own level (Vite's logLevel, webpack's infrastructureLogging.level)
|
|
125
|
-
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
|
|
126
|
-
root?: string; // base for
|
|
127
|
+
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>/
|
|
128
|
+
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
|
|
127
129
|
}
|
|
128
130
|
|
|
129
131
|
interface GlobalPrefixOption {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nestbridge.webpack.js","names":[],"sources":["../package.json","../src/version.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@nestbridge/webpack\",\n \"version\": \"
|
|
1
|
+
{"version":3,"file":"nestbridge.webpack.js","names":[],"sources":["../package.json","../src/version.ts","../src/main.ts"],"sourcesContent":["{\n \"name\": \"@nestbridge/webpack\",\n \"version\": \"3.1.0\",\n \"type\": \"module\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/MDReal32/nestbridge.git\",\n \"directory\": \"packages/webpack\"\n },\n \"main\": \"./build/nestbridge.webpack.js\",\n \"types\": \"./build/nestbridge.webpack.d.ts\",\n \"exports\": {\n \".\": {\n \"types\": \"./build/nestbridge.webpack.d.ts\",\n \"import\": \"./build/nestbridge.webpack.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 \"esbuild-loader\": \"^4.5.0\",\n \"rolldown-plugin-dts\": \"^0.28.5\",\n \"typescript\": \"^7.0.2\",\n \"vite\": \"^8.2.2\",\n \"vitest\": \"^5.0.0\",\n \"webpack\": \"^5.110.3\"\n },\n \"peerDependencies\": {\n \"webpack\": \"^5.110.3\"\n }\n}\n","import { version } from '../package.json';\n\nexport const VERSION: string = version;\n","import { type NestBridgePluginOptions, nestBridgeUnplugin } from '@nestbridge/unplugin';\nimport type { WebpackPluginInstance } from 'webpack';\n\nexport type {\n GlobalPrefixOption,\n NestBridgeLogLevel,\n NestBridgeOptions,\n NestBridgePluginOptions,\n VersioningOption,\n} from '@nestbridge/unplugin';\nexport const nestBridge: (options: NestBridgePluginOptions) => WebpackPluginInstance =\n nestBridgeUnplugin.webpack;\nexport { VERSION } from './version';\n"],"mappings":";;;ACEA,IAAa,UAAkB;;;ACQ/B,IAAa,aACX,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nestbridge/webpack",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.1.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.1.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/node": "^26.4.1",
|