bun-sticky 1.0.0 → 1.0.1

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.
@@ -3,10 +3,10 @@
3
3
  ## Pre-Publish Checklist
4
4
 
5
5
  ### 1. Code Quality
6
- - [ ] All 45 tests passing (`bun test`)
7
- - [ ] Zero TypeScript errors
8
- - [ ] Zero runtime dependencies
9
- - [ ] Pure Bun APIs only
6
+ - [x] All 177 tests passing (`bun test`)
7
+ - [x] Zero TypeScript errors
8
+ - [x] Zero runtime dependencies
9
+ - [x] Pure Bun APIs only
10
10
 
11
11
  ### 2. Version Bump
12
12
  ```bash
@@ -18,44 +18,42 @@
18
18
  ### 3. Test Suite
19
19
  ```bash
20
20
  bun test
21
- # Expect: 45 pass, 0 fail
21
+ # Expect: 177 pass, 0 fail
22
22
  ```
23
23
 
24
24
  ### 4. Manual Verification
25
25
  ```bash
26
- bun run index.ts --version
27
- bun run index.ts help
28
- bun run index.ts score
26
+ bunx bun-sticky --version # ✓
27
+ bunx bun-sticky help #
28
+ bunx bun-sticky init test #
29
+ bunx bun-sticky score # ✓
29
30
  ```
30
31
 
31
32
  ## Publish Commands
32
33
 
33
34
  ### npm Registry
34
35
  ```bash
35
- # Login (first time)
36
- npm login
37
-
38
- # Publish
39
- npm publish
36
+ npm publish --access public
40
37
  ```
41
38
 
42
- ### Bun Package Manager (future)
39
+ ### Verify
43
40
  ```bash
