@opellen/scaff 0.1.14 → 0.1.15
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/package.json +1 -1
- package/templates/commands/go.md +1 -1
- package/templates/skills/scaff-flow/SKILL.md +5 -6
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js +0 -235
- package/dist/extend.d.ts +0 -12
- package/dist/extend.js +0 -242
- package/dist/hook-parser.d.ts +0 -15
- package/dist/hook-parser.js +0 -95
- package/dist/i18n/index.d.ts +0 -5
- package/dist/i18n/index.js +0 -20
- package/dist/i18n/messages.d.ts +0 -28
- package/dist/i18n/messages.js +0 -49
- package/dist/index.d.ts +0 -4
- package/dist/index.js +0 -4
- package/dist/installer.d.ts +0 -10
- package/dist/installer.js +0 -74
- package/dist/marker.d.ts +0 -11
- package/dist/marker.js +0 -25
- package/dist/platforms/amazon-q.d.ts +0 -2
- package/dist/platforms/amazon-q.js +0 -12
- package/dist/platforms/antigravity.d.ts +0 -2
- package/dist/platforms/antigravity.js +0 -12
- package/dist/platforms/auggie.d.ts +0 -2
- package/dist/platforms/auggie.js +0 -15
- package/dist/platforms/claude.d.ts +0 -2
- package/dist/platforms/claude.js +0 -7
- package/dist/platforms/cline.d.ts +0 -2
- package/dist/platforms/cline.js +0 -11
- package/dist/platforms/codebuddy.d.ts +0 -2
- package/dist/platforms/codebuddy.js +0 -16
- package/dist/platforms/codex.d.ts +0 -2
- package/dist/platforms/codex.js +0 -7
- package/dist/platforms/continue.d.ts +0 -2
- package/dist/platforms/continue.js +0 -16
- package/dist/platforms/costrict.d.ts +0 -2
- package/dist/platforms/costrict.js +0 -15
- package/dist/platforms/crush.d.ts +0 -2
- package/dist/platforms/crush.js +0 -19
- package/dist/platforms/cursor.d.ts +0 -2
- package/dist/platforms/cursor.js +0 -18
- package/dist/platforms/factory.d.ts +0 -2
- package/dist/platforms/factory.js +0 -15
- package/dist/platforms/gemini.d.ts +0 -2
- package/dist/platforms/gemini.js +0 -14
- package/dist/platforms/github-copilot.d.ts +0 -2
- package/dist/platforms/github-copilot.js +0 -12
- package/dist/platforms/iflow.d.ts +0 -2
- package/dist/platforms/iflow.js +0 -18
- package/dist/platforms/index.d.ts +0 -10
- package/dist/platforms/index.js +0 -68
- package/dist/platforms/kilocode.d.ts +0 -2
- package/dist/platforms/kilocode.js +0 -8
- package/dist/platforms/kiro.d.ts +0 -2
- package/dist/platforms/kiro.js +0 -12
- package/dist/platforms/opencode.d.ts +0 -2
- package/dist/platforms/opencode.js +0 -12
- package/dist/platforms/pi.d.ts +0 -2
- package/dist/platforms/pi.js +0 -12
- package/dist/platforms/qoder.d.ts +0 -2
- package/dist/platforms/qoder.js +0 -19
- package/dist/platforms/qwen.d.ts +0 -2
- package/dist/platforms/qwen.js +0 -14
- package/dist/platforms/roocode.d.ts +0 -2
- package/dist/platforms/roocode.js +0 -11
- package/dist/platforms/toml.d.ts +0 -9
- package/dist/platforms/toml.js +0 -18
- package/dist/platforms/trae.d.ts +0 -2
- package/dist/platforms/trae.js +0 -11
- package/dist/platforms/types.d.ts +0 -19
- package/dist/platforms/types.js +0 -1
- package/dist/platforms/windsurf.d.ts +0 -2
- package/dist/platforms/windsurf.js +0 -19
- package/dist/platforms/yaml.d.ts +0 -10
- package/dist/platforms/yaml.js +0 -30
- package/dist/prompts/platform-select.d.ts +0 -1
- package/dist/prompts/platform-select.js +0 -174
- package/dist/skills/generate.d.ts +0 -13
- package/dist/skills/generate.js +0 -16
- package/dist/templates.d.ts +0 -18
- package/dist/templates.js +0 -96
- package/dist/ui/ascii-logo.d.ts +0 -6
- package/dist/ui/ascii-logo.js +0 -38
- package/dist/ui/colors.d.ts +0 -2
- package/dist/ui/colors.js +0 -3
- package/dist/ui/welcome.d.ts +0 -1
- package/dist/ui/welcome.js +0 -77
package/dist/ui/welcome.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import chalk from "chalk";
|
|
2
|
-
import { SCAFF_LOGO, SCAFF_LOGO_HEIGHT, SCAFF_LOGO_WIDTH } from "./ascii-logo.js";
|
|
3
|
-
import { t } from "../i18n/index.js";
|
|
4
|
-
import { brand, brandInner } from "./colors.js";
|
|
5
|
-
export async function showWelcome() {
|
|
6
|
-
if (!process.stdin.isTTY)
|
|
7
|
-
return;
|
|
8
|
-
const cols = process.stdout.columns ?? 80;
|
|
9
|
-
const compact = cols < 60;
|
|
10
|
-
const lines = buildScreen(compact);
|
|
11
|
-
process.stdout.write("\n" + lines.join("\n") + "\n\n");
|
|
12
|
-
await waitForEnter();
|
|
13
|
-
}
|
|
14
|
-
function buildScreen(compact) {
|
|
15
|
-
const rightLines = [
|
|
16
|
-
brand.bold("Scaff"),
|
|
17
|
-
chalk.dim(t("welcome.tagline")),
|
|
18
|
-
"",
|
|
19
|
-
chalk.dim(t("welcome.setsUp")),
|
|
20
|
-
" " + chalk.dim("•") + " " + t("welcome.skills"),
|
|
21
|
-
" " + chalk.dim("•") + " " + t("welcome.commands"),
|
|
22
|
-
"",
|
|
23
|
-
brand(t("welcome.pressEnter")),
|
|
24
|
-
];
|
|
25
|
-
if (compact) {
|
|
26
|
-
return rightLines;
|
|
27
|
-
}
|
|
28
|
-
const gap = " ";
|
|
29
|
-
const totalRows = Math.max(SCAFF_LOGO_HEIGHT, rightLines.length);
|
|
30
|
-
const result = [];
|
|
31
|
-
for (let i = 0; i < totalRows; i++) {
|
|
32
|
-
const logo = i < SCAFF_LOGO_HEIGHT ? colorLogoRow(i) : " ".repeat(SCAFF_LOGO_WIDTH);
|
|
33
|
-
const text = i < rightLines.length ? rightLines[i] : "";
|
|
34
|
-
result.push(logo + gap + text);
|
|
35
|
-
}
|
|
36
|
-
return result;
|
|
37
|
-
}
|
|
38
|
-
function colorLogoRow(row) {
|
|
39
|
-
const frame = SCAFF_LOGO.frame[row];
|
|
40
|
-
const inner = SCAFF_LOGO.inner[row];
|
|
41
|
-
let result = "";
|
|
42
|
-
for (let j = 0; j < SCAFF_LOGO_WIDTH; j++) {
|
|
43
|
-
const innerCh = inner[j];
|
|
44
|
-
if (innerCh !== " ") {
|
|
45
|
-
result += brandInner(innerCh);
|
|
46
|
-
continue;
|
|
47
|
-
}
|
|
48
|
-
const frameCh = frame[j];
|
|
49
|
-
result += frameCh === " " ? " " : brand(frameCh);
|
|
50
|
-
}
|
|
51
|
-
return result;
|
|
52
|
-
}
|
|
53
|
-
function waitForEnter() {
|
|
54
|
-
return new Promise((resolve) => {
|
|
55
|
-
const { stdin } = process;
|
|
56
|
-
const wasRaw = stdin.isRaw ?? false;
|
|
57
|
-
stdin.setRawMode(true);
|
|
58
|
-
stdin.resume();
|
|
59
|
-
const onData = (buf) => {
|
|
60
|
-
const key = buf[0];
|
|
61
|
-
if (key === 0x0d || key === 0x0a) {
|
|
62
|
-
cleanup();
|
|
63
|
-
resolve();
|
|
64
|
-
}
|
|
65
|
-
else if (key === 0x03) {
|
|
66
|
-
cleanup();
|
|
67
|
-
process.exit(0);
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
const cleanup = () => {
|
|
71
|
-
stdin.removeListener("data", onData);
|
|
72
|
-
stdin.setRawMode(wasRaw);
|
|
73
|
-
stdin.pause();
|
|
74
|
-
};
|
|
75
|
-
stdin.on("data", onData);
|
|
76
|
-
});
|
|
77
|
-
}
|