@modern-js/core 1.9.2 → 1.10.2

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 (152) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/compiled/ajv/package.json +1 -1
  3. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/ajv.d.ts +0 -0
  4. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/codegen/code.d.ts +0 -0
  5. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/codegen/index.d.ts +0 -0
  6. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/codegen/scope.d.ts +0 -0
  7. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/errors.d.ts +0 -0
  8. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/index.d.ts +0 -0
  9. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/ref_error.d.ts +0 -0
  10. package/compiled/ajv/{dist → types}/compile/resolve.d.ts +0 -0
  11. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/rules.d.ts +0 -0
  12. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/util.d.ts +0 -0
  13. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/validate/index.d.ts +0 -0
  14. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/compile/validate/subschema.d.ts +0 -0
  15. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/core.d.ts +0 -0
  16. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/runtime/validation_error.d.ts +0 -0
  17. package/compiled/ajv/{dist → types}/types/index.d.ts +0 -0
  18. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/types/json-schema.d.ts +0 -0
  19. package/compiled/{ajv-keywords/ajv/dist → ajv/types}/types/jtd-schema.d.ts +0 -0
  20. package/compiled/ajv-keywords/index.d.ts +1 -0
  21. package/compiled/ajv-keywords/package.json +1 -1
  22. package/compiled/better-ajv-errors/index.d.ts +1 -0
  23. package/compiled/better-ajv-errors/package.json +1 -1
  24. package/compiled/v8-compile-cache/index.d.ts +1 -0
  25. package/compiled/v8-compile-cache/package.json +1 -1
  26. package/dist/config/index.d.ts +1 -1
  27. package/dist/config/index.js +19 -28
  28. package/dist/config/mergeConfig.js +5 -1
  29. package/dist/config/types/index.d.ts +37 -37
  30. package/dist/index.js +55 -60
  31. package/dist/initWatcher.js +3 -12
  32. package/dist/loadPlugins.d.ts +1 -1
  33. package/package.json +34 -13
  34. package/.eslintrc.js +0 -9
  35. package/compiled/ajv/dist/ajv.d.ts +0 -16
  36. package/compiled/ajv/dist/compile/codegen/code.d.ts +0 -40
  37. package/compiled/ajv/dist/compile/codegen/index.d.ts +0 -79
  38. package/compiled/ajv/dist/compile/codegen/scope.d.ts +0 -79
  39. package/compiled/ajv/dist/compile/errors.d.ts +0 -13
  40. package/compiled/ajv/dist/compile/index.d.ts +0 -80
  41. package/compiled/ajv/dist/compile/ref_error.d.ts +0 -6
  42. package/compiled/ajv/dist/compile/rules.d.ts +0 -28
  43. package/compiled/ajv/dist/compile/util.d.ts +0 -40
  44. package/compiled/ajv/dist/compile/validate/index.d.ts +0 -42
  45. package/compiled/ajv/dist/compile/validate/subschema.d.ts +0 -47
  46. package/compiled/ajv/dist/core.d.ts +0 -173
  47. package/compiled/ajv/dist/runtime/validation_error.d.ts +0 -7
  48. package/compiled/ajv/dist/types/json-schema.d.ts +0 -124
  49. package/compiled/ajv/dist/types/jtd-schema.d.ts +0 -169
  50. package/compiled/ajv-keywords/ajv/dist/compile/resolve.d.ts +0 -12
  51. package/compiled/ajv-keywords/ajv/dist/types/index.d.ts +0 -183
  52. package/compiled/ajv-keywords/dist/index.d.ts +0 -4
  53. package/compiled/ajv-keywords/uri-js/dist/es5/uri.all.d.ts +0 -59
  54. package/compiled/better-ajv-errors/ajv/dist/ajv.d.ts +0 -16
  55. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/code.d.ts +0 -40
  56. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/index.d.ts +0 -79
  57. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/scope.d.ts +0 -79
  58. package/compiled/better-ajv-errors/ajv/dist/compile/errors.d.ts +0 -13
  59. package/compiled/better-ajv-errors/ajv/dist/compile/index.d.ts +0 -80
  60. package/compiled/better-ajv-errors/ajv/dist/compile/ref_error.d.ts +0 -6
  61. package/compiled/better-ajv-errors/ajv/dist/compile/resolve.d.ts +0 -12
  62. package/compiled/better-ajv-errors/ajv/dist/compile/rules.d.ts +0 -28
  63. package/compiled/better-ajv-errors/ajv/dist/compile/util.d.ts +0 -40
  64. package/compiled/better-ajv-errors/ajv/dist/compile/validate/index.d.ts +0 -42
  65. package/compiled/better-ajv-errors/ajv/dist/compile/validate/subschema.d.ts +0 -47
  66. package/compiled/better-ajv-errors/ajv/dist/core.d.ts +0 -173
  67. package/compiled/better-ajv-errors/ajv/dist/runtime/validation_error.d.ts +0 -7
  68. package/compiled/better-ajv-errors/ajv/dist/types/index.d.ts +0 -183
  69. package/compiled/better-ajv-errors/ajv/dist/types/json-schema.d.ts +0 -124
  70. package/compiled/better-ajv-errors/ajv/dist/types/jtd-schema.d.ts +0 -169
  71. package/compiled/better-ajv-errors/typings.d.ts +0 -24
  72. package/compiled/better-ajv-errors/uri-js/dist/es5/uri.all.d.ts +0 -59
  73. package/dist/js/modern/cli.js +0 -29
  74. package/dist/js/modern/config/defaults.js +0 -103
  75. package/dist/js/modern/config/index.js +0 -115
  76. package/dist/js/modern/config/mergeConfig.js +0 -22
  77. package/dist/js/modern/config/schema/deploy.js +0 -17
  78. package/dist/js/modern/config/schema/index.js +0 -107
  79. package/dist/js/modern/config/schema/output.js +0 -147
  80. package/dist/js/modern/config/schema/server.js +0 -170
  81. package/dist/js/modern/config/schema/source.js +0 -59
  82. package/dist/js/modern/config/schema/tools.js +0 -36
  83. package/dist/js/modern/config/types/electron.js +0 -1
  84. package/dist/js/modern/config/types/index.js +0 -1
  85. package/dist/js/modern/config/types/less.js +0 -0
  86. package/dist/js/modern/config/types/sass.js +0 -0
  87. package/dist/js/modern/config/types/ssg.js +0 -0
  88. package/dist/js/modern/config/types/test.js +0 -0
  89. package/dist/js/modern/config/types/unbundle.js +0 -0
  90. package/dist/js/modern/context.js +0 -63
  91. package/dist/js/modern/index.js +0 -169
  92. package/dist/js/modern/initWatcher.js +0 -62
  93. package/dist/js/modern/loadEnv.js +0 -14
  94. package/dist/js/modern/loadPlugins.js +0 -122
  95. package/dist/js/modern/manager.js +0 -28
  96. package/dist/js/modern/pluginAPI.js +0 -11
  97. package/dist/js/modern/utils/commander.js +0 -19
  98. package/dist/js/modern/utils/repeatKeyWarning.js +0 -18
  99. package/dist/js/node/cli.js +0 -35
  100. package/dist/js/node/config/defaults.js +0 -110
  101. package/dist/js/node/config/index.js +0 -182
  102. package/dist/js/node/config/mergeConfig.js +0 -32
  103. package/dist/js/node/config/schema/deploy.js +0 -26
  104. package/dist/js/node/config/schema/index.js +0 -127
  105. package/dist/js/node/config/schema/output.js +0 -156
  106. package/dist/js/node/config/schema/server.js +0 -179
  107. package/dist/js/node/config/schema/source.js +0 -68
  108. package/dist/js/node/config/schema/tools.js +0 -43
  109. package/dist/js/node/config/types/electron.js +0 -5
  110. package/dist/js/node/config/types/index.js +0 -5
  111. package/dist/js/node/config/types/less.js +0 -0
  112. package/dist/js/node/config/types/sass.js +0 -0
  113. package/dist/js/node/config/types/ssg.js +0 -0
  114. package/dist/js/node/config/types/test.js +0 -0
  115. package/dist/js/node/config/types/unbundle.js +0 -0
  116. package/dist/js/node/context.js +0 -93
  117. package/dist/js/node/index.js +0 -329
  118. package/dist/js/node/initWatcher.js +0 -82
  119. package/dist/js/node/loadEnv.js +0 -30
  120. package/dist/js/node/loadPlugins.js +0 -134
  121. package/dist/js/node/manager.js +0 -45
  122. package/dist/js/node/pluginAPI.js +0 -54
  123. package/dist/js/node/utils/commander.js +0 -32
  124. package/dist/js/node/utils/repeatKeyWarning.js +0 -31
  125. package/dist/types/cli.d.ts +0 -1
  126. package/dist/types/config/defaults.d.ts +0 -28
  127. package/dist/types/config/index.d.ts +0 -12
  128. package/dist/types/config/mergeConfig.d.ts +0 -31
  129. package/dist/types/config/schema/deploy.d.ts +0 -16
  130. package/dist/types/config/schema/index.d.ts +0 -466
  131. package/dist/types/config/schema/output.d.ts +0 -146
  132. package/dist/types/config/schema/server.d.ts +0 -182
  133. package/dist/types/config/schema/source.d.ts +0 -58
  134. package/dist/types/config/schema/tools.d.ts +0 -36
  135. package/dist/types/config/types/electron.d.ts +0 -13
  136. package/dist/types/config/types/index.d.ts +0 -252
  137. package/dist/types/config/types/less.d.ts +0 -10
  138. package/dist/types/config/types/sass.d.ts +0 -8
  139. package/dist/types/config/types/ssg.d.ts +0 -13
  140. package/dist/types/config/types/test.d.ts +0 -15
  141. package/dist/types/config/types/unbundle.d.ts +0 -28
  142. package/dist/types/context.d.ts +0 -47
  143. package/dist/types/index.d.ts +0 -64
  144. package/dist/types/initWatcher.d.ts +0 -3
  145. package/dist/types/loadEnv.d.ts +0 -1
  146. package/dist/types/loadPlugins.d.ts +0 -44
  147. package/dist/types/manager.d.ts +0 -75
  148. package/dist/types/pluginAPI.d.ts +0 -13
  149. package/dist/types/utils/commander.d.ts +0 -4
  150. package/dist/types/utils/repeatKeyWarning.d.ts +0 -3
  151. package/jest.config.js +0 -7
  152. package/tsconfig.json +0 -11
