@modern-js/app-tools 2.0.0-beta.1 → 2.0.0-beta.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 (240) hide show
  1. package/CHANGELOG.md +445 -0
  2. package/bin/modern.js +10 -1
  3. package/dist/js/modern/analyze/constants.js +2 -0
  4. package/dist/js/modern/analyze/generateCode.js +39 -19
  5. package/dist/js/modern/analyze/getBundleEntry.js +1 -1
  6. package/dist/js/modern/analyze/getFileSystemEntry.js +1 -1
  7. package/dist/js/modern/analyze/getHtmlTemplate.js +1 -1
  8. package/dist/js/modern/analyze/getServerRoutes.js +8 -4
  9. package/dist/js/modern/analyze/index.js +12 -27
  10. package/dist/js/modern/analyze/nestedRoutes.js +17 -6
  11. package/dist/js/modern/analyze/templates.js +59 -27
  12. package/dist/js/modern/analyze/utils.js +30 -4
  13. package/dist/js/modern/builder/builderPlugins/compatModern.js +18 -12
  14. package/dist/js/modern/builder/index.js +31 -16
  15. package/dist/js/modern/builder/loaders/routerLoader.js +20 -0
  16. package/dist/js/modern/builder/loaders/serverModuleLoader.js +4 -0
  17. package/dist/js/modern/builder/share.js +1 -1
  18. package/dist/js/modern/commands/build.js +8 -2
  19. package/dist/js/modern/commands/dev.js +37 -32
  20. package/dist/js/modern/commands/inspect.js +4 -2
  21. package/dist/js/modern/config/default.js +206 -0
  22. package/dist/js/modern/config/index.js +2 -0
  23. package/dist/js/modern/config/initial/createHtmlConfig.js +32 -0
  24. package/dist/js/modern/{builder → config/initial}/createOutputConfig.js +16 -15
  25. package/dist/js/modern/config/initial/createSourceConfig.js +32 -0
  26. package/dist/js/modern/config/initial/createToolsConfig.js +41 -0
  27. package/dist/js/modern/config/initial/index.js +11 -0
  28. package/dist/js/modern/config/initial/inits.js +117 -0
  29. package/dist/js/modern/config/initial/transformNormalizedConfig.js +40 -0
  30. package/dist/js/modern/defineConfig.js +12 -0
  31. package/dist/js/modern/hooks.js +23 -19
  32. package/dist/js/modern/index.js +7 -5
  33. package/dist/js/modern/initialize/index.js +72 -0
  34. package/dist/js/modern/schema/Schema.js +39 -0
  35. package/dist/js/modern/schema/index.js +139 -0
  36. package/dist/js/modern/schema/legacy.js +284 -0
  37. package/dist/js/modern/types/config/deploy.js +0 -0
  38. package/dist/js/modern/types/config/dev.js +0 -0
  39. package/dist/js/modern/types/config/experiments.js +0 -0
  40. package/dist/js/modern/types/config/html.js +0 -0
  41. package/dist/js/modern/types/config/index.js +2 -0
  42. package/dist/js/modern/types/config/output.js +0 -0
  43. package/dist/js/modern/types/config/performance.js +0 -0
  44. package/dist/js/modern/types/config/security.js +0 -0
  45. package/dist/js/modern/types/config/source.js +0 -0
  46. package/dist/js/modern/types/config/tools.js +0 -0
  47. package/dist/js/modern/types/hooks.js +0 -0
  48. package/dist/js/modern/types/index.js +4 -0
  49. package/dist/js/modern/types/legacyConfig/deploy.js +0 -0
  50. package/dist/js/modern/types/legacyConfig/dev.js +0 -0
  51. package/dist/js/modern/types/legacyConfig/index.js +0 -0
  52. package/dist/js/modern/types/legacyConfig/output.js +1 -0
  53. package/dist/js/modern/types/legacyConfig/source.js +0 -0
  54. package/dist/js/modern/types/legacyConfig/tools.js +0 -0
  55. package/dist/js/modern/utils/config.js +1 -1
  56. package/dist/js/modern/utils/createFileWatcher.js +82 -0
  57. package/dist/js/modern/utils/restart.js +17 -0
  58. package/dist/js/node/analyze/constants.js +5 -1
  59. package/dist/js/node/analyze/generateCode.js +37 -17
  60. package/dist/js/node/analyze/getBundleEntry.js +1 -1
  61. package/dist/js/node/analyze/getFileSystemEntry.js +1 -1
  62. package/dist/js/node/analyze/getHtmlTemplate.js +1 -1
  63. package/dist/js/node/analyze/getServerRoutes.js +8 -4
  64. package/dist/js/node/analyze/index.js +13 -39
  65. package/dist/js/node/analyze/nestedRoutes.js +15 -4
  66. package/dist/js/node/analyze/templates.js +60 -27
  67. package/dist/js/node/analyze/utils.js +31 -3
  68. package/dist/js/node/builder/builderPlugins/compatModern.js +18 -12
  69. package/dist/js/node/builder/index.js +32 -16
  70. package/dist/js/node/builder/loaders/routerLoader.js +27 -0
  71. package/dist/js/node/builder/loaders/serverModuleLoader.js +11 -0
  72. package/dist/js/node/builder/share.js +1 -1
  73. package/dist/js/node/commands/build.js +8 -2
  74. package/dist/js/node/commands/dev.js +37 -32
  75. package/dist/js/node/commands/inspect.js +4 -2
  76. package/dist/js/node/config/default.js +213 -0
  77. package/dist/js/node/config/index.js +31 -0
  78. package/dist/js/node/config/initial/createHtmlConfig.js +38 -0
  79. package/dist/js/node/{builder → config/initial}/createOutputConfig.js +16 -15
  80. package/dist/js/node/config/initial/createSourceConfig.js +38 -0
  81. package/dist/js/node/config/initial/createToolsConfig.js +47 -0
  82. package/dist/js/node/config/initial/index.js +24 -0
  83. package/dist/js/node/config/initial/inits.js +127 -0
  84. package/dist/js/node/config/initial/transformNormalizedConfig.js +46 -0
  85. package/dist/js/node/defineConfig.js +20 -0
  86. package/dist/js/node/hooks.js +23 -28
  87. package/dist/js/node/index.js +30 -16
  88. package/dist/js/node/initialize/index.js +79 -0
  89. package/dist/js/node/schema/Schema.js +46 -0
  90. package/dist/js/node/schema/index.js +152 -0
  91. package/dist/js/node/schema/legacy.js +291 -0
  92. package/dist/js/node/types/config/deploy.js +0 -0
  93. package/dist/js/node/types/config/dev.js +0 -0
  94. package/dist/js/node/types/config/experiments.js +0 -0
  95. package/dist/js/node/types/config/html.js +0 -0
  96. package/dist/js/node/types/config/index.js +16 -0
  97. package/dist/js/node/types/config/output.js +0 -0
  98. package/dist/js/node/types/config/performance.js +0 -0
  99. package/dist/js/node/types/config/security.js +0 -0
  100. package/dist/js/node/types/config/source.js +0 -0
  101. package/dist/js/node/types/config/tools.js +0 -0
  102. package/dist/js/node/types/hooks.js +0 -0
  103. package/dist/js/node/types/index.js +38 -0
  104. package/dist/js/node/types/legacyConfig/deploy.js +0 -0
  105. package/dist/js/node/types/legacyConfig/dev.js +0 -0
  106. package/dist/js/node/types/legacyConfig/index.js +0 -0
  107. package/dist/js/node/types/legacyConfig/output.js +5 -0
  108. package/dist/js/node/types/legacyConfig/source.js +0 -0
  109. package/dist/js/node/types/legacyConfig/tools.js +0 -0
  110. package/dist/js/node/utils/config.js +1 -1
  111. package/dist/js/node/utils/createFileWatcher.js +91 -0
  112. package/dist/js/node/utils/restart.js +23 -0
  113. package/dist/js/treeshaking/analyze/constants.js +2 -0
  114. package/dist/js/treeshaking/analyze/generateCode.js +138 -82
  115. package/dist/js/treeshaking/analyze/getBundleEntry.js +1 -1
  116. package/dist/js/treeshaking/analyze/getFileSystemEntry.js +1 -1
  117. package/dist/js/treeshaking/analyze/getHtmlTemplate.js +1 -1
  118. package/dist/js/treeshaking/analyze/getServerRoutes.js +7 -5
  119. package/dist/js/treeshaking/analyze/index.js +10 -26
  120. package/dist/js/treeshaking/analyze/nestedRoutes.js +98 -55
  121. package/dist/js/treeshaking/analyze/templates.js +175 -101
  122. package/dist/js/treeshaking/analyze/utils.js +80 -4
  123. package/dist/js/treeshaking/builder/builderPlugins/compatModern.js +18 -12
  124. package/dist/js/treeshaking/builder/index.js +29 -16
  125. package/dist/js/treeshaking/builder/loaders/routerLoader.js +14 -0
  126. package/dist/js/treeshaking/builder/loaders/serverModuleLoader.js +4 -0
  127. package/dist/js/treeshaking/builder/share.js +1 -1
  128. package/dist/js/treeshaking/commands/build.js +33 -23
  129. package/dist/js/treeshaking/commands/dev.js +56 -43
  130. package/dist/js/treeshaking/commands/inspect.js +8 -3
  131. package/dist/js/treeshaking/config/default.js +199 -0
  132. package/dist/js/treeshaking/config/index.js +2 -0
  133. package/dist/js/treeshaking/config/initial/createHtmlConfig.js +31 -0
  134. package/dist/js/treeshaking/config/initial/createOutputConfig.js +70 -0
  135. package/dist/js/treeshaking/config/initial/createSourceConfig.js +41 -0
  136. package/dist/js/treeshaking/config/initial/createToolsConfig.js +38 -0
  137. package/dist/js/treeshaking/config/initial/index.js +11 -0
  138. package/dist/js/treeshaking/config/initial/inits.js +114 -0
  139. package/dist/js/treeshaking/config/initial/transformNormalizedConfig.js +38 -0
  140. package/dist/js/treeshaking/defineConfig.js +14 -0
  141. package/dist/js/treeshaking/hooks.js +23 -19
  142. package/dist/js/treeshaking/index.js +7 -5
  143. package/dist/js/treeshaking/initialize/index.js +121 -0
  144. package/dist/js/treeshaking/schema/Schema.js +75 -0
  145. package/dist/js/treeshaking/schema/index.js +138 -0
  146. package/dist/js/treeshaking/schema/legacy.js +273 -0
  147. package/dist/js/treeshaking/types/config/deploy.js +0 -0
  148. package/dist/js/treeshaking/types/config/dev.js +0 -0
  149. package/dist/js/treeshaking/types/config/experiments.js +0 -0
  150. package/dist/js/treeshaking/types/config/html.js +0 -0
  151. package/dist/js/treeshaking/types/config/index.js +2 -0
  152. package/dist/js/treeshaking/types/config/output.js +0 -0
  153. package/dist/js/treeshaking/types/config/performance.js +0 -0
  154. package/dist/js/treeshaking/types/config/security.js +0 -0
  155. package/dist/js/treeshaking/types/config/source.js +0 -0
  156. package/dist/js/treeshaking/types/config/tools.js +0 -0
  157. package/dist/js/treeshaking/types/hooks.js +0 -0
  158. package/dist/js/treeshaking/types/index.js +4 -0
  159. package/dist/js/treeshaking/types/legacyConfig/deploy.js +0 -0
  160. package/dist/js/treeshaking/types/legacyConfig/dev.js +0 -0
  161. package/dist/js/treeshaking/types/legacyConfig/index.js +0 -0
  162. package/dist/js/treeshaking/types/legacyConfig/output.js +1 -0
  163. package/dist/js/treeshaking/types/legacyConfig/source.js +0 -0
  164. package/dist/js/treeshaking/types/legacyConfig/tools.js +0 -0
  165. package/dist/js/treeshaking/utils/config.js +1 -1
  166. package/dist/js/treeshaking/utils/createFileWatcher.js +123 -0
  167. package/dist/js/treeshaking/utils/restart.js +45 -0
  168. package/dist/types/analyze/constants.d.ts +2 -0
  169. package/dist/types/analyze/generateCode.d.ts +3 -2
  170. package/dist/types/analyze/getBundleEntry.d.ts +2 -2
  171. package/dist/types/analyze/getFileSystemEntry.d.ts +2 -2
  172. package/dist/types/analyze/getHtmlTemplate.d.ts +3 -3
  173. package/dist/types/analyze/getServerRoutes.d.ts +3 -2
  174. package/dist/types/analyze/index.d.ts +3 -41
  175. package/dist/types/analyze/templates.d.ts +9 -8
  176. package/dist/types/analyze/utils.d.ts +10 -2
  177. package/dist/types/builder/builderPlugins/compatModern.d.ts +2 -2
  178. package/dist/types/builder/index.d.ts +5 -2
  179. package/dist/types/builder/loaders/routerLoader.d.ts +3 -0
  180. package/dist/types/builder/loaders/serverModuleLoader.d.ts +3 -0
  181. package/dist/types/builder/share.d.ts +2 -2
  182. package/dist/types/commands/build.d.ts +2 -2
  183. package/dist/types/commands/deploy.d.ts +2 -2
  184. package/dist/types/commands/dev.d.ts +2 -2
  185. package/dist/types/commands/inspect.d.ts +9 -1
  186. package/dist/types/commands/start.d.ts +2 -2
  187. package/dist/types/config/default.d.ts +3 -0
  188. package/dist/types/config/index.d.ts +2 -0
  189. package/dist/types/config/initial/createHtmlConfig.d.ts +2 -0
  190. package/dist/types/config/initial/createOutputConfig.d.ts +2 -0
  191. package/dist/types/config/initial/createSourceConfig.d.ts +2 -0
  192. package/dist/types/config/initial/createToolsConfig.d.ts +2 -0
  193. package/dist/types/config/initial/index.d.ts +4 -0
  194. package/dist/types/config/initial/inits.d.ts +4 -0
  195. package/dist/types/config/initial/transformNormalizedConfig.d.ts +2 -0
  196. package/dist/types/defineConfig.d.ts +7 -0
  197. package/dist/types/hooks.d.ts +2 -42
  198. package/dist/types/index.d.ts +5 -5
  199. package/dist/types/initialize/index.d.ts +3 -0
  200. package/dist/types/schema/Schema.d.ts +14 -0
  201. package/dist/types/schema/index.d.ts +4 -0
  202. package/dist/types/schema/legacy.d.ts +3 -0
  203. package/dist/types/types/config/deploy.d.ts +9 -0
  204. package/dist/types/types/config/dev.d.ts +13 -0
  205. package/dist/types/types/config/experiments.d.ts +4 -0
  206. package/dist/types/types/config/html.d.ts +4 -0
  207. package/dist/types/types/config/index.d.ts +62 -0
  208. package/dist/types/types/config/output.d.ts +23 -0
  209. package/dist/types/types/config/performance.d.ts +4 -0
  210. package/dist/types/types/config/security.d.ts +4 -0
  211. package/dist/types/types/config/source.d.ts +22 -0
  212. package/dist/types/types/config/tools.d.ts +22 -0
  213. package/dist/types/types/hooks.d.ts +81 -0
  214. package/dist/types/types/index.d.ts +23 -0
  215. package/dist/types/types/legacyConfig/deploy.d.ts +8 -0
  216. package/dist/types/types/legacyConfig/dev.d.ts +12 -0
  217. package/dist/types/types/legacyConfig/index.d.ts +33 -0
  218. package/dist/types/types/legacyConfig/output.d.ts +51 -0
  219. package/dist/types/types/legacyConfig/source.d.ts +25 -0
  220. package/dist/types/types/legacyConfig/tools.d.ts +16 -0
  221. package/dist/types/utils/config.d.ts +2 -2
  222. package/dist/types/utils/createFileWatcher.d.ts +4 -0
  223. package/dist/types/utils/printInstructions.d.ts +3 -3
  224. package/dist/types/utils/restart.d.ts +3 -0
  225. package/lib/types.d.ts +1 -1
  226. package/package.json +28 -25
  227. package/dist/js/modern/builder/createHtmlConfig.js +0 -58
  228. package/dist/js/modern/builder/createSourceConfig.js +0 -74
  229. package/dist/js/modern/builder/createToolsConfig.js +0 -87
  230. package/dist/js/node/builder/createHtmlConfig.js +0 -68
  231. package/dist/js/node/builder/createSourceConfig.js +0 -82
  232. package/dist/js/node/builder/createToolsConfig.js +0 -94
  233. package/dist/js/treeshaking/builder/createHtmlConfig.js +0 -59
  234. package/dist/js/treeshaking/builder/createOutputConfig.js +0 -70
  235. package/dist/js/treeshaking/builder/createSourceConfig.js +0 -88
  236. package/dist/js/treeshaking/builder/createToolsConfig.js +0 -85
  237. package/dist/types/builder/createHtmlConfig.d.ts +0 -6
  238. package/dist/types/builder/createOutputConfig.d.ts +0 -3
  239. package/dist/types/builder/createSourceConfig.d.ts +0 -5
  240. package/dist/types/builder/createToolsConfig.d.ts +0 -13
