elanous 0.3.9 → 0.3.10
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/apps/pwa/scripts/publish-static-generation.ts +80 -0
- package/apps/pwa/src/lib/mini-board-projection.ts +129 -0
- package/apps/pwa/src/lib/provenance-badge.ts +26 -0
- package/apps/pwa/src/lib/task-card-model.ts +73 -0
- package/package.json +7 -1
- package/scenarios/dashboard-default.yaml +53 -0
- package/scenarios/heap-graph.yaml +46 -0
- package/scenarios/iul-timeline-viewer.yaml +46 -0
- package/scenarios/ux-sim/app-demo-1114.yaml +22 -0
- package/scenarios/ux-sim/arg-macro-canvas.yaml +78 -0
- package/scenarios/ux-sim/author-reviewer-precheck-applied.yaml +27 -0
- package/scenarios/ux-sim/author-reviewer-precheck-rejected-unprovable.yaml +27 -0
- package/scenarios/ux-sim/burst-ready-ladder.yaml +47 -0
- package/scenarios/ux-sim/demo1104-research-arg-graph.yaml +32 -0
- package/scenarios/ux-sim/draft-inventory-200.yaml +44 -0
- package/scenarios/ux-sim/fixtures/phone-pwa-selfheal-broken.html +19 -0
- package/scenarios/ux-sim/fixtures/release-cut-0306-shards.json +7023 -0
- package/scenarios/ux-sim/gate-deps-root-bake.yaml +17 -0
- package/scenarios/ux-sim/gate-receipt-carry-any-run.yaml +31 -0
- package/scenarios/ux-sim/gate-roster-second-pool-world.yaml +9 -0
- package/scenarios/ux-sim/gate-roster-second-pool.yaml +26 -0
- package/scenarios/ux-sim/gate-shard-receipt-payload-corrupt.yaml +14 -0
- package/scenarios/ux-sim/google-drive-files-list-readonly.yaml +21 -0
- package/scenarios/ux-sim/graph-runtime-overlay-event-stream.yaml +27 -0
- package/scenarios/ux-sim/kaist-lecture-scrap-app.yaml +14 -0
- package/scenarios/ux-sim/kaist-selfheal-stage.yaml +14 -0
- package/scenarios/ux-sim/knowhow-pack-release-heal-1107.md +39 -0
- package/scenarios/ux-sim/macro-chain-e2e.yaml +14 -0
- package/scenarios/ux-sim/macrophage-attribution-integration-1107.yaml +86 -0
- package/scenarios/ux-sim/n30-old-graph-measured-waiver.yaml +15 -0
- package/scenarios/ux-sim/night-train-dead-pid-lock.yaml +19 -0
- package/scenarios/ux-sim/night-train-world.yaml +13 -0
- package/scenarios/ux-sim/novice-versioning-scenario.ts +150 -0
- package/scenarios/ux-sim/novice-versioning-world.yaml +6 -0
- package/scenarios/ux-sim/phone-pwa-selfheal-trace.json +30 -0
- package/scenarios/ux-sim/provider-4xx-no-provider.yaml +26 -0
- package/scenarios/ux-sim/pwa-formal-update-world.yaml +5 -0
- package/scenarios/ux-sim/pwa-formal-update.yaml +8 -0
- package/scenarios/ux-sim/rehearsal-hard-2h-mandatory.yaml +37 -0
- package/scenarios/ux-sim/release-cut-preflight-regressions.yaml +31 -0
- package/scenarios/ux-sim/release-day-0307-replay.yaml +138 -0
- package/scenarios/ux-sim/release-gate-fanout.yaml +48 -0
- package/scenarios/ux-sim/release-heal-macrophage-bus.yaml +37 -0
- package/scenarios/ux-sim/release-incident-events-execution.yaml +114 -0
- package/scenarios/ux-sim/release-incident-events.yaml +98 -0
- package/scenarios/ux-sim/release-introduced-repair.yaml +40 -0
- package/scenarios/ux-sim/release-receipt-inheritance.yaml +24 -0
- package/scenarios/ux-sim/release-sim-chain-remaining.yaml +46 -0
- package/scenarios/ux-sim/release-sim-rig.yaml +266 -0
- package/scenarios/ux-sim/rla-arg-adaptive-heal.yaml +45 -0
- package/scenarios/ux-sim/rla-incident-policy-host-lost.yaml +17 -0
- package/scenarios/ux-sim/rla-postland-recovery-hitl.yaml +17 -0
- package/scenarios/ux-sim/rla-rehearsal-cloud-resume-sim.yaml +36 -0
- package/scenarios/ux-sim/rla-rehearsal-incident-sim-b.yaml +29 -0
- package/scenarios/ux-sim/sim-hq-move-world.yaml +9 -0
- package/scenarios/ux-sim/sim-hq-move.yaml +14 -0
- package/scenarios/ux-sim/tui-selfimplement-retry-loop.yaml +29 -0
- package/scenarios/ux-sim/warm-pool-reuse-world.yaml +117 -0
- package/src/version/packed-revision.json +1 -1
- package/test/helpers/dashboard-source.ts +110 -0
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { readFileSync, readdirSync } from 'node:fs';
|
|
2
|
+
import { join, relative, resolve } from 'node:path';
|
|
3
|
+
|
|
4
|
+
export interface DashboardSource {
|
|
5
|
+
path: string;
|
|
6
|
+
text: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DashboardMatch {
|
|
10
|
+
path: string;
|
|
11
|
+
line: number;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** Reads every dashboard TypeScript source, including modules in subdirectories. */
|
|
15
|
+
export function readDashboardSources(dir = resolve(process.cwd(), 'src/dashboard')): DashboardSource[] {
|
|
16
|
+
const files: DashboardSource[] = [];
|
|
17
|
+
function walk(directory: string): void {
|
|
18
|
+
for (const entry of readdirSync(directory, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
19
|
+
const path = join(directory, entry.name);
|
|
20
|
+
if (entry.isDirectory()) walk(path);
|
|
21
|
+
else if (entry.isFile() && entry.name.endsWith('.ts') && !entry.name.endsWith('.test.ts')) {
|
|
22
|
+
files.push({ path: relative(process.cwd(), path), text: readFileSync(path, 'utf8') });
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
walk(dir);
|
|
27
|
+
if (files.length === 0) throw new Error(`No dashboard TypeScript sources in ${dir}`);
|
|
28
|
+
return files;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Keeps file boundaries intact, including for multiline patterns and occurrence counts. */
|
|
32
|
+
export function dashboardMatches(pattern: RegExp, sources: readonly DashboardSource[] = readDashboardSources()): DashboardMatch[] {
|
|
33
|
+
const matches: DashboardMatch[] = [];
|
|
34
|
+
for (const { path, text } of sources) {
|
|
35
|
+
const regex = new RegExp(pattern.source, pattern.flags.includes('g') ? pattern.flags : `${pattern.flags}g`);
|
|
36
|
+
for (const match of text.matchAll(regex)) {
|
|
37
|
+
const line = text.slice(0, match.index).split('\n').length;
|
|
38
|
+
matches.push({ path, line });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return matches;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export function dashboardSourceText(sources: readonly DashboardSource[]): string {
|
|
45
|
+
return sources.map(({ text }) => text).join('\n');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function dashboardSourceLocations(sources: readonly DashboardSource[]): string {
|
|
49
|
+
return sources.map(({ path, text }) => `${path}:1-${text.split('\n').length}`).join(', ');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// ── TUI 소스 묶음 (D4a-1 · RFC-tui-essential-diet-and-legacy-removal D4a) ─────────────────
|
|
53
|
+
// 시험·scripts 는 «파일 하나»(index.ts)를 글자로 읽지 않고 이 묶음을 읽는다 — 함수를
|
|
54
|
+
// src/dashboard/index.ts 에서 src/tui/** 로 옮겨도(D4b) 경로 때문에 깨지지 않게.
|
|
55
|
+
// ⭐ 진입 파일을 묶음 «맨 앞»에 둔다: `indexOf`/`slice` 가 지금처럼 index.ts 안의 첫 출현을
|
|
56
|
+
// 먼저 집고, 식별자가 옮겨 가면 옮겨 간 파일에서 집는다.
|
|
57
|
+
|
|
58
|
+
const REPO_ROOT = resolve(import.meta.dir, '../..');
|
|
59
|
+
|
|
60
|
+
/** TUI 진입 파일. 경로 문자열이 필요한 시험·scripts 는 이 상수만 쓴다(문자열을 다시 적지 않는다). */
|
|
61
|
+
export const TUI_ENTRY_PATH = 'src/dashboard/index.ts';
|
|
62
|
+
|
|
63
|
+
/** TUI 소스 묶음을 이루는 디렉토리(저장소 뿌리 기준). */
|
|
64
|
+
export const TUI_SOURCE_DIRS = ['src/dashboard', 'src/tui'] as const;
|
|
65
|
+
|
|
66
|
+
function walkTuiDir(root: string, directory: string, out: DashboardSource[]): void {
|
|
67
|
+
let entries;
|
|
68
|
+
try {
|
|
69
|
+
entries = readdirSync(directory, { withFileTypes: true });
|
|
70
|
+
} catch {
|
|
71
|
+
return; // 묶음 디렉토리가 아직 없으면(예: src/tui 신설 전) 건너뛴다.
|
|
72
|
+
}
|
|
73
|
+
for (const entry of entries.sort((a, b) => a.name.localeCompare(b.name))) {
|
|
74
|
+
const path = join(directory, entry.name);
|
|
75
|
+
if (entry.isDirectory()) walkTuiDir(root, path, out);
|
|
76
|
+
else if (entry.isFile() && /\.tsx?$/.test(entry.name) && !/\.test\.tsx?$/.test(entry.name)) {
|
|
77
|
+
out.push({ path: relative(root, path).split('\\').join('/'), text: readFileSync(path, 'utf8') });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const tuiSourcesCache = new Map<string, DashboardSource[]>();
|
|
83
|
+
|
|
84
|
+
/** TUI 소스 묶음(src/dashboard/** ⊕ src/tui/** · 시험 파일 제외)을 진입 파일 먼저 읽는다. */
|
|
85
|
+
export function readTuiSources(root = REPO_ROOT): DashboardSource[] {
|
|
86
|
+
const cached = tuiSourcesCache.get(root);
|
|
87
|
+
if (cached) return cached;
|
|
88
|
+
const files: DashboardSource[] = [];
|
|
89
|
+
for (const dir of TUI_SOURCE_DIRS) walkTuiDir(root, join(root, dir), files);
|
|
90
|
+
files.sort((a, b) => Number(b.path === TUI_ENTRY_PATH) - Number(a.path === TUI_ENTRY_PATH));
|
|
91
|
+
if (files.length === 0) throw new Error(`No TUI TypeScript sources under ${TUI_SOURCE_DIRS.join(', ')} in ${root}`);
|
|
92
|
+
tuiSourcesCache.set(root, files);
|
|
93
|
+
return files;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** 묶음 전체 글자(파일 사이는 줄바꿈 하나). «어딘가에 있다/없다» 를 경로 무관하게 문다. */
|
|
97
|
+
export function tuiSourceText(root = REPO_ROOT): string {
|
|
98
|
+
return dashboardSourceText(readTuiSources(root));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* 식별자(문자열·정규식)를 담은 묶음 안 «첫» 파일(진입 파일 먼저). 함수 몸통을 잘라 보거나
|
|
103
|
+
* 한 파일 안의 순서를 무는 시험이 쓴다 — 식별자가 다른 파일로 옮겨 가도 그 파일을 집는다.
|
|
104
|
+
*/
|
|
105
|
+
export function tuiSourceFileWith(needle: string | RegExp, root = REPO_ROOT): DashboardSource {
|
|
106
|
+
const hit = readTuiSources(root).find(({ text }) =>
|
|
107
|
+
typeof needle === 'string' ? text.includes(needle) : new RegExp(needle.source, needle.flags.replace('g', '')).test(text));
|
|
108
|
+
if (!hit) throw new Error(`TUI 소스 묶음(${TUI_SOURCE_DIRS.join(' ⊕ ')})에 ${String(needle)} 이 없다`);
|
|
109
|
+
return hit;
|
|
110
|
+
}
|