braintrust 3.24.0 → 3.26.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/NOTICE +6 -0
- package/dev/dist/index.d.mts +135 -2
- package/dev/dist/index.d.ts +135 -2
- package/dev/dist/index.js +4426 -2040
- package/dev/dist/index.mjs +3594 -1208
- package/dist/apply-auto-instrumentation.js +445 -403
- package/dist/apply-auto-instrumentation.mjs +249 -207
- package/dist/auto-instrumentations/bundler/esbuild.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/esbuild.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/esbuild.mjs +5 -8
- package/dist/auto-instrumentations/bundler/next.cjs +1448 -818
- package/dist/auto-instrumentations/bundler/next.mjs +6 -29
- package/dist/auto-instrumentations/bundler/rollup.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/rollup.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/rollup.mjs +5 -8
- package/dist/auto-instrumentations/bundler/vite.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/vite.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/vite.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/vite.mjs +5 -8
- package/dist/auto-instrumentations/bundler/webpack-loader.cjs +1602 -728
- package/dist/auto-instrumentations/bundler/webpack-loader.d.ts +20 -12
- package/dist/auto-instrumentations/bundler/webpack.cjs +1449 -799
- package/dist/auto-instrumentations/bundler/webpack.d.mts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.d.ts +4 -4
- package/dist/auto-instrumentations/bundler/webpack.mjs +5 -4
- package/dist/auto-instrumentations/{chunk-GSZHTAQW.mjs → chunk-6E22MYSW.mjs} +194 -93
- package/dist/auto-instrumentations/{chunk-VT6DDNKM.mjs → chunk-AKKPLXTP.mjs} +631 -194
- package/dist/auto-instrumentations/chunk-NRE4QUQR.mjs +509 -0
- package/dist/auto-instrumentations/{chunk-BURMPO7L.mjs → chunk-V5LEODRX.mjs} +2 -6
- package/dist/auto-instrumentations/{chunk-M6DLIJ2Z.mjs → chunk-XYN63IG5.mjs} +124 -194
- package/dist/auto-instrumentations/{chunk-F43DNLPD.mjs → chunk-XZHHE4Y3.mjs} +646 -510
- package/dist/auto-instrumentations/hook.mjs +894 -657
- package/dist/auto-instrumentations/index.cjs +1125 -490
- package/dist/auto-instrumentations/index.d.mts +6 -2
- package/dist/auto-instrumentations/index.d.ts +6 -2
- package/dist/auto-instrumentations/index.mjs +6 -1
- package/dist/auto-instrumentations/loader/cjs-patch.cjs +492 -195
- package/dist/auto-instrumentations/loader/cjs-patch.d.mts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.d.ts +2 -2
- package/dist/auto-instrumentations/loader/cjs-patch.mjs +3 -2
- package/dist/auto-instrumentations/loader/esm-hook.mjs +1 -1
- package/dist/auto-instrumentations/plugin-B-aZh7EP.d.ts +30 -0
- package/dist/auto-instrumentations/plugin-Bnj4E_6B.d.mts +30 -0
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.mts → types-C1fVeiCp.d.mts} +1 -1
- package/dist/auto-instrumentations/{types-RNPaKi9o.d.ts → types-C1fVeiCp.d.ts} +1 -1
- package/dist/browser.d.mts +824 -197
- package/dist/browser.d.ts +824 -197
- package/dist/browser.js +3897 -1228
- package/dist/browser.mjs +3897 -1228
- package/dist/chunk-PN7EWK66.mjs +1784 -0
- package/dist/{chunk-SU6EHKJV.js → chunk-VRZZQPAA.js} +3289 -1577
- package/dist/chunk-VYNNEKSA.js +1784 -0
- package/dist/{chunk-XE5FS7QY.mjs → chunk-XIZOM2HO.mjs} +2470 -758
- package/dist/cli.js +3596 -1211
- package/dist/edge-light.d.mts +1 -1
- package/dist/edge-light.d.ts +1 -1
- package/dist/edge-light.js +3897 -1231
- package/dist/edge-light.mjs +3897 -1231
- package/dist/index.d.mts +824 -197
- package/dist/index.d.ts +824 -197
- package/dist/index.js +750 -445
- package/dist/index.mjs +334 -29
- package/dist/instrumentation/index.d.mts +135 -6
- package/dist/instrumentation/index.d.ts +135 -6
- package/dist/instrumentation/index.js +3696 -1257
- package/dist/instrumentation/index.mjs +3696 -1257
- package/dist/vitest-evals-reporter.js +16 -16
- package/dist/vitest-evals-reporter.mjs +2 -2
- package/dist/workerd.d.mts +1 -1
- package/dist/workerd.d.ts +1 -1
- package/dist/workerd.js +3897 -1231
- package/dist/workerd.mjs +3897 -1231
- package/licenses/node-diagnostics-channel/LICENSE +19 -0
- package/package.json +34 -35
- package/dist/auto-instrumentations/plugin-D0KHwSJv.d.mts +0 -44
- package/dist/auto-instrumentations/plugin-G6fgxk1b.d.ts +0 -44
- package/dist/chunk-7AUY2XWX.js +0 -1090
- package/dist/chunk-7F6GCRHH.mjs +0 -1090
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
webpackPlugin
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-V5LEODRX.mjs";
|
|
4
|
+
import "../chunk-6E22MYSW.mjs";
|
|
5
|
+
import "../chunk-XZHHE4Y3.mjs";
|
|
6
|
+
import "../chunk-XYN63IG5.mjs";
|
|
7
|
+
import "../chunk-NRE4QUQR.mjs";
|
|
7
8
|
|
|
8
9
|
// src/auto-instrumentations/bundler/next.ts
|
|
9
10
|
import { createRequire } from "module";
|
|
10
|
-
import {
|
|
11
|
+
import { join } from "path";
|
|
11
12
|
var requireFromProject = createRequire(join(process.cwd(), "package.json"));
|
|
12
13
|
var TURBOPACK_RULE_MATCHER = "*.{js,mjs,cjs}";
|
|
13
14
|
function wrapNextjsConfigWithBraintrust(nextConfig) {
|
|
@@ -79,33 +80,9 @@ function wrapWebpackConfig(userWebpack) {
|
|
|
79
80
|
}
|
|
80
81
|
function wrapTurbopackConfig(turbopackConfig) {
|
|
81
82
|
const config = { ...turbopackConfig ?? {} };
|
|
82
|
-
const resolveAlias = config.resolveAlias && typeof config.resolveAlias === "object" && !Array.isArray(config.resolveAlias) ? config.resolveAlias : {};
|
|
83
83
|
const rules = config.rules && typeof config.rules === "object" && !Array.isArray(config.rules) ? config.rules : {};
|
|
84
|
-
let dcBrowserPath;
|
|
85
|
-
try {
|
|
86
|
-
dcBrowserPath = createRequire(
|
|
87
|
-
requireFromProject.resolve("braintrust/package.json")
|
|
88
|
-
).resolve("dc-browser");
|
|
89
|
-
} catch {
|
|
90
|
-
try {
|
|
91
|
-
dcBrowserPath = requireFromProject.resolve("dc-browser");
|
|
92
|
-
} catch {
|
|
93
|
-
dcBrowserPath = void 0;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (dcBrowserPath && isAbsolute(dcBrowserPath)) {
|
|
97
|
-
const relativeDcBrowserPath = relative(
|
|
98
|
-
process.cwd(),
|
|
99
|
-
dcBrowserPath
|
|
100
|
-
).replace(/\\/g, "/");
|
|
101
|
-
dcBrowserPath = relativeDcBrowserPath.startsWith(".") ? relativeDcBrowserPath : `./${relativeDcBrowserPath}`;
|
|
102
|
-
}
|
|
103
84
|
return {
|
|
104
85
|
...config,
|
|
105
|
-
// Turbopack resolves modules emitted by our loader from the app graph. The
|
|
106
|
-
// browser diagnostics-channel shim is Braintrust's dependency, so alias it
|
|
107
|
-
// to the copy installed with Braintrust while still letting user aliases win.
|
|
108
|
-
resolveAlias: dcBrowserPath && resolveAlias["dc-browser"] === void 0 ? { ...resolveAlias, "dc-browser": dcBrowserPath } : config.resolveAlias,
|
|
109
86
|
rules: addBraintrustTurbopackRule(rules)
|
|
110
87
|
};
|
|
111
88
|
}
|