@slycode/slycode 0.2.23 → 0.2.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/dist/scripts/scaffold.js +40 -1
- package/dist/store/actions/approve.md +1 -1
- package/dist/store/actions/challenge-implementation.md +149 -0
- package/dist/store/actions/challenge.md +119 -0
- package/dist/store/actions/checkpoint.md +1 -1
- package/dist/store/actions/context.md +2 -2
- package/dist/store/actions/implement.md +1 -1
- package/dist/store/actions/show-card.md +2 -2
- package/dist/store/actions/summarize.md +2 -2
- package/dist/store/actions/test-review.md +1 -1
- package/dist/web/.next/BUILD_ID +1 -1
- package/dist/web/.next/build-manifest.json +2 -2
- package/dist/web/.next/server/app/_global-error.html +2 -2
- package/dist/web/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.html +1 -1
- package/dist/web/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__92f81907._.js +1 -1
- package/dist/web/.next/server/chunks/[root-of-the-server]__a259539f._.js +1 -1
- package/dist/web/.next/server/chunks/ssr/src_components_Dashboard_tsx_efc4dc27._.js +1 -1
- package/dist/web/.next/server/pages/404.html +1 -1
- package/dist/web/.next/server/pages/500.html +2 -2
- package/dist/web/.next/static/chunks/{3859477038c381ad.js → f566a4b05a9cd6ba.js} +1 -1
- package/dist/web/src/app/api/changelog/route.ts +3 -3
- package/dist/web/src/app/api/terminal-classes/route.ts +43 -4
- package/dist/web/src/components/ChangelogModal.tsx +0 -1
- package/dist/web/tsconfig.tsbuildinfo +1 -1
- package/lib/cli/sync.d.ts +7 -0
- package/lib/cli/sync.d.ts.map +1 -1
- package/lib/cli/sync.js +25 -0
- package/lib/cli/sync.js.map +1 -1
- package/lib/cli/update.d.ts.map +1 -1
- package/lib/cli/update.js +9 -0
- package/lib/cli/update.js.map +1 -1
- package/package.json +1 -1
- package/templates/changelog.json +26 -0
- package/templates/kanban-seed.json +1 -1
- package/templates/store/actions/approve.md +1 -1
- package/templates/store/actions/challenge-implementation.md +149 -0
- package/templates/store/actions/challenge.md +119 -0
- package/templates/store/actions/checkpoint.md +1 -1
- package/templates/store/actions/context.md +2 -2
- package/templates/store/actions/implement.md +1 -1
- package/templates/store/actions/show-card.md +2 -2
- package/templates/store/actions/summarize.md +2 -2
- package/templates/store/actions/test-review.md +1 -1
- package/templates/terminal-classes.json +51 -0
- package/templates/updates/actions/approve.md +1 -1
- package/templates/updates/actions/challenge-implementation.md +149 -0
- package/templates/updates/actions/challenge.md +119 -0
- package/templates/updates/actions/checkpoint.md +1 -1
- package/templates/updates/actions/context.md +2 -2
- package/templates/updates/actions/implement.md +1 -1
- package/templates/updates/actions/show-card.md +2 -2
- package/templates/updates/actions/summarize.md +2 -2
- package/templates/updates/actions/test-review.md +1 -1
- /package/dist/web/.next/static/{aN-jqftQVvSm0qVskLybH → O1Ine2WtyXv6EQJcwHyOV}/_buildManifest.js +0 -0
- /package/dist/web/.next/static/{aN-jqftQVvSm0qVskLybH → O1Ine2WtyXv6EQJcwHyOV}/_clientMiddlewareManifest.json +0 -0
- /package/dist/web/.next/static/{aN-jqftQVvSm0qVskLybH → O1Ine2WtyXv6EQJcwHyOV}/_ssgManifest.js +0 -0
|
@@ -32,12 +32,12 @@ export async function GET() {
|
|
|
32
32
|
const raw = readFileSync(p, 'utf-8');
|
|
33
33
|
const data = JSON.parse(raw);
|
|
34
34
|
if (!Array.isArray(data)) {
|
|
35
|
-
|
|
35
|
+
console.warn(`[changelog] ${p}: root is not an array, skipping`);
|
|
36
36
|
continue;
|
|
37
37
|
}
|
|
38
38
|
return NextResponse.json(data as ChangelogVersion[]);
|
|
39
|
-
} catch {
|
|
40
|
-
|
|
39
|
+
} catch (err) {
|
|
40
|
+
console.warn(`[changelog] ${p}: failed to parse:`, err instanceof Error ? err.message : err);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
import { NextResponse } from 'next/server';
|
|
2
2
|
import fs from 'fs/promises';
|
|
3
|
+
import fsSync from 'fs';
|
|
3
4
|
import path from 'path';
|
|
4
|
-
import { getSlycodeRoot } from '@/lib/paths';
|
|
5
|
+
import { getSlycodeRoot, getPackageDir } from '@/lib/paths';
|
|
5
6
|
|
|
6
7
|
function getClassesFile(): string {
|
|
7
8
|
return path.join(getSlycodeRoot(), 'documentation', 'terminal-classes.json');
|
|
8
9
|
}
|
|
9
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Find the terminal-classes.json template from the package.
|
|
13
|
+
* In prod: node_modules/@slycode/slycode/dist/templates/terminal-classes.json
|
|
14
|
+
* In dev: falls back to documentation/terminal-classes.json at repo root
|
|
15
|
+
*/
|
|
16
|
+
function getPackageTemplate(): string | null {
|
|
17
|
+
const pkgDir = getPackageDir();
|
|
18
|
+
// Prod: check templates/ in the package dist
|
|
19
|
+
const templatePath = path.join(pkgDir, 'templates', 'terminal-classes.json');
|
|
20
|
+
if (fsSync.existsSync(templatePath)) return templatePath;
|
|
21
|
+
// Dev fallback: the source file at repo root
|
|
22
|
+
const devPath = path.join(getSlycodeRoot(), 'documentation', 'terminal-classes.json');
|
|
23
|
+
if (fsSync.existsSync(devPath)) return devPath;
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
10
27
|
export interface TerminalClass {
|
|
11
28
|
id: string;
|
|
12
29
|
name: string;
|
|
@@ -20,12 +37,34 @@ export interface TerminalClassesConfig {
|
|
|
20
37
|
}
|
|
21
38
|
|
|
22
39
|
export async function GET() {
|
|
40
|
+
const classesFile = getClassesFile();
|
|
41
|
+
|
|
23
42
|
try {
|
|
24
|
-
const content = await fs.readFile(
|
|
43
|
+
const content = await fs.readFile(classesFile, 'utf-8');
|
|
25
44
|
const config: TerminalClassesConfig = JSON.parse(content);
|
|
26
45
|
return NextResponse.json(config);
|
|
27
|
-
} catch
|
|
28
|
-
//
|
|
46
|
+
} catch {
|
|
47
|
+
// Workspace file missing — try to seed from package template
|
|
48
|
+
const templatePath = getPackageTemplate();
|
|
49
|
+
if (templatePath) {
|
|
50
|
+
try {
|
|
51
|
+
const templateContent = await fs.readFile(templatePath, 'utf-8');
|
|
52
|
+
const config: TerminalClassesConfig = JSON.parse(templateContent);
|
|
53
|
+
|
|
54
|
+
// Auto-seed to workspace so future reads don't need the fallback
|
|
55
|
+
try {
|
|
56
|
+
await fs.mkdir(path.dirname(classesFile), { recursive: true });
|
|
57
|
+
await fs.writeFile(classesFile, templateContent);
|
|
58
|
+
} catch {
|
|
59
|
+
// Seed failed (read-only fs, etc.) — still serve the template
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return NextResponse.json(config);
|
|
63
|
+
} catch {
|
|
64
|
+
// Template unreadable — fall through to empty
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
29
68
|
return NextResponse.json({
|
|
30
69
|
version: '1.0',
|
|
31
70
|
classes: [],
|