@modern-js/utils 3.1.0 → 3.1.2
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/compiled/chokidar/index.js +1 -1
- package/dist/compiled/fast-glob/index.js +1 -1
- package/dist/compiled/filesize/index.js +1 -1
- package/dist/compiled/inquirer/index.js +2 -2
- package/dist/compiled/js-yaml/index.mjs +1 -1
- package/dist/compiled/mime-types/index.js +1 -1
- package/dist/compiled/ora/index.js +1 -1
- package/dist/esm/cli/constants.mjs +2 -2
- package/dist/esm/cli/logger.mjs +1 -2
- package/dist/esm/cli/route.mjs +1 -1
- package/dist/esm/compiled.mjs +29 -39
- package/dist/esm/import.mjs +1 -1
- package/dist/esm/rslib-runtime.mjs +12 -0
- package/dist/esm/universal/index.mjs +1 -2
- package/dist/esm-node/cli/constants.mjs +2 -2
- package/dist/esm-node/cli/logger.mjs +1 -2
- package/dist/esm-node/cli/route.mjs +1 -1
- package/dist/esm-node/compiled.mjs +28 -28
- package/dist/esm-node/import.mjs +1 -1
- package/dist/esm-node/universal/index.mjs +1 -2
- package/package.json +5 -5
- /package/{rstest.config.ts → rstest.config.mts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*!
|
|
1
|
+
/*! LICENSE: index.js.LICENSE.txt */
|
|
2
2
|
(()=>{
|
|
3
3
|
var e = {
|
|
4
4
|
933: (e)=>{
|
|
@@ -19714,7 +19714,7 @@
|
|
|
19714
19714
|
},
|
|
19715
19715
|
6333: (e, t, r)=>{
|
|
19716
19716
|
var n = r(2781);
|
|
19717
|
-
|
|
19717
|
+
e.exports = through;
|
|
19718
19718
|
through.through = through;
|
|
19719
19719
|
function through(e, t, r) {
|
|
19720
19720
|
e = e || function(e) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
|
|
2
1
|
const JS_EXTENSIONS = [
|
|
3
2
|
'.js',
|
|
4
3
|
'.ts',
|
|
@@ -26,4 +25,5 @@ const DEFAULT_DEV_HOST = '0.0.0.0';
|
|
|
26
25
|
const INTERNAL_RUNTIME_PLUGINS = {
|
|
27
26
|
'@modern-js/runtime': '@modern-js/runtime/cli'
|
|
28
27
|
};
|
|
29
|
-
export {
|
|
28
|
+
export { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
|
|
29
|
+
export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR };
|
package/dist/esm/cli/logger.mjs
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { createLogger, logger };
|
|
1
|
+
export { createLogger, logger } from "rslog";
|
package/dist/esm/cli/route.mjs
CHANGED
package/dist/esm/compiled.mjs
CHANGED
|
@@ -1,44 +1,8 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { Import } from "./import.mjs";
|
|
3
|
-
import
|
|
4
|
-
import ora from "../compiled/ora/index.js";
|
|
5
|
-
import glob from "../compiled/glob/index.js";
|
|
6
|
-
import js_yaml from "../compiled/js-yaml/index.mjs";
|
|
7
|
-
import chalk from "../compiled/chalk/index.js";
|
|
8
|
-
import debug from "../compiled/debug/index.js";
|
|
9
|
-
import slash from "../compiled/slash/index.js";
|
|
10
|
-
import execa from "../compiled/execa/index.js";
|
|
11
|
-
import json5 from "../compiled/json5/index.js";
|
|
12
|
-
import upath from "../compiled/upath/index.js";
|
|
13
|
-
import pkg_up from "../compiled/pkg-up/index.js";
|
|
14
|
-
import { nanoid } from "../compiled/nanoid/index.mjs";
|
|
15
|
-
import semver from "../compiled/semver/index.js";
|
|
16
|
-
import dotenv from "../compiled/dotenv/index.js";
|
|
17
|
-
import lodash from "../compiled/lodash/index.js";
|
|
18
|
-
import globby from "../compiled/globby/index.js";
|
|
19
|
-
import address from "../compiled/address/index.js";
|
|
3
|
+
import { __webpack_require__ } from "./rslib-runtime.mjs";
|
|
20
4
|
import signale from "../compiled/signale/index.js";
|
|
21
|
-
|
|
22
|
-
import minimist from "../compiled/minimist/index.js";
|
|
23
|
-
import fast_glob from "../compiled/fast-glob/index.js";
|
|
24
|
-
import filesize from "../compiled/filesize/index.js";
|
|
25
|
-
import gzip_size from "../compiled/gzip-size/index.js";
|
|
26
|
-
import strip_ansi from "../compiled/strip-ansi/index.js";
|
|
27
|
-
import dotenv_expand from "../compiled/dotenv-expand/index.js";
|
|
28
|
-
import browserslist from "../compiled/browserslist/index.js";
|
|
29
|
-
import { Command, program } from "../compiled/commander/index.mjs";
|
|
30
|
-
var __webpack_require__ = {};
|
|
31
|
-
(()=>{
|
|
32
|
-
__webpack_require__.g = (()=>{
|
|
33
|
-
if ('object' == typeof globalThis) return globalThis;
|
|
34
|
-
try {
|
|
35
|
-
return this || new Function('return this')();
|
|
36
|
-
} catch (e) {
|
|
37
|
-
if ('object' == typeof window) return window;
|
|
38
|
-
}
|
|
39
|
-
})();
|
|
40
|
-
})();
|
|
41
|
-
const { Signale } = signale;
|
|
5
|
+
const { Signale: Signale } = signale;
|
|
42
6
|
const getNodeRequire = ()=>{
|
|
43
7
|
if ('object' == typeof __webpack_require__.g && 'function' == typeof __webpack_require__.g.require) return __webpack_require__.g.require;
|
|
44
8
|
if ('object' == typeof globalThis && 'function' == typeof globalThis.require) return globalThis.require;
|
|
@@ -47,4 +11,30 @@ const getNodeRequire = ()=>{
|
|
|
47
11
|
const mime = Import.lazy('../compiled/mime-types', getNodeRequire);
|
|
48
12
|
const chokidar = Import.lazy('../compiled/chokidar', getNodeRequire);
|
|
49
13
|
const inquirer = Import.lazy('../compiled/inquirer', getNodeRequire);
|
|
50
|
-
export {
|
|
14
|
+
export { default as fs } from "../compiled/fs-extra/index.js";
|
|
15
|
+
export { default as ora } from "../compiled/ora/index.js";
|
|
16
|
+
export { default as glob } from "../compiled/glob/index.js";
|
|
17
|
+
export { default as yaml } from "../compiled/js-yaml/index.mjs";
|
|
18
|
+
export { default as chalk } from "../compiled/chalk/index.js";
|
|
19
|
+
export { default as debug } from "../compiled/debug/index.js";
|
|
20
|
+
export { default as slash } from "../compiled/slash/index.js";
|
|
21
|
+
export { default as execa } from "../compiled/execa/index.js";
|
|
22
|
+
export { default as json5 } from "../compiled/json5/index.js";
|
|
23
|
+
export { default as upath } from "../compiled/upath/index.js";
|
|
24
|
+
export { default as pkgUp } from "../compiled/pkg-up/index.js";
|
|
25
|
+
export { nanoid } from "../compiled/nanoid/index.mjs";
|
|
26
|
+
export { default as semver } from "../compiled/semver/index.js";
|
|
27
|
+
export { default as dotenv } from "../compiled/dotenv/index.js";
|
|
28
|
+
export { default as lodash } from "../compiled/lodash/index.js";
|
|
29
|
+
export { default as globby } from "../compiled/globby/index.js";
|
|
30
|
+
export { default as address } from "../compiled/address/index.js";
|
|
31
|
+
export { default as urlJoin } from "../compiled/url-join/index.js";
|
|
32
|
+
export { default as minimist } from "../compiled/minimist/index.js";
|
|
33
|
+
export { default as fastGlob } from "../compiled/fast-glob/index.js";
|
|
34
|
+
export { default as filesize } from "../compiled/filesize/index.js";
|
|
35
|
+
export { default as gzipSize } from "../compiled/gzip-size/index.js";
|
|
36
|
+
export { default as stripAnsi } from "../compiled/strip-ansi/index.js";
|
|
37
|
+
export { default as dotenvExpand } from "../compiled/dotenv-expand/index.js";
|
|
38
|
+
export { default as browserslist } from "../compiled/browserslist/index.js";
|
|
39
|
+
export { Command, program } from "../compiled/commander/index.mjs";
|
|
40
|
+
export { Signale, chokidar, inquirer, mime, signale };
|
package/dist/esm/import.mjs
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __webpack_require__ = {};
|
|
2
|
+
(()=>{
|
|
3
|
+
__webpack_require__.g = (()=>{
|
|
4
|
+
if ('object' == typeof globalThis) return globalThis;
|
|
5
|
+
try {
|
|
6
|
+
return this || new Function('return this')();
|
|
7
|
+
} catch (e) {
|
|
8
|
+
if ('object' == typeof window) return window;
|
|
9
|
+
}
|
|
10
|
+
})();
|
|
11
|
+
})();
|
|
12
|
+
export { __webpack_require__ };
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { cutNameByHyphen };
|
|
1
|
+
export { cutNameByHyphen } from "./path.mjs";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "node:module";
|
|
2
|
-
import { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
|
|
3
2
|
const JS_EXTENSIONS = [
|
|
4
3
|
'.js',
|
|
5
4
|
'.ts',
|
|
@@ -27,4 +26,5 @@ const DEFAULT_DEV_HOST = '0.0.0.0';
|
|
|
27
26
|
const INTERNAL_RUNTIME_PLUGINS = {
|
|
28
27
|
'@modern-js/runtime': '@modern-js/runtime/cli'
|
|
29
28
|
};
|
|
30
|
-
export {
|
|
29
|
+
export { DEFAULT_ENTRY_NAME, MAIN_ENTRY_NAME, NESTED_ROUTE_SPEC_FILE, ROUTE_SPEC_FILE, SERVER_BUNDLE_DIRECTORY, SERVER_PLUGIN_BFF, SERVER_PLUGIN_POLYFILL, SERVER_RENDER_FUNCTION_NAME } from "../universal/constants.mjs";
|
|
30
|
+
export { API_DIR, CONFIG_CACHE_DIR, CONFIG_FILE_EXTENSIONS, DEFAULT_API_PREFIX, DEFAULT_DEV_HOST, DEFAULT_RUNTIME_CONFIG, ENTRY_NAME_PATTERN, INTERNAL_RUNTIME_PLUGINS, JS_EXTENSIONS, LOADABLE_STATS_FILE, LOADER_ROUTES_DIR, OUTPUT_CONFIG_FILE, ROUTE_MANIFEST_FILE, SERVER_DIR, SERVER_WORKER_BUNDLE_DIRECTORY, SHARED_DIR };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { lodash } from "../compiled.mjs";
|
|
3
|
-
const { cloneDeep } = lodash;
|
|
3
|
+
const { cloneDeep: cloneDeep } = lodash;
|
|
4
4
|
function filterRoutesForServer(routes) {
|
|
5
5
|
const clonedRoutes = cloneDeep(routes);
|
|
6
6
|
const newRoutes = clonedRoutes.map((route)=>{
|
|
@@ -1,34 +1,8 @@
|
|
|
1
1
|
import "node:module";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { Import } from "./import.mjs";
|
|
4
|
-
import fs_extra from "../compiled/fs-extra/index.js";
|
|
5
|
-
import ora from "../compiled/ora/index.js";
|
|
6
|
-
import glob from "../compiled/glob/index.js";
|
|
7
|
-
import js_yaml from "../compiled/js-yaml/index.mjs";
|
|
8
|
-
import chalk from "../compiled/chalk/index.js";
|
|
9
|
-
import debug from "../compiled/debug/index.js";
|
|
10
|
-
import slash from "../compiled/slash/index.js";
|
|
11
|
-
import execa from "../compiled/execa/index.js";
|
|
12
|
-
import json5 from "../compiled/json5/index.js";
|
|
13
|
-
import upath from "../compiled/upath/index.js";
|
|
14
|
-
import pkg_up from "../compiled/pkg-up/index.js";
|
|
15
|
-
import { nanoid } from "../compiled/nanoid/index.mjs";
|
|
16
|
-
import semver from "../compiled/semver/index.js";
|
|
17
|
-
import dotenv from "../compiled/dotenv/index.js";
|
|
18
|
-
import lodash from "../compiled/lodash/index.js";
|
|
19
|
-
import globby from "../compiled/globby/index.js";
|
|
20
|
-
import address from "../compiled/address/index.js";
|
|
21
4
|
import signale from "../compiled/signale/index.js";
|
|
22
|
-
|
|
23
|
-
import minimist from "../compiled/minimist/index.js";
|
|
24
|
-
import fast_glob from "../compiled/fast-glob/index.js";
|
|
25
|
-
import filesize from "../compiled/filesize/index.js";
|
|
26
|
-
import gzip_size from "../compiled/gzip-size/index.js";
|
|
27
|
-
import strip_ansi from "../compiled/strip-ansi/index.js";
|
|
28
|
-
import dotenv_expand from "../compiled/dotenv-expand/index.js";
|
|
29
|
-
import browserslist from "../compiled/browserslist/index.js";
|
|
30
|
-
import { Command, program } from "../compiled/commander/index.mjs";
|
|
31
|
-
const { Signale } = signale;
|
|
5
|
+
const { Signale: Signale } = signale;
|
|
32
6
|
const getNodeRequire = ()=>{
|
|
33
7
|
if ('object' == typeof global && 'function' == typeof global.require) return global.require;
|
|
34
8
|
if ('object' == typeof globalThis && 'function' == typeof globalThis.require) return globalThis.require;
|
|
@@ -37,4 +11,30 @@ const getNodeRequire = ()=>{
|
|
|
37
11
|
const mime = Import.lazy('../compiled/mime-types', getNodeRequire);
|
|
38
12
|
const chokidar = Import.lazy('../compiled/chokidar', getNodeRequire);
|
|
39
13
|
const inquirer = Import.lazy('../compiled/inquirer', getNodeRequire);
|
|
40
|
-
export {
|
|
14
|
+
export { default as fs } from "../compiled/fs-extra/index.js";
|
|
15
|
+
export { default as ora } from "../compiled/ora/index.js";
|
|
16
|
+
export { default as glob } from "../compiled/glob/index.js";
|
|
17
|
+
export { default as yaml } from "../compiled/js-yaml/index.mjs";
|
|
18
|
+
export { default as chalk } from "../compiled/chalk/index.js";
|
|
19
|
+
export { default as debug } from "../compiled/debug/index.js";
|
|
20
|
+
export { default as slash } from "../compiled/slash/index.js";
|
|
21
|
+
export { default as execa } from "../compiled/execa/index.js";
|
|
22
|
+
export { default as json5 } from "../compiled/json5/index.js";
|
|
23
|
+
export { default as upath } from "../compiled/upath/index.js";
|
|
24
|
+
export { default as pkgUp } from "../compiled/pkg-up/index.js";
|
|
25
|
+
export { nanoid } from "../compiled/nanoid/index.mjs";
|
|
26
|
+
export { default as semver } from "../compiled/semver/index.js";
|
|
27
|
+
export { default as dotenv } from "../compiled/dotenv/index.js";
|
|
28
|
+
export { default as lodash } from "../compiled/lodash/index.js";
|
|
29
|
+
export { default as globby } from "../compiled/globby/index.js";
|
|
30
|
+
export { default as address } from "../compiled/address/index.js";
|
|
31
|
+
export { default as urlJoin } from "../compiled/url-join/index.js";
|
|
32
|
+
export { default as minimist } from "../compiled/minimist/index.js";
|
|
33
|
+
export { default as fastGlob } from "../compiled/fast-glob/index.js";
|
|
34
|
+
export { default as filesize } from "../compiled/filesize/index.js";
|
|
35
|
+
export { default as gzipSize } from "../compiled/gzip-size/index.js";
|
|
36
|
+
export { default as stripAnsi } from "../compiled/strip-ansi/index.js";
|
|
37
|
+
export { default as dotenvExpand } from "../compiled/dotenv-expand/index.js";
|
|
38
|
+
export { default as browserslist } from "../compiled/browserslist/index.js";
|
|
39
|
+
export { Command, program } from "../compiled/commander/index.mjs";
|
|
40
|
+
export { Signale, chokidar, inquirer, mime, signale };
|
package/dist/esm-node/import.mjs
CHANGED
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "3.1.
|
|
18
|
+
"version": "3.1.2",
|
|
19
19
|
"types": "./dist/types/index.d.ts",
|
|
20
20
|
"main": "./dist/cjs/index.js",
|
|
21
21
|
"module": "./dist/esm/index.mjs",
|
|
@@ -142,13 +142,13 @@
|
|
|
142
142
|
"rslog": "^1.3.2"
|
|
143
143
|
},
|
|
144
144
|
"devDependencies": {
|
|
145
|
-
"@rslib/core": "0.
|
|
145
|
+
"@rslib/core": "0.20.3",
|
|
146
146
|
"@types/node": "^20",
|
|
147
|
-
"happy-dom": "^20.
|
|
147
|
+
"happy-dom": "^20.8.4",
|
|
148
148
|
"typescript": "^5",
|
|
149
149
|
"@modern-js/rslib": "2.68.10",
|
|
150
|
-
"@
|
|
151
|
-
"@
|
|
150
|
+
"@scripts/rstest-config": "2.66.0",
|
|
151
|
+
"@modern-js/types": "3.1.2"
|
|
152
152
|
},
|
|
153
153
|
"peerDependencies": {
|
|
154
154
|
"react": "^19.2.4",
|
|
File without changes
|