@rsdoctor/types 1.5.2 → 1.5.3

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 (68) hide show
  1. package/dist/index.cjs +549 -0
  2. package/dist/index.js +492 -48
  3. package/dist/sdk/instance.d.ts +3 -0
  4. package/dist/sdk/module.d.ts +34 -0
  5. package/dist/sdk/package.d.ts +2 -2
  6. package/dist/sdk/result.d.ts +2 -1
  7. package/dist/sdk/server/apis/graph.d.ts +3 -2
  8. package/dist/sdk/server/apis/loader.d.ts +1 -1
  9. package/package.json +13 -6
  10. package/dist/babel.js +0 -2
  11. package/dist/client.js +0 -31
  12. package/dist/common.js +0 -2
  13. package/dist/config.js +0 -2
  14. package/dist/constants.js +0 -46
  15. package/dist/emo.js +0 -9
  16. package/dist/error.js +0 -10
  17. package/dist/esbuild.js +0 -2
  18. package/dist/linter/diagnostic.js +0 -5
  19. package/dist/linter/index.js +0 -18
  20. package/dist/linter/rule.js +0 -2
  21. package/dist/logger.js +0 -12
  22. package/dist/manifest.js +0 -17
  23. package/dist/modules.js +0 -2
  24. package/dist/plugin/baseCompiler.js +0 -2
  25. package/dist/plugin/baseLoader.js +0 -2
  26. package/dist/plugin/baseStats.js +0 -2
  27. package/dist/plugin/index.js +0 -23
  28. package/dist/plugin/internal-rules.js +0 -2
  29. package/dist/plugin/plugin.js +0 -2
  30. package/dist/plugin/rspack.js +0 -2
  31. package/dist/plugin/webpack.js +0 -2
  32. package/dist/rule/code/E1001.js +0 -31
  33. package/dist/rule/code/E1002.js +0 -39
  34. package/dist/rule/code/E1003.js +0 -39
  35. package/dist/rule/code/E1004.js +0 -15
  36. package/dist/rule/code/E1005.js +0 -31
  37. package/dist/rule/code/E1006.js +0 -33
  38. package/dist/rule/code/index.js +0 -65
  39. package/dist/rule/code/type.js +0 -23
  40. package/dist/rule/data.js +0 -2
  41. package/dist/rule/index.js +0 -18
  42. package/dist/sdk/chunk.js +0 -2
  43. package/dist/sdk/config.js +0 -2
  44. package/dist/sdk/context.js +0 -2
  45. package/dist/sdk/envinfo.js +0 -2
  46. package/dist/sdk/hooks.js +0 -2
  47. package/dist/sdk/index.js +0 -32
  48. package/dist/sdk/instance.js +0 -9
  49. package/dist/sdk/loader.js +0 -2
  50. package/dist/sdk/module.js +0 -31
  51. package/dist/sdk/package.js +0 -2
  52. package/dist/sdk/plugin.js +0 -2
  53. package/dist/sdk/process.js +0 -2
  54. package/dist/sdk/resolver.js +0 -2
  55. package/dist/sdk/result.js +0 -2
  56. package/dist/sdk/server/apis/alerts.js +0 -3
  57. package/dist/sdk/server/apis/graph.js +0 -3
  58. package/dist/sdk/server/apis/index.js +0 -87
  59. package/dist/sdk/server/apis/loader.js +0 -3
  60. package/dist/sdk/server/apis/pagination.js +0 -2
  61. package/dist/sdk/server/apis/plugin.js +0 -3
  62. package/dist/sdk/server/apis/project.js +0 -3
  63. package/dist/sdk/server/apis/resolver.js +0 -3
  64. package/dist/sdk/server/index.js +0 -37
  65. package/dist/sdk/statement.js +0 -147
  66. package/dist/sdk/summary.js +0 -2
  67. package/dist/sdk/treeShaking.js +0 -2
  68. package/dist/thirdparty.js +0 -2
