@bleedingdev/modern-js-app-tools 3.2.0-ultramodern.101 → 3.2.0-ultramodern.103
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/baseline.js +9 -5
- package/dist/cjs/builder/builder-rspack/index.js +9 -5
- package/dist/cjs/builder/generator/adapterCopy.js +9 -5
- package/dist/cjs/builder/generator/createBuilderProviderConfig.js +9 -5
- package/dist/cjs/builder/generator/createCopyPattern.js +9 -5
- package/dist/cjs/builder/generator/getBuilderEnvironments.js +9 -5
- package/dist/cjs/builder/generator/index.js +9 -5
- package/dist/cjs/builder/index.js +9 -5
- package/dist/cjs/builder/shared/builderPlugins/adapterBasic.js +9 -5
- package/dist/cjs/builder/shared/builderPlugins/adapterHtml.js +10 -6
- package/dist/cjs/builder/shared/builderPlugins/adapterPrecompress.js +9 -5
- package/dist/cjs/builder/shared/builderPlugins/adapterSSR.js +9 -5
- package/dist/cjs/builder/shared/builderPlugins/builderHooks.js +12 -8
- package/dist/cjs/builder/shared/builderPlugins/index.js +9 -5
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlAsyncChunkPlugin.js +9 -5
- package/dist/cjs/builder/shared/bundlerPlugins/HtmlBottomTemplate.js +12 -8
- package/dist/cjs/builder/shared/bundlerPlugins/RouterPlugin.js +9 -5
- package/dist/cjs/builder/shared/bundlerPlugins/index.js +9 -5
- package/dist/cjs/builder/shared/createCopyInfo.js +9 -5
- package/dist/cjs/builder/shared/index.js +9 -5
- package/dist/cjs/builder/shared/loaders/serverModuleLoader.js +12 -8
- package/dist/cjs/commands/build.js +9 -5
- package/dist/cjs/commands/deploy.js +9 -5
- package/dist/cjs/commands/dev.js +9 -5
- package/dist/cjs/commands/index.js +9 -5
- package/dist/cjs/commands/info.js +9 -5
- package/dist/cjs/commands/inspect.js +12 -8
- package/dist/cjs/commands/runtime.js +15 -11
- package/dist/cjs/commands/serve.js +9 -5
- package/dist/cjs/compat/hooks.js +9 -5
- package/dist/cjs/compat/index.js +9 -5
- package/dist/cjs/compat/utils.js +9 -5
- package/dist/cjs/config/default.js +9 -5
- package/dist/cjs/config/index.js +9 -5
- package/dist/cjs/config/initialize/index.js +9 -5
- package/dist/cjs/config/initialize/inits.js +9 -5
- package/dist/cjs/constants.js +13 -9
- package/dist/cjs/defineConfig.js +12 -8
- package/dist/cjs/esm/register-esm.js +12 -8
- package/dist/cjs/esm/ts-paths-loader.js +9 -5
- package/dist/cjs/index.js +21 -16
- package/dist/cjs/locale/en.js +12 -8
- package/dist/cjs/locale/index.js +9 -5
- package/dist/cjs/locale/zh.js +12 -8
- package/dist/cjs/plugins/analyze/constants.js +14 -10
- package/dist/cjs/plugins/analyze/getBundleEntry.js +9 -5
- package/dist/cjs/plugins/analyze/getFileSystemEntry.js +9 -5
- package/dist/cjs/plugins/analyze/getHtmlTemplate.js +9 -5
- package/dist/cjs/plugins/analyze/getServerRoutes.js +9 -5
- package/dist/cjs/plugins/analyze/index.js +9 -5
- package/dist/cjs/plugins/analyze/isDefaultExportFunction.js +9 -5
- package/dist/cjs/plugins/analyze/templates.js +12 -8
- package/dist/cjs/plugins/analyze/utils.js +9 -5
- package/dist/cjs/plugins/deploy/index.js +9 -5
- package/dist/cjs/plugins/deploy/platforms/cloudflare.js +169 -7
- package/dist/cjs/plugins/deploy/platforms/gh-pages.js +9 -5
- package/dist/cjs/plugins/deploy/platforms/netlify.js +9 -5
- package/dist/cjs/plugins/deploy/platforms/node.js +9 -5
- package/dist/cjs/plugins/deploy/platforms/templates/cloudflare-entry.mjs +50 -5
- package/dist/cjs/plugins/deploy/platforms/vercel.js +9 -5
- package/dist/cjs/plugins/deploy/utils/generator.js +9 -5
- package/dist/cjs/plugins/deploy/utils/index.js +9 -5
- package/dist/cjs/plugins/initialize/index.js +9 -5
- package/dist/cjs/plugins/serverBuild.js +9 -5
- package/dist/cjs/plugins/serverRuntime.js +12 -8
- package/dist/cjs/presetUltramodern.js +9 -5
- package/dist/cjs/rsbuild.js +9 -5
- package/dist/cjs/run/index.js +9 -5
- package/dist/cjs/types/config/index.js +9 -5
- package/dist/cjs/types/index.js +9 -5
- package/dist/cjs/ultramodern/designSystem.js +16 -12
- package/dist/cjs/utils/config.js +9 -5
- package/dist/cjs/utils/createServer.js +14 -10
- package/dist/cjs/utils/env.js +9 -5
- package/dist/cjs/utils/generateWatchFiles.js +9 -5
- package/dist/cjs/utils/getConfigFile.js +9 -5
- package/dist/cjs/utils/getSelectedEntries.js +9 -5
- package/dist/cjs/utils/initAppContext.js +9 -5
- package/dist/cjs/utils/loadPlugins.js +9 -5
- package/dist/cjs/utils/printInstructions.js +9 -5
- package/dist/cjs/utils/register.js +9 -5
- package/dist/cjs/utils/restart.js +9 -5
- package/dist/cjs/utils/routes.js +9 -5
- package/dist/esm/builder/shared/builderPlugins/adapterHtml.mjs +1 -1
- package/dist/esm/plugins/deploy/platforms/cloudflare.mjs +160 -2
- package/dist/esm/plugins/deploy/platforms/templates/cloudflare-entry.mjs +50 -5
- package/dist/esm-node/builder/shared/builderPlugins/adapterHtml.mjs +1 -1
- package/dist/esm-node/plugins/deploy/platforms/cloudflare.mjs +160 -2
- package/dist/esm-node/plugins/deploy/platforms/templates/cloudflare-entry.mjs +50 -5
- package/dist/types/builder/builder-rspack/index.d.ts +1 -1
- package/dist/types/builder/generator/index.d.ts +1 -1
- package/dist/types/builder/shared/createCopyInfo.d.ts +1 -1
- package/dist/types/commands/inspect.d.ts +1 -1
- package/dist/types/locale/index.d.ts +89 -2
- package/dist/types/plugins/analyze/getFileSystemEntry.d.ts +2 -2
- package/dist/types/plugins/analyze/utils.d.ts +1 -1
- package/dist/types/plugins/deploy/utils/generator.d.ts +2 -2
- package/dist/types/plugins/deploy/utils/index.d.ts +1 -1
- package/dist/types/rsbuild.d.ts +1 -1
- package/dist/types/run/index.d.ts +1 -1
- package/dist/types/types/config/deploy.d.ts +48 -0
- package/dist/types/utils/getConfigFile.d.ts +1 -1
- package/dist/types/utils/loadPlugins.d.ts +2 -2
- package/package.json +15 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const walkDirectory: (dir: string) => string[];
|
|
2
|
-
export declare const replaceWithAlias: (base: string, filePath: string, alias: string) =>
|
|
2
|
+
export declare const replaceWithAlias: (base: string, filePath: string, alias: string) => string;
|
|
3
3
|
export declare const parseModule: ({ source, filename, }: {
|
|
4
4
|
source: string;
|
|
5
5
|
filename: string;
|
|
@@ -5,8 +5,8 @@ export declare const serverAppContextTemplate: (appContext: AppToolsContext) =>
|
|
|
5
5
|
sharedDirectory: string;
|
|
6
6
|
apiDirectory: string;
|
|
7
7
|
lambdaDirectory: string;
|
|
8
|
-
metaName:
|
|
9
|
-
bffRuntimeFramework:
|
|
8
|
+
metaName: string;
|
|
9
|
+
bffRuntimeFramework: "effect" | "hono";
|
|
10
10
|
};
|
|
11
11
|
export type PluginItem = [string, Record<string, any> | undefined];
|
|
12
12
|
export declare const genPluginImportsCode: (plugins: PluginItem[], isESM?: boolean) => string;
|
|
@@ -12,5 +12,5 @@ export declare const getProjectUsage: (appDirectory: string, distDirectory: stri
|
|
|
12
12
|
useWebServer: boolean;
|
|
13
13
|
};
|
|
14
14
|
export declare const getTemplatePath: (file: string) => string;
|
|
15
|
-
export declare const readTemplate: (file: string) => Promise<
|
|
15
|
+
export declare const readTemplate: (file: string) => Promise<string>;
|
|
16
16
|
export declare const resolveESMDependency: (entry: string) => Promise<string | undefined>;
|
package/dist/types/rsbuild.d.ts
CHANGED
|
@@ -7,6 +7,6 @@ type ResolveModernRsbuildConfigOptions = {
|
|
|
7
7
|
modifyModernConfig?: (config: AppUserConfig) => AppUserConfig | Promise<AppUserConfig>;
|
|
8
8
|
};
|
|
9
9
|
export declare function resolveModernRsbuildConfig(options: ResolveModernRsbuildConfigOptions): Promise<{
|
|
10
|
-
rsbuildConfig:
|
|
10
|
+
rsbuildConfig: import("@rsbuild/core").RsbuildConfig;
|
|
11
11
|
}>;
|
|
12
12
|
export type { ResolveModernRsbuildConfigOptions };
|
|
@@ -14,7 +14,7 @@ export declare function createRunOptions({ cwd, initialLog, metaName, version, i
|
|
|
14
14
|
initialLog: string;
|
|
15
15
|
configFile: string;
|
|
16
16
|
metaName: string;
|
|
17
|
-
internalPlugins:
|
|
17
|
+
internalPlugins: import("@modern-js/plugin").Plugin[];
|
|
18
18
|
handleSetupResult: typeof handleSetupResult;
|
|
19
19
|
}>;
|
|
20
20
|
export declare function run(options: RunOptions): Promise<void>;
|
|
@@ -27,6 +27,47 @@ export interface MicroFrontend {
|
|
|
27
27
|
attestation?: string;
|
|
28
28
|
}
|
|
29
29
|
export type DeployTarget = 'node' | 'vercel' | 'netlify' | 'ghPages' | 'cloudflare';
|
|
30
|
+
export type CloudflareWorkerSecurityCspMode = 'enforce' | 'report-only' | 'off';
|
|
31
|
+
export interface CloudflareWorkerSecurityCspConfig {
|
|
32
|
+
mode?: CloudflareWorkerSecurityCspMode;
|
|
33
|
+
directives?: Record<string, string[] | string | false>;
|
|
34
|
+
additionalScriptSrc?: string[];
|
|
35
|
+
additionalStyleSrc?: string[];
|
|
36
|
+
additionalConnectSrc?: string[];
|
|
37
|
+
additionalImgSrc?: string[];
|
|
38
|
+
frameAncestors?: string[] | false;
|
|
39
|
+
reportUri?: string;
|
|
40
|
+
reason?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface CloudflareWorkerSecurityNoindexConfig {
|
|
43
|
+
workersDev?: boolean;
|
|
44
|
+
localhost?: boolean;
|
|
45
|
+
previewHostnames?: string[];
|
|
46
|
+
reason?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface CloudflareWorkerSecurityConfig {
|
|
49
|
+
/**
|
|
50
|
+
* Disable all Cloudflare worker security defaults for this app.
|
|
51
|
+
* Prefer narrower escape hatches when possible.
|
|
52
|
+
*/
|
|
53
|
+
enabled?: boolean;
|
|
54
|
+
headers?: {
|
|
55
|
+
referrerPolicy?: string | false;
|
|
56
|
+
contentTypeOptions?: 'nosniff' | false;
|
|
57
|
+
permissionsPolicy?: string | false;
|
|
58
|
+
};
|
|
59
|
+
contentSecurityPolicy?: CloudflareWorkerSecurityCspConfig;
|
|
60
|
+
noindex?: boolean | CloudflareWorkerSecurityNoindexConfig;
|
|
61
|
+
cookies?: {
|
|
62
|
+
/**
|
|
63
|
+
* Cloudflare worker does not mutate application Set-Cookie headers by
|
|
64
|
+
* default; app-owned cookies should be secured by the owner that sets them.
|
|
65
|
+
*/
|
|
66
|
+
mutateSetCookie?: false;
|
|
67
|
+
reason?: string;
|
|
68
|
+
};
|
|
69
|
+
reason?: string;
|
|
70
|
+
}
|
|
30
71
|
export interface DeployUserConfig {
|
|
31
72
|
/**
|
|
32
73
|
* Selects the deploy output preset.
|
|
@@ -41,6 +82,13 @@ export interface DeployUserConfig {
|
|
|
41
82
|
microFrontend?: boolean | MicroFrontend;
|
|
42
83
|
worker?: {
|
|
43
84
|
name?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Cloudflare Workers compatibility date for generated wrangler config.
|
|
87
|
+
* Use YYYY-MM-DD. Defaults to the date validated against the bundled
|
|
88
|
+
* Wrangler version used by UltraModern generated workspaces.
|
|
89
|
+
*/
|
|
90
|
+
compatibilityDate?: string;
|
|
44
91
|
ssr?: boolean;
|
|
92
|
+
security?: CloudflareWorkerSecurityConfig;
|
|
45
93
|
};
|
|
46
94
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getConfigFile: (configFile?: string, cwd?: string) =>
|
|
1
|
+
export declare const getConfigFile: (configFile?: string, cwd?: string) => string | false;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CLIPluginAPI } from '@modern-js/plugin';
|
|
1
|
+
import type { CLIPluginAPI, Plugin } from '@modern-js/plugin';
|
|
2
2
|
import type { ServerPlugin as ServerPluginInstance } from '@modern-js/server-core';
|
|
3
3
|
import type { InternalPlugins, ServerPlugin } from '@modern-js/types';
|
|
4
4
|
import type { AppTools } from '../types';
|
|
@@ -10,4 +10,4 @@ export declare function loadServerPlugins(api: CLIPluginAPI<AppTools>, appDirect
|
|
|
10
10
|
* @param internalPlugins - Internal plugins.
|
|
11
11
|
* @returns Plugin Objects has been required.
|
|
12
12
|
*/
|
|
13
|
-
export declare const loadInternalPlugins: (appDirectory: string, internalPlugins?: InternalPlugins) => Promise<
|
|
13
|
+
export declare const loadInternalPlugins: (appDirectory: string, internalPlugins?: InternalPlugins) => Promise<Plugin[]>;
|
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.103",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"exports": {
|
|
@@ -82,11 +82,11 @@
|
|
|
82
82
|
"modern-app": "bin/modern.js"
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
|
-
"@babel/parser": "^7.29.
|
|
86
|
-
"@babel/traverse": "^7.29.
|
|
87
|
-
"@babel/types": "^7.29.
|
|
85
|
+
"@babel/parser": "^7.29.7",
|
|
86
|
+
"@babel/traverse": "^7.29.7",
|
|
87
|
+
"@babel/types": "^7.29.7",
|
|
88
88
|
"@loadable/component": "5.16.7",
|
|
89
|
-
"@rsbuild/core": "2.0.
|
|
89
|
+
"@rsbuild/core": "2.0.10",
|
|
90
90
|
"@swc/core": "1.15.40",
|
|
91
91
|
"@swc/helpers": "^0.5.23",
|
|
92
92
|
"compression-webpack-plugin": "^12.0.0",
|
|
@@ -99,16 +99,16 @@
|
|
|
99
99
|
"ndepe": "^0.1.13",
|
|
100
100
|
"pkg-types": "^2.3.1",
|
|
101
101
|
"std-env": "4.1.0",
|
|
102
|
-
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.
|
|
103
|
-
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.
|
|
104
|
-
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.
|
|
105
|
-
"@modern-js/
|
|
106
|
-
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.
|
|
107
|
-
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.
|
|
108
|
-
"@modern-js/
|
|
109
|
-
"@modern-js/
|
|
110
|
-
"@modern-js/
|
|
111
|
-
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.
|
|
102
|
+
"@modern-js/builder": "npm:@bleedingdev/modern-js-builder@3.2.0-ultramodern.103",
|
|
103
|
+
"@modern-js/i18n-utils": "npm:@bleedingdev/modern-js-i18n-utils@3.2.0-ultramodern.103",
|
|
104
|
+
"@modern-js/plugin-data-loader": "npm:@bleedingdev/modern-js-plugin-data-loader@3.2.0-ultramodern.103",
|
|
105
|
+
"@modern-js/server": "npm:@bleedingdev/modern-js-server@3.2.0-ultramodern.103",
|
|
106
|
+
"@modern-js/server-core": "npm:@bleedingdev/modern-js-server-core@3.2.0-ultramodern.103",
|
|
107
|
+
"@modern-js/prod-server": "npm:@bleedingdev/modern-js-prod-server@3.2.0-ultramodern.103",
|
|
108
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.2.0-ultramodern.103",
|
|
109
|
+
"@modern-js/plugin": "npm:@bleedingdev/modern-js-plugin@3.2.0-ultramodern.103",
|
|
110
|
+
"@modern-js/utils": "npm:@bleedingdev/modern-js-utils@3.2.0-ultramodern.103",
|
|
111
|
+
"@modern-js/server-utils": "npm:@bleedingdev/modern-js-server-utils@3.2.0-ultramodern.103"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@rslib/core": "0.21.5",
|