@iwonz/ywtc 3.4.0 → 3.5.0
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/CHANGELOG.md +36 -0
- package/README.md +31 -2
- package/dist/adapters/confluence.d.ts +8 -2
- package/dist/adapters/confluence.js +44 -6
- package/dist/adapters/confluence.js.map +1 -1
- package/dist/adapters/yandex.d.ts +18 -4
- package/dist/adapters/yandex.js +34 -6
- package/dist/adapters/yandex.js.map +1 -1
- package/dist/cli.js +6 -4
- package/dist/cli.js.map +1 -1
- package/dist/content-model.d.ts +1 -0
- package/dist/content-model.js +13 -0
- package/dist/content-model.js.map +1 -1
- package/dist/domain.d.ts +12 -0
- package/dist/domain.js +10 -0
- package/dist/domain.js.map +1 -1
- package/dist/graph.js +11 -2
- package/dist/graph.js.map +1 -1
- package/dist/issues.d.ts +10 -1
- package/dist/issues.js +9 -1
- package/dist/issues.js.map +1 -1
- package/dist/migrator.d.ts +1 -1
- package/dist/migrator.js +344 -155
- package/dist/migrator.js.map +1 -1
- package/dist/report-catalog.d.ts +14 -0
- package/dist/report-catalog.js +14 -0
- package/dist/report-catalog.js.map +1 -1
- package/dist/report-contract.d.ts +259 -0
- package/dist/report-contract.js +15 -0
- package/dist/report-contract.js.map +1 -0
- package/dist/report-ui/index.html +92 -0
- package/dist/report.d.ts +13 -192
- package/dist/report.js +273 -176
- package/dist/report.js.map +1 -1
- package/dist/state.d.ts +24 -6
- package/dist/state.js +54 -3
- package/dist/state.js.map +1 -1
- package/dist/title-allocation.d.ts +2 -0
- package/dist/title-allocation.js +43 -0
- package/dist/title-allocation.js.map +1 -0
- package/docs/assets/report-header-transparent.png +0 -0
- package/package.json +24 -3
package/dist/report.d.ts
CHANGED
|
@@ -1,211 +1,32 @@
|
|
|
1
|
-
import type { DiscoveredPage,
|
|
2
|
-
import { type IssueInput
|
|
3
|
-
import type
|
|
4
|
-
|
|
5
|
-
export type ReportResourceStatus
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
sourceName: string;
|
|
9
|
-
kind: Exclude<SourceResource['kind'], 'grid'>;
|
|
10
|
-
status: ReportResourceStatus;
|
|
11
|
-
sourceBytes?: number;
|
|
12
|
-
transferredBytes?: number;
|
|
13
|
-
destinationId?: string;
|
|
14
|
-
destinationName?: string;
|
|
15
|
-
error?: string;
|
|
16
|
-
}
|
|
17
|
-
export interface TransferReportPage {
|
|
18
|
-
sourceCanonicalId: string;
|
|
19
|
-
sourceId: string;
|
|
20
|
-
sourceTitle: string;
|
|
21
|
-
sourceUrl: string;
|
|
22
|
-
destinationId?: string;
|
|
23
|
-
destinationTitle?: string;
|
|
24
|
-
destinationUrl?: string;
|
|
25
|
-
parentId?: string;
|
|
26
|
-
depth: number;
|
|
27
|
-
status: PageTransferStatus;
|
|
28
|
-
inventoryStatus: ReportInventoryStatus;
|
|
29
|
-
resources: number;
|
|
30
|
-
resourceItems: TransferReportResource[];
|
|
31
|
-
sourceBytes?: number;
|
|
32
|
-
transferredBytes: number;
|
|
33
|
-
bytesUnknown: number;
|
|
34
|
-
links: number;
|
|
35
|
-
images: number;
|
|
36
|
-
tables: number;
|
|
37
|
-
grids: number;
|
|
38
|
-
codeBlocks: number;
|
|
39
|
-
degraded: boolean;
|
|
40
|
-
resourceFallbacks: Array<{
|
|
41
|
-
name: string;
|
|
42
|
-
error: string;
|
|
43
|
-
}>;
|
|
44
|
-
warnings: string[];
|
|
45
|
-
normalizations?: string[];
|
|
46
|
-
error?: string;
|
|
47
|
-
comments: {
|
|
48
|
-
status: CommentTransferStatus;
|
|
49
|
-
threads: number;
|
|
50
|
-
comments: number;
|
|
51
|
-
participants: number;
|
|
52
|
-
attachments: number;
|
|
53
|
-
bytes: number;
|
|
54
|
-
archiveName?: string;
|
|
55
|
-
destinationId?: string;
|
|
56
|
-
revision?: boolean;
|
|
57
|
-
stale?: boolean;
|
|
58
|
-
error?: string;
|
|
59
|
-
preview?: string;
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
export interface TransferReportEdge {
|
|
63
|
-
from: string;
|
|
64
|
-
raw: string;
|
|
65
|
-
to?: string;
|
|
66
|
-
status: GraphEdgeStatus;
|
|
67
|
-
message?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface TransferReportIssue extends MigrationIssue {
|
|
70
|
-
pageTitle?: string;
|
|
71
|
-
pageAnchor?: string;
|
|
72
|
-
resourceName?: string;
|
|
73
|
-
action: string;
|
|
74
|
-
}
|
|
75
|
-
type PageStatusCounts = Record<PageTransferStatus, number>;
|
|
76
|
-
type ResourceStatusCounts = Record<ReportResourceStatus, number>;
|
|
77
|
-
type EdgeStatusCounts = Record<GraphEdgeStatus, number>;
|
|
78
|
-
type CommentStatusCounts = Record<CommentTransferStatus, number>;
|
|
79
|
-
export interface TransferReportSummary {
|
|
80
|
-
pages: number;
|
|
81
|
-
returnedDescendants: number;
|
|
82
|
-
selectedDescendants: number;
|
|
83
|
-
excludedPages: number;
|
|
84
|
-
maximumDepth: number;
|
|
85
|
-
hierarchyGaps: number;
|
|
86
|
-
hierarchyRepairs: number;
|
|
87
|
-
complete: number;
|
|
88
|
-
partial: number;
|
|
89
|
-
failed: number;
|
|
90
|
-
blocked: number;
|
|
91
|
-
conflicts: number;
|
|
92
|
-
unprocessedPages: number;
|
|
93
|
-
resources: number;
|
|
94
|
-
attachments: number;
|
|
95
|
-
resourceImages: number;
|
|
96
|
-
resourcesComplete: number;
|
|
97
|
-
resourcesPartial: number;
|
|
98
|
-
resourcesFailed: number;
|
|
99
|
-
resourcesPlanned: number;
|
|
100
|
-
bytes: number;
|
|
101
|
-
sourceBytes: number;
|
|
102
|
-
bytesUnknown: number;
|
|
103
|
-
links: number;
|
|
104
|
-
images: number;
|
|
105
|
-
tables: number;
|
|
106
|
-
grids: number;
|
|
107
|
-
codeBlocks: number;
|
|
108
|
-
cycles: number;
|
|
109
|
-
normalizations: number;
|
|
110
|
-
degradations: number;
|
|
111
|
-
warnings: number;
|
|
112
|
-
errors: number;
|
|
113
|
-
retryableFailures: number;
|
|
114
|
-
inventoryComplete: boolean;
|
|
115
|
-
inventoriedPages: number;
|
|
116
|
-
inventoryFailedPages: number;
|
|
117
|
-
commentThreads: number;
|
|
118
|
-
comments: number;
|
|
119
|
-
commentParticipants: number;
|
|
120
|
-
commentAttachments: number;
|
|
121
|
-
commentBytes: number;
|
|
122
|
-
commentStatuses: CommentStatusCounts;
|
|
123
|
-
durationMs?: number;
|
|
124
|
-
pageStatuses: PageStatusCounts;
|
|
125
|
-
resourceStatuses: ResourceStatusCounts;
|
|
126
|
-
traversalStatuses: EdgeStatusCounts;
|
|
127
|
-
}
|
|
128
|
-
export interface TransferReportData {
|
|
129
|
-
runId: string;
|
|
130
|
-
startedAt: string;
|
|
131
|
-
finishedAt?: string;
|
|
132
|
-
status: RunStatus;
|
|
133
|
-
dryRun: boolean;
|
|
134
|
-
commentsEnabled: boolean;
|
|
135
|
-
scope: TransferScope;
|
|
136
|
-
sourceStatus: SourceStatus;
|
|
137
|
-
selection: SourceSelection;
|
|
138
|
-
direction: string;
|
|
139
|
-
source: {
|
|
140
|
-
provider: ProviderKind;
|
|
141
|
-
profile: string;
|
|
142
|
-
rootId: string;
|
|
143
|
-
title: string;
|
|
144
|
-
url: string;
|
|
145
|
-
};
|
|
146
|
-
destination: {
|
|
147
|
-
provider: ProviderKind | 'filesystem';
|
|
148
|
-
profile?: string;
|
|
149
|
-
id: string;
|
|
150
|
-
url?: string;
|
|
151
|
-
format?: string;
|
|
152
|
-
};
|
|
153
|
-
state: {
|
|
154
|
-
id: string;
|
|
155
|
-
path: string;
|
|
156
|
-
mode: 'automatic' | 'explicit';
|
|
157
|
-
source: StateLoadSource;
|
|
158
|
-
backupPath?: string;
|
|
159
|
-
};
|
|
160
|
-
pages: TransferReportPage[];
|
|
161
|
-
edges: TransferReportEdge[];
|
|
162
|
-
hierarchyRepairs: Array<{
|
|
163
|
-
sourceCanonicalId: string;
|
|
164
|
-
mode: 'moved' | 'recreated';
|
|
165
|
-
oldParentId?: string;
|
|
166
|
-
newParentId: string;
|
|
167
|
-
oldDestinationId: string;
|
|
168
|
-
newDestinationId: string;
|
|
169
|
-
verified: boolean;
|
|
170
|
-
}>;
|
|
171
|
-
warnings: string[];
|
|
172
|
-
errors: string[];
|
|
173
|
-
issues: TransferReportIssue[];
|
|
174
|
-
outputs: Array<{
|
|
175
|
-
label: string;
|
|
176
|
-
value: string;
|
|
177
|
-
}>;
|
|
178
|
-
summary: TransferReportSummary;
|
|
179
|
-
}
|
|
180
|
-
export interface MigrationReportPaths {
|
|
181
|
-
runId: string;
|
|
182
|
-
directory: string;
|
|
183
|
-
html: string;
|
|
184
|
-
json: string;
|
|
185
|
-
}
|
|
186
|
-
interface PreviewPair {
|
|
187
|
-
source: string;
|
|
188
|
-
destination: string;
|
|
189
|
-
}
|
|
1
|
+
import type { DiscoveredPage, SourceSelection, SourceStatus } from './domain.js';
|
|
2
|
+
import { type IssueInput } from './issues.js';
|
|
3
|
+
import { type MigrationReportPaths, type PreviewPair, type ReportPresentationPayload, type TransferReportData, type TransferReportPage } from './report-contract.js';
|
|
4
|
+
import type { RunStatus } from './state.js';
|
|
5
|
+
export type { MigrationReportPaths, PreviewPair, ReportInventoryStatus, ReportPresentationPayload, ReportPresentationStatus, ReportResourceStatus, TransferReportCommentItem, TransferReportData, TransferReportEdge, TransferReportExcludedPage, TransferReportIssue, TransferReportPage, TransferReportResource, TransferReportSummary, } from './report-contract.js';
|
|
6
|
+
export declare const REPORT_DATA_MARKER = "{\"__ywtc_report_payload__\":true}";
|
|
7
|
+
export declare function injectReportPayload(shell: string, payload: ReportPresentationPayload): string;
|
|
190
8
|
export declare class TransferReport {
|
|
191
9
|
readonly data: TransferReportData;
|
|
192
10
|
private readonly previews;
|
|
193
11
|
private readonly issueCollector;
|
|
194
|
-
|
|
12
|
+
private readonly secrets;
|
|
13
|
+
constructor(input: Omit<TransferReportData, 'runId' | 'startedAt' | 'status' | 'sourceStatus' | 'commentsEnabled' | 'selection' | 'pages' | 'excludedPages' | 'edges' | 'hierarchyRepairs' | 'warnings' | 'errors' | 'issues' | 'outputs' | 'summary'> & {
|
|
195
14
|
sourceStatus?: SourceStatus;
|
|
196
15
|
commentsEnabled?: boolean;
|
|
16
|
+
secrets?: string[];
|
|
197
17
|
});
|
|
198
18
|
registerPages(pages: DiscoveredPage[]): void;
|
|
199
19
|
updatePage(sourceCanonicalId: string, update: Partial<TransferReportPage>): void;
|
|
200
20
|
addPage(page: TransferReportPage, previews?: PreviewPair, collectIssues?: boolean): void;
|
|
201
|
-
setEdges(edges:
|
|
21
|
+
setEdges(edges: TransferReportData['edges']): void;
|
|
202
22
|
setSelection(selection: SourceSelection): void;
|
|
23
|
+
setDestinationUrl(url: string): void;
|
|
203
24
|
addHierarchyRepair(repair: TransferReportData['hierarchyRepairs'][number]): void;
|
|
204
25
|
issue(input: IssueInput): void;
|
|
205
26
|
warning(message: string): void;
|
|
206
27
|
error(message: string): void;
|
|
207
28
|
output(label: string, value: string): void;
|
|
29
|
+
private finalizeOutcomes;
|
|
208
30
|
finish(status: RunStatus): void;
|
|
209
31
|
write(reportsDirectory: string): Promise<MigrationReportPaths>;
|
|
210
32
|
}
|
|
211
|
-
export {};
|