@@ -1,9 +1,10 @@
1
- import type { NormalizedConfig, IAppContext } from '@modern-js/core';
1
+ import type { IAppContext } from '@modern-js/core';
2
2
  import type { Entrypoint, ServerRoute } from '@modern-js/types';
3
+ import type { AppNormalizedConfig } from '../types';
3
4
  export declare const getServerRoutes: (entrypoints: Entrypoint[], {
4
5
  appContext,
5
6
  config
6
7
  }: {
7
8
  appContext: IAppContext;
8
- config: NormalizedConfig;
9
+ config: AppNormalizedConfig;
9
10
  }) => ServerRoute[];
@@ -1,42 +1,4 @@
1
- import type { CliPlugin, RuntimePlugin, ImportStatement } from '@modern-js/core';
2
- import type { RouteLegacy, Entrypoint, ServerRoute, HtmlPartials, NestedRoute, PageRoute } from '@modern-js/types';
3
- import type { AppHooks } from '../hooks';
4
- export declare const modifyEntryImports: import("@modern-js/plugin").AsyncWaterfall<{
5
- imports: ImportStatement[];
6
- entrypoint: Entrypoint;
7
- }>;
8
- export declare const modifyEntryExport: import("@modern-js/plugin").AsyncWaterfall<{
9
- entrypoint: Entrypoint;
10
- exportStatement: string;
11
- }>;
12
- export declare const addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
13
- export declare const modifyEntryRuntimePlugins: import("@modern-js/plugin").AsyncWaterfall<{
14
- entrypoint: Entrypoint;
15
- plugins: RuntimePlugin[];
16
- }>;
17
- export declare const modifyEntryRenderFunction: import("@modern-js/plugin").AsyncWaterfall<{
18
- entrypoint: Entrypoint;
19
- code: string;
20
- }>;
21
- export declare const modifyAsyncEntry: import("@modern-js/plugin").AsyncWaterfall<{
22
- entrypoint: Entrypoint;
23
- code: string;
24
- }>;
25
- export declare const modifyFileSystemRoutes: import("@modern-js/plugin").AsyncWaterfall<{
26
- entrypoint: Entrypoint;
27
- routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
28
- }>;
29
- export declare const modifyServerRoutes: import("@modern-js/plugin").AsyncWaterfall<{
30
- routes: ServerRoute[];
31
- }>;
32
- export declare const htmlPartials: import("@modern-js/plugin").AsyncWaterfall<{
33
- entrypoint: Entrypoint;
34
- partials: HtmlPartials;
35
- }>;
36
- export declare const beforeGenerateRoutes: import("@modern-js/plugin").AsyncWaterfall<{
37
- entrypoint: Entrypoint;
38
- code: string;
39
- }>;
40
- export declare const addDefineTypes: import("@modern-js/plugin").AsyncWaterfall<void>;
41
- declare const _default: () => CliPlugin<AppHooks>;
1
+ import type { CliPlugin } from '@modern-js/core';
2
+ import { AppTools } from '../types';
3
+ declare const _default: () => CliPlugin<AppTools>;
42
4
  export default _default;
