@iwonz/ywtc 3.4.1 → 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 +23 -0
- package/README.md +4 -2
- package/dist/adapters/confluence.d.ts +8 -2
- package/dist/adapters/confluence.js +16 -3
- 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/domain.d.ts +7 -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 +7 -0
- package/dist/issues.js +9 -1
- package/dist/issues.js.map +1 -1
- package/dist/migrator.d.ts +1 -1
- package/dist/migrator.js +75 -3
- package/dist/migrator.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 +12 -208
- package/dist/report.js +214 -197
- package/dist/report.js.map +1 -1
- package/dist/state.d.ts +3 -0
- package/dist/state.js +3 -0
- package/dist/state.js.map +1 -1
- package/docs/assets/report-header-transparent.png +0 -0
- package/package.json +24 -3
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
import type { GraphEdgeStatus, ProviderKind, SourceResource, SourceSelection, SourceStatus, TransferScope } from './domain.js';
|
|
2
|
+
import type { IssueCategory, IssueObjectType, MigrationIssue } from './issues.js';
|
|
3
|
+
import type { CommentTransferStatus, PageTransferStatus, ResourceTransferState, RunStatus, StateLoadSource } from './state.js';
|
|
4
|
+
export type ReportInventoryStatus = 'pending' | 'complete' | 'failed';
|
|
5
|
+
export type ReportResourceStatus = ResourceTransferState['status'];
|
|
6
|
+
export type ReportPresentationStatus = PageTransferStatus | 'excluded';
|
|
7
|
+
export interface TransferReportResource {
|
|
8
|
+
sourceId: string;
|
|
9
|
+
sourceName: string;
|
|
10
|
+
sourceUrl?: string;
|
|
11
|
+
sourceReference?: string;
|
|
12
|
+
kind: Exclude<SourceResource['kind'], 'grid'> | 'comment-attachment';
|
|
13
|
+
status: ReportResourceStatus;
|
|
14
|
+
sourceBytes?: number;
|
|
15
|
+
transferredBytes?: number;
|
|
16
|
+
sha256?: string;
|
|
17
|
+
destinationId?: string;
|
|
18
|
+
destinationName?: string;
|
|
19
|
+
destinationUrl?: string;
|
|
20
|
+
error?: string;
|
|
21
|
+
blockedByPageId?: string;
|
|
22
|
+
blockedByCode?: string;
|
|
23
|
+
blockedReason?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface TransferReportCommentItem {
|
|
26
|
+
threadId: string;
|
|
27
|
+
commentId: string;
|
|
28
|
+
parentId?: string;
|
|
29
|
+
author: string;
|
|
30
|
+
createdAt?: string;
|
|
31
|
+
sourceStatus?: string;
|
|
32
|
+
outcome: CommentTransferStatus;
|
|
33
|
+
sourceUrl?: string;
|
|
34
|
+
destinationUrl?: string;
|
|
35
|
+
error?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface TransferReportPage {
|
|
38
|
+
sourceCanonicalId: string;
|
|
39
|
+
sourceId: string;
|
|
40
|
+
sourceTitle: string;
|
|
41
|
+
sourceUrl: string;
|
|
42
|
+
sourceParentId?: string;
|
|
43
|
+
sourceAncestorIds?: string[];
|
|
44
|
+
destinationId?: string;
|
|
45
|
+
destinationTitle?: string;
|
|
46
|
+
destinationUrl?: string;
|
|
47
|
+
destinationParentId?: string;
|
|
48
|
+
/** Projected report parent. Kept as an alias while state uses projectedParentId. */
|
|
49
|
+
parentId?: string;
|
|
50
|
+
projectedParentId?: string;
|
|
51
|
+
depth: number;
|
|
52
|
+
status: PageTransferStatus;
|
|
53
|
+
inventoryStatus: ReportInventoryStatus;
|
|
54
|
+
resources: number;
|
|
55
|
+
resourceItems: TransferReportResource[];
|
|
56
|
+
sourceBytes?: number;
|
|
57
|
+
transferredBytes: number;
|
|
58
|
+
bytesUnknown: number;
|
|
59
|
+
links: number;
|
|
60
|
+
images: number;
|
|
61
|
+
tables: number;
|
|
62
|
+
grids: number;
|
|
63
|
+
codeBlocks: number;
|
|
64
|
+
degraded: boolean;
|
|
65
|
+
resourceFallbacks: Array<{
|
|
66
|
+
name: string;
|
|
67
|
+
error: string;
|
|
68
|
+
}>;
|
|
69
|
+
warnings: string[];
|
|
70
|
+
normalizations?: string[];
|
|
71
|
+
error?: string;
|
|
72
|
+
blockedByPageId?: string;
|
|
73
|
+
blockedByCode?: string;
|
|
74
|
+
blockedReason?: string;
|
|
75
|
+
comments: {
|
|
76
|
+
status: CommentTransferStatus;
|
|
77
|
+
threads: number;
|
|
78
|
+
comments: number;
|
|
79
|
+
participants: number;
|
|
80
|
+
attachments: number;
|
|
81
|
+
bytes: number;
|
|
82
|
+
archiveName?: string;
|
|
83
|
+
archiveUrl?: string;
|
|
84
|
+
destinationId?: string;
|
|
85
|
+
destinationUrl?: string;
|
|
86
|
+
revision?: boolean;
|
|
87
|
+
stale?: boolean;
|
|
88
|
+
error?: string;
|
|
89
|
+
preview?: string;
|
|
90
|
+
items?: TransferReportCommentItem[];
|
|
91
|
+
blockedByPageId?: string;
|
|
92
|
+
blockedByCode?: string;
|
|
93
|
+
blockedReason?: string;
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface TransferReportExcludedPage {
|
|
97
|
+
sourceCanonicalId: string;
|
|
98
|
+
sourceId: string;
|
|
99
|
+
sourceTitle: string;
|
|
100
|
+
sourceUrl?: string;
|
|
101
|
+
sourceParentId?: string;
|
|
102
|
+
sourceAncestorIds?: string[];
|
|
103
|
+
projectedParentId?: string;
|
|
104
|
+
discoveredFromId?: string;
|
|
105
|
+
depth?: number;
|
|
106
|
+
status: 'excluded';
|
|
107
|
+
sourceStatus?: string;
|
|
108
|
+
reason: string;
|
|
109
|
+
metadataComplete: boolean;
|
|
110
|
+
}
|
|
111
|
+
export interface TransferReportEdge {
|
|
112
|
+
from: string;
|
|
113
|
+
raw: string;
|
|
114
|
+
to?: string;
|
|
115
|
+
status: GraphEdgeStatus;
|
|
116
|
+
message?: string;
|
|
117
|
+
}
|
|
118
|
+
export interface TransferReportIssue extends MigrationIssue {
|
|
119
|
+
category: IssueCategory;
|
|
120
|
+
objectType: IssueObjectType;
|
|
121
|
+
objectId?: string;
|
|
122
|
+
pageTitle?: string;
|
|
123
|
+
pageAnchor?: string;
|
|
124
|
+
resourceName?: string;
|
|
125
|
+
commentLabel?: string;
|
|
126
|
+
action: string;
|
|
127
|
+
}
|
|
128
|
+
type PageStatusCounts = Record<PageTransferStatus, number>;
|
|
129
|
+
type ResourceStatusCounts = Record<ReportResourceStatus, number>;
|
|
130
|
+
type EdgeStatusCounts = Record<GraphEdgeStatus, number>;
|
|
131
|
+
type CommentStatusCounts = Record<CommentTransferStatus, number>;
|
|
132
|
+
export interface TransferReportSummary {
|
|
133
|
+
pages: number;
|
|
134
|
+
returnedDescendants: number;
|
|
135
|
+
selectedDescendants: number;
|
|
136
|
+
excludedPages: number;
|
|
137
|
+
maximumDepth: number;
|
|
138
|
+
hierarchyGaps: number;
|
|
139
|
+
hierarchyRepairs: number;
|
|
140
|
+
complete: number;
|
|
141
|
+
partial: number;
|
|
142
|
+
failed: number;
|
|
143
|
+
blocked: number;
|
|
144
|
+
conflicts: number;
|
|
145
|
+
notStartedPages: number;
|
|
146
|
+
unprocessedPages: number;
|
|
147
|
+
resources: number;
|
|
148
|
+
attachments: number;
|
|
149
|
+
resourceImages: number;
|
|
150
|
+
resourcesComplete: number;
|
|
151
|
+
resourcesPartial: number;
|
|
152
|
+
resourcesFailed: number;
|
|
153
|
+
resourcesBlocked: number;
|
|
154
|
+
resourcesNotStarted: number;
|
|
155
|
+
resourcesPlanned: number;
|
|
156
|
+
bytes: number;
|
|
157
|
+
sourceBytes: number;
|
|
158
|
+
bytesUnknown: number;
|
|
159
|
+
links: number;
|
|
160
|
+
images: number;
|
|
161
|
+
tables: number;
|
|
162
|
+
grids: number;
|
|
163
|
+
codeBlocks: number;
|
|
164
|
+
cycles: number;
|
|
165
|
+
normalizations: number;
|
|
166
|
+
degradations: number;
|
|
167
|
+
warnings: number;
|
|
168
|
+
errors: number;
|
|
169
|
+
rootErrors: number;
|
|
170
|
+
dependentPages: number;
|
|
171
|
+
dependentFiles: number;
|
|
172
|
+
dependentComments: number;
|
|
173
|
+
retryableFailures: number;
|
|
174
|
+
inventoryComplete: boolean;
|
|
175
|
+
inventoriedPages: number;
|
|
176
|
+
inventoryFailedPages: number;
|
|
177
|
+
commentThreads: number;
|
|
178
|
+
comments: number;
|
|
179
|
+
commentParticipants: number;
|
|
180
|
+
commentAttachments: number;
|
|
181
|
+
commentBytes: number;
|
|
182
|
+
commentStatuses: CommentStatusCounts;
|
|
183
|
+
durationMs?: number;
|
|
184
|
+
pageStatuses: PageStatusCounts;
|
|
185
|
+
resourceStatuses: ResourceStatusCounts;
|
|
186
|
+
traversalStatuses: EdgeStatusCounts;
|
|
187
|
+
}
|
|
188
|
+
export interface TransferReportData {
|
|
189
|
+
runId: string;
|
|
190
|
+
startedAt: string;
|
|
191
|
+
finishedAt?: string;
|
|
192
|
+
status: RunStatus;
|
|
193
|
+
dryRun: boolean;
|
|
194
|
+
commentsEnabled: boolean;
|
|
195
|
+
scope: TransferScope;
|
|
196
|
+
sourceStatus: SourceStatus;
|
|
197
|
+
selection: SourceSelection;
|
|
198
|
+
direction: string;
|
|
199
|
+
source: {
|
|
200
|
+
provider: ProviderKind;
|
|
201
|
+
profile: string;
|
|
202
|
+
rootId: string;
|
|
203
|
+
title: string;
|
|
204
|
+
url: string;
|
|
205
|
+
};
|
|
206
|
+
destination: {
|
|
207
|
+
provider: ProviderKind | 'filesystem';
|
|
208
|
+
profile?: string;
|
|
209
|
+
id: string;
|
|
210
|
+
url?: string;
|
|
211
|
+
format?: string;
|
|
212
|
+
};
|
|
213
|
+
state: {
|
|
214
|
+
id: string;
|
|
215
|
+
path: string;
|
|
216
|
+
mode: 'automatic' | 'explicit';
|
|
217
|
+
source: StateLoadSource;
|
|
218
|
+
backupPath?: string;
|
|
219
|
+
};
|
|
220
|
+
pages: TransferReportPage[];
|
|
221
|
+
excludedPages: TransferReportExcludedPage[];
|
|
222
|
+
edges: TransferReportEdge[];
|
|
223
|
+
hierarchyRepairs: Array<{
|
|
224
|
+
sourceCanonicalId: string;
|
|
225
|
+
mode: 'moved' | 'recreated';
|
|
226
|
+
oldParentId?: string;
|
|
227
|
+
newParentId: string;
|
|
228
|
+
oldDestinationId: string;
|
|
229
|
+
newDestinationId: string;
|
|
230
|
+
verified: boolean;
|
|
231
|
+
}>;
|
|
232
|
+
warnings: string[];
|
|
233
|
+
errors: string[];
|
|
234
|
+
issues: TransferReportIssue[];
|
|
235
|
+
outputs: Array<{
|
|
236
|
+
label: string;
|
|
237
|
+
value: string;
|
|
238
|
+
}>;
|
|
239
|
+
summary: TransferReportSummary;
|
|
240
|
+
}
|
|
241
|
+
export interface MigrationReportPaths {
|
|
242
|
+
runId: string;
|
|
243
|
+
directory: string;
|
|
244
|
+
html: string;
|
|
245
|
+
json: string;
|
|
246
|
+
}
|
|
247
|
+
export interface PreviewPair {
|
|
248
|
+
source: string;
|
|
249
|
+
destination: string;
|
|
250
|
+
}
|
|
251
|
+
export interface ReportPresentationPayload {
|
|
252
|
+
report: TransferReportData;
|
|
253
|
+
previews: Record<string, PreviewPair>;
|
|
254
|
+
}
|
|
255
|
+
export declare const pageStatuses: PageTransferStatus[];
|
|
256
|
+
export declare const resourceStatuses: ReportResourceStatus[];
|
|
257
|
+
export declare const edgeStatuses: GraphEdgeStatus[];
|
|
258
|
+
export declare const commentStatuses: CommentTransferStatus[];
|
|
259
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const pageStatuses = [
|
|
2
|
+
'discovered',
|
|
3
|
+
'planned',
|
|
4
|
+
'skeleton-created',
|
|
5
|
+
'not-started',
|
|
6
|
+
'complete',
|
|
7
|
+
'partial',
|
|
8
|
+
'conflict',
|
|
9
|
+
'failed',
|
|
10
|
+
'blocked',
|
|
11
|
+
];
|
|
12
|
+
export const resourceStatuses = ['planned', 'not-started', 'blocked', 'complete', 'partial', 'failed'];
|
|
13
|
+
export const edgeStatuses = ['resolved', 'external', 'inaccessible', 'broken', 'cycle', 'unsupported'];
|
|
14
|
+
export const commentStatuses = ['planned', 'not-started', 'blocked', 'complete', 'partial', 'failed', 'conflict', 'stale', 'skipped'];
|
|
15
|
+
//# sourceMappingURL=report-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report-contract.js","sourceRoot":"","sources":["../src/report-contract.ts"],"names":[],"mappings":"AAoPA,MAAM,CAAC,MAAM,YAAY,GAAyB;IAChD,YAAY;IACZ,SAAS;IACT,kBAAkB;IAClB,aAAa;IACb,UAAU;IACV,SAAS;IACT,UAAU;IACV,QAAQ;IACR,SAAS;CACV,CAAC;AACF,MAAM,CAAC,MAAM,gBAAgB,GAA2B,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;AAC/H,MAAM,CAAC,MAAM,YAAY,GAAsB,CAAC,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AAC1H,MAAM,CAAC,MAAM,eAAe,GAA4B,CAAC,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC"}
|