@paulirish/trace_engine 0.0.52 → 0.0.53
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/.tmp/tsbuildinfo/tsconfig.tsbuildinfo +1 -1
- package/core/platform/DOMUtilities.d.ts +8 -0
- package/core/platform/DOMUtilities.js +14 -0
- package/core/platform/DOMUtilities.js.map +1 -1
- package/core/platform/StringUtilities.d.ts +1 -5
- package/core/platform/StringUtilities.js.map +1 -1
- package/core/platform/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/core/platform/platform-tsconfig.json +2 -2
- package/generated/protocol.d.ts +202 -20
- package/locales/af.json +11 -5
- package/locales/am.json +7 -1
- package/locales/ar.json +7 -1
- package/locales/as.json +7 -1
- package/locales/az.json +7 -1
- package/locales/be.json +7 -1
- package/locales/bg.json +7 -1
- package/locales/bn.json +7 -1
- package/locales/bs.json +7 -1
- package/locales/ca.json +7 -1
- package/locales/cs.json +7 -1
- package/locales/cy.json +7 -1
- package/locales/da.json +7 -1
- package/locales/de.json +7 -1
- package/locales/el.json +7 -1
- package/locales/en-GB.json +7 -1
- package/locales/en-US.json +49 -7
- package/locales/en-XL.json +49 -7
- package/locales/es-419.json +7 -1
- package/locales/es.json +7 -1
- package/locales/et.json +7 -1
- package/locales/eu.json +7 -1
- package/locales/fa.json +7 -1
- package/locales/fi.json +7 -1
- package/locales/fil.json +7 -1
- package/locales/fr-CA.json +7 -1
- package/locales/fr.json +7 -1
- package/locales/gl.json +7 -1
- package/locales/gu.json +7 -1
- package/locales/he.json +7 -1
- package/locales/hi.json +7 -1
- package/locales/hr.json +7 -1
- package/locales/hu.json +7 -1
- package/locales/hy.json +7 -1
- package/locales/id.json +7 -1
- package/locales/is.json +7 -1
- package/locales/it.json +7 -1
- package/locales/ja.json +7 -1
- package/locales/ka.json +7 -1
- package/locales/kk.json +7 -1
- package/locales/km.json +7 -1
- package/locales/kn.json +7 -1
- package/locales/ko.json +7 -1
- package/locales/ky.json +7 -1
- package/locales/lo.json +7 -1
- package/locales/lt.json +7 -1
- package/locales/lv.json +7 -1
- package/locales/mk.json +7 -1
- package/locales/ml.json +7 -1
- package/locales/mn.json +7 -1
- package/locales/mr.json +7 -1
- package/locales/ms.json +7 -1
- package/locales/my.json +7 -1
- package/locales/ne.json +7 -1
- package/locales/nl.json +7 -1
- package/locales/no.json +7 -1
- package/locales/or.json +7 -1
- package/locales/pa.json +7 -1
- package/locales/pl.json +7 -1
- package/locales/pt-PT.json +7 -1
- package/locales/pt.json +7 -1
- package/locales/ro.json +7 -1
- package/locales/ru.json +7 -1
- package/locales/si.json +7 -1
- package/locales/sk.json +7 -1
- package/locales/sl.json +7 -1
- package/locales/sq.json +7 -1
- package/locales/sr-Latn.json +7 -1
- package/locales/sr.json +7 -1
- package/locales/sv.json +7 -1
- package/locales/sw.json +7 -1
- package/locales/ta.json +7 -1
- package/locales/te.json +7 -1
- package/locales/th.json +7 -1
- package/locales/tr.json +7 -1
- package/locales/uk.json +7 -1
- package/locales/ur.json +7 -1
- package/locales/uz.json +7 -1
- package/locales/vi.json +7 -1
- package/locales/zh-HK.json +7 -1
- package/locales/zh-TW.json +7 -1
- package/locales/zh.json +7 -1
- package/locales/zu.json +7 -1
- package/models/cpu_profile/cpu_profile-tsconfig.json +2 -2
- package/models/cpu_profile/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/LanternComputationData.js +3 -3
- package/models/trace/LanternComputationData.js.map +1 -1
- package/models/trace/Processor.d.ts +1 -3
- package/models/trace/Processor.js +1 -1
- package/models/trace/Processor.js.map +1 -1
- package/models/trace/TracingManager.js.map +1 -1
- package/models/trace/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/extras/StackTraceForEvent.js +24 -16
- package/models/trace/extras/StackTraceForEvent.js.map +1 -1
- package/models/trace/extras/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/extras/extras-tsconfig.json +2 -2
- package/models/trace/handlers/FramesHandler.js.map +1 -1
- package/models/trace/handlers/NetworkRequestsHandler.d.ts +1 -0
- package/models/trace/handlers/NetworkRequestsHandler.js +37 -23
- package/models/trace/handlers/NetworkRequestsHandler.js.map +1 -1
- package/models/trace/handlers/ScreenshotsHandler.js +0 -1
- package/models/trace/handlers/ScreenshotsHandler.js.map +1 -1
- package/models/trace/handlers/ScriptsHandler.d.ts +5 -1
- package/models/trace/handlers/ScriptsHandler.js +51 -20
- package/models/trace/handlers/ScriptsHandler.js.map +1 -1
- package/models/trace/handlers/WarningsHandler.js +14 -2
- package/models/trace/handlers/WarningsHandler.js.map +1 -1
- package/models/trace/handlers/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/handlers/handlers-tsconfig.json +2 -2
- package/models/trace/handlers/helpers.js +3 -0
- package/models/trace/handlers/helpers.js.map +1 -1
- package/models/trace/handlers/types.d.ts +2 -6
- package/models/trace/handlers/types.js.map +1 -1
- package/models/trace/helpers/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/helpers/helpers-tsconfig.json +2 -2
- package/models/trace/insights/Cache.js +7 -6
- package/models/trace/insights/Cache.js.map +1 -1
- package/models/trace/insights/Common.js +3 -0
- package/models/trace/insights/Common.js.map +1 -1
- package/models/trace/insights/DocumentLatency.d.ts +7 -3
- package/models/trace/insights/DocumentLatency.js +24 -8
- package/models/trace/insights/DocumentLatency.js.map +1 -1
- package/models/trace/insights/LCPPhases.d.ts +1 -1
- package/models/trace/insights/LCPPhases.js +1 -1
- package/models/trace/insights/LCPPhases.js.map +1 -1
- package/models/trace/insights/LegacyJavaScript.d.ts +1 -1
- package/models/trace/insights/LegacyJavaScript.js +1 -1
- package/models/trace/insights/LegacyJavaScript.js.map +1 -1
- package/models/trace/insights/NetworkDependencyTree.d.ts +151 -3
- package/models/trace/insights/NetworkDependencyTree.js +648 -10
- package/models/trace/insights/NetworkDependencyTree.js.map +1 -1
- package/models/trace/insights/RenderBlocking.js +1 -1
- package/models/trace/insights/RenderBlocking.js.map +1 -1
- package/models/trace/insights/ThirdParties.d.ts +1 -1
- package/models/trace/insights/ThirdParties.js +1 -1
- package/models/trace/insights/ThirdParties.js.map +1 -1
- package/models/trace/insights/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/insights/insights-tsconfig.json +2 -2
- package/models/trace/insights/types.d.ts +2 -0
- package/models/trace/insights/types.js.map +1 -1
- package/models/trace/lantern/core/core-tsconfig.json +2 -2
- package/models/trace/lantern/core/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/graph/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/graph/graph-tsconfig.json +2 -2
- package/models/trace/lantern/lantern-tsconfig.json +2 -2
- package/models/trace/lantern/metrics/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/metrics/metrics-tsconfig.json +2 -2
- package/models/trace/lantern/simulation/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/simulation/simulation-tsconfig.json +2 -2
- package/models/trace/lantern/types/Lantern.d.ts +4 -7
- package/models/trace/lantern/types/Lantern.js +1 -0
- package/models/trace/lantern/types/Lantern.js.map +1 -1
- package/models/trace/lantern/types/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/lantern/types/types-tsconfig.json +2 -2
- package/models/trace/trace-tsconfig.json +2 -2
- package/models/trace/types/Configuration.d.ts +2 -0
- package/models/trace/types/Configuration.js.map +1 -1
- package/models/trace/types/Extensions.d.ts +1 -3
- package/models/trace/types/Extensions.js.map +1 -1
- package/models/trace/types/File.d.ts +2 -1
- package/models/trace/types/File.js.map +1 -1
- package/models/trace/types/TraceEvents.d.ts +49 -22
- package/models/trace/types/TraceEvents.js +6 -0
- package/models/trace/types/TraceEvents.js.map +1 -1
- package/models/trace/types/devtools_entrypoint-bundle-typescript-tsconfig.json +2 -2
- package/models/trace/types/types-tsconfig.json +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import * as Platform from '../../../core/platform/platform.js';
|
|
2
|
+
import * as Protocol from '../../../generated/protocol.js';
|
|
1
3
|
import type * as Handlers from '../handlers/handlers.js';
|
|
2
4
|
import * as Types from '../types/types.js';
|
|
3
|
-
import { type InsightModel, type InsightSetContext } from './types.js';
|
|
5
|
+
import { type InsightModel, type InsightSetContext, type InsightSetContextWithNavigation } from './types.js';
|
|
4
6
|
export declare const UIStrings: {
|
|
5
7
|
/**
|
|
6
8
|
* @description Title of an insight that recommends avoiding chaining critical requests.
|
|
@@ -23,8 +25,57 @@ export declare const UIStrings: {
|
|
|
23
25
|
* the browser must download before it can render the page.
|
|
24
26
|
*/
|
|
25
27
|
readonly maxCriticalPathLatency: "Max critical path latency:";
|
|
28
|
+
/** Label for a column in a data table; entries will be the network request */
|
|
29
|
+
readonly columnRequest: "Request";
|
|
30
|
+
/** Label for a column in a data table; entries will be the time from main document till current network request. */
|
|
31
|
+
readonly columnTime: "Time";
|
|
32
|
+
/**
|
|
33
|
+
* @description Title of the table of the detected preconnect origins.
|
|
34
|
+
*/
|
|
35
|
+
readonly preconnectOriginsTableTitle: "Preconnect origins";
|
|
36
|
+
/**
|
|
37
|
+
* @description Description of the table of the detected preconnect origins.
|
|
38
|
+
*/
|
|
39
|
+
readonly preconnectOriginsTableDescription: "[preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints help the browser establish a connection earlier in the page load, saving time when the first request for that origin is made. The following are the origins that the page preconnected to.";
|
|
40
|
+
/**
|
|
41
|
+
* @description Text status indicating that there isn't any preconnected origins.
|
|
42
|
+
*/
|
|
43
|
+
readonly noPreconnectOrigins: "no origins were preconnected";
|
|
44
|
+
/**
|
|
45
|
+
* @description A warning message that is shown when found more than 4 preconnected links
|
|
46
|
+
*/
|
|
47
|
+
readonly tooManyPreconnectLinksWarning: "More than 4 `preconnect` connections were found. These should be used sparingly and only to the most important origins.";
|
|
48
|
+
/**
|
|
49
|
+
* @description A warning message that is shown when the user added preconnect for some unnecessary origins.
|
|
50
|
+
*/
|
|
51
|
+
readonly unusedWarning: "Unused preconnect. Only use `preconnect` for origins that the page is likely to request.";
|
|
52
|
+
/**
|
|
53
|
+
* @description Label for a column in a data table; entries will be the source of the origin.
|
|
54
|
+
*/
|
|
55
|
+
readonly columnSource: "Source";
|
|
56
|
+
/**
|
|
57
|
+
* @description Text status indicating that there isn't preconnect candidates.
|
|
58
|
+
*/
|
|
59
|
+
readonly noPreconnectCandidates: "No additional origins are good candidates for preconnecting";
|
|
60
|
+
/**
|
|
61
|
+
* @description Title of the table that shows the origins that the page should have preconnected to.
|
|
62
|
+
*/
|
|
63
|
+
readonly estSavingTableTitle: "Preconnect candidates";
|
|
64
|
+
/**
|
|
65
|
+
* @description Description of the table that recommends preconnecting to the origins to save time.
|
|
66
|
+
*/
|
|
67
|
+
readonly estSavingTableDescription: "Add [preconnect](https://developer.chrome.com/docs/lighthouse/performance/uses-rel-preconnect/) hints to your most important origins, but try to use fewer than 4.";
|
|
68
|
+
/**
|
|
69
|
+
* @description Label for a column in a data table; entries will be the origin of a web resource
|
|
70
|
+
*/
|
|
71
|
+
readonly columnOrigin: "Origin";
|
|
72
|
+
/**
|
|
73
|
+
* @description Label for a column in a data table; entries will be the number of milliseconds the user could reduce page load by if they implemented the suggestions.
|
|
74
|
+
*/
|
|
75
|
+
readonly columnWastedMs: "Est LCP savings";
|
|
26
76
|
};
|
|
27
|
-
export declare const i18nString: (id: string, values?: Record<string, string> | undefined) => Record<string, string
|
|
77
|
+
export declare const i18nString: (id: string, values?: Record<string, string> | undefined) => {i18nId: string, values: Record<string, string|number>, formattedDefault: string};
|
|
78
|
+
export declare const TOO_MANY_PRECONNECTS_THRESHOLD = 4;
|
|
28
79
|
export interface CriticalRequestNode {
|
|
29
80
|
request: Types.Events.SyntheticNetworkRequest;
|
|
30
81
|
timeFromInitialRequest: Types.Timing.Micro;
|
|
@@ -32,9 +83,106 @@ export interface CriticalRequestNode {
|
|
|
32
83
|
isLongest?: boolean;
|
|
33
84
|
relatedRequests: Set<Types.Events.SyntheticNetworkRequest>;
|
|
34
85
|
}
|
|
86
|
+
export interface PreconnectOrigin {
|
|
87
|
+
node_id: Protocol.DOM.BackendNodeId;
|
|
88
|
+
frame?: string;
|
|
89
|
+
url: string;
|
|
90
|
+
unused: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface PreconnectCandidate {
|
|
93
|
+
origin: Platform.DevToolsPath.UrlString;
|
|
94
|
+
wastedMs: Types.Timing.Milli;
|
|
95
|
+
}
|
|
35
96
|
export type NetworkDependencyTreeInsightModel = InsightModel<typeof UIStrings, {
|
|
36
97
|
rootNodes: CriticalRequestNode[];
|
|
37
98
|
maxTime: Types.Timing.Micro;
|
|
38
99
|
fail: boolean;
|
|
100
|
+
preconnectOrigins: PreconnectOrigin[];
|
|
101
|
+
preconnectCandidates: PreconnectCandidate[];
|
|
39
102
|
}>;
|
|
40
|
-
export declare function
|
|
103
|
+
export declare function generatePreconnectedOrigins(linkPreconnectEvents: Types.Events.LinkPreconnect[], contextRequests: Types.Events.SyntheticNetworkRequest[]): PreconnectOrigin[];
|
|
104
|
+
export declare function generatePreconnectCandidates(parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContextWithNavigation, contextRequests: Types.Events.SyntheticNetworkRequest[]): PreconnectCandidate[];
|
|
105
|
+
export declare function generateInsight(parsedTrace: Handlers.Types.ParsedTrace, context: InsightSetContext): NetworkDependencyTreeInsightModel;
|
|
106
|
+
/**
|
|
107
|
+
* http://tools.ietf.org/html/rfc3986#section-5.2.4
|
|
108
|
+
*/
|
|
109
|
+
export declare function normalizePath(path: string): string;
|
|
110
|
+
export declare function schemeIs(url: Platform.DevToolsPath.UrlString, scheme: string): boolean;
|
|
111
|
+
/**
|
|
112
|
+
* File paths in DevTools that are represented either as unencoded absolute or relative paths, or encoded paths, or URLs.
|
|
113
|
+
* @example
|
|
114
|
+
* RawPathString: “/Hello World/file.js”
|
|
115
|
+
* EncodedPathString: “/Hello%20World/file.js”
|
|
116
|
+
* UrlString: “file:///Hello%20World/file/js”
|
|
117
|
+
*/
|
|
118
|
+
type BrandedPathString = Platform.DevToolsPath.UrlString | Platform.DevToolsPath.RawPathString | Platform.DevToolsPath.EncodedPathString;
|
|
119
|
+
export declare class ParsedURL {
|
|
120
|
+
isValid: boolean;
|
|
121
|
+
url: string;
|
|
122
|
+
scheme: string;
|
|
123
|
+
user: string;
|
|
124
|
+
host: string;
|
|
125
|
+
port: string;
|
|
126
|
+
path: string;
|
|
127
|
+
queryParams: string;
|
|
128
|
+
fragment: string;
|
|
129
|
+
folderPathComponents: string;
|
|
130
|
+
lastPathComponent: string;
|
|
131
|
+
readonly blobInnerScheme: string | undefined;
|
|
132
|
+
constructor(url: string);
|
|
133
|
+
static fromString(string: string): ParsedURL | null;
|
|
134
|
+
static preEncodeSpecialCharactersInPath(path: string): string;
|
|
135
|
+
static rawPathToEncodedPathString(path: Platform.DevToolsPath.RawPathString): Platform.DevToolsPath.EncodedPathString;
|
|
136
|
+
/**
|
|
137
|
+
* @param name Must not be encoded
|
|
138
|
+
*/
|
|
139
|
+
static encodedFromParentPathAndName(parentPath: Platform.DevToolsPath.EncodedPathString, name: string): Platform.DevToolsPath.EncodedPathString;
|
|
140
|
+
/**
|
|
141
|
+
* @param name Must not be encoded
|
|
142
|
+
*/
|
|
143
|
+
static urlFromParentUrlAndName(parentUrl: Platform.DevToolsPath.UrlString, name: string): Platform.DevToolsPath.UrlString;
|
|
144
|
+
static encodedPathToRawPathString(encPath: Platform.DevToolsPath.EncodedPathString): Platform.DevToolsPath.RawPathString;
|
|
145
|
+
static rawPathToUrlString(fileSystemPath: Platform.DevToolsPath.RawPathString): Platform.DevToolsPath.UrlString;
|
|
146
|
+
static relativePathToUrlString(relativePath: Platform.DevToolsPath.RawPathString, baseURL: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString;
|
|
147
|
+
static urlToRawPathString(fileURL: Platform.DevToolsPath.UrlString, isWindows?: boolean): Platform.DevToolsPath.RawPathString;
|
|
148
|
+
static sliceUrlToEncodedPathString(url: Platform.DevToolsPath.UrlString, start: number): Platform.DevToolsPath.EncodedPathString;
|
|
149
|
+
static substr<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, from: number, length?: number): DevToolsPathType;
|
|
150
|
+
static substring<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, start: number, end?: number): DevToolsPathType;
|
|
151
|
+
static prepend<DevToolsPathType extends BrandedPathString>(prefix: string, devToolsPath: DevToolsPathType): DevToolsPathType;
|
|
152
|
+
static concatenate<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, ...appendage: string[]): DevToolsPathType;
|
|
153
|
+
static trim<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType): DevToolsPathType;
|
|
154
|
+
static slice<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, start?: number, end?: number): DevToolsPathType;
|
|
155
|
+
static join<DevToolsPathType extends BrandedPathString>(devToolsPaths: DevToolsPathType[], separator?: string): DevToolsPathType;
|
|
156
|
+
static split<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType, separator: string | RegExp, limit?: number): DevToolsPathType[];
|
|
157
|
+
static toLowerCase<DevToolsPathType extends BrandedPathString>(devToolsPath: DevToolsPathType): DevToolsPathType;
|
|
158
|
+
static isValidUrlString(str: string): str is Platform.DevToolsPath.UrlString;
|
|
159
|
+
static urlWithoutHash(url: string): string;
|
|
160
|
+
static urlRegex(): RegExp;
|
|
161
|
+
static extractPath(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.EncodedPathString;
|
|
162
|
+
static extractOrigin(url: Platform.DevToolsPath.UrlString): Platform.DevToolsPath.UrlString;
|
|
163
|
+
static extractExtension(url: string): string;
|
|
164
|
+
static extractName(url: string): string;
|
|
165
|
+
static completeURL(baseURL: Platform.DevToolsPath.UrlString, href: string): Platform.DevToolsPath.UrlString | null;
|
|
166
|
+
static splitLineAndColumn(string: string): {
|
|
167
|
+
url: Platform.DevToolsPath.UrlString;
|
|
168
|
+
lineNumber: (number | undefined);
|
|
169
|
+
columnNumber: (number | undefined);
|
|
170
|
+
};
|
|
171
|
+
static removeWasmFunctionInfoFromURL(url: string): Platform.DevToolsPath.UrlString;
|
|
172
|
+
private static beginsWithWindowsDriveLetter;
|
|
173
|
+
private static beginsWithScheme;
|
|
174
|
+
static isRelativeURL(url: string): boolean;
|
|
175
|
+
isAboutBlank(): boolean;
|
|
176
|
+
isDataURL(): boolean;
|
|
177
|
+
extractDataUrlMimeType(): {
|
|
178
|
+
type: string | undefined;
|
|
179
|
+
subtype: string | undefined;
|
|
180
|
+
};
|
|
181
|
+
isBlobURL(): boolean;
|
|
182
|
+
lastPathComponentWithFragment(): string;
|
|
183
|
+
domain(): string;
|
|
184
|
+
securityOrigin(): Platform.DevToolsPath.UrlString;
|
|
185
|
+
urlWithoutScheme(): string;
|
|
186
|
+
static urlRegexInstance: RegExp | null;
|
|
187
|
+
}
|
|
188
|
+
export {};
|