xiaozhi-client 1.1.0-next.5 → 1.1.0-next.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaozhi-client",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "小智 AI 客户端 命令行工具",
5
5
  "main": "dist/cli.cjs",
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xiaozhi-client",
3
- "version": "1.1.0-next.5",
3
+ "version": "1.1.0-next.7",
4
4
  "description": "小智 AI 客户端 命令行工具",
5
5
  "main": "dist/cli.cjs",
6
6
  "files": [
@@ -90,7 +90,13 @@ async function main() {
90
90
  }
91
91
 
92
92
  // Run the server if this file is executed directly
93
- if (import.meta.url === `file://${process.argv[1]}`) {
93
+ import { fileURLToPath } from 'node:url';
94
+ import { resolve } from 'node:path';
95
+
96
+ const currentFile = fileURLToPath(import.meta.url);
97
+ const argFile = process.argv[1] ? resolve(process.argv[1]) : null;
98
+
99
+ if (argFile && currentFile === argFile) {
94
100
  main().catch((error) => {
95
101
  logger.error(`Failed to start server: ${error.message}`);
96
102
  process.exit(1);
@@ -374,7 +374,13 @@ async function main() {
374
374
  }
375
375
 
376
376
  // Run the server if this file is executed directly
377
- if (import.meta.url === `file://${process.argv[1]}`) {
377
+ import { fileURLToPath } from 'node:url';
378
+ import { resolve } from 'node:path';
379
+
380
+ const currentFile = fileURLToPath(import.meta.url);
381
+ const argFile = process.argv[1] ? resolve(process.argv[1]) : null;
382
+
383
+ if (argFile && currentFile === argFile) {
378
384
  main().catch((error) => {
379
385
  logger.error(`Failed to start server: ${error.message}`);
380
386
  process.exit(1);
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "hello-world",
3
3
  "version": "1.0.0",
4
+ "type": "module",
4
5
  "description": "",
5
6
  "keywords": [],
6
7
  "author": "shenjingnan <sjn.code@gmail.com>",