@@ -1,5 +1,5 @@
1
- import type { RuntimePlugin } from '@modern-js/core';
2
1
  import type { Entrypoint, NestedRoute, PageRoute, RouteLegacy } from '@modern-js/types';
2
+ import type { RuntimePlugin } from '../types';
3
3
  export declare const index: ({
4
4
  mountId,
5
5
  imports,
@@ -27,22 +27,23 @@ export declare const html: (partials: {
27
27
  }) => string;
28
28
  export declare const routesForServer: ({
29
29
  routes,
30
- alias
30
+ internalDirectory,
31
+ entryName
31
32
  }: {
32
33
  routes: (NestedRoute | PageRoute)[];
33
- alias: {
34
- name: string;
35
- basename: string;
36
- };
34
+ internalDirectory: string;
35
+ entryName: string;
37
36
  }) => string;
38
37
  export declare const fileSystemRoutes: ({
39
38
  routes,
40
39
  ssrMode,
41
40
  nestedRoutesEntry,
42
- entryName
41
+ entryName,
42
+ internalDirectory
43
43
  }: {
44
44
  routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
45
45
  ssrMode: 'string' | 'stream' | false;
46
46
  nestedRoutesEntry?: string | undefined;
47
47
  entryName: string;
48
- }) => string;
48
+ internalDirectory: string;
49
+ }) => Promise<string>;
@@ -1,5 +1,5 @@
1
1
  import type { Entrypoint } from '@modern-js/types';
