@modern-js/utils 2.22.1-alpha.2 → 2.22.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +10 -0
- package/dist/cjs/cli/constants/index.js +0 -4
- package/dist/cjs/cli/prettyInstructions.js +3 -2
- package/dist/cjs/runtime/nestedRoutes.js +3 -1
- package/dist/cjs/runtime-node/index.js +0 -2
- package/dist/cjs/universal/constants.js +0 -4
- package/dist/esm/cli/constants/index.js +0 -1
- package/dist/esm/cli/prettyInstructions.js +3 -2
- package/dist/esm/runtime/nestedRoutes.js +3 -1
- package/dist/esm/runtime-node/index.js +0 -1
- package/dist/esm/universal/constants.js +0 -1
- package/dist/types/cli/constants/index.d.ts +0 -4
- package/dist/types/runtime/nestedRoutes.d.ts +6 -2
- package/dist/types/runtime-node/index.d.ts +1 -2
- package/dist/types/universal/constants.d.ts +1 -5
- package/package.json +4 -13
- package/dist/FileSizeReporter.d.ts +0 -16
- package/dist/FileSizeReporter.js +0 -162
- package/dist/alias.d.ts +0 -25
- package/dist/alias.js +0 -108
- package/dist/analyzeProject.d.ts +0 -2
- package/dist/analyzeProject.js +0 -71
- package/dist/applyOptionsChain.d.ts +0 -3
- package/dist/applyOptionsChain.js +0 -58
- package/dist/babel.d.ts +0 -3
- package/dist/babel.js +0 -136
- package/dist/chainId.d.ts +0 -244
- package/dist/chainId.js +0 -196
- package/dist/cjs/runtime-node/nestedRoutes.js +0 -28
- package/dist/clearConsole.d.ts +0 -1
- package/dist/clearConsole.js +0 -31
- package/dist/commands.d.ts +0 -4
- package/dist/commands.js +0 -48
- package/dist/compatRequire.d.ts +0 -13
- package/dist/compatRequire.js +0 -82
- package/dist/compiled.d.ts +0 -43
- package/dist/compiled.js +0 -142
- package/dist/constants.d.ts +0 -244
- package/dist/constants.js +0 -320
- package/dist/debug.d.ts +0 -6
- package/dist/debug.js +0 -28
- package/dist/emptyDir.d.ts +0 -1
- package/dist/emptyDir.js +0 -52
- package/dist/ensureAbsolutePath.d.ts +0 -7
- package/dist/ensureAbsolutePath.js +0 -38
- package/dist/ensureArray.d.ts +0 -1
- package/dist/ensureArray.js +0 -32
- package/dist/esm/runtime-node/nestedRoutes.js +0 -18
- package/dist/findExists.d.ts +0 -6
- package/dist/findExists.js +0 -45
- package/dist/generateMetaTags.d.ts +0 -16
- package/dist/generateMetaTags.js +0 -61
- package/dist/getBrowserslist.d.ts +0 -2
- package/dist/getBrowserslist.js +0 -31
- package/dist/getCoreJsVersion.d.ts +0 -1
- package/dist/getCoreJsVersion.js +0 -46
- package/dist/getEntryOptions.d.ts +0 -1
- package/dist/getEntryOptions.js +0 -54
- package/dist/getPackageManager.d.ts +0 -1
- package/dist/getPackageManager.js +0 -87
- package/dist/getPort.d.ts +0 -14
- package/dist/getPort.js +0 -112
- package/dist/getServerConfig.d.ts +0 -1
- package/dist/getServerConfig.js +0 -67
- package/dist/getTargetDir.d.ts +0 -1
- package/dist/getTargetDir.js +0 -41
- package/dist/import.d.ts +0 -5
- package/dist/import.js +0 -33
- package/dist/index.d.ts +0 -44
- package/dist/index.js +0 -60
- package/dist/is/index.d.ts +0 -58
- package/dist/is/index.js +0 -114
- package/dist/is/nodeEnv.d.ts +0 -8
- package/dist/is/nodeEnv.js +0 -39
- package/dist/is/platform.d.ts +0 -2
- package/dist/is/platform.js +0 -30
- package/dist/is/type.d.ts +0 -8
- package/dist/is/type.js +0 -64
- package/dist/logger.d.ts +0 -65
- package/dist/logger.js +0 -145
- package/dist/monorepo.d.ts +0 -11
- package/dist/monorepo.js +0 -137
- package/dist/nodeEnv.d.ts +0 -3
- package/dist/nodeEnv.js +0 -81
- package/dist/path.d.ts +0 -18
- package/dist/path.js +0 -92
- package/dist/pathSerializer.d.ts +0 -16
- package/dist/pathSerializer.js +0 -76
- package/dist/plugin.d.ts +0 -2
- package/dist/plugin.js +0 -46
- package/dist/prettyInstructions.d.ts +0 -9
- package/dist/prettyInstructions.js +0 -112
- package/dist/printBuildError.d.ts +0 -8
- package/dist/printBuildError.js +0 -57
- package/dist/react.d.ts +0 -1
- package/dist/react.js +0 -64
- package/dist/readTsConfig.d.ts +0 -2
- package/dist/readTsConfig.js +0 -47
- package/dist/removeSlash.d.ts +0 -3
- package/dist/removeSlash.js +0 -33
- package/dist/resolve.d.ts +0 -13
- package/dist/resolve.js +0 -63
- package/dist/routes.d.ts +0 -2
- package/dist/routes.js +0 -58
- package/dist/runtimeExports.d.ts +0 -4
- package/dist/runtimeExports.js +0 -73
- package/dist/ssr.d.ts +0 -8
- package/dist/ssr.js +0 -30
- package/dist/storage.d.ts +0 -5
- package/dist/storage.js +0 -75
- package/dist/testUtils.d.ts +0 -5
- package/dist/testUtils.js +0 -38
- package/dist/types/runtime-node/nestedRoutes.d.ts +0 -3
- package/dist/types.d.ts +0 -1
- package/dist/types.js +0 -15
- package/dist/universal/constants.d.ts +0 -9
- package/dist/universal/constants.js +0 -30
- package/dist/universal/formatWebpack.d.ts +0 -13
- package/dist/universal/formatWebpack.js +0 -100
- package/dist/universal/nestedRoutes.d.ts +0 -8
- package/dist/universal/nestedRoutes.js +0 -131
- package/dist/universal/remixRouter.d.ts +0 -1
- package/dist/universal/remixRouter.js +0 -17
- package/dist/universal/serialize.d.ts +0 -1
- package/dist/universal/serialize.js +0 -40
- package/dist/version.d.ts +0 -2
- package/dist/version.js +0 -92
- package/dist/wait.d.ts +0 -2
- package/dist/wait.js +0 -29
- package/dist/watch.d.ts +0 -8
- package/dist/watch.js +0 -90
package/dist/commands.d.ts
DELETED
package/dist/commands.js
DELETED
@@ -1,48 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
5
|
-
var __export = (target, all) => {
|
6
|
-
for (var name in all)
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
8
|
-
};
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
11
|
-
for (let key of __getOwnPropNames(from))
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
14
|
-
}
|
15
|
-
return to;
|
16
|
-
};
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
18
|
-
var commands_exports = {};
|
19
|
-
__export(commands_exports, {
|
20
|
-
getArgv: () => getArgv,
|
21
|
-
getCommand: () => getCommand,
|
22
|
-
getFullArgv: () => getFullArgv,
|
23
|
-
isDevCommand: () => isDevCommand
|
24
|
-
});
|
25
|
-
module.exports = __toCommonJS(commands_exports);
|
26
|
-
const getFullArgv = () => {
|
27
|
-
var _a;
|
28
|
-
return ((_a = process.env.MODERN_ARGV) == null ? void 0 : _a.split(" ")) || process.argv;
|
29
|
-
};
|
30
|
-
const getArgv = () => {
|
31
|
-
return getFullArgv().slice(2);
|
32
|
-
};
|
33
|
-
const getCommand = () => {
|
34
|
-
const args = getArgv();
|
35
|
-
const command = args[0];
|
36
|
-
return command;
|
37
|
-
};
|
38
|
-
const isDevCommand = () => {
|
39
|
-
const command = getCommand();
|
40
|
-
return command === "dev" || command === "start";
|
41
|
-
};
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
43
|
-
0 && (module.exports = {
|
44
|
-
getArgv,
|
45
|
-
getCommand,
|
46
|
-
getFullArgv,
|
47
|
-
isDevCommand
|
48
|
-
});
|
package/dist/compatRequire.d.ts
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* Require function compatible with esm and cjs module.
|
3
|
-
* @param filePath - File to required.
|
4
|
-
* @returns module export object.
|
5
|
-
*/
|
6
|
-
export declare const compatRequire: (filePath: string, interop?: boolean) => any;
|
7
|
-
export declare const dynamicImport: Function;
|
8
|
-
export declare const requireExistModule: (filename: string, opt?: {
|
9
|
-
extensions?: string[];
|
10
|
-
interop?: boolean;
|
11
|
-
}) => any;
|
12
|
-
export declare const cleanRequireCache: (filelist: string[]) => void;
|
13
|
-
export declare function deleteRequireCache(path: string): void;
|
package/dist/compatRequire.js
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
var __defProp = Object.defineProperty;
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
4
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
7
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
8
|
-
var __spreadValues = (a, b) => {
|
9
|
-
for (var prop in b || (b = {}))
|
10
|
-
if (__hasOwnProp.call(b, prop))
|
11
|
-
__defNormalProp(a, prop, b[prop]);
|
12
|
-
if (__getOwnPropSymbols)
|
13
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
14
|
-
if (__propIsEnum.call(b, prop))
|
15
|
-
__defNormalProp(a, prop, b[prop]);
|
16
|
-
}
|
17
|
-
return a;
|
18
|
-
};
|
19
|
-
var __export = (target, all) => {
|
20
|
-
for (var name in all)
|
21
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
22
|
-
};
|
23
|
-
var __copyProps = (to, from, except, desc) => {
|
24
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
25
|
-
for (let key of __getOwnPropNames(from))
|
26
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
27
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
28
|
-
}
|
29
|
-
return to;
|
30
|
-
};
|
31
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
32
|
-
var compatRequire_exports = {};
|
33
|
-
__export(compatRequire_exports, {
|
34
|
-
cleanRequireCache: () => cleanRequireCache,
|
35
|
-
compatRequire: () => compatRequire,
|
36
|
-
deleteRequireCache: () => deleteRequireCache,
|
37
|
-
dynamicImport: () => dynamicImport,
|
38
|
-
requireExistModule: () => requireExistModule
|
39
|
-
});
|
40
|
-
module.exports = __toCommonJS(compatRequire_exports);
|
41
|
-
var import_findExists = require("./findExists");
|
42
|
-
const compatRequire = (filePath, interop = true) => {
|
43
|
-
const mod = require(filePath);
|
44
|
-
const rtnESMDefault = interop && (mod == null ? void 0 : mod.__esModule);
|
45
|
-
return rtnESMDefault ? mod.default : mod;
|
46
|
-
};
|
47
|
-
const dynamicImport = new Function(
|
48
|
-
"modulePath",
|
49
|
-
"return import(modulePath)"
|
50
|
-
);
|
51
|
-
const requireExistModule = (filename, opt) => {
|
52
|
-
const final = __spreadValues({
|
53
|
-
extensions: [".ts", ".js"],
|
54
|
-
interop: true
|
55
|
-
}, opt);
|
56
|
-
const exist = (0, import_findExists.findExists)(final.extensions.map((ext) => `${filename}${ext}`));
|
57
|
-
if (!exist) {
|
58
|
-
return null;
|
59
|
-
}
|
60
|
-
return compatRequire(exist, final.interop);
|
61
|
-
};
|
62
|
-
const cleanRequireCache = (filelist) => {
|
63
|
-
filelist.forEach((filepath) => {
|
64
|
-
delete require.cache[filepath];
|
65
|
-
});
|
66
|
-
};
|
67
|
-
function deleteRequireCache(path) {
|
68
|
-
if (require.cache[path]) {
|
69
|
-
delete require.cache[path];
|
70
|
-
}
|
71
|
-
if (module.children) {
|
72
|
-
module.children = module.children.filter((item) => item.filename !== path);
|
73
|
-
}
|
74
|
-
}
|
75
|
-
// Annotate the CommonJS export names for ESM import in node:
|
76
|
-
0 && (module.exports = {
|
77
|
-
cleanRequireCache,
|
78
|
-
compatRequire,
|
79
|
-
deleteRequireCache,
|
80
|
-
dynamicImport,
|
81
|
-
requireExistModule
|
82
|
-
});
|
package/dist/compiled.d.ts
DELETED
@@ -1,43 +0,0 @@
|
|
1
|
-
export { default as fs } from '../compiled/fs-extra';
|
2
|
-
export { default as ora } from '../compiled/ora';
|
3
|
-
export { default as glob } from '../compiled/glob';
|
4
|
-
export { default as yaml } from '../compiled/js-yaml';
|
5
|
-
export { default as chalk } from '../compiled/chalk';
|
6
|
-
export { default as debug } from '../compiled/debug';
|
7
|
-
export { default as slash } from '../compiled/slash';
|
8
|
-
export { default as execa } from '../compiled/execa';
|
9
|
-
export { default as json5 } from '../compiled/json5';
|
10
|
-
export { default as upath } from '../compiled/upath';
|
11
|
-
export { default as pkgUp } from '../compiled/pkg-up';
|
12
|
-
export { nanoid } from '../compiled/nanoid';
|
13
|
-
export { default as semver } from '../compiled/semver';
|
14
|
-
export { default as dotenv } from '../compiled/dotenv';
|
15
|
-
export { default as lodash } from '../compiled/lodash';
|
16
|
-
export { default as globby } from '../compiled/globby';
|
17
|
-
export { default as address } from '../compiled/address';
|
18
|
-
export { default as signale } from '../compiled/signale';
|
19
|
-
export { default as urlJoin } from '../compiled/url-join';
|
20
|
-
export { default as minimist } from '../compiled/minimist';
|
21
|
-
export { default as fastGlob } from '../compiled/fast-glob';
|
22
|
-
export { default as filesize } from '../compiled/filesize';
|
23
|
-
export { default as gzipSize } from '../compiled/gzip-size';
|
24
|
-
export { default as stripAnsi } from '../compiled/strip-ansi';
|
25
|
-
export { default as dotenvExpand } from '../compiled/dotenv-expand';
|
26
|
-
export { default as browserslist } from '../compiled/browserslist';
|
27
|
-
export { default as recursiveReaddir } from '../compiled/recursive-readdir';
|
28
|
-
export { program, Command } from '../compiled/commander';
|
29
|
-
export { Signale } from '../compiled/signale';
|
30
|
-
export type { SignaleOptions } from '../compiled/signale';
|
31
|
-
export type { IOptions as GlobOptions } from '../compiled/glob';
|
32
|
-
export type { GlobbyOptions } from '../compiled/globby';
|
33
|
-
export type { FSWatcher, WatchOptions } from '../compiled/chokidar';
|
34
|
-
export type { ExecaError } from '../compiled/execa';
|
35
|
-
export type { default as WebpackChain } from '../compiled/webpack-chain';
|
36
|
-
/**
|
37
|
-
* Lazy import some expensive modules that will slow down startup speed.
|
38
|
-
* Notice that `csmith-tools build` can not bundle lazy imported modules.
|
39
|
-
*/
|
40
|
-
|
41
|
-
export declare const mime: typeof import('../compiled/mime-types');
|
42
|
-
export declare const chokidar: typeof import('../compiled/chokidar');
|
43
|
-
export declare const inquirer: typeof import('../compiled/inquirer');
|
package/dist/compiled.js
DELETED
@@ -1,142 +0,0 @@
|
|
1
|
-
var __create = Object.create;
|
2
|
-
var __defProp = Object.defineProperty;
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __export = (target, all) => {
|
8
|
-
for (var name in all)
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
-
};
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
-
for (let key of __getOwnPropNames(from))
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
-
}
|
17
|
-
return to;
|
18
|
-
};
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
25
|
-
mod
|
26
|
-
));
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
|
-
var compiled_exports = {};
|
29
|
-
__export(compiled_exports, {
|
30
|
-
Command: () => import_commander.Command,
|
31
|
-
Signale: () => import_signale2.Signale,
|
32
|
-
address: () => import_address.default,
|
33
|
-
browserslist: () => import_browserslist.default,
|
34
|
-
chalk: () => import_chalk.default,
|
35
|
-
chokidar: () => chokidar,
|
36
|
-
debug: () => import_debug.default,
|
37
|
-
dotenv: () => import_dotenv.default,
|
38
|
-
dotenvExpand: () => import_dotenv_expand.default,
|
39
|
-
execa: () => import_execa.default,
|
40
|
-
fastGlob: () => import_fast_glob.default,
|
41
|
-
filesize: () => import_filesize.default,
|
42
|
-
fs: () => import_fs_extra.default,
|
43
|
-
glob: () => import_glob.default,
|
44
|
-
globby: () => import_globby.default,
|
45
|
-
gzipSize: () => import_gzip_size.default,
|
46
|
-
inquirer: () => inquirer,
|
47
|
-
json5: () => import_json5.default,
|
48
|
-
lodash: () => import_lodash.default,
|
49
|
-
mime: () => mime,
|
50
|
-
minimist: () => import_minimist.default,
|
51
|
-
nanoid: () => import_nanoid.nanoid,
|
52
|
-
ora: () => import_ora.default,
|
53
|
-
pkgUp: () => import_pkg_up.default,
|
54
|
-
program: () => import_commander.program,
|
55
|
-
recursiveReaddir: () => import_recursive_readdir.default,
|
56
|
-
semver: () => import_semver.default,
|
57
|
-
signale: () => import_signale.default,
|
58
|
-
slash: () => import_slash.default,
|
59
|
-
stripAnsi: () => import_strip_ansi.default,
|
60
|
-
upath: () => import_upath.default,
|
61
|
-
urlJoin: () => import_url_join.default,
|
62
|
-
yaml: () => import_js_yaml.default
|
63
|
-
});
|
64
|
-
module.exports = __toCommonJS(compiled_exports);
|
65
|
-
var import_import = require("./import");
|
66
|
-
var import_fs_extra = __toESM(require("../compiled/fs-extra"));
|
67
|
-
var import_ora = __toESM(require("../compiled/ora"));
|
68
|
-
var import_glob = __toESM(require("../compiled/glob"));
|
69
|
-
var import_js_yaml = __toESM(require("../compiled/js-yaml"));
|
70
|
-
var import_chalk = __toESM(require("../compiled/chalk"));
|
71
|
-
var import_debug = __toESM(require("../compiled/debug"));
|
72
|
-
var import_slash = __toESM(require("../compiled/slash"));
|
73
|
-
var import_execa = __toESM(require("../compiled/execa"));
|
74
|
-
var import_json5 = __toESM(require("../compiled/json5"));
|
75
|
-
var import_upath = __toESM(require("../compiled/upath"));
|
76
|
-
var import_pkg_up = __toESM(require("../compiled/pkg-up"));
|
77
|
-
var import_nanoid = require("../compiled/nanoid");
|
78
|
-
var import_semver = __toESM(require("../compiled/semver"));
|
79
|
-
var import_dotenv = __toESM(require("../compiled/dotenv"));
|
80
|
-
var import_lodash = __toESM(require("../compiled/lodash"));
|
81
|
-
var import_globby = __toESM(require("../compiled/globby"));
|
82
|
-
var import_address = __toESM(require("../compiled/address"));
|
83
|
-
var import_signale = __toESM(require("../compiled/signale"));
|
84
|
-
var import_url_join = __toESM(require("../compiled/url-join"));
|
85
|
-
var import_minimist = __toESM(require("../compiled/minimist"));
|
86
|
-
var import_fast_glob = __toESM(require("../compiled/fast-glob"));
|
87
|
-
var import_filesize = __toESM(require("../compiled/filesize"));
|
88
|
-
var import_gzip_size = __toESM(require("../compiled/gzip-size"));
|
89
|
-
var import_strip_ansi = __toESM(require("../compiled/strip-ansi"));
|
90
|
-
var import_dotenv_expand = __toESM(require("../compiled/dotenv-expand"));
|
91
|
-
var import_browserslist = __toESM(require("../compiled/browserslist"));
|
92
|
-
var import_recursive_readdir = __toESM(require("../compiled/recursive-readdir"));
|
93
|
-
var import_commander = require("../compiled/commander");
|
94
|
-
var import_signale2 = require("../compiled/signale");
|
95
|
-
const mime = import_import.Import.lazy(
|
96
|
-
"../compiled/mime-types",
|
97
|
-
require
|
98
|
-
);
|
99
|
-
const chokidar = import_import.Import.lazy(
|
100
|
-
"../compiled/chokidar",
|
101
|
-
require
|
102
|
-
);
|
103
|
-
const inquirer = import_import.Import.lazy(
|
104
|
-
"../compiled/inquirer",
|
105
|
-
require
|
106
|
-
);
|
107
|
-
// Annotate the CommonJS export names for ESM import in node:
|
108
|
-
0 && (module.exports = {
|
109
|
-
Command,
|
110
|
-
Signale,
|
111
|
-
address,
|
112
|
-
browserslist,
|
113
|
-
chalk,
|
114
|
-
chokidar,
|
115
|
-
debug,
|
116
|
-
dotenv,
|
117
|
-
dotenvExpand,
|
118
|
-
execa,
|
119
|
-
fastGlob,
|
120
|
-
filesize,
|
121
|
-
fs,
|
122
|
-
glob,
|
123
|
-
globby,
|
124
|
-
gzipSize,
|
125
|
-
inquirer,
|
126
|
-
json5,
|
127
|
-
lodash,
|
128
|
-
mime,
|
129
|
-
minimist,
|
130
|
-
nanoid,
|
131
|
-
ora,
|
132
|
-
pkgUp,
|
133
|
-
program,
|
134
|
-
recursiveReaddir,
|
135
|
-
semver,
|
136
|
-
signale,
|
137
|
-
slash,
|
138
|
-
stripAnsi,
|
139
|
-
upath,
|
140
|
-
urlJoin,
|
141
|
-
yaml
|
142
|
-
});
|
package/dist/constants.d.ts
DELETED
@@ -1,244 +0,0 @@
|
|
1
|
-
import { InternalPlugins } from '@modern-js/types';
|
2
|
-
/**
|
3
|
-
* route specification file
|
4
|
-
*/
|
5
|
-
|
6
|
-
export declare const ROUTE_SPEC_FILE = "route.json";
|
7
|
-
/**
|
8
|
-
* main entry name
|
9
|
-
*/
|
10
|
-
|
11
|
-
export declare const MAIN_ENTRY_NAME = "main";
|
12
|
-
/**
|
13
|
-
* open editor request path
|
14
|
-
*/
|
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
|
-
|
21
|
-
export declare const SERVER_BUNDLE_DIRECTORY = "bundles";
|
22
|
-
/**
|
23
|
-
* server side bundles directory, which relative to dist.
|
24
|
-
*/
|
25
|
-
|
26
|
-
export declare const SERVER_WORKER_BUNDLE_DIRECTORY = "worker";
|
27
|
-
/**
|
28
|
-
* entry name pattern used for ajv pattern properties.
|
29
|
-
*/
|
30
|
-
|
31
|
-
export declare const ENTRY_NAME_PATTERN = "^[a-zA-Z0-9_-]+$";
|
32
|
-
/**
|
33
|
-
* SSR server render function name
|
34
|
-
*/
|
35
|
-
|
36
|
-
export declare const SERVER_RENDER_FUNCTION_NAME = "serverRender";
|
37
|
-
/**
|
38
|
-
* loadbale manifest json file
|
39
|
-
*/
|
40
|
-
|
41
|
-
export declare const LOADABLE_STATS_FILE = "loadable-stats.json";
|
42
|
-
/**
|
43
|
-
* internal specified folder
|
44
|
-
*/
|
45
|
-
|
46
|
-
export declare const API_DIR = "api";
|
47
|
-
export declare const SERVER_DIR = "server";
|
48
|
-
export declare const SHARED_DIR = "shared";
|
49
|
-
/**
|
50
|
-
* Modern.config.ts cached dir
|
51
|
-
*/
|
52
|
-
|
53
|
-
export declare const CONFIG_CACHE_DIR = "./node_modules/.cache/node-bundle-require";
|
54
|
-
export declare const CONFIG_FILE_EXTENSIONS: string[];
|
55
|
-
/**
|
56
|
-
* Serialized config path
|
57
|
-
*/
|
58
|
-
|
59
|
-
export declare const OUTPUT_CONFIG_FILE = "modern.config.json";
|
60
|
-
/**
|
61
|
-
* Default server config basename
|
62
|
-
*/
|
63
|
-
|
64
|
-
export declare const DEFAULT_SERVER_CONFIG = "modern.server-runtime.config";
|
65
|
-
/**
|
66
|
-
* Routes manifest filename
|
67
|
-
*/
|
68
|
-
|
69
|
-
export declare const ROUTE_MANIFEST_FILE = "routes-manifest.json";
|
70
|
-
/**
|
71
|
-
* directory name for loader routes
|
72
|
-
*/
|
73
|
-
|
74
|
-
export declare const LOADER_ROUTES_DIR = "loader-routes";
|
75
|
-
/**
|
76
|
-
* default host for dev
|
77
|
-
*/
|
78
|
-
|
79
|
-
export declare const DEFAULT_DEV_HOST = "0.0.0.0";
|
80
|
-
/**
|
81
|
-
* Internal app-tools plugins that work as soon as they are installed.
|
82
|
-
*/
|
83
|
-
|
84
|
-
export declare const INTERNAL_APP_TOOLS_PLUGINS: InternalPlugins;
|
85
|
-
export declare const INTERNAL_APP_TOOLS_RUNTIME_PLUGINS: InternalPlugins;
|
86
|
-
/**
|
87
|
-
* Internal module-tools plugins that work as soon as they are installed.
|
88
|
-
*/
|
89
|
-
|
90
|
-
export declare const INTERNAL_MODULE_TOOLS_PLUGINS: InternalPlugins;
|
91
|
-
/**
|
92
|
-
* Internal monorepo-tools plugins that work as soon as they are installed.
|
93
|
-
*/
|
94
|
-
|
95
|
-
export declare const INTERNAL_MONOREPO_TOOLS_PLUGINS: InternalPlugins;
|
96
|
-
/**
|
97
|
-
* Internal doc-tools plugins that work as soon as they are installed.
|
98
|
-
*/
|
99
|
-
|
100
|
-
export declare const INTERNAL_DOC_TOOLS_PLUGINS: InternalPlugins;
|
101
|
-
/**
|
102
|
-
* Internal plugins that work as soon as they are installed.
|
103
|
-
*/
|
104
|
-
|
105
|
-
export declare const INTERNAL_CLI_PLUGINS: InternalPlugins;
|
106
|
-
export declare const SERVER_PLUGIN_BFF = "@modern-js/plugin-bff";
|
107
|
-
export declare const SERVER_PLUGIN_EXPRESS = "@modern-js/plugin-express";
|
108
|
-
export declare const SERVER_PLUGIN_EGG = "@modern-js/plugin-egg";
|
109
|
-
export declare const SERVER_PLUGIN_KOA = "@modern-js/plugin-koa";
|
110
|
-
export declare const SERVER_PLUGIN_NEST = "@modern-js/plugin-nest";
|
111
|
-
export declare const SERVER_PLUGIN_SERVER = "@modern-js/plugin-server";
|
112
|
-
export declare const SERVER_PLUGIN_POLYFILL = "@modern-js/plugin-polyfill";
|
113
|
-
export declare const INTERNAL_SERVER_PLUGINS: InternalPlugins;
|
114
|
-
/**
|
115
|
-
* The schema registered in the plugin.
|
116
|
-
*/
|
117
|
-
|
118
|
-
export declare const PLUGIN_SCHEMAS: {
|
119
|
-
'@modern-js/runtime': ({
|
120
|
-
target: string;
|
121
|
-
schema: {
|
122
|
-
type: string;
|
123
|
-
additionalProperties: boolean;
|
124
|
-
patternProperties?: undefined;
|
125
|
-
};
|
126
|
-
} | {
|
127
|
-
target: string;
|
128
|
-
schema: {
|
129
|
-
type: string;
|
130
|
-
patternProperties: {
|
131
|
-
"^[a-zA-Z0-9_-]+$": {
|
132
|
-
type: string;
|
133
|
-
};
|
134
|
-
};
|
135
|
-
additionalProperties: boolean;
|
136
|
-
};
|
137
|
-
})[];
|
138
|
-
'@modern-js/plugin-swc': {
|
139
|
-
target: string;
|
140
|
-
schema: {
|
141
|
-
typeof: string[];
|
142
|
-
};
|
143
|
-
}[];
|
144
|
-
'@modern-js/plugin-bff': {
|
145
|
-
target: string;
|
146
|
-
schema: {
|
147
|
-
type: string;
|
148
|
-
properties: {
|
149
|
-
prefix: {
|
150
|
-
type: string[];
|
151
|
-
items: {
|
152
|
-
type: string;
|
153
|
-
};
|
154
|
-
};
|
155
|
-
fetcher: {
|
156
|
-
type: string;
|
157
|
-
};
|
158
|
-
proxy: {
|
159
|
-
type: string;
|
160
|
-
};
|
161
|
-
requestCreator: {
|
162
|
-
type: string;
|
163
|
-
};
|
164
|
-
};
|
165
|
-
};
|
166
|
-
}[];
|
167
|
-
'@modern-js/plugin-tailwindcss': {
|
168
|
-
target: string;
|
169
|
-
schema: {
|
170
|
-
typeof: string[];
|
171
|
-
};
|
172
|
-
}[];
|
173
|
-
'@modern-js/plugin-proxy': {
|
174
|
-
target: string;
|
175
|
-
schema: {
|
176
|
-
typeof: string[];
|
177
|
-
};
|
178
|
-
}[];
|
179
|
-
'@modern-js/plugin-ssg': {
|
180
|
-
target: string;
|
181
|
-
schema: {
|
182
|
-
oneOf: ({
|
183
|
-
type: string;
|
184
|
-
instanceof?: undefined;
|
185
|
-
} | {
|
186
|
-
instanceof: string;
|
187
|
-
type?: undefined;
|
188
|
-
})[];
|
189
|
-
};
|
190
|
-
}[];
|
191
|
-
'@modern-js/plugin-state': {
|
192
|
-
target: string;
|
193
|
-
schema: {
|
194
|
-
type: string[];
|
195
|
-
};
|
196
|
-
}[];
|
197
|
-
'@modern-js/plugin-design-token': ({
|
198
|
-
target: string;
|
199
|
-
schema: {
|
200
|
-
typeof: string[];
|
201
|
-
type?: undefined;
|
202
|
-
};
|
203
|
-
} | {
|
204
|
-
target: string;
|
205
|
-
schema: {
|
206
|
-
type: string[];
|
207
|
-
typeof?: undefined;
|
208
|
-
};
|
209
|
-
})[];
|
210
|
-
'@modern-js/plugin-router': {
|
211
|
-
target: string;
|
212
|
-
schema: {
|
213
|
-
type: string[];
|
214
|
-
};
|
215
|
-
}[];
|
216
|
-
'@modern-js/plugin-testing': {
|
217
|
-
target: string;
|
218
|
-
schema: {
|
219
|
-
typeof: string[];
|
220
|
-
};
|
221
|
-
}[];
|
222
|
-
'@modern-js/plugin-garfish': {
|
223
|
-
target: string;
|
224
|
-
schema: {
|
225
|
-
type: string[];
|
226
|
-
};
|
227
|
-
}[];
|
228
|
-
'@modern-js/plugin-nocode': never[];
|
229
|
-
};
|
230
|
-
/**
|
231
|
-
* The `@babel/preset-typescript` default options.
|
232
|
-
*
|
233
|
-
* for:
|
234
|
-
* - `@modern-js/builder-rspack-provider`
|
235
|
-
* - `@modern-js/babel-preset-base`
|
236
|
-
*/
|
237
|
-
|
238
|
-
export declare const DEFAULT_BABEL_PRESET_TYPESCRIPT_OPTIONS: {
|
239
|
-
allowNamespaces: boolean;
|
240
|
-
allExtensions: boolean;
|
241
|
-
allowDeclareFields: boolean;
|
242
|
-
optimizeConstEnums: boolean;
|
243
|
-
isTSX: boolean;
|
244
|
-
};
|