@rsdoctor/rspack-plugin 1.5.8 → 1.5.10
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/constants.d.cts +64 -0
- package/dist/constants.d.ts +8 -3
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -0
- package/dist/index.js +1 -1
- package/dist/multiple.d.cts +9 -0
- package/dist/plugin.d.cts +25 -0
- package/dist/types/index.d.cts +22 -0
- package/package.json +15 -10
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { Tap } from 'tapable';
|
|
2
|
+
export declare const pluginTapName = "RsdoctorRspackPlugin";
|
|
3
|
+
export declare const pluginTapPostOptions: Tap;
|
|
4
|
+
export declare const pluginTapPreOptions: Tap;
|
|
5
|
+
export declare const internalPluginTapPreOptions: (namespace: string) => Tap;
|
|
6
|
+
export declare const internalPluginTapPostOptions: (namespace: string) => Tap;
|
|
7
|
+
export declare const pkg: {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
repository: {
|
|
11
|
+
type: string;
|
|
12
|
+
url: string;
|
|
13
|
+
directory: string;
|
|
14
|
+
};
|
|
15
|
+
license: string;
|
|
16
|
+
main: string;
|
|
17
|
+
types: string;
|
|
18
|
+
files: string[];
|
|
19
|
+
exports: {
|
|
20
|
+
".": {
|
|
21
|
+
import: {
|
|
22
|
+
types: string;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
require: {
|
|
26
|
+
types: string;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
type: string;
|
|
32
|
+
scripts: {
|
|
33
|
+
dev: string;
|
|
34
|
+
start: string;
|
|
35
|
+
build: string;
|
|
36
|
+
test: string;
|
|
37
|
+
};
|
|
38
|
+
dependencies: {
|
|
39
|
+
"@rsdoctor/core": string;
|
|
40
|
+
"@rsdoctor/graph": string;
|
|
41
|
+
"@rsdoctor/sdk": string;
|
|
42
|
+
"@rsdoctor/types": string;
|
|
43
|
+
"@rsdoctor/utils": string;
|
|
44
|
+
};
|
|
45
|
+
devDependencies: {
|
|
46
|
+
"@rspack/core": string;
|
|
47
|
+
"@types/node": string;
|
|
48
|
+
"@types/tapable": string;
|
|
49
|
+
tslib: string;
|
|
50
|
+
typescript: string;
|
|
51
|
+
};
|
|
52
|
+
peerDependencies: {
|
|
53
|
+
"@rspack/core": string;
|
|
54
|
+
};
|
|
55
|
+
peerDependenciesMeta: {
|
|
56
|
+
"@rspack/core": {
|
|
57
|
+
optional: boolean;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
publishConfig: {
|
|
61
|
+
access: string;
|
|
62
|
+
registry: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -18,9 +18,14 @@ export declare const pkg: {
|
|
|
18
18
|
files: string[];
|
|
19
19
|
exports: {
|
|
20
20
|
".": {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
import: {
|
|
22
|
+
types: string;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
require: {
|
|
26
|
+
types: string;
|
|
27
|
+
default: string;
|
|
28
|
+
};
|
|
24
29
|
};
|
|
25
30
|
};
|
|
26
31
|
type: string;
|
package/dist/index.cjs
CHANGED
|
@@ -25,7 +25,7 @@ __webpack_require__.r(__webpack_exports__), __webpack_require__.d(__webpack_expo
|
|
|
25
25
|
RsdoctorRspackPlugin: ()=>RsdoctorRspackPlugin
|
|
26
26
|
});
|
|
27
27
|
const build_utils_namespaceObject = require("@rsdoctor/core/build-utils"), plugins_namespaceObject = require("@rsdoctor/core/plugins"), sdk_namespaceObject = require("@rsdoctor/sdk"), types_namespaceObject = require("@rsdoctor/types"), external_path_namespaceObject = require("path");
|
|
28
|
-
var external_path_default = __webpack_require__.n(external_path_namespaceObject), package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.
|
|
28
|
+
var external_path_default = __webpack_require__.n(external_path_namespaceObject), package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.10","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
29
29
|
const pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
30
30
|
name: pluginTapName,
|
|
31
31
|
stage: 999
|
package/dist/index.d.cts
ADDED
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import path from "path";
|
|
|
7
7
|
import { ModuleGraph } from "@rsdoctor/graph";
|
|
8
8
|
import { Loader as common_Loader } from "@rsdoctor/utils/common";
|
|
9
9
|
import { logger, time, timeEnd } from "@rsdoctor/utils/logger";
|
|
10
|
-
var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.
|
|
10
|
+
var package_namespaceObject = JSON.parse('{"name":"@rsdoctor/rspack-plugin","version":"1.5.10","repository":{"type":"git","url":"https://github.com/web-infra-dev/rsdoctor","directory":"packages/rspack-plugin"},"license":"MIT","main":"dist/index.cjs","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"type":"module","scripts":{"dev":"npm run start","start":"rslib build -w","build":"rslib build","test":"rstest run"},"dependencies":{"@rsdoctor/core":"workspace:*","@rsdoctor/graph":"workspace:*","@rsdoctor/sdk":"workspace:*","@rsdoctor/types":"workspace:*","@rsdoctor/utils":"workspace:*"},"devDependencies":{"@rspack/core":"catalog:","@types/node":"catalog:","@types/tapable":"catalog:","tslib":"catalog:","typescript":"catalog:"},"peerDependencies":{"@rspack/core":"*"},"peerDependenciesMeta":{"@rspack/core":{"optional":true}},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"}}');
|
|
11
11
|
let pluginTapName = 'RsdoctorRspackPlugin', pluginTapPostOptions = {
|
|
12
12
|
name: pluginTapName,
|
|
13
13
|
stage: 999
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RsdoctorMultiplePluginOptions } from '@rsdoctor/core/types';
|
|
2
|
+
import { type Linter } from '@rsdoctor/types';
|
|
3
|
+
import type { Compiler } from '@rspack/core';
|
|
4
|
+
import { RsdoctorRspackPlugin } from './plugin';
|
|
5
|
+
export declare class RsdoctorRspackMultiplePlugin<Rules extends Linter.ExtendRuleData[]> extends RsdoctorRspackPlugin<Rules> {
|
|
6
|
+
private controller;
|
|
7
|
+
constructor(options?: RsdoctorMultiplePluginOptions<Rules>);
|
|
8
|
+
apply(compiler: Compiler): void;
|
|
9
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { RsdoctorRspackPluginInstance, RsdoctorRspackPluginOptions, RsdoctorRspackPluginOptionsNormalized } from '@rsdoctor/core/types';
|
|
2
|
+
import { RsdoctorPrimarySDK } from '@rsdoctor/sdk';
|
|
3
|
+
import { Linter, Plugin, SDK } from '@rsdoctor/types';
|
|
4
|
+
export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]> implements RsdoctorRspackPluginInstance<Rules> {
|
|
5
|
+
readonly name = "RsdoctorRspackPlugin";
|
|
6
|
+
readonly sdk: SDK.RsdoctorBuilderSDKInstance | RsdoctorPrimarySDK;
|
|
7
|
+
readonly isRsdoctorPlugin: boolean;
|
|
8
|
+
_bootstrapTask: Promise<unknown>;
|
|
9
|
+
protected browserIsOpened: boolean;
|
|
10
|
+
modulesGraph: SDK.ModuleGraphInstance;
|
|
11
|
+
options: RsdoctorRspackPluginOptionsNormalized<Rules>;
|
|
12
|
+
outsideInstance: boolean;
|
|
13
|
+
constructor(options?: RsdoctorRspackPluginOptions<Rules>);
|
|
14
|
+
apply(compiler: unknown): unknown;
|
|
15
|
+
/**
|
|
16
|
+
* @description Generate ModuleGraph and ChunkGraph from stats and webpack module apis;
|
|
17
|
+
* @param {Compiler} compiler
|
|
18
|
+
* @return {*}
|
|
19
|
+
* @memberof RsdoctorWebpackPlugin
|
|
20
|
+
*/
|
|
21
|
+
ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
|
|
22
|
+
afterPlugins: (compiler: Plugin.BaseCompilerType<"rspack">) => void;
|
|
23
|
+
done: (compiler: Plugin.BaseCompilerType<"rspack">) => Promise<void>;
|
|
24
|
+
getRspackConfig(compiler: Plugin.BaseCompilerType<'rspack'>): void;
|
|
25
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Plugin } from '@rsdoctor/types';
|
|
2
|
+
import type { RspackPluginInstance } from '@rspack/core';
|
|
3
|
+
export interface RsdoctorRspackPluginOptions {
|
|
4
|
+
/**
|
|
5
|
+
* turn on it if you don't need to see profile in browser.
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
disableClientServer?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* the switch for the Rsdoctor features.
|
|
11
|
+
*/
|
|
12
|
+
features?: Plugin.RsdoctorWebpackPluginOptions<[]>['features'];
|
|
13
|
+
/**
|
|
14
|
+
* configuration of the interceptor for webpack loaders.
|
|
15
|
+
* @description worked when the `features.loader === true`.
|
|
16
|
+
*/
|
|
17
|
+
loaderInterceptorOptions?: Plugin.RsdoctorWebpackPluginOptions<[
|
|
18
|
+
]>['loaderInterceptorOptions'];
|
|
19
|
+
}
|
|
20
|
+
export interface RsdoctorRspackPluginInstance extends RspackPluginInstance {
|
|
21
|
+
readonly name: string;
|
|
22
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/rspack-plugin",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -14,21 +14,26 @@
|
|
|
14
14
|
],
|
|
15
15
|
"exports": {
|
|
16
16
|
".": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/index.d.cts",
|
|
23
|
+
"default": "./dist/index.cjs"
|
|
24
|
+
}
|
|
20
25
|
}
|
|
21
26
|
},
|
|
22
27
|
"type": "module",
|
|
23
28
|
"dependencies": {
|
|
24
|
-
"@rsdoctor/core": "1.5.
|
|
25
|
-
"@rsdoctor/
|
|
26
|
-
"@rsdoctor/types": "1.5.
|
|
27
|
-
"@rsdoctor/
|
|
28
|
-
"@rsdoctor/
|
|
29
|
+
"@rsdoctor/core": "1.5.10",
|
|
30
|
+
"@rsdoctor/sdk": "1.5.10",
|
|
31
|
+
"@rsdoctor/types": "1.5.10",
|
|
32
|
+
"@rsdoctor/graph": "1.5.10",
|
|
33
|
+
"@rsdoctor/utils": "1.5.10"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
|
-
"@rspack/core": "2.0.0
|
|
36
|
+
"@rspack/core": "2.0.0",
|
|
32
37
|
"@types/node": "^22.8.1",
|
|
33
38
|
"@types/tapable": "2.3.0",
|
|
34
39
|
"tslib": "2.8.1",
|