kiro-kit 0.3.0 → 0.3.3
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/index.js +16398 -621
- package/dist/index.js.map +1 -1
- package/package.json +80 -65
- package/scripts/postinstall.js +90 -0
package/package.json
CHANGED
|
@@ -1,65 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "kiro-kit",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "CLI tool for bootstrapping engineer-grade Kiro IDE workspaces with curated presets.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"bin": {
|
|
7
|
-
"kiro-kit": "./dist/index.js"
|
|
8
|
-
},
|
|
9
|
-
"engines": {
|
|
10
|
-
"node": ">=18"
|
|
11
|
-
},
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsup",
|
|
14
|
-
"dev": "tsup --watch",
|
|
15
|
-
"lint": "eslint src/ --ext .ts",
|
|
16
|
-
"typecheck": "tsc --noEmit",
|
|
17
|
-
"test": "vitest run",
|
|
18
|
-
"test:watch": "vitest",
|
|
19
|
-
"test:structural": "vitest run --config vitest.structural.config.ts",
|
|
20
|
-
"clean": "rimraf dist"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "kiro-kit",
|
|
3
|
+
"version": "0.3.3",
|
|
4
|
+
"description": "CLI tool for bootstrapping engineer-grade Kiro IDE workspaces with curated presets.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"kiro-kit": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=18"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsup",
|
|
14
|
+
"dev": "tsup --watch",
|
|
15
|
+
"lint": "eslint src/ --ext .ts",
|
|
16
|
+
"typecheck": "tsc --noEmit",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest",
|
|
19
|
+
"test:structural": "vitest run --config vitest.structural.config.ts",
|
|
20
|
+
"clean": "rimraf dist",
|
|
21
|
+
"postinstall": "node scripts/postinstall.js"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"kiro",
|
|
25
|
+
"ide",
|
|
26
|
+
"preset",
|
|
27
|
+
"cli",
|
|
28
|
+
"scaffolding",
|
|
29
|
+
"developer-tools",
|
|
30
|
+
"workspace"
|
|
31
|
+
],
|
|
32
|
+
"author": "KK-Kiro-Kit Contributors",
|
|
33
|
+
"license": "MIT",
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/ihatesea69/kiro-kit.git",
|
|
37
|
+
"directory": "packages/cli"
|
|
38
|
+
},
|
|
39
|
+
"homepage": "https://github.com/ihatesea69/kiro-kit#readme",
|
|
40
|
+
"bugs": {
|
|
41
|
+
"url": "https://github.com/ihatesea69/kiro-kit/issues"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"dist/**",
|
|
45
|
+
"scripts/postinstall.js",
|
|
46
|
+
"README.md",
|
|
47
|
+
"LICENSE",
|
|
48
|
+
"CHANGELOG.md"
|
|
49
|
+
],
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"boxen": "7.1.1",
|
|
52
|
+
"chalk": "5.3.0",
|
|
53
|
+
"commander": "^12.1.0",
|
|
54
|
+
"diff": "^7.0.0",
|
|
55
|
+
"figlet": "1.7.0",
|
|
56
|
+
"gradient-string": "2.0.2",
|
|
57
|
+
"js-yaml": "^4.1.0",
|
|
58
|
+
"kiro-kit": "^0.3.1",
|
|
59
|
+
"listr2": "8.0.1",
|
|
60
|
+
"ora": "8.0.1",
|
|
61
|
+
"picocolors": "^1.1.0",
|
|
62
|
+
"prompts": "2.4.2",
|
|
63
|
+
"terminal-link": "3.0.0",
|
|
64
|
+
"zod": "^3.23.0"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@types/diff": "^6.0.0",
|
|
68
|
+
"@types/figlet": "1.5.8",
|
|
69
|
+
"@types/gradient-string": "1.1.6",
|
|
70
|
+
"@types/js-yaml": "^4.0.9",
|
|
71
|
+
"@types/node": "^20.14.0",
|
|
72
|
+
"@types/prompts": "2.4.9",
|
|
73
|
+
"fast-check": "^3.19.0",
|
|
74
|
+
"rimraf": "^6.0.0",
|
|
75
|
+
"strip-ansi": "7.1.0",
|
|
76
|
+
"tsup": "^8.1.0",
|
|
77
|
+
"typescript": "^5.5.0",
|
|
78
|
+
"vitest": "^2.0.0"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// postinstall.js — Plain JS welcome notice after `npm install kiro-kit`.
|
|
3
|
+
//
|
|
4
|
+
// Rules:
|
|
5
|
+
// - No external dependencies (no figlet, boxen, ora, listr2, prompts, etc.)
|
|
6
|
+
// - Always exits 0 — never fails npm install
|
|
7
|
+
// - Respects KIRO_KIT_SKIP_POSTINSTALL, NO_COLOR, CI, non-TTY
|
|
8
|
+
// - Output <= 600 bytes, <= 12 lines
|
|
9
|
+
// - Reads version from ../package.json
|
|
10
|
+
//
|
|
11
|
+
// Note: package has "type":"module" so this file runs as ESM.
|
|
12
|
+
// We use fs.readFileSync + JSON.parse instead of require() for the version.
|
|
13
|
+
|
|
14
|
+
import { readFileSync } from 'node:fs';
|
|
15
|
+
import { fileURLToPath } from 'node:url';
|
|
16
|
+
import { dirname, join } from 'node:path';
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
var env = process.env;
|
|
20
|
+
|
|
21
|
+
// Opt-out: silent exit
|
|
22
|
+
if (env.KIRO_KIT_SKIP_POSTINSTALL) {
|
|
23
|
+
process.exit(0);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var isCI = Boolean(env.CI);
|
|
27
|
+
var isTTY = Boolean(process.stdout.isTTY);
|
|
28
|
+
var noColor = Boolean(env.NO_COLOR) || !isTTY;
|
|
29
|
+
|
|
30
|
+
// Read version from sibling package.json using ESM-compatible path resolution
|
|
31
|
+
var version = '0.0.0';
|
|
32
|
+
try {
|
|
33
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
34
|
+
var __dirname = dirname(__filename);
|
|
35
|
+
var pkgPath = join(__dirname, '..', 'package.json');
|
|
36
|
+
var pkg = JSON.parse(readFileSync(pkgPath, 'utf8'));
|
|
37
|
+
version = pkg.version || version;
|
|
38
|
+
} catch (_e) {
|
|
39
|
+
// version stays at fallback
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// CI or non-TTY: plain text only, no box
|
|
43
|
+
if (isCI || !isTTY) {
|
|
44
|
+
process.stdout.write('kiro-kit ' + version + ' installed.\nNext: npx kiro-kit init\n');
|
|
45
|
+
process.exit(0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Interactive TTY: render a simple inline box using only ANSI codes
|
|
49
|
+
// (no boxen, no chalk — just raw escape sequences)
|
|
50
|
+
var purple = function(s) { return noColor ? s : '\x1B[1;38;2;169;112;255m' + s + '\x1B[0m'; };
|
|
51
|
+
var dim = function(s) { return noColor ? s : '\x1B[2m' + s + '\x1B[0m'; };
|
|
52
|
+
var bold = function(s) { return noColor ? s : '\x1B[1m' + s + '\x1B[0m'; };
|
|
53
|
+
|
|
54
|
+
// Box drawing: use ASCII when NO_COLOR (safe for all terminals)
|
|
55
|
+
var tl = noColor ? '+' : '\u256D';
|
|
56
|
+
var tr = noColor ? '+' : '\u256E';
|
|
57
|
+
var bl = noColor ? '+' : '\u2570';
|
|
58
|
+
var br = noColor ? '+' : '\u256F';
|
|
59
|
+
var hz = noColor ? '-' : '\u2500';
|
|
60
|
+
var vt = noColor ? '|' : '\u2502';
|
|
61
|
+
|
|
62
|
+
var W = 52; // inner content width (between borders)
|
|
63
|
+
var top = tl + hz.repeat(W) + tr;
|
|
64
|
+
var bottom = bl + hz.repeat(W) + br;
|
|
65
|
+
|
|
66
|
+
function row(content) {
|
|
67
|
+
// Pad content to W chars (visible width only — no ANSI in content here)
|
|
68
|
+
var pad = Math.max(0, W - 2 - content.length);
|
|
69
|
+
return vt + ' ' + content + ' '.repeat(pad) + ' ' + vt;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var lines = [
|
|
73
|
+
'',
|
|
74
|
+
top,
|
|
75
|
+
row(purple('kiro-kit') + ' ' + dim('v' + version) + ' installed'),
|
|
76
|
+
row(''),
|
|
77
|
+
row('Next: ' + bold('npx kiro-kit init')),
|
|
78
|
+
row('Docs: https://github.com/ihatesea69/kiro-kit'),
|
|
79
|
+
row('Presets: frontend / backend / fullstack'),
|
|
80
|
+
row(' mobile / devops / data-ai'),
|
|
81
|
+
bottom,
|
|
82
|
+
'',
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
process.stdout.write(lines.join('\n') + '\n');
|
|
86
|
+
process.exit(0);
|
|
87
|
+
} catch (_err) {
|
|
88
|
+
// Never fail npm install — swallow all errors silently
|
|
89
|
+
process.exit(0);
|
|
90
|
+
}
|