@modern-js/core 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/config/loadConfig.d.ts +4 -6
- package/dist/context.d.ts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/manager.d.ts +6 -6
- package/dist/runBin.d.ts +1 -1
- package/dist/utils/mergeConfig.d.ts +1 -1
- package/package.json +8 -8
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import path from 'path';
|
|
3
1
|
export declare const CONFIG_FILE_NAME = "modern.config";
|
|
4
2
|
export declare const LOCAL_CONFIG_FILE_NAME = "modern.config.local";
|
|
5
3
|
export declare const PACKAGE_JSON_CONFIG_NAME = "modernConfig";
|
|
@@ -28,9 +26,9 @@ export declare const getConfigFilePath: (appDirectory: string, filePath?: string
|
|
|
28
26
|
* @param configFile - Specific absolute config file path.
|
|
29
27
|
* @returns Object contain config file path, user config object and dependency files used by config file.
|
|
30
28
|
*/
|
|
31
|
-
export declare const loadConfig: <T>(appDirectory: string, configFile: string | false, packageJsonConfig?: string, loadedConfig?: T
|
|
29
|
+
export declare const loadConfig: <T>(appDirectory: string, configFile: string | false, packageJsonConfig?: string, loadedConfig?: T) => Promise<{
|
|
32
30
|
path: string | false;
|
|
33
|
-
config?: T
|
|
34
|
-
dependencies?: string[]
|
|
35
|
-
pkgConfig?: T
|
|
31
|
+
config?: T;
|
|
32
|
+
dependencies?: string[];
|
|
33
|
+
pkgConfig?: T;
|
|
36
34
|
}>;
|
package/dist/context.d.ts
CHANGED
|
@@ -25,11 +25,11 @@ export declare const initAppContext: ({ appDirectory, plugins, configFile, runti
|
|
|
25
25
|
configFile: string | false;
|
|
26
26
|
runtimeConfigFile: string;
|
|
27
27
|
options?: {
|
|
28
|
-
metaName?: string
|
|
29
|
-
srcDir?: string
|
|
30
|
-
apiDir?: string
|
|
31
|
-
distDir?: string
|
|
32
|
-
sharedDir?: string
|
|
33
|
-
}
|
|
28
|
+
metaName?: string;
|
|
29
|
+
srcDir?: string;
|
|
30
|
+
apiDir?: string;
|
|
31
|
+
distDir?: string;
|
|
32
|
+
sharedDir?: string;
|
|
33
|
+
};
|
|
34
34
|
serverConfigFile: string;
|
|
35
35
|
}) => IAppContext;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,16 +6,16 @@ export { mergeConfig, initAppDir } from './utils';
|
|
|
6
6
|
export { manager, createPlugin, registerHook } from './manager';
|
|
7
7
|
export { AppContext, ConfigContext, ResolvedConfigContext, useAppContext, useConfigContext, useResolvedConfigContext, initAppContext, } from './context';
|
|
8
8
|
export declare const cli: {
|
|
9
|
-
init: (options?: import("./types").CoreOptions
|
|
9
|
+
init: (options?: import("./types").CoreOptions) => Promise<{
|
|
10
10
|
resolved: import("./types").NormalizedConfig<{}>;
|
|
11
11
|
appContext: import("./types").IAppContext;
|
|
12
12
|
}>;
|
|
13
|
-
run: (options?: import("./types").CoreOptions
|
|
13
|
+
run: (options?: import("./types").CoreOptions) => Promise<void>;
|
|
14
14
|
test: (argv: string[], options?: {
|
|
15
|
-
coreOptions?: import("./types").CoreOptions
|
|
16
|
-
disableWatcher?: boolean
|
|
17
|
-
}
|
|
18
|
-
runCommand: (command: string, commandOptions?: string[], options?: import("./types").CoreOptions
|
|
15
|
+
coreOptions?: import("./types").CoreOptions;
|
|
16
|
+
disableWatcher?: boolean;
|
|
17
|
+
}) => Promise<void>;
|
|
18
|
+
runCommand: (command: string, commandOptions?: string[], options?: import("./types").CoreOptions) => Promise<void>;
|
|
19
19
|
getPrevInitOptions: () => import("./types").CoreOptions | undefined;
|
|
20
20
|
};
|
|
21
21
|
declare module '@modern-js/utils/compiled/commander' {
|
package/dist/manager.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export declare const manager: import("@modern-js/plugin").AsyncManager<{
|
|
|
13
13
|
}>;
|
|
14
14
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
15
15
|
filename: string;
|
|
16
|
-
eventType: "add" | "
|
|
16
|
+
eventType: "add" | "change" | "unlink";
|
|
17
17
|
isPrivate: boolean;
|
|
18
18
|
}, void>;
|
|
19
19
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
|
@@ -36,7 +36,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
|
|
|
36
36
|
}>;
|
|
37
37
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
38
38
|
filename: string;
|
|
39
|
-
eventType: "add" | "
|
|
39
|
+
eventType: "add" | "change" | "unlink";
|
|
40
40
|
isPrivate: boolean;
|
|
41
41
|
}, void>;
|
|
42
42
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
|
@@ -58,7 +58,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
|
|
|
58
58
|
}>;
|
|
59
59
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
60
60
|
filename: string;
|
|
61
|
-
eventType: "add" | "
|
|
61
|
+
eventType: "add" | "change" | "unlink";
|
|
62
62
|
isPrivate: boolean;
|
|
63
63
|
}, void>;
|
|
64
64
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
|
@@ -80,7 +80,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
|
|
|
80
80
|
}>;
|
|
81
81
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
82
82
|
filename: string;
|
|
83
|
-
eventType: "add" | "
|
|
83
|
+
eventType: "add" | "change" | "unlink";
|
|
84
84
|
isPrivate: boolean;
|
|
85
85
|
}, void>;
|
|
86
86
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
|
@@ -102,7 +102,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
|
|
|
102
102
|
}>;
|
|
103
103
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
104
104
|
filename: string;
|
|
105
|
-
eventType: "add" | "
|
|
105
|
+
eventType: "add" | "change" | "unlink";
|
|
106
106
|
isPrivate: boolean;
|
|
107
107
|
}, void>;
|
|
108
108
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
|
@@ -124,7 +124,7 @@ export declare const createPlugin: (setup?: import("@modern-js/plugin").AsyncSet
|
|
|
124
124
|
}>;
|
|
125
125
|
fileChange: import("@modern-js/plugin").AsyncWorkflow<{
|
|
126
126
|
filename: string;
|
|
127
|
-
eventType: "add" | "
|
|
127
|
+
eventType: "add" | "change" | "unlink";
|
|
128
128
|
isPrivate: boolean;
|
|
129
129
|
}, void>;
|
|
130
130
|
commands: import("@modern-js/plugin").AsyncWorkflow<{
|
package/dist/runBin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { type CoreOptions } from '.';
|
|
3
3
|
export declare const run: (otherCoreOptions?: CoreOptions, options?: {
|
|
4
|
-
override?: boolean | ((coreOptions: CoreOptions) => Promise<CoreOptions> | CoreOptions)
|
|
4
|
+
override?: boolean | ((coreOptions: CoreOptions) => Promise<CoreOptions> | CoreOptions);
|
|
5
5
|
}) => Promise<void>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { NormalizedConfig, UserConfig } from '../types';
|
|
2
|
-
export declare const mergeConfig: <ExtendConfig extends Record<string, any>>(configs:
|
|
2
|
+
export declare const mergeConfig: <ExtendConfig extends Record<string, any>>(configs: Array<UserConfig<ExtendConfig> | NormalizedConfig<ExtendConfig>>) => NormalizedConfig<ExtendConfig>;
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"modern",
|
|
15
15
|
"modern.js"
|
|
16
16
|
],
|
|
17
|
-
"version": "2.
|
|
17
|
+
"version": "2.66.0",
|
|
18
18
|
"jsnext:source": "./src/index.ts",
|
|
19
19
|
"types": "./dist/index.d.ts",
|
|
20
20
|
"main": "./dist/index.js",
|
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
73
|
"@swc/helpers": "0.5.13",
|
|
74
|
-
"@modern-js/node-bundle-require": "2.
|
|
75
|
-
"@modern-js/plugin": "2.
|
|
76
|
-
"@modern-js/utils": "2.
|
|
74
|
+
"@modern-js/node-bundle-require": "2.66.0",
|
|
75
|
+
"@modern-js/plugin": "2.66.0",
|
|
76
|
+
"@modern-js/utils": "2.66.0"
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
79
|
"@types/jest": "^29",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"jest": "^29",
|
|
82
82
|
"tsm": "2.3.0",
|
|
83
83
|
"typescript": "^5",
|
|
84
|
-
"@modern-js/
|
|
85
|
-
"@
|
|
86
|
-
"@scripts/
|
|
87
|
-
"@
|
|
84
|
+
"@modern-js/types": "2.66.0",
|
|
85
|
+
"@modern-js/uni-builder": "2.66.0",
|
|
86
|
+
"@scripts/build": "2.66.0",
|
|
87
|
+
"@scripts/jest-config": "2.66.0"
|
|
88
88
|
},
|
|
89
89
|
"sideEffects": false,
|
|
90
90
|
"publishConfig": {
|