@typeslayer/analyze-trace 0.1.11 → 0.1.12
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/dist/browser.d.ts +3179 -0
- package/dist/browser.js +6 -0
- package/dist/browser.js.map +1 -0
- package/package.json +12 -2
- package/src/browser.ts +22 -0
- package/tsup.config.ts +24 -9
package/dist/browser.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["// you may need to import this directly via ESM, otherwise Vite will complain about externalized fs dependencies\nexport const ANALYZE_TRACE_FILENAME = \"analyze-trace.json\";\n"],"mappings":";AACO,IAAM,yBAAyB;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typeslayer/analyze-trace",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "Analyze TypeScript compiler trace events to identify performance bottlenecks",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -20,7 +20,17 @@
|
|
|
20
20
|
},
|
|
21
21
|
"packageManager": "pnpm@10.6.5",
|
|
22
22
|
"main": "./dist/index.js",
|
|
23
|
-
"
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"exports": {
|
|
25
|
+
".": {
|
|
26
|
+
"types": "./dist/index.d.ts",
|
|
27
|
+
"import": "./dist/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./browser": {
|
|
30
|
+
"types": "./dist/browser.d.ts",
|
|
31
|
+
"import": "./dist/browser.js"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
24
34
|
"bin": {
|
|
25
35
|
"typeslayer-analyze-trace": "./bin/typeslayer-analyze-trace.mjs"
|
|
26
36
|
},
|
package/src/browser.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// Browser-safe exports - only types and schemas, no Node.js APIs
|
|
2
|
+
export type {
|
|
3
|
+
TraceJsonSchema,
|
|
4
|
+
TypesJsonSchema,
|
|
5
|
+
} from "@typeslayer/validate";
|
|
6
|
+
export { ANALYZE_TRACE_FILENAME } from "./constants";
|
|
7
|
+
export type { DepthLimitsRecord } from "./depth-limits";
|
|
8
|
+
export type {
|
|
9
|
+
AbsolutePath,
|
|
10
|
+
AnalyzeTraceOptions,
|
|
11
|
+
AnalyzeTraceResult,
|
|
12
|
+
DuplicatedPackage,
|
|
13
|
+
DuplicatedPackageInstance,
|
|
14
|
+
EventSpan,
|
|
15
|
+
HotSpot,
|
|
16
|
+
Microseconds,
|
|
17
|
+
NodeModulePaths,
|
|
18
|
+
ParseResult,
|
|
19
|
+
Project,
|
|
20
|
+
ProjectResult,
|
|
21
|
+
RootSpan,
|
|
22
|
+
} from "./utils";
|
package/tsup.config.ts
CHANGED
|
@@ -1,11 +1,26 @@
|
|
|
1
1
|
import { defineConfig } from "tsup";
|
|
2
2
|
|
|
3
|
-
export default defineConfig(
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
export default defineConfig([
|
|
4
|
+
// Main Node.js build
|
|
5
|
+
{
|
|
6
|
+
entry: ["src/index.ts"],
|
|
7
|
+
format: ["esm"],
|
|
8
|
+
target: "es2024",
|
|
9
|
+
dts: true,
|
|
10
|
+
splitting: false,
|
|
11
|
+
sourcemap: true,
|
|
12
|
+
clean: true,
|
|
13
|
+
external: ["@typeslayer/validate", "zod"],
|
|
14
|
+
},
|
|
15
|
+
// Browser-safe build (types only)
|
|
16
|
+
{
|
|
17
|
+
entry: { browser: "src/browser.ts" },
|
|
18
|
+
format: ["esm"],
|
|
19
|
+
target: "es2024",
|
|
20
|
+
dts: true,
|
|
21
|
+
splitting: false,
|
|
22
|
+
sourcemap: true,
|
|
23
|
+
clean: false,
|
|
24
|
+
external: ["@typeslayer/validate", "zod"],
|
|
25
|
+
},
|
|
26
|
+
]);
|