@umijs/utils 4.0.39 → 4.0.41
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/getDevBanner.js +2 -1
- package/dist/isStyleFile.d.ts +1 -1
- package/dist/isStyleFile.js +1 -1
- package/package.json +1 -1
package/dist/getDevBanner.js
CHANGED
|
@@ -40,7 +40,8 @@ function getDevBanner(protocol, host = "0.0.0.0", port, offset = 8) {
|
|
|
40
40
|
const header = " App listening at:";
|
|
41
41
|
const footer = import_chalk.default.bold(" Now you can open browser with the above addresses\u2191 ");
|
|
42
42
|
const local = ` ${import_chalk.default.gray(">")} Local: ${import_chalk.default.green(`${protocol}//${host === "0.0.0.0" ? "localhost" : host}:${port}`)} `;
|
|
43
|
-
const
|
|
43
|
+
const ip = import_address.default.ip();
|
|
44
|
+
const network = ` ${import_chalk.default.gray(">")} Network: ${ip ? import_chalk.default.green(`${protocol}//${ip}:${port}`) : import_chalk.default.gray("Not available")} `;
|
|
44
45
|
const maxLen = Math.max(...[header, footer, local, network].map((x) => (0, import_strip_ansi.default)(x).length));
|
|
45
46
|
const beforeLines = [
|
|
46
47
|
`${BORDERS.TL}${import_chalk.default.gray.dim("".padStart(maxLen, BORDERS.H_PURE))}${BORDERS.TR}`,
|
package/dist/isStyleFile.d.ts
CHANGED
package/dist/isStyleFile.js
CHANGED
|
@@ -36,7 +36,7 @@ var isStyleFile = ({
|
|
|
36
36
|
filename,
|
|
37
37
|
ext
|
|
38
38
|
}) => {
|
|
39
|
-
return AUTO_CSS_MODULE_EXTS.includes(ext || (0, import_path.extname)(filename));
|
|
39
|
+
return filename && AUTO_CSS_MODULE_EXTS.includes(ext || (0, import_path.extname)(filename));
|
|
40
40
|
};
|
|
41
41
|
// Annotate the CommonJS export names for ESM import in node:
|
|
42
42
|
0 && (module.exports = {
|