@module-federation/observability-plugin 0.0.0-alpha.0 → 0.0.0-chore-bump-node-22-20260710161714
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/LICENSE +21 -0
- package/README.md +219 -39
- package/dist/CHANGELOG.md +43 -0
- package/dist/README.md +219 -39
- package/dist/browser.d.ts +6 -0
- package/dist/browser.js +11 -0
- package/dist/build.js +2 -1
- package/dist/chrome-devtool.d.ts +6 -0
- package/dist/chrome-devtool.js +20 -0
- package/dist/core--1ofIHU9.js +2042 -0
- package/dist/core-Db-z5jD3.d.ts +335 -0
- package/dist/esm/browser.js +9 -0
- package/dist/esm/build.js +1 -1
- package/dist/esm/chrome-devtool.js +18 -0
- package/dist/esm/core-4ykFjWWj.js +2036 -0
- package/dist/esm/index.js +4 -1441
- package/dist/esm/node.js +8 -5
- package/dist/index.d.ts +4 -269
- package/dist/index.js +8 -1443
- package/dist/node.d.ts +4 -3
- package/dist/node.js +10 -5
- package/package.json +22 -7
- package/AI_TROUBLESHOOTING.md +0 -498
- package/dist/AI_TROUBLESHOOTING.md +0 -498
package/dist/esm/node.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as createObservability } from "./core-4ykFjWWj.js";
|
|
2
2
|
|
|
3
3
|
//#region src/node.ts
|
|
4
4
|
const DEFAULT_NODE_DIRECTORY = ".mf/observability";
|
|
@@ -109,17 +109,17 @@ function emitNodeConsoleHint(options, event, report, context, reportedTraceIds,
|
|
|
109
109
|
if (shouldUseNodeOutput(options)) {
|
|
110
110
|
lines.push(`latest: ${getNodeLatestPathForConsole(options)}`);
|
|
111
111
|
lines.push(`events: ${getNodeEventsPathForConsole(options)}`);
|
|
112
|
-
} else lines.push(
|
|
112
|
+
} else lines.push("read: enable fileOutput or use onReport(report)");
|
|
113
113
|
if (options.printRawStack === true && rawStack) lines.push("rawStack:", rawStack);
|
|
114
114
|
try {
|
|
115
115
|
console.error(lines.join("\n"));
|
|
116
116
|
} catch {}
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function createNodeObservability(options = {}) {
|
|
119
119
|
let nodeWriteQueue = Promise.resolve();
|
|
120
120
|
const consoleReportedTraceIds = /* @__PURE__ */ new Set();
|
|
121
121
|
const rawStackByTraceId = /* @__PURE__ */ new Map();
|
|
122
|
-
const observability =
|
|
122
|
+
const observability = createObservability({
|
|
123
123
|
...options,
|
|
124
124
|
console: false,
|
|
125
125
|
browser: void 0,
|
|
@@ -151,6 +151,9 @@ function ObservabilityPlugin(options = {}) {
|
|
|
151
151
|
};
|
|
152
152
|
return observability;
|
|
153
153
|
}
|
|
154
|
+
function ObservabilityPlugin(options = {}) {
|
|
155
|
+
return createNodeObservability(options).plugin;
|
|
156
|
+
}
|
|
154
157
|
|
|
155
158
|
//#endregion
|
|
156
|
-
export { ObservabilityPlugin, getNativeNodeRequire };
|
|
159
|
+
export { ObservabilityPlugin, ObservabilityPlugin as default, createNodeObservability, getNativeNodeRequire };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,269 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
type ObservabilityEventStatus = 'start' | 'success' | 'error' | 'complete';
|
|
6
|
-
type ObservabilityReportStatus = 'pending' | 'success' | 'error';
|
|
7
|
-
type ObservabilityEventSource = 'runtime' | 'business';
|
|
8
|
-
type ObservabilityBrowserMode = 'development' | 'production';
|
|
9
|
-
type ObservabilityReportOutcome = 'pending' | 'runtime-loaded' | 'component-loaded' | 'failed' | 'recovered';
|
|
10
|
-
type ObservabilityOwnerHint = 'host' | 'remote' | 'shared' | 'network' | 'runtime' | 'unknown';
|
|
11
|
-
type ObservabilityMetadataValue = string | number | boolean;
|
|
12
|
-
type ObservabilityMetadata = Record<string, ObservabilityMetadataValue>;
|
|
13
|
-
interface ObservabilityModuleInfoEntry {
|
|
14
|
-
name: string;
|
|
15
|
-
publicPath?: string;
|
|
16
|
-
getPublicPath?: string;
|
|
17
|
-
remoteEntry?: string;
|
|
18
|
-
globalName?: string;
|
|
19
|
-
}
|
|
20
|
-
interface ObservabilityModuleInfoSummary {
|
|
21
|
-
reason: string;
|
|
22
|
-
clipped: true;
|
|
23
|
-
totalCount: number;
|
|
24
|
-
matchedCount: number;
|
|
25
|
-
entries: ObservabilityModuleInfoEntry[];
|
|
26
|
-
availableNames?: string[];
|
|
27
|
-
}
|
|
28
|
-
interface ObservabilityPhaseSummary {
|
|
29
|
-
status: ObservabilityEventStatus;
|
|
30
|
-
duration?: number;
|
|
31
|
-
cached?: boolean;
|
|
32
|
-
recovered?: boolean;
|
|
33
|
-
lifecycle?: string;
|
|
34
|
-
}
|
|
35
|
-
interface ObservabilitySharedSummary {
|
|
36
|
-
name: string;
|
|
37
|
-
provider?: string;
|
|
38
|
-
selectedVersion?: string;
|
|
39
|
-
shareScope?: string[];
|
|
40
|
-
}
|
|
41
|
-
interface ObservabilityReportFlags {
|
|
42
|
-
cached: boolean;
|
|
43
|
-
retried: boolean;
|
|
44
|
-
fallback: boolean;
|
|
45
|
-
recovered: boolean;
|
|
46
|
-
}
|
|
47
|
-
interface ObservabilityPhaseCollection {
|
|
48
|
-
phases: Record<string, ObservabilityPhaseSummary>;
|
|
49
|
-
shared?: ObservabilitySharedSummary;
|
|
50
|
-
flags: ObservabilityReportFlags;
|
|
51
|
-
}
|
|
52
|
-
interface ObservabilityErrorSummary {
|
|
53
|
-
errorCode?: string;
|
|
54
|
-
errorName?: string;
|
|
55
|
-
errorMessage?: string;
|
|
56
|
-
failedPhase?: string;
|
|
57
|
-
lifecycle?: string;
|
|
58
|
-
ownerHint?: ObservabilityOwnerHint;
|
|
59
|
-
retryable?: boolean;
|
|
60
|
-
context?: ObservabilityMetadata;
|
|
61
|
-
}
|
|
62
|
-
type ObservabilityActionId = 'check-manifest-url' | 'check-remote-entry' | 'check-remote-global' | 'check-host-remotes' | 'check-shared-provider' | 'check-shared-version' | 'check-eager-config' | 'check-network' | 'check-expose' | 'check-module-info' | 'inspect-runtime-events';
|
|
63
|
-
interface ObservabilityAction {
|
|
64
|
-
id: ObservabilityActionId | string;
|
|
65
|
-
ownerHint?: ObservabilityOwnerHint;
|
|
66
|
-
title: string;
|
|
67
|
-
detail?: string;
|
|
68
|
-
}
|
|
69
|
-
interface ObservabilityFactReport {
|
|
70
|
-
title: string;
|
|
71
|
-
outcome: ObservabilityReportOutcome;
|
|
72
|
-
status: ObservabilityReportStatus;
|
|
73
|
-
ownerHint: ObservabilityOwnerHint;
|
|
74
|
-
failedPhase?: string;
|
|
75
|
-
errorCode?: string;
|
|
76
|
-
errorName?: string;
|
|
77
|
-
errorMessage?: string;
|
|
78
|
-
docLink?: string;
|
|
79
|
-
facts: ObservabilityMetadata;
|
|
80
|
-
completedPhases: string[];
|
|
81
|
-
pendingPhases: string[];
|
|
82
|
-
warnings?: string[];
|
|
83
|
-
actions: ObservabilityAction[];
|
|
84
|
-
}
|
|
85
|
-
interface ObservabilityRemoteInfo {
|
|
86
|
-
name: string;
|
|
87
|
-
alias?: string;
|
|
88
|
-
entry?: string;
|
|
89
|
-
entryGlobalName?: string;
|
|
90
|
-
type?: string;
|
|
91
|
-
}
|
|
92
|
-
interface ObservabilitySharedInfo {
|
|
93
|
-
name: string;
|
|
94
|
-
shareScope?: string[];
|
|
95
|
-
requiredVersion?: string | false;
|
|
96
|
-
selectedVersion?: string;
|
|
97
|
-
availableVersions?: string[];
|
|
98
|
-
provider?: string;
|
|
99
|
-
from?: string;
|
|
100
|
-
singleton?: boolean;
|
|
101
|
-
strictVersion?: boolean;
|
|
102
|
-
eager?: boolean;
|
|
103
|
-
strategy?: string;
|
|
104
|
-
loaded?: boolean;
|
|
105
|
-
loading?: boolean;
|
|
106
|
-
reason?: string;
|
|
107
|
-
}
|
|
108
|
-
interface ObservabilityEvent {
|
|
109
|
-
traceId: string;
|
|
110
|
-
timestamp: number;
|
|
111
|
-
phase: string;
|
|
112
|
-
status: ObservabilityEventStatus;
|
|
113
|
-
requestId?: string;
|
|
114
|
-
hostName?: string;
|
|
115
|
-
remote?: ObservabilityRemoteInfo;
|
|
116
|
-
shared?: ObservabilitySharedInfo;
|
|
117
|
-
expose?: string;
|
|
118
|
-
sanitizedUrl?: string;
|
|
119
|
-
message?: string;
|
|
120
|
-
errorCode?: string;
|
|
121
|
-
errorName?: string;
|
|
122
|
-
errorMessage?: string;
|
|
123
|
-
errorStack?: string;
|
|
124
|
-
ownerHint?: ObservabilityOwnerHint;
|
|
125
|
-
retryable?: boolean;
|
|
126
|
-
errorContext?: ObservabilityMetadata;
|
|
127
|
-
duration?: number;
|
|
128
|
-
lifecycle?: string;
|
|
129
|
-
eventName?: string;
|
|
130
|
-
source?: ObservabilityEventSource;
|
|
131
|
-
recovered?: boolean;
|
|
132
|
-
cached?: boolean;
|
|
133
|
-
componentName?: string;
|
|
134
|
-
metadata?: ObservabilityMetadata;
|
|
135
|
-
}
|
|
136
|
-
interface ObservabilityReport {
|
|
137
|
-
traceId: string;
|
|
138
|
-
status: ObservabilityReportStatus;
|
|
139
|
-
requestId?: string;
|
|
140
|
-
hostName?: string;
|
|
141
|
-
remote?: ObservabilityRemoteInfo;
|
|
142
|
-
shared?: ObservabilitySharedInfo;
|
|
143
|
-
expose?: string;
|
|
144
|
-
sanitizedUrl?: string;
|
|
145
|
-
startedAt: number;
|
|
146
|
-
updatedAt: number;
|
|
147
|
-
duration: number;
|
|
148
|
-
failedPhase?: string;
|
|
149
|
-
errorCode?: string;
|
|
150
|
-
errorName?: string;
|
|
151
|
-
errorMessage?: string;
|
|
152
|
-
errorStack?: string;
|
|
153
|
-
ownerHint?: ObservabilityOwnerHint;
|
|
154
|
-
retryable?: boolean;
|
|
155
|
-
errorContext?: ObservabilityMetadata;
|
|
156
|
-
moduleInfo?: ObservabilityModuleInfoSummary;
|
|
157
|
-
events: ObservabilityEvent[];
|
|
158
|
-
summary: {
|
|
159
|
-
eventCount: number;
|
|
160
|
-
recovered: boolean;
|
|
161
|
-
loadCompleted: boolean;
|
|
162
|
-
runtimeLoaded: boolean;
|
|
163
|
-
componentLoaded: boolean;
|
|
164
|
-
outcome: ObservabilityReportOutcome;
|
|
165
|
-
lastPhase?: string;
|
|
166
|
-
phases: Record<string, ObservabilityPhaseSummary>;
|
|
167
|
-
shared?: ObservabilitySharedSummary;
|
|
168
|
-
flags: ObservabilityReportFlags;
|
|
169
|
-
error?: ObservabilityErrorSummary;
|
|
170
|
-
};
|
|
171
|
-
diagnosis?: ObservabilityFactReport;
|
|
172
|
-
}
|
|
173
|
-
interface ObservabilityPluginOptions {
|
|
174
|
-
enabled?: boolean;
|
|
175
|
-
level?: ObservabilityLevel;
|
|
176
|
-
maxEvents?: number;
|
|
177
|
-
console?: boolean;
|
|
178
|
-
printRawStack?: boolean;
|
|
179
|
-
stackTrace?: {
|
|
180
|
-
enabled?: boolean;
|
|
181
|
-
maxLines?: number;
|
|
182
|
-
maxLength?: number;
|
|
183
|
-
};
|
|
184
|
-
browser?: {
|
|
185
|
-
enabled?: boolean;
|
|
186
|
-
scope?: string;
|
|
187
|
-
mode?: ObservabilityBrowserMode;
|
|
188
|
-
};
|
|
189
|
-
onEvent?: (event: ObservabilityEvent, report: ObservabilityReport, context?: ObservabilityEventContext) => void;
|
|
190
|
-
onReport?: (report: ObservabilityReport, context?: ObservabilityEventContext) => void;
|
|
191
|
-
onRawError?: (error: unknown, context: ObservabilityRawErrorContext) => void;
|
|
192
|
-
}
|
|
193
|
-
interface ObservabilityReportListOptions {
|
|
194
|
-
limit?: number;
|
|
195
|
-
}
|
|
196
|
-
interface ObservabilityReportQuery extends ObservabilityReportListOptions {
|
|
197
|
-
traceId?: string;
|
|
198
|
-
remote?: string;
|
|
199
|
-
expose?: string;
|
|
200
|
-
shared?: string;
|
|
201
|
-
status?: ObservabilityReportStatus;
|
|
202
|
-
outcome?: ObservabilityReportOutcome;
|
|
203
|
-
}
|
|
204
|
-
interface MarkComponentLoadedOptions {
|
|
205
|
-
traceId?: string;
|
|
206
|
-
requestId?: string;
|
|
207
|
-
componentName?: string;
|
|
208
|
-
metadata?: Record<string, unknown>;
|
|
209
|
-
}
|
|
210
|
-
interface ObservabilityController {
|
|
211
|
-
plugin: ObservabilityRuntimePlugin;
|
|
212
|
-
getEvents(): ObservabilityEvent[];
|
|
213
|
-
getTraceIds(): string[];
|
|
214
|
-
getReports(options?: ObservabilityReportListOptions): ObservabilityReport[];
|
|
215
|
-
findReports(query?: ObservabilityReportQuery): ObservabilityReport[];
|
|
216
|
-
getLatestReport(): ObservabilityReport | undefined;
|
|
217
|
-
getReport(traceId: string): ObservabilityReport | undefined;
|
|
218
|
-
exportReport(traceId?: string): ObservabilityReport | undefined;
|
|
219
|
-
clear(): void;
|
|
220
|
-
markComponentLoaded(options?: MarkComponentLoadedOptions): ObservabilityEvent | undefined;
|
|
221
|
-
}
|
|
222
|
-
interface ObservabilityRuntimeEventInput {
|
|
223
|
-
phase: string;
|
|
224
|
-
status: ObservabilityEventStatus;
|
|
225
|
-
requestId?: string;
|
|
226
|
-
hostName?: string;
|
|
227
|
-
remote?: ObservabilityRemoteInfo;
|
|
228
|
-
shared?: ObservabilitySharedInfo;
|
|
229
|
-
expose?: string;
|
|
230
|
-
url?: string;
|
|
231
|
-
message?: string;
|
|
232
|
-
error?: unknown;
|
|
233
|
-
errorContext?: Record<string, unknown>;
|
|
234
|
-
duration?: number;
|
|
235
|
-
lifecycle?: string;
|
|
236
|
-
eventName?: string;
|
|
237
|
-
source?: ObservabilityEventSource;
|
|
238
|
-
recovered?: boolean;
|
|
239
|
-
timestamp?: number;
|
|
240
|
-
traceId?: string;
|
|
241
|
-
cached?: boolean;
|
|
242
|
-
componentName?: string;
|
|
243
|
-
metadata?: Record<string, unknown>;
|
|
244
|
-
}
|
|
245
|
-
interface ObservabilityRuntimeOrigin {
|
|
246
|
-
options?: {
|
|
247
|
-
name?: string;
|
|
248
|
-
};
|
|
249
|
-
}
|
|
250
|
-
interface ObservabilityEventContext {
|
|
251
|
-
origin?: ObservabilityRuntimeOrigin;
|
|
252
|
-
}
|
|
253
|
-
interface ObservabilityRawErrorContext extends ObservabilityEventContext {
|
|
254
|
-
event: ObservabilityEvent;
|
|
255
|
-
report: ObservabilityReport;
|
|
256
|
-
}
|
|
257
|
-
type ObservabilityRuntimePlugin = ModuleFederationRuntimePlugin;
|
|
258
|
-
interface ObservabilityBrowserReader {
|
|
259
|
-
getEvents(): ObservabilityEvent[];
|
|
260
|
-
getTraceIds(): string[];
|
|
261
|
-
getReports(options?: ObservabilityReportListOptions): ObservabilityReport[];
|
|
262
|
-
findReports(query?: ObservabilityReportQuery): ObservabilityReport[];
|
|
263
|
-
getLatestReport(): ObservabilityReport | undefined;
|
|
264
|
-
getReport(traceId: string): ObservabilityReport | undefined;
|
|
265
|
-
exportReport(traceId?: string): ObservabilityReport | undefined;
|
|
266
|
-
}
|
|
267
|
-
declare function ObservabilityPlugin(options?: ObservabilityPluginOptions): ObservabilityController;
|
|
268
|
-
//#endregion
|
|
269
|
-
export { MarkComponentLoadedOptions, ObservabilityAction, ObservabilityActionId, ObservabilityBrowserMode, ObservabilityBrowserReader, ObservabilityController, ObservabilityErrorSummary, ObservabilityEvent, ObservabilityEventContext, ObservabilityEventSource, ObservabilityEventStatus, ObservabilityFactReport, ObservabilityLevel, ObservabilityMetadata, ObservabilityMetadataValue, ObservabilityModuleInfoEntry, ObservabilityModuleInfoSummary, ObservabilityOwnerHint, ObservabilityPhaseCollection, ObservabilityPhaseSummary, ObservabilityPlugin, ObservabilityPluginOptions, ObservabilityRawErrorContext, ObservabilityRemoteInfo, ObservabilityReport, ObservabilityReportFlags, ObservabilityReportListOptions, ObservabilityReportOutcome, ObservabilityReportQuery, ObservabilityReportStatus, ObservabilityRuntimeEventInput, ObservabilityRuntimeOrigin, ObservabilityRuntimePlugin, ObservabilitySharedInfo, ObservabilitySharedSummary };
|
|
1
|
+
import { A as ObservabilityReportListOptions, B as OnMFRemoteLoaded, C as ObservabilityPhaseCollection, D as ObservabilityRemoteInfo, E as ObservabilityRawErrorContext, F as ObservabilityRuntimeEventInput, I as ObservabilityRuntimeOrigin, L as ObservabilityRuntimePlugin, M as ObservabilityReportQuery, N as ObservabilityReportStatus, O as ObservabilityReport, P as ObservabilityRuntimeAdapterOptions, R as ObservabilitySharedInfo, S as ObservabilityOwnerHint, T as ObservabilityPluginOptions, V as createObservability, _ as ObservabilityLoadedBeforeInfo, a as ObservabilityBrowserMode, b as ObservabilityModuleInfoEntry, c as ObservabilityErrorSummary, d as ObservabilityEventSource, f as ObservabilityEventStatus, g as ObservabilityLoadedBeforeConsumer, h as ObservabilityLevel, i as ObservabilityActionId, j as ObservabilityReportOutcome, k as ObservabilityReportFlags, l as ObservabilityEvent, m as ObservabilityInstanceAPI, n as MarkComponentLoadedOptions, o as ObservabilityBrowserReader, p as ObservabilityFactReport, r as ObservabilityAction, s as ObservabilityController, t as MFRemoteLoadedOptions, u as ObservabilityEventContext, v as ObservabilityMetadata, w as ObservabilityPhaseSummary, x as ObservabilityModuleInfoSummary, y as ObservabilityMetadataValue, z as ObservabilitySharedSummary } from "./core-Db-z5jD3.js";
|
|
2
|
+
import { ObservabilityPlugin } from "./browser.js";
|
|
3
|
+
import { ChromeObservabilityPlugin } from "./chrome-devtool.js";
|
|
4
|
+
export { ChromeObservabilityPlugin, MFRemoteLoadedOptions, MarkComponentLoadedOptions, ObservabilityAction, ObservabilityActionId, ObservabilityBrowserMode, ObservabilityBrowserReader, ObservabilityController, ObservabilityErrorSummary, ObservabilityEvent, ObservabilityEventContext, ObservabilityEventSource, ObservabilityEventStatus, ObservabilityFactReport, ObservabilityInstanceAPI, ObservabilityLevel, ObservabilityLoadedBeforeConsumer, ObservabilityLoadedBeforeInfo, ObservabilityMetadata, ObservabilityMetadataValue, ObservabilityModuleInfoEntry, ObservabilityModuleInfoSummary, ObservabilityOwnerHint, ObservabilityPhaseCollection, ObservabilityPhaseSummary, ObservabilityPlugin, ObservabilityPlugin as default, ObservabilityPluginOptions, ObservabilityRawErrorContext, ObservabilityRemoteInfo, ObservabilityReport, ObservabilityReportFlags, ObservabilityReportListOptions, ObservabilityReportOutcome, ObservabilityReportQuery, ObservabilityReportStatus, ObservabilityRuntimeAdapterOptions, ObservabilityRuntimeEventInput, ObservabilityRuntimeOrigin, ObservabilityRuntimePlugin, ObservabilitySharedInfo, ObservabilitySharedSummary, OnMFRemoteLoaded, createObservability };
|