@modern-js/module-tools 2.40.0 → 2.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.d.ts +1 -1
- package/dist/build.js +6 -4
- package/dist/builder/build.d.ts +7 -7
- package/dist/builder/build.js +3 -1
- package/dist/builder/clear.d.ts +1 -2
- package/dist/builder/clear.js +2 -8
- package/dist/builder/copy.d.ts +9 -9
- package/dist/builder/dts/index.d.ts +1 -1
- package/dist/builder/dts/rollup.d.ts +1 -13
- package/dist/builder/dts/tsc.d.ts +1 -1
- package/dist/builder/dts/tsc.js +20 -15
- package/dist/builder/esbuild/adapter.d.ts +1 -1
- package/dist/builder/esbuild/hook.d.ts +1 -1
- package/dist/builder/esbuild/index.d.ts +28 -28
- package/dist/builder/esbuild/resolve.d.ts +9 -9
- package/dist/builder/esbuild/sourcemap.d.ts +14 -14
- package/dist/builder/esbuild/transform.d.ts +4 -4
- package/dist/builder/esbuild/watch.d.ts +1 -1
- package/dist/builder/esbuild/write-file.d.ts +1 -1
- package/dist/builder/feature/asset.d.ts +5 -5
- package/dist/builder/feature/format-cjs.d.ts +3 -3
- package/dist/builder/feature/index.d.ts +1 -1
- package/dist/builder/feature/json.d.ts +3 -3
- package/dist/builder/feature/redirect.d.ts +3 -3
- package/dist/builder/feature/style/index.d.ts +3 -3
- package/dist/builder/feature/style/lessAliasPlugin.d.ts +7 -7
- package/dist/builder/feature/style/lessAliasPlugin.js +3 -2
- package/dist/builder/feature/style/lessRender.d.ts +1 -1
- package/dist/builder/feature/style/postcssTransformer.d.ts +3 -3
- package/dist/builder/feature/style/postcssUrlPlugin.d.ts +3 -3
- package/dist/builder/feature/style/sassRender.d.ts +1 -1
- package/dist/builder/feature/style/transformStyle.d.ts +7 -7
- package/dist/builder/feature/style/utils.d.ts +3 -3
- package/dist/builder/feature/swc.d.ts +5 -5
- package/dist/builder/feature/terser.d.ts +3 -3
- package/dist/builder/index.d.ts +4 -4
- package/dist/builder/index.js +5 -6
- package/dist/builder/platform.d.ts +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/command.d.ts +1 -1
- package/dist/config/defineConfig.d.ts +1 -1
- package/dist/config/merge.d.ts +4 -4
- package/dist/config/normalize.d.ts +5 -6
- package/dist/config/normalize.js +2 -2
- package/dist/config/transformLegacyConfig.d.ts +1 -1
- package/dist/config/valid.d.ts +1 -1
- package/dist/constants/build.d.ts +1 -1
- package/dist/constants/color.d.ts +1 -1
- package/dist/constants/dts.d.ts +0 -1
- package/dist/constants/dts.js +0 -3
- package/dist/constants/file.d.ts +1 -1
- package/dist/constants/legacy-preset.d.ts +11 -11
- package/dist/constants/loader.d.ts +1 -1
- package/dist/constants/log.d.ts +1 -1
- package/dist/constants/preset.d.ts +5 -5
- package/dist/debug.d.ts +1 -1
- package/dist/dev.d.ts +1 -1
- package/dist/error.d.ts +19 -19
- package/dist/hooks/build.d.ts +17 -17
- package/dist/hooks/dev.d.ts +11 -11
- package/dist/hooks/index.d.ts +29 -28
- package/dist/hooks/misc.d.ts +12 -7
- package/dist/hooks/misc.js +4 -0
- package/dist/index.d.ts +1 -1
- package/dist/locale/en.d.ts +40 -40
- package/dist/locale/index.d.ts +79 -79
- package/dist/locale/zh.d.ts +40 -40
- package/dist/plugins.d.ts +1 -1
- package/dist/types/color.d.ts +1 -1
- package/dist/types/command.d.ts +9 -9
- package/dist/types/config/copy.d.ts +10 -10
- package/dist/types/config/dev.d.ts +4 -4
- package/dist/types/config/index.d.ts +106 -106
- package/dist/types/config/style.d.ts +37 -37
- package/dist/types/context.d.ts +4 -4
- package/dist/types/dts.d.ts +39 -38
- package/dist/types/esbuild.d.ts +77 -77
- package/dist/types/hooks.d.ts +14 -14
- package/dist/types/index.d.ts +7 -7
- package/dist/types/legacyConfig/index.d.ts +8 -8
- package/dist/types/legacyConfig/output.d.ts +44 -44
- package/dist/types/legacyConfig/source.d.ts +10 -10
- package/dist/types/legacyConfig/tools.d.ts +39 -39
- package/dist/utils/assert.d.ts +1 -1
- package/dist/utils/builder.d.ts +9 -9
- package/dist/utils/common.d.ts +1 -1
- package/dist/utils/dts.d.ts +4 -34
- package/dist/utils/dts.js +71 -93
- package/dist/utils/hash.d.ts +1 -1
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/index.js +0 -2
- package/dist/utils/input.d.ts +5 -8
- package/dist/utils/log.d.ts +1 -1
- package/dist/utils/map.d.ts +5 -5
- package/dist/utils/onExit.d.ts +1 -1
- package/dist/utils/outExtension.d.ts +6 -6
- package/dist/utils/print.d.ts +3 -3
- package/dist/utils/style.d.ts +7 -7
- package/lib/types.d.ts +0 -1
- package/package.json +18 -24
- package/dist/utils/tspath.d.ts +0 -15
- package/dist/utils/tspath.js +0 -114
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import { ModuleContext } from '../types/context';
|
|
3
3
|
import { BuildCommandOptions, ModuleTools } from '../types';
|
|
4
|
-
export declare const buildPlatform: (options: BuildCommandOptions, api: PluginAPI<ModuleTools>, context: ModuleContext) => Promise<void>;
|
|
4
|
+
export declare const buildPlatform: (options: BuildCommandOptions, api: PluginAPI<ModuleTools>, context: ModuleContext) => Promise<void>;
|
package/dist/cli.d.ts
CHANGED
package/dist/command.d.ts
CHANGED
|
@@ -4,4 +4,4 @@ import type { ModuleTools } from './types';
|
|
|
4
4
|
export declare const buildCommand: (program: Command, api: PluginAPI<ModuleTools>) => Promise<void>;
|
|
5
5
|
export declare const devCommand: (program: Command, api: PluginAPI<ModuleTools>) => Promise<void>;
|
|
6
6
|
export declare const newCommand: (program: Command) => Promise<void>;
|
|
7
|
-
export declare const upgradeCommand: (program: Command) => Promise<void>;
|
|
7
|
+
export declare const upgradeCommand: (program: Command) => Promise<void>;
|
|
@@ -5,4 +5,4 @@ export declare const defineConfig: (config: UserConfigExport<ModuleConfigParams>
|
|
|
5
5
|
* @deprecated
|
|
6
6
|
* Using defineConfig first.
|
|
7
7
|
*/
|
|
8
|
-
export declare const defineLegacyConfig: (config: ModuleLegacyUserConfig) => ModuleLegacyUserConfig;
|
|
8
|
+
export declare const defineLegacyConfig: (config: ModuleLegacyUserConfig) => ModuleLegacyUserConfig;
|
package/dist/config/merge.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ModuleContext } from '../types';
|
|
2
2
|
import type { BaseBuildConfig, PartialBaseBuildConfig, ModuleLegacyUserConfig, BuildCommandOptions } from '../types';
|
|
3
3
|
export declare const mergeDefaultBaseConfig: (pConfig: PartialBaseBuildConfig, options: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
context: ModuleContext;
|
|
5
|
+
buildCmdOptions: BuildCommandOptions;
|
|
6
6
|
}) => Promise<BaseBuildConfig>;
|
|
7
7
|
export declare const isLegacyUserConfig: (config: {
|
|
8
|
-
|
|
9
|
-
}) => config is ModuleLegacyUserConfig;
|
|
8
|
+
legacy?: boolean;
|
|
9
|
+
}) => config is ModuleLegacyUserConfig;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { BaseBuildConfig, BuildPreset, PartialBuildConfig, PartialBaseBuildConfig, ModuleContext, BuildCommandOptions, ModuleTools } from '../types';
|
|
1
|
+
import type { ModuleUserConfig, BaseBuildConfig, BuildPreset, PartialBuildConfig, PartialBaseBuildConfig, ModuleContext, BuildCommandOptions } from '../types';
|
|
3
2
|
export declare const presetToConfig: (preset?: BuildPreset) => Promise<PartialBaseBuildConfig[] | undefined>;
|
|
4
3
|
export declare const mergeConfig: (low?: PartialBaseBuildConfig[], high?: PartialBuildConfig) => PartialBaseBuildConfig[];
|
|
5
|
-
export declare const normalizeBuildConfig: (
|
|
4
|
+
export declare const normalizeBuildConfig: (resolvedConfig: ModuleUserConfig, context: ModuleContext, buildCmdOptions: BuildCommandOptions) => Promise<BaseBuildConfig[]>;
|
|
6
5
|
export declare const transformToAbsPath: (baseConfig: BaseBuildConfig, options: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}) => Promise<BaseBuildConfig>;
|
|
6
|
+
context: ModuleContext;
|
|
7
|
+
buildCmdOptions: BuildCommandOptions;
|
|
8
|
+
}) => Promise<BaseBuildConfig>;
|
package/dist/config/normalize.js
CHANGED
|
@@ -74,8 +74,8 @@ const mergeConfig = (low, high = {}) => {
|
|
|
74
74
|
return import_lodash.default.merge(config, high);
|
|
75
75
|
});
|
|
76
76
|
};
|
|
77
|
-
const normalizeBuildConfig = async (
|
|
78
|
-
let config =
|
|
77
|
+
const normalizeBuildConfig = async (resolvedConfig, context, buildCmdOptions) => {
|
|
78
|
+
let config = resolvedConfig;
|
|
79
79
|
if ((0, import_merge.isLegacyUserConfig)(config)) {
|
|
80
80
|
const { createUserConfigFromLegacy } = await Promise.resolve().then(() => __toESM(require("./transformLegacyConfig")));
|
|
81
81
|
config = await createUserConfigFromLegacy(config);
|
|
@@ -22,4 +22,4 @@ export declare const createConfigByBuildPreset: (legacyUserConfig: Readonly<Modu
|
|
|
22
22
|
export declare const createConfigByPackageFields: (legacyUserConfig: Readonly<ModuleToolsLegacyUserConfig>) => Promise<ModuleUserConfig>;
|
|
23
23
|
export declare const createConfigByPackageMode: (legacyUserConfig: Readonly<ModuleToolsLegacyUserConfig>) => Promise<ModuleUserConfig>;
|
|
24
24
|
export declare const createConfigByDefault: (legacyUserConfig: Readonly<ModuleToolsLegacyUserConfig>) => Promise<ModuleUserConfig>;
|
|
25
|
-
export declare const createUserConfigFromLegacy: (config: Readonly<ModuleToolsLegacyUserConfig>) => Promise<ModuleUserConfig>;
|
|
25
|
+
export declare const createUserConfigFromLegacy: (config: Readonly<ModuleToolsLegacyUserConfig>) => Promise<ModuleUserConfig>;
|
package/dist/config/valid.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { PartialBuildConfig, PartialBaseBuildConfig } from '../types';
|
|
2
2
|
export declare const validPartialBuildConfig: (config: PartialBuildConfig, appDirectory: string) => void;
|
|
3
|
-
export declare const validBuildConfig: (config: PartialBaseBuildConfig, appDirectory: string) => void;
|
|
3
|
+
export declare const validBuildConfig: (config: PartialBaseBuildConfig, appDirectory: string) => void;
|
package/dist/constants/dts.d.ts
CHANGED
package/dist/constants/dts.js
CHANGED
|
@@ -19,7 +19,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var dts_exports = {};
|
|
20
20
|
__export(dts_exports, {
|
|
21
21
|
defaultTransformedFunctions: () => defaultTransformedFunctions,
|
|
22
|
-
dtsTempDirectory: () => dtsTempDirectory,
|
|
23
22
|
watchDoneText: () => watchDoneText
|
|
24
23
|
});
|
|
25
24
|
module.exports = __toCommonJS(dts_exports);
|
|
@@ -41,10 +40,8 @@ const defaultTransformedFunctions = [
|
|
|
41
40
|
"require.requireMock"
|
|
42
41
|
];
|
|
43
42
|
const watchDoneText = "Watching for file changes";
|
|
44
|
-
const dtsTempDirectory = "node_modules/.dts-temp";
|
|
45
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
46
44
|
0 && (module.exports = {
|
|
47
45
|
defaultTransformedFunctions,
|
|
48
|
-
dtsTempDirectory,
|
|
49
46
|
watchDoneText
|
|
50
47
|
});
|
package/dist/constants/file.d.ts
CHANGED
|
@@ -5,14 +5,14 @@ export declare const browserJsPreset: PartialBuildConfig;
|
|
|
5
5
|
export declare const browserJsLitePreset: PartialBuildConfig;
|
|
6
6
|
export declare const nodeJsPreset: PartialBuildConfig;
|
|
7
7
|
export declare const legacyPresets: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
};
|
|
8
|
+
'universal-js': import("../types").PartialBaseBuildConfig[];
|
|
9
|
+
UNIVERSAL_JS: import("../types").PartialBaseBuildConfig[];
|
|
10
|
+
'universal-js-lite': import("../types").PartialBaseBuildConfig[];
|
|
11
|
+
UNIVERSAL_JS_LITE: import("../types").PartialBaseBuildConfig[];
|
|
12
|
+
'browser-js': import("../types").PartialBaseBuildConfig[];
|
|
13
|
+
BROWSER_JS: import("../types").PartialBaseBuildConfig[];
|
|
14
|
+
'browser-js-lite': import("../types").PartialBaseBuildConfig[];
|
|
15
|
+
BROWSER_JS_LITE: import("../types").PartialBaseBuildConfig[];
|
|
16
|
+
'node-js': import("../types").PartialBaseBuildConfig[];
|
|
17
|
+
NODE_JS: import("../types").PartialBaseBuildConfig[];
|
|
18
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Loader } from 'esbuild';
|
|
2
|
-
export declare const loaderMap: Record<string, Loader>;
|
|
2
|
+
export declare const loaderMap: Record<string, Loader>;
|
package/dist/constants/log.d.ts
CHANGED
|
@@ -5,22 +5,22 @@ export declare const npmLibraryWithUmdPresetConfig: PartialBaseBuildConfig[];
|
|
|
5
5
|
export declare const npmComponentPresetConfig: PartialBaseBuildConfig[];
|
|
6
6
|
export declare const npmComponentWithUmdPresetConfig: PartialBaseBuildConfig[];
|
|
7
7
|
export declare const libraryPreset: {
|
|
8
|
-
|
|
8
|
+
'npm-library': PartialBaseBuildConfig[];
|
|
9
9
|
};
|
|
10
10
|
export declare const libraryPresetWithTarget: Record<"npm-library-es6" | "npm-library-esnext" | "npm-library-es5" | "npm-library-es2015" | "npm-library-es2016" | "npm-library-es2017" | "npm-library-es2018" | "npm-library-es2019" | "npm-library-es2020" | "npm-library-es2021" | "npm-library-es2022", PartialBaseBuildConfig[]>;
|
|
11
11
|
export declare const libraryUmdPreset: {
|
|
12
|
-
|
|
12
|
+
'npm-library-with-umd': PartialBaseBuildConfig[];
|
|
13
13
|
};
|
|
14
14
|
export declare const libraryUmdPresetWithTarget: Record<"npm-library-with-umd-es6" | "npm-library-with-umd-esnext" | "npm-library-with-umd-es5" | "npm-library-with-umd-es2015" | "npm-library-with-umd-es2016" | "npm-library-with-umd-es2017" | "npm-library-with-umd-es2018" | "npm-library-with-umd-es2019" | "npm-library-with-umd-es2020" | "npm-library-with-umd-es2021" | "npm-library-with-umd-es2022", PartialBaseBuildConfig[]>;
|
|
15
15
|
export declare const componentPreset: {
|
|
16
|
-
|
|
16
|
+
'npm-component': PartialBaseBuildConfig[];
|
|
17
17
|
};
|
|
18
18
|
export declare const componentPresetWithTarget: Record<"npm-component-es6" | "npm-component-esnext" | "npm-component-es5" | "npm-component-es2015" | "npm-component-es2016" | "npm-component-es2017" | "npm-component-es2018" | "npm-component-es2019" | "npm-component-es2020" | "npm-component-es2021" | "npm-component-es2022", PartialBaseBuildConfig[]>;
|
|
19
19
|
export declare const componentUmdPreset: {
|
|
20
|
-
|
|
20
|
+
'npm-component-with-umd': PartialBaseBuildConfig[];
|
|
21
21
|
};
|
|
22
22
|
export declare const componentUmdPresetWithTarget: Record<"npm-component-with-umd-es6" | "npm-component-with-umd-esnext" | "npm-component-with-umd-es5" | "npm-component-with-umd-es2015" | "npm-component-with-umd-es2016" | "npm-component-with-umd-es2017" | "npm-component-with-umd-es2018" | "npm-component-with-umd-es2019" | "npm-component-with-umd-es2020" | "npm-component-with-umd-es2021" | "npm-component-with-umd-es2022", PartialBaseBuildConfig[]>;
|
|
23
23
|
export declare const nodeBuildConfig: PartialBaseBuildConfig[];
|
|
24
24
|
export declare const universalBuildConfig: PartialBaseBuildConfig[];
|
|
25
25
|
export declare const presetList: Record<string, PartialBaseBuildConfig[]>;
|
|
26
|
-
export declare const internalPreset: Record<string, PartialBaseBuildConfig[]>;
|
|
26
|
+
export declare const internalPreset: Record<string, PartialBaseBuildConfig[]>;
|
package/dist/debug.d.ts
CHANGED
package/dist/dev.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import type { DevCommandOptions } from './types/command';
|
|
|
3
3
|
import type { ModuleContext } from './types/context';
|
|
4
4
|
import type { DevToolData, ModuleTools } from './types';
|
|
5
5
|
export declare const showMenu: (metas: DevToolData[], devCmdOptions: DevCommandOptions, api: PluginAPI<ModuleTools>, context: ModuleContext) => Promise<void>;
|
|
6
|
-
export declare const dev: (options: DevCommandOptions, metas: DevToolData[], api: PluginAPI<ModuleTools>, context: ModuleContext) => Promise<void>;
|
|
6
|
+
export declare const dev: (options: DevCommandOptions, metas: DevToolData[], api: PluginAPI<ModuleTools>, context: ModuleContext) => Promise<void>;
|
package/dist/error.d.ts
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
import type { ExecaError } from '@modern-js/utils';
|
|
2
2
|
import type { BuildType, Format, Target } from './types';
|
|
3
3
|
export declare const padSpaceWith: (str: string, targetL: number, opts?: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
endStr?: string | undefined;
|
|
5
|
+
style?: ((s: string) => string) | undefined;
|
|
6
6
|
}) => string;
|
|
7
7
|
export declare class InternalBuildError extends Error {
|
|
8
|
-
buildType: BuildType;
|
|
9
|
-
target: Target;
|
|
10
|
-
format: Format;
|
|
11
|
-
private e;
|
|
12
|
-
constructor(e: Error, opts: {
|
|
13
8
|
buildType: BuildType;
|
|
14
|
-
format: Format;
|
|
15
9
|
target: Target;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
format: Format;
|
|
11
|
+
private e;
|
|
12
|
+
constructor(e: Error, opts: {
|
|
13
|
+
buildType: BuildType;
|
|
14
|
+
format: Format;
|
|
15
|
+
target: Target;
|
|
16
|
+
});
|
|
17
|
+
toString(): string;
|
|
18
|
+
formatError(): string[];
|
|
19
19
|
}
|
|
20
20
|
export declare class InternalDTSError extends Error {
|
|
21
|
-
buildType: BuildType;
|
|
22
|
-
private e;
|
|
23
|
-
constructor(e: Error | ExecaError, opts: {
|
|
24
21
|
buildType: BuildType;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
private e;
|
|
23
|
+
constructor(e: Error | ExecaError, opts: {
|
|
24
|
+
buildType: BuildType;
|
|
25
|
+
});
|
|
26
|
+
toString(): string;
|
|
27
|
+
formatError(): string[];
|
|
28
28
|
}
|
|
29
29
|
export declare class ModuleBuildError extends Error {
|
|
30
|
-
|
|
30
|
+
constructor(e: InternalBuildError | InternalDTSError);
|
|
31
31
|
}
|
|
32
32
|
export declare const isInternalError: (e: unknown) => e is InternalBuildError | InternalDTSError;
|
|
33
|
-
export declare const isExecaError: (e: any) => e is ExecaError<string>;
|
|
33
|
+
export declare const isExecaError: (e: any) => e is ExecaError<string>;
|
package/dist/hooks/build.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { RegisterBuildPlatformResult } from '@modern-js/core';
|
|
2
2
|
import { BuildCommandOptions } from '../types';
|
|
3
|
-
import type { BuildTaskResult, BuildResult, BuildPlatformResult, WatchDtsHookContext, WatchJsHookContext,
|
|
3
|
+
import type { BuildTaskResult, BuildResult, BuildPlatformResult, WatchDtsHookContext, WatchJsHookContext, BaseBuildConfig } from '../types';
|
|
4
4
|
export declare const buildHooks: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
5
|
+
beforeBuild: import("@modern-js/plugin").ParallelWorkflow<{
|
|
6
|
+
config: BaseBuildConfig[];
|
|
7
|
+
cliOptions: BuildCommandOptions;
|
|
8
|
+
}, void>;
|
|
9
|
+
beforeBuildTask: import("@modern-js/plugin").AsyncWaterfall<BaseBuildConfig>;
|
|
10
|
+
afterBuildTask: import("@modern-js/plugin").ParallelWorkflow<BuildTaskResult, void>;
|
|
11
|
+
afterBuild: import("@modern-js/plugin").ParallelWorkflow<BuildResult, void>;
|
|
12
|
+
registerBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, RegisterBuildPlatformResult>;
|
|
13
|
+
beforeBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<RegisterBuildPlatformResult[], void>;
|
|
14
|
+
buildPlatform: import("@modern-js/plugin").ParallelWorkflow<{
|
|
15
|
+
platform: string;
|
|
16
|
+
}, void>;
|
|
17
|
+
afterBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<BuildPlatformResult, void>;
|
|
18
18
|
};
|
|
19
19
|
export declare const buildWatchHooks: {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
};
|
|
20
|
+
buildWatchJs: import("@modern-js/plugin").ParallelWorkflow<WatchJsHookContext, void>;
|
|
21
|
+
buildWatchDts: import("@modern-js/plugin").ParallelWorkflow<WatchDtsHookContext, void>;
|
|
22
|
+
};
|
package/dist/hooks/dev.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { DevToolData, PromptResult } from '../types/hooks';
|
|
2
2
|
export declare const devHooks: {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
3
|
+
registerDev: import("@modern-js/plugin").ParallelWorkflow<void, DevToolData>;
|
|
4
|
+
beforeDev: import("@modern-js/plugin").ParallelWorkflow<DevToolData[], void>;
|
|
5
|
+
beforeDevMenu: import("@modern-js/plugin").AsyncWaterfall<any>;
|
|
6
|
+
afterDevMenu: import("@modern-js/plugin").ParallelWorkflow<{
|
|
7
|
+
result: PromptResult;
|
|
8
|
+
devTools: DevToolData[];
|
|
9
|
+
}, void>;
|
|
10
|
+
beforeDevTask: import("@modern-js/plugin").ParallelWorkflow<DevToolData, void>;
|
|
11
|
+
afterDev: import("@modern-js/plugin").ParallelWorkflow<void, void>;
|
|
12
|
+
noDevTools: import("@modern-js/plugin").AsyncWaterfall<string>;
|
|
13
|
+
};
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
export declare const registerHook: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
2
|
+
buildWatchJs: import("@modern-js/plugin").ParallelWorkflow<import("..").WatchJsHookContext, void>;
|
|
3
|
+
buildWatchDts: import("@modern-js/plugin").ParallelWorkflow<import("..").WatchDtsHookContext, void>;
|
|
4
|
+
addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
|
|
5
|
+
resolveModuleUserConfig: import("@modern-js/plugin").AsyncWaterfall<import("..").ModuleUserConfig>;
|
|
6
|
+
modifyLibuild: import("@modern-js/plugin").AsyncPipeline<unknown, unknown>;
|
|
7
|
+
registerDev: import("@modern-js/plugin").ParallelWorkflow<void, import("..").DevToolData>;
|
|
8
|
+
beforeDev: import("@modern-js/plugin").ParallelWorkflow<import("..").DevToolData[], void>;
|
|
9
|
+
beforeDevMenu: import("@modern-js/plugin").AsyncWaterfall<any>;
|
|
10
|
+
afterDevMenu: import("@modern-js/plugin").ParallelWorkflow<{
|
|
11
|
+
result: import("..").PromptResult;
|
|
12
|
+
devTools: import("..").DevToolData[];
|
|
13
|
+
}, void>;
|
|
14
|
+
beforeDevTask: import("@modern-js/plugin").ParallelWorkflow<import("..").DevToolData, void>;
|
|
15
|
+
afterDev: import("@modern-js/plugin").ParallelWorkflow<void, void>;
|
|
16
|
+
noDevTools: import("@modern-js/plugin").AsyncWaterfall<string>;
|
|
17
|
+
beforeBuild: import("@modern-js/plugin").ParallelWorkflow<{
|
|
18
|
+
config: import("..").BaseBuildConfig[];
|
|
19
|
+
cliOptions: import("..").BuildCommandOptions;
|
|
20
|
+
}, void>;
|
|
21
|
+
beforeBuildTask: import("@modern-js/plugin").AsyncWaterfall<import("..").BaseBuildConfig>;
|
|
22
|
+
afterBuildTask: import("@modern-js/plugin").ParallelWorkflow<import("..").BuildTaskResult, void>;
|
|
23
|
+
afterBuild: import("@modern-js/plugin").ParallelWorkflow<import("..").BuildResult, void>;
|
|
24
|
+
registerBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<void, import("@modern-js/core").RegisterBuildPlatformResult>;
|
|
25
|
+
beforeBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<import("@modern-js/core").RegisterBuildPlatformResult[], void>;
|
|
26
|
+
buildPlatform: import("@modern-js/plugin").ParallelWorkflow<{
|
|
27
|
+
platform: string;
|
|
28
|
+
}, void>;
|
|
29
|
+
afterBuildPlatform: import("@modern-js/plugin").ParallelWorkflow<import("..").BuildPlatformResult, void>;
|
|
30
|
+
};
|
package/dist/hooks/misc.d.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { ModuleUserConfig } from '../types';
|
|
1
2
|
export declare const miscHooks: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
addRuntimeExports: import("@modern-js/plugin").AsyncWaterfall<void>;
|
|
4
|
+
/**
|
|
5
|
+
* Change user configuration
|
|
6
|
+
*/
|
|
7
|
+
resolveModuleUserConfig: import("@modern-js/plugin").AsyncWaterfall<ModuleUserConfig>;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated
|
|
10
|
+
* use buildConfig.hooks and buildConfig.esbuildOptions instead.
|
|
11
|
+
*/
|
|
12
|
+
modifyLibuild: import("@modern-js/plugin").AsyncPipeline<unknown, unknown>;
|
|
13
|
+
};
|
package/dist/hooks/misc.js
CHANGED
|
@@ -25,6 +25,10 @@ var import_plugin = require("@modern-js/plugin");
|
|
|
25
25
|
const miscHooks = {
|
|
26
26
|
addRuntimeExports: (0, import_plugin.createAsyncWaterfall)(),
|
|
27
27
|
/**
|
|
28
|
+
* Change user configuration
|
|
29
|
+
*/
|
|
30
|
+
resolveModuleUserConfig: (0, import_plugin.createAsyncWaterfall)(),
|
|
31
|
+
/**
|
|
28
32
|
* @deprecated
|
|
29
33
|
* use buildConfig.hooks and buildConfig.esbuildOptions instead.
|
|
30
34
|
*/
|
package/dist/index.d.ts
CHANGED
package/dist/locale/en.d.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
export declare const EN_LOCALE: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
command: {
|
|
3
|
+
shared: {
|
|
4
|
+
config: string;
|
|
5
|
+
noNeedInstall: string;
|
|
6
|
+
};
|
|
7
|
+
build: {
|
|
8
|
+
describe: string;
|
|
9
|
+
watch: string;
|
|
10
|
+
tsconfig: string;
|
|
11
|
+
styleOnly: string;
|
|
12
|
+
platform: string;
|
|
13
|
+
noTsc: string;
|
|
14
|
+
dts: string;
|
|
15
|
+
noClear: string;
|
|
16
|
+
};
|
|
17
|
+
dev: {
|
|
18
|
+
describe: string;
|
|
19
|
+
tsconfig: string;
|
|
20
|
+
};
|
|
21
|
+
new: {
|
|
22
|
+
describe: string;
|
|
23
|
+
debug: string;
|
|
24
|
+
config: string;
|
|
25
|
+
distTag: string;
|
|
26
|
+
registry: string;
|
|
27
|
+
lang: string;
|
|
28
|
+
};
|
|
6
29
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
platform: string;
|
|
13
|
-
noTsc: string;
|
|
14
|
-
dts: string;
|
|
15
|
-
noClear: string;
|
|
30
|
+
log: {
|
|
31
|
+
dev: {
|
|
32
|
+
noDevtools: string;
|
|
33
|
+
};
|
|
34
|
+
buildConfigTip: string;
|
|
16
35
|
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
tsconfig: string;
|
|
36
|
+
errors: {
|
|
37
|
+
externalHelpers: string;
|
|
20
38
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
registry: string;
|
|
27
|
-
lang: string;
|
|
39
|
+
warns: {
|
|
40
|
+
dts: {
|
|
41
|
+
abortOnError: string;
|
|
42
|
+
};
|
|
43
|
+
clearRootPath: string;
|
|
28
44
|
};
|
|
29
|
-
|
|
30
|
-
log: {
|
|
31
|
-
dev: {
|
|
32
|
-
noDevtools: string;
|
|
33
|
-
};
|
|
34
|
-
buildConfigTip: string;
|
|
35
|
-
};
|
|
36
|
-
errors: {
|
|
37
|
-
externalHelpers: string;
|
|
38
|
-
};
|
|
39
|
-
warns: {
|
|
40
|
-
dts: {
|
|
41
|
-
abortOnError: string;
|
|
42
|
-
};
|
|
43
|
-
clearRootPath: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
45
|
+
};
|