@rsdoctor/types 1.5.4 → 1.5.5
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/error.d.ts +2 -2
- package/dist/index.cjs +10 -1
- package/dist/index.d.ts +15 -15
- package/dist/index.js +10 -1
- package/dist/linter/diagnostic.d.ts +5 -5
- package/dist/linter/index.d.ts +2 -2
- package/dist/linter/rule.d.ts +5 -5
- package/dist/manifest.d.ts +2 -2
- package/dist/modules.d.ts +1 -1
- package/dist/plugin/baseStats.d.ts +1 -1
- package/dist/plugin/index.d.ts +7 -7
- package/dist/plugin/internal-rules.d.ts +1 -1
- package/dist/plugin/plugin.d.ts +2 -2
- package/dist/rule/code/E1001.d.ts +1 -1
- package/dist/rule/code/E1002.d.ts +1 -1
- package/dist/rule/code/E1003.d.ts +1 -1
- package/dist/rule/code/E1004.d.ts +1 -1
- package/dist/rule/code/E1005.d.ts +1 -1
- package/dist/rule/code/E1006.d.ts +1 -1
- package/dist/rule/code/E1007.d.ts +1 -1
- package/dist/rule/code/E1008.d.ts +1 -1
- package/dist/rule/code/E1009.d.ts +3 -0
- package/dist/rule/code/index.d.ts +12 -10
- package/dist/rule/code/type.d.ts +1 -1
- package/dist/rule/data.d.ts +30 -4
- package/dist/rule/index.d.ts +2 -2
- package/dist/sdk/chunk.d.ts +2 -2
- package/dist/sdk/context.d.ts +5 -5
- package/dist/sdk/hooks.d.ts +1 -1
- package/dist/sdk/index.d.ts +16 -16
- package/dist/sdk/instance.d.ts +15 -15
- package/dist/sdk/loader.d.ts +3 -3
- package/dist/sdk/module.d.ts +7 -7
- package/dist/sdk/package.d.ts +2 -2
- package/dist/sdk/plugin.d.ts +1 -1
- package/dist/sdk/resolver.d.ts +1 -1
- package/dist/sdk/result.d.ts +11 -11
- package/dist/sdk/server/apis/alerts.d.ts +4 -4
- package/dist/sdk/server/apis/graph.d.ts +4 -4
- package/dist/sdk/server/apis/index.d.ts +15 -15
- package/dist/sdk/server/apis/loader.d.ts +3 -3
- package/dist/sdk/server/apis/plugin.d.ts +2 -2
- package/dist/sdk/server/apis/project.d.ts +2 -2
- package/dist/sdk/server/apis/resolver.d.ts +2 -2
- package/dist/sdk/server/index.d.ts +5 -5
- package/dist/sdk/statement.d.ts +2 -2
- package/dist/sdk/treeShaking.d.ts +3 -3
- package/package.json +2 -2
package/dist/error.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NonFunctionProperties } from './common';
|
|
2
|
-
import type { BaseRuleStoreData } from './rule';
|
|
1
|
+
import type { NonFunctionProperties } from './common.js';
|
|
2
|
+
import type { BaseRuleStoreData } from './rule/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Position
|
|
5
5
|
* - `line` start with `1`
|
package/dist/index.cjs
CHANGED
|
@@ -426,6 +426,14 @@ const E1008_message = {
|
|
|
426
426
|
category: 'bundle',
|
|
427
427
|
description: "\n#### Description\n\nThis rule detects `require()` calls that use the **CJS Require** dependency type, which prevents tree-shaking of the required module. Unlike `require('module').property` (CJS Full Require), a bare `require('module')` call forces the entire module to be bundled because the bundler cannot statically determine which exports are used.\n\n#### Common Causes\n\n- Using `const mod = require('some-module')` instead of destructuring at the require site.\n- Dynamically accessing properties of the required module at runtime rather than statically.\n\n#### General Solution\n\n1. **Use destructured require**: Replace `const mod = require('A')` with `const { foo } = require('A')` (CJS Full Require) so the bundler can track which exports are used.\n2. **Migrate to ESM**: Use `import { foo } from 'A'` to enable full tree-shaking support.\n3. **Use require with property access**: Replace `const mod = require('A'); mod.foo()` with `const foo = require('A').foo` to allow partial tree-shaking.\n"
|
|
428
428
|
};
|
|
429
|
+
const E1009_code = 'E1009';
|
|
430
|
+
const E1009_message = {
|
|
431
|
+
code: E1009_code,
|
|
432
|
+
title: 'ESM Import Resolved to CJS',
|
|
433
|
+
type: 'markdown',
|
|
434
|
+
category: 'bundle',
|
|
435
|
+
description: '\n#### Description\n\nThis rule detects cases where a package provides both **ESM** and **CJS** formats (via the `module` field or `exports["."]["import"]` in `package.json`), but the bundler resolved the ESM `import` statement to the **CJS** entry instead.\n\nThis prevents tree-shaking of the package, leading to larger bundle sizes than necessary.\n\n#### Common Causes\n\n- The bundler\'s `resolve.mainFields` does not include `module`, so it falls back to `main` (CJS).\n- The `resolve.conditionNames` does not include `import`, so `exports` conditions are resolved as `require`.\n- The package uses `exports` field but the bundler version does not support conditional exports.\n\n#### General Solution\n\n1. **Add `module` to `resolve.mainFields`**: Ensure your bundler config includes `"module"` before `"main"`.\n2. **Add `import` to `resolve.conditionNames`**: For packages using the `exports` field, ensure the `import` condition is listed.\n3. **Check bundler version**: Older versions of webpack/rspack may not support `exports` conditional resolution. Upgrade if necessary.\n'
|
|
436
|
+
};
|
|
429
437
|
var type_RuleMessageCodeEnumerated = /*#__PURE__*/ function(RuleMessageCodeEnumerated) {
|
|
430
438
|
RuleMessageCodeEnumerated["Extend"] = "EXTEND";
|
|
431
439
|
RuleMessageCodeEnumerated["Overlay"] = "OVERLAY";
|
|
@@ -445,7 +453,8 @@ const RuleErrorMap = {
|
|
|
445
453
|
["E1005"]: E1005_message,
|
|
446
454
|
["E1006"]: E1006_message,
|
|
447
455
|
["E1007"]: E1007_message,
|
|
448
|
-
["E1008"]: E1008_message
|
|
456
|
+
["E1008"]: E1008_message,
|
|
457
|
+
["E1009"]: E1009_message
|
|
449
458
|
};
|
|
450
459
|
var code_RsdoctorRuleClientConstant = /*#__PURE__*/ function(RsdoctorRuleClientConstant) {
|
|
451
460
|
RsdoctorRuleClientConstant["UrlQueryForErrorCode"] = "code";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * as Manifest from './manifest';
|
|
2
|
-
export * as Esbuild from './esbuild';
|
|
3
|
-
export * as Babel from './babel';
|
|
4
|
-
export * as Common from './common';
|
|
5
|
-
export * as Err from './error';
|
|
6
|
-
export * as Logger from './logger';
|
|
7
|
-
export * as SDK from './sdk';
|
|
8
|
-
export * as Modules from './modules';
|
|
9
|
-
export * as Linter from './linter';
|
|
10
|
-
export * as Rule from './rule';
|
|
11
|
-
export * as Thirdparty from './thirdparty';
|
|
12
|
-
export * as Client from './client';
|
|
13
|
-
export * as Constants from './constants';
|
|
14
|
-
export * as Plugin from './plugin';
|
|
15
|
-
export * as Config from './config';
|
|
1
|
+
export * as Manifest from './manifest.js';
|
|
2
|
+
export * as Esbuild from './esbuild.js';
|
|
3
|
+
export * as Babel from './babel.js';
|
|
4
|
+
export * as Common from './common.js';
|
|
5
|
+
export * as Err from './error.js';
|
|
6
|
+
export * as Logger from './logger.js';
|
|
7
|
+
export * as SDK from './sdk/index.js';
|
|
8
|
+
export * as Modules from './modules.js';
|
|
9
|
+
export * as Linter from './linter/index.js';
|
|
10
|
+
export * as Rule from './rule/index.js';
|
|
11
|
+
export * as Thirdparty from './thirdparty.js';
|
|
12
|
+
export * as Client from './client.js';
|
|
13
|
+
export * as Constants from './constants.js';
|
|
14
|
+
export * as Plugin from './plugin/index.js';
|
|
15
|
+
export * as Config from './config.js';
|
package/dist/index.js
CHANGED
|
@@ -385,6 +385,14 @@ const E1008_message = {
|
|
|
385
385
|
category: 'bundle',
|
|
386
386
|
description: "\n#### Description\n\nThis rule detects `require()` calls that use the **CJS Require** dependency type, which prevents tree-shaking of the required module. Unlike `require('module').property` (CJS Full Require), a bare `require('module')` call forces the entire module to be bundled because the bundler cannot statically determine which exports are used.\n\n#### Common Causes\n\n- Using `const mod = require('some-module')` instead of destructuring at the require site.\n- Dynamically accessing properties of the required module at runtime rather than statically.\n\n#### General Solution\n\n1. **Use destructured require**: Replace `const mod = require('A')` with `const { foo } = require('A')` (CJS Full Require) so the bundler can track which exports are used.\n2. **Migrate to ESM**: Use `import { foo } from 'A'` to enable full tree-shaking support.\n3. **Use require with property access**: Replace `const mod = require('A'); mod.foo()` with `const foo = require('A').foo` to allow partial tree-shaking.\n"
|
|
387
387
|
};
|
|
388
|
+
const E1009_code = 'E1009';
|
|
389
|
+
const E1009_message = {
|
|
390
|
+
code: E1009_code,
|
|
391
|
+
title: 'ESM Import Resolved to CJS',
|
|
392
|
+
type: 'markdown',
|
|
393
|
+
category: 'bundle',
|
|
394
|
+
description: '\n#### Description\n\nThis rule detects cases where a package provides both **ESM** and **CJS** formats (via the `module` field or `exports["."]["import"]` in `package.json`), but the bundler resolved the ESM `import` statement to the **CJS** entry instead.\n\nThis prevents tree-shaking of the package, leading to larger bundle sizes than necessary.\n\n#### Common Causes\n\n- The bundler\'s `resolve.mainFields` does not include `module`, so it falls back to `main` (CJS).\n- The `resolve.conditionNames` does not include `import`, so `exports` conditions are resolved as `require`.\n- The package uses `exports` field but the bundler version does not support conditional exports.\n\n#### General Solution\n\n1. **Add `module` to `resolve.mainFields`**: Ensure your bundler config includes `"module"` before `"main"`.\n2. **Add `import` to `resolve.conditionNames`**: For packages using the `exports` field, ensure the `import` condition is listed.\n3. **Check bundler version**: Older versions of webpack/rspack may not support `exports` conditional resolution. Upgrade if necessary.\n'
|
|
395
|
+
};
|
|
388
396
|
var type_RuleMessageCodeEnumerated = /*#__PURE__*/ function(RuleMessageCodeEnumerated) {
|
|
389
397
|
RuleMessageCodeEnumerated["Extend"] = "EXTEND";
|
|
390
398
|
RuleMessageCodeEnumerated["Overlay"] = "OVERLAY";
|
|
@@ -404,7 +412,8 @@ const RuleErrorMap = {
|
|
|
404
412
|
["E1005"]: E1005_message,
|
|
405
413
|
["E1006"]: E1006_message,
|
|
406
414
|
["E1007"]: E1007_message,
|
|
407
|
-
["E1008"]: E1008_message
|
|
415
|
+
["E1008"]: E1008_message,
|
|
416
|
+
["E1009"]: E1009_message
|
|
408
417
|
};
|
|
409
418
|
var code_RsdoctorRuleClientConstant = /*#__PURE__*/ function(RsdoctorRuleClientConstant) {
|
|
410
419
|
RsdoctorRuleClientConstant["UrlQueryForErrorCode"] = "code";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { RuleMessage, BaseRuleStoreData, RuleStoreDataItem } from '../rule';
|
|
2
|
-
import { ErrorLevel as Severity, Range, FixData } from '../error';
|
|
3
|
-
import { SeverityString } from './rule';
|
|
4
|
-
export { ErrorLevel as Severity } from '../error';
|
|
5
|
-
export type { Range, OffsetRange, Position, FixData } from '../error';
|
|
1
|
+
import { RuleMessage, BaseRuleStoreData, RuleStoreDataItem } from '../rule/index.js';
|
|
2
|
+
import { ErrorLevel as Severity, Range, FixData } from '../error.js';
|
|
3
|
+
import { SeverityString } from './rule.js';
|
|
4
|
+
export { ErrorLevel as Severity } from '../error.js';
|
|
5
|
+
export type { Range, OffsetRange, Position, FixData } from '../error.js';
|
|
6
6
|
/** Diagnostic recommendations */
|
|
7
7
|
export interface Suggestion {
|
|
8
8
|
description: string;
|
package/dist/linter/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './diagnostic';
|
|
2
|
-
export * from './rule';
|
|
1
|
+
export * from './diagnostic.js';
|
|
2
|
+
export * from './rule.js';
|
package/dist/linter/rule.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ArrayToUnion, UnionToTuple } from '../common';
|
|
2
|
-
import type { ErrorLevel as Severity } from '../error';
|
|
3
|
-
import type { Hooks, RuntimeContext } from '../sdk';
|
|
4
|
-
import type { ReportData, Diagnostic } from './diagnostic';
|
|
5
|
-
import type { RuleMessage } from '../rule';
|
|
1
|
+
import type { ArrayToUnion, UnionToTuple } from '../common.js';
|
|
2
|
+
import type { ErrorLevel as Severity } from '../error.js';
|
|
3
|
+
import type { Hooks, RuntimeContext } from '../sdk/index.js';
|
|
4
|
+
import type { ReportData, Diagnostic } from './diagnostic.js';
|
|
5
|
+
import type { RuleMessage } from '../rule/index.js';
|
|
6
6
|
/** Error level */
|
|
7
7
|
export type SeverityString = keyof typeof Severity;
|
|
8
8
|
/** Error level */
|
package/dist/manifest.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PlainObject, ObjectPropertyNames } from './common';
|
|
2
|
-
import { StoreData } from './sdk';
|
|
1
|
+
import { PlainObject, ObjectPropertyNames } from './common.js';
|
|
2
|
+
import { StoreData } from './sdk/index.js';
|
|
3
3
|
export interface RsdoctorManifest {
|
|
4
4
|
client: RsdoctorManifestClient;
|
|
5
5
|
/**
|
package/dist/modules.d.ts
CHANGED
package/dist/plugin/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './baseCompiler';
|
|
2
|
-
export * from './baseStats';
|
|
3
|
-
export * from './plugin';
|
|
4
|
-
export * from './baseLoader';
|
|
5
|
-
export * from './rspack';
|
|
6
|
-
export * from './internal-rules';
|
|
7
|
-
export * from './webpack';
|
|
1
|
+
export * from './baseCompiler.js';
|
|
2
|
+
export * from './baseStats.js';
|
|
3
|
+
export * from './plugin.js';
|
|
4
|
+
export * from './baseLoader.js';
|
|
5
|
+
export * from './rspack.js';
|
|
6
|
+
export * from './internal-rules.js';
|
|
7
|
+
export * from './webpack.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Linter } from '../index';
|
|
1
|
+
import { Linter } from '../index.js';
|
|
2
2
|
export type InternalRules = Linter.RuleData[];
|
|
3
3
|
export type InternalRuleId = 'E1001' | 'E1002' | 'E1003' | 'E1004' | 'E1005' | 'E1006' | 'E1007';
|
|
4
4
|
export type InternalRuleName = 'duplicate-package' | 'cross-chunks-package' | 'default-import-check' | 'ecma-version-check' | 'loader-performance-optimization' | 'module-mixed-chunks' | 'tree-shaking-side-effects-only';
|
package/dist/plugin/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Common, Config, Linter as LinterType, SDK } from '
|
|
2
|
-
import { InternalRules } from './internal-rules';
|
|
1
|
+
import { Common, Config, Linter as LinterType, SDK } from '../index.js';
|
|
2
|
+
import { InternalRules } from './internal-rules.js';
|
|
3
3
|
export interface RsdoctorWebpackPluginFeatures {
|
|
4
4
|
/**
|
|
5
5
|
* turn off it if you need not to analyze the executions of webpack loaders.
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { RuleMessage } from './type';
|
|
2
|
-
import * as E1001 from './E1001';
|
|
3
|
-
import * as E1002 from './E1002';
|
|
4
|
-
import * as E1003 from './E1003';
|
|
5
|
-
import * as E1004 from './E1004';
|
|
6
|
-
import * as E1005 from './E1005';
|
|
7
|
-
import * as E1006 from './E1006';
|
|
8
|
-
import * as E1007 from './E1007';
|
|
9
|
-
import * as E1008 from './E1008';
|
|
1
|
+
import { RuleMessage } from './type.js';
|
|
2
|
+
import * as E1001 from './E1001.js';
|
|
3
|
+
import * as E1002 from './E1002.js';
|
|
4
|
+
import * as E1003 from './E1003.js';
|
|
5
|
+
import * as E1004 from './E1004.js';
|
|
6
|
+
import * as E1005 from './E1005.js';
|
|
7
|
+
import * as E1006 from './E1006.js';
|
|
8
|
+
import * as E1007 from './E1007.js';
|
|
9
|
+
import * as E1008 from './E1008.js';
|
|
10
|
+
import * as E1009 from './E1009.js';
|
|
10
11
|
export type RuleErrorCodes = {
|
|
11
12
|
[E1001.code]: typeof E1001;
|
|
12
13
|
[E1002.code]: typeof E1002;
|
|
@@ -16,6 +17,7 @@ export type RuleErrorCodes = {
|
|
|
16
17
|
[E1006.code]: typeof E1006;
|
|
17
18
|
[E1007.code]: typeof E1007;
|
|
18
19
|
[E1008.code]: typeof E1008;
|
|
20
|
+
[E1009.code]: typeof E1009;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
23
|
* The format is E + "4 digits".
|
|
@@ -28,4 +30,4 @@ export declare const RuleErrorMap: Record<keyof RuleErrorCodes, RuleMessage>;
|
|
|
28
30
|
export declare enum RsdoctorRuleClientConstant {
|
|
29
31
|
UrlQueryForErrorCode = "code"
|
|
30
32
|
}
|
|
31
|
-
export * from './type';
|
|
33
|
+
export * from './type.js';
|
package/dist/rule/code/type.d.ts
CHANGED
package/dist/rule/data.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { RuleMessage, RuleMessageCodeEnumerated } from './code';
|
|
2
|
-
import type { SourceRange } from '../sdk';
|
|
3
|
-
import type { CrossChunksPackageType, PackageBasicData, PackageInstance } from '../sdk/package';
|
|
1
|
+
import type { RuleMessage, RuleMessageCodeEnumerated } from './code/index.js';
|
|
2
|
+
import type { SourceRange } from '../sdk/index.js';
|
|
3
|
+
import type { CrossChunksPackageType, PackageBasicData, PackageInstance } from '../sdk/package.js';
|
|
4
4
|
export interface BaseRuleStoreData extends Pick<RuleMessage, 'code' | 'category'> {
|
|
5
5
|
/**
|
|
6
6
|
* unique of error
|
|
@@ -187,5 +187,31 @@ export interface CjsRequireRuleStoreData extends BaseRuleStoreData {
|
|
|
187
187
|
/** The original require string (e.g. 'lodash') */
|
|
188
188
|
request: string;
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
/**
|
|
191
|
+
* Rule for detecting ESM imports that were resolved to a CJS module
|
|
192
|
+
* even though the package provides an ESM entry.
|
|
193
|
+
*/
|
|
194
|
+
export interface EsmResolvedToCjsRuleStoreData extends BaseRuleStoreData {
|
|
195
|
+
type: 'esm-resolved-to-cjs';
|
|
196
|
+
/** Package name */
|
|
197
|
+
packageName: string;
|
|
198
|
+
/** Package version */
|
|
199
|
+
packageVersion: string;
|
|
200
|
+
/** The ESM entry path declared in the package's package.json */
|
|
201
|
+
esmEntry: string;
|
|
202
|
+
/** The actual resolved (CJS) module */
|
|
203
|
+
resolvedModule: {
|
|
204
|
+
id: number | string;
|
|
205
|
+
path: string;
|
|
206
|
+
webpackId?: string | number;
|
|
207
|
+
};
|
|
208
|
+
/** All issuer modules that imported this package via ESM import */
|
|
209
|
+
issuers: Array<{
|
|
210
|
+
id: number | string;
|
|
211
|
+
path: string;
|
|
212
|
+
/** The import request string (e.g. 'lodash') */
|
|
213
|
+
request: string;
|
|
214
|
+
}>;
|
|
215
|
+
}
|
|
216
|
+
export type RuleStoreDataItem = LinkRuleStoreData | FileRelationRuleStoreData | CodeChangeRuleStoreData | PackageRelationDiffRuleStoreData | CodeViewRuleStoreData | CrossChunksPackageRuleStoreData | ModuleMixedChunksRuleStoreData | ConnectionsOnlyImportsRuleStoreData | CjsRequireRuleStoreData | EsmResolvedToCjsRuleStoreData;
|
|
191
217
|
export type RuleStoreData = RuleStoreDataItem[];
|
package/dist/rule/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './code';
|
|
2
|
-
export * from './data';
|
|
1
|
+
export * from './code/index.js';
|
|
2
|
+
export * from './data.js';
|
package/dist/sdk/chunk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NonFunctionProperties } from '../common';
|
|
2
|
-
import type { ModuleInstance, ToDataType } from './module';
|
|
1
|
+
import type { NonFunctionProperties } from '../common.js';
|
|
2
|
+
import type { ModuleInstance, ToDataType } from './module.js';
|
|
3
3
|
export interface AssetInstance {
|
|
4
4
|
id: number;
|
|
5
5
|
path: string;
|
package/dist/sdk/context.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { ChunkGraphInstance } from './chunk';
|
|
2
|
-
import type { ModuleGraphInstance } from './module';
|
|
3
|
-
import type { PackageGraphInstance, OtherReports } from './package';
|
|
4
|
-
import { ConfigData } from './config';
|
|
5
|
-
import { LoaderData } from './loader';
|
|
1
|
+
import type { ChunkGraphInstance } from './chunk.js';
|
|
2
|
+
import type { ModuleGraphInstance } from './module.js';
|
|
3
|
+
import type { PackageGraphInstance, OtherReports } from './package.js';
|
|
4
|
+
import { ConfigData } from './config.js';
|
|
5
|
+
import { LoaderData } from './loader.js';
|
|
6
6
|
export interface RuntimeContext {
|
|
7
7
|
/** Project root directory */
|
|
8
8
|
root: string;
|
package/dist/sdk/hooks.d.ts
CHANGED
package/dist/sdk/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export * from './loader';
|
|
2
|
-
export * from './resolver';
|
|
3
|
-
export * from './plugin';
|
|
4
|
-
export * from './module';
|
|
5
|
-
export * from './chunk';
|
|
6
|
-
export * from './result';
|
|
7
|
-
export * from './summary';
|
|
8
|
-
export * from './package';
|
|
9
|
-
export * from './context';
|
|
10
|
-
export * from './config';
|
|
11
|
-
export * from './server';
|
|
12
|
-
export * from './statement';
|
|
13
|
-
export * from './treeShaking';
|
|
14
|
-
export * from './envinfo';
|
|
15
|
-
export * from './instance';
|
|
16
|
-
export * from './hooks';
|
|
1
|
+
export * from './loader.js';
|
|
2
|
+
export * from './resolver.js';
|
|
3
|
+
export * from './plugin.js';
|
|
4
|
+
export * from './module.js';
|
|
5
|
+
export * from './chunk.js';
|
|
6
|
+
export * from './result.js';
|
|
7
|
+
export * from './summary.js';
|
|
8
|
+
export * from './package.js';
|
|
9
|
+
export * from './context.js';
|
|
10
|
+
export * from './config.js';
|
|
11
|
+
export * from './server/index.js';
|
|
12
|
+
export * from './statement.js';
|
|
13
|
+
export * from './treeShaking.js';
|
|
14
|
+
export * from './envinfo.js';
|
|
15
|
+
export * from './instance.js';
|
|
16
|
+
export * from './hooks.js';
|
package/dist/sdk/instance.d.ts
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type { SourceMapConsumer, RawSourceMap } from 'source-map';
|
|
2
|
-
import { LoaderData, ResourceLoaderData } from './loader';
|
|
3
|
-
import { ResolverData } from './resolver';
|
|
4
|
-
import { PluginData } from './plugin';
|
|
5
|
-
import { BuilderStoreData, EMOStoreData } from './result';
|
|
6
|
-
import { ModuleGraphInstance, ToDataType } from './module';
|
|
7
|
-
import { RsdoctorManifestClientRoutes, RsdoctorManifestWithShardingFiles } from '../manifest';
|
|
8
|
-
import { RuntimeContext, RuntimeContextOptions } from './context';
|
|
9
|
-
import { Hooks } from './hooks';
|
|
10
|
-
import { ChunkGraphInstance } from './chunk';
|
|
11
|
-
import { RsdoctorServerInstance } from './server';
|
|
12
|
-
import { PlainObject } from '../common';
|
|
13
|
-
import { BriefModeOptions } from '../config';
|
|
14
|
-
import { EmoCheckData } from '../emo';
|
|
15
|
-
import { SummaryData } from './summary';
|
|
16
|
-
import { ConfigData } from './config';
|
|
2
|
+
import { LoaderData, ResourceLoaderData } from './loader.js';
|
|
3
|
+
import { ResolverData } from './resolver.js';
|
|
4
|
+
import { PluginData } from './plugin.js';
|
|
5
|
+
import { BuilderStoreData, EMOStoreData } from './result.js';
|
|
6
|
+
import { ModuleGraphInstance, ToDataType } from './module.js';
|
|
7
|
+
import { RsdoctorManifestClientRoutes, RsdoctorManifestWithShardingFiles } from '../manifest.js';
|
|
8
|
+
import { RuntimeContext, RuntimeContextOptions } from './context.js';
|
|
9
|
+
import { Hooks } from './hooks.js';
|
|
10
|
+
import { ChunkGraphInstance } from './chunk.js';
|
|
11
|
+
import { RsdoctorServerInstance } from './server/index.js';
|
|
12
|
+
import { PlainObject } from '../common.js';
|
|
13
|
+
import { BriefModeOptions } from '../config.js';
|
|
14
|
+
import { EmoCheckData } from '../emo.js';
|
|
15
|
+
import { SummaryData } from './summary.js';
|
|
16
|
+
import { ConfigData } from './config.js';
|
|
17
17
|
export type WriteStoreOptionsType = {};
|
|
18
18
|
export declare enum IMode {
|
|
19
19
|
brief = "brief",
|
package/dist/sdk/loader.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PlainObject } from '../common';
|
|
2
|
-
import { DevToolErrorInstance } from '../error';
|
|
3
|
-
import { ProcessData } from './process';
|
|
1
|
+
import { PlainObject } from '../common.js';
|
|
2
|
+
import { DevToolErrorInstance } from '../error.js';
|
|
3
|
+
import { ProcessData } from './process.js';
|
|
4
4
|
/** Single Loader conversion data for processing files */
|
|
5
5
|
export interface LoaderTransformData extends ProcessData {
|
|
6
6
|
/** loader name */
|
package/dist/sdk/module.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Program } from 'estree';
|
|
2
2
|
import type { SourceMapConsumer } from 'source-map';
|
|
3
|
-
import type { NonFunctionProperties } from '../common';
|
|
4
|
-
import type { ChunkInstance } from './chunk';
|
|
5
|
-
import type { BriefModeOptions } from '../config';
|
|
6
|
-
import type { StatementInstance, StatementData } from './statement';
|
|
7
|
-
import type { PackageData } from './package';
|
|
8
|
-
import type { ModuleGraphModuleInstance, ModuleGraphModuleData, ExportData, ExportInstance, SideEffectData, SideEffectInstance, VariableData, VariableInstance } from './treeShaking';
|
|
9
|
-
import type { StatsModule } from '../plugin';
|
|
3
|
+
import type { NonFunctionProperties } from '../common.js';
|
|
4
|
+
import type { ChunkInstance } from './chunk.js';
|
|
5
|
+
import type { BriefModeOptions } from '../config.js';
|
|
6
|
+
import type { StatementInstance, StatementData } from './statement.js';
|
|
7
|
+
import type { PackageData } from './package.js';
|
|
8
|
+
import type { ModuleGraphModuleInstance, ModuleGraphModuleData, ExportData, ExportInstance, SideEffectData, SideEffectInstance, VariableData, VariableInstance } from './treeShaking.js';
|
|
9
|
+
import type { StatsModule } from '../plugin/index.js';
|
|
10
10
|
export declare enum DependencyKind {
|
|
11
11
|
Unknown = 0,
|
|
12
12
|
ImportStatement = 1,
|
package/dist/sdk/package.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ModuleInstance, DependencyInstance, ModuleSize } from './module';
|
|
2
|
-
import type { NonFunctionProperties } from '../common';
|
|
1
|
+
import type { ModuleInstance, DependencyInstance, ModuleSize } from './module.js';
|
|
2
|
+
import type { NonFunctionProperties } from '../common.js';
|
|
3
3
|
export interface PackageJSONData {
|
|
4
4
|
/** package name */
|
|
5
5
|
name: string;
|
package/dist/sdk/plugin.d.ts
CHANGED
package/dist/sdk/resolver.d.ts
CHANGED
package/dist/sdk/result.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { EmoCheckData } from '../emo';
|
|
2
|
-
import { LoaderData } from './loader';
|
|
3
|
-
import { ModuleGraphData, ModuleCodeData, TreeShakingData } from './module';
|
|
4
|
-
import { ChunkGraphData } from './chunk';
|
|
5
|
-
import { ResolverData } from './resolver';
|
|
6
|
-
import { PluginData } from './plugin';
|
|
7
|
-
import { SummaryData } from './summary';
|
|
8
|
-
import { ConfigData } from './config';
|
|
9
|
-
import { RuleStoreData } from '../rule';
|
|
10
|
-
import type { EnvInfo } from './envinfo';
|
|
11
|
-
import { PackageGraphData, OtherReports } from './package';
|
|
1
|
+
import { EmoCheckData } from '../emo.js';
|
|
2
|
+
import { LoaderData } from './loader.js';
|
|
3
|
+
import { ModuleGraphData, ModuleCodeData, TreeShakingData } from './module.js';
|
|
4
|
+
import { ChunkGraphData } from './chunk.js';
|
|
5
|
+
import { ResolverData } from './resolver.js';
|
|
6
|
+
import { PluginData } from './plugin.js';
|
|
7
|
+
import { SummaryData } from './summary.js';
|
|
8
|
+
import { ConfigData } from './config.js';
|
|
9
|
+
import { RuleStoreData } from '../rule/index.js';
|
|
10
|
+
import type { EnvInfo } from './envinfo.js';
|
|
11
|
+
import { PackageGraphData, OtherReports } from './package.js';
|
|
12
12
|
export type ErrorsData = RuleStoreData;
|
|
13
13
|
interface StoreCommonData {
|
|
14
14
|
hash: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { API } from './index';
|
|
2
|
-
import { OverlayRuleStoreData, RuleStoreDataItem } from '../../../rule';
|
|
3
|
-
import { DependencyData, ModuleData, ModuleSource } from '../../module';
|
|
4
|
-
import { PackageBasicData } from '../../package';
|
|
1
|
+
import { API } from './index.js';
|
|
2
|
+
import { OverlayRuleStoreData, RuleStoreDataItem } from '../../../rule/index.js';
|
|
3
|
+
import { DependencyData, ModuleData, ModuleSource } from '../../module.js';
|
|
4
|
+
import { PackageBasicData } from '../../package.js';
|
|
5
5
|
export interface AlertsAPIResponse {
|
|
6
6
|
/**
|
|
7
7
|
* get the details of the alerts which type is "package-relation"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { RsdoctorClientAssetsSummary } from '../../../client';
|
|
2
|
-
import { AssetData, ChunkData, ChunkGraphData, EntryPointData } from '../../chunk';
|
|
3
|
-
import { ModuleData, ModuleGraphData, SideEffectCodeData } from '../../module';
|
|
4
|
-
import { API } from './index';
|
|
1
|
+
import { RsdoctorClientAssetsSummary } from '../../../client.js';
|
|
2
|
+
import { AssetData, ChunkData, ChunkGraphData, EntryPointData } from '../../chunk.js';
|
|
3
|
+
import { ModuleData, ModuleGraphData, SideEffectCodeData } from '../../module.js';
|
|
4
|
+
import { API } from './index.js';
|
|
5
5
|
export interface GraphAPIResponse {
|
|
6
6
|
[API.GetAssetsSummary]: RsdoctorClientAssetsSummary;
|
|
7
7
|
[API.GetAssetDetails]: {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ServerResponse } from 'http';
|
|
2
|
-
import { PlainObject, Get } from '../../../common';
|
|
3
|
-
import { connect } from '../../../thirdparty';
|
|
4
|
-
import { RsdoctorBuilderSDKInstance } from '../../index';
|
|
5
|
-
import { RsdoctorServerInstance } from '../index';
|
|
6
|
-
import { LoaderData } from '../../loader';
|
|
7
|
-
import { ProjectAPIResponse, ProjectAPIRequestBody } from './project';
|
|
8
|
-
import { LoaderAPIResponse, LoaderAPIRequestBody } from './loader';
|
|
9
|
-
import { ResolverAPIResponse, ResolverAPIRequestBody } from './resolver';
|
|
10
|
-
import { PluginAPIResponse, PluginAPIRequestBody } from './plugin';
|
|
11
|
-
import { GraphAPIResponse, GraphAPIRequestBody } from './graph';
|
|
12
|
-
import { AlertsAPIResponse, AlertsAPIRequestBody } from './alerts';
|
|
13
|
-
import { RsdoctorManifestMappingKeys } from '../../../manifest';
|
|
14
|
-
import { SDK } from '../../../index';
|
|
15
|
-
import { StatsModule } from '../../../plugin';
|
|
16
|
-
export * from './pagination';
|
|
2
|
+
import { PlainObject, Get } from '../../../common.js';
|
|
3
|
+
import { connect } from '../../../thirdparty.js';
|
|
4
|
+
import { RsdoctorBuilderSDKInstance } from '../../index.js';
|
|
5
|
+
import { RsdoctorServerInstance } from '../index.js';
|
|
6
|
+
import { LoaderData } from '../../loader.js';
|
|
7
|
+
import { ProjectAPIResponse, ProjectAPIRequestBody } from './project.js';
|
|
8
|
+
import { LoaderAPIResponse, LoaderAPIRequestBody } from './loader.js';
|
|
9
|
+
import { ResolverAPIResponse, ResolverAPIRequestBody } from './resolver.js';
|
|
10
|
+
import { PluginAPIResponse, PluginAPIRequestBody } from './plugin.js';
|
|
11
|
+
import { GraphAPIResponse, GraphAPIRequestBody } from './graph.js';
|
|
12
|
+
import { AlertsAPIResponse, AlertsAPIRequestBody } from './alerts.js';
|
|
13
|
+
import { RsdoctorManifestMappingKeys } from '../../../manifest.js';
|
|
14
|
+
import { SDK } from '../../../index.js';
|
|
15
|
+
import { StatsModule } from '../../../plugin/index.js';
|
|
16
|
+
export * from './pagination.js';
|
|
17
17
|
export declare enum API {
|
|
18
18
|
ApplyErrorFix = "/api/apply/error/fix",
|
|
19
19
|
Env = "/api/env",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { API } from './index';
|
|
2
|
-
import { ResourceData, LoaderTransformData } from '../../loader';
|
|
3
|
-
import { Get } from '../../../common';
|
|
1
|
+
import { API } from './index.js';
|
|
2
|
+
import { ResourceData, LoaderTransformData } from '../../loader.js';
|
|
3
|
+
import { Get } from '../../../common.js';
|
|
4
4
|
export interface LoaderAPIResponse {
|
|
5
5
|
[API.GetLoaderNames]: string[];
|
|
6
6
|
[API.GetLayers]: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { RsdoctorManifestClientRoutes, RsdoctorManifestData } from '../../../manifest';
|
|
2
|
-
import { API, APIExtends } from './index';
|
|
1
|
+
import { RsdoctorManifestClientRoutes, RsdoctorManifestData } from '../../../manifest.js';
|
|
2
|
+
import { API, APIExtends } from './index.js';
|
|
3
3
|
export interface ProjectAPIResponse {
|
|
4
4
|
[API.Env]: {
|
|
5
5
|
ip: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { API } from './index';
|
|
2
|
-
import { PathResolverData } from '../../resolver';
|
|
1
|
+
import { API } from './index.js';
|
|
2
|
+
import { PathResolverData } from '../../resolver.js';
|
|
3
3
|
export interface ResolverAPIResponse {
|
|
4
4
|
[API.GetResolverFileTree]: Array<Pick<PathResolverData, 'issuerPath'>>;
|
|
5
5
|
[API.GetResolverFileDetails]: {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PlainObject } from '../../common';
|
|
2
|
-
import { connect } from '../../thirdparty';
|
|
3
|
-
import { RsdoctorClientRoutes } from '../../client';
|
|
4
|
-
import { API, APIExtends } from './apis';
|
|
5
|
-
export * as ServerAPI from './apis';
|
|
1
|
+
import { PlainObject } from '../../common.js';
|
|
2
|
+
import { connect } from '../../thirdparty.js';
|
|
3
|
+
import { RsdoctorClientRoutes } from '../../client.js';
|
|
4
|
+
import { API, APIExtends } from './apis/index.js';
|
|
5
|
+
export * as ServerAPI from './apis/index.js';
|
|
6
6
|
interface ClientUrlFunctionWithRouteDefined<T> {
|
|
7
7
|
(route: RsdoctorClientRoutes.BundleDiff, baselineUrl: string, currentUrl: string): T;
|
|
8
8
|
(route?: 'homepage'): T;
|
package/dist/sdk/statement.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { SourceRange, ModuleInstance } from './module';
|
|
2
|
-
import type { NonFunctionProperties } from '../common';
|
|
1
|
+
import type { SourceRange, ModuleInstance } from './module.js';
|
|
2
|
+
import type { NonFunctionProperties } from '../common.js';
|
|
3
3
|
/** Statement position */
|
|
4
4
|
export interface StatementPosition {
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ModuleInstance, DependencyInstance } from './module';
|
|
2
|
-
import type { StatementInstance, StatementData } from './statement';
|
|
3
|
-
import type { NonFunctionProperties } from '../common';
|
|
1
|
+
import type { ModuleInstance, DependencyInstance } from './module.js';
|
|
2
|
+
import type { StatementInstance, StatementData } from './statement.js';
|
|
3
|
+
import type { NonFunctionProperties } from '../common.js';
|
|
4
4
|
/** Variable data */
|
|
5
5
|
export interface VariableInstance {
|
|
6
6
|
/** Variable number */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsdoctor/types",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.5",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/web-infra-dev/rsdoctor",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"source-map": "^0.7.6"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@rspack/core": "2.0.0-
|
|
30
|
+
"@rspack/core": "2.0.0-beta.7",
|
|
31
31
|
"@types/node": "^22.8.1",
|
|
32
32
|
"@types/react": "^18.3.28",
|
|
33
33
|
"tslib": "2.8.1",
|