44
- # When Bun has its own registry
45
- bun publish
41
+ npm view bun-sticky
42
+ bunx bun-sticky help
46
43
  ```
47
44
 
48
45
  ## Post-Publish
49
46
 
50
- 1. Tag release in git
51
- 2. Update ZIG-n-RUST.md benchmarks
52
- 3. Announce in faf-cli ecosystem
47
+ 1. [x] Tag release in git
48
+ 2. [ ] Update ZIG-n-RUST.md benchmarks
49
+ 3. [ ] Announce in faf-cli ecosystem
53
50
 
54
51
  ## Version History
55
52
 
56
53
  | Version | Date | Notes |
57
54
  |---------|------|-------|
58
- | 1.0.0 | TBD | Initial release - Wolfejam slot-based scoring |
55
+ | 1.0.0 | 2024-12-22 | Initial release - Wolfejam slot-based scoring, 177 tests |
56
+ | 1.0.1 | 2024-12-22 | Proper publish ceremony, version consistency |
59
57
 
60
58
  ---
61
59
 
package/README.md CHANGED
@@ -18,7 +18,7 @@ bunx bun-sticky score
18
18
  ████ █▄▀ ▀▄▀ █ █
19
19
  ▀▀
20
20
 
21
- 🥐 Bun Sticky v1.0.0 .faf CLI
21
+ 🥐 Bun Sticky v1.0.1 .faf CLI
22
22
  Fastest bun under the sum.
23
23
 
24
24
  ────────────────────────────────────────────────
package/index.ts CHANGED
@@ -20,7 +20,7 @@ import { getTier } from "./lib/tier.ts";
20
20
  // CONSTANTS
21
21
  // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22
22
 
23
- const VERSION = "1.0.0";
23
+ const VERSION = "1.0.1";
24
24
 
25
25
  // Bun Brand Colors (ANSI 256)
26
26
  const BUN_BLUE = "\x1b[38;5;39m"; // #00a6e1
@@ -112,6 +112,72 @@ async function cmdScore(): Promise<void> {
112
112
  console.log(` ${tier.color}${tier.emoji} ${BOLD}${result.score}%${RESET} ${tier.color}${tier.name}${RESET}`);
113
113
  console.log(` ${DIM}Filled: ${result.filled}/${result.total} slots${RESET}`);
114
114
  console.log();
115
+
116
+ // Show missing slots with copy-paste YAML
117
+ if (result.missing.length > 0) {
118
+ console.log(` ${YELLOW}Add to project.faf:${RESET}`);
119
+ console.log();
120
+
121
+ // Group by section
122
+ const projectMissing = result.missing.filter(s => s.startsWith("project."));
123
+ const humanMissing = result.missing.filter(s => s.startsWith("human_context."));
124
+ const stackMissing = result.missing.filter(s => s.startsWith("stack."));
125
+
126
+ if (projectMissing.length > 0) {
127
+ console.log(` ${DIM}project:${RESET}`);
128
+ for (const slot of projectMissing) {
129
+ const field = slot.replace("project.", "");
130
+ console.log(` ${CYAN}${field}:${RESET} "${getHint(field)}"`);
131
+ }
132
+ }
133
+
134
+ if (stackMissing.length > 0) {
135
+ console.log(` ${DIM}stack:${RESET}`);
136
+ for (const slot of stackMissing) {
137
+ const field = slot.replace("stack.", "");
138
+ console.log(` ${CYAN}${field}:${RESET} "${getHint(field)}"`);
139
+ }
140
+ }
141
+
142
+ if (humanMissing.length > 0) {
143
+ console.log(` ${DIM}human_context:${RESET}`);
144
+ for (const slot of humanMissing) {
145
+ const field = slot.replace("human_context.", "");
146
+ console.log(` ${CYAN}${field}:${RESET} "${getHint(field)}"`);
147
+ }
148
+ }
149
+ console.log();
150
+ }
151
+ }
152
+
153
+ function getHint(field: string): string {
154
+ const hints: Record<string, string> = {
155
+ // Project
156
+ name: "Project name",
157
+ goal: "What problem does this solve?",
158
+ main_language: "TypeScript",
159
+ // Human context - questions that make you think
160
+ who: "Who is it for?",
161
+ what: "What does it do?",
162
+ why: "Why does it exist?",
163
+ where: "Where is it deployed/used?",
164
+ when: "When is it due/released?",
165
+ how: "How is it built?",
166
+ // Stack
167
+ frontend: "React",
168
+ css_framework: "Tailwind",
169
+ ui_library: "shadcn",
170
+ state_management: "zustand",
171
+ backend: "Node.js",
172
+ api_type: "REST",
173
+ runtime: "Bun",
174
+ database: "PostgreSQL",
175
+ connection: "prisma",
176
+ hosting: "Vercel",
177
+ build: "vite",
178
+ cicd: "GitHub Actions",
179
+ };
180
+ return hints[field] || "";
115
181
  }
116
182
 
117
183
  function formatBar(percent: number): string {
package/lib/scorer.ts CHANGED
@@ -110,6 +110,7 @@ export interface FafScore {
110
110
  filled: number;
111
111
  total: number;
112
112
  score: number;
113
+ missing: string[];
113
114
  }
114
115
 
115
116
  // ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
@@ -215,11 +216,22 @@ export function calculateScore(faf: Record<string, unknown>): FafScore {
215
216
  // Calculate final score
216
217
  const score = total > 0 ? Math.round((filled / total) * 100) : 0;
217
218
 
219
+ // Find missing slots
220
+ const missing: string[] = [];
221
+ for (const category of applicableCategories) {
222
+ for (const slot of SLOTS[category]) {
223
+ if (!hasValue(faf, slot)) {
224
+ missing.push(slot);
225
+ }
226
+ }
227
+ }
228
+
218
229
  return {
219
230
  projectType,
220
231
  sections,
221
232
  filled,
222
233
  total,
223
234
  score,
235
+ missing,
224
236
  };
225
237
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bun-sticky",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Fastest bun under the sum. FAF scoring CLI for Bun.",
5
5
  "main": "index.ts",
6
6
  "type": "module",
@@ -1,117 +1,5 @@
1
1
  // Bun Snapshot v1, https://bun.sh/docs/test/snapshots
2
2
 
3
- exports[`Tier 9: Snapshot Testing T9.01 - SLOTS structure snapshot 1`] = `
4
- {
5
- "backend": [
6
- "stack.backend",
7
- "stack.api_type",
8
- "stack.runtime",
9
- "stack.database",
10
- "stack.connection",
11
- ],
12
- "frontend": [
13
- "stack.frontend",
14
- "stack.css_framework",
15
- "stack.ui_library",
16
- "stack.state_management",
17
- ],
18
- "human": [
19
- "human_context.who",
20
- "human_context.what",
21
- "human_context.why",
22
- "human_context.where",
23
- "human_context.when",
24
- "human_context.how",
25
- ],
26
- "project": [
27
- "project.name",
28
- "project.goal",
29
- "project.main_language",
30
- ],
31
- "universal": [
32
- "stack.hosting",
33
- "stack.build",
34
- "stack.cicd",
35
- ],
36
- }
37
- `;
38
-
39
- exports[`Tier 9: Snapshot Testing T9.02 - TYPE_CATEGORIES snapshot 1`] = `
40
- {
41
- "api": [
42
- "project",
43
- "backend",
44
- "universal",
45
- "human",
46
- ],
47
- "cli": [
48
- "project",
49
- "human",
50
- ],
51
- "fullstack": [
52
- "project",
53
- "frontend",
54
- "backend",
55
- "universal",
56
- "human",
57
- ],
58
- "library": [
59
- "project",
60
- "human",
61
- ],
62
- "mobile": [
63
- "project",
64
- "human",
65
- ],
66
- "unknown": [
67
- "project",
68
- "human",
69
- ],
70
- "webapp": [
71
- "project",
72
- "frontend",
73
- "universal",
74
- "human",
75
- ],
76
- }
77
- `;
78
-
79
- exports[`Tier 9: Snapshot Testing T9.03 - Full CLI score result snapshot 1`] = `
80
- {
81
- "filled": 9,
82
- "projectType": "cli",
83
- "score": 100,
84
- "sections": {
85
- "backend": {
86
- "filled": 0,
87
- "percentage": 0,
88
- "total": 0,
89
- },
90
- "frontend": {
91
- "filled": 0,
92
- "percentage": 0,
93
- "total": 0,
94
- },
95
- "human": {
96
- "filled": 6,
97
- "percentage": 100,
98
- "total": 6,
99
- },
100
- "project": {
101
- "filled": 3,
102
- "percentage": 100,
103
- "total": 3,
104
- },
105
- "universal": {
106
- "filled": 0,
107
- "percentage": 0,
108
- "total": 0,
109
- },
110
- },
111
- "total": 9,
112
- }
113
- `;
114
-
115
3
  exports[`Tier 2: Scoring Engine T2.07 - SLOTS structure snapshot 1`] = `
116
4
  {
117
5
  "backend": [
@@ -151,6 +39,7 @@ exports[`Tier 2: Scoring Engine T2.07 - SLOTS structure snapshot 1`] = `
151
39
  exports[`Tier 2: Scoring Engine T2.14 - Full CLI result snapshot 1`] = `
152
40
  {
153
41
  "filled": 9,
42
+ "missing": [],
154
43
  "projectType": "cli",
155
44
  "score": 100,
156
45
  "sections": {