@modern-js/plugin-devtools 0.0.0-next-20240103032806 → 0.0.0-next-20240104031255
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/rpc/index.d.ts +3 -3
- package/dist/rpc/index.js +5 -7
- package/dist/types.d.ts +3 -0
- package/package.json +15 -13
package/dist/rpc/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ClientDefinition, type ClientFunctions, type ServerFunctions } from '@modern-js/devtools-kit';
|
|
2
2
|
import type { PartialDeep } from 'type-fest';
|
|
3
|
-
import type {
|
|
4
|
-
import { CliPluginAPI, InjectedHooks } from '../types';
|
|
3
|
+
import type { BuilderPlugin } from '@modern-js/builder-shared';
|
|
4
|
+
import { CliPluginAPI, BuilderPluginAPI, InjectedHooks } from '../types';
|
|
5
5
|
import { SocketServer } from '../utils/socket';
|
|
6
6
|
export interface SetupClientConnectionOptions {
|
|
7
7
|
api: CliPluginAPI;
|
|
@@ -10,6 +10,6 @@ export interface SetupClientConnectionOptions {
|
|
|
10
10
|
export declare const setupClientConnection: (options: SetupClientConnectionOptions) => Promise<{
|
|
11
11
|
client: import("birpc").BirpcReturn<ClientFunctions, ServerFunctions>;
|
|
12
12
|
hooks: InjectedHooks;
|
|
13
|
-
builderPlugin:
|
|
13
|
+
builderPlugin: BuilderPlugin<BuilderPluginAPI>;
|
|
14
14
|
setDefinition: (definition: PartialDeep<ClientDefinition>) => void;
|
|
15
15
|
}>;
|
package/dist/rpc/index.js
CHANGED
|
@@ -125,14 +125,12 @@ const setupClientConnection = async (options) => {
|
|
|
125
125
|
webpack: [
|
|
126
126
|
ctx.rootPath,
|
|
127
127
|
"@modern-js/app-tools",
|
|
128
|
-
"@modern-js/
|
|
129
|
-
"@rsbuild/webpack",
|
|
128
|
+
"@modern-js/builder-webpack-provider",
|
|
130
129
|
"webpack/package.json"
|
|
131
130
|
],
|
|
132
131
|
"@rspack/core": [
|
|
133
132
|
ctx.rootPath,
|
|
134
|
-
"@modern-js/
|
|
135
|
-
"@rsbuild/core",
|
|
133
|
+
"@modern-js/builder-rspack-provider",
|
|
136
134
|
"@rspack/core/package.json"
|
|
137
135
|
]
|
|
138
136
|
};
|
|
@@ -183,11 +181,11 @@ const setupClientConnection = async (options) => {
|
|
|
183
181
|
setup(api2) {
|
|
184
182
|
deferred.builder.context.resolve(import_lodash.default.cloneDeep(api2.context));
|
|
185
183
|
api2.modifyBundlerChain(() => {
|
|
186
|
-
deferred.builder.config.resolved.resolve(import_lodash.default.cloneDeep(api2.
|
|
184
|
+
deferred.builder.config.resolved.resolve(import_lodash.default.cloneDeep(api2.getBuilderConfig()));
|
|
187
185
|
deferred.builder.config.transformed.resolve(import_lodash.default.cloneDeep(api2.getNormalizedConfig()));
|
|
188
186
|
});
|
|
189
|
-
const modifyBundlerConfig =
|
|
190
|
-
const expectBundlerNum = import_lodash.default.castArray(api2.context.
|
|
187
|
+
const modifyBundlerConfig = "modifyWebpackConfig" in api2 ? api2.modifyWebpackConfig : api2.modifyRspackConfig;
|
|
188
|
+
const expectBundlerNum = import_lodash.default.castArray(api2.context.target).length;
|
|
191
189
|
const bundlerConfigs = [];
|
|
192
190
|
modifyBundlerConfig((config) => {
|
|
193
191
|
bundlerConfigs.push(config);
|
package/dist/types.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { BaseHooks } from '@modern-js/core';
|
|
3
|
+
import type { BuilderPluginAPI as WebpackBuilderAPI } from '@modern-js/builder-webpack-provider';
|
|
4
|
+
import type { BuilderPluginAPI as RspackBuilderAPI } from '@modern-js/builder-rspack-provider';
|
|
3
5
|
import type { AppTools, AppToolsHooks, CliPlugin } from '@modern-js/app-tools';
|
|
4
6
|
import type { ServerPlugin, ToThreads } from '@modern-js/server-core';
|
|
5
7
|
export type CliPluginAPI = Parameters<NonNullable<CliPlugin<AppTools>['setup']>>[0];
|
|
6
8
|
export type ServerPluginAPI = Parameters<NonNullable<ServerPlugin['setup']>>[0];
|
|
9
|
+
export type BuilderPluginAPI = WebpackBuilderAPI | RspackBuilderAPI;
|
|
7
10
|
export type BufferLike = string | Buffer | DataView | number | ArrayBufferView | Uint8Array | ArrayBuffer | SharedArrayBuffer | ReadonlyArray<any> | ReadonlyArray<number> | {
|
|
8
11
|
valueOf: () => ArrayBuffer;
|
|
9
12
|
} | {
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-20240104031255",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/index.d.ts",
|
|
21
21
|
"main": "./dist/index.js",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"p-defer": "^3.0.0",
|
|
46
46
|
"ws": "^8.13.0",
|
|
47
47
|
"ufo": "^1.3.0",
|
|
48
|
-
"@modern-js/devtools-kit": "0.0.0-next-
|
|
49
|
-
"@modern-js/
|
|
50
|
-
"@modern-js/
|
|
48
|
+
"@modern-js/devtools-kit": "0.0.0-next-20240104031255",
|
|
49
|
+
"@modern-js/devtools-client": "0.0.0-next-20240104031255",
|
|
50
|
+
"@modern-js/utils": "0.0.0-next-20240104031255"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/serve-static": "^1.13.10",
|
|
@@ -56,17 +56,19 @@
|
|
|
56
56
|
"@types/ws": "^8.5.5",
|
|
57
57
|
"type-fest": "^4.1.0",
|
|
58
58
|
"typescript": "^5",
|
|
59
|
-
"@modern-js/app-tools": "0.0.0-next-
|
|
60
|
-
"@modern-js/
|
|
61
|
-
"@modern-js/
|
|
62
|
-
"@modern-js/
|
|
63
|
-
"@modern-js/
|
|
64
|
-
"@modern-js/
|
|
65
|
-
"@
|
|
66
|
-
"@modern-js/
|
|
59
|
+
"@modern-js/app-tools": "0.0.0-next-20240104031255",
|
|
60
|
+
"@modern-js/core": "0.0.0-next-20240104031255",
|
|
61
|
+
"@modern-js/module-tools": "0.0.0-next-20240104031255",
|
|
62
|
+
"@modern-js/runtime": "0.0.0-next-20240104031255",
|
|
63
|
+
"@modern-js/server-core": "0.0.0-next-20240104031255",
|
|
64
|
+
"@modern-js/types": "0.0.0-next-20240104031255",
|
|
65
|
+
"@modern-js/builder-webpack-provider": "0.0.0-next-20240104031255",
|
|
66
|
+
"@modern-js/builder-rspack-provider": "0.0.0-next-20240104031255",
|
|
67
|
+
"@modern-js/builder-shared": "0.0.0-next-20240104031255",
|
|
68
|
+
"@scripts/build": "0.0.0-next-20240104031255"
|
|
67
69
|
},
|
|
68
70
|
"peerDependencies": {
|
|
69
|
-
"@modern-js/runtime": "0.0.0-next-
|
|
71
|
+
"@modern-js/runtime": "0.0.0-next-20240104031255"
|
|
70
72
|
},
|
|
71
73
|
"peerDependenciesMeta": {
|
|
72
74
|
"@modern-js/runtime": {
|