@modern-js/utils 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @modern-js/utils
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 78279953: compiler entry bug fix and dev build console
8
+ - 4d72edea: support dev compiler by entry
9
+
3
10
  ## 1.3.0
4
11
 
5
12
  ### Minor Changes
@@ -39,7 +39,8 @@ export const prettyInstructions = (appContext, config) => {
39
39
  entrypoints,
40
40
  serverRoutes,
41
41
  port,
42
- existSrc
42
+ existSrc,
43
+ checkedEntries
43
44
  } = appContext;
44
45
  const urls = getAddressUrls(config.dev.https && isDev() ? 'https' : 'http', port);
45
46
  const routes = existSrc ? serverRoutes.filter(route => route.entryName) : serverRoutes;
@@ -59,11 +60,19 @@ export const prettyInstructions = (appContext, config) => {
59
60
  message += ` ${chalk.bold(`> ${type}`)}\n`;
60
61
  routes.forEach(({
61
62
  entryName,
62
- urlPath
63
+ urlPath,
64
+ isSSR
63
65
  }) => {
64
- message += ` ${chalk.yellowBright(entryName.padEnd(maxNameLength + 8))}${chalk.cyanBright(normalizeUrl(`${url}/${urlPath}`))}\n`;
66
+ if (!checkedEntries.includes(entryName)) {
67
+ return;
68
+ }
69
+
70
+ message += ` ${chalk.yellowBright(isSSR ? 'λ' : '○')} ${chalk.yellowBright(entryName.padEnd(maxNameLength + 8))}${chalk.cyanBright(normalizeUrl(`${url}/${urlPath}`))}\n`;
65
71
  });
66
72
  });
73
+ message += '\n';
74
+ message += chalk.cyanBright(' λ (Server) server-side renders at runtime\n');
75
+ message += chalk.cyanBright(' ○ (Static) client-side rendered as static HTML\n');
67
76
  }
68
77
 
69
78
  return message;
@@ -53,7 +53,8 @@ const prettyInstructions = (appContext, config) => {
53
53
  entrypoints,
54
54
  serverRoutes,
55
55
  port,
56
- existSrc
56
+ existSrc,
57
+ checkedEntries
57
58
  } = appContext;
58
59
  const urls = getAddressUrls(config.dev.https && (0, _is.isDev)() ? 'https' : 'http', port);
59
60
  const routes = existSrc ? serverRoutes.filter(route => route.entryName) : serverRoutes;
@@ -73,11 +74,19 @@ const prettyInstructions = (appContext, config) => {
73
74
  message += ` ${_chalk.default.bold(`> ${type}`)}\n`;
74
75
  routes.forEach(({
75
76
  entryName,
76
- urlPath
77
+ urlPath,
78
+ isSSR
77
79
  }) => {
78
- message += ` ${_chalk.default.yellowBright(entryName.padEnd(maxNameLength + 8))}${_chalk.default.cyanBright(normalizeUrl(`${url}/${urlPath}`))}\n`;
80
+ if (!checkedEntries.includes(entryName)) {
81
+ return;
82
+ }
83
+
84
+ message += ` ${_chalk.default.yellowBright(isSSR ? 'λ' : '○')} ${_chalk.default.yellowBright(entryName.padEnd(maxNameLength + 8))}${_chalk.default.cyanBright(normalizeUrl(`${url}/${urlPath}`))}\n`;
79
85
  });
80
86
  });
87
+ message += '\n';
88
+ message += _chalk.default.cyanBright(' λ (Server) server-side renders at runtime\n');
89
+ message += _chalk.default.cyanBright(' ○ (Static) client-side rendered as static HTML\n');
81
90
  }
82
91
 
83
92
  return message;
@@ -57,7 +57,8 @@ export var prettyInstructions = function prettyInstructions(appContext, config)
57
57
  entrypoints = _ref.entrypoints,
58
58
  serverRoutes = _ref.serverRoutes,
59
59
  port = _ref.port,
60
- existSrc = _ref.existSrc;
60
+ existSrc = _ref.existSrc,
61
+ checkedEntries = _ref.checkedEntries;
61
62
  var urls = getAddressUrls(config.dev.https && isDev() ? 'https' : 'http', port);
62
63
  var routes = existSrc ? serverRoutes.filter(function (route) {
63
64
  return route.entryName;
@@ -80,10 +81,19 @@ export var prettyInstructions = function prettyInstructions(appContext, config)
80
81
  message += " ".concat(chalk.bold("> ".concat(type)), "\n");
81
82
  routes.forEach(function (_ref4) {
82
83
  var entryName = _ref4.entryName,
83
- urlPath = _ref4.urlPath;
84
- message += " ".concat(chalk.yellowBright(entryName.padEnd(maxNameLength + 8))).concat(chalk.cyanBright(normalizeUrl("".concat(url, "/").concat(urlPath))), "\n");
84
+ urlPath = _ref4.urlPath,
85
+ isSSR = _ref4.isSSR;
86
+
87
+ if (!checkedEntries.includes(entryName)) {
88
+ return;
89
+ }
90
+
91
+ message += " ".concat(chalk.yellowBright(isSSR ? 'λ' : '○'), " ").concat(chalk.yellowBright(entryName.padEnd(maxNameLength + 8))).concat(chalk.cyanBright(normalizeUrl("".concat(url, "/").concat(urlPath))), "\n");
85
92
  });
86
93
  });
94
+ message += '\n';
95
+ message += chalk.cyanBright(' λ (Server) server-side renders at runtime\n');
96
+ message += chalk.cyanBright(' ○ (Static) client-side rendered as static HTML\n');
87
97
  }
88
98
 
89
99
  return message;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.3.0",
14
+ "version": "1.3.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -80,8 +80,7 @@
80
80
  "sideEffects": false,
81
81
  "publishConfig": {
82
82
  "registry": "https://registry.npmjs.org/",
83
- "access": "public",
84
- "types": "./dist/types/index.d.ts"
83
+ "access": "public"
85
84
  },
86
85
  "scripts": {
87
86
  "new": "modern new",