@best-shot/dev-server 0.20.4 → 0.21.1

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.
Files changed (2) hide show
  1. package/lib/action.mjs +6 -4
  2. package/package.json +5 -5
package/lib/action.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { errorHandle } from '@best-shot/cli/lib/utils.mjs';
1
+ import { commandMode, errorHandle } from '@best-shot/cli/lib/utils.mjs';
2
2
  import chalk from 'chalk';
3
3
 
4
4
  const { cyan } = chalk;
5
5
 
6
- export function action({ _: [command] }) {
6
+ export function action({ _: [command], configName }) {
7
7
  errorHandle(async () => {
8
8
  const { readConfig } = await import('@best-shot/config');
9
9
  const { createConfig } = await import(
@@ -13,15 +13,17 @@ export function action({ _: [command] }) {
13
13
  '@best-shot/cli/lib/create-compiler.mjs'
14
14
  );
15
15
 
16
- const configs = await readConfig()({ command });
16
+ const mode = commandMode(command);
17
+
18
+ const configs = await readConfig()({ mode, command, configName });
17
19
 
18
20
  const result = [];
19
21
 
20
22
  for (const config of configs) {
21
23
  const io = await createConfig(config, {
22
24
  watch: true,
25
+ mode,
23
26
  serve: Boolean(config.devServer),
24
- command,
25
27
  });
26
28
  result.push(io);
27
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@best-shot/dev-server",
3
- "version": "0.20.4",
3
+ "version": "0.21.1",
4
4
  "description": "DevServer support of `@best-shot/cli`",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -35,16 +35,16 @@
35
35
  "chalk": "^5.4.1",
36
36
  "ejs": "^3.1.10",
37
37
  "express": "^4.21.2",
38
- "launch-editor-middleware": "^2.10.0",
38
+ "launch-editor-middleware": "^2.11.0",
39
39
  "webpack-dev-server": "~5.2.2",
40
40
  "webpack-dev-server-waitpage": "^3.0.0",
41
- "@best-shot/config": "^0.8.4"
41
+ "@best-shot/config": "^0.9.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@best-shot/cli": "^0.18.4"
44
+ "@best-shot/cli": "^0.19.2"
45
45
  },
46
46
  "engines": {
47
- "node": ">=22.11.0 || ^20.18.0"
47
+ "node": ">=22.11.0"
48
48
  },
49
49
  "publishConfig": {
50
50
  "access": "public",