@modern-js/utils 1.3.8-canary.0 → 1.6.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/CHANGELOG.md +49 -0
- package/compiled/address/index.js +1 -0
- package/compiled/address/lib/address.d.ts +28 -0
- package/compiled/address/package.json +1 -0
- package/compiled/browserslist/index.js +1 -1
- package/compiled/dotenv/index.js +1 -0
- package/compiled/dotenv/license +23 -0
- package/compiled/dotenv/package.json +1 -0
- package/compiled/dotenv/types/index.d.ts +59 -0
- package/compiled/dotenv-expand/index.d.ts +15 -0
- package/compiled/dotenv-expand/index.js +1 -0
- package/compiled/dotenv-expand/license +24 -0
- package/compiled/dotenv-expand/package.json +1 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/compiled/fast-glob/index.js +37 -0
- package/compiled/fast-glob/license +21 -0
- package/compiled/fast-glob/out/index.d.ts +27 -0
- package/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
- package/compiled/fast-glob/out/settings.d.ts +164 -0
- package/compiled/fast-glob/out/types/index.d.ts +31 -0
- package/compiled/fast-glob/package.json +1 -0
- package/compiled/globby/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/compiled/globby/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/compiled/globby/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/compiled/globby/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/compiled/globby/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/compiled/globby/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/compiled/globby/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/compiled/globby/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/compiled/globby/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/compiled/globby/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/compiled/globby/fast-glob/index.d.ts +27 -0
- package/compiled/globby/fast-glob/managers/tasks.d.ts +22 -0
- package/compiled/globby/fast-glob/settings.d.ts +164 -0
- package/compiled/globby/fast-glob/types/index.d.ts +31 -0
- package/compiled/globby/index.d.ts +186 -0
- package/compiled/globby/index.js +1 -0
- package/compiled/globby/license +9 -0
- package/compiled/globby/package.json +1 -0
- package/compiled/inquirer/index.d.ts +997 -0
- package/compiled/inquirer/index.js +9 -0
- package/compiled/inquirer/lib/objects/choice.d.ts +65 -0
- package/compiled/inquirer/lib/objects/choices.d.ts +206 -0
- package/compiled/inquirer/lib/objects/separator.d.ts +37 -0
- package/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
- package/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
- package/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
- package/compiled/inquirer/license +22 -0
- package/compiled/inquirer/package.json +1 -0
- package/compiled/inquirer/through/index.d.ts +25 -0
- package/compiled/json5/index.js +1 -0
- package/compiled/json5/lib/index.d.ts +4 -0
- package/compiled/json5/lib/parse.d.ts +15 -0
- package/compiled/json5/lib/stringify.d.ts +89 -0
- package/compiled/json5/package.json +1 -0
- package/compiled/mime-types/index.d.ts +14 -0
- package/compiled/mime-types/index.js +14 -0
- package/compiled/mime-types/license +23 -0
- package/compiled/mime-types/package.json +1 -0
- package/compiled/minimist/index.d.ts +95 -0
- package/compiled/minimist/index.js +1 -0
- package/compiled/minimist/license +18 -0
- package/compiled/minimist/package.json +1 -0
- package/compiled/ora/cli-spinners/index.d.ts +125 -0
- package/compiled/ora/index.d.ts +277 -0
- package/compiled/ora/index.js +3 -0
- package/compiled/ora/license +9 -0
- package/compiled/ora/package.json +1 -0
- package/compiled/slash/index.d.ts +25 -0
- package/compiled/slash/index.js +1 -0
- package/compiled/slash/license +9 -0
- package/compiled/slash/package.json +1 -0
- package/compiled/url-join/index.d.ts +17 -0
- package/compiled/url-join/index.js +1 -0
- package/compiled/url-join/license +21 -0
- package/compiled/url-join/package.json +1 -0
- package/dist/analyzeProject.d.ts +1 -0
- package/dist/analyzeProject.js +40 -0
- package/dist/compiled.d.ts +33 -17
- package/dist/compiled.js +57 -21
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/prettyInstructions.js +3 -3
- package/dist/{ssrHelpers.d.ts → ssr.d.ts} +3 -0
- package/dist/{ssrHelpers.js → ssr.js} +0 -0
- package/dist/storage.js +1 -1
- package/package.json +12 -30
- package/dist/getCacheIdentifier.d.ts +0 -7
- package/dist/getCacheIdentifier.js +0 -24
- package/dist/js/modern/monorepo.js +0 -83
- package/dist/js/node/monorepo.js +0 -116
- package/dist/js/treeshaking/monorepo.js +0 -96
- package/dist/pkgUp.d.ts +0 -2
- package/dist/pkgUp.js +0 -8
- package/dist/types/FileSizeReporter.d.ts +0 -16
- package/dist/types/alias.d.ts +0 -21
- package/dist/types/applyOptionsChain.d.ts +0 -6
- package/dist/types/clearConsole.d.ts +0 -1
- package/dist/types/compatRequire.d.ts +0 -8
- package/dist/types/compiled.d.ts +0 -17
- package/dist/types/constants.d.ts +0 -222
- package/dist/types/debug.d.ts +0 -6
- package/dist/types/emptyDir.d.ts +0 -1
- package/dist/types/ensureAbsolutePath.d.ts +0 -7
- package/dist/types/findExists.d.ts +0 -6
- package/dist/types/format.d.ts +0 -16
- package/dist/types/generateMetaTags.d.ts +0 -16
- package/dist/types/getBrowserslist.d.ts +0 -2
- package/dist/types/getCacheIdentifier.d.ts +0 -7
- package/dist/types/getEntryOptions.d.ts +0 -1
- package/dist/types/getPackageManager.d.ts +0 -1
- package/dist/types/getPort.d.ts +0 -7
- package/dist/types/getServerConfig.d.ts +0 -1
- package/dist/types/import.d.ts +0 -5
- package/dist/types/index.d.ts +0 -32
- package/dist/types/is/index.d.ts +0 -34
- package/dist/types/is/node-env.d.ts +0 -4
- package/dist/types/is/platform.d.ts +0 -2
- package/dist/types/is/type.d.ts +0 -8
- package/dist/types/logger.d.ts +0 -63
- package/dist/types/monorepo.d.ts +0 -11
- package/dist/types/nodeEnv.d.ts +0 -3
- package/dist/types/path.d.ts +0 -3
- package/dist/types/prettyInstructions.d.ts +0 -6
- package/dist/types/printBuildError.d.ts +0 -8
- package/dist/types/readTsConfig.d.ts +0 -2
- package/dist/types/removeSlash.d.ts +0 -3
- package/dist/types/runtimeExports.d.ts +0 -4
- package/dist/types/wait.d.ts +0 -2
- package/dist/types/watch.d.ts +0 -8
- package/modern.config.js +0 -6
- package/tests/.eslintrc.js +0 -6
- package/tests/__snapshots__/prettyInstructions.test.ts.snap +0 -19
- package/tests/applyOptionsChain.test.ts +0 -100
- package/tests/compatRequire.test.ts +0 -32
- package/tests/debug.test.ts +0 -25
- package/tests/ensureAbsolutePath.test.ts +0 -16
- package/tests/findExists.test.ts +0 -22
- package/tests/fixtures/browserlist/develop/package.json +0 -11
- package/tests/fixtures/browserlist/dotfile/.browserslistrc +0 -3
- package/tests/fixtures/browserlist/pkg/package.json +0 -7
- package/tests/fixtures/compat-require/cjs.js +0 -1
- package/tests/fixtures/compat-require/empty.js +0 -1
- package/tests/fixtures/compat-require/esm.js +0 -5
- package/tests/fixtures/compat-require/foo.js +0 -3
- package/tests/fixtures/file-exists/a.ejs +0 -0
- package/tests/fixtures/file-exists/a.js/.gitkeep +0 -0
- package/tests/fixtures/file-exists/a.mjs +0 -0
- package/tests/fixtures/file-exists/a.ts +0 -0
- package/tests/format.test.ts +0 -60
- package/tests/generateMetaTags.test.ts +0 -19
- package/tests/getBrowserslist.test.ts +0 -32
- package/tests/getCacheIdentifier.test.ts +0 -37
- package/tests/getEntryOptions.test.ts +0 -53
- package/tests/index.test.ts +0 -18
- package/tests/is.test.ts +0 -27
- package/tests/isPlatform.test.ts +0 -19
- package/tests/isType.test.ts +0 -85
- package/tests/logger.test.ts +0 -53
- package/tests/prettyInstructions.test.ts +0 -139
- package/tests/removeSlash.test.ts +0 -19
- package/tests/tsconfig.json +0 -11
- package/tests/wait.ts +0 -38
|
@@ -1,222 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* hmr socket connect path
|
|
3
|
-
*/
|
|
4
|
-
export declare const HMR_SOCK_PATH = "/_modern_js_hmr_ws";
|
|
5
|
-
/**
|
|
6
|
-
* route specification file
|
|
7
|
-
*/
|
|
8
|
-
export declare const ROUTE_SPEC_FILE = "route.json";
|
|
9
|
-
/**
|
|
10
|
-
* main entry name
|
|
11
|
-
*/
|
|
12
|
-
export declare const MAIN_ENTRY_NAME = "main";
|
|
13
|
-
/**
|
|
14
|
-
* open editor request path
|
|
15
|
-
*/
|
|
16
|
-
export declare const LAUNCH_EDITOR_ENDPOINT = "/__open-stack-frame-in-editor";
|
|
17
|
-
/**
|
|
18
|
-
* server side bundles directory, which relative to dist.
|
|
19
|
-
*/
|
|
20
|
-
export declare const SERVER_BUNDLE_DIRECTORY = "bundles";
|
|
21
|
-
/**
|
|
22
|
-
* entry name pattern used for ajv pattern properties.
|
|
23
|
-
*/
|
|
24
|
-
export declare const ENTRY_NAME_PATTERN = "^[a-zA-Z0-9_-]+$";
|
|
25
|
-
/**
|
|
26
|
-
* SSR server render function name
|
|
27
|
-
*/
|
|
28
|
-
export declare const SERVER_RENDER_FUNCTION_NAME = "serverRender";
|
|
29
|
-
/**
|
|
30
|
-
* loadbale manifest json file
|
|
31
|
-
*/
|
|
32
|
-
export declare const LOADABLE_STATS_FILE = "loadable-stats.json";
|
|
33
|
-
/**
|
|
34
|
-
* internal specified folder
|
|
35
|
-
*/
|
|
36
|
-
export declare const API_DIR = "api";
|
|
37
|
-
export declare const SERVER_DIR = "server";
|
|
38
|
-
export declare const SHARED_DIR = "shared";
|
|
39
|
-
/**
|
|
40
|
-
* Modern.config.ts cached dir
|
|
41
|
-
*/
|
|
42
|
-
export declare const CONFIG_CACHE_DIR = "./node_modules/.node-bundle-require";
|
|
43
|
-
export declare const CONFIG_FILE_EXTENSIONS: string[];
|
|
44
|
-
/**
|
|
45
|
-
* Serialized config path
|
|
46
|
-
*/
|
|
47
|
-
export declare const OUTPUT_CONFIG_FILE = "modern.config.json";
|
|
48
|
-
/**
|
|
49
|
-
* Default server config basename
|
|
50
|
-
*/
|
|
51
|
-
export declare const DEFAULT_SERVER_CONFIG = "modern.server.config";
|
|
52
|
-
/**
|
|
53
|
-
* Internal plugins that work as soon as they are installed.
|
|
54
|
-
*/
|
|
55
|
-
export declare const INTERNAL_PLUGINS: {
|
|
56
|
-
[name: string]: {
|
|
57
|
-
cli?: string;
|
|
58
|
-
server?: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* The schema registered in the plugin.
|
|
63
|
-
*/
|
|
64
|
-
export declare const PLUGIN_SCHEMAS: {
|
|
65
|
-
'@modern-js/runtime': ({
|
|
66
|
-
target: string;
|
|
67
|
-
schema: {
|
|
68
|
-
type: string;
|
|
69
|
-
additionalProperties: boolean;
|
|
70
|
-
patternProperties?: undefined;
|
|
71
|
-
};
|
|
72
|
-
} | {
|
|
73
|
-
target: string;
|
|
74
|
-
schema: {
|
|
75
|
-
type: string;
|
|
76
|
-
patternProperties: {
|
|
77
|
-
"^[a-zA-Z0-9_-]+$": {
|
|
78
|
-
type: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
additionalProperties: boolean;
|
|
82
|
-
};
|
|
83
|
-
})[];
|
|
84
|
-
'@modern-js/plugin-bff': {
|
|
85
|
-
target: string;
|
|
86
|
-
schema: {
|
|
87
|
-
type: string;
|
|
88
|
-
properties: {
|
|
89
|
-
prefix: {
|
|
90
|
-
type: string[];
|
|
91
|
-
items: {
|
|
92
|
-
type: string;
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
fetcher: {
|
|
96
|
-
type: string;
|
|
97
|
-
};
|
|
98
|
-
proxy: {
|
|
99
|
-
type: string;
|
|
100
|
-
};
|
|
101
|
-
requestCreator: {
|
|
102
|
-
type: string;
|
|
103
|
-
};
|
|
104
|
-
};
|
|
105
|
-
};
|
|
106
|
-
}[];
|
|
107
|
-
'@modern-js/plugin-esbuild': {
|
|
108
|
-
target: string;
|
|
109
|
-
schema: {
|
|
110
|
-
typeof: string[];
|
|
111
|
-
};
|
|
112
|
-
}[];
|
|
113
|
-
'@modern-js/plugin-less': {
|
|
114
|
-
target: string;
|
|
115
|
-
schema: {
|
|
116
|
-
typeof: string[];
|
|
117
|
-
};
|
|
118
|
-
}[];
|
|
119
|
-
'@modern-js/plugin-sass': {
|
|
120
|
-
target: string;
|
|
121
|
-
schema: {
|
|
122
|
-
typeof: string[];
|
|
123
|
-
};
|
|
124
|
-
}[];
|
|
125
|
-
'@modern-js/plugin-tailwindcss': {
|
|
126
|
-
target: string;
|
|
127
|
-
schema: {
|
|
128
|
-
typeof: string[];
|
|
129
|
-
};
|
|
130
|
-
}[];
|
|
131
|
-
'@modern-js/plugin-proxy': {
|
|
132
|
-
target: string;
|
|
133
|
-
schema: {
|
|
134
|
-
typeof: string[];
|
|
135
|
-
};
|
|
136
|
-
}[];
|
|
137
|
-
'@modern-js/plugin-unbundle': ({
|
|
138
|
-
target: string;
|
|
139
|
-
schema: {
|
|
140
|
-
type: string;
|
|
141
|
-
properties?: undefined;
|
|
142
|
-
};
|
|
143
|
-
} | {
|
|
144
|
-
target: string;
|
|
145
|
-
schema: {
|
|
146
|
-
type: string;
|
|
147
|
-
properties: {
|
|
148
|
-
ignore: {
|
|
149
|
-
type: string[];
|
|
150
|
-
items: {
|
|
151
|
-
type: string;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
154
|
-
ignoreModuleCache: {
|
|
155
|
-
type: string;
|
|
156
|
-
};
|
|
157
|
-
clearPdnCache: {
|
|
158
|
-
type: string;
|
|
159
|
-
};
|
|
160
|
-
pdnHost: {
|
|
161
|
-
type: string;
|
|
162
|
-
};
|
|
163
|
-
};
|
|
164
|
-
};
|
|
165
|
-
})[];
|
|
166
|
-
'@modern-js/plugin-ssg': {
|
|
167
|
-
target: string;
|
|
168
|
-
schema: {
|
|
169
|
-
oneOf: ({
|
|
170
|
-
type: string;
|
|
171
|
-
instanceof?: undefined;
|
|
172
|
-
} | {
|
|
173
|
-
instanceof: string;
|
|
174
|
-
type?: undefined;
|
|
175
|
-
})[];
|
|
176
|
-
};
|
|
177
|
-
}[];
|
|
178
|
-
'@modern-js/plugin-ssr': {
|
|
179
|
-
target: string;
|
|
180
|
-
schema: {
|
|
181
|
-
type: string[];
|
|
182
|
-
};
|
|
183
|
-
}[];
|
|
184
|
-
'@modern-js/plugin-state': {
|
|
185
|
-
target: string;
|
|
186
|
-
schema: {
|
|
187
|
-
type: string[];
|
|
188
|
-
};
|
|
189
|
-
}[];
|
|
190
|
-
'@modern-js/plugin-design-token': ({
|
|
191
|
-
target: string;
|
|
192
|
-
schema: {
|
|
193
|
-
typeof: string[];
|
|
194
|
-
type?: undefined;
|
|
195
|
-
};
|
|
196
|
-
} | {
|
|
197
|
-
target: string;
|
|
198
|
-
schema: {
|
|
199
|
-
type: string[];
|
|
200
|
-
typeof?: undefined;
|
|
201
|
-
};
|
|
202
|
-
})[];
|
|
203
|
-
'@modern-js/plugin-router': {
|
|
204
|
-
target: string;
|
|
205
|
-
schema: {
|
|
206
|
-
type: string[];
|
|
207
|
-
};
|
|
208
|
-
}[];
|
|
209
|
-
'@modern-js/plugin-testing': {
|
|
210
|
-
target: string;
|
|
211
|
-
schema: {
|
|
212
|
-
typeof: string[];
|
|
213
|
-
};
|
|
214
|
-
}[];
|
|
215
|
-
'@modern-js/plugin-garfish': {
|
|
216
|
-
target: string;
|
|
217
|
-
schema: {
|
|
218
|
-
type: string[];
|
|
219
|
-
};
|
|
220
|
-
}[];
|
|
221
|
-
'@modern-js/plugin-nocode': never[];
|
|
222
|
-
};
|
package/dist/types/debug.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create debug function with unified namespace prefix.
|
|
3
|
-
* @param scope - Custom module name of your debug function.
|
|
4
|
-
* @returns Debug function which namespace start with modern-js:.
|
|
5
|
-
*/
|
|
6
|
-
export declare const createDebugger: (scope: string) => import("../compiled/debug").Debugger;
|
package/dist/types/emptyDir.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const emptyDir: (dir: string) => Promise<void>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ensure absolute file path.
|
|
3
|
-
* @param base - Base path to resolve relative from.
|
|
4
|
-
* @param filePath - Aboluste or relative file path.
|
|
5
|
-
* @returns Resolved absolute file path.
|
|
6
|
-
*/
|
|
7
|
-
export declare const ensureAbsolutePath: (base: string, filePath: string) => string;
|
package/dist/types/format.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file at
|
|
6
|
-
* https://github.com/facebook/create-react-app/blob/master/LICENSE
|
|
7
|
-
*/
|
|
8
|
-
import { StatsCompilation } from 'webpack';
|
|
9
|
-
import type { ProxyDetail, BffProxyOptions } from '@modern-js/types';
|
|
10
|
-
declare function formatWebpackMessages(json: StatsCompilation): {
|
|
11
|
-
errors: string[];
|
|
12
|
-
warnings: string[];
|
|
13
|
-
};
|
|
14
|
-
export { formatWebpackMessages };
|
|
15
|
-
declare function formatProxyOptions(proxyOptions: BffProxyOptions): ProxyDetail[];
|
|
16
|
-
export { formatProxyOptions };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright JS Foundation and other contributors.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file at
|
|
6
|
-
* https://github.com/jantimon/html-webpack-plugin/blob/main/LICENSE
|
|
7
|
-
*
|
|
8
|
-
* Modified from https://github.com/jantimon/html-webpack-plugin/blob/2f5de7ab9e8bca60e9e200f2e4b4cfab90db28d4/index.js#L800
|
|
9
|
-
*/
|
|
10
|
-
export declare type MetaAttributes = {
|
|
11
|
-
[attributeName: string]: string | boolean;
|
|
12
|
-
};
|
|
13
|
-
export interface MetaOptions {
|
|
14
|
-
[name: string]: string | false | MetaAttributes;
|
|
15
|
-
}
|
|
16
|
-
export declare const generateMetaTags: (metaOptions?: MetaOptions | undefined) => string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getEntryOptions: <T>(name: string, baseOptions?: T | undefined, optionsByEntries?: Record<string, T> | undefined, packageName?: string | undefined) => T | undefined;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getPackageManager(cwd?: string): Promise<"npm" | "yarn" | "pnpm">;
|
package/dist/types/getPort.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getServerConfig: (appDirectory: string, configFile: string) => Promise<string | false>;
|
package/dist/types/import.d.ts
DELETED
package/dist/types/index.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export * from './compiled';
|
|
2
|
-
export * from './format';
|
|
3
|
-
export * from './FileSizeReporter';
|
|
4
|
-
export * from './printBuildError';
|
|
5
|
-
export * from './debug';
|
|
6
|
-
export * from './findExists';
|
|
7
|
-
export * from './is';
|
|
8
|
-
export * from './compatRequire';
|
|
9
|
-
export * from './logger';
|
|
10
|
-
export * from './constants';
|
|
11
|
-
export * from './ensureAbsolutePath';
|
|
12
|
-
export * from './getCacheIdentifier';
|
|
13
|
-
export * from './clearConsole';
|
|
14
|
-
export * from './applyOptionsChain';
|
|
15
|
-
export * from './getBrowserslist';
|
|
16
|
-
export * from './removeSlash';
|
|
17
|
-
export * from './getEntryOptions';
|
|
18
|
-
export * from './getPort';
|
|
19
|
-
export * from './monorepo';
|
|
20
|
-
export * from './getPackageManager';
|
|
21
|
-
export * from './runtimeExports';
|
|
22
|
-
export * from './readTsConfig';
|
|
23
|
-
export * from './path';
|
|
24
|
-
export * from './generateMetaTags';
|
|
25
|
-
export * from './prettyInstructions';
|
|
26
|
-
export * from './alias';
|
|
27
|
-
export * from './import';
|
|
28
|
-
export * from './watch';
|
|
29
|
-
export * from './nodeEnv';
|
|
30
|
-
export * from './wait';
|
|
31
|
-
export * from './emptyDir';
|
|
32
|
-
export * from './getServerConfig';
|
package/dist/types/is/index.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Check if the package name is in dependencies or devDependencies.
|
|
3
|
-
*
|
|
4
|
-
* @param appDirectory - Project root directory.
|
|
5
|
-
* @param name - Package name.
|
|
6
|
-
* @returns True if the name is in dependencies or devDependencies, false otherwise.
|
|
7
|
-
*/
|
|
8
|
-
export declare const isDepExists: (appDirectory: string, name: string) => boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Is typescript project.
|
|
11
|
-
*
|
|
12
|
-
* @param root - App directory.
|
|
13
|
-
* @returns Whether to use typescript.
|
|
14
|
-
*/
|
|
15
|
-
export declare const isTypescript: (root: string) => boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Is Empty object
|
|
18
|
-
*
|
|
19
|
-
* @param o - Any object.
|
|
20
|
-
* @returns Whether it is empty object.
|
|
21
|
-
*/
|
|
22
|
-
export declare const isEmpty: (o: Record<string, unknown>) => boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Is SSR project
|
|
25
|
-
*
|
|
26
|
-
* @param config - User config.
|
|
27
|
-
* @returns Whether to use server side render.
|
|
28
|
-
*/
|
|
29
|
-
export declare const isSSR: (config: any) => boolean;
|
|
30
|
-
export declare const isUseSSRBundle: (config: any) => boolean;
|
|
31
|
-
export declare const isFastRefresh: () => boolean;
|
|
32
|
-
export * from './node-env';
|
|
33
|
-
export * from './platform';
|
|
34
|
-
export * from './type';
|
package/dist/types/is/type.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare function isString(str: any): str is string;
|
|
2
|
-
export declare function isUndefined(obj: any): obj is undefined;
|
|
3
|
-
export declare function isArray(obj: unknown): obj is any[];
|
|
4
|
-
export declare function isFunction(func: any): func is Function;
|
|
5
|
-
export declare function isObject(obj: unknown): obj is Record<string, any>;
|
|
6
|
-
export declare function isPlainObject(obj: unknown): obj is Record<string, any>;
|
|
7
|
-
export declare function isPromise(obj: any): obj is Promise<any>;
|
|
8
|
-
export declare function isRegExp(obj: any): obj is RegExp;
|
package/dist/types/logger.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Color } from '../compiled/chalk';
|
|
2
|
-
declare type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
3
|
-
interface LoggerConfiguration {
|
|
4
|
-
color?: typeof Color;
|
|
5
|
-
label?: string;
|
|
6
|
-
level?: LogLevel;
|
|
7
|
-
}
|
|
8
|
-
interface InstanceConfiguration {
|
|
9
|
-
displayLabel?: boolean;
|
|
10
|
-
underlineLabel?: boolean;
|
|
11
|
-
uppercaseLabel?: boolean;
|
|
12
|
-
}
|
|
13
|
-
interface ConstructorOptions {
|
|
14
|
-
config?: InstanceConfiguration;
|
|
15
|
-
types?: Record<string, LoggerConfiguration>;
|
|
16
|
-
}
|
|
17
|
-
declare type LoggerFunction = (message?: number | string | Error, ...args: any[]) => void;
|
|
18
|
-
declare const LOG_TYPES: {
|
|
19
|
-
error: {
|
|
20
|
-
color: string;
|
|
21
|
-
label: string;
|
|
22
|
-
level: string;
|
|
23
|
-
};
|
|
24
|
-
info: {
|
|
25
|
-
color: string;
|
|
26
|
-
label: string;
|
|
27
|
-
level: string;
|
|
28
|
-
};
|
|
29
|
-
warn: {
|
|
30
|
-
color: string;
|
|
31
|
-
label: string;
|
|
32
|
-
level: string;
|
|
33
|
-
};
|
|
34
|
-
debug: {
|
|
35
|
-
color: string;
|
|
36
|
-
label: string;
|
|
37
|
-
level: string;
|
|
38
|
-
};
|
|
39
|
-
log: {
|
|
40
|
-
level: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
declare class Logger {
|
|
44
|
-
private readonly logCount;
|
|
45
|
-
private history;
|
|
46
|
-
private readonly config;
|
|
47
|
-
private readonly types;
|
|
48
|
-
private readonly longestLabel;
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
constructor(options?: ConstructorOptions);
|
|
51
|
-
private retainLog;
|
|
52
|
-
private _log;
|
|
53
|
-
private getLongestLabel;
|
|
54
|
-
private get longestUnderlinedLabel();
|
|
55
|
-
getRetainedLogs(type: string): string[];
|
|
56
|
-
clearRetainedLogs(type: string): void;
|
|
57
|
-
}
|
|
58
|
-
declare type LoggerInterface = {
|
|
59
|
-
[key in keyof typeof LOG_TYPES]: LoggerFunction;
|
|
60
|
-
};
|
|
61
|
-
declare const logger: Logger & LoggerInterface;
|
|
62
|
-
export { logger };
|
|
63
|
-
export type { LoggerInterface };
|
package/dist/types/monorepo.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
export declare const isLerna: (root: string) => boolean;
|
|
3
|
-
export declare const isYarnWorkspaces: (root: string) => boolean;
|
|
4
|
-
export declare const isPnpmWorkspaces: (root: string) => boolean;
|
|
5
|
-
export declare const isMonorepo: (root: string) => boolean;
|
|
6
|
-
export declare const isModernjsMonorepo: (root: string) => boolean;
|
|
7
|
-
export declare const findMonorepoRoot: (appDirectory: string, maxDepth?: number) => string | undefined;
|
|
8
|
-
export declare const getMonorepoPackages: (root: string) => {
|
|
9
|
-
name: string;
|
|
10
|
-
path: string;
|
|
11
|
-
}[];
|
package/dist/types/nodeEnv.d.ts
DELETED
package/dist/types/path.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file at
|
|
6
|
-
* https://github.com/facebook/create-react-app/blob/master/LICENSE
|
|
7
|
-
*/
|
|
8
|
-
export declare function printBuildError(err: Error): void;
|
package/dist/types/wait.d.ts
DELETED
package/dist/types/watch.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare type WatchChangeTypeValueT = 'add' | 'unlink' | 'change';
|
|
2
|
-
export declare const WatchChangeType: Record<'ADD' | 'UNLINK' | 'CHANGE', WatchChangeTypeValueT>;
|
|
3
|
-
declare type RunTaskType = (option: {
|
|
4
|
-
changedFilePath: string;
|
|
5
|
-
changeType: WatchChangeTypeValueT;
|
|
6
|
-
}) => void | Promise<void>;
|
|
7
|
-
export declare const watch: (watchDir: string | string[], runTask: RunTaskType, ignored?: string[]) => import("./compiled").FSWatcher;
|
|
8
|
-
export {};
|
package/modern.config.js
DELETED
package/tests/.eslintrc.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`prettyInstructions The src directory does not exist 1`] = `
|
|
4
|
-
"App running at:
|
|
5
|
-
|
|
6
|
-
> Network: http://127.0.0.1:8080/api
|
|
7
|
-
> Network: http://11.11.111.11:8080/api
|
|
8
|
-
> Network: http://10.100.100.100:8080/api
|
|
9
|
-
"
|
|
10
|
-
`;
|
|
11
|
-
|
|
12
|
-
exports[`prettyInstructions basic usage 1`] = `
|
|
13
|
-
"App running at:
|
|
14
|
-
|
|
15
|
-
> Network: http://127.0.0.1:8080/
|
|
16
|
-
> Network: http://11.11.111.11:8080/
|
|
17
|
-
> Network: http://10.100.100.100:8080/
|
|
18
|
-
"
|
|
19
|
-
`;
|