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