@rsdoctor/types 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/babel.d.ts +14 -0
- package/dist/babel.d.ts.map +1 -0
- package/dist/babel.js +2 -0
- package/dist/client.d.ts +109 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +29 -0
- package/dist/common.d.ts +27 -0
- package/dist/common.d.ts.map +1 -0
- package/dist/common.js +2 -0
- package/dist/constants.d.ts +17 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +43 -0
- package/dist/emo.d.ts +29 -0
- package/dist/emo.d.ts.map +1 -0
- package/dist/emo.js +9 -0
- package/dist/error.d.ts +138 -0
- package/dist/error.d.ts.map +1 -0
- package/dist/error.js +10 -0
- package/dist/esbuild.d.ts +31 -0
- package/dist/esbuild.d.ts.map +1 -0
- package/dist/esbuild.js +2 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +40 -0
- package/dist/linter/diagnostic.d.ts +49 -0
- package/dist/linter/diagnostic.d.ts.map +1 -0
- package/dist/linter/diagnostic.js +5 -0
- package/dist/linter/index.d.ts +3 -0
- package/dist/linter/index.d.ts.map +1 -0
- package/dist/linter/index.js +18 -0
- package/dist/linter/rule.d.ts +108 -0
- package/dist/linter/rule.d.ts.map +1 -0
- package/dist/linter/rule.js +2 -0
- package/dist/logger.d.ts +10 -0
- package/dist/logger.d.ts.map +1 -0
- package/dist/logger.js +12 -0
- package/dist/manifest.d.ts +68 -0
- package/dist/manifest.d.ts.map +1 -0
- package/dist/manifest.js +17 -0
- package/dist/modules.d.ts +8 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +2 -0
- package/dist/plugin/baseCompiler.d.ts +27 -0
- package/dist/plugin/baseCompiler.d.ts.map +1 -0
- package/dist/plugin/baseCompiler.js +2 -0
- package/dist/plugin/baseLoader.d.ts +74 -0
- package/dist/plugin/baseLoader.d.ts.map +1 -0
- package/dist/plugin/baseLoader.js +2 -0
- package/dist/plugin/baseStats.d.ts +118 -0
- package/dist/plugin/baseStats.d.ts.map +1 -0
- package/dist/plugin/baseStats.js +2 -0
- package/dist/plugin/index.d.ts +5 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +20 -0
- package/dist/plugin/plugin.d.ts +33 -0
- package/dist/plugin/plugin.d.ts.map +1 -0
- package/dist/plugin/plugin.js +2 -0
- package/dist/rule/code/E1001.d.ts +4 -0
- package/dist/rule/code/E1001.d.ts.map +1 -0
- package/dist/rule/code/E1001.js +31 -0
- package/dist/rule/code/E1002.d.ts +4 -0
- package/dist/rule/code/E1002.d.ts.map +1 -0
- package/dist/rule/code/E1002.js +31 -0
- package/dist/rule/code/E1003.d.ts +4 -0
- package/dist/rule/code/E1003.d.ts.map +1 -0
- package/dist/rule/code/E1003.js +39 -0
- package/dist/rule/code/E1004.d.ts +4 -0
- package/dist/rule/code/E1004.d.ts.map +1 -0
- package/dist/rule/code/E1004.js +15 -0
- package/dist/rule/code/index.d.ts +24 -0
- package/dist/rule/code/index.d.ts.map +1 -0
- package/dist/rule/code/index.js +51 -0
- package/dist/rule/code/type.d.ts +28 -0
- package/dist/rule/code/type.d.ts.map +1 -0
- package/dist/rule/code/type.js +23 -0
- package/dist/rule/data.d.ts +133 -0
- package/dist/rule/data.d.ts.map +1 -0
- package/dist/rule/data.js +2 -0
- package/dist/rule/index.d.ts +3 -0
- package/dist/rule/index.d.ts.map +1 -0
- package/dist/rule/index.js +18 -0
- package/dist/sdk/chunk.d.ts +126 -0
- package/dist/sdk/chunk.d.ts.map +1 -0
- package/dist/sdk/chunk.js +2 -0
- package/dist/sdk/config.d.ts +12 -0
- package/dist/sdk/config.d.ts.map +1 -0
- package/dist/sdk/config.js +2 -0
- package/dist/sdk/context.d.ts +24 -0
- package/dist/sdk/context.d.ts.map +1 -0
- package/dist/sdk/context.js +2 -0
- package/dist/sdk/envinfo.d.ts +20 -0
- package/dist/sdk/envinfo.d.ts.map +1 -0
- package/dist/sdk/envinfo.js +2 -0
- package/dist/sdk/hooks.d.ts +15 -0
- package/dist/sdk/hooks.d.ts.map +1 -0
- package/dist/sdk/hooks.js +2 -0
- package/dist/sdk/index.d.ts +17 -0
- package/dist/sdk/index.d.ts.map +1 -0
- package/dist/sdk/index.js +32 -0
- package/dist/sdk/instance.d.ts +153 -0
- package/dist/sdk/instance.d.ts.map +1 -0
- package/dist/sdk/instance.js +2 -0
- package/dist/sdk/loader.d.ts +65 -0
- package/dist/sdk/loader.d.ts.map +1 -0
- package/dist/sdk/loader.js +2 -0
- package/dist/sdk/module.d.ts +306 -0
- package/dist/sdk/module.d.ts.map +1 -0
- package/dist/sdk/module.js +30 -0
- package/dist/sdk/package.d.ts +114 -0
- package/dist/sdk/package.d.ts.map +1 -0
- package/dist/sdk/package.js +2 -0
- package/dist/sdk/plugin.d.ts +22 -0
- package/dist/sdk/plugin.d.ts.map +1 -0
- package/dist/sdk/plugin.js +2 -0
- package/dist/sdk/process.d.ts +11 -0
- package/dist/sdk/process.d.ts.map +1 -0
- package/dist/sdk/process.js +2 -0
- package/dist/sdk/resolver.d.ts +53 -0
- package/dist/sdk/resolver.d.ts.map +1 -0
- package/dist/sdk/resolver.js +2 -0
- package/dist/sdk/result.d.ts +42 -0
- package/dist/sdk/result.d.ts.map +1 -0
- package/dist/sdk/result.js +2 -0
- package/dist/sdk/server/apis/alerts.d.ts +27 -0
- package/dist/sdk/server/apis/alerts.d.ts.map +1 -0
- package/dist/sdk/server/apis/alerts.js +3 -0
- package/dist/sdk/server/apis/graph.d.ts +42 -0
- package/dist/sdk/server/apis/graph.d.ts.map +1 -0
- package/dist/sdk/server/apis/graph.js +3 -0
- package/dist/sdk/server/apis/index.d.ts +130 -0
- package/dist/sdk/server/apis/index.d.ts.map +1 -0
- package/dist/sdk/server/apis/index.js +72 -0
- package/dist/sdk/server/apis/loader.d.ts +47 -0
- package/dist/sdk/server/apis/loader.d.ts.map +1 -0
- package/dist/sdk/server/apis/loader.js +3 -0
- package/dist/sdk/server/apis/pagination.d.ts +12 -0
- package/dist/sdk/server/apis/pagination.d.ts.map +1 -0
- package/dist/sdk/server/apis/pagination.js +2 -0
- package/dist/sdk/server/apis/plugin.d.ts +20 -0
- package/dist/sdk/server/apis/plugin.d.ts.map +1 -0
- package/dist/sdk/server/apis/plugin.js +3 -0
- package/dist/sdk/server/apis/project.d.ts +17 -0
- package/dist/sdk/server/apis/project.d.ts.map +1 -0
- package/dist/sdk/server/apis/project.js +3 -0
- package/dist/sdk/server/apis/resolver.d.ts +19 -0
- package/dist/sdk/server/apis/resolver.d.ts.map +1 -0
- package/dist/sdk/server/apis/resolver.js +3 -0
- package/dist/sdk/server/index.d.ts +25 -0
- package/dist/sdk/server/index.d.ts.map +1 -0
- package/dist/sdk/server/index.js +27 -0
- package/dist/sdk/statement.d.ts +178 -0
- package/dist/sdk/statement.d.ts.map +1 -0
- package/dist/sdk/statement.js +147 -0
- package/dist/sdk/summary.d.ts +19 -0
- package/dist/sdk/summary.d.ts.map +1 -0
- package/dist/sdk/summary.js +2 -0
- package/dist/sdk/treeShaking.d.ts +153 -0
- package/dist/sdk/treeShaking.d.ts.map +1 -0
- package/dist/sdk/treeShaking.js +2 -0
- package/dist/thirdparty.d.ts +3 -0
- package/dist/thirdparty.d.ts.map +1 -0
- package/dist/thirdparty.js +2 -0
- package/package.json +46 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface RsdoctorWebpackPluginFeatures {
|
|
2
|
+
/**
|
|
3
|
+
* turn off it if you need not to analyze the executions of webpack loaders.
|
|
4
|
+
* @default true
|
|
5
|
+
*/
|
|
6
|
+
loader?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* turn off it if you need not to analyze the executions of webpack plugins.
|
|
9
|
+
* @default true
|
|
10
|
+
*/
|
|
11
|
+
plugins?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* turn off it if you need not to analyze the executions of resolver.
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
resolver?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* turn off it if you need not to analyze the output bundle.
|
|
19
|
+
* @default true
|
|
20
|
+
*/
|
|
21
|
+
bundle?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* turn off it if you need not to analyze the result of tree shaking.
|
|
24
|
+
* @default false
|
|
25
|
+
*/
|
|
26
|
+
treeShaking?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* turn on it if you just use lite mode. This mode do not have source codes.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
lite?: boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../../src/plugin/plugin.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,6BAA6B;IAC5C;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"E1001.d.ts","sourceRoot":"","sources":["../../../src/rule/code/E1001.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,IAAI,UAAU,CAAC;AAE5B,eAAO,MAAM,OAAO,EAAE,WA0BrB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.message = exports.code = void 0;
|
|
4
|
+
exports.code = 'E1001';
|
|
5
|
+
exports.message = {
|
|
6
|
+
code: exports.code,
|
|
7
|
+
title: 'Duplicate Packages',
|
|
8
|
+
type: 'markdown',
|
|
9
|
+
category: 'bundle',
|
|
10
|
+
description: `
|
|
11
|
+
#### Description
|
|
12
|
+
|
|
13
|
+
there is a same name package which bundled more than one version in your application.
|
|
14
|
+
|
|
15
|
+
it is not good to the bundle size of your application.
|
|
16
|
+
|
|
17
|
+
#### General Solution
|
|
18
|
+
|
|
19
|
+
add an entry in \`resolve.alias\` which will configure Webpack to route any package references to a single specified path.
|
|
20
|
+
|
|
21
|
+
For example, if \`lodash\` is duplicated in your bundle, the following configuration would render all Lodash imports to always refer to the \`lodash\` instance found at \`./node_modules/lodash\`:
|
|
22
|
+
|
|
23
|
+
\`\`\`js
|
|
24
|
+
{
|
|
25
|
+
alias: {
|
|
26
|
+
lodash: path.resolve(__dirname, 'node_modules/lodash')
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
\`\`\`
|
|
30
|
+
`,
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"E1002.d.ts","sourceRoot":"","sources":["../../../src/rule/code/E1002.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,IAAI,UAAU,CAAC;AAE5B,eAAO,MAAM,OAAO,EAAE,WA0BrB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.message = exports.code = void 0;
|
|
4
|
+
exports.code = 'E1002';
|
|
5
|
+
exports.message = {
|
|
6
|
+
code: exports.code,
|
|
7
|
+
title: 'Default Import Check',
|
|
8
|
+
type: 'markdown',
|
|
9
|
+
category: 'compile',
|
|
10
|
+
description: `
|
|
11
|
+
#### Description
|
|
12
|
+
|
|
13
|
+
Usually webpack will automatically compatible different modules that has different types, but in a special case, the operation of compatibility will fail.
|
|
14
|
+
That is, when you use \`Default Import\` to import a cjs module, and this cjs module do not have the compatible statement, such as \`exports.default = \`.
|
|
15
|
+
|
|
16
|
+
#### General Solution
|
|
17
|
+
|
|
18
|
+
1. for cjs module, write a \`exports.default = \` statement for default export.
|
|
19
|
+
2. use \`Namespace Import\` for import the cjs module.
|
|
20
|
+
|
|
21
|
+
For example, for the package \`htmlparser2@7.2.0\`:
|
|
22
|
+
|
|
23
|
+
\`\`\`ts
|
|
24
|
+
// you should use this
|
|
25
|
+
import * as Parser from 'htmlparser2';
|
|
26
|
+
|
|
27
|
+
// can not use this
|
|
28
|
+
import Parser from 'htmlparser2';
|
|
29
|
+
\`\`\`
|
|
30
|
+
`,
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"E1003.d.ts","sourceRoot":"","sources":["../../../src/rule/code/E1003.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,IAAI,UAAU,CAAC;AAE5B,eAAO,MAAM,OAAO,EAAE,WAkCrB,CAAC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.message = exports.code = void 0;
|
|
4
|
+
exports.code = 'E1003';
|
|
5
|
+
exports.message = {
|
|
6
|
+
code: exports.code,
|
|
7
|
+
title: 'Loader Performance Optimization',
|
|
8
|
+
type: 'markdown',
|
|
9
|
+
category: 'compile',
|
|
10
|
+
description: `
|
|
11
|
+
#### Description
|
|
12
|
+
|
|
13
|
+
Usually the slow compile of most projects is due to the slow execution of the loaders.
|
|
14
|
+
|
|
15
|
+
And the loaders always pre-process many unnecessary files, such as \`node_modules files\` and \`already compiled files\`.
|
|
16
|
+
|
|
17
|
+
#### General Solution
|
|
18
|
+
|
|
19
|
+
Set \`exclude\` to the \`module.rules\` of webpack configuration for target loader.
|
|
20
|
+
|
|
21
|
+
For example, if \`node_modules/lodash\` is processed by the \`babel-loader\` that make the compile slowly:
|
|
22
|
+
|
|
23
|
+
\`\`\`
|
|
24
|
+
{
|
|
25
|
+
module: {
|
|
26
|
+
rules: [
|
|
27
|
+
{
|
|
28
|
+
test: /\\.js$/,
|
|
29
|
+
use: 'babel-loader',
|
|
30
|
+
exclude: [
|
|
31
|
+
/node_modules\\/lodash/
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
\`\`\`
|
|
38
|
+
`,
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"E1004.d.ts","sourceRoot":"","sources":["../../../src/rule/code/E1004.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,eAAO,MAAM,IAAI,UAAU,CAAC;AAE5B,eAAO,MAAM,OAAO,EAAE,WAUrB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.message = exports.code = void 0;
|
|
4
|
+
exports.code = 'E1004';
|
|
5
|
+
exports.message = {
|
|
6
|
+
code: exports.code,
|
|
7
|
+
title: 'ECMA Version Check',
|
|
8
|
+
type: 'markdown',
|
|
9
|
+
category: 'bundle',
|
|
10
|
+
description: `
|
|
11
|
+
#### Description
|
|
12
|
+
|
|
13
|
+
Detect if there is a newer version of ECMA syntax in the js bundle file
|
|
14
|
+
`,
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export type RuleErrorCodes = {
|
|
7
|
+
[E1001.code]: typeof E1001;
|
|
8
|
+
[E1002.code]: typeof E1002;
|
|
9
|
+
[E1003.code]: typeof E1003;
|
|
10
|
+
[E1004.code]: typeof E1004;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The format is E + "4 digits".
|
|
14
|
+
* - The first number represents the category:
|
|
15
|
+
* - 1 for Webpack build related indexes
|
|
16
|
+
* - ...
|
|
17
|
+
* - The rest of the numbers can be increased by adding zeros
|
|
18
|
+
*/
|
|
19
|
+
export declare const RuleErrorMap: Record<keyof RuleErrorCodes, RuleMessage>;
|
|
20
|
+
export declare enum RsdoctorRuleClientConstant {
|
|
21
|
+
UrlQueryForErrorCode = "code"
|
|
22
|
+
}
|
|
23
|
+
export * from './type';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/rule/code/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AACjC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG;IAC3B,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC;IAC3B,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC;IAC3B,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC;IAC3B,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC;CAC5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,cAAc,EAAE,WAAW,CAKlE,CAAC;AAEF,oBAAY,0BAA0B;IACpC,oBAAoB,SAAS;CAC9B;AAED,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.RsdoctorRuleClientConstant = exports.RuleErrorMap = void 0;
|
|
30
|
+
const E1001 = __importStar(require("./E1001"));
|
|
31
|
+
const E1002 = __importStar(require("./E1002"));
|
|
32
|
+
const E1003 = __importStar(require("./E1003"));
|
|
33
|
+
const E1004 = __importStar(require("./E1004"));
|
|
34
|
+
/**
|
|
35
|
+
* The format is E + "4 digits".
|
|
36
|
+
* - The first number represents the category:
|
|
37
|
+
* - 1 for Webpack build related indexes
|
|
38
|
+
* - ...
|
|
39
|
+
* - The rest of the numbers can be increased by adding zeros
|
|
40
|
+
*/
|
|
41
|
+
exports.RuleErrorMap = {
|
|
42
|
+
[E1001.code]: E1001.message,
|
|
43
|
+
[E1002.code]: E1002.message,
|
|
44
|
+
[E1003.code]: E1003.message,
|
|
45
|
+
[E1004.code]: E1004.message,
|
|
46
|
+
};
|
|
47
|
+
var RsdoctorRuleClientConstant;
|
|
48
|
+
(function (RsdoctorRuleClientConstant) {
|
|
49
|
+
RsdoctorRuleClientConstant["UrlQueryForErrorCode"] = "code";
|
|
50
|
+
})(RsdoctorRuleClientConstant || (exports.RsdoctorRuleClientConstant = RsdoctorRuleClientConstant = {}));
|
|
51
|
+
__exportStar(require("./type"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { RuleErrorCodes } from '.';
|
|
2
|
+
/**
|
|
3
|
+
* only defined the code which can be enumerated
|
|
4
|
+
*/
|
|
5
|
+
export declare enum RuleMessageCodeEnumerated {
|
|
6
|
+
/**
|
|
7
|
+
* others tools / frameworks errors, such as PIA
|
|
8
|
+
*/
|
|
9
|
+
Extend = "EXTEND",
|
|
10
|
+
/**
|
|
11
|
+
* errors show in the overlay at the client, such as Webpack compile errors in development
|
|
12
|
+
*/
|
|
13
|
+
Overlay = "OVERLAY"
|
|
14
|
+
}
|
|
15
|
+
export type RuleMessageCode = keyof RuleErrorCodes | `${RuleMessageCodeEnumerated}` | RuleMessageCodeEnumerated;
|
|
16
|
+
export declare enum RuleMessageCategory {
|
|
17
|
+
Compile = "compile",
|
|
18
|
+
Bundle = "bundle",
|
|
19
|
+
EMO = "emo"
|
|
20
|
+
}
|
|
21
|
+
export interface RuleMessage {
|
|
22
|
+
code: RuleMessageCode;
|
|
23
|
+
title: string;
|
|
24
|
+
type: 'text' | 'markdown';
|
|
25
|
+
category: `${RuleMessageCategory}` | RuleMessageCategory;
|
|
26
|
+
description: string;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/rule/code/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,GAAG,CAAC;AAEnC;;GAEG;AACH,oBAAY,yBAAyB;IACnC;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,eAAe,GACvB,MAAM,cAAc,GACpB,GAAG,yBAAyB,EAAE,GAC9B,yBAAyB,CAAC;AAE9B,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,GAAG,QAAQ;CACZ;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAC1B,QAAQ,EAAE,GAAG,mBAAmB,EAAE,GAAG,mBAAmB,CAAC;IACzD,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuleMessageCategory = exports.RuleMessageCodeEnumerated = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* only defined the code which can be enumerated
|
|
6
|
+
*/
|
|
7
|
+
var RuleMessageCodeEnumerated;
|
|
8
|
+
(function (RuleMessageCodeEnumerated) {
|
|
9
|
+
/**
|
|
10
|
+
* others tools / frameworks errors, such as PIA
|
|
11
|
+
*/
|
|
12
|
+
RuleMessageCodeEnumerated["Extend"] = "EXTEND";
|
|
13
|
+
/**
|
|
14
|
+
* errors show in the overlay at the client, such as Webpack compile errors in development
|
|
15
|
+
*/
|
|
16
|
+
RuleMessageCodeEnumerated["Overlay"] = "OVERLAY";
|
|
17
|
+
})(RuleMessageCodeEnumerated || (exports.RuleMessageCodeEnumerated = RuleMessageCodeEnumerated = {}));
|
|
18
|
+
var RuleMessageCategory;
|
|
19
|
+
(function (RuleMessageCategory) {
|
|
20
|
+
RuleMessageCategory["Compile"] = "compile";
|
|
21
|
+
RuleMessageCategory["Bundle"] = "bundle";
|
|
22
|
+
RuleMessageCategory["EMO"] = "emo";
|
|
23
|
+
})(RuleMessageCategory || (exports.RuleMessageCategory = RuleMessageCategory = {}));
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import type { WorkspaceCheckDataType } from '../emo';
|
|
2
|
+
import type { RuleMessage, RuleMessageCodeEnumerated } from './code';
|
|
3
|
+
import type { SourceRange } from '../sdk';
|
|
4
|
+
import type { PackageBasicData } from '../sdk/package';
|
|
5
|
+
export interface BaseRuleStoreData extends Pick<RuleMessage, 'code' | 'category'> {
|
|
6
|
+
/**
|
|
7
|
+
* unique of error
|
|
8
|
+
*/
|
|
9
|
+
id: number | string;
|
|
10
|
+
/**
|
|
11
|
+
* title of alerts
|
|
12
|
+
*/
|
|
13
|
+
title: string;
|
|
14
|
+
/**
|
|
15
|
+
* description of alerts
|
|
16
|
+
*/
|
|
17
|
+
description?: string;
|
|
18
|
+
/**
|
|
19
|
+
* level of error
|
|
20
|
+
*/
|
|
21
|
+
level: 'warn' | 'error';
|
|
22
|
+
/**
|
|
23
|
+
* rule doc link
|
|
24
|
+
*/
|
|
25
|
+
link?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface LinkRuleStoreData extends BaseRuleStoreData {
|
|
28
|
+
type: 'link';
|
|
29
|
+
}
|
|
30
|
+
export interface DependencyWithPackageData {
|
|
31
|
+
/**
|
|
32
|
+
* use to group files, such as different version of duplicate packages.
|
|
33
|
+
* @example
|
|
34
|
+
* [
|
|
35
|
+
* { group: "lodash@1.0.1", ... },
|
|
36
|
+
* { group: "lodash@1.0.1", ... },
|
|
37
|
+
* { group: "lodash@2.0.0", ... },
|
|
38
|
+
* ]
|
|
39
|
+
*/
|
|
40
|
+
group?: string;
|
|
41
|
+
/**
|
|
42
|
+
* module dependency id
|
|
43
|
+
*/
|
|
44
|
+
dependencyId: number;
|
|
45
|
+
}
|
|
46
|
+
export interface PackageRelationData {
|
|
47
|
+
/** Target package data */
|
|
48
|
+
target: PackageBasicData;
|
|
49
|
+
/** Target package size */
|
|
50
|
+
targetSize: {
|
|
51
|
+
sourceSize: number;
|
|
52
|
+
parsedSize: number;
|
|
53
|
+
};
|
|
54
|
+
/** package dependency chain */
|
|
55
|
+
dependencies: DependencyWithPackageData[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Generally serves to view package relationship detection rules.
|
|
59
|
+
*/
|
|
60
|
+
export interface PackageRelationDiffRuleStoreData extends BaseRuleStoreData {
|
|
61
|
+
type: 'package-relation';
|
|
62
|
+
packages: PackageRelationData[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* General service to view file relationship detection rules.
|
|
66
|
+
*/
|
|
67
|
+
export interface FileRelationRuleStoreData extends BaseRuleStoreData {
|
|
68
|
+
type: 'file-relation';
|
|
69
|
+
/** Target file */
|
|
70
|
+
target: string;
|
|
71
|
+
/** Dependency chain */
|
|
72
|
+
dependencies: number[];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* the rule which code view only
|
|
76
|
+
*/
|
|
77
|
+
export interface CodeViewRuleStoreData extends BaseRuleStoreData {
|
|
78
|
+
type: 'code-view';
|
|
79
|
+
file: {
|
|
80
|
+
/**
|
|
81
|
+
* file path
|
|
82
|
+
*/
|
|
83
|
+
path: string;
|
|
84
|
+
/**
|
|
85
|
+
* the code content
|
|
86
|
+
*/
|
|
87
|
+
content: string;
|
|
88
|
+
/**
|
|
89
|
+
* fix highlight range in source
|
|
90
|
+
*/
|
|
91
|
+
ranges?: SourceRange[];
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* the rule which need to change the file code.
|
|
96
|
+
*/
|
|
97
|
+
export interface CodeChangeRuleStoreData extends BaseRuleStoreData {
|
|
98
|
+
type: 'code-change';
|
|
99
|
+
file: {
|
|
100
|
+
/**
|
|
101
|
+
* file path
|
|
102
|
+
*/
|
|
103
|
+
path: string;
|
|
104
|
+
/**
|
|
105
|
+
* the actual file content
|
|
106
|
+
*/
|
|
107
|
+
actual: string;
|
|
108
|
+
/**
|
|
109
|
+
* the expected file content
|
|
110
|
+
*/
|
|
111
|
+
expected: string;
|
|
112
|
+
/**
|
|
113
|
+
* fix code line in source
|
|
114
|
+
*/
|
|
115
|
+
line?: number;
|
|
116
|
+
/**
|
|
117
|
+
* whether this case is fixed
|
|
118
|
+
* - @default `false`
|
|
119
|
+
*/
|
|
120
|
+
isFixed?: boolean;
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
export interface EMORuleStoreData extends BaseRuleStoreData {
|
|
124
|
+
type: 'emo';
|
|
125
|
+
emoCheckData: WorkspaceCheckDataType;
|
|
126
|
+
}
|
|
127
|
+
export interface OverlayRuleStoreData extends BaseRuleStoreData {
|
|
128
|
+
code: RuleMessageCodeEnumerated.Overlay;
|
|
129
|
+
stack?: string;
|
|
130
|
+
}
|
|
131
|
+
export type RuleStoreDataItem = LinkRuleStoreData | FileRelationRuleStoreData | CodeChangeRuleStoreData | PackageRelationDiffRuleStoreData | CodeViewRuleStoreData | EMORuleStoreData;
|
|
132
|
+
export type RuleStoreData = RuleStoreDataItem[];
|
|
133
|
+
//# sourceMappingURL=data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/rule/data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,Q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,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./code"), exports);
|
|
18
|
+
__exportStar(require("./data"), exports);
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { NonFunctionProperties } from '../common';
|
|
2
|
+
import type { ModuleInstance, ToDataType } from './module';
|
|
3
|
+
export interface AssetInstance {
|
|
4
|
+
path: string;
|
|
5
|
+
size: number;
|
|
6
|
+
/** File belongs to Chunk */
|
|
7
|
+
chunks: ChunkInstance[];
|
|
8
|
+
/** File resource content */
|
|
9
|
+
content: string;
|
|
10
|
+
/** Generate data */
|
|
11
|
+
toData(type: ToDataType): AssetData;
|
|
12
|
+
}
|
|
13
|
+
export interface ChunkInstance {
|
|
14
|
+
/** Chunk Identifier */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Chunk Name */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Whether to load on the homepage */
|
|
19
|
+
initial: boolean;
|
|
20
|
+
size: number;
|
|
21
|
+
/** Is it an entrance */
|
|
22
|
+
entry: boolean;
|
|
23
|
+
/** Is it the entrance Chunk */
|
|
24
|
+
isEntry(): boolean;
|
|
25
|
+
/** Is the module a Chunk entrance */
|
|
26
|
+
isChunkEntryModule(module: ModuleInstance): boolean;
|
|
27
|
+
/** Does it contain modules */
|
|
28
|
+
hasModule(module: ModuleInstance): boolean;
|
|
29
|
+
/** Connection module */
|
|
30
|
+
addModule(module: ModuleInstance): void;
|
|
31
|
+
addAsset(asset: AssetInstance): void;
|
|
32
|
+
/** Add Dependency Chunk */
|
|
33
|
+
addDependency(dep: ChunkInstance): void;
|
|
34
|
+
/** Add Dependent Chunk */
|
|
35
|
+
addImported(imported: ChunkInstance): void;
|
|
36
|
+
/** Includes products */
|
|
37
|
+
getAssets(): AssetInstance[];
|
|
38
|
+
/** Contains original modules */
|
|
39
|
+
getModules(): ModuleInstance[];
|
|
40
|
+
/** Depends on Chunk */
|
|
41
|
+
getDependencies(): ChunkInstance[];
|
|
42
|
+
/** Add Dependent Chunk */
|
|
43
|
+
getImported(): ChunkInstance[];
|
|
44
|
+
/** add parsed chunk size */
|
|
45
|
+
setParsedSize(size: number): void;
|
|
46
|
+
/** Generate data */
|
|
47
|
+
toData(): ChunkData;
|
|
48
|
+
}
|
|
49
|
+
export interface ChunkGraphInstance {
|
|
50
|
+
/** Obtain product data */
|
|
51
|
+
getAssets(): AssetInstance[];
|
|
52
|
+
/** Get Chunk Data */
|
|
53
|
+
getChunks(): ChunkInstance[];
|
|
54
|
+
/** Add product data */
|
|
55
|
+
addAsset(...assets: AssetInstance[]): void;
|
|
56
|
+
/** Add Chunk Data */
|
|
57
|
+
addChunk(...chunks: ChunkInstance[]): void;
|
|
58
|
+
/** Get chunk by identifier */
|
|
59
|
+
getChunkById(id: string): ChunkInstance | undefined;
|
|
60
|
+
/** Get Chunk by Module */
|
|
61
|
+
getChunkByModule(module: ModuleInstance): ChunkInstance | undefined;
|
|
62
|
+
/** Get the file according to the path */
|
|
63
|
+
getAssetByPath(path: string): AssetInstance | undefined;
|
|
64
|
+
/** Get files based on Chunk */
|
|
65
|
+
getAssetsByChunk(chunk: ChunkInstance): AssetInstance[] | undefined;
|
|
66
|
+
/**
|
|
67
|
+
* get the list of entry points
|
|
68
|
+
*/
|
|
69
|
+
getEntryPoints(): EntryPointInstance[];
|
|
70
|
+
/**
|
|
71
|
+
* add the entry point instance to chunk graph
|
|
72
|
+
*/
|
|
73
|
+
addEntryPoint(...entrypoint: EntryPointInstance[]): void;
|
|
74
|
+
/** Output pure data */
|
|
75
|
+
toData(type: ToDataType): ChunkGraphData;
|
|
76
|
+
}
|
|
77
|
+
export interface AssetData extends Omit<NonFunctionProperties<AssetInstance>, 'chunks'> {
|
|
78
|
+
/** Chunk Identifier to which the file belongs */
|
|
79
|
+
chunks: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface ChunkGraphData extends NonFunctionProperties<ChunkGraphInstance> {
|
|
82
|
+
assets: AssetData[];
|
|
83
|
+
chunks: ChunkData[];
|
|
84
|
+
entrypoints: EntryPointData[];
|
|
85
|
+
}
|
|
86
|
+
export interface ChunkData extends Omit<NonFunctionProperties<ChunkInstance>, 'assets' | 'modules' | 'dependencies' | 'imported'> {
|
|
87
|
+
/** Is it the entrance Chunk */
|
|
88
|
+
entry: boolean;
|
|
89
|
+
/** Contains product path */
|
|
90
|
+
assets: string[];
|
|
91
|
+
/** contains the original module identifier */
|
|
92
|
+
modules: number[];
|
|
93
|
+
/** Depends on Chunk Identifier */
|
|
94
|
+
dependencies: string[];
|
|
95
|
+
/** Dependent Chunk Identifier */
|
|
96
|
+
imported: string[];
|
|
97
|
+
/** chunk parsed size */
|
|
98
|
+
parsedSize: number;
|
|
99
|
+
}
|
|
100
|
+
export interface EntryPointInstance {
|
|
101
|
+
name: string;
|
|
102
|
+
/**
|
|
103
|
+
* add asset which contained in this entry point
|
|
104
|
+
*/
|
|
105
|
+
addAsset(asset: AssetInstance): void;
|
|
106
|
+
/**
|
|
107
|
+
* add chunk which contained in this entry point
|
|
108
|
+
*/
|
|
109
|
+
addChunk(chunk: ChunkInstance): void;
|
|
110
|
+
toData(): EntryPointData;
|
|
111
|
+
}
|
|
112
|
+
export interface EntryPointData extends NonFunctionProperties<EntryPointInstance> {
|
|
113
|
+
/**
|
|
114
|
+
* id list for chunks which contained in this entry point.
|
|
115
|
+
*/
|
|
116
|
+
chunks: ChunkData['id'][];
|
|
117
|
+
/**
|
|
118
|
+
* path list for assets which contained in this entry point.
|
|
119
|
+
*/
|
|
120
|
+
assets: AssetData['path'][];
|
|
121
|
+
/**
|
|
122
|
+
* total size of assets
|
|
123
|
+
*/
|
|
124
|
+
size: number;
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=chunk.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chunk.d.ts","sourceRoot":"","sources":["../../src/sdk/chunk.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,4BAA4B;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,oBAAoB;IACpB,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,SAAS,CAAC;CACrC;AAED,MAAM,WAAW,aAAa;IAC5B,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,KAAK,EAAE,OAAO,CAAC;IAEf,+BAA+B;IAC/B,OAAO,IAAI,OAAO,CAAC;IACnB,qCAAqC;IACrC,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,OA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,CAAC;CAC1B;AAED,MAAM,WAAW,cACf,SAAQ,qBAAqB,CAAC,kBAAkB,CAAC;IACjD;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC;IAC1B;;OAEG;IACH,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC;IAC5B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Configuration } from 'webpack';
|
|
2
|
+
import type { Configuration as RspackConfiguration } from '@rspack/core';
|
|
3
|
+
type RspackConfigurationWrapper = any extends RspackConfiguration ? never : RspackConfiguration;
|
|
4
|
+
export interface WebpackConfigData {
|
|
5
|
+
name: 'webpack' | 'rspack';
|
|
6
|
+
version: string | number;
|
|
7
|
+
bin?: string;
|
|
8
|
+
config: Configuration | RspackConfigurationWrapper;
|
|
9
|
+
}
|
|
10
|
+
export type ConfigData = WebpackConfigData[];
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=config.d.ts.map
|