@glasstrace/sdk 1.15.1 → 1.16.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/README.md +74 -8
- package/dist/async-context/index.cjs +21 -2
- package/dist/async-context/index.cjs.map +1 -1
- package/dist/async-context/index.js +2 -2
- package/dist/{capture-error-03qDnC5v.d.cts → capture-error-B0txjNut.d.cts} +2 -2
- package/dist/{capture-error-CAfFUyIU.d.ts → capture-error-Dc01rYNR.d.ts} +2 -2
- package/dist/{chunk-F7A3QXCT.js → chunk-774XIOZG.js} +2 -2
- package/dist/{chunk-VMK2G6QR.js → chunk-AFTCLH77.js} +2 -2
- package/dist/{chunk-XMD5OYD6.js → chunk-BGJKEFBN.js} +2 -2
- package/dist/{chunk-LQZRGBN5.js → chunk-DW3CZDS6.js} +2 -2
- package/dist/{chunk-T4ETJJSK.js → chunk-EWW3TZ52.js} +95 -11
- package/dist/{chunk-T4ETJJSK.js.map → chunk-EWW3TZ52.js.map} +1 -1
- package/dist/{chunk-7LE2O4ZJ.js → chunk-GBVMPMVV.js} +54 -5
- package/dist/{chunk-7LE2O4ZJ.js.map → chunk-GBVMPMVV.js.map} +1 -1
- package/dist/{chunk-HMEHYSTS.js → chunk-KM4UNN3Q.js} +2 -2
- package/dist/{chunk-MP3QNDXQ.js → chunk-OHSX224U.js} +2 -2
- package/dist/{chunk-6ST4QV7T.js → chunk-T7B752NF.js} +3 -3
- package/dist/{chunk-ZIYT2Y4B.js → chunk-WOYJAG7H.js} +3 -3
- package/dist/cli/init.cjs +18 -5
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +7 -7
- package/dist/cli/mcp-add.cjs +15 -2
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +3 -3
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/upgrade-instructions.cjs +1 -1
- package/dist/cli/upgrade-instructions.js +3 -3
- package/dist/cli/validate.cjs +14 -1
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/{correlation-id-YcfcqOru.d.ts → correlation-id-B9YYmoZw.d.ts} +1 -1
- package/dist/{correlation-id-CZ2bstzA.d.cts → correlation-id-CelUvw7j.d.cts} +1 -1
- package/dist/edge-entry.cjs +21 -2
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.d.cts +2 -2
- package/dist/edge-entry.d.ts +2 -2
- package/dist/edge-entry.js +4 -4
- package/dist/import-graph-DBLGNjcI.d.cts +238 -0
- package/dist/import-graph-Dka_Fm7j.d.ts +238 -0
- package/dist/index.cjs +137 -11
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-BQIJ5Dvc.d.cts → index.d-3-cJoY8y.d.cts} +10 -2
- package/dist/{index.d-BQIJ5Dvc.d.ts → index.d-3-cJoY8y.d.ts} +10 -2
- package/dist/index.d.cts +28 -4
- package/dist/index.d.ts +28 -4
- package/dist/index.js +5 -5
- package/dist/middleware/index.cjs +21 -2
- package/dist/middleware/index.cjs.map +1 -1
- package/dist/middleware/index.js +2 -2
- package/dist/node-entry.cjs +28 -8
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.d.cts +4 -4
- package/dist/node-entry.d.ts +4 -4
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs +27 -1
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.d.cts +51 -235
- package/dist/node-subpath.d.ts +51 -235
- package/dist/node-subpath.js +16 -3
- package/dist/node-subpath.js.map +1 -1
- package/dist/{source-map-uploader-NUONOEJG.js → source-map-uploader-UJPZCUFN.js} +3 -3
- package/dist/trpc/index.cjs +21 -2
- package/dist/trpc/index.cjs.map +1 -1
- package/dist/trpc/index.js +1 -1
- package/package.json +1 -1
- /package/dist/{chunk-F7A3QXCT.js.map → chunk-774XIOZG.js.map} +0 -0
- /package/dist/{chunk-VMK2G6QR.js.map → chunk-AFTCLH77.js.map} +0 -0
- /package/dist/{chunk-XMD5OYD6.js.map → chunk-BGJKEFBN.js.map} +0 -0
- /package/dist/{chunk-LQZRGBN5.js.map → chunk-DW3CZDS6.js.map} +0 -0
- /package/dist/{chunk-HMEHYSTS.js.map → chunk-KM4UNN3Q.js.map} +0 -0
- /package/dist/{chunk-MP3QNDXQ.js.map → chunk-OHSX224U.js.map} +0 -0
- /package/dist/{chunk-6ST4QV7T.js.map → chunk-T7B752NF.js.map} +0 -0
- /package/dist/{chunk-ZIYT2Y4B.js.map → chunk-WOYJAG7H.js.map} +0 -0
- /package/dist/{source-map-uploader-NUONOEJG.js.map → source-map-uploader-UJPZCUFN.js.map} +0 -0
package/dist/node-entry.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-
|
|
2
|
-
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-
|
|
3
|
-
export { AutoUploadOptions, BlobUploader, PRESIGNED_THRESHOLD_BYTES, SourceMapEntry, SourceMapFileInfo, buildImportGraph, collectSourceMaps, computeBuildHash, discoverSourceMapFiles, discoverTestFiles, extractImports, uploadSourceMaps, uploadSourceMapsAuto, uploadSourceMapsPresigned } from './
|
|
4
|
-
export { d as deriveSessionId } from './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-CelUvw7j.cjs';
|
|
2
|
+
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-B0txjNut.cjs';
|
|
3
|
+
export { A as AutoUploadOptions, B as BlobUploader, P as PRESIGNED_THRESHOLD_BYTES, S as SourceMapEntry, a as SourceMapFileInfo, b as buildImportGraph, c as collectSourceMaps, d as computeBuildHash, e as discoverSourceMapFiles, f as discoverTestFiles, g as extractImports, u as uploadSourceMaps, h as uploadSourceMapsAuto, i as uploadSourceMapsPresigned } from './import-graph-DBLGNjcI.cjs';
|
|
4
|
+
export { d as deriveSessionId } from './index.d-3-cJoY8y.cjs';
|
|
5
5
|
import './export/ReadableSpan';
|
|
6
6
|
import './Span';
|
|
7
7
|
import './SpanProcessor';
|
package/dist/node-entry.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-
|
|
2
|
-
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-
|
|
3
|
-
export { AutoUploadOptions, BlobUploader, PRESIGNED_THRESHOLD_BYTES, SourceMapEntry, SourceMapFileInfo, buildImportGraph, collectSourceMaps, computeBuildHash, discoverSourceMapFiles, discoverTestFiles, extractImports, uploadSourceMaps, uploadSourceMapsAuto, uploadSourceMapsPresigned } from './
|
|
4
|
-
export { d as deriveSessionId } from './index.d-
|
|
1
|
+
export { C as CorrelationIdRequest, G as GlasstraceSpanProcessor, S as SdkError, a as SessionManager, c as captureCorrelationId, g as getDateString, b as getOrigin } from './correlation-id-B9YYmoZw.js';
|
|
2
|
+
export { F as FetchTarget, G as GlasstraceExporter, a as GlasstraceExporterOptions, I as InitClaimResult, R as ResolvedConfig, c as captureError, b as classifyFetchTarget, d as createGlasstraceSpanProcessor, g as getActiveConfig, e as getDiscoveryHandler, f as getLinkedAccountId, h as getOrCreateAnonKey, i as getStatus, j as isAnonymousMode, k as isProductionDisabled, l as isReady, m as loadCachedConfig, p as performInit, r as readAnonKey, n as readEnvVars, o as registerGlasstrace, q as resolveConfig, s as saveCachedConfig, t as sendInitRequest, w as waitForReady, u as withGlasstraceConfig } from './capture-error-Dc01rYNR.js';
|
|
3
|
+
export { A as AutoUploadOptions, B as BlobUploader, P as PRESIGNED_THRESHOLD_BYTES, S as SourceMapEntry, a as SourceMapFileInfo, b as buildImportGraph, c as collectSourceMaps, d as computeBuildHash, e as discoverSourceMapFiles, f as discoverTestFiles, g as extractImports, u as uploadSourceMaps, h as uploadSourceMapsAuto, i as uploadSourceMapsPresigned } from './import-graph-Dka_Fm7j.js';
|
|
4
|
+
export { d as deriveSessionId } from './index.d-3-cJoY8y.js';
|
|
5
5
|
import './export/ReadableSpan';
|
|
6
6
|
import './Span';
|
|
7
7
|
import './SpanProcessor';
|
package/dist/node-entry.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getOrigin,
|
|
10
10
|
registerGlasstrace,
|
|
11
11
|
withGlasstraceConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-EWW3TZ52.js";
|
|
13
13
|
import {
|
|
14
14
|
getStatus,
|
|
15
15
|
isReady,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
GlasstraceSpanProcessor,
|
|
20
20
|
SdkError,
|
|
21
21
|
captureCorrelationId
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-KM4UNN3Q.js";
|
|
23
23
|
import "./chunk-CL3OVHPO.js";
|
|
24
24
|
import "./chunk-DQ25VOKK.js";
|
|
25
25
|
import {
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
uploadSourceMaps,
|
|
31
31
|
uploadSourceMapsAuto,
|
|
32
32
|
uploadSourceMapsPresigned
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-OHSX224U.js";
|
|
34
34
|
import "./chunk-YG3X7TUI.js";
|
|
35
35
|
import {
|
|
36
36
|
getActiveConfig,
|
|
@@ -39,12 +39,12 @@ import {
|
|
|
39
39
|
performInit,
|
|
40
40
|
saveCachedConfig,
|
|
41
41
|
sendInitRequest
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-T7B752NF.js";
|
|
43
43
|
import {
|
|
44
44
|
buildImportGraph,
|
|
45
45
|
discoverTestFiles,
|
|
46
46
|
extractImports
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-BGJKEFBN.js";
|
|
48
48
|
import {
|
|
49
49
|
isAnonymousMode,
|
|
50
50
|
isProductionDisabled,
|
|
@@ -54,10 +54,10 @@ import {
|
|
|
54
54
|
import {
|
|
55
55
|
getOrCreateAnonKey,
|
|
56
56
|
readAnonKey
|
|
57
|
-
} from "./chunk-
|
|
57
|
+
} from "./chunk-774XIOZG.js";
|
|
58
58
|
import {
|
|
59
59
|
deriveSessionId
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-GBVMPMVV.js";
|
|
61
61
|
import "./chunk-YIEXKQYP.js";
|
|
62
62
|
import "./chunk-NSBPE2FW.js";
|
|
63
63
|
export {
|
package/dist/node-subpath.cjs
CHANGED
|
@@ -37,6 +37,7 @@ __export(node_subpath_exports, {
|
|
|
37
37
|
discoverSourceMapFiles: () => discoverSourceMapFiles,
|
|
38
38
|
discoverTestFiles: () => discoverTestFiles,
|
|
39
39
|
extractImports: () => extractImports,
|
|
40
|
+
hashId: () => hashId,
|
|
40
41
|
uploadSourceMaps: () => uploadSourceMaps,
|
|
41
42
|
uploadSourceMapsAuto: () => uploadSourceMapsAuto,
|
|
42
43
|
uploadSourceMapsPresigned: () => uploadSourceMapsPresigned
|
|
@@ -14609,7 +14610,20 @@ var CaptureConfigSchema = external_exports.object({
|
|
|
14609
14610
|
* client-side allowlist enforcement layered with the product's
|
|
14610
14611
|
* storage-time filter as defense-in-depth.
|
|
14611
14612
|
*/
|
|
14612
|
-
sideEffectEvidence: external_exports.boolean().optional().default(false)
|
|
14613
|
+
sideEffectEvidence: external_exports.boolean().optional().default(false),
|
|
14614
|
+
/**
|
|
14615
|
+
* Per-account value-fidelity capture posture (server-pushed).
|
|
14616
|
+
*
|
|
14617
|
+
* `strict` (default) is fail-closed: the SDK rejects raw wall-clock
|
|
14618
|
+
* timestamps and unhashed identifiers from the `scalar.*` channel at
|
|
14619
|
+
* emit time. `full` relaxes those rejections so raw magnitudes can be
|
|
14620
|
+
* surfaced — but only in conjunction with an explicit producer opt-in
|
|
14621
|
+
* (so a `full`-configured account still emits strict-shaped scalars
|
|
14622
|
+
* unless the producer also opts in). The operator owns this flag; it
|
|
14623
|
+
* is never derived from producer or request input. Absent on the wire
|
|
14624
|
+
* ⇒ `strict`.
|
|
14625
|
+
*/
|
|
14626
|
+
captureFidelity: external_exports.enum(["strict", "full"]).optional().default("strict")
|
|
14613
14627
|
});
|
|
14614
14628
|
var SdkCachedConfigSchema = external_exports.object({
|
|
14615
14629
|
response: external_exports.record(external_exports.string(), external_exports.unknown()),
|
|
@@ -14819,6 +14833,8 @@ var K = new Uint32Array([
|
|
|
14819
14833
|
3204031479,
|
|
14820
14834
|
3329325298
|
|
14821
14835
|
]);
|
|
14836
|
+
var SIDE_EFFECT_HASHED_ID_PREFIX = "gthid_";
|
|
14837
|
+
var SIDE_EFFECT_HASHED_ID_HEX_LENGTH = 32;
|
|
14822
14838
|
|
|
14823
14839
|
// src/source-map-uploader.ts
|
|
14824
14840
|
var LARGE_FILE_WARNING_BYTES = 50 * 1024 * 1024;
|
|
@@ -15287,6 +15303,15 @@ async function buildImportGraph(projectRoot) {
|
|
|
15287
15303
|
const buildHash = createBuildHash(hashHex);
|
|
15288
15304
|
return { buildHash, graph };
|
|
15289
15305
|
}
|
|
15306
|
+
|
|
15307
|
+
// src/side-effect/hash-id.ts
|
|
15308
|
+
var import_node_crypto = require("node:crypto");
|
|
15309
|
+
function hashId(raw, key) {
|
|
15310
|
+
if (typeof raw !== "string" || raw.length === 0) return null;
|
|
15311
|
+
if (typeof key !== "string" || key.length === 0) return null;
|
|
15312
|
+
const digest = (0, import_node_crypto.createHmac)("sha256", key).update(raw).digest("hex").slice(0, SIDE_EFFECT_HASHED_ID_HEX_LENGTH);
|
|
15313
|
+
return `${SIDE_EFFECT_HASHED_ID_PREFIX}${digest}`;
|
|
15314
|
+
}
|
|
15290
15315
|
// Annotate the CommonJS export names for ESM import in node:
|
|
15291
15316
|
0 && (module.exports = {
|
|
15292
15317
|
PRESIGNED_THRESHOLD_BYTES,
|
|
@@ -15296,6 +15321,7 @@ async function buildImportGraph(projectRoot) {
|
|
|
15296
15321
|
discoverSourceMapFiles,
|
|
15297
15322
|
discoverTestFiles,
|
|
15298
15323
|
extractImports,
|
|
15324
|
+
hashId,
|
|
15299
15325
|
uploadSourceMaps,
|
|
15300
15326
|
uploadSourceMapsAuto,
|
|
15301
15327
|
uploadSourceMapsPresigned
|