@@ -1,13 +0,0 @@
1
- export declare type SSGRouteOptions = string | {
2
- url: string;
3
- output?: string;
4
- params?: Record<string, any>[];
5
- headers?: Record<string, any>;
6
- };
7
- export declare type SSGSingleEntryOptions = boolean | {
8
- preventDefault?: string[];
9
- headers?: Record<string, any>;
10
- routes?: SSGRouteOptions[];
11
- };
12
- export declare type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
13
- export declare type SSGConfig = boolean | SSGSingleEntryOptions | SSGMultiEntryOptions | ((entryName: string) => SSGSingleEntryOptions);
@@ -1,15 +0,0 @@
1
- import type { Config as JestConfigTypes } from '@jest/types';
2
- export declare type JestConfig = JestConfigTypes.InitialOptions;
3
- export interface TestConfig {
4
- /**
5
- * Decide which transformer will be used to compile file
6
- * Default: babel-jest
7
- */
8
- transformer?: 'babel-jest' | 'ts-jest';
9
- /**
10
- * Original jest config
11
- * Doc: https://jestjs.io/docs/configuration
12
- */
13
-
14
- jest?: JestConfig | ((jestConfig: JestConfig) => JestConfig);
15
- }
@@ -1,28 +0,0 @@
1
- export declare type UnbundleConfig = {
2
- /**
3
- * Some package A may require another package B that is intended for Node.js
4
- * use only. In such a case, if package B cannot be converted to ESM, it will
5
- * cause package A to fail during unbundle development, even though package B
6
- * is not really required. Package B can thus be safely ignored via this option
7
- * to ensure transpilation of package A to ESM
8
- */
9
- ignore?: string | string[];
10
- /**
11
- * ignores cached esm modules and recompiles dependencies not available
12
- * from PDN host on dev start.
13
- * default: false
14
- */
15
-
16
- ignoreModuleCache?: boolean;
17
- /**
18
- * clears cache of downloaded esm modules (from PDN) on dev start.
19
- * default: false
20
- */
21
-
22
- clearPdnCache?: boolean;
23
- /**
24
- * modifies host to attempt to download esm modules from
25
- */
26
-
27
- pdnHost?: string;
28
- };
@@ -1,47 +0,0 @@
1
- import type { IAppContext } from '@modern-js/types';
2
- import { UserConfig } from './config';
3
- import { NormalizedConfig } from './config/mergeConfig';
4
- import type { LoadedPlugin } from './loadPlugins';
5
- export type { IAppContext };
6
- export declare const AppContext: import("@modern-js/plugin").Context<IAppContext>;
7
- export declare const ConfigContext: import("@modern-js/plugin").Context<UserConfig>;
8
- export declare const ResolvedConfigContext: import("@modern-js/plugin").Context<NormalizedConfig>;
9
- /**
10
- * Set app context.
11
- * @param value new app context. It will override previous app context.
12
- */
13
-
14
- export declare const setAppContext: (value: IAppContext) => void;
15
- /**
16
- * Get app context, including directories, plugins and some static infos.
17
- */
18
-
19
- export declare const useAppContext: () => IAppContext;
20
- /**
21
- * Get original content of user config.
22
- */
23
-
24
- export declare const useConfigContext: () => UserConfig;
25
- /**
26
- * Get normalized content of user config.
27
- */
28
-
29
- export declare const useResolvedConfigContext: () => NormalizedConfig;
30
- export declare const initAppContext: ({
31
- appDirectory,
32
- plugins,
33
- configFile,
34
- options,
35
- serverConfigFile
36
- }: {
37
- appDirectory: string;
38
- plugins: LoadedPlugin[];
39
- configFile: string | false;
40
- options?: {
41
- metaName?: string | undefined;
42
- srcDir?: string | undefined;
43
- distDir?: string | undefined;
44
- sharedDir?: string | undefined;
45
- } | undefined;
46
- serverConfigFile: string;
47
- }) => IAppContext;
@@ -1,64 +0,0 @@
1
- import { INTERNAL_PLUGINS } from '@modern-js/utils';
2
- import type { Hooks } from '@modern-js/types';
3
- import { ErrorObject } from 'ajv';
4
- import { TransformPlugin } from './loadPlugins';
5
- import { IAppContext, initAppContext } from './context';
6
- import type { NormalizedConfig } from './config/mergeConfig';
7
- export type { Hooks };
8
- export * from './config';
9
- export * from '@modern-js/plugin';
10
- export * from '@modern-js/plugin/node';
11
- export { manager, mountHook, usePlugins, createPlugin, registerHook } from './manager';
12
- export type { CliHooks, CliPlugin, CliHookCallbacks } from './manager';
13
- export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext } from './pluginAPI';
14
- export type { PluginAPI } from './pluginAPI';
15
- export type { NormalizedConfig, IAppContext };
16
- declare const initAppDir: (cwd?: string | undefined) => Promise<string>;
17
- export interface CoreOptions {
18
- configFile?: string;
19
- serverConfigFile?: string;
20
- packageJsonConfig?: string;
21
- plugins?: typeof INTERNAL_PLUGINS;
22
- transformPlugin?: TransformPlugin;
23
- onSchemaError?: (error: ErrorObject) => void;
24
- options?: {
25
- metaName?: string;
26
- srcDir?: string;
27
- distDir?: string;
28
- sharedDir?: string;
29
- };
30
- }
31
- export declare const mergeOptions: (options?: CoreOptions | undefined) => {
32
- configFile?: string | undefined;
33
- serverConfigFile: string;
34
- packageJsonConfig?: string | undefined;
35
- plugins?: {
36
- [name: string]: {
37
- cli?: string | undefined;
38
- server?: string | undefined;
39
- };
40
- } | undefined;
41
- transformPlugin?: TransformPlugin | undefined;
42
- onSchemaError?: ((error: ErrorObject) => void) | undefined;
43
- options?: {
44
- metaName?: string | undefined;
45
- srcDir?: string | undefined;
46
- distDir?: string | undefined;
47
- sharedDir?: string | undefined;
48
- } | undefined;
49
- };
50
- export declare const cli: {
51
- init: (argv?: string[], options?: CoreOptions | undefined) => Promise<{
52
- loadedConfig: import("./config").LoadedConfig;
53
- appContext: IAppContext;
54
- resolved: NormalizedConfig;
55
- }>;
56
- run: (argv: string[], options?: CoreOptions | undefined) => Promise<void>;
57
- restart: () => Promise<void>;
58
- };
59
- export { initAppDir, initAppContext };
60
- declare module '@modern-js/utils/compiled/commander' {
61
- interface Command {
62
- commandsMap: Map<string, Command>;
63
- }
64
- }
@@ -1,3 +0,0 @@
1
- import { LoadedConfig } from './config';
2
- import { HooksRunner } from './manager';
3
- export declare const initWatcher: (loaded: LoadedConfig, appDirectory: string, configDir: string | undefined, hooksRunner: HooksRunner, argv: string[]) => Promise<import("@modern-js/utils").FSWatcher | undefined>;
@@ -1 +0,0 @@
1
- export declare const loadEnv: (appDirectory: string, mode?: string) => void;
@@ -1,44 +0,0 @@
1
- import { INTERNAL_PLUGINS } from '@modern-js/utils';
2
- import type { UserConfig } from './config';
3
- import { CliPlugin } from './manager';
4
- declare type PluginItem = string | [string, any];
5
- export declare type LoadedPlugin = {
6
- cli?: CliPlugin;
7
- server?: string;
8
- serverPkg?: string;
9
- };
10
- export declare type TransformPlugin = (plugin: PluginConfig, resolvedConfig: UserConfig, pluginOptions?: any) => PluginConfig;
11
- /**
12
- * @deprecated
13
- * Using NewPluginConfig insteand.
14
- */
15
-
16
- declare type OldPluginConfig = Array<PluginItem | {
17
- cli?: PluginItem;
18
- server?: PluginItem;
19
- }>;
20
- declare type NewPluginConfig = CliPlugin[] | {
21
- cli?: CliPlugin[];
22
- /** Custom server plugin is not supported yet. */
23
-
24
- server?: never;
25
- };
26
- export declare type PluginConfig = OldPluginConfig | NewPluginConfig;
27
- export declare function getAppPlugins(appDirectory: string, oldPluginConfig: OldPluginConfig, internalPlugins?: typeof INTERNAL_PLUGINS): (PluginItem | {
28
- cli?: PluginItem | undefined;
29
- server?: PluginItem | undefined;
30
- })[];
31
- /**
32
- * Load internal plugins which in @modern-js scope and user's custom plugins.
33
- * @param appDirectory - Application root directory.
34
- * @param userConfig - Resolved user config.
35
- * @param options.internalPlugins - Internal plugins.
36
- * @param options.transformPlugin - transform plugin before using it. Used for compatible with legacy jupiter plugins.
37
- * @returns Plugin Objects has been required.
38
- */
39
-
40
- export declare const loadPlugins: (appDirectory: string, userConfig: UserConfig, options?: {
41
- internalPlugins?: typeof INTERNAL_PLUGINS;
42
- transformPlugin?: TransformPlugin;
43
- }) => LoadedPlugin[];
44
- export {};
@@ -1,75 +0,0 @@
1
- import { ToThreads, ToRunners, AsyncSetup, PluginOptions, AsyncWorkflow, AsyncWaterfall, ParallelWorkflow } from '@modern-js/plugin';
2
- import type { Hooks } from '@modern-js/types';
3
- import type { Command } from './utils/commander';
4
- import type { NormalizedConfig } from './config/mergeConfig';
5
- import type { UserConfig } from './config';
6
- import { pluginAPI } from './pluginAPI';
7
- export declare type HooksRunner = ToRunners<{
8
- config: ParallelWorkflow<void, UserConfig>;
9
- resolvedConfig: AsyncWaterfall<{
10
- resolved: NormalizedConfig;
11
- }>;
12
- validateSchema: ParallelWorkflow<void>;
13
- prepare: AsyncWorkflow<void, void>;
14
- commands: AsyncWorkflow<{
15
- program: Command;
16
- }, void>;
17
- watchFiles: ParallelWorkflow<void>;
18
- fileChange: AsyncWorkflow<{
19
- filename: string;
20
- eventType: 'add' | 'change' | 'unlink';
21
- }, void>;
22
- beforeExit: AsyncWorkflow<void, void>;
23
- beforeRestart: AsyncWorkflow<void, void>;
24
- }>;
25
- declare const baseHooks: {
26
- config: ParallelWorkflow<void, UserConfig>;
27
- resolvedConfig: AsyncWaterfall<{
28
- resolved: NormalizedConfig;
29
- }>;
30
- validateSchema: ParallelWorkflow<void, unknown>;
31
- prepare: AsyncWorkflow<void, void>;
32
- commands: AsyncWorkflow<{
33
- program: Command;
34
- }, void>;
35
- watchFiles: ParallelWorkflow<void, unknown>;
36
- fileChange: AsyncWorkflow<{
37
- filename: string;
38
- eventType: 'add' | 'change' | 'unlink';
39
- }, void>;
40
- beforeExit: AsyncWorkflow<void, void>;
41
- beforeRestart: AsyncWorkflow<void, void>;
42
- };
43
- /** All hooks of cli plugin. */
44
-
45
- export declare type CliHooks = typeof baseHooks & Hooks;
46
- /** All hook callbacks of cli plugin. */
47
-
48
- export declare type CliHookCallbacks = ToThreads<CliHooks>;
49
- export declare const manager: import("@modern-js/plugin").AsyncManager<CliHooks, {
50
- setAppContext: (value: import("@modern-js/types").IAppContext) => void;
51
- useAppContext: () => import("@modern-js/types").IAppContext;
52
- useConfigContext: () => UserConfig;
53
- useResolvedConfigContext: () => NormalizedConfig;
54
- }>;
55
- /** Plugin options of a cli plugin. */
56
-
57
- export declare type CliPlugin = PluginOptions<CliHooks, AsyncSetup<CliHooks, typeof pluginAPI>>;
58
- export declare const createPlugin: (setup?: AsyncSetup<CliHooks, {
59
- setAppContext: (value: import("@modern-js/types").IAppContext) => void;
60
- useAppContext: () => import("@modern-js/types").IAppContext;
61
- useConfigContext: () => UserConfig;
62
- useResolvedConfigContext: () => NormalizedConfig;
63
- }> | undefined, options?: PluginOptions<CliHooks, AsyncSetup<CliHooks, {
64
- setAppContext: (value: import("@modern-js/types").IAppContext) => void;
65
- useAppContext: () => import("@modern-js/types").IAppContext;
66
- useConfigContext: () => UserConfig;
67
- useResolvedConfigContext: () => NormalizedConfig;
68
- }>> | undefined) => import("@modern-js/plugin").AsyncPlugin<CliHooks, {
69
- setAppContext: (value: import("@modern-js/types").IAppContext) => void;
70
- useAppContext: () => import("@modern-js/types").IAppContext;
71
- useConfigContext: () => UserConfig;
72
- useResolvedConfigContext: () => NormalizedConfig;
73
- }>, registerHook: (newHooks: Partial<CliHooks>) => void, mountHook: () => ToRunners<CliHooks>;
74
- export declare const usePlugins: (plugins: string[]) => void;
75
- export {};
@@ -1,13 +0,0 @@
1
- import type { CommonAPI } from '@modern-js/plugin';
2
- import type { CliHooks } from './manager';
3
- import { AppContext, ConfigContext, useAppContext, useConfigContext, ResolvedConfigContext, useResolvedConfigContext } from './context';
4
- export declare const pluginAPI: {
5
- setAppContext: (value: import("@modern-js/types/cli").IAppContext) => void;
6
- useAppContext: () => import("@modern-js/types/cli").IAppContext;
7
- useConfigContext: () => import("./config").UserConfig;
8
- useResolvedConfigContext: () => import(".").NormalizedConfig;
9
- };
10
- /** all apis for cli plugin */
11
-
12
- export declare type PluginAPI = typeof pluginAPI & CommonAPI<CliHooks>;
13
- export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext };
@@ -1,4 +0,0 @@
1
- import { program, Command } from '@modern-js/utils';
2
- export declare function initCommandsMap(): void;
3
- export type { Command };
4
- export { program };
@@ -1,3 +0,0 @@
1
- import { UserConfig } from '../config';
2
- export declare const deepGet: (obj: any, key: string) => any;
3
- export declare const repeatKeyWarning: (schema: any, jsConfig: UserConfig, pkgConfig: UserConfig) => void;
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": true,
5
- "outDir": "./dist",
6
- "baseUrl": "./",
7
- "isolatedModules": true,
8
- "esModuleInterop": true
9
- },
10
- "include": ["src"]
11
- }