2
- import type { ImportStatement } from '@modern-js/core';
2
+ import type { ImportStatement } from '../types';
3
3
  export declare const walkDirectory: (dir: string) => string[];
4
4
  export declare const getDefaultImports: ({
5
5
  entrypoint,
@@ -15,4 +15,12 @@ export declare const getDefaultImports: ({
15
15
  internalDirectory: string;
16
16
  }) => ImportStatement[];
17
17
  export declare const isRouteComponentFile: (filePath: string) => boolean;
18
- export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
18
+ export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
19
+ export declare const parseModule: ({
20
+ source,
21
+ filename
22
+ }: {
23
+ source: string;
24
+ filename: string;
25
+ }) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
26
+ export declare const hasLoader: (filename: string) => Promise<boolean>;
@@ -1,6 +1,6 @@
1
1
  import { BuilderPlugin } from '@modern-js/builder-shared';
2
2
  import type { BuilderPluginAPI } from '@modern-js/builder-webpack-provider';
3
- import type { IAppContext, NormalizedConfig } from '@modern-js/core';
3
+ import type { IAppContext, AppNormalizedConfig } from '../../types';
4
4
  declare type Parameter<T extends (arg: any) => void> = Parameters<T>[0];
5
5
  declare type FnParameter<T extends {
6
6
  [p: string]: (arg: any) => void;
@@ -9,5 +9,5 @@ export declare type PluginCompatModernOptions = FnParameter<Partial<Pick<Builder
9
9
  /**
10
10
  * Provides default configuration consistent with `@modern-js/webpack`
11
11
  */
12
- export declare const PluginCompatModern: (appContext: IAppContext, modernConfig: NormalizedConfig, options?: PluginCompatModernOptions) => BuilderPlugin<BuilderPluginAPI>;
12
+ export declare const PluginCompatModern: (appContext: IAppContext, modernConfig: AppNormalizedConfig, options?: PluginCompatModernOptions) => BuilderPlugin<BuilderPluginAPI>;
13
13
  export {};
@@ -1,9 +1,11 @@
1
1
  import { BuilderInstance, BuilderTarget, CreateBuilderOptions } from '@modern-js/builder';
2
- import type { IAppContext, NormalizedConfig } from '@modern-js/core';
2
+ import { BuilderConfig } from '@modern-js/builder-webpack-provider';
3
+ import type { IAppContext } from '@modern-js/core';
4
+ import type { AppNormalizedConfig } from '../types';
3
5
  import { PluginCompatModernOptions } from './builderPlugins/compatModern';
4
6
  export declare type BuilderOptions = {
5
7
  target?: BuilderTarget | BuilderTarget[];
6
- normalizedConfig: NormalizedConfig;
8
+ normalizedConfig: AppNormalizedConfig;
7
9
  appContext: IAppContext;
8
10
  compatPluginConfig?: PluginCompatModernOptions;
9
11
  };
@@ -12,4 +14,5 @@ export declare function createBuilderForEdenX({
12
14
  appContext,
13
15
  compatPluginConfig
14
16
  }: BuilderOptions): Promise<BuilderInstance>;
17
+ export declare function createBuilderProviderConfig(normalizedConfig: AppNormalizedConfig, appContext: IAppContext): BuilderConfig;
15
18
  export declare function createBuilderOptions(target: BuilderTarget | BuilderTarget[], appContext: IAppContext): CreateBuilderOptions;
@@ -0,0 +1,3 @@
1
+ import type { LoaderContext } from 'webpack';
2
+ declare function loader(this: LoaderContext<void>, source: string): string;
3
+ export default loader;
@@ -0,0 +1,3 @@
1
+ import { LoaderContext } from 'webpack';
2
+ declare function loader(this: LoaderContext<void>): string;
3
+ export default loader;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { WebpackChain } from '@modern-js/builder-webpack-provider';
3
- import { IAppContext, NormalizedConfig } from '@modern-js/core';
4
- export declare function createCopyPattern(appContext: IAppContext, config: NormalizedConfig, patternsType: 'upload' | 'public', chain?: WebpackChain): {
3
+ import { AppNormalizedConfig, IAppContext } from '../types';
4
+ export declare function createCopyPattern(appContext: IAppContext, config: AppNormalizedConfig, patternsType: 'upload' | 'public', chain?: WebpackChain): {
5
5
  info: (file: {
6
6
  sourceFilename: string;
7
7
  }) => {
@@ -1,4 +1,4 @@
1
1
  import { PluginAPI } from '@modern-js/core';
2
2
  import type { BuildOptions } from '../utils/types';
3
- import type { AppHooks } from '../hooks';
4
- export declare const build: (api: PluginAPI<AppHooks>, options?: BuildOptions) => Promise<void>;
3
+ import type { AppTools } from '../types';
4
+ export declare const build: (api: PluginAPI<AppTools>, options?: BuildOptions) => Promise<void>;
@@ -1,3 +1,3 @@
1
1
  import type { PluginAPI } from '@modern-js/core';
2
- import type { AppHooks } from '../hooks';
3
- export declare const deploy: (api: PluginAPI<AppHooks>, options: any) => Promise<void>;
2
+ import type { AppTools } from '../types';
3
+ export declare const deploy: (api: PluginAPI<AppTools>, options: any) => Promise<void>;
@@ -1,4 +1,4 @@
1
1
  import { PluginAPI } from '@modern-js/core';
2
2
  import { DevOptions } from '../utils/types';
3
- import type { AppHooks } from '../hooks';
4
- export declare const dev: (api: PluginAPI<AppHooks>, options: DevOptions) => Promise<void>;
3
+ import type { AppTools } from '../types';
4
+ export declare const dev: (api: PluginAPI<AppTools>, options: DevOptions) => Promise<void>;
@@ -1,3 +1,11 @@
1
1
  import type { PluginAPI } from '@modern-js/core';
2
2
  import type { InspectOptions } from '../utils/types';
3
- export declare const inspect: (api: PluginAPI, options: InspectOptions) => Promise<any>;
3
+ import type { AppTools } from '../types';
4
+ export declare const inspect: (api: PluginAPI<AppTools>, options: InspectOptions) => Promise<{
5
+ builderConfig: string;
6
+ bundlerConfigs: string[];
7
+ origin: {
8
+ builderConfig: Record<string, any>;
9
+ bundlerConfigs: Record<string, any>[];
10
+ };
11
+ }>;
@@ -1,3 +1,3 @@
1
1
  import type { PluginAPI } from '@modern-js/core';
2
- import type { AppHooks } from '../hooks';
3
- export declare const start: (api: PluginAPI<AppHooks>) => Promise<void>;
2
+ import type { AppTools } from '../types';
3
+ export declare const start: (api: PluginAPI<AppTools>) => Promise<void>;
@@ -0,0 +1,3 @@
1
+ import { IAppContext, AppUserConfig, AppLegacyUserConfig } from '../types';
2
+ export declare function createDefaultConfig(appContext: IAppContext): AppUserConfig;
3
+ export declare function createLegacyDefaultConfig(appContext: IAppContext): AppLegacyUserConfig;
@@ -0,0 +1,2 @@
1
+ export { createDefaultConfig, createLegacyDefaultConfig } from './default';
2
+ export { initialNormalizedConfig, checkIsLegacyConfig } from './initial';
@@ -0,0 +1,2 @@
1
+ import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
2
+ export declare function createHtmlConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig['html'];
@@ -0,0 +1,2 @@
1
+ import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
2
+ export declare function createOutputConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig['output'];
@@ -0,0 +1,2 @@
1
+ import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
2
+ export declare function createSourceConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig['source'];
@@ -0,0 +1,2 @@
1
+ import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
2
+ export declare function createToolsConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig['tools'];
@@ -0,0 +1,4 @@
1
+ import { AppNormalizedConfig, IAppContext, AppLegacyUserConfig, AppUserConfig } from '../../types';
2
+ export { transformNormalizedConfig } from './transformNormalizedConfig';
3
+ export declare function checkIsLegacyConfig(config: AppLegacyUserConfig | AppUserConfig): config is AppLegacyUserConfig;
4
+ export declare function initialNormalizedConfig(config: AppNormalizedConfig, appContext: IAppContext): AppNormalizedConfig;
@@ -0,0 +1,4 @@
1
+ import { AppNormalizedConfig, IAppContext } from '../../types';
2
+ export declare function initHtmlConfig(config: AppNormalizedConfig, appContext: IAppContext): import("@modern-js/builder-shared").SharedHtmlConfig;
3
+ export declare function initSourceConfig(config: AppNormalizedConfig, appContext: IAppContext): void;
4
+ export declare function initToolsConfig(config: AppNormalizedConfig): void;
@@ -0,0 +1,2 @@
1
+ import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
2
+ export declare function transformNormalizedConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig;
@@ -0,0 +1,7 @@
1
+ import { AppUserConfig, AppLegacyUserConfig } from './types';
2
+ export declare const defineConfig: (config: AppUserConfig) => AppUserConfig;
3
+ /**
4
+ * @deprecated
5
+ * Using defineConfig first.
6
+ */
7
+ export declare const defineLegacyConfig: (config: AppLegacyUserConfig) => AppLegacyUserConfig;
@@ -1,42 +1,2 @@
1
- import type { webpack } from '@modern-js/builder-webpack-provider/types';
2
- export declare const beforeDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
3
- export declare const afterDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
4
- export declare const beforeCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
5
- bundlerConfigs: webpack.Configuration[];
6
- }, unknown>;
7
- export declare const afterCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
8
- compiler: webpack.Compiler | webpack.MultiCompiler | undefined;
9
- }, unknown>;
10
- export declare const beforePrintInstructions: import("@modern-js/plugin").AsyncWaterfall<{
11
- instructions: string;
12
- }>;
13
- export declare const beforeBuild: import("@modern-js/plugin").AsyncWorkflow<{
14
- bundlerConfigs?: webpack.Configuration[] | undefined;
15
- }, unknown>;
16
- export declare const afterBuild: import("@modern-js/plugin").AsyncWorkflow<{
17
- stats?: webpack.Stats | webpack.MultiStats | undefined;
18
- }, unknown>;
19
- export declare const beforeDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
20
- export declare const afterDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
21
- export declare const hooks: {
22
- beforeDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
23
- afterDev: import("@modern-js/plugin").AsyncWorkflow<void, unknown>;
24
- beforeCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
25
- bundlerConfigs: webpack.Configuration[];
26
- }, unknown>;
27
- afterCreateCompiler: import("@modern-js/plugin").AsyncWorkflow<{
28
- compiler: webpack.Compiler | webpack.MultiCompiler | undefined;
29
- }, unknown>;
30
- beforePrintInstructions: import("@modern-js/plugin").AsyncWaterfall<{
31
- instructions: string;
32
- }>;
33
- beforeBuild: import("@modern-js/plugin").AsyncWorkflow<{
34
- bundlerConfigs?: webpack.Configuration[] | undefined;
35
- }, unknown>;
36
- afterBuild: import("@modern-js/plugin").AsyncWorkflow<{
37
- stats?: webpack.Stats | webpack.MultiStats | undefined;
38
- }, unknown>;
39
- beforeDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
40
- afterDeploy: import("@modern-js/plugin").AsyncWorkflow<Record<string, any>, unknown>;
41
- };
42
- export declare type AppHooks = typeof hooks;
1
+ import { AppToolsHooks } from './types/hooks';
2
+ export declare const hooks: AppToolsHooks;
@@ -1,6 +1,6 @@
1
- import { defineConfig, CliPlugin } from '@modern-js/core';
2
- import { hooks, AppHooks } from './hooks';
3
- export { defineConfig, hooks };
4
- export type { AppHooks, CliPlugin };
5
- declare const _default: () => CliPlugin<AppHooks>;
1
+ import { CliPlugin } from '@modern-js/core';
2
+ import { AppTools } from './types';
3
+ export * from './defineConfig';
4
+ export * from './types';
5
+ declare const _default: () => CliPlugin<AppTools>;
6
6
  export default _default;
@@ -0,0 +1,3 @@
1
+ import { CliPlugin, AppTools } from '../types';
2
+ declare const _default: () => CliPlugin<AppTools>;
3
+ export default _default;
@@ -0,0 +1,14 @@
1
+ export declare type ValidateSchema = {
2
+ target: string;
3
+ schema: any;
4
+ };
5
+ export declare class Schema extends Map<string, any> {
6
+ private schema;
7
+ constructor(baseSchema?: Record<string, any>);
8
+ setSchema(key: string, object: Record<string, any>): this;
9
+ set(key: string, value: any): this;
10
+ has(key: string): boolean;
11
+ get(key: string): any;
12
+ delete(key: string): boolean;
13
+ generate(): ValidateSchema[];
14
+ }
@@ -0,0 +1,4 @@
1
+ import { Schema } from './Schema';
2
+ declare const schema: Schema;
3
+ export { default as legacySchema } from './legacy';
4
+ export { schema };
@@ -0,0 +1,3 @@
1
+ import { Schema } from './Schema';
2
+ declare const schema: Schema;
3
+ export default schema;
@@ -0,0 +1,9 @@
1
+ export interface MicroFrontend {
2
+ enableHtmlEntry?: boolean;
3
+ externalBasicLibrary?: boolean;
4
+ moduleApp?: string;
5
+ }
6
+ export interface DeployUserConfig {
7
+ microFrontend?: boolean | MicroFrontend;
8
+ }
9
+ export declare type DeployNormalizedConfig = DeployUserConfig;
@@ -0,0 +1,13 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ declare type BuilderEnvConfig = Required<BuilderConfig>['dev'];
3
+ export declare type DevProxyOptions = string | Record<string, string>;
4
+ export interface DevUserConfig extends Pick<BuilderEnvConfig, 'assetPrefix' | 'https'> {
5
+ /**
6
+ * The configuration of `dev.proxy` is provided by `proxy` plugin.
7
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
8
+ * @requires `proxy` plugin
9
+ */
10
+ proxy?: string | Record<string, string>;
11
+ }
12
+ export declare type DevNormalizedConfig = DevUserConfig;
13
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderExperimentsConfig = Required<BuilderConfig>['experiments'];
3
+ export declare type ExperimentsUserConfig = BuilderExperimentsConfig;
4
+ export declare type ExperimentsNormalizedConfig = ExperimentsUserConfig;
@@ -0,0 +1,4 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderHtmlConfig = Required<BuilderConfig>['html'];
3
+ export declare type HtmlUserConfig = BuilderHtmlConfig;
4
+ export declare type HtmlNormalizedConfig = HtmlUserConfig;
@@ -0,0 +1,62 @@
1
+ import type { UserConfig } from '@modern-js/core';
2
+ import type { ServerUserConfig, ServerNormalizedConfig, BffUserConfig, BffNormalizedConfig } from '@modern-js/server-core';
3
+ import type { AppToolsHooks } from '../hooks';
4
+ import type { OutputNormalizedConfig, OutputUserConfig } from './output';
5
+ import type { SourceNormalizedConfig, SourceUserConfig } from './source';
6
+ import type { DevNormalizedConfig, DevUserConfig } from './dev';
7
+ import type { ToolsNormalizedConfig, ToolsUserConfig } from './tools';
8
+ import type { HtmlNormalizedConfig, HtmlUserConfig } from './html';
9
+ import type { SecurityNormalizedConfig, SecurityUserConfig } from './security';
10
+ import type { DeployNormalizedConfig, DeployUserConfig } from './deploy';
11
+ import type { ExperimentsUserConfig, ExperimentsNormalizedConfig } from './experiments';
12
+ import type { PerformanceNormalizedConfig, PerformanceUserConfig } from './performance';
13
+ export * from './output';
14
+ export interface RuntimeUserConfig {
15
+ [name: string]: any;
16
+ }
17
+ export interface RuntimeByEntriesUserConfig {
18
+ [name: string]: RuntimeUserConfig;
19
+ }
20
+ export declare type RuntimeNormalizedConfig = RuntimeUserConfig;
21
+ export declare type RuntimeByEntriesNormalizedConfig = RuntimeByEntriesUserConfig;
22
+ export interface AppToolsUserConfig {
23
+ source?: SourceUserConfig;
24
+ output?: OutputUserConfig;
25
+ server?: ServerUserConfig;
26
+ dev?: DevUserConfig;
27
+ deploy?: DeployUserConfig;
28
+ html?: HtmlUserConfig;
29
+ tools?: ToolsUserConfig;
30
+ runtime?: RuntimeUserConfig;
31
+ security?: SecurityUserConfig;
32
+ runtimeByEntries?: RuntimeByEntriesUserConfig;
33
+ performance?: PerformanceUserConfig;
34
+ experiments?: ExperimentsUserConfig;
35
+ /**
36
+ * The configuration of `bff` is provided by `bff` plugin.
37
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
38
+ * @requires `bff` plugin
39
+ */
40
+ bff?: BffUserConfig;
41
+ }
42
+ export declare type AppToolsNormalizedConfig = {
43
+ source: SourceNormalizedConfig;
44
+ bff: BffNormalizedConfig;
45
+ dev: DevNormalizedConfig;
46
+ deploy: DeployNormalizedConfig;
47
+ html: HtmlNormalizedConfig;
48
+ runtime: RuntimeNormalizedConfig;
49
+ runtimeByEntries: RuntimeByEntriesNormalizedConfig;
50
+ output: OutputNormalizedConfig;
51
+ security: SecurityNormalizedConfig;
52
+ server: ServerNormalizedConfig;
53
+ tools: ToolsNormalizedConfig;
54
+ performance: PerformanceNormalizedConfig;
55
+ experiments: ExperimentsNormalizedConfig;
56
+ cliOptions?: Record<string, any>;
57
+ _raw: UserConfig<{
58
+ hooks: AppToolsHooks;
59
+ userConfig: AppToolsUserConfig;
60
+ normalizedConfig: AppToolsNormalizedConfig;
61
+ }>;
62
+ };
@@ -0,0 +1,23 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderOutputConfig = Required<BuilderConfig>['output'];
3
+ export interface OutputUserConfig extends BuilderOutputConfig {
4
+ ssg?: SSGConfig;
5
+ enableModernMode?: boolean;
6
+ disableNodePolyfill?: boolean;
7
+ }
8
+ export declare type OutputNormalizedConfig = OutputUserConfig;
9
+ export declare type SSGRouteOptions = string | {
10
+ url: string;
11
+ output?: string;
12
+ params?: Record<string, any>[];
13
+ headers?: Record<string, any>;
14
+ };
15
+ export declare type SSGSingleEntryOptions = boolean | {
16
+ preventDefault?: string[];
17
+ headers?: Record<string, any>;
18
+ routes?: SSGRouteOptions[];
19
+ };
20
+ export declare type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
21
+ export declare type SSGConfig = boolean | SSGSingleEntryOptions | SSGMultiEntryOptions | ((entryName: string, payload: {
22
+ baseUrl?: string;
23
+ }) => SSGSingleEntryOptions);
@@ -0,0 +1,4 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderPerformanceConfig = Required<BuilderConfig>['performance'];
3
+ export declare type PerformanceUserConfig = BuilderPerformanceConfig;
4
+ export declare type PerformanceNormalizedConfig = PerformanceUserConfig;
@@ -0,0 +1,4 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderSecurityConfig = Required<BuilderConfig>['security'];
3
+ export declare type SecurityUserConfig = BuilderSecurityConfig;
4
+ export declare type SecurityNormalizedConfig = SecurityUserConfig;
@@ -0,0 +1,22 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ export declare type BuilderSourceConfig = Required<BuilderConfig>['source'];
3
+ export declare type Entry = string | {
4
+ entry: string;
5
+ enableFileSystemRoutes?: boolean;
6
+ disableMount?: boolean;
7
+ };
8
+ export declare type Entries = Record<string, Entry>;
9
+ export interface SourceUserConfig extends BuilderSourceConfig {
10
+ entries?: Entries;
11
+ enableAsyncEntry?: boolean;
12
+ disableDefaultEntries?: boolean;
13
+ entriesDir?: string;
14
+ configDir?: string;
15
+ /**
16
+ * The configuration of `source.designSystem` is provided by `tailwindcss` plugin.
17
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
18
+ * @requires `tailwindcss` plugin
19
+ */
20
+ designSystem?: Record<string, any>;
21
+ }
22
+ export declare type SourceNormalizedConfig = SourceUserConfig;
@@ -0,0 +1,22 @@
1
+ import type { BuilderConfig } from '@modern-js/builder-webpack-provider';
2
+ import type { JestConfig } from '@modern-js/core';
3
+ import type { PluginSwcOptions } from '@modern-js/builder-plugin-swc';
4
+ import type { PluginEsbuildOptions } from '@modern-js/builder-plugin-esbuild';
5
+ export declare type BuilderToolsConfig = Required<BuilderConfig>['tools'];
6
+ /**
7
+ * The configuration of `tools.tailwindcss` is provided by `tailwindcss` plugin.
8
+ * Please use `yarn new` or `pnpm new` to enable the corresponding capability.
9
+ * @requires `tailwindcss` plugin
10
+ */
11
+ export declare type Tailwindcss = Record<string, any> | ((options: Record<string, any>) => Record<string, any> | void);
12
+ export interface ToolsUserConfig extends BuilderToolsConfig {
13
+ tailwindcss?: Tailwindcss;
14
+ jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
15
+ esbuild?: PluginEsbuildOptions;
16
+ /**
17
+ * The configuration of `swc` is provided by `swc` plugin.
18
+ * @requires `swc` plugin
19
+ */
20
+ swc?: PluginSwcOptions;
21
+ }
22
+ export declare type ToolsNormalizedConfig = ToolsUserConfig;
@@ -0,0 +1,81 @@
1
+ import type { webpack } from '@modern-js/builder-webpack-provider';
2
+ import type { AsyncWaterfall, AsyncWorkflow, ParallelWorkflow } from '@modern-js/plugin';
3
+ import type { Entrypoint, HtmlPartials, NestedRoute, PageRoute, RouteLegacy, ServerRoute } from '@modern-js/types';
4
+ import type { Stats, MultiStats } from '@modern-js/builder-shared';
5
+ export interface ImportSpecifier {
6
+ local?: string;
7
+ imported?: string;
8
+ }
9
+ export interface ImportStatement {
10
+ specifiers: ImportSpecifier[];
11
+ value: string;
12
+ initialize?: string;
13
+ }
14
+ export interface RuntimePlugin {
15
+ name: string;
16
+ options: string;
17
+ args?: string;
18
+ }
19
+ export declare type AppToolsHooks = {
20
+ modifyEntryExport: AsyncWaterfall<{
21
+ entrypoint: Entrypoint;
22
+ exportStatement: string;
23
+ }>;
24
+ modifyEntryImports: AsyncWaterfall<{
25
+ imports: ImportStatement[];
26
+ entrypoint: Entrypoint;
27
+ }>;
28
+ modifyEntryRuntimePlugins: AsyncWaterfall<{
29
+ entrypoint: Entrypoint;
30
+ plugins: RuntimePlugin[];
31
+ }>;
32
+ modifyEntryRenderFunction: AsyncWaterfall<{
33
+ entrypoint: Entrypoint;
34
+ code: string;
35
+ }>;
36
+ modifyAsyncEntry: AsyncWaterfall<{
37
+ entrypoint: Entrypoint;
38
+ code: string;
39
+ }>;
40
+ modifyFileSystemRoutes: AsyncWaterfall<{
41
+ entrypoint: Entrypoint;
42
+ routes: RouteLegacy[] | (NestedRoute | PageRoute)[];
43
+ }>;
44
+ modifyServerRoutes: AsyncWaterfall<{
45
+ routes: ServerRoute[];
46
+ }>;
47
+ htmlPartials: AsyncWaterfall<{
48
+ entrypoint: Entrypoint;
49
+ partials: HtmlPartials;
50
+ }>;
51
+ beforeGenerateRoutes: AsyncWaterfall<{
52
+ entrypoint: Entrypoint;
53
+ code: string;
54
+ }>;
55
+ addDefineTypes: AsyncWaterfall<void>;
56
+ beforeDev: AsyncWorkflow<void, unknown>;
57
+ afterDev: AsyncWorkflow<void, unknown>;
58
+ beforeCreateCompiler: AsyncWorkflow<{
59
+ bundlerConfigs: webpack.Configuration[];
60
+ }, unknown>;
61
+ afterCreateCompiler: AsyncWorkflow<{
62
+ compiler?: webpack.Compiler | webpack.MultiCompiler;
63
+ }, unknown>;
64
+ beforePrintInstructions: AsyncWaterfall<{
65
+ instructions: string;
66
+ }>;
67
+ beforeBuild: AsyncWorkflow<{
68
+ bundlerConfigs?: webpack.Configuration[];
69
+ }, unknown>;
70
+ afterBuild: AsyncWorkflow<{
71
+ stats?: Stats | MultiStats;
72
+ }, unknown>;
73
+ beforeDeploy: AsyncWorkflow<Record<string, any>, unknown>;
74
+ afterDeploy: AsyncWorkflow<Record<string, any>, unknown>;
75
+ watchFiles: ParallelWorkflow<void>;
76
+ fileChange: AsyncWorkflow<{
77
+ filename: string;
78
+ eventType: 'add' | 'change' | 'unlink';
79
+ }, void>;
80
+ beforeRestart: AsyncWorkflow<void, void>;
81
+ };