@rsdoctor/core 0.0.0-next-20240620044732
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/LICENSE +21 -0
- package/README.md +22 -0
- package/dist/build-utils/build/chunks/assetsModules.d.ts +4 -0
- package/dist/build-utils/build/chunks/assetsModules.d.ts.map +1 -0
- package/dist/build-utils/build/chunks/assetsModules.js +36 -0
- package/dist/build-utils/build/chunks/chunkTransform.d.ts +5 -0
- package/dist/build-utils/build/chunks/chunkTransform.d.ts.map +1 -0
- package/dist/build-utils/build/chunks/chunkTransform.js +31 -0
- package/dist/build-utils/build/chunks/generateTileGraph.d.ts +11 -0
- package/dist/build-utils/build/chunks/generateTileGraph.d.ts.map +1 -0
- package/dist/build-utils/build/chunks/generateTileGraph.js +71 -0
- package/dist/build-utils/build/chunks/index.d.ts +4 -0
- package/dist/build-utils/build/chunks/index.d.ts.map +1 -0
- package/dist/build-utils/build/chunks/index.js +26 -0
- package/dist/build-utils/build/index.d.ts +5 -0
- package/dist/build-utils/build/index.d.ts.map +1 -0
- package/dist/build-utils/build/index.js +47 -0
- package/dist/build-utils/build/module-graph/index.d.ts +4 -0
- package/dist/build-utils/build/module-graph/index.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/index.js +26 -0
- package/dist/build-utils/build/module-graph/parser.d.ts +3 -0
- package/dist/build-utils/build/module-graph/parser.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/parser.js +44 -0
- package/dist/build-utils/build/module-graph/transform.d.ts +5 -0
- package/dist/build-utils/build/module-graph/transform.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/transform.js +37 -0
- package/dist/build-utils/build/module-graph/treeShaking.d.ts +4 -0
- package/dist/build-utils/build/module-graph/treeShaking.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/treeShaking.js +132 -0
- package/dist/build-utils/build/module-graph/utils.d.ts +4 -0
- package/dist/build-utils/build/module-graph/utils.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/utils.js +113 -0
- package/dist/build-utils/build/module-graph/webpack/transform.d.ts +12 -0
- package/dist/build-utils/build/module-graph/webpack/transform.d.ts.map +1 -0
- package/dist/build-utils/build/module-graph/webpack/transform.js +195 -0
- package/dist/build-utils/build/utils/index.d.ts +4 -0
- package/dist/build-utils/build/utils/index.d.ts.map +1 -0
- package/dist/build-utils/build/utils/index.js +26 -0
- package/dist/build-utils/build/utils/loader.d.ts +19 -0
- package/dist/build-utils/build/utils/loader.d.ts.map +1 -0
- package/dist/build-utils/build/utils/loader.js +299 -0
- package/dist/build-utils/build/utils/parseBundle.d.ts +13 -0
- package/dist/build-utils/build/utils/parseBundle.d.ts.map +1 -0
- package/dist/build-utils/build/utils/parseBundle.js +367 -0
- package/dist/build-utils/build/utils/plugin.d.ts +6 -0
- package/dist/build-utils/build/utils/plugin.d.ts.map +1 -0
- package/dist/build-utils/build/utils/plugin.js +63 -0
- package/dist/build-utils/common/chunks/assetsContent.d.ts +5 -0
- package/dist/build-utils/common/chunks/assetsContent.d.ts.map +1 -0
- package/dist/build-utils/common/chunks/assetsContent.js +34 -0
- package/dist/build-utils/common/chunks/assetsModules.d.ts +24 -0
- package/dist/build-utils/common/chunks/assetsModules.d.ts.map +1 -0
- package/dist/build-utils/common/chunks/assetsModules.js +107 -0
- package/dist/build-utils/common/chunks/chunkTransform.d.ts +6 -0
- package/dist/build-utils/common/chunks/chunkTransform.d.ts.map +1 -0
- package/dist/build-utils/common/chunks/chunkTransform.js +73 -0
- package/dist/build-utils/common/chunks/index.d.ts +4 -0
- package/dist/build-utils/common/chunks/index.d.ts.map +1 -0
- package/dist/build-utils/common/chunks/index.js +26 -0
- package/dist/build-utils/common/index.d.ts +6 -0
- package/dist/build-utils/common/index.d.ts.map +1 -0
- package/dist/build-utils/common/index.js +50 -0
- package/dist/build-utils/common/module-graph/compatible.d.ts +10 -0
- package/dist/build-utils/common/module-graph/compatible.d.ts.map +1 -0
- package/dist/build-utils/common/module-graph/compatible.js +63 -0
- package/dist/build-utils/common/module-graph/index.d.ts +4 -0
- package/dist/build-utils/common/module-graph/index.d.ts.map +1 -0
- package/dist/build-utils/common/module-graph/index.js +26 -0
- package/dist/build-utils/common/module-graph/transform.d.ts +8 -0
- package/dist/build-utils/common/module-graph/transform.d.ts.map +1 -0
- package/dist/build-utils/common/module-graph/transform.js +200 -0
- package/dist/build-utils/common/module-graph/utils.d.ts +16 -0
- package/dist/build-utils/common/module-graph/utils.d.ts.map +1 -0
- package/dist/build-utils/common/module-graph/utils.js +62 -0
- package/dist/build-utils/common/trans-utils/index.d.ts +2 -0
- package/dist/build-utils/common/trans-utils/index.d.ts.map +1 -0
- package/dist/build-utils/common/trans-utils/index.js +22 -0
- package/dist/build-utils/common/trans-utils/transStats.d.ts +7 -0
- package/dist/build-utils/common/trans-utils/transStats.d.ts.map +1 -0
- package/dist/build-utils/common/trans-utils/transStats.js +35 -0
- package/dist/build-utils/common/webpack/compatible.d.ts +27 -0
- package/dist/build-utils/common/webpack/compatible.d.ts.map +1 -0
- package/dist/build-utils/common/webpack/compatible.js +181 -0
- package/dist/build-utils/index.d.ts +3 -0
- package/dist/build-utils/index.d.ts.map +1 -0
- package/dist/build-utils/index.js +41 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +43 -0
- package/dist/inner-plugins/constants.d.ts +7 -0
- package/dist/inner-plugins/constants.d.ts.map +1 -0
- package/dist/inner-plugins/constants.js +52 -0
- package/dist/inner-plugins/index.d.ts +3 -0
- package/dist/inner-plugins/index.d.ts.map +1 -0
- package/dist/inner-plugins/index.js +24 -0
- package/dist/inner-plugins/loaders/proxy.d.ts +5 -0
- package/dist/inner-plugins/loaders/proxy.d.ts.map +1 -0
- package/dist/inner-plugins/loaders/proxy.js +115 -0
- package/dist/inner-plugins/plugins/base.d.ts +14 -0
- package/dist/inner-plugins/plugins/base.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/base.js +45 -0
- package/dist/inner-plugins/plugins/bundle.d.ts +15 -0
- package/dist/inner-plugins/plugins/bundle.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/bundle.js +92 -0
- package/dist/inner-plugins/plugins/bundleTagPlugin.d.ts +7 -0
- package/dist/inner-plugins/plugins/bundleTagPlugin.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/bundleTagPlugin.js +81 -0
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts +10 -0
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/ensureModulesChunkGraph.js +126 -0
- package/dist/inner-plugins/plugins/errors.d.ts +12 -0
- package/dist/inner-plugins/plugins/errors.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/errors.js +85 -0
- package/dist/inner-plugins/plugins/index.d.ts +11 -0
- package/dist/inner-plugins/plugins/index.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/index.js +40 -0
- package/dist/inner-plugins/plugins/loader.d.ts +12 -0
- package/dist/inner-plugins/plugins/loader.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/loader.js +161 -0
- package/dist/inner-plugins/plugins/plugins.d.ts +9 -0
- package/dist/inner-plugins/plugins/plugins.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/plugins.js +60 -0
- package/dist/inner-plugins/plugins/progress.d.ts +9 -0
- package/dist/inner-plugins/plugins/progress.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/progress.js +59 -0
- package/dist/inner-plugins/plugins/rules.d.ts +9 -0
- package/dist/inner-plugins/plugins/rules.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/rules.js +85 -0
- package/dist/inner-plugins/plugins/summary.d.ts +15 -0
- package/dist/inner-plugins/plugins/summary.d.ts.map +1 -0
- package/dist/inner-plugins/plugins/summary.js +115 -0
- package/dist/inner-plugins/utils/circleDetect.d.ts +5 -0
- package/dist/inner-plugins/utils/circleDetect.d.ts.map +1 -0
- package/dist/inner-plugins/utils/circleDetect.js +42 -0
- package/dist/inner-plugins/utils/config.d.ts +8 -0
- package/dist/inner-plugins/utils/config.d.ts.map +1 -0
- package/dist/inner-plugins/utils/config.js +151 -0
- package/dist/inner-plugins/utils/index.d.ts +6 -0
- package/dist/inner-plugins/utils/index.d.ts.map +1 -0
- package/dist/inner-plugins/utils/index.js +30 -0
- package/dist/inner-plugins/utils/loader.d.ts +12 -0
- package/dist/inner-plugins/utils/loader.d.ts.map +1 -0
- package/dist/inner-plugins/utils/loader.js +201 -0
- package/dist/inner-plugins/utils/plugin.d.ts +6 -0
- package/dist/inner-plugins/utils/plugin.d.ts.map +1 -0
- package/dist/inner-plugins/utils/plugin.js +126 -0
- package/dist/inner-plugins/utils/sdk.d.ts +4 -0
- package/dist/inner-plugins/utils/sdk.d.ts.map +1 -0
- package/dist/inner-plugins/utils/sdk.js +43 -0
- package/dist/rules/index.d.ts +4 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +33 -0
- package/dist/rules/linter.d.ts +10 -0
- package/dist/rules/linter.d.ts.map +1 -0
- package/dist/rules/linter.js +74 -0
- package/dist/rules/rule.d.ts +28 -0
- package/dist/rules/rule.d.ts.map +1 -0
- package/dist/rules/rule.js +143 -0
- package/dist/rules/rules/default-import-check/index.d.ts +5 -0
- package/dist/rules/rules/default-import-check/index.d.ts.map +1 -0
- package/dist/rules/rules/default-import-check/index.js +124 -0
- package/dist/rules/rules/default-import-check/types.d.ts +5 -0
- package/dist/rules/rules/default-import-check/types.d.ts.map +1 -0
- package/dist/rules/rules/default-import-check/types.js +16 -0
- package/dist/rules/rules/default-import-check/utils.d.ts +11 -0
- package/dist/rules/rules/default-import-check/utils.d.ts.map +1 -0
- package/dist/rules/rules/default-import-check/utils.js +93 -0
- package/dist/rules/rules/duplicate-package/index.d.ts +5 -0
- package/dist/rules/rules/duplicate-package/index.d.ts.map +1 -0
- package/dist/rules/rules/duplicate-package/index.js +71 -0
- package/dist/rules/rules/duplicate-package/types.d.ts +25 -0
- package/dist/rules/rules/duplicate-package/types.d.ts.map +1 -0
- package/dist/rules/rules/duplicate-package/types.js +51 -0
- package/dist/rules/rules/duplicate-package/utils.d.ts +4 -0
- package/dist/rules/rules/duplicate-package/utils.d.ts.map +1 -0
- package/dist/rules/rules/duplicate-package/utils.js +89 -0
- package/dist/rules/rules/ecma-version-check/index.d.ts +5 -0
- package/dist/rules/rules/ecma-version-check/index.d.ts.map +1 -0
- package/dist/rules/rules/ecma-version-check/index.js +82 -0
- package/dist/rules/rules/ecma-version-check/types.d.ts +8 -0
- package/dist/rules/rules/ecma-version-check/types.d.ts.map +1 -0
- package/dist/rules/rules/ecma-version-check/types.js +16 -0
- package/dist/rules/rules/ecma-version-check/utils.d.ts +3 -0
- package/dist/rules/rules/ecma-version-check/utils.d.ts.map +1 -0
- package/dist/rules/rules/ecma-version-check/utils.js +31 -0
- package/dist/rules/rules/index.d.ts +2 -0
- package/dist/rules/rules/index.d.ts.map +1 -0
- package/dist/rules/rules/index.js +37 -0
- package/dist/rules/rules/loader-performance-optimization/index.d.ts +5 -0
- package/dist/rules/rules/loader-performance-optimization/index.d.ts.map +1 -0
- package/dist/rules/rules/loader-performance-optimization/index.js +124 -0
- package/dist/rules/rules/loader-performance-optimization/types.d.ts +23 -0
- package/dist/rules/rules/loader-performance-optimization/types.d.ts.map +1 -0
- package/dist/rules/rules/loader-performance-optimization/types.js +16 -0
- package/dist/rules/rules/loader-performance-optimization/utils.d.ts +2 -0
- package/dist/rules/rules/loader-performance-optimization/utils.d.ts.map +1 -0
- package/dist/rules/rules/loader-performance-optimization/utils.js +38 -0
- package/dist/rules/utils.d.ts +4 -0
- package/dist/rules/utils.d.ts.map +1 -0
- package/dist/rules/utils.js +44 -0
- package/dist/types/chunks.d.ts +12 -0
- package/dist/types/chunks.d.ts.map +1 -0
- package/dist/types/chunks.js +16 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +30 -0
- package/dist/types/loader.d.ts +20 -0
- package/dist/types/loader.d.ts.map +1 -0
- package/dist/types/loader.js +16 -0
- package/dist/types/plugin.d.ts +96 -0
- package/dist/types/plugin.d.ts.map +1 -0
- package/dist/types/plugin.js +16 -0
- package/dist/types/rules.d.ts +8 -0
- package/dist/types/rules.d.ts.map +1 -0
- package/dist/types/rules.js +16 -0
- package/dist/types/webpack.d.ts +15 -0
- package/dist/types/webpack.d.ts.map +1 -0
- package/dist/types/webpack.js +16 -0
- package/package.json +112 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { Linter as LinterType, Common, Plugin, SDK } from '@rsdoctor/types';
|
|
2
|
+
import type { RsdoctorSlaveSDK, RsdoctorWebpackSDK } from '@rsdoctor/sdk';
|
|
3
|
+
import { ChunkGraph, ModuleGraph } from '@rsdoctor/graph';
|
|
4
|
+
import { rules } from '../rules/rules';
|
|
5
|
+
type InternalRules = Common.UnionToTuple<(typeof rules)[number]>;
|
|
6
|
+
export interface RsdoctorWebpackPluginOptions<Rules extends LinterType.ExtendRuleData[]> {
|
|
7
|
+
/** Checker configuration */
|
|
8
|
+
linter?: LinterType.Options<Rules, InternalRules>;
|
|
9
|
+
/**
|
|
10
|
+
* the switch for the Rsdoctor features.
|
|
11
|
+
*/
|
|
12
|
+
features?: Plugin.RsdoctorWebpackPluginFeatures | Array<keyof Plugin.RsdoctorWebpackPluginFeatures>;
|
|
13
|
+
/**
|
|
14
|
+
* configuration of the interceptor for webpack loaders.
|
|
15
|
+
* @description worked when the `features.loader === true`.
|
|
16
|
+
*/
|
|
17
|
+
loaderInterceptorOptions?: {
|
|
18
|
+
/**
|
|
19
|
+
* loaders which you want to skip it (will not report the target loader data when webpack compile).
|
|
20
|
+
*/
|
|
21
|
+
skipLoaders?: string[];
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* turn on it if you don't need to see profile in browser.
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
disableClientServer?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* sdk instance of outside
|
|
30
|
+
*/
|
|
31
|
+
sdkInstance?: RsdoctorWebpackSDK;
|
|
32
|
+
/**
|
|
33
|
+
* control the Rsdoctor reporter codes records.
|
|
34
|
+
*/
|
|
35
|
+
reportCodeType?: {
|
|
36
|
+
noModuleSource?: boolean;
|
|
37
|
+
noAssetsAndModuleSource?: boolean;
|
|
38
|
+
} | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to turn on some characteristic analysis capabilities, such as: the support for the BannerPlugin.
|
|
41
|
+
*/
|
|
42
|
+
supports?: ISupport;
|
|
43
|
+
/**
|
|
44
|
+
* control the Rsdoctor upload data to TOS, used by inner-rsdoctor.
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
disableTOSUpload?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* The name of inner rsdoctor's client package, used by inner-rsdoctor.
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
innerClientPath?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The port of the Rsdoctor server.
|
|
55
|
+
*/
|
|
56
|
+
port?: number;
|
|
57
|
+
}
|
|
58
|
+
export interface RsdoctorMultiplePluginOptions<Rules extends LinterType.ExtendRuleData[] = LinterType.ExtendRuleData[]> extends Omit<RsdoctorWebpackPluginOptions<Rules>, 'sdkInstance'>, Pick<ConstructorParameters<typeof RsdoctorSlaveSDK>[0], 'stage'> {
|
|
59
|
+
/**
|
|
60
|
+
* name of builder
|
|
61
|
+
*/
|
|
62
|
+
name?: string;
|
|
63
|
+
}
|
|
64
|
+
interface ISupport {
|
|
65
|
+
banner?: boolean;
|
|
66
|
+
parseBundle?: boolean;
|
|
67
|
+
}
|
|
68
|
+
export interface RsdoctorPluginOptionsNormalized<Rules extends LinterType.ExtendRuleData[] = []> extends Common.DeepRequired<Omit<RsdoctorWebpackPluginOptions<Rules>, 'sdkInstance' | 'linter' | 'reportCodeType' | 'supports' | 'port'>> {
|
|
69
|
+
features: Common.DeepRequired<Plugin.RsdoctorWebpackPluginFeatures>;
|
|
70
|
+
linter: Required<LinterType.Options<Rules, InternalRules>>;
|
|
71
|
+
sdkInstance?: RsdoctorWebpackSDK;
|
|
72
|
+
port?: number;
|
|
73
|
+
reportCodeType: SDK.ToDataType;
|
|
74
|
+
supports: ISupport;
|
|
75
|
+
}
|
|
76
|
+
export interface BasePluginInstance<T extends Plugin.BaseCompiler> {
|
|
77
|
+
apply: (compiler: T) => void;
|
|
78
|
+
[k: string]: any;
|
|
79
|
+
}
|
|
80
|
+
export interface InternalPlugin<T extends Plugin.BaseCompiler, Rules extends LinterType.ExtendRuleData[] = []> extends BasePluginInstance<T> {
|
|
81
|
+
readonly name: string;
|
|
82
|
+
readonly scheduler: RsdoctorPluginInstance<T, Rules>;
|
|
83
|
+
}
|
|
84
|
+
export interface RsdoctorPluginInstance<T extends Plugin.BaseCompiler, Rules extends LinterType.ExtendRuleData[] = []> extends BasePluginInstance<T> {
|
|
85
|
+
readonly name: string;
|
|
86
|
+
readonly options: RsdoctorPluginOptionsNormalized<Rules>;
|
|
87
|
+
readonly sdk: RsdoctorWebpackSDK;
|
|
88
|
+
_modulesGraphApplied?: boolean;
|
|
89
|
+
chunkGraph?: ChunkGraph;
|
|
90
|
+
modulesGraph: ModuleGraph;
|
|
91
|
+
ensureModulesChunksGraphApplied(compiler: T): void;
|
|
92
|
+
}
|
|
93
|
+
export interface RsdoctorRspackPluginOptions<Rules extends LinterType.ExtendRuleData[]> extends RsdoctorWebpackPluginOptions<Rules> {
|
|
94
|
+
}
|
|
95
|
+
export {};
|
|
96
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/types/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,MAAM,IAAI,UAAU,EACpB,MAAM,EACN,MAAM,EACN,GAAG,EACJ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,E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EAAE,sBAAsB,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;CACtD;AAED,MAAM,WAAW,sBAAsB,CACrC,CAAC,SAAS,MAAM,CAAC,YAAY,EAC7B,KAAK,SAAS,UAAU,CAAC,cAAc,EAAE,GAAG,EAAE,CAC9C,SAAQ,kBAAkB,CAAC,CAAC,CAAC;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,+BAA+B,CAAC,KAAK,CAAC,CAAC;IACzD,QAAQ,CAAC,GAAG,EAAE,kBAAkB,CAAC;IACjC,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,YAAY,EAAE,WAAW,CAAC;IAC1B,+BAA+B,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,CAAC;CACpD;AAED,MAAM,WAAW,2BAA2B,CAC1C,KAAK,SAAS,UAAU,CAAC,cAAc,EAAE,CACzC,SAAQ,4BAA4B,CAAC,KAAK,CAAC;CAAG"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var plugin_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(plugin_exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rules.d.ts","sourceRoot":"","sources":["../../src/types/rules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEtC,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC;;OAEG;IACH,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC7B"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var rules_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(rules_exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Compiler, Compilation, LoaderDefinitionFunction, ModuleGraph, Dependency } from 'webpack';
|
|
2
|
+
type GetMapValue<M extends Map<any, any>> = M extends Map<string, infer V> ? V : never;
|
|
3
|
+
export type NormalModuleFactory = ReturnType<Compiler['createNormalModuleFactory']>;
|
|
4
|
+
export type SourceMapInput = Parameters<LoaderDefinitionFunction>[1];
|
|
5
|
+
export type SourceMap = Exclude<SourceMapInput, string | undefined>;
|
|
6
|
+
export type EntryPoint = GetMapValue<Compilation['entrypoints']>;
|
|
7
|
+
export type ExportInfo = ReturnType<ModuleGraph['getExportInfo']>;
|
|
8
|
+
export type ExportsInfo = ReturnType<ModuleGraph['getExportsInfo']>;
|
|
9
|
+
export interface HarmonyImportSpecifierDependency extends Dependency {
|
|
10
|
+
getIds(graph: ModuleGraph): string[];
|
|
11
|
+
name: string;
|
|
12
|
+
userRequest: string;
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=webpack.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webpack.d.ts","sourceRoot":"","sources":["../../src/types/webpack.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,WAAW,EACX,wBAAwB,EACxB,WAAW,EACX,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB,KAAK,WAAW,CAAC,CAAC,SAAS,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,SAAS,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,GACtE,CAAC,GACD,KAAK,CAAC;AAEV,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,QAAQ,CAAC,2BAA2B,CAAC,CACtC,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AACpE,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;AACjE,MAAM,MAAM,UAAU,GAAG,UAAU,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC;AAClE,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC;AAEpE,MAAM,WAAW,gCAAiC,SAAQ,UAAU;IAClE,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,EAAE,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var webpack_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(webpack_exports);
|
package/package.json
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rsdoctor/core",
|
|
3
|
+
"version": "0.0.0-next-20240620044732",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
7
|
+
"directory": "packages/core"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"main": "dist/index.js",
|
|
11
|
+
"module": "dist/index.js",
|
|
12
|
+
"types": "dist/index.d.ts",
|
|
13
|
+
"files": [
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"default": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./build-utils": {
|
|
22
|
+
"types": "./dist/build-utils/build/index.d.ts",
|
|
23
|
+
"default": "./dist/build-utils/build/index.js"
|
|
24
|
+
},
|
|
25
|
+
"./common-utils": {
|
|
26
|
+
"types": "./dist/build-utils/common/index.d.ts",
|
|
27
|
+
"default": "./dist/build-utils/common/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./plugins": {
|
|
30
|
+
"types": "./dist/inner-plugins/index.d.ts",
|
|
31
|
+
"default": "./dist/inner-plugins/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./rules": {
|
|
34
|
+
"types": "./dist/rules/index.d.ts",
|
|
35
|
+
"default": "./dist/rules/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./types": {
|
|
38
|
+
"types": "./dist/types/index.d.ts",
|
|
39
|
+
"default": "./dist/types/index.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"typesVersions": {
|
|
43
|
+
"*": {
|
|
44
|
+
".": [
|
|
45
|
+
"./dist/index.d.ts"
|
|
46
|
+
],
|
|
47
|
+
"build-utils": [
|
|
48
|
+
"./dist/build-utils/build/index.d.ts"
|
|
49
|
+
],
|
|
50
|
+
"common-utils": [
|
|
51
|
+
"./dist/build-utils/common/index.d.ts"
|
|
52
|
+
],
|
|
53
|
+
"plugins": [
|
|
54
|
+
"./dist/inner-plugins/index.d.ts"
|
|
55
|
+
],
|
|
56
|
+
"rules": [
|
|
57
|
+
"./dist/rules/index.d.ts"
|
|
58
|
+
],
|
|
59
|
+
"types": [
|
|
60
|
+
"./dist/types/types.d.ts"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"axios": "^1.7.2",
|
|
66
|
+
"enhanced-resolve": "5.12.0",
|
|
67
|
+
"filesize": "^10.1.2",
|
|
68
|
+
"fs-extra": "^11.1.1",
|
|
69
|
+
"loader-utils": "^2.0.4",
|
|
70
|
+
"lodash": "^4.17.21",
|
|
71
|
+
"path-browserify": "1.0.1",
|
|
72
|
+
"semver": "^7.5.4",
|
|
73
|
+
"source-map": "^0.7.4",
|
|
74
|
+
"webpack-bundle-analyzer": "^4.9.1",
|
|
75
|
+
"webpack-sources": "^3.2.3",
|
|
76
|
+
"@rsdoctor/graph": "0.0.0-next-20240620044732",
|
|
77
|
+
"@rsdoctor/sdk": "0.0.0-next-20240620044732",
|
|
78
|
+
"@rsdoctor/types": "0.0.0-next-20240620044732",
|
|
79
|
+
"@rsdoctor/utils": "0.0.0-next-20240620044732"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@rspack/core": "0.6.5",
|
|
83
|
+
"@types/fs-extra": "^11.0.2",
|
|
84
|
+
"@types/loader-utils": "^2.0.5",
|
|
85
|
+
"@types/lodash": "^4.17.0",
|
|
86
|
+
"@types/node": "^16",
|
|
87
|
+
"@types/node-fetch": "^2.6.9",
|
|
88
|
+
"@types/path-browserify": "1.0.1",
|
|
89
|
+
"@types/semver": "^7.5.4",
|
|
90
|
+
"@types/tapable": "2.2.2",
|
|
91
|
+
"@types/webpack": "5.28.0",
|
|
92
|
+
"@types/webpack-sources": "^3.2.3",
|
|
93
|
+
"babel-loader": "9.1.3",
|
|
94
|
+
"string-loader": "0.0.1",
|
|
95
|
+
"ts-loader": "^9.5.1",
|
|
96
|
+
"tslib": "2.4.1",
|
|
97
|
+
"typescript": "^5.2.2",
|
|
98
|
+
"webpack": "^5.89.0",
|
|
99
|
+
"@scripts/test-helper": "0.1.1"
|
|
100
|
+
},
|
|
101
|
+
"publishConfig": {
|
|
102
|
+
"access": "public",
|
|
103
|
+
"provenance": true,
|
|
104
|
+
"registry": "https://registry.npmjs.org/"
|
|
105
|
+
},
|
|
106
|
+
"scripts": {
|
|
107
|
+
"dev": "npm run start",
|
|
108
|
+
"build": "modern build",
|
|
109
|
+
"start": "modern build -w",
|
|
110
|
+
"test": "vitest run"
|
|
111
|
+
}
|
|
112
|
+
}
|