devtools-tracing 1.2.2 → 1.4.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/.vscode/launch.json +44 -0
- package/README.md +68 -2
- package/cli.ts +46 -0
- package/{examples → commands}/inp.ts +1 -8
- package/commands/selector-stats.ts +145 -0
- package/commands/sourcemap.ts +114 -0
- package/{examples → commands}/stats.ts +1 -9
- package/dist/cli.js +331 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +76813 -18793
- package/dist/lib/front_end/third_party/codemirror.next/bundle.d.ts +39 -0
- package/dist/src/sourcemap.d.ts +27 -0
- package/package.json +5 -4
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export { acceptCompletion, autocompletion, closeBrackets, closeBracketsKeymap, closeCompletion, completeAnyWord, Completion, CompletionContext, CompletionResult, CompletionSource, completionStatus, currentCompletions, ifNotIn, moveCompletionSelection, selectedCompletion, selectedCompletionIndex, startCompletion } from '@codemirror/autocomplete';
|
|
2
|
+
export { cursorMatchingBracket, cursorGroupLeft, cursorGroupRight, cursorSyntaxLeft, cursorSyntaxRight, history, historyKeymap, indentLess, indentMore, insertNewlineAndIndent, redo, redoSelection, selectMatchingBracket, selectGroupLeft, selectGroupRight, selectSyntaxLeft, selectSyntaxRight, standardKeymap, toggleComment, undo, undoSelection } from '@codemirror/commands';
|
|
3
|
+
export * as html from '@codemirror/lang-html';
|
|
4
|
+
export * as javascript from '@codemirror/lang-javascript';
|
|
5
|
+
export { bracketMatching, codeFolding, bidiIsolates, ensureSyntaxTree, foldGutter, foldKeymap, HighlightStyle, indentOnInput, indentUnit, Language, LanguageSupport, StreamLanguage, StreamParser, StringStream, syntaxHighlighting, syntaxTree, TagStyle, syntaxParserRunning, forceParsing } from '@codemirror/language';
|
|
6
|
+
export { highlightSelectionMatches, selectNextOccurrence } from '@codemirror/search';
|
|
7
|
+
export { Annotation, AnnotationType, ChangeDesc, ChangeSet, ChangeSpec, Compartment, EditorSelection, EditorState, EditorStateConfig, Extension, Facet, Line, MapMode, Prec, Range, RangeSet, RangeSetBuilder, SelectionRange, StateEffect, StateEffectType, StateField, Text, TextIterator, Transaction, TransactionSpec } from '@codemirror/state';
|
|
8
|
+
export { Command, Decoration, DecorationSet, drawSelection, EditorView, gutter, GutterMarker, gutters, highlightSpecialChars, KeyBinding, keymap, lineNumberMarkers, lineNumbers, MatchDecorator, Panel, placeholder, repositionTooltips, scrollPastEnd, showPanel, showTooltip, Tooltip, tooltips, TooltipView, ViewPlugin, ViewUpdate, WidgetType } from '@codemirror/view';
|
|
9
|
+
export { NodeProp, NodeSet, NodeType, Parser, SyntaxNode, Tree, TreeCursor } from '@lezer/common';
|
|
10
|
+
export { highlightTree, Tag, tags } from '@lezer/highlight';
|
|
11
|
+
export { LRParser } from '@lezer/lr';
|
|
12
|
+
export { StyleModule } from 'style-mod';
|
|
13
|
+
export { indentationMarkers } from '@replit/codemirror-indentation-markers';
|
|
14
|
+
export declare function angular(): Promise<any>;
|
|
15
|
+
export declare function clojure(): Promise<any>;
|
|
16
|
+
export declare function coffeescript(): Promise<any>;
|
|
17
|
+
export declare function cpp(): Promise<any>;
|
|
18
|
+
export declare const css: {
|
|
19
|
+
cssCompletionSource: any;
|
|
20
|
+
cssLanguage: any;
|
|
21
|
+
css(): any;
|
|
22
|
+
};
|
|
23
|
+
export declare function dart(): Promise<any>;
|
|
24
|
+
export declare function gss(): Promise<any>;
|
|
25
|
+
export declare function go(): Promise<any>;
|
|
26
|
+
export declare function java(): Promise<any>;
|
|
27
|
+
export declare function kotlin(): Promise<any>;
|
|
28
|
+
export declare function less(): Promise<any>;
|
|
29
|
+
export declare function markdown(): Promise<any>;
|
|
30
|
+
export declare function php(): Promise<any>;
|
|
31
|
+
export declare function python(): Promise<any>;
|
|
32
|
+
export declare function sass(): Promise<any>;
|
|
33
|
+
export declare function scala(): Promise<any>;
|
|
34
|
+
export declare function shell(): Promise<any>;
|
|
35
|
+
export declare function svelte(): Promise<any>;
|
|
36
|
+
export declare function cssStreamParser(): Promise<any>;
|
|
37
|
+
export declare function vue(): Promise<any>;
|
|
38
|
+
export declare function wast(): Promise<any>;
|
|
39
|
+
export declare function xml(): Promise<any>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as Trace from '../lib/front_end/models/trace/trace.js';
|
|
2
|
+
type Event = Trace.Types.Events.Event;
|
|
3
|
+
type Script = Trace.Handlers.ModelHandlers.Scripts.Script;
|
|
4
|
+
export interface SourceMapResolverOptions {
|
|
5
|
+
fetch?: (url: string) => Promise<Response>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createSourceMapResolver(options?: SourceMapResolverOptions): NonNullable<Trace.Types.Configuration.ParseOptions['resolveSourceMap']>;
|
|
8
|
+
export interface SymbolicateResult {
|
|
9
|
+
/** Number of individual CallFrames that were rewritten. */
|
|
10
|
+
symbolicatedFrames: number;
|
|
11
|
+
/** Number of trace events that contained at least one rewritten frame. */
|
|
12
|
+
symbolicatedEvents: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Symbolicate trace events in-place by rewriting CallFrame locations using
|
|
16
|
+
* resolved source maps. Call this after `traceModel.parse()` has resolved
|
|
17
|
+
* source maps via `resolveSourceMap`.
|
|
18
|
+
*
|
|
19
|
+
* @param traceEvents - The raw trace events array (mutated in-place).
|
|
20
|
+
* @param scripts - The parsed scripts from `parsedTrace.data.Scripts.scripts`.
|
|
21
|
+
*/
|
|
22
|
+
export interface SymbolicateOptions {
|
|
23
|
+
/** Rewrite the resolved source URL after symbolication. Line and column are 0-based. */
|
|
24
|
+
rewriteSourceUrl?: (url: string, lineNumber: number, columnNumber: number) => string;
|
|
25
|
+
}
|
|
26
|
+
export declare function symbolicateTrace(traceEvents: readonly Event[], scripts: readonly Script[], options?: SymbolicateOptions): SymbolicateResult;
|
|
27
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devtools-tracing",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Utilities for working with trace files",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
|
+
"bin": {
|
|
8
|
+
"devtools-tracing": "dist/cli.js"
|
|
9
|
+
},
|
|
7
10
|
"scripts": {
|
|
8
|
-
"build": "tsc --emitDeclarationOnly || true; esbuild index.ts --bundle --platform=node --outfile=dist/index.js --format=cjs",
|
|
11
|
+
"build": "tsc --emitDeclarationOnly || true; esbuild index.ts --bundle --platform=node --outfile=dist/index.js --format=cjs && esbuild cli.ts --bundle --platform=node --outfile=dist/cli.js --format=cjs --banner:js='#!/usr/bin/env node' --external:../",
|
|
9
12
|
"generate": "tsx generate.ts",
|
|
10
|
-
"example:inp": "tsx examples/inp.ts",
|
|
11
|
-
"example:stats": "tsx examples/stats.ts",
|
|
12
13
|
"size": "du -sh dist/",
|
|
13
14
|
"prepublishOnly": "npm run generate && npm run build"
|
|
14
15
|
},
|