package/dist/sdk/index.js DELETED
@@ -1,32 +0,0 @@
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("./loader"), exports);
18
- __exportStar(require("./resolver"), exports);
19
- __exportStar(require("./plugin"), exports);
20
- __exportStar(require("./module"), exports);
21
- __exportStar(require("./chunk"), exports);
22
- __exportStar(require("./result"), exports);
23
- __exportStar(require("./summary"), exports);
24
- __exportStar(require("./package"), exports);
25
- __exportStar(require("./context"), exports);
26
- __exportStar(require("./config"), exports);
27
- __exportStar(require("./server"), exports);
28
- __exportStar(require("./statement"), exports);
29
- __exportStar(require("./treeShaking"), exports);
30
- __exportStar(require("./envinfo"), exports);
31
- __exportStar(require("./instance"), exports);
32
- __exportStar(require("./hooks"), exports);
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.IMode = void 0;
4
- var IMode;
5
- (function (IMode) {
6
- IMode["brief"] = "brief";
7
- IMode["lite"] = "lite";
8
- IMode["normal"] = "normal";
9
- })(IMode || (exports.IMode = IMode = {}));
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,31 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToDataType = exports.ModuleKind = exports.DependencyKind = void 0;
4
- var DependencyKind;
5
- (function (DependencyKind) {
6
- DependencyKind[DependencyKind["Unknown"] = 0] = "Unknown";
7
- DependencyKind[DependencyKind["ImportStatement"] = 1] = "ImportStatement";
8
- DependencyKind[DependencyKind["DynamicImport"] = 2] = "DynamicImport";
9
- DependencyKind[DependencyKind["RequireCall"] = 3] = "RequireCall";
10
- DependencyKind[DependencyKind["AMDRequire"] = 4] = "AMDRequire";
11
- })(DependencyKind || (exports.DependencyKind = DependencyKind = {}));
12
- /** Module type */
13
- var ModuleKind;
14
- (function (ModuleKind) {
15
- /** Normal module */
16
- ModuleKind[ModuleKind["Normal"] = 0] = "Normal";
17
- /** Aggregation module */
18
- ModuleKind[ModuleKind["Concatenation"] = 1] = "Concatenation";
19
- })(ModuleKind || (exports.ModuleKind = ModuleKind = {}));
20
- var ToDataType;
21
- (function (ToDataType) {
22
- ToDataType[ToDataType["NoCode"] = 0] = "NoCode";
23
- /** Normal mode */
24
- ToDataType[ToDataType["Normal"] = 1] = "Normal";
25
- /** Lite mode: no source code */
26
- ToDataType[ToDataType["NoSource"] = 2] = "NoSource";
27
- /** Lite & No Assets Code mode */
28
- ToDataType[ToDataType["NoSourceAndAssets"] = 3] = "NoSourceAndAssets";
29
- /** All Data, include module transformed data. */
30
- ToDataType[ToDataType["All"] = 4] = "All";
31
- })(ToDataType || (exports.ToDataType = ToDataType = {}));
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,87 +0,0 @@
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
- exports.APIExtends = exports.API = void 0;
18
- __exportStar(require("./pagination"), exports);
19
- var API;
20
- (function (API) {
21
- API["ApplyErrorFix"] = "/api/apply/error/fix";
22
- API["Env"] = "/api/env";
23
- API["EntryHtml"] = "/index.html";
24
- API["Manifest"] = "/api/manifest.json";
25
- API["LoadDataByKey"] = "/api/data/key";
26
- API["SendAPIDataToClient"] = "/api/socket/send";
27
- /** Project API */
28
- API["GetProjectInfo"] = "/api/project/info";
29
- API["GetClientRoutes"] = "/api/routes";
30
- /** Loader API */
31
- API["ReportLoader"] = "/api/loader/report";
32
- API["GetLoaderNames"] = "/api/loader/names";
33
- API["GetLoaderChartData"] = "/api/loader/chart/data";
34
- API["GetLoaderFileTree"] = "/api/loader/filetree";
35
- API["GetLoaderFileDetails"] = "/api/loader/file";
36
- API["GetLoaderFolderStatistics"] = "/api/loader/folder/statics";
37
- API["GetLoaderFileFirstInput"] = "/api/loader/input";
38
- API["GetLoaderFileInputAndOutput"] = "/api/loader/inputandoutput";
39
- API["GetDirectoriesLoaders"] = "/api/loader/directories";
40
- /** SourceMap API */
41
- API["ReportSourceMap"] = "/api/sourcemap/report";
42
- /** Resolver API */
43
- API["GetResolverFileTree"] = "/api/resolver/filetree";
44
- API["GetResolverFileDetails"] = "/api/resolver/file";
45
- /** Plugin API */
46
- API["GetPluginSummary"] = "/api/plugins/summary";
47
- API["GetPluginData"] = "/api/plugins/data";
48
- /** Graph API */
49
- API["GetSummaryBundles"] = "/api/graph/bundles/summary";
50
- API["GetChunkGraph"] = "/api/graph/chunks/graph";
51
- API["GetAssetsSummary"] = "/api/graph/assets/summary";
52
- API["GetAssetDetails"] = "/api/graph/asset/details";
53
- API["GetChunksByModuleId"] = "/api/graph/chunk/module";
54
- API["GetModuleDetails"] = "/api/graph/module/details";
55
- API["GetModulesByModuleIds"] = "/api/graph/modules/ids";
56
- API["GetEntryPoints"] = "/api/graph/entrypoints";
57
- API["GetModuleCodeByModuleId"] = "/api/graph/module/code";
58
- API["GetModuleCodeByModuleIds"] = "/api/graph/module/codes";
59
- API["GetAllModuleGraph"] = "/api/graph/module/all";
60
- API["GetAllChunkGraph"] = "/api/graph/chunk/all";
61
- API["GetLayers"] = "/api/graph/layers";
62
- API["GetSearchModules"] = "/api/search/modules";
63
- API["GetSearchModuleInChunk"] = "/api/search/chunk/modules";
64
- API["GetAllModuleGraphFilter"] = "/api/graph/module/filter";
65
- API["GetModuleByName"] = "/api/graph/module/name";
66
- API["GetModuleIssuerPath"] = "/api/graph/module/issuer_path";
67
- /** Package API */
68
- API["GetPackageInfo"] = "/api/package/info";
69
- API["GetPackageDependency"] = "/api/package/dependency";
70
- /** Alerts API */
71
- API["GetPackageRelationAlertDetails"] = "/api/alerts/details/package/relation";
72
- API["GetOverlayAlerts"] = "/api/alerts/overlay";
73
- API["GetBundleAlerts"] = "/api/alerts/bundle";
74
- /** BundleDiff API */
75
- API["BundleDiffManifest"] = "/api/bundle_diff/manifest.json";
76
- API["GetBundleDiffSummary"] = "/api/bundle_diff/summary";
77
- /** AI API */
78
- API["GetChunkGraphAI"] = "/api/graph/chunks/graph/ai";
79
- API["GetChunkByIdAI"] = "/api/graph/chunk/id/ai";
80
- })(API || (exports.API = API = {}));
81
- /**
82
- * api which used outside the sdk.
83
- */
84
- var APIExtends;
85
- (function (APIExtends) {
86
- APIExtends["GetCompileProgress"] = "/api/progress";
87
- })(APIExtends || (exports.APIExtends = APIExtends = {}));
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const index_1 = require("./index");
@@ -1,37 +0,0 @@
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 () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.ServerAPI = void 0;
37
- exports.ServerAPI = __importStar(require("./apis"));
@@ -1,147 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StatementKind = void 0;
4
- /** statement category */
5
- var StatementKind;
6
- (function (StatementKind) {
7
- /**
8
- * Import by default
9
- * @example
10
- * ```ts
11
- * import defaultName from 'name';
12
- * ```
13
- */
14
- StatementKind[StatementKind["ImportDefault"] = 100] = "ImportDefault";
15
- /**
16
- * Named import
17
- * @example
18
- * ```ts
19
- * import { name1, name as name2 } from 'name';
20
- * ```
21
- */
22
- StatementKind[StatementKind["ImportNamed"] = 101] = "ImportNamed";
23
- /**
24
- * Default and named import
25
- * @example
26
- * ```ts
27
- * import defaultName, { name1 } from 'name';
28
- * ```
29
- */
30
- StatementKind[StatementKind["ImportDefaultWithNamed"] = 102] = "ImportDefaultWithNamed";
31
- /**
32
- * Default and Namespace import
33
- * @example
34
- * ```ts
35
- * import defaultName, * as name from 'name';
36
- * ```
37
- */
38
- StatementKind[StatementKind["ImportDefaultWithNamespace"] = 103] = "ImportDefaultWithNamespace";
39
- /**
40
- * Namespace import
41
- * @example
42
- * ```ts
43
- * import * as namespaceName from 'name';
44
- * ```
45
- */
46
- StatementKind[StatementKind["ImportNamespace"] = 104] = "ImportNamespace";
47
- /**
48
- * Side effects import
49
- * @example
50
- * ```ts
51
- * import 'name';
52
- * ```
53
- */
54
- StatementKind[StatementKind["ImportSideEffect"] = 105] = "ImportSideEffect";
55
- /**
56
- * Dynamic import
57
- * @example
58
- * ```ts
59
- * import('name');
60
- * ```
61
- */
62
- StatementKind[StatementKind["ImportDynamic"] = 106] = "ImportDynamic";
63
- /**
64
- * Declare export
65
- * @example
66
- * ```ts
67
- * export const name = '123';
68
- * ```
69
- */
70
- StatementKind[StatementKind["ExportDeclaration"] = 200] = "ExportDeclaration";
71
- /**
72
- * List export
73
- * @example
74
- * ```ts
75
- * export { item1, item as item2 };
76
- * ```
77
- */
78
- StatementKind[StatementKind["ExportList"] = 201] = "ExportList";
79
- /**
80
- * Default export
81
- * @example
82
- * ```ts
83
- * export default name;
84
- * ```
85
- */
86
- StatementKind[StatementKind["ExportDefault"] = 202] = "ExportDefault";
87
- /**
88
- * Re-export
89
- * @example
90
- * ```ts
91
- * export { default as defaultName, item1, item as item2 } from 'name';
92
- * ```
93
- */
94
- StatementKind[StatementKind["ExportAggregating"] = 203] = "ExportAggregating";
95
- /**
96
- * Re-export to Namespace
97
- * @example
98
- * ```ts
99
- * export * as namespaceName from 'name';
100
- * ```
101
- */
102
- StatementKind[StatementKind["ExportNamespace"] = 204] = "ExportNamespace";
103
- /**
104
- * CJS module import
105
- * @example
106
- * ```ts
107
- * require('name');
108
- * ```
109
- */
110
- StatementKind[StatementKind["RequireCall"] = 300] = "RequireCall";
111
- /**
112
- * CJS named import
113
- * @example
114
- * ```ts
115
- * require('name').name
116
- * ```
117
- */
118
- StatementKind[StatementKind["RequireName"] = 301] = "RequireName";
119
- /**
120
- * Overall export
121
- * @example
122
- * ```ts
123
- * module.exports = {};
124
- * ```
125
- */
126
- StatementKind[StatementKind["RequireExports"] = 302] = "RequireExports";
127
- /**
128
- * CJS re-export
129
- * @example
130
- * ```ts
131
- * module.exports = require('name');
132
- * ```
133
- */
134
- StatementKind[StatementKind["RequireExportAggregating"] = 303] = "RequireExportAggregating";
135
- /**
136
- * Named export
137
- * @example
138
- * ```ts
139
- * export.name = '123';
140
- * ```
141
- */
142
- StatementKind[StatementKind["RequireExportName"] = 304] = "RequireExportName";
143
- /**
144
- * Unknown statement
145
- */
146
- StatementKind[StatementKind["Unknown"] = 999] = "Unknown";
147
- })(StatementKind || (exports.StatementKind = StatementKind = {}));
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });