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
package/package.json
CHANGED
|
@@ -90,7 +90,13 @@ async function main() {
|
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
// Run the server if this file is executed directly
|
|
93
|
-
|
|
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
|
-
|
|
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);
|