@nbtca/prompt 1.0.15 → 1.0.16

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.
@@ -12,7 +12,7 @@ export declare const URLS: {
12
12
  };
13
13
  export declare const APP_INFO: {
14
14
  readonly name: "Prompt";
15
- readonly version: "1.0.13";
15
+ readonly version: string;
16
16
  readonly description: "浙大宁波理工学院计算机协会";
17
17
  readonly fullDescription: "NBTCA Prompt - 极简命令行工具";
18
18
  readonly author: "m1ngsama <contact@m1ng.space>";
@@ -1 +1 @@
1
- {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/config/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,eAAO,MAAM,IAAI;;;;;;;CAYP,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAC"}
1
+ {"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../src/config/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAmBH,eAAO,MAAM,IAAI;;;;;;;CAYP,CAAC;AAEX,eAAO,MAAM,QAAQ;;;;;;;;CAQX,CAAC"}
@@ -2,6 +2,21 @@
2
2
  * 核心URL配置
3
3
  * 集中管理所有外部链接
4
4
  */
5
+ import { readFileSync } from 'fs';
6
+ import { fileURLToPath } from 'url';
7
+ import { dirname, join } from 'path';
8
+ const __filename = fileURLToPath(import.meta.url);
9
+ const __dirname = dirname(__filename);
10
+ function readPackageVersion() {
11
+ try {
12
+ const pkgPath = join(__dirname, '..', '..', 'package.json');
13
+ const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'));
14
+ return pkg.version ?? '0.0.0';
15
+ }
16
+ catch {
17
+ return '0.0.0';
18
+ }
19
+ }
5
20
  export const URLS = {
6
21
  // 主要链接
7
22
  homepage: 'https://nbtca.space',
@@ -15,7 +30,7 @@ export const URLS = {
15
30
  };
16
31
  export const APP_INFO = {
17
32
  name: 'Prompt',
18
- version: '1.0.13',
33
+ version: readPackageVersion(),
19
34
  description: '浙大宁波理工学院计算机协会',
20
35
  fullDescription: 'NBTCA Prompt - 极简命令行工具',
21
36
  author: 'm1ngsama <contact@m1ng.space>',
@@ -1 +1 @@
1
- {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/config/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO;IACP,QAAQ,EAAE,qBAAqB;IAC/B,MAAM,EAAE,0BAA0B;IAClC,IAAI,EAAE,0BAA0B;IAChC,MAAM,EAAE,4BAA4B;IAEpC,QAAQ;IACR,QAAQ,EAAE,0BAA0B;IAEpC,OAAO;IACP,KAAK,EAAE,qBAAqB;CACpB,CAAC;AAEX,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,QAAQ;IACjB,WAAW,EAAE,eAAe;IAC5B,eAAe,EAAE,wBAAwB;IACzC,MAAM,EAAE,+BAA+B;IACvC,OAAO,EAAE,KAAK;IACd,UAAU,EAAE,iCAAiC;CACrC,CAAC"}
1
+ {"version":3,"file":"data.js","sourceRoot":"","sources":["../../src/config/data.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAErC,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,SAAS,kBAAkB;IACzB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;QAC5D,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC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