@rsdoctor/utils 1.1.10 → 1.2.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 (151) hide show
  1. package/dist/cjs/build/envinfo.js +107 -95
  2. package/dist/cjs/build/file/cache.js +65 -56
  3. package/dist/cjs/build/file/index.js +78 -41
  4. package/dist/cjs/build/file/sharding.js +90 -78
  5. package/dist/cjs/build/index.js +49 -47
  6. package/dist/cjs/build/json.js +91 -98
  7. package/dist/cjs/build/process.js +47 -42
  8. package/dist/cjs/build/server.js +110 -87
  9. package/dist/cjs/common/alerts.js +46 -44
  10. package/dist/cjs/common/algorithm.js +63 -54
  11. package/dist/cjs/common/bundle.js +52 -46
  12. package/dist/cjs/common/crypto.js +47 -46
  13. package/dist/cjs/common/data/index.js +381 -455
  14. package/dist/cjs/common/file.js +44 -0
  15. package/dist/cjs/common/global-config.js +72 -64
  16. package/dist/cjs/common/graph/assets.js +274 -308
  17. package/dist/cjs/common/graph/chunk.js +66 -63
  18. package/dist/cjs/common/graph/dependency.js +42 -32
  19. package/dist/cjs/common/graph/entrypoints.js +33 -25
  20. package/dist/cjs/common/graph/index.js +93 -27
  21. package/dist/cjs/common/graph/modules.js +113 -98
  22. package/dist/cjs/common/index.js +101 -83
  23. package/dist/cjs/common/loader.js +277 -273
  24. package/dist/cjs/common/lodash.js +73 -62
  25. package/dist/cjs/common/manifest.js +57 -59
  26. package/dist/cjs/common/package.js +79 -80
  27. package/dist/cjs/common/plugin.js +78 -73
  28. package/dist/cjs/common/resolver.js +79 -69
  29. package/dist/cjs/common/rspack.js +43 -34
  30. package/dist/cjs/common/summary.js +39 -31
  31. package/dist/cjs/common/time.js +73 -78
  32. package/dist/cjs/common/url.js +44 -36
  33. package/dist/cjs/error/error.js +183 -220
  34. package/dist/cjs/error/index.js +70 -28
  35. package/dist/cjs/error/transform.js +150 -143
  36. package/dist/cjs/error/utils.js +54 -58
  37. package/dist/cjs/index.js +37 -38
  38. package/dist/cjs/logger.js +99 -73
  39. package/dist/cjs/rule-utils/document/document.js +83 -82
  40. package/dist/cjs/rule-utils/document/index.js +75 -23
  41. package/dist/cjs/rule-utils/document/server.js +42 -35
  42. package/dist/cjs/rule-utils/document/types.js +17 -15
  43. package/dist/cjs/rule-utils/index.js +66 -21
  44. package/dist/cjs/rule-utils/parser/asserts.js +129 -147
  45. package/dist/cjs/rule-utils/parser/index.js +84 -25
  46. package/dist/cjs/rule-utils/parser/parser.js +50 -85
  47. package/dist/cjs/rule-utils/parser/types.js +38 -30
  48. package/dist/cjs/rule-utils/parser/utils.js +141 -168
  49. package/dist/esm/build/envinfo.mjs +57 -0
  50. package/dist/esm/build/file/cache.mjs +23 -0
  51. package/dist/esm/build/file/index.mjs +4 -0
  52. package/dist/esm/build/file/sharding.mjs +50 -0
  53. package/dist/esm/build/index.mjs +6 -0
  54. package/dist/esm/build/json.mjs +66 -0
  55. package/dist/esm/build/process.mjs +17 -0
  56. package/dist/esm/build/server.mjs +96 -0
  57. package/dist/esm/common/alerts.mjs +17 -0
  58. package/dist/esm/common/algorithm.mjs +32 -0
  59. package/dist/esm/common/bundle.mjs +22 -0
  60. package/dist/esm/common/crypto.mjs +17 -0
  61. package/dist/esm/common/data/index.mjs +354 -0
  62. package/dist/esm/common/file.mjs +7 -0
  63. package/dist/esm/common/global-config.mjs +32 -0
  64. package/dist/esm/common/graph/assets.mjs +238 -0
  65. package/dist/esm/common/graph/chunk.mjs +32 -0
  66. package/dist/esm/common/graph/dependency.mjs +10 -0
  67. package/dist/esm/common/graph/entrypoints.mjs +4 -0
  68. package/dist/esm/common/graph/index.mjs +5 -0
  69. package/dist/esm/common/graph/modules.mjs +78 -0
  70. package/dist/esm/common/index.mjs +19 -0
  71. package/dist/esm/common/loader.mjs +247 -0
  72. package/dist/esm/common/lodash.mjs +32 -0
  73. package/dist/esm/common/manifest.mjs +30 -0
  74. package/dist/esm/common/package.mjs +56 -0
  75. package/dist/esm/common/plugin.mjs +48 -0
  76. package/dist/esm/common/resolver.mjs +46 -0
  77. package/dist/esm/common/rspack.mjs +9 -0
  78. package/dist/esm/common/summary.mjs +8 -0
  79. package/dist/esm/common/time.mjs +43 -0
  80. package/dist/esm/common/url.mjs +14 -0
  81. package/dist/esm/error/error.mjs +154 -0
  82. package/dist/esm/error/index.mjs +3 -0
  83. package/dist/esm/error/transform.mjs +138 -0
  84. package/dist/esm/error/utils.mjs +22 -0
  85. package/dist/esm/index.mjs +3 -0
  86. package/dist/esm/logger.mjs +50 -0
  87. package/dist/esm/rule-utils/document/document.mjs +58 -0
  88. package/dist/esm/rule-utils/document/index.mjs +3 -0
  89. package/dist/esm/rule-utils/document/server.mjs +12 -0
  90. package/dist/esm/rule-utils/index.mjs +2 -0
  91. package/dist/esm/rule-utils/parser/asserts.mjs +104 -0
  92. package/dist/esm/rule-utils/parser/index.mjs +4 -0
  93. package/dist/esm/rule-utils/parser/parser.mjs +23 -0
  94. package/dist/esm/rule-utils/parser/types.mjs +7 -0
  95. package/dist/esm/rule-utils/parser/utils.mjs +109 -0
  96. package/dist/type/common/file.d.ts +3 -0
  97. package/dist/type/common/file.d.ts.map +1 -0
  98. package/dist/type/common/graph/modules.d.ts +1 -1
  99. package/dist/type/common/graph/modules.d.ts.map +1 -1
  100. package/dist/type/common/index.d.ts +1 -0
  101. package/dist/type/common/index.d.ts.map +1 -1
  102. package/dist/type/logger.d.ts +3 -1
  103. package/dist/type/logger.d.ts.map +1 -1
  104. package/package.json +13 -12
  105. package/dist/esm/build/envinfo.js +0 -75
  106. package/dist/esm/build/file/cache.js +0 -30
  107. package/dist/esm/build/file/index.js +0 -7
  108. package/dist/esm/build/file/sharding.js +0 -50
  109. package/dist/esm/build/index.js +0 -12
  110. package/dist/esm/build/json.js +0 -85
  111. package/dist/esm/build/process.js +0 -24
  112. package/dist/esm/build/server.js +0 -96
  113. package/dist/esm/common/alerts.js +0 -25
  114. package/dist/esm/common/algorithm.js +0 -39
  115. package/dist/esm/common/bundle.js +0 -30
  116. package/dist/esm/common/crypto.js +0 -28
  117. package/dist/esm/common/data/index.js +0 -428
  118. package/dist/esm/common/global-config.js +0 -38
  119. package/dist/esm/common/graph/assets.js +0 -310
  120. package/dist/esm/common/graph/chunk.js +0 -49
  121. package/dist/esm/common/graph/dependency.js +0 -14
  122. package/dist/esm/common/graph/entrypoints.js +0 -6
  123. package/dist/esm/common/graph/index.js +0 -5
  124. package/dist/esm/common/graph/modules.js +0 -90
  125. package/dist/esm/common/index.js +0 -36
  126. package/dist/esm/common/loader.js +0 -279
  127. package/dist/esm/common/lodash.js +0 -49
  128. package/dist/esm/common/manifest.js +0 -46
  129. package/dist/esm/common/package.js +0 -71
  130. package/dist/esm/common/plugin.js +0 -59
  131. package/dist/esm/common/resolver.js +0 -54
  132. package/dist/esm/common/rspack.js +0 -12
  133. package/dist/esm/common/summary.js +0 -10
  134. package/dist/esm/common/time.js +0 -64
  135. package/dist/esm/common/url.js +0 -20
  136. package/dist/esm/error/error.js +0 -202
  137. package/dist/esm/error/index.js +0 -5
  138. package/dist/esm/error/transform.js +0 -141
  139. package/dist/esm/error/utils.js +0 -40
  140. package/dist/esm/index.js +0 -6
  141. package/dist/esm/logger.js +0 -44
  142. package/dist/esm/rule-utils/document/document.js +0 -67
  143. package/dist/esm/rule-utils/document/index.js +0 -3
  144. package/dist/esm/rule-utils/document/server.js +0 -17
  145. package/dist/esm/rule-utils/index.js +0 -2
  146. package/dist/esm/rule-utils/parser/asserts.js +0 -132
  147. package/dist/esm/rule-utils/parser/index.js +0 -4
  148. package/dist/esm/rule-utils/parser/parser.js +0 -58
  149. package/dist/esm/rule-utils/parser/types.js +0 -9
  150. package/dist/esm/rule-utils/parser/utils.js +0 -164
  151. /package/dist/esm/rule-utils/document/{types.js → types.mjs} +0 -0
