@nuasite/cli 0.13.1 → 0.13.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuasite/cli",
3
- "version": "0.13.1",
3
+ "version": "0.13.3",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "files": [
@@ -23,7 +23,7 @@
23
23
  "prepack": "bun run ../../scripts/workspace-deps/resolve-deps.ts"
24
24
  },
25
25
  "dependencies": {
26
- "@nuasite/agent-summary": "0.13.1",
26
+ "@nuasite/agent-summary": "0.13.3",
27
27
  "astro": "^5.17",
28
28
  "stacktracey": "2.1.8"
29
29
  },
package/src/index.ts CHANGED
@@ -77,24 +77,24 @@ if (canProxyDirectly && command && ['build', 'dev', 'preview'].includes(command)
77
77
  break
78
78
  case 'dev':
79
79
  case 'preview': {
80
- const options: AstroInlineConfig = {
81
- root: process.cwd(),
82
- integrations: [agentsSummary()],
83
- vite: {
84
- server: {},
85
- },
86
- }
80
+ const server: { port?: number; host?: string } = {}
87
81
 
88
82
  for (let i = 0; i < args.length; i++) {
89
83
  if (args[i] === '--port' && args[i + 1]) {
90
- options.vite!.server!.port = parseInt(args[i + 1] ?? '', 10)
84
+ server.port = parseInt(args[i + 1]!, 10)
91
85
  i++
92
86
  } else if (args[i] === '--host' && args[i + 1]) {
93
- options.vite!.server!.host = args[i + 1]
87
+ server.host = args[i + 1]
94
88
  i++
95
89
  }
96
90
  }
97
91
 
92
+ const options: AstroInlineConfig = {
93
+ root: process.cwd(),
94
+ integrations: [agentsSummary()],
95
+ server,
96
+ }
97
+
98
98
  const runner = command === 'dev' ? dev : preview
99
99
  runner(options).catch((error) => {
100
100
  console.error('Error:', error)