@rsdoctor/core 2.0.0-alpha.2 → 2.0.0-beta.1

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.
Files changed (34) hide show
  1. package/dist/26.js +220 -157
  2. package/dist/630.js +28 -17
  3. package/dist/630.js.LICENSE.txt +1 -1
  4. package/dist/build-utils/build/json.d.ts +1 -1
  5. package/dist/build-utils/build/loader/probeLoaderPlugin.d.ts +1 -0
  6. package/dist/build-utils/build/server.d.ts +1 -2
  7. package/dist/index.d.ts +2 -2
  8. package/dist/index.js +405 -164
  9. package/dist/inner-plugins/plugins/bundle.d.ts +1 -1
  10. package/dist/inner-plugins/plugins/errors.d.ts +1 -0
  11. package/dist/inner-plugins/plugins/loader.d.ts +2 -0
  12. package/dist/inner-plugins/plugins/plugins.d.ts +1 -1
  13. package/dist/inner-plugins/plugins/summary.d.ts +3 -2
  14. package/dist/inner-plugins/utils/config.d.ts +3 -1
  15. package/dist/inner-plugins/utils/normalize-config.d.ts +3 -8
  16. package/dist/inner-plugins/utils/ruleWarnings.d.ts +2 -0
  17. package/dist/inner-plugins/utils/sdk.d.ts +2 -1
  18. package/dist/proxy-loader.js +7 -3
  19. package/dist/rspack-plugin/index.d.ts +0 -1
  20. package/dist/rspack-plugin/plugin.d.ts +47 -17
  21. package/dist/rspack-plugin/session.d.ts +19 -0
  22. package/dist/rspack-plugin/writeStore.d.ts +2 -0
  23. package/dist/rule-utils/parser/utils.d.ts +3 -6
  24. package/dist/rules/rules/ecma-version-check/index.d.ts +1 -1
  25. package/dist/sdk/multiple/controller.d.ts +13 -2
  26. package/dist/sdk/multiple/primary.d.ts +14 -6
  27. package/dist/sdk/sdk/core.d.ts +3 -2
  28. package/dist/sdk/sdk/types.d.ts +1 -1
  29. package/dist/sdk/utils/index.d.ts +1 -0
  30. package/dist/sdk/utils/manifestSharding.d.ts +16 -0
  31. package/dist/types/loader.d.ts +5 -0
  32. package/dist/types/plugin.d.ts +0 -8
  33. package/package.json +27 -28
  34. package/dist/rspack-plugin/multiple.d.ts +0 -8
@@ -11,5 +11,5 @@ export declare class InternalBundlePlugin<T extends Plugin.BaseCompiler> extends
11
11
  content: string;
12
12
  };
13
13
  thisCompilation: (compilation: Plugin.BaseCompilation) => void;
14
- done: () => Promise<void>;
14
+ done: (compiler: T) => Promise<void>;
15
15
  }
@@ -5,6 +5,7 @@ export declare class InternalErrorReporterPlugin<T extends Plugin.BaseCompiler>
5
5
  readonly name = "error-reporter";
6
6
  apply(compiler: T): void;
7
7
  done: (stats: Plugin.BaseStats) => Promise<void>;
8
+ afterCompile: (compilation: Plugin.BaseCompilation) => Promise<void>;
8
9
  handleBundlerError(err: Plugin.BuildError, category: Rule.RuleMessageCategory, level: keyof typeof Err.ErrorLevel): DevToolError;
9
10
  reportWarnings(warnings: Plugin.BuildError[]): Promise<void>;
10
11
  reportErrors(errors: Plugin.BuildWarning[]): Promise<void>;
@@ -2,9 +2,11 @@ import { Plugin } from '@rsdoctor/shared/types';
2
2
  import { InternalBasePlugin } from './base.js';
3
3
  export declare class InternalLoaderPlugin<T extends Plugin.BaseCompiler> extends InternalBasePlugin<T> {
4
4
  readonly name = "loader";
5
+ private cacheMarkerPath?;
5
6
  readonly internalLoaderPath: string;
6
7
  apply(compiler: T): void;
7
8
  afterPlugins: (compiler: T) => void;
8
9
  compilation(compiler: T, compilation: Plugin.BaseCompilation): void;
9
10
  getInterceptRules(compiler: T, rules: Plugin.BuildRuleSetRules): Plugin.BuildRuleSetRule[];
11
+ private getCacheMarkerPath;
10
12
  }
@@ -4,5 +4,5 @@ export declare class InternalPluginsPlugin<T extends Plugin.BaseCompiler> extend
4
4
  readonly name = "plugins";
5
5
  apply(compiler: Plugin.BaseCompiler): void;
6
6
  afterPlugins: (compiler: Plugin.BaseCompiler) => void;
7
- compilation: (compilation: Plugin.BaseCompilation) => void;
7
+ compilation: (compiler: Plugin.BaseCompiler, compilation: Plugin.BaseCompilation) => void;
8
8
  }
@@ -5,10 +5,11 @@ export declare class InternalSummaryPlugin<T extends Plugin.BaseCompiler> extend
5
5
  private times;
6
6
  private preTimes;
7
7
  private postTimes;
8
+ private readonly createdAt;
8
9
  apply(compiler: T): void;
9
10
  private mark;
10
- beforeCompile: () => Promise<void>;
11
- afterCompile: (compilation: Plugin.BaseCompilation) => Promise<void>;
11
+ beforeCompile: (compiler: T) => Promise<void>;
12
+ afterCompile: (compiler: T, compilation: Plugin.BaseCompilation) => Promise<void>;
12
13
  done: (compiler: T) => Promise<void>;
13
14
  private report;
14
15
  }
@@ -1,4 +1,6 @@
1
1
  import { Linter, Plugin, SDK } from '@rsdoctor/shared/types';
2
+ export declare function isCompilerWatching(compiler: Pick<Plugin.BaseCompiler, 'watchMode' | 'parentCompilation'>): boolean;
3
+ export declare function getEffectiveGzipConfig(compiler: Pick<Plugin.BaseCompiler, 'watchMode' | 'parentCompilation'>, gzip: Plugin.NormalizedGzipConfig): Plugin.NormalizedGzipConfig;
2
4
  export declare function normalizeUserConfig<Rules extends Linter.ExtendRuleData[]>(config?: Plugin.RsdoctorRspackPluginOptions<Rules>): Plugin.RsdoctorPluginOptionsNormalized<Rules>;
3
- export declare const normalizeReportType: (reportCodeType: Plugin.IReportCodeType | Plugin.NewReportCodeType, mode: keyof typeof SDK.IMode) => SDK.ToDataType;
5
+ export declare const normalizeReportType: (reportCodeType: Plugin.NewReportCodeType | undefined, mode: keyof typeof SDK.IMode) => SDK.ToDataType;
4
6
  export declare const normalizeRspackUserOptions: typeof normalizeUserConfig;