@@ -1,462 +1,388 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var data_exports = {};
30
- __export(data_exports, {
31
- APIDataLoader: () => APIDataLoader
2
+ var __webpack_require__ = {};
3
+ (()=>{
4
+ __webpack_require__.d = (exports1, definition)=>{
5
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
+ enumerable: true,
7
+ get: definition[key]
8
+ });
9
+ };
10
+ })();
11
+ (()=>{
12
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
13
+ })();
14
+ (()=>{
15
+ __webpack_require__.r = (exports1)=>{
16
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
+ value: 'Module'
18
+ });
19
+ Object.defineProperty(exports1, '__esModule', {
20
+ value: true
21
+ });
22
+ };
23
+ })();
24
+ var __webpack_exports__ = {};
25
+ __webpack_require__.r(__webpack_exports__);
26
+ __webpack_require__.d(__webpack_exports__, {
27
+ APIDataLoader: ()=>APIDataLoader
32
28
  });
33
- module.exports = __toCommonJS(data_exports);
34
- var import_types = require("@rsdoctor/types");
35
- var Loader = __toESM(require("../loader"));
36
- var Resolver = __toESM(require("../resolver"));
37
- var Plugin = __toESM(require("../plugin"));
38
- var Graph = __toESM(require("../graph"));
39
- var Alerts = __toESM(require("../alerts"));
40
- var import_path = require("path");
29
+ const types_namespaceObject = require("@rsdoctor/types");
30
+ const external_loader_js_namespaceObject = require("../loader.js");
31
+ const external_resolver_js_namespaceObject = require("../resolver.js");
32
+ const external_plugin_js_namespaceObject = require("../plugin.js");
33
+ const index_js_namespaceObject = require("../graph/index.js");
34
+ const external_alerts_js_namespaceObject = require("../alerts.js");
35
+ const external_path_namespaceObject = require("path");
36
+ function _define_property(obj, key, value) {
37
+ if (key in obj) Object.defineProperty(obj, key, {
38
+ value: value,
39
+ enumerable: true,
40
+ configurable: true,
41
+ writable: true
42
+ });
43
+ else obj[key] = value;
44
+ return obj;
45
+ }
41
46
  class APIDataLoader {
42
- constructor(loader) {
43
- this.loader = loader;
44
- this.loadAPI = this.loadAPI.bind(this);
45
- }
46
- log(...args) {
47
- console.log(`[${this.constructor.name}]`, ...args);
48
- }
49
- loadAPI(...args) {
50
- const [api, body] = args;
51
- switch (api) {
52
- case import_types.SDK.ServerAPI.API.LoadDataByKey:
53
- return this.loader.loadData(
54
- body.key
55
- );
56
- case import_types.SDK.ServerAPI.API.GetProjectInfo:
57
- return Promise.all([
58
- this.loader.loadData("root"),
59
- this.loader.loadData("pid"),
60
- this.loader.loadData("hash"),
61
- this.loader.loadData("summary"),
62
- this.loader.loadData("configs"),
63
- this.loader.loadData("envinfo"),
64
- this.loader.loadData("errors")
65
- ]).then(
66
- ([root, pid, hash, summary, configs, envinfo, errors]) => ({ root, pid, hash, summary, configs, envinfo, errors })
67
- );
68
- case import_types.SDK.ServerAPI.API.GetClientRoutes:
69
- if (typeof window !== "undefined" && window?.[import_types.Constants.WINDOW_RSDOCTOR_TAG]) {
70
- return window[import_types.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes;
71
- }
72
- return this.loader.loadManifest().then((res) => {
73
- const { enableRoutes = [] } = res.client || {};
74
- return enableRoutes;
75
- });
76
- case import_types.SDK.ServerAPI.API.GetLoaderNames:
77
- return this.loader.loadData("loader").then((res) => {
78
- return Loader.getLoaderNames(res || []);
79
- });
80
- case import_types.SDK.ServerAPI.API.GetLayers:
81
- return this.loader.loadData("moduleGraph").then((res) => {
82
- const { layers } = res || {};
83
- return layers;
84
- });
85
- case import_types.SDK.ServerAPI.API.GetLoaderChartData:
86
- return this.loader.loadData("loader").then((res) => {
87
- return Loader.getLoaderChartData(res || []);
88
- });
89
- case import_types.SDK.ServerAPI.API.GetLoaderFileTree:
90
- return this.loader.loadData("loader").then((res) => {
91
- return Loader.getLoaderFileTree(res || []);
92
- });
93
- case import_types.SDK.ServerAPI.API.GetLoaderFileDetails:
94
- return this.loader.loadData("loader").then((res) => {
95
- return Loader.getLoaderFileDetails(
96
- body.path,
97
- res || []
98
- );
99
- });
100
- case import_types.SDK.ServerAPI.API.GetLoaderFolderStatistics:
101
- return this.loader.loadData("loader").then((res) => {
102
- return Loader.getLoaderFolderStatistics(
103
- body.folder,
104
- res || []
105
- );
106
- });
107
- case import_types.SDK.ServerAPI.API.GetLoaderFileFirstInput:
108
- return this.loader.loadData("loader").then((res) => {
109
- return Loader.getLoaderFileFirstInput(
110
- body.file,
111
- res || []
112
- );
113
- });
114
- case import_types.SDK.ServerAPI.API.GetLoaderFileInputAndOutput:
115
- return this.loader.loadData("loader").then((res) => {
116
- return Loader.getLoaderFileFirstInput(
117
- body.file,
118
- res || []
119
- );
120
- });
121
- case import_types.SDK.ServerAPI.API.GetResolverFileTree:
122
- return this.loader.loadData("resolver").then((res) => {
123
- return Resolver.getResolverFileTree(res || []);
124
- });
125
- case import_types.SDK.ServerAPI.API.GetResolverFileDetails:
126
- return Promise.all([
127
- this.loader.loadData("resolver"),
128
- this.loader.loadData("moduleGraph.modules"),
129
- this.loader.loadData("moduleCodeMap")
130
- ]).then((res) => {
131
- const resolverData = res[0];
132
- const modules = res[1];
133
- const moduleCodeMap = res[2];
134
- return Resolver.getResolverFileDetails(
135
- body.filepath,
136
- resolverData || [],
137
- modules || [],
138
- moduleCodeMap || {}
139
- );
140
- });
141
- case import_types.SDK.ServerAPI.API.GetPluginSummary:
142
- return this.loader.loadData("plugin").then((res) => {
143
- return Plugin.getPluginSummary(res || {});
144
- });
145
- case import_types.SDK.ServerAPI.API.GetPluginData:
146
- return this.loader.loadData("plugin").then((res) => {
147
- const { hooks, tapNames } = body;
148
- return Plugin.getPluginData(res || {}, hooks, tapNames);
149
- });
150
- case import_types.SDK.ServerAPI.API.GetAssetsSummary:
151
- return this.loader.loadData("chunkGraph").then((res) => {
152
- const { withFileContent = true } = body;
153
- const { assets = [], chunks = [] } = res || {};
154
- return Graph.getAssetsSummary(assets, chunks, {
155
- withFileContent
156
- });
157
- });
158
- case import_types.SDK.ServerAPI.API.GetAssetDetails:
159
- return Promise.all([
160
- this.loader.loadData("chunkGraph"),
161
- this.loader.loadData("moduleGraph")
162
- ]).then((res) => {
163
- const { assetPath } = body;
164
- const { assets = [], chunks = [] } = res[0] || {};
165
- const { modules = [] } = res[1] || {};
166
- return Graph.getAssetDetails(assetPath, assets, chunks, modules);
167
- });
168
- case import_types.SDK.ServerAPI.API.GetSummaryBundles:
169
- return Promise.all([
170
- this.loader.loadData("chunkGraph"),
171
- this.loader.loadData("moduleGraph")
172
- ]).then((res) => {
173
- const { assets = [], chunks = [] } = res[0] || {};
174
- const { modules = [] } = res[1] || {};
175
- return Graph.getAllBundleData(assets, chunks, modules, [
176
- "id",
177
- "path",
178
- "size",
179
- "kind"
180
- ]);
181
- });
182
- case import_types.SDK.ServerAPI.API.GetChunksByModuleId:
183
- return Promise.all([
184
- this.loader.loadData("chunkGraph"),
185
- this.loader.loadData("moduleGraph")
186
- ]).then((res) => {
187
- const { moduleId } = body;
188
- const { chunks = [] } = res[0] || {};
189
- const { modules = [] } = res[1] || {};
190
- return Graph.getChunksByModuleId(moduleId, modules, chunks);
191
- });
192
- case import_types.SDK.ServerAPI.API.GetModuleDetails:
193
- return Promise.all([
194
- this.loader.loadData("chunkGraph"),
195
- this.loader.loadData("moduleGraph")
196
- ]).then((res) => {
197
- const { moduleId } = body;
198
- const { modules = [], dependencies = [] } = res[1] || {};
199
- return Graph.getModuleDetails(moduleId, modules, dependencies);
200
- });
201
- case import_types.SDK.ServerAPI.API.GetModulesByModuleIds:
202
- return this.loader.loadData("moduleGraph").then((res) => {
203
- const { moduleIds } = body;
204
- const { modules = [] } = res || {};
205
- return Graph.getModuleIdsByModulesIds(moduleIds, modules);
206
- });
207
- case import_types.SDK.ServerAPI.API.GetEntryPoints:
208
- return Promise.all([this.loader.loadData("chunkGraph")]).then((res) => {
209
- const [chunkGraph] = res;
210
- const { entrypoints = [] } = chunkGraph || {};
211
- return Graph.getEntryPoints(entrypoints);
212
- });
213
- case import_types.SDK.ServerAPI.API.GetModuleCodeByModuleId:
214
- return this.loader.loadData("moduleCodeMap").then((moduleCodeMap) => {
215
- const { moduleId } = body;
216
- if (moduleCodeMap) {
217
- return moduleCodeMap[moduleId];
218
- }
219
- return { source: "", transformed: "", parsedSource: "" };
220
- });
221
- case import_types.SDK.ServerAPI.API.GetModuleCodeByModuleIds:
222
- return this.loader.loadData("moduleCodeMap").then((moduleCodeMap) => {
223
- const { moduleIds } = body;
224
- const _moduleCodeData = {};
225
- if (moduleCodeMap) {
226
- moduleIds.forEach((id) => {
227
- _moduleCodeData[id] = moduleCodeMap[id];
228
- });
229
- return _moduleCodeData;
230
- }
231
- return [];
232
- });
233
- case import_types.SDK.ServerAPI.API.GetAllModuleGraph:
234
- return this.loader.loadData("moduleGraph").then((moduleGraph) => {
235
- return moduleGraph?.modules;
236
- });
237
- case import_types.SDK.ServerAPI.API.GetSearchModules:
238
- return Promise.all([
239
- this.loader.loadData("moduleGraph"),
240
- this.loader.loadData("chunkGraph")
241
- ]).then((res) => {
242
- const [moduleGraph, chunkGraph] = res;
243
- const { moduleName } = body;
244
- if (!moduleName)
245
- return [];
246
- const assetMap = chunkGraph.chunks.reduce(
247
- (acc, chunk) => {
248
- chunk.assets.forEach((asset) => {
249
- if (!acc[chunk.id]) {
250
- acc[chunk.id] = [];
251
- }
252
- acc[chunk.id].push(asset);
253
- });
254
- return acc;
255
- },
256
- {}
257
- );
258
- const searchedChunksMap = /* @__PURE__ */ new Map();
259
- moduleGraph?.modules.filter((module2) => {
260
- if (module2.webpackId.includes(moduleName)) {
261
- module2.chunks.forEach((chunk) => {
262
- if (searchedChunksMap.has(chunk)) {
263
- return;
264
- }
265
- const assets = assetMap[chunk] || [];
266
- assets.forEach((asset) => {
267
- if (asset.endsWith(".js")) {
268
- searchedChunksMap.set(chunk, asset);
269
- }
47
+ log(...args) {
48
+ console.log(`[${this.constructor.name}]`, ...args);
49
+ }
50
+ loadAPI(...args) {
51
+ const [api, body] = args;
52
+ switch(api){
53
+ case types_namespaceObject.SDK.ServerAPI.API.LoadDataByKey:
54
+ return this.loader.loadData(body.key);
55
+ case types_namespaceObject.SDK.ServerAPI.API.GetProjectInfo:
56
+ return Promise.all([
57
+ this.loader.loadData('root'),
58
+ this.loader.loadData('pid'),
59
+ this.loader.loadData('hash'),
60
+ this.loader.loadData('summary'),
61
+ this.loader.loadData('configs'),
62
+ this.loader.loadData('envinfo'),
63
+ this.loader.loadData('errors')
64
+ ]).then(([root, pid, hash, summary, configs, envinfo, errors])=>({
65
+ root,
66
+ pid,
67
+ hash,
68
+ summary,
69
+ configs,
70
+ envinfo,
71
+ errors
72
+ }));
73
+ case types_namespaceObject.SDK.ServerAPI.API.GetClientRoutes:
74
+ var _window;
75
+ if ('undefined' != typeof window && (null == (_window = window) ? void 0 : _window[types_namespaceObject.Constants.WINDOW_RSDOCTOR_TAG])) return window[types_namespaceObject.Constants.WINDOW_RSDOCTOR_TAG].enableRoutes;
76
+ return this.loader.loadManifest().then((res)=>{
77
+ const { enableRoutes = [] } = res.client || {};
78
+ return enableRoutes;
270
79
  });
271
- });
272
- }
273
- });
274
- return Object.fromEntries(searchedChunksMap);
275
- });
276
- case import_types.SDK.ServerAPI.API.GetSearchModuleInChunk:
277
- return Promise.all([
278
- this.loader.loadData("moduleGraph"),
279
- this.loader.loadData("root")
280
- ]).then((res) => {
281
- const [moduleGraph, root] = res;
282
- const { moduleName, chunk } = body;
283
- if (!moduleName)
284
- return [];
285
- const filteredModules = moduleGraph?.modules.filter(
286
- (module2) => module2.webpackId.includes(moduleName) && module2.chunks.includes(chunk)
287
- ).map((filteredModule) => ({
288
- id: filteredModule.id,
289
- path: filteredModule.path,
290
- relativePath: (0, import_path.relative)(root, filteredModule.path)
291
- }));
292
- return filteredModules;
293
- });
294
- case import_types.SDK.ServerAPI.API.GetAllChunkGraph:
295
- return this.loader.loadData("chunkGraph").then((chunkGraph) => {
296
- return chunkGraph?.chunks;
297
- });
298
- case import_types.SDK.ServerAPI.API.GetPackageRelationAlertDetails:
299
- return Promise.all([
300
- this.loader.loadData("moduleGraph"),
301
- this.loader.loadData("errors"),
302
- this.loader.loadData("root"),
303
- this.loader.loadData("moduleCodeMap")
304
- ]).then((res) => {
305
- const { id, target } = body;
306
- const [moduleGraph, errors = [], root = "", moduleCodeMap] = res;
307
- const { modules = [], dependencies = [] } = moduleGraph || {};
308
- const { packages = [] } = errors.find((e) => e.id === id) || {};
309
- const { dependencies: pkgDependencies = [] } = packages.find(
310
- (e) => e.target.name === target.name && e.target.root === target.root && e.target.version === target.version
311
- ) || {};
312
- return Alerts.getPackageRelationAlertDetails(
313
- modules,
314
- dependencies,
315
- root,
316
- pkgDependencies,
317
- moduleCodeMap || {}
318
- );
319
- });
320
- case import_types.SDK.ServerAPI.API.GetOverlayAlerts:
321
- return this.loader.loadData("errors").then((res) => {
322
- return (res || []).filter(
323
- (e) => e.code === import_types.Rule.RuleMessageCodeEnumerated.Overlay
324
- );
325
- });
326
- case import_types.SDK.ServerAPI.API.BundleDiffManifest:
327
- return this.loader.loadManifest();
328
- case import_types.SDK.ServerAPI.API.GetBundleDiffSummary:
329
- return Promise.all([
330
- this.loader.loadManifest(),
331
- this.loader.loadData("root"),
332
- this.loader.loadData("hash"),
333
- this.loader.loadData("errors"),
334
- this.loader.loadData("chunkGraph"),
335
- this.loader.loadData("moduleGraph"),
336
- this.loader.loadData("moduleCodeMap"),
337
- this.loader.loadData("packageGraph"),
338
- this.loader.loadData("configs")
339
- ]).then(
340
- ([
341
- _manifest,
342
- root = "",
343
- hash = "",
344
- errors = {},
345
- chunkGraph = {},
346
- moduleGraph = {},
347
- moduleCodeMap = {},
348
- packageGraph = {},
349
- configs = []
350
- ]) => {
351
- let outputFilename = "";
352
- if (typeof configs[0]?.config?.output?.chunkFilename === "string") {
353
- outputFilename = configs[0]?.config.output.chunkFilename;
354
- }
355
- return {
356
- root,
357
- hash,
358
- errors,
359
- chunkGraph,
360
- moduleGraph,
361
- packageGraph,
362
- outputFilename,
363
- moduleCodeMap
364
- };
365
- }
366
- );
367
- case import_types.SDK.ServerAPI.API.GetTileReportHtml:
368
- return this.loader.loadData("otherReports").then((otherReports) => {
369
- return otherReports?.tileReportHtml;
370
- });
371
- case import_types.SDK.ServerAPI.API.GetChunkGraph:
372
- return this.loader.loadData("chunkGraph").then((res) => {
373
- const { chunks = [] } = res || {};
374
- return chunks;
375
- });
376
- case import_types.SDK.ServerAPI.API.GetAllModuleGraphFilter:
377
- return this.loader.loadData("moduleGraph").then((moduleGraph) => {
378
- return moduleGraph?.modules.map((m) => ({
379
- id: m.id,
380
- webpackId: m.webpackId,
381
- path: m.path,
382
- size: m.size,
383
- chunks: m.chunks,
384
- kind: m.kind
385
- }));
386
- });
387
- case import_types.SDK.ServerAPI.API.GetModuleByName:
388
- return this.loader.loadData("moduleGraph").then((moduleGraph) => {
389
- const { moduleName } = body;
390
- const { modules = [] } = moduleGraph || {};
391
- return modules.filter((m) => m.path.includes(moduleName)).map((m) => ({
392
- id: m.id,
393
- path: m.path
394
- })) || [];
395
- });
396
- case import_types.SDK.ServerAPI.API.GetModuleIssuerPath:
397
- return this.loader.loadData("moduleGraph").then((moduleGraph) => {
398
- const { moduleId } = body;
399
- const modules = moduleGraph?.modules || [];
400
- const issuerPath = modules.find((m) => String(m.id) === moduleId)?.issuerPath || [];
401
- if (Array.isArray(issuerPath) && issuerPath.length > 0 && typeof issuerPath[0] === "number") {
402
- return issuerPath.map((id) => modules.find((m) => m.id === id)?.path).filter(Boolean);
403
- }
404
- return issuerPath;
405
- });
406
- case import_types.SDK.ServerAPI.API.GetPackageInfo:
407
- return this.loader.loadData("packageGraph").then((packageGraph) => {
408
- return packageGraph?.packages;
409
- });
410
- case import_types.SDK.ServerAPI.API.GetPackageDependency:
411
- return this.loader.loadData("packageGraph").then((packageGraph) => {
412
- return packageGraph?.dependencies || [];
413
- });
414
- case import_types.SDK.ServerAPI.API.GetChunkGraphAI:
415
- return this.loader.loadData("chunkGraph").then((res) => {
416
- const { chunks = [] } = res || {};
417
- const filteredChunks = chunks.map(({ modules, ...rest }) => rest);
418
- return filteredChunks;
419
- });
420
- case import_types.SDK.ServerAPI.API.GetChunkByIdAI:
421
- return Promise.all([
422
- this.loader.loadData("chunkGraph"),
423
- this.loader.loadData("moduleGraph")
424
- ]).then(([chunkGraph, moduleGraph]) => {
425
- const { chunks = [] } = chunkGraph || {};
426
- const { modules = [] } = moduleGraph || {};
427
- const { chunkId } = body;
428
- const chunkInfo = chunks.find(
429
- (c) => c.id === chunkId
430
- );
431
- if (!chunkInfo) {
432
- return null;
433
- }
434
- const chunkModules = modules.filter((m) => chunkInfo.modules.includes(m.id)).map((module2) => {
435
- return {
436
- id: module2.id,
437
- path: module2.path,
438
- size: module2.size,
439
- chunks: module2.chunks,
440
- kind: module2.kind,
441
- issuerPath: module2.issuerPath
442
- };
443
- });
444
- chunkInfo.modulesInfo = chunkModules;
445
- return chunkInfo;
446
- });
447
- case import_types.SDK.ServerAPI.API.GetDirectoriesLoaders:
448
- return Promise.all([
449
- this.loader.loadData("root"),
450
- this.loader.loadData("loader")
451
- ]).then(([root, loaders]) => {
452
- return Loader.getDirectoriesLoaders(loaders || [], root || "");
453
- });
454
- default:
455
- throw new Error(`API not implement: "${api}"`);
80
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderNames:
81
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderNames(res || []));
82
+ case types_namespaceObject.SDK.ServerAPI.API.GetLayers:
83
+ return this.loader.loadData('moduleGraph').then((res)=>{
84
+ const { layers } = res || {};
85
+ return layers;
86
+ });
87
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderChartData:
88
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderChartData(res || []));
89
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderFileTree:
90
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderFileTree(res || []));
91
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderFileDetails:
92
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderFileDetails(body.path, res || []));
93
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderFolderStatistics:
94
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderFolderStatistics(body.folder, res || []));
95
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderFileFirstInput:
96
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderFileFirstInput(body.file, res || []));
97
+ case types_namespaceObject.SDK.ServerAPI.API.GetLoaderFileInputAndOutput:
98
+ return this.loader.loadData('loader').then((res)=>external_loader_js_namespaceObject.getLoaderFileFirstInput(body.file, res || []));
99
+ case types_namespaceObject.SDK.ServerAPI.API.GetResolverFileTree:
100
+ return this.loader.loadData('resolver').then((res)=>external_resolver_js_namespaceObject.getResolverFileTree(res || []));
101
+ case types_namespaceObject.SDK.ServerAPI.API.GetResolverFileDetails:
102
+ return Promise.all([
103
+ this.loader.loadData('resolver'),
104
+ this.loader.loadData('moduleGraph.modules'),
105
+ this.loader.loadData('moduleCodeMap')
106
+ ]).then((res)=>{
107
+ const resolverData = res[0];
108
+ const modules = res[1];
109
+ const moduleCodeMap = res[2];
110
+ return external_resolver_js_namespaceObject.getResolverFileDetails(body.filepath, resolverData || [], modules || [], moduleCodeMap || {});
111
+ });
112
+ case types_namespaceObject.SDK.ServerAPI.API.GetPluginSummary:
113
+ return this.loader.loadData('plugin').then((res)=>external_plugin_js_namespaceObject.getPluginSummary(res || {}));
114
+ case types_namespaceObject.SDK.ServerAPI.API.GetPluginData:
115
+ return this.loader.loadData('plugin').then((res)=>{
116
+ const { hooks, tapNames } = body;
117
+ return external_plugin_js_namespaceObject.getPluginData(res || {}, hooks, tapNames);
118
+ });
119
+ case types_namespaceObject.SDK.ServerAPI.API.GetAssetsSummary:
120
+ return this.loader.loadData('chunkGraph').then((res)=>{
121
+ const { withFileContent = true } = body;
122
+ const { assets = [], chunks = [] } = res || {};
123
+ return index_js_namespaceObject.getAssetsSummary(assets, chunks, {
124
+ withFileContent
125
+ });
126
+ });
127
+ case types_namespaceObject.SDK.ServerAPI.API.GetAssetDetails:
128
+ return Promise.all([
129
+ this.loader.loadData('chunkGraph'),
130
+ this.loader.loadData('moduleGraph')
131
+ ]).then((res)=>{
132
+ const { assetPath } = body;
133
+ const { assets = [], chunks = [] } = res[0] || {};
134
+ const { modules = [] } = res[1] || {};
135
+ return index_js_namespaceObject.getAssetDetails(assetPath, assets, chunks, modules);
136
+ });
137
+ case types_namespaceObject.SDK.ServerAPI.API.GetSummaryBundles:
138
+ return Promise.all([
139
+ this.loader.loadData('chunkGraph'),
140
+ this.loader.loadData('moduleGraph')
141
+ ]).then((res)=>{
142
+ const { assets = [], chunks = [] } = res[0] || {};
143
+ const { modules = [] } = res[1] || {};
144
+ return index_js_namespaceObject.getAllBundleData(assets, chunks, modules, [
145
+ 'id',
146
+ 'path',
147
+ 'size',
148
+ 'kind'
149
+ ]);
150
+ });
151
+ case types_namespaceObject.SDK.ServerAPI.API.GetChunksByModuleId:
152
+ return Promise.all([
153
+ this.loader.loadData('chunkGraph'),
154
+ this.loader.loadData('moduleGraph')
155
+ ]).then((res)=>{
156
+ const { moduleId } = body;
157
+ const { chunks = [] } = res[0] || {};
158
+ const { modules = [] } = res[1] || {};
159
+ return index_js_namespaceObject.getChunksByModuleId(moduleId, modules, chunks);
160
+ });
161
+ case types_namespaceObject.SDK.ServerAPI.API.GetModuleDetails:
162
+ return Promise.all([
163
+ this.loader.loadData('chunkGraph'),
164
+ this.loader.loadData('moduleGraph')
165
+ ]).then((res)=>{
166
+ const { moduleId } = body;
167
+ const { modules = [], dependencies = [] } = res[1] || {};
168
+ return index_js_namespaceObject.getModuleDetails(moduleId, modules, dependencies);
169
+ });
170
+ case types_namespaceObject.SDK.ServerAPI.API.GetModulesByModuleIds:
171
+ return this.loader.loadData('moduleGraph').then((res)=>{
172
+ const { moduleIds } = body;
173
+ const { modules = [] } = res || {};
174
+ return index_js_namespaceObject.getModuleIdsByModulesIds(moduleIds, modules);
175
+ });
176
+ case types_namespaceObject.SDK.ServerAPI.API.GetEntryPoints:
177
+ return Promise.all([
178
+ this.loader.loadData('chunkGraph')
179
+ ]).then((res)=>{
180
+ const [chunkGraph] = res;
181
+ const { entrypoints = [] } = chunkGraph || {};
182
+ return index_js_namespaceObject.getEntryPoints(entrypoints);
183
+ });
184
+ case types_namespaceObject.SDK.ServerAPI.API.GetModuleCodeByModuleId:
185
+ return this.loader.loadData('moduleCodeMap').then((moduleCodeMap)=>{
186
+ const { moduleId } = body;
187
+ if (moduleCodeMap) return moduleCodeMap[moduleId];
188
+ return {
189
+ source: '',
190
+ transformed: '',
191
+ parsedSource: ''
192
+ };
193
+ });
194
+ case types_namespaceObject.SDK.ServerAPI.API.GetModuleCodeByModuleIds:
195
+ return this.loader.loadData('moduleCodeMap').then((moduleCodeMap)=>{
196
+ const { moduleIds } = body;
197
+ const _moduleCodeData = {};
198
+ if (moduleCodeMap) {
199
+ moduleIds.forEach((id)=>{
200
+ _moduleCodeData[id] = moduleCodeMap[id];
201
+ });
202
+ return _moduleCodeData;
203
+ }
204
+ return [];
205
+ });
206
+ case types_namespaceObject.SDK.ServerAPI.API.GetAllModuleGraph:
207
+ return this.loader.loadData('moduleGraph').then((moduleGraph)=>null == moduleGraph ? void 0 : moduleGraph.modules);
208
+ case types_namespaceObject.SDK.ServerAPI.API.GetSearchModules:
209
+ return Promise.all([
210
+ this.loader.loadData('moduleGraph'),
211
+ this.loader.loadData('chunkGraph')
212
+ ]).then((res)=>{
213
+ const [moduleGraph, chunkGraph] = res;
214
+ const { moduleName } = body;
215
+ if (!moduleName) return [];
216
+ const assetMap = chunkGraph.chunks.reduce((acc, chunk)=>{
217
+ chunk.assets.forEach((asset)=>{
218
+ if (!acc[chunk.id]) acc[chunk.id] = [];
219
+ acc[chunk.id].push(asset);
220
+ });
221
+ return acc;
222
+ }, {});
223
+ const searchedChunksMap = new Map();
224
+ null == moduleGraph || moduleGraph.modules.filter((module)=>{
225
+ if (module.webpackId.includes(moduleName)) module.chunks.forEach((chunk)=>{
226
+ if (searchedChunksMap.has(chunk)) return;
227
+ const assets = assetMap[chunk] || [];
228
+ assets.forEach((asset)=>{
229
+ if (asset.endsWith('.js')) searchedChunksMap.set(chunk, asset);
230
+ });
231
+ });
232
+ });
233
+ return Object.fromEntries(searchedChunksMap);
234
+ });
235
+ case types_namespaceObject.SDK.ServerAPI.API.GetSearchModuleInChunk:
236
+ return Promise.all([
237
+ this.loader.loadData('moduleGraph'),
238
+ this.loader.loadData('root')
239
+ ]).then((res)=>{
240
+ const [moduleGraph, root] = res;
241
+ const { moduleName, chunk } = body;
242
+ if (!moduleName) return [];
243
+ const filteredModules = null == moduleGraph ? void 0 : moduleGraph.modules.filter((module)=>module.webpackId.includes(moduleName) && module.chunks.includes(chunk)).map((filteredModule)=>({
244
+ id: filteredModule.id,
245
+ path: filteredModule.path,
246
+ relativePath: (0, external_path_namespaceObject.relative)(root, filteredModule.path)
247
+ }));
248
+ return filteredModules;
249
+ });
250
+ case types_namespaceObject.SDK.ServerAPI.API.GetAllChunkGraph:
251
+ return this.loader.loadData('chunkGraph').then((chunkGraph)=>null == chunkGraph ? void 0 : chunkGraph.chunks);
252
+ case types_namespaceObject.SDK.ServerAPI.API.GetPackageRelationAlertDetails:
253
+ return Promise.all([
254
+ this.loader.loadData('moduleGraph'),
255
+ this.loader.loadData('errors'),
256
+ this.loader.loadData('root'),
257
+ this.loader.loadData('moduleCodeMap')
258
+ ]).then((res)=>{
259
+ const { id, target } = body;
260
+ const [moduleGraph, errors = [], root = '', moduleCodeMap] = res;
261
+ const { modules = [], dependencies = [] } = moduleGraph || {};
262
+ const { packages = [] } = errors.find((e)=>e.id === id) || {};
263
+ const { dependencies: pkgDependencies = [] } = packages.find((e)=>e.target.name === target.name && e.target.root === target.root && e.target.version === target.version) || {};
264
+ return external_alerts_js_namespaceObject.getPackageRelationAlertDetails(modules, dependencies, root, pkgDependencies, moduleCodeMap || {});
265
+ });
266
+ case types_namespaceObject.SDK.ServerAPI.API.GetOverlayAlerts:
267
+ return this.loader.loadData('errors').then((res)=>(res || []).filter((e)=>e.code === types_namespaceObject.Rule.RuleMessageCodeEnumerated.Overlay));
268
+ case types_namespaceObject.SDK.ServerAPI.API.BundleDiffManifest:
269
+ return this.loader.loadManifest();
270
+ case types_namespaceObject.SDK.ServerAPI.API.GetBundleDiffSummary:
271
+ return Promise.all([
272
+ this.loader.loadManifest(),
273
+ this.loader.loadData('root'),
274
+ this.loader.loadData('hash'),
275
+ this.loader.loadData('errors'),
276
+ this.loader.loadData('chunkGraph'),
277
+ this.loader.loadData('moduleGraph'),
278
+ this.loader.loadData('moduleCodeMap'),
279
+ this.loader.loadData('packageGraph'),
280
+ this.loader.loadData('configs')
281
+ ]).then(([_manifest, root = '', hash = '', errors = {}, chunkGraph = {}, moduleGraph = {}, moduleCodeMap = {}, packageGraph = {}, configs = []])=>{
282
+ var _configs__config_output, _configs__config, _configs_;
283
+ let outputFilename = '';
284
+ if ('string' == typeof (null == (_configs_ = configs[0]) ? void 0 : null == (_configs__config = _configs_.config) ? void 0 : null == (_configs__config_output = _configs__config.output) ? void 0 : _configs__config_output.chunkFilename)) {
285
+ var _configs_1;
286
+ outputFilename = null == (_configs_1 = configs[0]) ? void 0 : _configs_1.config.output.chunkFilename;
287
+ }
288
+ return {
289
+ root,
290
+ hash,
291
+ errors,
292
+ chunkGraph,
293
+ moduleGraph,
294
+ packageGraph,
295
+ outputFilename,
296
+ moduleCodeMap
297
+ };
298
+ });
299
+ case types_namespaceObject.SDK.ServerAPI.API.GetTileReportHtml:
300
+ return this.loader.loadData('otherReports').then((otherReports)=>null == otherReports ? void 0 : otherReports.tileReportHtml);
301
+ case types_namespaceObject.SDK.ServerAPI.API.GetChunkGraph:
302
+ return this.loader.loadData('chunkGraph').then((res)=>{
303
+ const { chunks = [] } = res || {};
304
+ return chunks;
305
+ });
306
+ case types_namespaceObject.SDK.ServerAPI.API.GetAllModuleGraphFilter:
307
+ return this.loader.loadData('moduleGraph').then((moduleGraph)=>null == moduleGraph ? void 0 : moduleGraph.modules.map((m)=>({
308
+ id: m.id,
309
+ webpackId: m.webpackId,
310
+ path: m.path,
311
+ size: m.size,
312
+ chunks: m.chunks,
313
+ kind: m.kind
314
+ })));
315
+ case types_namespaceObject.SDK.ServerAPI.API.GetModuleByName:
316
+ return this.loader.loadData('moduleGraph').then((moduleGraph)=>{
317
+ const { moduleName } = body;
318
+ const { modules = [] } = moduleGraph || {};
319
+ return modules.filter((m)=>m.path.includes(moduleName)).map((m)=>({
320
+ id: m.id,
321
+ path: m.path
322
+ })) || [];
323
+ });
324
+ case types_namespaceObject.SDK.ServerAPI.API.GetModuleIssuerPath:
325
+ return this.loader.loadData('moduleGraph').then((moduleGraph)=>{
326
+ var _modules_find;
327
+ const { moduleId } = body;
328
+ const modules = (null == moduleGraph ? void 0 : moduleGraph.modules) || [];
329
+ const issuerPath = (null == (_modules_find = modules.find((m)=>String(m.id) === moduleId)) ? void 0 : _modules_find.issuerPath) || [];
330
+ if (Array.isArray(issuerPath) && issuerPath.length > 0 && 'number' == typeof issuerPath[0]) return issuerPath.map((id)=>{
331
+ var _modules_find;
332
+ return null == (_modules_find = modules.find((m)=>m.id === id)) ? void 0 : _modules_find.path;
333
+ }).filter(Boolean);
334
+ return issuerPath;
335
+ });
336
+ case types_namespaceObject.SDK.ServerAPI.API.GetPackageInfo:
337
+ return this.loader.loadData('packageGraph').then((packageGraph)=>null == packageGraph ? void 0 : packageGraph.packages);
338
+ case types_namespaceObject.SDK.ServerAPI.API.GetPackageDependency:
339
+ return this.loader.loadData('packageGraph').then((packageGraph)=>(null == packageGraph ? void 0 : packageGraph.dependencies) || []);
340
+ case types_namespaceObject.SDK.ServerAPI.API.GetChunkGraphAI:
341
+ return this.loader.loadData('chunkGraph').then((res)=>{
342
+ const { chunks = [] } = res || {};
343
+ const filteredChunks = chunks.map(({ modules, ...rest })=>rest);
344
+ return filteredChunks;
345
+ });
346
+ case types_namespaceObject.SDK.ServerAPI.API.GetChunkByIdAI:
347
+ return Promise.all([
348
+ this.loader.loadData('chunkGraph'),
349
+ this.loader.loadData('moduleGraph')
350
+ ]).then(([chunkGraph, moduleGraph])=>{
351
+ const { chunks = [] } = chunkGraph || {};
352
+ const { modules = [] } = moduleGraph || {};
353
+ const { chunkId } = body;
354
+ const chunkInfo = chunks.find((c)=>c.id === chunkId);
355
+ if (!chunkInfo) return null;
356
+ const chunkModules = modules.filter((m)=>chunkInfo.modules.includes(m.id)).map((module)=>({
357
+ id: module.id,
358
+ path: module.path,
359
+ size: module.size,
360
+ chunks: module.chunks,
361
+ kind: module.kind,
362
+ issuerPath: module.issuerPath
363
+ }));
364
+ chunkInfo.modulesInfo = chunkModules;
365
+ return chunkInfo;
366
+ });
367
+ case types_namespaceObject.SDK.ServerAPI.API.GetDirectoriesLoaders:
368
+ return Promise.all([
369
+ this.loader.loadData('root'),
370
+ this.loader.loadData('loader')
371
+ ]).then(([root, loaders])=>external_loader_js_namespaceObject.getDirectoriesLoaders(loaders || [], root || ''));
372
+ default:
373
+ throw new Error(`API not implement: "${api}"`);
374
+ }
375
+ }
376
+ constructor(loader){
377
+ _define_property(this, "loader", void 0);
378
+ this.loader = loader;
379
+ this.loadAPI = this.loadAPI.bind(this);
456
380
  }
457
- }
458
381
  }
459
- // Annotate the CommonJS export names for ESM import in node:
460
- 0 && (module.exports = {
461
- APIDataLoader
382
+ exports.APIDataLoader = __webpack_exports__.APIDataLoader;
383
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
384
+ "APIDataLoader"
385
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
386
+ Object.defineProperty(exports, '__esModule', {
387
+ value: true
462
388
  });