@emeryld/rrroutes-export 1.0.26 → 1.0.28
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/tools/finalized-leaves-viewer.html +36 -146
package/package.json
CHANGED
|
@@ -423,24 +423,6 @@
|
|
|
423
423
|
.changelog-schema-type {
|
|
424
424
|
color: var(--schema-accent);
|
|
425
425
|
}
|
|
426
|
-
.changelog-schema-details {
|
|
427
|
-
margin-top: 6px;
|
|
428
|
-
}
|
|
429
|
-
.changelog-schema-details > summary {
|
|
430
|
-
color: var(--schema-accent);
|
|
431
|
-
font-size: 12px;
|
|
432
|
-
}
|
|
433
|
-
.changelog-schema-details-body {
|
|
434
|
-
margin-top: 6px;
|
|
435
|
-
display: grid;
|
|
436
|
-
gap: 4px;
|
|
437
|
-
}
|
|
438
|
-
.changelog-schema-line > summary {
|
|
439
|
-
font-size: 12px;
|
|
440
|
-
}
|
|
441
|
-
.changelog-schema-line .meta {
|
|
442
|
-
margin-top: 4px;
|
|
443
|
-
}
|
|
444
426
|
|
|
445
427
|
.event-title-row {
|
|
446
428
|
display: inline-flex;
|
|
@@ -696,14 +678,6 @@
|
|
|
696
678
|
>
|
|
697
679
|
Changelog
|
|
698
680
|
</button>
|
|
699
|
-
<button
|
|
700
|
-
id="tabChangelogGrouped"
|
|
701
|
-
class="field-chip"
|
|
702
|
-
type="button"
|
|
703
|
-
aria-pressed="false"
|
|
704
|
-
>
|
|
705
|
-
Grouped Changelog
|
|
706
|
-
</button>
|
|
707
681
|
</div>
|
|
708
682
|
</div>
|
|
709
683
|
</div>
|
|
@@ -892,7 +866,6 @@
|
|
|
892
866
|
const VIEW_IDS = {
|
|
893
867
|
leaves: 'leaves',
|
|
894
868
|
changelog: 'changelog',
|
|
895
|
-
changelogGrouped: 'changelogGrouped',
|
|
896
869
|
}
|
|
897
870
|
|
|
898
871
|
const VIEWER_MODE = {
|
|
@@ -927,12 +900,6 @@
|
|
|
927
900
|
CHANGELOG_TIMELINE_FIELDS.map((field) => field.id),
|
|
928
901
|
),
|
|
929
902
|
},
|
|
930
|
-
[VIEW_IDS.changelogGrouped]: {
|
|
931
|
-
fieldDefs: CHANGELOG_TIMELINE_FIELDS,
|
|
932
|
-
defaultSelected: new Set(
|
|
933
|
-
CHANGELOG_TIMELINE_FIELDS.map((field) => field.id),
|
|
934
|
-
),
|
|
935
|
-
},
|
|
936
903
|
}
|
|
937
904
|
|
|
938
905
|
const state = {
|
|
@@ -950,9 +917,6 @@
|
|
|
950
917
|
[VIEW_IDS.changelog]: new Set(
|
|
951
918
|
TAB_CONFIG[VIEW_IDS.changelog].defaultSelected,
|
|
952
919
|
),
|
|
953
|
-
[VIEW_IDS.changelogGrouped]: new Set(
|
|
954
|
-
TAB_CONFIG[VIEW_IDS.changelogGrouped].defaultSelected,
|
|
955
|
-
),
|
|
956
920
|
},
|
|
957
921
|
}
|
|
958
922
|
|
|
@@ -978,9 +942,6 @@
|
|
|
978
942
|
const controlsEl = document.querySelector('.controls')
|
|
979
943
|
const tabLeavesBtn = document.getElementById('tabLeaves')
|
|
980
944
|
const tabChangelogBtn = document.getElementById('tabChangelog')
|
|
981
|
-
const tabChangelogGroupedBtn = document.getElementById(
|
|
982
|
-
'tabChangelogGrouped',
|
|
983
|
-
)
|
|
984
945
|
|
|
985
946
|
const URL_PARAM_KEY = 'filters'
|
|
986
947
|
let isHydratingFromUrl = false
|
|
@@ -1718,8 +1679,9 @@
|
|
|
1718
1679
|
content.appendChild(separatedSchemas)
|
|
1719
1680
|
}
|
|
1720
1681
|
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1682
|
+
const routeHistoryRaw = state.changelogPayload?.byRoute?.[leaf.key]
|
|
1683
|
+
const routeHistory = Array.isArray(routeHistoryRaw) ? routeHistoryRaw : []
|
|
1684
|
+
if (state.changelogPayload) {
|
|
1723
1685
|
const commitBySha = new Map(
|
|
1724
1686
|
(state.changelogPayload?.commits || []).map((commit) => [
|
|
1725
1687
|
commit.sha,
|
|
@@ -1744,20 +1706,24 @@
|
|
|
1744
1706
|
'',
|
|
1745
1707
|
`Route Changelog (${routeHistory.length} event${routeHistory.length === 1 ? '' : 's'})`,
|
|
1746
1708
|
)
|
|
1747
|
-
|
|
1748
|
-
routeChangelogSummary.classList.add('route-changelog-summary-gray')
|
|
1749
|
-
}
|
|
1709
|
+
routeChangelogSummary.classList.add('route-changelog-summary-gray')
|
|
1750
1710
|
routeChangelogDetails.appendChild(routeChangelogSummary)
|
|
1751
1711
|
|
|
1752
1712
|
const routeChangelogBody = el('div', 'leaf-content')
|
|
1753
|
-
routeHistoryNewestFirst.
|
|
1713
|
+
if (routeHistoryNewestFirst.length === 0) {
|
|
1754
1714
|
routeChangelogBody.appendChild(
|
|
1755
|
-
|
|
1756
|
-
showTitle: true,
|
|
1757
|
-
item: { eventKind: 'route', routeKey: leaf.key, event },
|
|
1758
|
-
}),
|
|
1715
|
+
el('div', 'meta', 'No changelog entries for this route.'),
|
|
1759
1716
|
)
|
|
1760
|
-
}
|
|
1717
|
+
} else {
|
|
1718
|
+
routeHistoryNewestFirst.forEach((event) => {
|
|
1719
|
+
routeChangelogBody.appendChild(
|
|
1720
|
+
renderEventCard(event, commitBySha, {
|
|
1721
|
+
showTitle: true,
|
|
1722
|
+
item: { eventKind: 'route', routeKey: leaf.key, event },
|
|
1723
|
+
}),
|
|
1724
|
+
)
|
|
1725
|
+
})
|
|
1726
|
+
}
|
|
1761
1727
|
routeChangelogDetails.appendChild(routeChangelogBody)
|
|
1762
1728
|
routeChangelogSection.appendChild(routeChangelogDetails)
|
|
1763
1729
|
content.appendChild(routeChangelogSection)
|
|
@@ -2147,54 +2113,6 @@
|
|
|
2147
2113
|
return row
|
|
2148
2114
|
}
|
|
2149
2115
|
|
|
2150
|
-
function schemaDiffRawDetail(delta) {
|
|
2151
|
-
if (!delta || typeof delta !== 'object') return ''
|
|
2152
|
-
if ('path' in delta) {
|
|
2153
|
-
const location = formatPathLabel(delta.path) || String(delta.path || '')
|
|
2154
|
-
if (delta.op === 'added') {
|
|
2155
|
-
return `added ${location}: ${formatRouteSchemaEntry(delta.after)}`
|
|
2156
|
-
}
|
|
2157
|
-
if (delta.op === 'removed') {
|
|
2158
|
-
return `removed ${location}: ${formatRouteSchemaEntry(delta.before)}`
|
|
2159
|
-
}
|
|
2160
|
-
return `changed ${location}: ${formatRouteSchemaEntry(delta.before)} -> ${formatRouteSchemaEntry(delta.after)}`
|
|
2161
|
-
}
|
|
2162
|
-
if ('section' in delta) {
|
|
2163
|
-
const location = sourceSchemaLocation(delta.section, delta.path)
|
|
2164
|
-
if (delta.op === 'added') {
|
|
2165
|
-
return `added ${location}: ${JSON.stringify(delta.after || [])}`
|
|
2166
|
-
}
|
|
2167
|
-
if (delta.op === 'removed') {
|
|
2168
|
-
return `removed ${location}: ${JSON.stringify(delta.before || [])}`
|
|
2169
|
-
}
|
|
2170
|
-
return `changed ${location}: ${JSON.stringify(delta.before || [])} -> ${JSON.stringify(delta.after || [])}`
|
|
2171
|
-
}
|
|
2172
|
-
return JSON.stringify(delta)
|
|
2173
|
-
}
|
|
2174
|
-
|
|
2175
|
-
function renderSchemaDiffNested(schemaDiff) {
|
|
2176
|
-
if (!Array.isArray(schemaDiff) || schemaDiff.length === 0) return null
|
|
2177
|
-
const wrapper = el('details', 'changelog-schema-details')
|
|
2178
|
-
wrapper.appendChild(
|
|
2179
|
-
el('summary', 'mono', `schema changes (${schemaDiff.length})`),
|
|
2180
|
-
)
|
|
2181
|
-
const body = el('div', 'changelog-schema-details-body')
|
|
2182
|
-
schemaDiff.forEach((delta) => {
|
|
2183
|
-
const lineNode = formatSchemaDiffLine(delta)
|
|
2184
|
-
if (!lineNode) return
|
|
2185
|
-
const lineDetails = el('details', 'changelog-schema-line')
|
|
2186
|
-
const lineSummary = el('summary')
|
|
2187
|
-
lineSummary.appendChild(lineNode)
|
|
2188
|
-
lineDetails.appendChild(lineSummary)
|
|
2189
|
-
lineDetails.appendChild(
|
|
2190
|
-
el('div', 'meta mono', schemaDiffRawDetail(delta)),
|
|
2191
|
-
)
|
|
2192
|
-
body.appendChild(lineDetails)
|
|
2193
|
-
})
|
|
2194
|
-
wrapper.appendChild(body)
|
|
2195
|
-
return wrapper
|
|
2196
|
-
}
|
|
2197
|
-
|
|
2198
2116
|
function renderEventCard(event, commitBySha, options = {}) {
|
|
2199
2117
|
const card = el('div', 'leaf-content')
|
|
2200
2118
|
const commit = commitBySha.get(event.commitSha)
|
|
@@ -2212,8 +2130,16 @@
|
|
|
2212
2130
|
card.appendChild(renderEventTitle(options.item))
|
|
2213
2131
|
}
|
|
2214
2132
|
if (Array.isArray(event.schemaDiff) && event.schemaDiff.length > 0) {
|
|
2215
|
-
|
|
2216
|
-
|
|
2133
|
+
card.appendChild(
|
|
2134
|
+
el('div', 'meta', `schema changes: ${event.schemaDiff.length}`),
|
|
2135
|
+
)
|
|
2136
|
+
const schemaChanges = el('div')
|
|
2137
|
+
event.schemaDiff.forEach((delta) => {
|
|
2138
|
+
const lineNode = formatSchemaDiffLine(delta)
|
|
2139
|
+
if (!lineNode) return
|
|
2140
|
+
schemaChanges.appendChild(lineNode)
|
|
2141
|
+
})
|
|
2142
|
+
card.appendChild(schemaChanges)
|
|
2217
2143
|
}
|
|
2218
2144
|
if (Array.isArray(event.cfgDiff) && event.cfgDiff.length > 0) {
|
|
2219
2145
|
card.appendChild(
|
|
@@ -2310,8 +2236,11 @@
|
|
|
2310
2236
|
row.appendChild(renderEventTitle(item))
|
|
2311
2237
|
|
|
2312
2238
|
if (Array.isArray(event.schemaDiff) && event.schemaDiff.length > 0) {
|
|
2313
|
-
|
|
2314
|
-
|
|
2239
|
+
event.schemaDiff.forEach((delta) => {
|
|
2240
|
+
const lineNode = formatSchemaDiffLine(delta)
|
|
2241
|
+
if (!lineNode) return
|
|
2242
|
+
row.appendChild(lineNode)
|
|
2243
|
+
})
|
|
2315
2244
|
}
|
|
2316
2245
|
if (Array.isArray(event.cfgDiff) && event.cfgDiff.length > 0) {
|
|
2317
2246
|
event.cfgDiff.forEach((diff) => {
|
|
@@ -2529,10 +2458,7 @@
|
|
|
2529
2458
|
function changelogItemsByTab(tabId) {
|
|
2530
2459
|
const payload = state.changelogPayload
|
|
2531
2460
|
if (!payload) return []
|
|
2532
|
-
if (
|
|
2533
|
-
tabId === VIEW_IDS.changelog ||
|
|
2534
|
-
tabId === VIEW_IDS.changelogGrouped
|
|
2535
|
-
) {
|
|
2461
|
+
if (tabId === VIEW_IDS.changelog) {
|
|
2536
2462
|
return buildChronologicalEvents(payload)
|
|
2537
2463
|
}
|
|
2538
2464
|
return []
|
|
@@ -2561,10 +2487,6 @@
|
|
|
2561
2487
|
function renderTabButtons() {
|
|
2562
2488
|
setPressed(tabLeavesBtn, state.activeTab === VIEW_IDS.leaves)
|
|
2563
2489
|
setPressed(tabChangelogBtn, state.activeTab === VIEW_IDS.changelog)
|
|
2564
|
-
setPressed(
|
|
2565
|
-
tabChangelogGroupedBtn,
|
|
2566
|
-
state.activeTab === VIEW_IDS.changelogGrouped,
|
|
2567
|
-
)
|
|
2568
2490
|
tabLeavesBtn.style.display = state.availableTabs.has(VIEW_IDS.leaves)
|
|
2569
2491
|
? ''
|
|
2570
2492
|
: 'none'
|
|
@@ -2573,11 +2495,6 @@
|
|
|
2573
2495
|
)
|
|
2574
2496
|
? ''
|
|
2575
2497
|
: 'none'
|
|
2576
|
-
tabChangelogGroupedBtn.style.display = state.availableTabs.has(
|
|
2577
|
-
VIEW_IDS.changelogGrouped,
|
|
2578
|
-
)
|
|
2579
|
-
? ''
|
|
2580
|
-
: 'none'
|
|
2581
2498
|
const isLeavesTab = state.activeTab === VIEW_IDS.leaves
|
|
2582
2499
|
coreFieldsBtn.style.display = isLeavesTab ? '' : 'none'
|
|
2583
2500
|
schemasOnlyFieldsBtn.style.display = isLeavesTab ? '' : 'none'
|
|
@@ -2632,24 +2549,10 @@
|
|
|
2632
2549
|
)
|
|
2633
2550
|
if (filtered.length === 0) {
|
|
2634
2551
|
resultsEl.appendChild(el('div', 'empty', 'No matches.'))
|
|
2635
|
-
} else
|
|
2552
|
+
} else {
|
|
2636
2553
|
renderChangelogWithCommitSeparators(filtered, commitBySha, (item) =>
|
|
2637
2554
|
renderChangelogEventLines(item, commitBySha),
|
|
2638
2555
|
)
|
|
2639
|
-
} else {
|
|
2640
|
-
renderChangelogWithCommitSeparators(filtered, commitBySha, (item) => {
|
|
2641
|
-
const details = el('details', 'leaf')
|
|
2642
|
-
const summary = el('summary')
|
|
2643
|
-
summary.appendChild(renderEventTitle(item))
|
|
2644
|
-
details.appendChild(summary)
|
|
2645
|
-
details.appendChild(
|
|
2646
|
-
renderEventCard(item.event, commitBySha, {
|
|
2647
|
-
showTitle: false,
|
|
2648
|
-
item,
|
|
2649
|
-
}),
|
|
2650
|
-
)
|
|
2651
|
-
return details
|
|
2652
|
-
})
|
|
2653
2556
|
}
|
|
2654
2557
|
}
|
|
2655
2558
|
syncFilterStateToUrl()
|
|
@@ -2674,11 +2577,7 @@
|
|
|
2674
2577
|
: [
|
|
2675
2578
|
{
|
|
2676
2579
|
id: 'tabFields',
|
|
2677
|
-
label:
|
|
2678
|
-
state.activeTab === VIEW_IDS.changelog ||
|
|
2679
|
-
state.activeTab === VIEW_IDS.changelogGrouped
|
|
2680
|
-
? 'Changelog fields'
|
|
2681
|
-
: 'Source fields',
|
|
2580
|
+
label: 'Changelog fields',
|
|
2682
2581
|
fieldIds: fieldDefs.map((field) => field.id),
|
|
2683
2582
|
},
|
|
2684
2583
|
]
|
|
@@ -2864,8 +2763,7 @@
|
|
|
2864
2763
|
isHydratingFromUrl = true
|
|
2865
2764
|
if (
|
|
2866
2765
|
parsed.activeTab === VIEW_IDS.leaves ||
|
|
2867
|
-
parsed.activeTab === VIEW_IDS.changelog
|
|
2868
|
-
parsed.activeTab === VIEW_IDS.changelogGrouped
|
|
2766
|
+
parsed.activeTab === VIEW_IDS.changelog
|
|
2869
2767
|
) {
|
|
2870
2768
|
state.activeTab = parsed.activeTab
|
|
2871
2769
|
}
|
|
@@ -2954,18 +2852,13 @@
|
|
|
2954
2852
|
}
|
|
2955
2853
|
if (state.changelogPayload) {
|
|
2956
2854
|
state.availableTabs.add(VIEW_IDS.changelog)
|
|
2957
|
-
if (state.viewerMode === VIEWER_MODE.bundle) {
|
|
2958
|
-
state.availableTabs.add(VIEW_IDS.changelogGrouped)
|
|
2959
|
-
}
|
|
2960
2855
|
}
|
|
2961
2856
|
|
|
2962
2857
|
if (!state.availableTabs.has(state.activeTab)) {
|
|
2963
2858
|
if (state.availableTabs.has(VIEW_IDS.leaves)) {
|
|
2964
2859
|
state.activeTab = VIEW_IDS.leaves
|
|
2965
|
-
} else if (state.availableTabs.has(VIEW_IDS.changelog)) {
|
|
2966
|
-
state.activeTab = VIEW_IDS.changelog
|
|
2967
2860
|
} else {
|
|
2968
|
-
state.activeTab = VIEW_IDS.
|
|
2861
|
+
state.activeTab = VIEW_IDS.changelog
|
|
2969
2862
|
}
|
|
2970
2863
|
}
|
|
2971
2864
|
|
|
@@ -3029,9 +2922,6 @@
|
|
|
3029
2922
|
tabChangelogBtn.addEventListener('click', () =>
|
|
3030
2923
|
setActiveTab(VIEW_IDS.changelog),
|
|
3031
2924
|
)
|
|
3032
|
-
tabChangelogGroupedBtn.addEventListener('click', () =>
|
|
3033
|
-
setActiveTab(VIEW_IDS.changelogGrouped),
|
|
3034
|
-
)
|
|
3035
2925
|
|
|
3036
2926
|
selectAllFieldsBtn.addEventListener('click', () =>
|
|
3037
2927
|
setFieldSelection(new Set(currentFieldDefs().map((field) => field.id))),
|