@@ -3,19 +3,14 @@ import type { RuleSetCondition as RspackRuleSetCondition, RuleSetRule as RspackR
3
3
  /**
4
4
  * Process mode-specific configurations with priority logic
5
5
  */
6
- export declare function processModeConfigurations(finalMode: keyof typeof SDK.IMode, output: Config.IOutput<'brief' | 'normal'>, brief: Config.BriefConfig | undefined): {
6
+ export declare function processModeConfigurations(finalMode: keyof typeof SDK.IMode, output: Config.IOutput<'brief' | 'normal'>): {
7
7
  finalBrief: {};
8
8
  finalNormalOptions: Config.NormalModeOptions;
9
9
  };
10
10
  /**
11
- * Process brief mode configuration with priority logic
12
- * Priority: output.options.briefOptions > output.brief > default
11
+ * Process brief mode configuration.
13
12
  */
14
- export declare function processBriefHtmlModeConfig(output: Config.BriefModeConfig, brief: Config.BriefConfig | undefined): Config.BriefModeOptions;
15
- /**
16
- * Convert reportCodeType object to NewReportCodeType enum value
17
- */
18
- export declare function convertReportCodeTypeObject(reportCodeType: any): Config.NewReportCodeType | undefined;
13
+ export declare function processBriefHtmlModeConfig(output: Config.BriefModeConfig): Config.BriefModeOptions;
19
14
  /**
20
15
  * This function recursively processes rule set conditions to ensure they can be
21
16
  * properly serialized to JSON.
@@ -0,0 +1,2 @@
1
+ import { DevToolError } from '../../error/index.js';
2
+ export declare function summarizeRuleWarnings(warnings: DevToolError[]): DevToolError[];
@@ -4,4 +4,5 @@ declare global {
4
4
  var __rsdoctor_sdk__: SDK.RsdoctorBuilderSDKInstance | undefined;
5
5
  }
6
6
  export declare function setSDK(t: SDK.RsdoctorBuilderSDKInstance): void;
7
- export declare function getSDK(builderName?: string): SDK.RsdoctorBuilderSDKInstance | undefined;
7
+ export declare function registerSDK(t: SDK.RsdoctorBuilderSDKInstance, asDefault?: boolean): void;
8
+ export declare function getSDK(compilerId?: string): SDK.RsdoctorBuilderSDKInstance | undefined;
@@ -1,9 +1,13 @@
1
1
  import "node:module";
2
- import { shouldSkipLoader, reportLoader, getOriginLoaderModule } from "./26.js";
2
+ import { shouldSkipLoader, reportLoader, getInternalLoaderOptions, getOriginLoaderModule } from "./26.js";
3
3
  import { createLoaderContextTrap } from "./630.js";
4
+ function addCacheMarkerDependency(context) {
5
+ let { cacheMarkerPath } = getInternalLoaderOptions(context);
6
+ cacheMarkerPath && context.addBuildDependency(cacheMarkerPath);
7
+ }
4
8
  let loaderModule = function(...args) {
5
9
  if (shouldSkipLoader(this)) return void this.callback(null, ...args);
6
- this.cacheable(!1);
10
+ addCacheMarkerDependency(this);
7
11
  let mod = getOriginLoaderModule(this);
8
12
  if (mod.default) {
9
13
  !1 === mod.raw && Buffer.isBuffer(args[0]) && (args[0] = args[0].toString());
@@ -24,7 +28,7 @@ let loaderModule = function(...args) {
24
28
  this.callback(null, ...args);
25
29
  }, pitch = function() {
26
30
  if (shouldSkipLoader(this)) return;
27
- this.cacheable(!1);
31
+ addCacheMarkerDependency(this);
28
32
  let mod = getOriginLoaderModule(this);
29
33
  if (mod.pitch && 'function' == typeof mod.pitch) {
30
34
  let start = 0, startHRTime = [
@@ -1,2 +1 @@
1
1
  export * from './plugin.js';
2
- export * from './multiple.js';
@@ -1,25 +1,55 @@
1
- import type { RsdoctorRspackPluginInstance, RsdoctorRspackPluginOptions, RsdoctorRspackPluginOptionsNormalized } from '../types/index.js';
2
1
  import { RsdoctorPrimarySDK } from '../sdk/index.js';
2
+ import type { RsdoctorRspackPluginInstance, RsdoctorRspackPluginOptions, RsdoctorRspackPluginOptionsNormalized } from '../types/index.js';
3
3
  import { Linter, Plugin, SDK } from '@rsdoctor/shared/types';
4
+ declare class RsdoctorCompilerContext implements RsdoctorRspackPluginInstance<Linter.ExtendRuleData[]> {
5
+ readonly sdk: SDK.RsdoctorBuilderSDKInstance;
6
+ readonly options: RsdoctorRspackPluginOptionsNormalized<Linter.ExtendRuleData[]>;
7
+ readonly name = "RsdoctorRspackPlugin";
8
+ readonly isRsdoctorPlugin = true;
9
+ readonly modulesGraph: SDK.ModuleGraphInstance;
10
+ bootstrapTask?: Promise<void>;
11
+ applied: boolean;
12
+ hasOpenedClientAutomatically: boolean;
13
+ constructor(sdk: SDK.RsdoctorBuilderSDKInstance, options: RsdoctorRspackPluginOptionsNormalized<Linter.ExtendRuleData[]>);
14
+ apply(): void;
15
+ ensureModulesChunksGraphApplied(compiler: Plugin.BaseCompilerType<'rspack'>): void;
16
+ }
4
17
  export declare class RsdoctorRspackPlugin<Rules extends Linter.ExtendRuleData[]> implements RsdoctorRspackPluginInstance<Rules> {
5
18
  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;
19
+ readonly isRsdoctorPlugin = true;
20
+ readonly options: RsdoctorRspackPluginOptionsNormalized<Rules>;
21
+ readonly outsideInstance: boolean;
22
+ private readonly childOptions;
23
+ private readonly defaultName;
24
+ private readonly controller?;
25
+ private readonly sessionLease?;
26
+ private readonly primaryContext;
27
+ private readonly compilerContexts;
28
+ private readonly childPlugins;
29
+ private appliedCompilerCount;
13
30
  constructor(options?: RsdoctorRspackPluginOptions<Rules>);
31
+ get sdk(): SDK.RsdoctorBuilderSDKInstance;
32
+ get modulesGraph(): SDK.ModuleGraphInstance;
33
+ get _bootstrapTask(): Promise<void>;
34
+ getCompilerSDK(name: string): SDK.RsdoctorBuilderSDKInstance | RsdoctorPrimarySDK | undefined;
14
35
  apply(compiler: unknown): unknown;
15
- /**
16
- * @description Generate ModuleGraph and ChunkGraph from the Rspack native plugin.
17
- * @param {Compiler} compiler
18
- * @return {*}
19
- * @memberof RsdoctorRspackPlugin
20
- */
21
36
  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;
37
+ afterPlugins: (compiler: Plugin.BaseCompilerType<'rspack'>, context?: RsdoctorCompilerContext) => void;
38
+ done: (compiler: Plugin.BaseCompilerType<'rspack'>, context?: RsdoctorCompilerContext) => Promise<void>;
39
+ getRspackConfig(compiler: Plugin.BaseCompilerType<'rspack'>, context?: RsdoctorCompilerContext): void;
40
+ private createCompilerContext;
41
+ private getCompilerContext;
42
+ private ensureBootstrap;
43
+ private awaitBootstrap;
44
+ private clearBootstrapTask;
45
+ private disposeSDK;
46
+ private getOutputDir;
47
+ private getBriefReportFileName;
48
+ private applyChildCompilerSupport;
49
+ private registerChildCompiler;
50
+ private removeInheritedRsdoctorTaps;
51
+ private childDone;
52
+ private shouldDisposeSDK;
53
+ private releasePendingSessionOnRun;
25
54
  }
55
+ export {};
@@ -0,0 +1,19 @@
1
+ import { RsdoctorSDKController } from '../sdk/index.js';
2
+ export interface RsdoctorBuildSessionOptions {
3
+ multiCompiler: {
4
+ enabled: boolean;
5
+ group?: string;
6
+ };
7
+ output: {
8
+ mode: string;
9
+ reportDir: string;
10
+ };
11
+ server: {
12
+ port?: number;
13
+ };
14
+ }
15
+ export interface RsdoctorBuildSessionLease {
16
+ controller: RsdoctorSDKController;
17
+ release(): void;
18
+ }
19
+ export declare function acquireBuildSession(options: RsdoctorBuildSessionOptions): RsdoctorBuildSessionLease;
@@ -0,0 +1,2 @@
1
+ import type { Plugin, SDK } from '@rsdoctor/shared/types';
2
+ export declare function getWriteStoreOptions(compiler: Pick<Plugin.BaseCompiler, 'watchMode' | 'parentCompilation'>): SDK.WriteStoreOptionsType | undefined;
@@ -1,13 +1,10 @@
1
1
  import { ecmaVersion } from 'acorn';
2
2
  import { Node, ECMAVersion } from './types.js';
3
3
  /**
4
- * Is the node semantics the same?
5
- * @deprecated
6
- * - Recursively compare whether the content of the node itself is the same
7
- * - Ignore comments, positions, string symbols (single and double quotation marks)
8
- * - String templates and string addition will be considered different
4
+ * Recursively compare node semantics while ignoring comments, positions, and
5
+ * string quote styles. String templates and string addition remain distinct.
9
6
  */
10
- export declare function isSameSemantics(node1: Node.SyntaxNode, node2: Node.SyntaxNode): boolean;
7
+ export declare function isSameSyntax(node1: Node.SyntaxNode, node2: Node.SyntaxNode): boolean;
11
8
  /**
12
9
  * Get all default reference statements
13
10
  */
@@ -1,4 +1,4 @@
1
- import { Config } from './types.js';
1
+ import type { Config } from './types.js';
2
2
  import { Linter } from '@rsdoctor/shared/types';
3
3
  export type { Config } from './types.js';
4
4
  declare const title = "ecma-version-check";
@@ -2,11 +2,22 @@ import { Manifest } from '@rsdoctor/shared/types';
2
2
  import { RsdoctorPrimarySDK } from './primary.js';
3
3
  export declare class RsdoctorSDKController {
4
4
  readonly slaves: RsdoctorPrimarySDK[];
5
+ private readonly activeSlaves;
6
+ private outputDir;
7
+ private outputOwner?;
8
+ private refreshManifestTask;
5
9
  root: string;
6
10
  constructor(root?: string);
7
11
  get master(): RsdoctorPrimarySDK;
12
+ get isMultiple(): boolean;
8
13
  getLastSdk(): RsdoctorPrimarySDK;
9
- hasName(name: string): boolean;
14
+ hasName(name: string, exclude?: RsdoctorPrimarySDK): boolean;
15
+ registerSlave(slave: RsdoctorPrimarySDK): void;
16
+ setOutputDir(slave: RsdoctorPrimarySDK, outputDir: string): void;
17
+ getCompilerOutputDir(slave: RsdoctorPrimarySDK): string;
10
18
  getSeriesData(serverUrl?: boolean): Manifest.RsdoctorManifestSeriesData[];
11
- createSlave({ name, stage, extraConfig, type, }: Omit<ConstructorParameters<typeof RsdoctorPrimarySDK>[0], 'controller'>): RsdoctorPrimarySDK;
19
+ getBriefSeriesData(current: RsdoctorPrimarySDK): Manifest.RsdoctorManifestSeriesData[];
20
+ createSlave({ name, displayName, compilerPath, parentCompilerPath, isChild, stage, extraConfig, type, }: Omit<ConstructorParameters<typeof RsdoctorPrimarySDK>[0], 'controller'>): RsdoctorPrimarySDK;
21
+ refreshManifestSeries(): Promise<void>;
22
+ private getActiveSlaves;
12
23
  }
@@ -1,8 +1,12 @@
1
- import { Manifest, SDK } from '@rsdoctor/shared/types';
1
+ import { Common, Manifest, SDK } from '@rsdoctor/shared/types';
2
2
  import { RsdoctorSDK } from '../sdk/index.js';
3
3
  import type { RsdoctorSDKController } from './controller.js';
4
4
  interface RsdoctorSlaveSDKOptions {
5
5
  name: string;
6
+ displayName?: string;
7
+ compilerPath?: string;
8
+ parentCompilerPath?: string;
9
+ isChild?: boolean;
6
10
  /**
7
11
  * use to sort for display in the client page.
8
12
  * the smaller the front.
@@ -17,16 +21,20 @@ export declare class RsdoctorPrimarySDK extends RsdoctorSDK implements SDK.Rsdoc
17
21
  id: number;
18
22
  parent: RsdoctorSDKController;
19
23
  readonly stage: number;
24
+ displayName: string;
25
+ readonly compilerPath: string;
26
+ readonly parentCompilerPath?: string;
27
+ readonly isChild: boolean;
20
28
  dependencies: Array<string> | undefined;
21
- private uploadPieces;
22
- private finishUploadPieceSwitch;
23
- constructor({ name, stage, controller, extraConfig, type, }: RsdoctorSlaveSDKOptions);
24
- private clearSwitch;
29
+ reportFileName: string;
30
+ constructor({ name, displayName, compilerPath, parentCompilerPath, isChild, stage, controller, extraConfig, type, }: RsdoctorSlaveSDKOptions);
25
31
  get isMaster(): boolean;
26
- protected writePieces(): Promise<void>;
32
+ protected writePieces(_storeData: Common.PlainObject, options?: SDK.WriteStoreOptionsType): Promise<void>;
27
33
  protected writeManifest(): Promise<string>;
34
+ refreshManifestSeries(): Promise<void>;
28
35
  getSeriesData(serverUrl?: boolean): Manifest.RsdoctorManifestSeriesData[];
29
36
  setName(name: string): void;
30
37
  getManifestData(): Manifest.RsdoctorManifestWithShardingFiles;
38
+ addRsdoctorDataToHTML(storeData: SDK.BuilderStoreData, htmlContent: string): string;
31
39
  }
32
40
  export {};
@@ -24,10 +24,11 @@ export declare abstract class SDKCore<T extends RsdoctorSDKOptions> implements S
24
24
  getClientRoutes(): Manifest.RsdoctorManifestClientRoutes[];
25
25
  addClientRoutes(routes: Manifest.RsdoctorManifestClientRoutes[]): void;
26
26
  /** Upload analysis data pieces */
27
- protected writePieces(storeData: Common.PlainObject, _options?: SDK.WriteStoreOptionsType): Promise<void>;
27
+ protected writePieces(storeData: Common.PlainObject, options?: SDK.WriteStoreOptionsType): Promise<void>;
28
28
  /** Upload manifest file */
29
29
  protected writeManifest(): Promise<string>;
30
30
  saveManifest(data: Common.PlainObject, options: SDK.WriteStoreOptionsType): Promise<string>;
31
- protected writeToFolder(jsonStr: string, dir: string, key: string, index?: number): Promise<DataWithUrl>;
31
+ protected writeToFolder(jsonStr: string, dir: string, key: string, index?: number, compressionLevel?: number): Promise<DataWithUrl>;
32
+ protected writeJsonFragmentsToFolder(jsonFragments: string[], dir: string, key: string, index?: number, compressionLevel?: number): Promise<DataWithUrl>;
32
33
  abstract onDataReport(): void | Promise<void>;
33
34
  }
@@ -4,7 +4,7 @@ export interface DataWithUrl {
4
4
  files: {
5
5
  path: string;
6
6
  basename: string;
7
- content: Buffer;
7
+ content?: Buffer;
8
8
  }[] | string;
9
9
  }
10
10
  export interface RsdoctorSDKOptions {
@@ -1,3 +1,4 @@
1
1
  export * from './constant.js';
2
2
  export * from './base.js';
3
3
  export * from './upload.js';
4
+ export * from './manifestSharding.js';
@@ -0,0 +1,16 @@
1
+ export declare const DEFAULT_MANIFEST_SHARD_SIZE: number;
2
+ interface WriteManifestShardsOptions {
3
+ index?: number;
4
+ shardSize?: number;
5
+ compressionLevel?: number;
6
+ }
7
+ export interface ManifestShardFile {
8
+ path: string;
9
+ basename: string;
10
+ }
11
+ /**
12
+ * Compress JSON fragments as one deflate stream, encode that stream as one
13
+ * continuous Base64 value, and write bounded physical shards.
14
+ */
15
+ export declare function writeManifestShards(jsonFragments: string[], folder: string, options?: WriteManifestShardsOptions): Promise<ManifestShardFile[]>;
16
+ export {};
@@ -1,5 +1,10 @@
1
1
  import { Loader } from '@rsdoctor/shared/common-browser';
2
2
  export interface ProxyLoaderInternalOptions {
3
+ /**
4
+ * A session marker registered as a loader build dependency so persistent
5
+ * caches are invalidated when a new Rsdoctor session starts.
6
+ */
7
+ cacheMarkerPath?: string;
3
8
  cwd: string;
4
9
  /**
5
10
  * the url host of http server(which used to collect data).
@@ -1,12 +1,4 @@
1
1
  import type { Linter, Linter as LinterType, Plugin, SDK } from '@rsdoctor/shared/types';
2
- export interface RsdoctorMultiplePluginOptions<Rules extends LinterType.ExtendRuleData[] = LinterType.ExtendRuleData[]> extends Omit<Plugin.RsdoctorRspackPluginOptions<Rules>, 'sdkInstance'>, Pick<{
3
- stage?: number;
4
- }, 'stage'> {
5
- /**
6
- * name of builder
7
- */
8
- name?: string;
9
- }
10
2
  export interface BasePluginInstance<T extends Plugin.BaseCompiler> {
11
3
  apply: (compiler: T) => void;
12
4
  [k: string]: any;
package/package.json CHANGED
@@ -1,21 +1,12 @@
1
1
  {
2
2
  "name": "@rsdoctor/core",
3
- "version": "2.0.0-alpha.2",
3
+ "version": "2.0.0-beta.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/web-infra-dev/rsdoctor",
7
7
  "directory": "packages/core"
8
8
  },
9
9
  "license": "MIT",
10
- "engines": {
11
- "node": ">=22.18.0"
12
- },
13
- "main": "dist/index.js",
14
- "types": "dist/index.d.ts",
15
- "files": [
16
- "dist",
17
- "static"
18
- ],
19
10
  "type": "module",
20
11
  "exports": {
21
12
  ".": {
@@ -27,6 +18,8 @@
27
18
  "default": "./dist/proxy-loader.js"
28
19
  }
29
20
  },
21
+ "main": "dist/index.js",
22
+ "types": "dist/index.d.ts",
30
23
  "typesVersions": {
31
24
  "*": {
32
25
  ".": [
@@ -37,6 +30,10 @@
37
30
  ]
38
31
  }
39
32
  },
33
+ "files": [
34
+ "dist",
35
+ "static"
36
+ ],
40
37
  "dependencies": {
41
38
  "@babel/code-frame": "7.26.2",
42
39
  "@rspack/lite-tapable": "^1.1.5",
@@ -45,42 +42,41 @@
45
42
  "acorn-import-attributes": "^1.9.5",
46
43
  "acorn-walk": "8.3.5",
47
44
  "browserslist-load-config": "^1.0.3",
48
- "caniuse-lite": "^1.0.30001792",
49
- "connect": "3.7.0",
45
+ "caniuse-lite": "^1.0.30001810",
46
+ "connect-next": "4.0.3",
47
+ "cors": "2.8.6",
50
48
  "envinfo": "7.21.0",
51
49
  "fs-extra": "^11.1.1",
52
50
  "get-port": "5.1.1",
51
+ "launch-editor": "^2.14.1",
53
52
  "lines-and-columns": "2.0.4",
54
- "open": "^11.0.0",
53
+ "open": "^11.0.2",
55
54
  "raw-body": "3.0.2",
56
55
  "rslog": "^2.1.3",
57
56
  "semver": "^7.8.5",
58
- "source-map": "^0.7.6",
59
- "cors": "2.8.6",
60
- "launch-editor": "^2.14.1",
61
57
  "sirv": "3.0.2",
62
- "ws": "8.21.1",
63
- "@rsdoctor/shared": "2.0.0-alpha.2",
64
- "@rsdoctor/client": "2.0.0-alpha.2"
58
+ "source-map": "^0.7.6",
59
+ "ws": "8.21.3",
60
+ "@rsdoctor/client": "2.0.0-beta.1",
61
+ "@rsdoctor/shared": "2.0.0-beta.1"
65
62
  },
66
63
  "devDependencies": {
67
64
  "@rsbuild/plugin-check-syntax": "^1.6.1",
68
- "@rspack/core": "^2.1.7",
65
+ "@rspack/core": "^2.1.10",
69
66
  "@types/babel__code-frame": "7.27.0",
70
- "@types/connect": "3.4.38",
67
+ "@types/cors": "2.8.19",
71
68
  "@types/envinfo": "7.8.4",
72
69
  "@types/fs-extra": "^11.0.4",
73
70
  "@types/node": "^24.12.3",
74
- "@types/semver": "^7.7.1",
71
+ "@types/semver": "^7.8.0",
72
+ "@types/ws": "^8.18.1",
75
73
  "babel-loader": "10.1.1",
76
- "filesize": "^11.0.22",
74
+ "filesize": "^11.0.23",
77
75
  "json-stream-stringify": "3.0.1",
78
76
  "string-loader": "0.0.1",
79
77
  "ts-loader": "^9.6.2",
80
78
  "tslib": "2.8.1",
81
79
  "typescript": "^7.0.2",
82
- "@types/cors": "2.8.19",
83
- "@types/ws": "^8.18.1",
84
80
  "@scripts/test-helper": "0.1.1"
85
81
  },
86
82
  "peerDependencies": {
@@ -91,14 +87,17 @@
91
87
  "optional": true
92
88
  }
93
89
  },
90
+ "engines": {
91
+ "node": ">=22.18.0"
92
+ },
94
93
  "publishConfig": {
95
94
  "access": "public",
96
95
  "registry": "https://registry.npmjs.org/"
97
96
  },
98
97
  "scripts": {
98
+ "build": "rs lib",
99
99
  "dev": "npm run start",
100
- "build": "rslib build",
101
- "start": "rslib build -w",
102
- "test": "rstest run"
100
+ "start": "rs lib -w",
101
+ "test": "rs test"
103
102
  }
104
103
  }
@@ -1,8 +0,0 @@
1
- import type { RsdoctorMultiplePluginOptions } from '../types/index.js';
2
- import { type Linter, type Plugin } from '@rsdoctor/shared/types';
3
- import { RsdoctorRspackPlugin } from './plugin.js';
4
- export declare class RsdoctorRspackMultiplePlugin<Rules extends Linter.ExtendRuleData[]> extends RsdoctorRspackPlugin<Rules> {
5
- private controller;
6
- constructor(options?: RsdoctorMultiplePluginOptions<Rules>);
7
- apply(compiler: Plugin.BaseCompilerType<'rspack'>): void;
8
- }