prizmkit 1.0.23 → 1.0.24
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/bundled/VERSION.json +3 -3
- package/bundled/skills/_metadata.json +1 -1
- package/package.json +1 -1
- package/src/index.js +13 -1
package/bundled/VERSION.json
CHANGED
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -7,11 +7,17 @@
|
|
|
7
7
|
|
|
8
8
|
import { select, confirm, input } from '@inquirer/prompts';
|
|
9
9
|
import chalk from 'chalk';
|
|
10
|
+
import { readFileSync } from 'fs';
|
|
11
|
+
import { dirname, join } from 'path';
|
|
12
|
+
import { fileURLToPath } from 'url';
|
|
10
13
|
import path from 'path';
|
|
11
14
|
import { detectPlatform } from './detect-platform.js';
|
|
12
15
|
import { scaffold } from './scaffold.js';
|
|
13
16
|
import { loadMetadata } from './metadata.js';
|
|
14
17
|
|
|
18
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
const pkg = JSON.parse(readFileSync(join(__dirname, '..', 'package.json'), 'utf-8'));
|
|
20
|
+
|
|
15
21
|
/**
|
|
16
22
|
* 主入口:交互式脚手架流程
|
|
17
23
|
* @param {string} directory - 目标目录
|
|
@@ -22,8 +28,14 @@ export async function runScaffold(directory, options) {
|
|
|
22
28
|
|
|
23
29
|
// 打印欢迎 banner
|
|
24
30
|
console.log('');
|
|
31
|
+
const versionTag = `v${pkg.version}`;
|
|
32
|
+
const titleText = ` PrizmKit ${versionTag} — 自演化自主开发框架`;
|
|
33
|
+
// Box inner width = 56 visible columns. CJK chars occupy 2 columns each in terminal.
|
|
34
|
+
const BOX_INNER = 56;
|
|
35
|
+
const cjkCount = (titleText.match(/[\u4e00-\u9fff\u3400-\u4dbf\uf900-\ufaff]/g) || []).length;
|
|
36
|
+
const titlePad = ' '.repeat(Math.max(0, BOX_INNER - titleText.length - cjkCount));
|
|
25
37
|
console.log(chalk.bold('╔════════════════════════════════════════════════════════╗'));
|
|
26
|
-
console.log(chalk.bold('║') + chalk.bold.cyan(' PrizmKit') + chalk.bold(
|
|
38
|
+
console.log(chalk.bold('║') + chalk.bold.cyan(' PrizmKit ') + chalk.bold(`${versionTag} — 自演化自主开发框架${titlePad}`) + chalk.bold('║'));
|
|
27
39
|
console.log(chalk.bold('║') + ' Create a clean, focused project environment ' + chalk.bold('║'));
|
|
28
40
|
console.log(chalk.bold('╚════════════════════════════════════════════════════════╝'));
|
|
29
41
|
console.log('');
|