@bleedingdev/modern-js-app-tools 3.2.0-ultramodern.5 → 3.2.0-ultramodern.51
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/builder/generator/getBuilderEnvironments.js +143 -8
- package/dist/cjs/builder/shared/builderPlugins/adapterBasic.js +41 -5
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +3 -1
- package/dist/cjs/plugins/deploy/index.js +17 -6
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +220 -0
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.mjs +258 -0
- package/dist/cjs/rsbuild.js +3 -0
- package/dist/esm/builder/generator/getBuilderEnvironments.mjs +132 -8
- package/dist/esm/builder/shared/builderPlugins/adapterBasic.mjs +41 -5
- package/dist/esm/builder/shared/builderPlugins/adapterSSR.mjs +3 -1
- package/dist/esm/plugins/deploy/index.mjs +10 -4
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +176 -0
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.mjs +258 -0
- package/dist/esm/rsbuild.mjs +5 -2
- package/dist/esm-node/builder/generator/getBuilderEnvironments.mjs +134 -9
- package/dist/esm-node/builder/shared/builderPlugins/adapterBasic.mjs +41 -5
- package/dist/esm-node/builder/shared/builderPlugins/adapterSSR.mjs +3 -1
- package/dist/esm-node/plugins/deploy/index.mjs +10 -4
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +177 -0
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.mjs +258 -0
- package/dist/esm-node/rsbuild.mjs +5 -2
- package/dist/types/baseline.d.ts +46 -0
- package/dist/types/builder/builder-rspack/index.d.ts +2 -0
- package/dist/types/builder/generator/adapterCopy.d.ts +3 -0
- package/dist/types/builder/generator/createBuilderProviderConfig.d.ts +3 -0
- package/dist/types/builder/generator/createCopyPattern.d.ts +16 -0
- package/dist/types/builder/generator/getBuilderEnvironments.d.ts +6 -0
- package/dist/types/builder/generator/index.d.ts +8 -0
- package/dist/types/builder/index.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterBasic.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterHtml.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterPrecompress.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/adapterSSR.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/builderHooks.d.ts +3 -0
- package/dist/types/builder/shared/builderPlugins/index.d.ts +5 -0
- package/dist/types/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.d.ts +7 -0
- package/dist/types/builder/shared/bundlerPlugins/HtmlBottomTemplate.d.ts +9 -0
- package/dist/types/builder/shared/bundlerPlugins/RouterPlugin.d.ts +32 -0
- package/dist/types/builder/shared/bundlerPlugins/index.d.ts +3 -0
- package/dist/types/builder/shared/createCopyInfo.d.ts +8 -0
- package/dist/types/builder/shared/index.d.ts +3 -0
- package/dist/types/builder/shared/loaders/serverModuleLoader.d.ts +3 -0
- package/dist/types/builder/shared/types.d.ts +6 -0
- package/dist/types/commands/build.d.ts +4 -0
- package/dist/types/commands/deploy.d.ts +3 -0
- package/dist/types/commands/dev.d.ts +9 -0
- package/dist/types/commands/index.d.ts +10 -0
- package/dist/types/commands/info.d.ts +18 -0
- package/dist/types/commands/inspect.d.ts +4 -0
- package/dist/types/commands/runtime.d.ts +11 -0
- package/dist/types/commands/serve.d.ts +8 -0
- package/dist/types/compat/hooks.d.ts +7 -0
- package/dist/types/compat/index.d.ts +2 -0
- package/dist/types/compat/utils.d.ts +13 -0
- package/dist/types/config/default.d.ts +3 -0
- package/dist/types/config/index.d.ts +2 -0
- package/dist/types/config/initialize/index.d.ts +3 -0
- package/dist/types/config/initialize/inits.d.ts +4 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/defineConfig.d.ts +11 -0
- package/dist/types/esm/register-esm.d.mts +5 -0
- package/dist/types/esm/ts-paths-loader.d.mts +6 -0
- package/dist/types/exports/server.d.ts +1 -0
- package/dist/types/index.d.ts +17 -0
- package/dist/types/locale/en.d.ts +44 -0
- package/dist/types/locale/index.d.ts +3 -0
- package/dist/types/locale/zh.d.ts +44 -0
- package/dist/types/plugins/analyze/constants.d.ts +3 -0
- package/dist/types/plugins/analyze/getBundleEntry.d.ts +4 -0
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +7 -0
- package/dist/types/plugins/analyze/getHtmlTemplate.d.ts +27 -0
- package/dist/types/plugins/analyze/getServerRoutes.d.ts +8 -0
- package/dist/types/plugins/analyze/index.d.ts +3 -0
- package/dist/types/plugins/analyze/isDefaultExportFunction.d.ts +1 -0
- package/dist/types/plugins/analyze/templates.d.ts +5 -0
- package/dist/types/plugins/analyze/utils.d.ts +10 -0
- package/dist/types/plugins/deploy/index.d.ts +6 -0
- package/dist/types/plugins/deploy/platforms/cloudflare.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/gh-pages.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/netlify.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/node.d.ts +2 -0
- package/dist/types/plugins/deploy/platforms/platform.d.ts +17 -0
- package/dist/types/plugins/deploy/platforms/templates/cloudflare-entry.d.mts +4 -0
- package/dist/types/plugins/deploy/platforms/templates/netlify-entry.d.cts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/netlify-entry.d.mts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/node-entry.d.cts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/node-entry.d.mts +1 -0
- package/dist/types/plugins/deploy/platforms/templates/vercel-entry.d.cts +2 -0
- package/dist/types/plugins/deploy/platforms/templates/vercel-entry.d.mts +2 -0
- package/dist/types/plugins/deploy/platforms/vercel.d.ts +2 -0
- package/dist/types/plugins/deploy/types.d.ts +3 -0
- package/dist/types/plugins/deploy/utils/generator.d.ts +24 -0
- package/dist/types/plugins/deploy/utils/index.d.ts +16 -0
- package/dist/types/plugins/initialize/index.d.ts +3 -0
- package/dist/types/plugins/serverBuild.d.ts +3 -0
- package/dist/types/plugins/serverRuntime.d.ts +3 -0
- package/dist/types/presetUltramodern.d.ts +6 -0
- package/dist/types/rsbuild.d.ts +12 -0
- package/dist/types/run/index.d.ts +20 -0
- package/dist/types/types/config/deploy.d.ts +46 -0
- package/dist/types/types/config/dev.d.ts +55 -0
- package/dist/types/types/config/experiments.d.ts +3 -0
- package/dist/types/types/config/html.d.ts +3 -0
- package/dist/types/types/config/index.d.ts +48 -0
- package/dist/types/types/config/output.d.ts +61 -0
- package/dist/types/types/config/performance.d.ts +3 -0
- package/dist/types/types/config/resolve.d.ts +2 -0
- package/dist/types/types/config/security.d.ts +2 -0
- package/dist/types/types/config/source.d.ts +61 -0
- package/dist/types/types/config/testing.d.ts +8 -0
- package/dist/types/types/config/tools.d.ts +21 -0
- package/dist/types/types/index.d.ts +10 -0
- package/dist/types/types/plugin.d.ts +114 -0
- package/dist/types/types/utils.d.ts +1 -0
- package/dist/types/ultramodern/designSystem.d.ts +54 -0
- package/dist/types/utils/config.d.ts +2 -0
- package/dist/types/utils/createServer.d.ts +5 -0
- package/dist/types/utils/env.d.ts +2 -0
- package/dist/types/utils/generateWatchFiles.d.ts +2 -0
- package/dist/types/utils/getConfigFile.d.ts +1 -0
- package/dist/types/utils/getSelectedEntries.d.ts +5 -0
- package/dist/types/utils/initAppContext.d.ts +31 -0
- package/dist/types/utils/loadPlugins.d.ts +13 -0
- package/dist/types/utils/printInstructions.d.ts +3 -0
- package/dist/types/utils/register.d.ts +19 -0
- package/dist/types/utils/restart.d.ts +2 -0
- package/dist/types/utils/routes.d.ts +4 -0
- package/dist/types/utils/types.d.ts +49 -0
- package/package.json +15 -15
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export declare const initAppContext: ({ metaName, appDirectory, runtimeConfigFile, options, tempDir, }: {
|
|
2
|
+
metaName: string;
|
|
3
|
+
appDirectory: string;
|
|
4
|
+
runtimeConfigFile: string;
|
|
5
|
+
options?: {
|
|
6
|
+
srcDir?: string;
|
|
7
|
+
apiDir?: string;
|
|
8
|
+
distDir?: string;
|
|
9
|
+
sharedDir?: string;
|
|
10
|
+
bffRuntimeFramework?: 'hono' | 'effect';
|
|
11
|
+
};
|
|
12
|
+
tempDir?: string;
|
|
13
|
+
}) => {
|
|
14
|
+
runtimeConfigFile: string;
|
|
15
|
+
ip: any;
|
|
16
|
+
port: number;
|
|
17
|
+
moduleType: any;
|
|
18
|
+
apiDirectory: string;
|
|
19
|
+
lambdaDirectory: string;
|
|
20
|
+
sharedDirectory: string;
|
|
21
|
+
serverPlugins: never[];
|
|
22
|
+
internalDirectory: string;
|
|
23
|
+
htmlTemplates: {};
|
|
24
|
+
serverRoutes: never[];
|
|
25
|
+
entrypoints: never[];
|
|
26
|
+
checkedEntries: never[];
|
|
27
|
+
apiOnly: boolean;
|
|
28
|
+
internalDirAlias: string;
|
|
29
|
+
internalSrcAlias: string;
|
|
30
|
+
bffRuntimeFramework: "effect" | "hono";
|
|
31
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { CLIPluginAPI } from '@modern-js/plugin';
|
|
2
|
+
import type { ServerPlugin as ServerPluginInstance } from '@modern-js/server-core';
|
|
3
|
+
import type { InternalPlugins, ServerPlugin } from '@modern-js/types';
|
|
4
|
+
import type { AppTools } from '../types';
|
|
5
|
+
export declare function getServerPlugins(api: CLIPluginAPI<AppTools>, metaName?: string): Promise<ServerPlugin[]>;
|
|
6
|
+
export declare function loadServerPlugins(api: CLIPluginAPI<AppTools>, appDirectory: string, metaName: string): Promise<ServerPluginInstance[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Load internal plugins which in @modern-js scope and user's custom plugins.
|
|
9
|
+
* @param appDirectory - Application root directory.
|
|
10
|
+
* @param internalPlugins - Internal plugins.
|
|
11
|
+
* @returns Plugin Objects has been required.
|
|
12
|
+
*/
|
|
13
|
+
export declare const loadInternalPlugins: (appDirectory: string, internalPlugins?: InternalPlugins) => Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Alias } from '@modern-js/utils';
|
|
2
|
+
import type { ConfigChain } from '@rsbuild/core';
|
|
3
|
+
type TsRuntimeRegisterMode = 'node-loader' | 'unsupported';
|
|
4
|
+
interface TsRuntimeSetupOptions {
|
|
5
|
+
moduleType?: string;
|
|
6
|
+
/**
|
|
7
|
+
* User-configured `server.tsconfigPath`. Forwarded into the shared
|
|
8
|
+
* resolveServerTsconfig helper. Resolved relative to appDir when not
|
|
9
|
+
* absolute. Falls back to `<appDir>/tsconfig.json` when unset.
|
|
10
|
+
*/
|
|
11
|
+
tsconfigPath?: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const resolveTsRuntimeRegisterMode: () => TsRuntimeRegisterMode;
|
|
14
|
+
/**
|
|
15
|
+
* Setup TypeScript runtime support.
|
|
16
|
+
* Register Node-native TypeScript path alias resolution.
|
|
17
|
+
*/
|
|
18
|
+
export declare const setupTsRuntime: (appDir: string, distDir: string, alias?: ConfigChain<Alias>, options?: TsRuntimeSetupOptions) => Promise<void>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AppToolsContext } from '../types/plugin';
|
|
2
|
+
export declare const generateRoutes: (appContext: AppToolsContext) => Promise<void>;
|
|
3
|
+
export declare const getPathWithoutExt: (filename: string) => string;
|
|
4
|
+
export declare const isMainEntry: (entryName: string, mainEntryName?: string) => boolean;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type DevOptions = {
|
|
2
|
+
entry?: string[] | boolean;
|
|
3
|
+
config?: string;
|
|
4
|
+
apiOnly?: boolean;
|
|
5
|
+
analyze?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type BuildOptions = {
|
|
8
|
+
config?: string;
|
|
9
|
+
analyze?: boolean;
|
|
10
|
+
watch?: boolean;
|
|
11
|
+
};
|
|
12
|
+
export type DeployOptions = {
|
|
13
|
+
config?: string;
|
|
14
|
+
skipBuild?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export type StartOptions = {
|
|
17
|
+
apiOnly?: boolean;
|
|
18
|
+
};
|
|
19
|
+
export type InspectOptions = {
|
|
20
|
+
env: string;
|
|
21
|
+
output: string;
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export type InfoOptions = {
|
|
25
|
+
config?: string;
|
|
26
|
+
json?: boolean;
|
|
27
|
+
};
|
|
28
|
+
export type RuntimeStatusOptions = {
|
|
29
|
+
endpoint?: string;
|
|
30
|
+
token?: string;
|
|
31
|
+
tokenEnv?: string;
|
|
32
|
+
headerName?: string;
|
|
33
|
+
timeout?: string;
|
|
34
|
+
json?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export type RuntimeFallbackSignalOptions = {
|
|
37
|
+
endpoint?: string;
|
|
38
|
+
app: string;
|
|
39
|
+
reason?: string;
|
|
40
|
+
phase?: string;
|
|
41
|
+
entry?: string;
|
|
42
|
+
runtimeDigest?: string;
|
|
43
|
+
metadata?: string;
|
|
44
|
+
token?: string;
|
|
45
|
+
tokenEnv?: string;
|
|
46
|
+
headerName?: string;
|
|
47
|
+
timeout?: string;
|
|
48
|
+
json?: boolean;
|
|
49
|
+
};
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.2.0-ultramodern.
|
|
20
|
+
"version": "3.2.0-ultramodern.51",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
"@babel/parser": "^7.29.3",
|
|
86
86
|
"@babel/traverse": "^7.29.0",
|
|
87
87
|
"@babel/types": "^7.29.0",
|
|
88
|
-
"@rsbuild/core": "2.0.
|
|
89
|
-
"@swc/core": "1.15.
|
|
88
|
+
"@rsbuild/core": "2.0.7",
|
|
89
|
+
"@swc/core": "1.15.40",
|
|
90
90
|
"@swc/helpers": "^0.5.21",
|
|
91
91
|
"compression-webpack-plugin": "^12.0.0",
|
|
92
92
|
"es-module-lexer": "^2.1.0",
|
|
@@ -98,22 +98,22 @@
|
|
|
98
98
|
"ndepe": "^0.1.13",
|
|
99
99
|
"pkg-types": "^2.3.1",
|
|
100
100
|
"std-env": "4.1.0",
|
|
101
|
-
"@modern-js/
|
|
102
|
-
"@modern-js/
|
|
103
|
-
"@modern-js/
|
|
104
|
-
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.2.0-ultramodern.
|
|
105
|
-
"@modern-js/
|
|
106
|
-
"@modern-js/
|
|
107
|
-
"@modern-js/
|
|
108
|
-
"@modern-js/
|
|
109
|
-
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.
|
|
110
|
-
"@modern-js/
|
|
101
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.51",
|
|
102
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.51",
|
|
103
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.51",
|
|
104
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.2.0-ultramodern.51",
|
|
105
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.51",
|
|
106
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.51",
|
|
107
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.2.0-ultramodern.51",
|
|
108
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.51",
|
|
109
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.51",
|
|
110
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.51"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@rslib/core": "0.21.5",
|
|
114
114
|
"@types/babel__traverse": "7.28.0",
|
|
115
|
-
"@types/node": "^25.
|
|
116
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
115
|
+
"@types/node": "^25.9.1",
|
|
116
|
+
"@typescript/native-preview": "7.0.0-dev.20260527.2",
|
|
117
117
|
"tsconfig-paths": "^4.2.0",
|
|
118
118
|
"@scripts/rstest-config": "2.66.0"
|
|
119
119
|
},
|