@modern-js/app-tools 2.65.5 → 2.66.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/types/builder/generator/createCopyPattern.d.ts +0 -1
- 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 +1 -1
- package/dist/types/commands/index.d.ts +5 -5
- package/dist/types/commands/inspect.d.ts +1 -1
- package/dist/types/commands/serve.d.ts +1 -1
- package/dist/types/compat/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/index.d.ts +1 -1
- package/dist/types/plugins/analyze/getBundleEntry.d.ts +1 -1
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +1 -1
- package/dist/types/plugins/analyze/getHtmlTemplate.d.ts +3 -3
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +2 -2
- package/dist/types/plugins/analyze/index.d.ts +2 -2
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/dist/types/plugins/deploy/index.d.ts +1 -1
- package/dist/types/plugins/deploy/utils.d.ts +1 -1
- package/dist/types/plugins/initialize/index.d.ts +2 -2
- package/dist/types/plugins/serverBuild.d.ts +1 -1
- package/dist/types/utils/config.d.ts +2 -2
- package/dist/types/utils/createServer.d.ts +0 -1
- package/dist/types/utils/initAppContext.d.ts +7 -7
- package/dist/types/utils/printInstructions.d.ts +1 -1
- package/dist/types/utils/routes.d.ts +1 -1
- package/package.json +18 -18
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { CLIPluginAPI } from '@modern-js/plugin-v2';
|
2
2
|
import type { AppTools } from '../types';
|
3
3
|
import type { BuildOptions } from '../utils/types';
|
4
|
-
export declare const build: (api: CLIPluginAPI<AppTools<
|
4
|
+
export declare const build: (api: CLIPluginAPI<AppTools<"shared">>, options?: BuildOptions) => Promise<void>;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { CLIPluginAPI } from '@modern-js/plugin-v2';
|
2
2
|
import type { AppTools } from '../types';
|
3
|
-
export declare const deploy: (api: CLIPluginAPI<AppTools<
|
3
|
+
export declare const deploy: (api: CLIPluginAPI<AppTools<"shared">>, options: any) => Promise<void>;
|
@@ -5,5 +5,5 @@ import type { DevOptions } from '../utils/types';
|
|
5
5
|
interface ExtraServerOptions {
|
6
6
|
applyPlugins?: ApplyPlugins;
|
7
7
|
}
|
8
|
-
export declare const dev: (api: CLIPluginAPI<AppTools<
|
8
|
+
export declare const dev: (api: CLIPluginAPI<AppTools<"shared">>, options: DevOptions, devServerOptions?: ExtraServerOptions) => Promise<void>;
|
9
9
|
export {};
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import type { CLIPluginAPI } from '@modern-js/plugin-v2';
|
2
2
|
import { type Command } from '@modern-js/utils';
|
3
3
|
import type { AppTools } from '../types';
|
4
|
-
export declare const devCommand: (program: Command, api: CLIPluginAPI<AppTools<
|
5
|
-
export declare const buildCommand: (program: Command, api: CLIPluginAPI<AppTools<
|
6
|
-
export declare const serverCommand: (program: Command, api: CLIPluginAPI<AppTools<
|
7
|
-
export declare const deployCommand: (program: Command, api: CLIPluginAPI<AppTools<
|
4
|
+
export declare const devCommand: (program: Command, api: CLIPluginAPI<AppTools<"shared">>) => Promise<void>;
|
5
|
+
export declare const buildCommand: (program: Command, api: CLIPluginAPI<AppTools<"shared">>) => Promise<void>;
|
6
|
+
export declare const serverCommand: (program: Command, api: CLIPluginAPI<AppTools<"shared">>) => void;
|
7
|
+
export declare const deployCommand: (program: Command, api: CLIPluginAPI<AppTools<"shared">>) => void;
|
8
8
|
export declare const newCommand: (program: Command, locale: string) => void;
|
9
|
-
export declare const inspectCommand: (program: Command, api: CLIPluginAPI<AppTools<
|
9
|
+
export declare const inspectCommand: (program: Command, api: CLIPluginAPI<AppTools<"shared">>) => void;
|
10
10
|
export declare const upgradeCommand: (program: Command) => void;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { CLIPluginAPI } from '@modern-js/plugin-v2';
|
2
2
|
import type { AppTools } from '../types';
|
3
3
|
import type { InspectOptions } from '../utils/types';
|
4
|
-
export declare const inspect: (api: CLIPluginAPI<AppTools<
|
4
|
+
export declare const inspect: (api: CLIPluginAPI<AppTools<"shared">>, options: InspectOptions) => Promise<import("@rsbuild/core").InspectConfigResult<"rspack">>;
|
@@ -4,5 +4,5 @@ import type { AppTools } from '../types';
|
|
4
4
|
type ExtraServerOptions = {
|
5
5
|
launcher?: typeof createProdServer;
|
6
6
|
};
|
7
|
-
export declare const serve: (api: CLIPluginAPI<AppTools<
|
7
|
+
export declare const serve: (api: CLIPluginAPI<AppTools<"shared">>, serverOptions?: ExtraServerOptions) => Promise<void>;
|
8
8
|
export {};
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import type { AppTools, CliPluginFuture } from '../types';
|
2
|
-
export declare const compatPlugin: () => CliPluginFuture<AppTools<
|
2
|
+
export declare const compatPlugin: () => CliPluginFuture<AppTools<"shared">>;
|
@@ -4,7 +4,7 @@ import type { AppLegacyUserConfig, AppUserConfig } from './types';
|
|
4
4
|
* This function helps you to autocomplete configuration types.
|
5
5
|
* It accepts a direct config object, or a function that returns a config.
|
6
6
|
*/
|
7
|
-
export declare const defineConfig: <B extends "
|
7
|
+
export declare const defineConfig: <B extends "rspack" | "webpack" = "webpack">(config: UserConfigExport<AppUserConfig<B>>) => UserConfigExport<AppUserConfig<B>>;
|
8
8
|
/**
|
9
9
|
* @deprecated Please use `defineConfig` instead.
|
10
10
|
* `defineLegacyConfig` will be removed in the future major version.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { UnstableMiddleware, UnstableMiddlewareContext, UnstableNext } from '@modern-js/types';
|
2
|
-
export type { ServerPlugin } from '@modern-js/server-core';
|
2
|
+
export type { ServerPlugin, ServerPluginLegacy } from '@modern-js/server-core';
|
3
3
|
export type RenderMiddleware = UnstableMiddleware;
|
4
4
|
export type RenderMiddlewareContext = UnstableMiddlewareContext;
|
5
5
|
export type RenderNext = UnstableNext;
|
package/dist/types/index.d.ts
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import type { AppTools, AppToolsOptions, CliPluginFuture } from './types';
|
2
2
|
import { initAppContext } from './utils/initAppContext';
|
3
3
|
export * from './defineConfig';
|
4
|
-
export declare const appTools: (options?: AppToolsOptions) => CliPluginFuture<AppTools<
|
4
|
+
export declare const appTools: (options?: AppToolsOptions) => CliPluginFuture<AppTools<"shared">>;
|
5
5
|
export { defineConfig, defineLegacyConfig } from './defineConfig';
|
6
6
|
export { mergeConfig } from '@modern-js/core';
|
7
7
|
export type { RuntimeUserConfig } from './types/config';
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import type { Entrypoint } from '@modern-js/types';
|
2
2
|
import type { AppNormalizedConfig } from '../../types';
|
3
3
|
import type { AppToolsContext, AppToolsHooks } from '../../types/new';
|
4
|
-
export declare const getBundleEntry: (hooks: AppToolsHooks<
|
4
|
+
export declare const getBundleEntry: (hooks: AppToolsHooks<"shared">, appContext: AppToolsContext<"shared">, config: AppNormalizedConfig<"shared">) => Promise<Entrypoint[]>;
|
@@ -2,4 +2,4 @@ import type { Entrypoint } from '@modern-js/types';
|
|
2
2
|
import type { AppNormalizedConfig } from '../../types';
|
3
3
|
import type { AppToolsContext, AppToolsHooks } from '../../types/new';
|
4
4
|
export type { Entrypoint };
|
5
|
-
export declare const getFileSystemEntry: (hooks: AppToolsHooks<
|
5
|
+
export declare const getFileSystemEntry: (hooks: AppToolsHooks<"shared">, appContext: AppToolsContext<"shared">, config: AppNormalizedConfig<"shared">) => Promise<Entrypoint[]>;
|
@@ -18,9 +18,9 @@ export declare const getModifyHtmlPartials: (partials: Record<keyof HtmlPartials
|
|
18
18
|
current: string[];
|
19
19
|
};
|
20
20
|
};
|
21
|
-
export declare const getHtmlTemplate: (entrypoints: Entrypoint[], hooks: AppToolsHooks<
|
22
|
-
appContext: AppToolsContext<
|
23
|
-
config: AppNormalizedConfig<
|
21
|
+
export declare const getHtmlTemplate: (entrypoints: Entrypoint[], hooks: AppToolsHooks<"shared">, { appContext, config, }: {
|
22
|
+
appContext: AppToolsContext<"shared">;
|
23
|
+
config: AppNormalizedConfig<"shared">;
|
24
24
|
}) => Promise<{
|
25
25
|
partialsByEntrypoint: Record<string, HtmlPartials>;
|
26
26
|
htmlTemplates: HtmlTemplates;
|
@@ -2,7 +2,7 @@ import type { Entrypoint, ServerRoute } from '@modern-js/types';
|
|
2
2
|
import type { AppNormalizedConfig } from '../../types';
|
3
3
|
import type { AppToolsContext } from '../../types/new';
|
4
4
|
export declare const getServerRoutes: (entrypoints: Entrypoint[], { appContext, config, }: {
|
5
|
-
appContext: AppToolsContext<
|
6
|
-
config: AppNormalizedConfig<
|
5
|
+
appContext: AppToolsContext<"shared">;
|
6
|
+
config: AppNormalizedConfig<"shared">;
|
7
7
|
}) => ServerRoute[];
|
8
8
|
export declare const getProdServerRoutes: (distDirectory: string) => any;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { AppTools, CliPluginFuture } from '../../types';
|
2
2
|
declare const _default: ({ bundler, }: {
|
3
|
-
bundler:
|
4
|
-
}) => CliPluginFuture<AppTools<
|
3
|
+
bundler: "webpack" | "rspack";
|
4
|
+
}) => CliPluginFuture<AppTools<"shared">>;
|
5
5
|
export default _default;
|
@@ -3,7 +3,7 @@ export declare const replaceWithAlias: (base: string, filePath: string, alias: s
|
|
3
3
|
export declare const parseModule: ({ source, filename, }: {
|
4
4
|
source: string;
|
5
5
|
filename: string;
|
6
|
-
}) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean]>;
|
6
|
+
}) => Promise<readonly [imports: readonly import("es-module-lexer").ImportSpecifier[], exports: readonly import("es-module-lexer").ExportSpecifier[], facade: boolean, hasModuleSyntax: boolean]>;
|
7
7
|
export declare const getServerCombinedModueFile: (internalDirectory: string, entryName: string) => string;
|
8
8
|
export declare const checkIsBuildCommands: () => boolean;
|
9
9
|
export declare const checkIsServeCommand: () => boolean;
|
@@ -5,7 +5,7 @@ export type ServerAppContext = {
|
|
5
5
|
lambdaDirectory: string;
|
6
6
|
metaName: string;
|
7
7
|
};
|
8
|
-
export declare const serverAppContenxtTemplate: (appContext: AppToolsContext<
|
8
|
+
export declare const serverAppContenxtTemplate: (appContext: AppToolsContext<"shared">) => {
|
9
9
|
sharedDirectory: string;
|
10
10
|
apiDirectory: string;
|
11
11
|
lambdaDirectory: string;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { AppTools, CliPluginFuture } from '../../types';
|
2
2
|
declare const _default: ({ bundler, }: {
|
3
|
-
bundler:
|
4
|
-
}) => CliPluginFuture<AppTools<
|
3
|
+
bundler: "rspack" | "webpack";
|
4
|
+
}) => CliPluginFuture<AppTools<"shared">>;
|
5
5
|
export default _default;
|
@@ -7,6 +7,6 @@ export declare const buildServerConfig: ({ appDirectory, distDirectory, configFi
|
|
7
7
|
distDirectory: string;
|
8
8
|
configFile: string;
|
9
9
|
options?: Parameters<typeof bundle>[1];
|
10
|
-
watch?: boolean
|
10
|
+
watch?: boolean;
|
11
11
|
}) => Promise<void>;
|
12
|
-
export declare const emitResolvedConfig: (appDirectory: string, resolvedConfig: AppNormalizedConfig<
|
12
|
+
export declare const emitResolvedConfig: (appDirectory: string, resolvedConfig: AppNormalizedConfig<"shared">) => Promise<void>;
|
@@ -2,14 +2,14 @@ export declare const initAppContext: ({ appDirectory, runtimeConfigFile, options
|
|
2
2
|
appDirectory: string;
|
3
3
|
runtimeConfigFile: string;
|
4
4
|
options?: {
|
5
|
-
metaName?: string
|
6
|
-
srcDir?: string
|
7
|
-
apiDir?: string
|
8
|
-
distDir?: string
|
9
|
-
sharedDir?: string
|
10
|
-
}
|
5
|
+
metaName?: string;
|
6
|
+
srcDir?: string;
|
7
|
+
apiDir?: string;
|
8
|
+
distDir?: string;
|
9
|
+
sharedDir?: string;
|
10
|
+
};
|
11
11
|
serverConfigFile: string;
|
12
|
-
tempDir?: string
|
12
|
+
tempDir?: string;
|
13
13
|
}) => {
|
14
14
|
metaName: string;
|
15
15
|
runtimeConfigFile: string;
|
@@ -1,3 +1,3 @@
|
|
1
1
|
import type { AppNormalizedConfig } from '../types';
|
2
2
|
import type { AppToolsContext, AppToolsHooks } from '../types/new';
|
3
|
-
export declare const printInstructions: (hooks: AppToolsHooks<
|
3
|
+
export declare const printInstructions: (hooks: AppToolsHooks<"shared">, appContext: AppToolsContext<"shared">, config: AppNormalizedConfig<"shared">) => Promise<void>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { IAppContext } from '@modern-js/core';
|
2
2
|
import type { AppToolsContext } from '../types/new';
|
3
|
-
export declare const generateRoutes: (appContext: AppToolsContext<
|
3
|
+
export declare const generateRoutes: (appContext: AppToolsContext<"shared"> | IAppContext) => Promise<void>;
|
4
4
|
export declare const getPathWithoutExt: (filename: string) => string;
|
5
5
|
export declare const isMainEntry: (entryName: string, mainEntryName?: string) => boolean;
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.
|
18
|
+
"version": "2.66.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -88,23 +88,23 @@
|
|
88
88
|
"esbuild-register": "^3.5.0",
|
89
89
|
"flatted": "^3.2.9",
|
90
90
|
"mlly": "^1.6.1",
|
91
|
-
"ndepe": "0.1.
|
91
|
+
"ndepe": "0.1.8",
|
92
92
|
"pkg-types": "^1.1.0",
|
93
93
|
"std-env": "^3.7.0",
|
94
|
-
"@modern-js/core": "2.
|
95
|
-
"@modern-js/node-bundle-require": "2.
|
96
|
-
"@modern-js/plugin
|
97
|
-
"@modern-js/plugin-
|
98
|
-
"@modern-js/plugin-
|
99
|
-
"@modern-js/
|
100
|
-
"@modern-js/
|
101
|
-
"@modern-js/server
|
102
|
-
"@modern-js/server": "2.
|
103
|
-
"@modern-js/server-
|
104
|
-
"@modern-js/
|
105
|
-
"@modern-js/
|
106
|
-
"@modern-js/uni-builder": "2.
|
107
|
-
"@modern-js/utils": "2.
|
94
|
+
"@modern-js/core": "2.66.0",
|
95
|
+
"@modern-js/node-bundle-require": "2.66.0",
|
96
|
+
"@modern-js/plugin": "2.66.0",
|
97
|
+
"@modern-js/plugin-data-loader": "2.66.0",
|
98
|
+
"@modern-js/plugin-i18n": "2.66.0",
|
99
|
+
"@modern-js/plugin-v2": "2.66.0",
|
100
|
+
"@modern-js/rsbuild-plugin-esbuild": "2.66.0",
|
101
|
+
"@modern-js/prod-server": "2.66.0",
|
102
|
+
"@modern-js/server": "2.66.0",
|
103
|
+
"@modern-js/server-core": "2.66.0",
|
104
|
+
"@modern-js/server-utils": "2.66.0",
|
105
|
+
"@modern-js/types": "2.66.0",
|
106
|
+
"@modern-js/uni-builder": "2.66.0",
|
107
|
+
"@modern-js/utils": "2.66.0"
|
108
108
|
},
|
109
109
|
"devDependencies": {
|
110
110
|
"@rsbuild/plugin-webpack-swc": "1.0.12",
|
@@ -116,8 +116,8 @@
|
|
116
116
|
"tsconfig-paths": "^4.2.0",
|
117
117
|
"typescript": "^5",
|
118
118
|
"webpack": "^5.98.0",
|
119
|
-
"@scripts/
|
120
|
-
"@scripts/
|
119
|
+
"@scripts/jest-config": "2.66.0",
|
120
|
+
"@scripts/build": "2.66.0"
|
121
121
|
},
|
122
122
|
"peerDependencies": {
|
123
123
|
"ts-node": "^10.7.0",
|