xinyu-pro 0.22.3 → 0.22.4

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.
@@ -1333,7 +1333,8 @@ export default function SettingsPage() {
1333
1333
  </SettingCard>
1334
1334
  </ColumnLayout>
1335
1335
  );
1336
- case 'data':
1336
+
1337
+ case 'data':
1337
1338
  return (
1338
1339
  <ColumnLayout>
1339
1340
  <SettingCard title="游戏记录">
package/bin/cli.js CHANGED
@@ -5,6 +5,7 @@ const { join, resolve } = require('path');
5
5
  const { createInterface } = require('readline');
6
6
  const { execSync, spawn } = require('child_process');
7
7
  const { homedir } = require('os');
8
+ const path = require('path');
8
9
 
9
10
  const isWin = process.platform === 'win32';
10
11
  const APP_DIR = __dirname.includes('node_modules') ? resolve(__dirname, '..') : process.cwd();
@@ -12,6 +13,7 @@ const XINYU_HOME = join(homedir(), '.xinyu-pro');
12
13
  const RUN_DIR = XINYU_HOME;
13
14
 
14
15
  const args = process.argv.slice(2);
16
+ const VERSION_FLAG = args.includes('--version');
15
17
  const HELP_FLAG = args.includes('--help') || args.includes('-h');
16
18
  const DEV_FLAG = args.includes('--dev');
17
19
  const RESET_FLAG = args.includes('--reset');
@@ -44,6 +46,13 @@ function ask(question) {
44
46
  });
45
47
  }
46
48
 
49
+ function showVersion() {
50
+ const versionPath = path.join(APP_DIR, 'version.json');
51
+ const versionData = JSON.parse(readFileSync(versionPath, 'utf-8'));
52
+ console.log(`${versionData.name} ${versionData.version}`);
53
+ process.exit(0);
54
+ }
55
+
47
56
  function showHelp() {
48
57
  echo('');
49
58
  echo(' ╔══════════════════════════════════════╗', 'bold');
@@ -244,6 +253,11 @@ async function main() {
244
253
  echo(' ╚══════════════════════════════════════╝', 'bold');
245
254
  echo('');
246
255
 
256
+ if (VERSION_FLAG) {
257
+ showVersion();
258
+ return;
259
+ }
260
+
247
261
  if (HELP_FLAG) {
248
262
  showHelp();
249
263
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xinyu-pro",
3
- "version": "0.22.3",
3
+ "version": "0.22.4",
4
4
  "private": false,
5
5
  "description": "星语 Pro - AI 驱动的互动叙事平台",
6
6
  "author": "RestRegular",
package/version.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.22.3",
2
+ "version": "0.22.4",
3
3
  "name": "xinyu-pro",
4
4
  "displayName": "星语 Pro",
5
5
  "description": "AI 驱动的互动叙事平台"