@modern-js/prod-server 2.67.7 → 2.67.8

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/cjs/apply.js CHANGED
@@ -34,7 +34,7 @@ function getLogger(_) {
34
34
  }
35
35
  }
36
36
  async function applyPlugins(serverBase, options, nodeServer) {
37
- const { pwd, appContext, config } = options;
37
+ const { pwd, appContext, config, logger: optLogger } = options;
38
38
  const loadCachePwd = (0, import_utils.isProd)() ? pwd : appContext.appDirectory || pwd;
39
39
  const cacheConfig = await (0, import_node.loadCacheConfig)(loadCachePwd);
40
40
  serverBase.notFound((c) => {
@@ -58,7 +58,7 @@ async function applyPlugins(serverBase, options, nodeServer) {
58
58
  ...(0, import_server_core.createDefaultPlugins)({
59
59
  cacheConfig,
60
60
  staticGenerate: options.staticGenerate,
61
- logger: loggerOptions === false ? false : getLogger(loggerOptions)
61
+ logger: loggerOptions === false ? false : optLogger || getLogger(loggerOptions)
62
62
  }),
63
63
  (0, import_server_core.injectConfigMiddlewarePlugin)(middlewares, renderMiddlewares),
64
64
  ...options.plugins || [],
package/dist/esm/apply.js CHANGED
@@ -18,11 +18,11 @@ function applyPlugins(serverBase, options, nodeServer) {
18
18
  }
19
19
  function _applyPlugins() {
20
20
  _applyPlugins = _async_to_generator(function(serverBase, options, nodeServer) {
21
- var pwd, appContext, config, loadCachePwd, cacheConfig, loggerOptions, _ref, middlewares, renderMiddlewares, plugins;
21
+ var pwd, appContext, config, optLogger, loadCachePwd, cacheConfig, loggerOptions, _ref, middlewares, renderMiddlewares, plugins;
22
22
  return _ts_generator(this, function(_state) {
23
23
  switch (_state.label) {
24
24
  case 0:
25
- pwd = options.pwd, appContext = options.appContext, config = options.config;
25
+ pwd = options.pwd, appContext = options.appContext, config = options.config, optLogger = options.logger;
26
26
  loadCachePwd = isProd() ? pwd : appContext.appDirectory || pwd;
27
27
  return [
28
28
  4,
@@ -49,7 +49,7 @@ function _applyPlugins() {
49
49
  ] : []).concat(_to_consumable_array(createDefaultPlugins({
50
50
  cacheConfig,
51
51
  staticGenerate: options.staticGenerate,
52
- logger: loggerOptions === false ? false : getLogger(loggerOptions)
52
+ logger: loggerOptions === false ? false : optLogger || getLogger(loggerOptions)
53
53
  })), [
54
54
  injectConfigMiddlewarePlugin(middlewares, renderMiddlewares)
55
55
  ], _to_consumable_array(options.plugins || []), [
@@ -11,7 +11,7 @@ function getLogger(_) {
11
11
  }
12
12
  }
13
13
  async function applyPlugins(serverBase, options, nodeServer) {
14
- const { pwd, appContext, config } = options;
14
+ const { pwd, appContext, config, logger: optLogger } = options;
15
15
  const loadCachePwd = isProd() ? pwd : appContext.appDirectory || pwd;
16
16
  const cacheConfig = await loadCacheConfig(loadCachePwd);
17
17
  serverBase.notFound((c) => {
@@ -35,7 +35,7 @@ async function applyPlugins(serverBase, options, nodeServer) {
35
35
  ...createDefaultPlugins({
36
36
  cacheConfig,
37
37
  staticGenerate: options.staticGenerate,
38
- logger: loggerOptions === false ? false : getLogger(loggerOptions)
38
+ logger: loggerOptions === false ? false : optLogger || getLogger(loggerOptions)
39
39
  }),
40
40
  injectConfigMiddlewarePlugin(middlewares, renderMiddlewares),
41
41
  ...options.plugins || [],
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.67.7",
18
+ "version": "2.67.8",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -42,9 +42,9 @@
42
42
  "dependencies": {
43
43
  "@swc/helpers": "^0.5.17",
44
44
  "source-map-support": "0.5.21",
45
- "@modern-js/runtime-utils": "2.67.7",
46
- "@modern-js/server-core": "2.67.7",
47
- "@modern-js/utils": "2.67.7"
45
+ "@modern-js/runtime-utils": "2.67.8",
46
+ "@modern-js/utils": "2.67.8",
47
+ "@modern-js/server-core": "2.67.8"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/jest": "^29",
@@ -55,7 +55,7 @@
55
55
  "lint-staged": "~13.3.0",
56
56
  "tsx": "^3.12.7",
57
57
  "typescript": "~5.0.4",
58
- "@modern-js/types": "2.67.7",
58
+ "@modern-js/types": "2.67.8",
59
59
  "@scripts/build": "2.66.0",
60
60
  "@scripts/jest-config": "2.66.0"
61
61
  },