@modern-js/app-tools 2.41.0 → 2.42.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.
- package/dist/cjs/analyze/templates.js +7 -6
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +3 -1
- package/dist/cjs/config/default.js +2 -1
- package/dist/esm/analyze/templates.js +6 -6
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.js +6 -4
- package/dist/esm/config/default.js +2 -1
- package/dist/esm-node/analyze/templates.js +7 -6
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.js +3 -1
- package/dist/esm-node/config/default.js +2 -1
- package/dist/types/analyze/constants.d.ts +19 -19
- package/dist/types/analyze/generateCode.d.ts +9 -16
- package/dist/types/analyze/getBundleEntry.d.ts +1 -1
- package/dist/types/analyze/getClientRoutes/getRoutes.d.ts +7 -13
- package/dist/types/analyze/getClientRoutes/getRoutesLegacy.d.ts +7 -13
- package/dist/types/analyze/getClientRoutes/index.d.ts +1 -1
- package/dist/types/analyze/getClientRoutes/utils.d.ts +1 -1
- package/dist/types/analyze/getFileSystemEntry.d.ts +1 -1
- package/dist/types/analyze/getHtmlTemplate.d.ts +4 -7
- package/dist/types/analyze/getServerRoutes.d.ts +4 -7
- package/dist/types/analyze/index.d.ts +3 -5
- package/dist/types/analyze/isDefaultExportFunction.d.ts +1 -1
- package/dist/types/analyze/makeLegalIdentifier.d.ts +1 -1
- package/dist/types/analyze/nestedRoutes.d.ts +3 -3
- package/dist/types/analyze/templates.d.ts +22 -40
- package/dist/types/analyze/utils.d.ts +10 -19
- package/dist/types/builder/builder-rspack/adapterCopy.d.ts +1 -1
- package/dist/types/builder/builder-rspack/index.d.ts +1 -1
- package/dist/types/builder/builder-webpack/adapterModern.d.ts +1 -1
- package/dist/types/builder/builder-webpack/createCopyPattern.d.ts +20 -20
- package/dist/types/builder/builder-webpack/index.d.ts +1 -1
- package/dist/types/builder/generator/createBuilderOptions.d.ts +1 -1
- package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +1 -1
- package/dist/types/builder/generator/getBuilderTargets.d.ts +1 -1
- package/dist/types/builder/generator/index.d.ts +2 -2
- package/dist/types/builder/index.d.ts +1 -1
- package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +1 -1
- package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +1 -1
- package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +1 -1
- package/dist/types/builder/shared/builderPlugins/index.d.ts +1 -1
- package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +5 -5
- package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +7 -7
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +24 -31
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +1 -1
- package/dist/types/builder/shared/createCopyInfo.d.ts +4 -4
- package/dist/types/builder/shared/index.d.ts +1 -1
- package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +1 -1
- package/dist/types/builder/shared/types.d.ts +3 -3
- package/dist/types/commands/build.d.ts +1 -1
- package/dist/types/commands/deploy.d.ts +1 -1
- package/dist/types/commands/dev.d.ts +2 -2
- package/dist/types/commands/index.d.ts +1 -1
- package/dist/types/commands/inspect.d.ts +7 -7
- package/dist/types/commands/serve.d.ts +1 -1
- package/dist/types/config/default.d.ts +1 -1
- package/dist/types/config/index.d.ts +1 -1
- package/dist/types/config/initialize/index.d.ts +1 -1
- package/dist/types/config/initialize/inits.d.ts +1 -1
- package/dist/types/config/legacy/createHtmlConfig.d.ts +1 -1
- package/dist/types/config/legacy/createOutputConfig.d.ts +1 -1
- package/dist/types/config/legacy/createSourceConfig.d.ts +1 -1
- package/dist/types/config/legacy/createToolsConfig.d.ts +1 -1
- package/dist/types/config/legacy/index.d.ts +1 -1
- package/dist/types/defineConfig.d.ts +1 -1
- package/dist/types/exports/server.d.ts +1 -1
- package/dist/types/hooks.d.ts +1 -1
- package/dist/types/index.d.ts +6 -6
- package/dist/types/initialize/index.d.ts +3 -5
- package/dist/types/locale/en.d.ts +38 -38
- package/dist/types/locale/index.d.ts +75 -75
- package/dist/types/locale/zh.d.ts +38 -38
- package/dist/types/types/config/deploy.d.ts +21 -21
- package/dist/types/types/config/dev.d.ts +10 -10
- package/dist/types/types/config/experiments.d.ts +1 -1
- package/dist/types/types/config/html.d.ts +1 -1
- package/dist/types/types/config/index.d.ts +38 -38
- package/dist/types/types/config/output.d.ts +35 -28
- package/dist/types/types/config/performance.d.ts +1 -1
- package/dist/types/types/config/security.d.ts +1 -1
- package/dist/types/types/config/source.d.ts +52 -52
- package/dist/types/types/config/testing.d.ts +6 -6
- package/dist/types/types/config/tools.d.ts +26 -24
- package/dist/types/types/hooks.d.ts +75 -75
- package/dist/types/types/index.d.ts +17 -17
- package/dist/types/types/legacyConfig/deploy.d.ts +5 -5
- package/dist/types/types/legacyConfig/dev.d.ts +9 -9
- package/dist/types/types/legacyConfig/index.d.ts +16 -16
- package/dist/types/types/legacyConfig/output.d.ts +45 -45
- package/dist/types/types/legacyConfig/source.d.ts +22 -22
- package/dist/types/types/legacyConfig/testing.d.ts +6 -6
- package/dist/types/types/legacyConfig/tools.d.ts +10 -10
- package/dist/types/types/utils.d.ts +4 -4
- package/dist/types/utils/config.d.ts +7 -13
- package/dist/types/utils/createServer.d.ts +5 -5
- package/dist/types/utils/env.d.ts +1 -1
- package/dist/types/utils/generateWatchFiles.d.ts +1 -1
- package/dist/types/utils/getSelectedEntries.d.ts +1 -1
- package/dist/types/utils/getServerInternalPlugins.d.ts +1 -1
- package/dist/types/utils/printInstructions.d.ts +1 -1
- package/dist/types/utils/restart.d.ts +1 -1
- package/dist/types/utils/routes.d.ts +1 -1
- package/dist/types/utils/types.d.ts +13 -13
- package/package.json +24 -24
@@ -1,4 +1,4 @@
|
|
1
1
|
import { BuilderInstance } from '@modern-js/builder';
|
2
2
|
import { BuilderWebpackProvider } from '@modern-js/builder-webpack-provider';
|
3
3
|
import { BuilderOptions } from '../shared';
|
4
|
-
export declare function createWebpackBuilderForModern(options: BuilderOptions<'webpack'>): Promise<BuilderInstance<BuilderWebpackProvider>>;
|
4
|
+
export declare function createWebpackBuilderForModern(options: BuilderOptions<'webpack'>): Promise<BuilderInstance<BuilderWebpackProvider>>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { BuilderTarget, CreateBuilderOptions } from '@modern-js/builder-shared';
|
2
2
|
import type { IAppContext } from '@modern-js/core';
|
3
|
-
export declare function createBuilderOptions(target: BuilderTarget | BuilderTarget[], appContext: IAppContext): CreateBuilderOptions;
|
3
|
+
export declare function createBuilderOptions(target: BuilderTarget | BuilderTarget[], appContext: IAppContext): CreateBuilderOptions;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { Bundler, IAppContext, AppNormalizedConfig } from '../../types';
|
2
|
-
export declare function createBuilderProviderConfig<B extends Bundler>(resolveConfig: AppNormalizedConfig<B>, appContext: IAppContext): AppNormalizedConfig<B>;
|
2
|
+
export declare function createBuilderProviderConfig<B extends Bundler>(resolveConfig: AppNormalizedConfig<B>, appContext: IAppContext): AppNormalizedConfig<B>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { BuilderTarget } from '@modern-js/builder-shared';
|
2
2
|
import type { AppNormalizedConfig } from '../../types';
|
3
|
-
export declare function getBuilderTargets(normalizedConfig: AppNormalizedConfig<'shared'>): BuilderTarget[];
|
3
|
+
export declare function getBuilderTargets(normalizedConfig: AppNormalizedConfig<'shared'>): BuilderTarget[];
|
@@ -2,11 +2,11 @@ import type { BuilderProvider, BuilderInstance } from '@modern-js/builder-shared
|
|
2
2
|
import { BuilderOptions } from '../shared';
|
3
3
|
import { Bundler } from '../../types';
|
4
4
|
export type GenerateProvider = (c: {
|
5
|
-
|
5
|
+
builderConfig: any;
|
6
6
|
}) => BuilderProvider;
|
7
7
|
/**
|
8
8
|
* @param options BuilderOptions
|
9
9
|
* @param generateProvider GenerateProvider
|
10
10
|
* @returns BuilderInstance
|
11
11
|
*/
|
12
|
-
export declare function generateBuilder<B extends Bundler>(options: BuilderOptions<B>, generateProvider: GenerateProvider): Promise<BuilderInstance<BuilderProvider>>;
|
12
|
+
export declare function generateBuilder<B extends Bundler>(options: BuilderOptions<B>, generateProvider: GenerateProvider): Promise<BuilderInstance<BuilderProvider>>;
|
@@ -1 +1 @@
|
|
1
|
-
export declare function createBuilderGenerator(bundler: 'webpack' | 'rspack'): Promise<typeof import("./builder-rspack").createRspackBuilderForModern | typeof import("./builder-webpack").createWebpackBuilderForModern>;
|
1
|
+
export declare function createBuilderGenerator(bundler: 'webpack' | 'rspack'): Promise<typeof import("./builder-rspack").createRspackBuilderForModern | typeof import("./builder-webpack").createWebpackBuilderForModern>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import { BuilderPlugin } from '@modern-js/builder-shared';
|
2
2
|
import type { BuilderPluginAPI } from '../types';
|
3
|
-
export declare const builderPluginAdapterBasic: () => BuilderPlugin<BuilderPluginAPI>;
|
3
|
+
export declare const builderPluginAdapterBasic: () => BuilderPlugin<BuilderPluginAPI>;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { BuilderPlugin } from '@modern-js/builder-shared';
|
2
2
|
import { Bundler } from '../../../types';
|
3
3
|
import type { BuilderOptions, BuilderPluginAPI } from '../types';
|
4
|
-
export declare const builderPluginAdapterHtml: <B extends Bundler>(options: BuilderOptions<B>) => BuilderPlugin<BuilderPluginAPI>;
|
4
|
+
export declare const builderPluginAdapterHtml: <B extends Bundler>(options: BuilderOptions<B>) => BuilderPlugin<BuilderPluginAPI>;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { BuilderPlugin } from '@modern-js/builder-shared';
|
2
2
|
import type { Bundler } from '../../../types';
|
3
3
|
import type { BuilderOptions, BuilderPluginAPI } from '../types';
|
4
|
-
export declare const builderPluginAdapterSSR: <B extends Bundler>(options: BuilderOptions<B>) => BuilderPlugin<BuilderPluginAPI>;
|
4
|
+
export declare const builderPluginAdapterSSR: <B extends Bundler>(options: BuilderOptions<B>) => BuilderPlugin<BuilderPluginAPI>;
|
@@ -2,8 +2,8 @@ import type { webpack } from '@modern-js/builder-webpack-provider';
|
|
2
2
|
import type { Rspack } from '@modern-js/builder-rspack-provider';
|
3
3
|
import type HtmlWebpackPlugin from '@modern-js/builder-webpack-provider/html-webpack-plugin';
|
4
4
|
export declare class HtmlAsyncChunkPlugin {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
5
|
+
name: string;
|
6
|
+
htmlWebpackPlugin: typeof HtmlWebpackPlugin;
|
7
|
+
constructor(htmlWebpackPlugin: typeof HtmlWebpackPlugin);
|
8
|
+
apply(compiler: webpack.Compiler | Rspack.Compiler): void;
|
9
|
+
}
|
@@ -2,10 +2,10 @@ import type { webpack } from '@modern-js/builder-webpack-provider';
|
|
2
2
|
import type { Rspack } from '@modern-js/builder-rspack-provider';
|
3
3
|
import type HtmlWebpackPlugin from '@modern-js/builder-webpack-provider/html-webpack-plugin';
|
4
4
|
export declare class BottomTemplatePlugin {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}
|
5
|
+
htmlWebpackPlugin: typeof HtmlWebpackPlugin;
|
6
|
+
bottomTemplateReg: RegExp;
|
7
|
+
bodyRegExp: RegExp;
|
8
|
+
name: string;
|
9
|
+
constructor(htmlWebpackPlugin: typeof HtmlWebpackPlugin);
|
10
|
+
apply(compiler: Rspack.Compiler | webpack.Compiler): void;
|
11
|
+
}
|
@@ -3,40 +3,33 @@ import type { Rspack } from '@modern-js/builder-rspack-provider';
|
|
3
3
|
import type HtmlWebpackPlugin from '@modern-js/builder-webpack-provider/html-webpack-plugin';
|
4
4
|
import type { ScriptLoading } from '@modern-js/builder-shared';
|
5
5
|
export interface RouteAssets {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
[routeId: string]: {
|
7
|
+
chunkIds?: (string | number)[];
|
8
|
+
assets?: string[];
|
9
|
+
referenceCssAssets?: string[];
|
10
|
+
};
|
11
11
|
}
|
12
12
|
type Compiler = webpack.Compiler | Rspack.Compiler;
|
13
13
|
type Options = {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
14
|
+
HtmlBundlerPlugin: typeof HtmlWebpackPlugin;
|
15
|
+
staticJsDir: string;
|
16
|
+
enableInlineRouteManifests: boolean;
|
17
|
+
disableFilenameHash?: boolean;
|
18
|
+
scriptLoading?: ScriptLoading;
|
19
|
+
nonce?: string;
|
20
20
|
};
|
21
21
|
export declare class RouterPlugin {
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
scriptLoading,
|
35
|
-
nonce
|
36
|
-
}: Options);
|
37
|
-
private isTargetNodeOrWebWorker;
|
38
|
-
private getEntryChunks;
|
39
|
-
private getEntryChunkFiles;
|
40
|
-
apply(compiler: Compiler): void;
|
22
|
+
readonly name: string;
|
23
|
+
private HtmlBundlerPlugin;
|
24
|
+
private enableInlineRouteManifests;
|
25
|
+
private staticJsDir;
|
26
|
+
private disableFilenameHash?;
|
27
|
+
private scriptLoading?;
|
28
|
+
private nonce?;
|
29
|
+
constructor({ staticJsDir, HtmlBundlerPlugin, enableInlineRouteManifests, disableFilenameHash, scriptLoading, nonce, }: Options);
|
30
|
+
private isTargetNodeOrWebWorker;
|
31
|
+
private getEntryChunks;
|
32
|
+
private getEntryChunkFiles;
|
33
|
+
apply(compiler: Compiler): void;
|
41
34
|
}
|
42
|
-
export {};
|
35
|
+
export {};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { AppNormalizedConfig, IAppContext } from '../../types';
|
2
2
|
export declare function createCopyInfo(appContext: IAppContext, config: AppNormalizedConfig<'shared'>): {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
};
|
3
|
+
configDir: string;
|
4
|
+
uploadDir: string;
|
5
|
+
publicDir: string;
|
6
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { webpack } from '@modern-js/builder-webpack-provider';
|
2
2
|
import type { Rspack } from '@modern-js/builder-rspack-provider';
|
3
3
|
declare function loader(this: webpack.LoaderContext<void> | Rspack.LoaderContext): string;
|
4
|
-
export default loader;
|
4
|
+
export default loader;
|
@@ -4,9 +4,9 @@ import type { DefaultBuilderPluginAPI } from '@modern-js/builder-shared';
|
|
4
4
|
import type { Bundler, AppNormalizedConfig, IAppContext } from '../../types';
|
5
5
|
export { WebpackBuilderConfig, RspackBuilderConfig };
|
6
6
|
export type BuilderOptions<B extends Bundler> = {
|
7
|
-
|
8
|
-
|
7
|
+
normalizedConfig: AppNormalizedConfig<B>;
|
8
|
+
appContext: IAppContext;
|
9
9
|
};
|
10
10
|
export type BuilderConfig = RspackBuilderConfig | WebpackBuilderConfig;
|
11
11
|
export type BuilderNormalizedConfig = RspackNormalizedConfig | WebpackNormalizedConfig;
|
12
|
-
export type BuilderPluginAPI = DefaultBuilderPluginAPI<BuilderConfig, BuilderNormalizedConfig>;
|
12
|
+
export type BuilderPluginAPI = DefaultBuilderPluginAPI<BuilderConfig, BuilderNormalizedConfig>;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { PluginAPI } from '@modern-js/core';
|
2
2
|
import type { BuildOptions } from '../utils/types';
|
3
3
|
import type { AppTools } from '../types';
|
4
|
-
export declare const build: (api: PluginAPI<AppTools<'shared'>>, options?: BuildOptions) => Promise<void>;
|
4
|
+
export declare const build: (api: PluginAPI<AppTools<'shared'>>, options?: BuildOptions) => Promise<void>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { PluginAPI } from '@modern-js/core';
|
2
2
|
import type { AppTools } from '../types';
|
3
|
-
export declare const deploy: (api: PluginAPI<AppTools<'shared'>>, options: any) => Promise<void>;
|
3
|
+
export declare const deploy: (api: PluginAPI<AppTools<'shared'>>, options: any) => Promise<void>;
|
@@ -2,6 +2,6 @@ import { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import { DevOptions } from '../utils/types';
|
3
3
|
import type { AppTools } from '../types';
|
4
4
|
export interface ExtraServerOptions {
|
5
|
-
|
5
|
+
useSSRWorker?: boolean;
|
6
6
|
}
|
7
|
-
export declare const dev: (api: PluginAPI<AppTools<'shared'>>, options: DevOptions, devServerOptions?: ExtraServerOptions) => Promise<void>;
|
7
|
+
export declare const dev: (api: PluginAPI<AppTools<'shared'>>, options: DevOptions, devServerOptions?: ExtraServerOptions) => Promise<void>;
|
@@ -2,10 +2,10 @@ import type { PluginAPI } from '@modern-js/core';
|
|
2
2
|
import type { InspectOptions } from '../utils/types';
|
3
3
|
import type { AppTools } from '../types';
|
4
4
|
export declare const inspect: (api: PluginAPI<AppTools<'shared'>>, options: InspectOptions) => Promise<{
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
}>;
|
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 { IAppContext, AppUserConfig, AppLegacyUserConfig } from '../types';
|
2
2
|
export declare function createDefaultConfig(appContext: IAppContext, bundler: 'webpack' | 'rspack'): AppUserConfig<'webpack'> | AppUserConfig<'rspack'>;
|
3
|
-
export declare function createLegacyDefaultConfig(appContext: IAppContext): AppLegacyUserConfig;
|
3
|
+
export declare function createLegacyDefaultConfig(appContext: IAppContext): AppLegacyUserConfig;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { AppNormalizedConfig, IAppContext } from '../../types';
|
2
|
-
export declare function initialNormalizedConfig(config: AppNormalizedConfig<'shared'>, appContext: IAppContext, bundler: 'webpack' | 'rspack'): AppNormalizedConfig<'shared'>;
|
2
|
+
export declare function initialNormalizedConfig(config: AppNormalizedConfig<'shared'>, appContext: IAppContext, bundler: 'webpack' | 'rspack'): AppNormalizedConfig<'shared'>;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import { AppNormalizedConfig, IAppContext } from '../../types';
|
2
2
|
export declare function initHtmlConfig(config: AppNormalizedConfig<'shared'>, appContext: IAppContext): import("@modern-js/builder-shared").SharedHtmlConfig;
|
3
3
|
export declare function initSourceConfig(config: AppNormalizedConfig<'shared'>, appContext: IAppContext, bundler: 'webpack' | 'rspack'): void;
|
4
|
-
export declare function createBuilderModuleScope(config: AppNormalizedConfig<'webpack'>): (string | RegExp)[] | undefined;
|
4
|
+
export declare function createBuilderModuleScope(config: AppNormalizedConfig<'webpack'>): (string | RegExp)[] | undefined;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
|
2
|
-
export declare function createHtmlConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig<'webpack'>['html'];
|
2
|
+
export declare function createHtmlConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig<'webpack'>['html'];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
|
2
|
-
export declare function createOutputConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig<'webpack'>['output'];
|
2
|
+
export declare function createOutputConfig(config: Readonly<AppLegacyNormalizedConfig>): AppNormalizedConfig<'webpack'>['output'];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
|
2
|
-
export declare function createSourceConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig<'webpack'>['source'];
|
2
|
+
export declare function createSourceConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig<'webpack'>['source'];
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AppLegacyNormalizedConfig, AppNormalizedConfig } from '../../types';
|
2
|
-
export declare function createToolsConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig<'webpack'>['tools'];
|
2
|
+
export declare function createToolsConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig<'webpack'>['tools'];
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { AppLegacyNormalizedConfig, AppLegacyUserConfig, AppNormalizedConfig, AppUserConfig } from '../../types';
|
2
2
|
export declare function transformNormalizedConfig(config: AppLegacyNormalizedConfig): AppNormalizedConfig<'webpack'>;
|
3
|
-
export declare function checkIsLegacyConfig(config: AppLegacyUserConfig | AppUserConfig): config is AppLegacyUserConfig;
|
3
|
+
export declare function checkIsLegacyConfig(config: AppLegacyUserConfig | AppUserConfig): config is AppLegacyUserConfig;
|
@@ -9,4 +9,4 @@ export declare const defineConfig: <B extends "webpack" | "rspack" = "webpack">(
|
|
9
9
|
* @deprecated Please use `defineConfig` instead.
|
10
10
|
* `defineLegacyConfig` will be removed in the future major version.
|
11
11
|
*/
|
12
|
-
export declare const defineLegacyConfig: (config: AppLegacyUserConfig) => AppLegacyUserConfig;
|
12
|
+
export declare const defineLegacyConfig: (config: AppLegacyUserConfig) => AppLegacyUserConfig;
|
@@ -1 +1 @@
|
|
1
|
-
export { defineServerConfig as defineConfig } from '../utils/config';
|
1
|
+
export { defineServerConfig as defineConfig } from '../utils/config';
|
package/dist/types/hooks.d.ts
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
import { AppToolsHooks } from './types/hooks';
|
2
|
-
export declare const hooks: AppToolsHooks;
|
2
|
+
export declare const hooks: AppToolsHooks;
|
package/dist/types/index.d.ts
CHANGED
@@ -9,14 +9,14 @@ export type { RuntimeUserConfig } from './types/config';
|
|
9
9
|
export declare const devCommand: (program: Command, api: PluginAPI<AppTools<'shared'>>) => Promise<void>;
|
10
10
|
export declare const buildCommand: (program: Command, api: PluginAPI<AppTools<'shared'>>) => Promise<void>;
|
11
11
|
export type AppToolsOptions = {
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
/**
|
13
|
+
* Specify which bundler to use for the build.
|
14
|
+
* @default `webpack`
|
15
|
+
* */
|
16
|
+
bundler?: 'experimental-rspack' | 'webpack';
|
17
17
|
};
|
18
18
|
/**
|
19
19
|
* The core package of the framework, providing CLI commands, build capabilities, configuration parsing and more.
|
20
20
|
*/
|
21
21
|
export declare const appTools: (options?: AppToolsOptions) => CliPlugin<AppTools<'shared'>>;
|
22
|
-
export default appTools;
|
22
|
+
export default appTools;
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import type { CliPlugin, AppTools } from '../types';
|
2
|
-
declare const _default: ({
|
3
|
-
|
4
|
-
}: {
|
5
|
-
bundler: 'rspack' | 'webpack';
|
2
|
+
declare const _default: ({ bundler, }: {
|
3
|
+
bundler: 'rspack' | 'webpack';
|
6
4
|
}) => CliPlugin<AppTools<'shared'>>;
|
7
|
-
export default _default;
|
5
|
+
export default _default;
|
@@ -1,40 +1,40 @@
|
|
1
1
|
export declare const EN_LOCALE: {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
command: {
|
3
|
+
shared: {
|
4
|
+
analyze: string;
|
5
|
+
config: string;
|
6
|
+
skipBuild: string;
|
7
|
+
noNeedInstall: string;
|
8
|
+
};
|
9
|
+
dev: {
|
10
|
+
describe: string;
|
11
|
+
entry: string;
|
12
|
+
apiOnly: string;
|
13
|
+
webOnly: string;
|
14
|
+
selectEntry: string;
|
15
|
+
requireEntry: string;
|
16
|
+
};
|
17
|
+
build: {
|
18
|
+
describe: string;
|
19
|
+
};
|
20
|
+
serve: {
|
21
|
+
describe: string;
|
22
|
+
};
|
23
|
+
deploy: {
|
24
|
+
describe: string;
|
25
|
+
};
|
26
|
+
new: {
|
27
|
+
describe: string;
|
28
|
+
debug: string;
|
29
|
+
config: string;
|
30
|
+
distTag: string;
|
31
|
+
registry: string;
|
32
|
+
lang: string;
|
33
|
+
};
|
34
|
+
inspect: {
|
35
|
+
env: string;
|
36
|
+
output: string;
|
37
|
+
verbose: string;
|
38
|
+
};
|
8
39
|
};
|
9
|
-
|
10
|
-
describe: string;
|
11
|
-
entry: string;
|
12
|
-
apiOnly: string;
|
13
|
-
webOnly: string;
|
14
|
-
selectEntry: string;
|
15
|
-
requireEntry: string;
|
16
|
-
};
|
17
|
-
build: {
|
18
|
-
describe: string;
|
19
|
-
};
|
20
|
-
serve: {
|
21
|
-
describe: string;
|
22
|
-
};
|
23
|
-
deploy: {
|
24
|
-
describe: string;
|
25
|
-
};
|
26
|
-
new: {
|
27
|
-
describe: string;
|
28
|
-
debug: string;
|
29
|
-
config: string;
|
30
|
-
distTag: string;
|
31
|
-
registry: string;
|
32
|
-
lang: string;
|
33
|
-
};
|
34
|
-
inspect: {
|
35
|
-
env: string;
|
36
|
-
output: string;
|
37
|
-
verbose: string;
|
38
|
-
};
|
39
|
-
};
|
40
|
-
};
|
40
|
+
};
|
@@ -1,82 +1,82 @@
|
|
1
1
|
import { I18n } from '@modern-js/plugin-i18n';
|
2
2
|
declare const i18n: I18n;
|
3
3
|
declare const localeKeys: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
command: {
|
5
|
+
shared: {
|
6
|
+
analyze: string;
|
7
|
+
config: string;
|
8
|
+
skipBuild: string;
|
9
|
+
noNeedInstall: string;
|
10
|
+
};
|
11
|
+
dev: {
|
12
|
+
describe: string;
|
13
|
+
entry: string;
|
14
|
+
apiOnly: string;
|
15
|
+
webOnly: string;
|
16
|
+
selectEntry: string;
|
17
|
+
requireEntry: string;
|
18
|
+
};
|
19
|
+
build: {
|
20
|
+
describe: string;
|
21
|
+
};
|
22
|
+
serve: {
|
23
|
+
describe: string;
|
24
|
+
};
|
25
|
+
deploy: {
|
26
|
+
describe: string;
|
27
|
+
};
|
28
|
+
new: {
|
29
|
+
describe: string;
|
30
|
+
debug: string;
|
31
|
+
config: string;
|
32
|
+
distTag: string;
|
33
|
+
registry: string;
|
34
|
+
lang: string;
|
35
|
+
};
|
36
|
+
inspect: {
|
37
|
+
env: string;
|
38
|
+
output: string;
|
39
|
+
verbose: string;
|
40
|
+
};
|
10
41
|
};
|
11
|
-
dev: {
|
12
|
-
describe: string;
|
13
|
-
entry: string;
|
14
|
-
apiOnly: string;
|
15
|
-
webOnly: string;
|
16
|
-
selectEntry: string;
|
17
|
-
requireEntry: string;
|
18
|
-
};
|
19
|
-
build: {
|
20
|
-
describe: string;
|
21
|
-
};
|
22
|
-
serve: {
|
23
|
-
describe: string;
|
24
|
-
};
|
25
|
-
deploy: {
|
26
|
-
describe: string;
|
27
|
-
};
|
28
|
-
new: {
|
29
|
-
describe: string;
|
30
|
-
debug: string;
|
31
|
-
config: string;
|
32
|
-
distTag: string;
|
33
|
-
registry: string;
|
34
|
-
lang: string;
|
35
|
-
};
|
36
|
-
inspect: {
|
37
|
-
env: string;
|
38
|
-
output: string;
|
39
|
-
verbose: string;
|
40
|
-
};
|
41
|
-
};
|
42
42
|
} | {
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
43
|
+
command: {
|
44
|
+
shared: {
|
45
|
+
analyze: string;
|
46
|
+
config: string;
|
47
|
+
skipBuild: string;
|
48
|
+
noNeedInstall: string;
|
49
|
+
};
|
50
|
+
dev: {
|
51
|
+
describe: string;
|
52
|
+
entry: string;
|
53
|
+
apiOnly: string;
|
54
|
+
webOnly: string;
|
55
|
+
selectEntry: string;
|
56
|
+
requireEntry: string;
|
57
|
+
};
|
58
|
+
build: {
|
59
|
+
describe: string;
|
60
|
+
};
|
61
|
+
serve: {
|
62
|
+
describe: string;
|
63
|
+
};
|
64
|
+
deploy: {
|
65
|
+
describe: string;
|
66
|
+
};
|
67
|
+
new: {
|
68
|
+
describe: string;
|
69
|
+
debug: string;
|
70
|
+
config: string;
|
71
|
+
distTag: string;
|
72
|
+
registry: string;
|
73
|
+
lang: string;
|
74
|
+
};
|
75
|
+
inspect: {
|
76
|
+
env: string;
|
77
|
+
output: string;
|
78
|
+
verbose: string;
|
79
|
+
};
|
79
80
|
};
|
80
|
-
};
|
81
81
|
};
|
82
|
-
export { i18n, localeKeys };
|
82
|
+
export { i18n, localeKeys };
|