@glasstrace/sdk 1.2.0 → 1.2.1
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/{chunk-6RNBUUBR.js → chunk-2GCN27SI.js} +2 -2
- package/dist/{chunk-4EZ6JTDG.js → chunk-47B2G3FE.js} +2 -2
- package/dist/{chunk-6RIH6SFM.js → chunk-CTJO7PUZ.js} +23 -17
- package/dist/chunk-CTJO7PUZ.js.map +1 -0
- package/dist/{chunk-X5MAXP5T.js → chunk-EBYISKQP.js} +5 -3
- package/dist/{chunk-X5MAXP5T.js.map → chunk-EBYISKQP.js.map} +1 -1
- package/dist/{chunk-JKI4OCFV.js → chunk-HV5ID2WJ.js} +3 -3
- package/dist/{chunk-TWTWRJ25.js → chunk-MD5XPCTQ.js} +2 -2
- package/dist/{chunk-TWHCJKRS.js → chunk-NFPDYME5.js} +3 -3
- package/dist/{chunk-DST4UBXU.js → chunk-YMLMZCPR.js} +2 -2
- package/dist/cli/init.cjs +5 -3
- package/dist/cli/init.cjs.map +1 -1
- package/dist/cli/init.js +6 -6
- package/dist/cli/mcp-add.cjs +4 -2
- package/dist/cli/mcp-add.cjs.map +1 -1
- package/dist/cli/mcp-add.js +2 -2
- package/dist/cli/uninit.js +3 -3
- package/dist/cli/validate.cjs +4 -2
- package/dist/cli/validate.cjs.map +1 -1
- package/dist/cli/validate.js +2 -2
- package/dist/edge-entry.cjs +4 -2
- package/dist/edge-entry.cjs.map +1 -1
- package/dist/edge-entry.js +2 -2
- package/dist/index.cjs +22 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -5
- package/dist/node-entry.cjs +22 -14
- package/dist/node-entry.cjs.map +1 -1
- package/dist/node-entry.js +7 -7
- package/dist/node-subpath.cjs +4 -2
- package/dist/node-subpath.cjs.map +1 -1
- package/dist/node-subpath.js +3 -3
- package/dist/{source-map-uploader-DPUUCLNW.js → source-map-uploader-RA4Z7TWA.js} +3 -3
- package/package.json +1 -1
- package/dist/chunk-6RIH6SFM.js.map +0 -1
- /package/dist/{chunk-6RNBUUBR.js.map → chunk-2GCN27SI.js.map} +0 -0
- /package/dist/{chunk-4EZ6JTDG.js.map → chunk-47B2G3FE.js.map} +0 -0
- /package/dist/{chunk-JKI4OCFV.js.map → chunk-HV5ID2WJ.js.map} +0 -0
- /package/dist/{chunk-TWTWRJ25.js.map → chunk-MD5XPCTQ.js.map} +0 -0
- /package/dist/{chunk-TWHCJKRS.js.map → chunk-NFPDYME5.js.map} +0 -0
- /package/dist/{chunk-DST4UBXU.js.map → chunk-YMLMZCPR.js.map} +0 -0
- /package/dist/{source-map-uploader-DPUUCLNW.js.map → source-map-uploader-RA4Z7TWA.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -12,12 +12,12 @@ import {
|
|
|
12
12
|
registerGlasstrace,
|
|
13
13
|
waitForReady,
|
|
14
14
|
withGlasstraceConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-CTJO7PUZ.js";
|
|
16
16
|
import {
|
|
17
17
|
GlasstraceSpanProcessor,
|
|
18
18
|
SdkError,
|
|
19
19
|
captureCorrelationId
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-2GCN27SI.js";
|
|
21
21
|
import "./chunk-DQ25VOKK.js";
|
|
22
22
|
import "./chunk-3TU62WD6.js";
|
|
23
23
|
import {
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
performInit,
|
|
28
28
|
saveCachedConfig,
|
|
29
29
|
sendInitRequest
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-HV5ID2WJ.js";
|
|
31
31
|
import {
|
|
32
32
|
isAnonymousMode,
|
|
33
33
|
isProductionDisabled,
|
|
@@ -37,10 +37,10 @@ import {
|
|
|
37
37
|
import {
|
|
38
38
|
getOrCreateAnonKey,
|
|
39
39
|
readAnonKey
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-MD5XPCTQ.js";
|
|
41
41
|
import {
|
|
42
42
|
deriveSessionId
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-EBYISKQP.js";
|
|
44
44
|
import "./chunk-NSBPE2FW.js";
|
|
45
45
|
export {
|
|
46
46
|
GlasstraceExporter,
|
package/dist/node-entry.cjs
CHANGED
|
@@ -14670,13 +14670,15 @@ var init_dist = __esm({
|
|
|
14670
14670
|
});
|
|
14671
14671
|
PresignedUploadResponseSchema = external_exports.object({
|
|
14672
14672
|
uploadId: external_exports.string().uuid(),
|
|
14673
|
-
expiresAt: external_exports.number().int().
|
|
14673
|
+
expiresAt: external_exports.number().int().nonnegative(),
|
|
14674
14674
|
files: external_exports.array(
|
|
14675
14675
|
external_exports.object({
|
|
14676
14676
|
filePath: external_exports.string().min(1),
|
|
14677
14677
|
clientToken: external_exports.string().min(1),
|
|
14678
14678
|
pathname: external_exports.string().min(1),
|
|
14679
|
-
maxBytes: external_exports.number().int().positive()
|
|
14679
|
+
maxBytes: external_exports.number().int().positive(),
|
|
14680
|
+
/** Vercel Blob access mode — explicit in the contract per DISC-756. */
|
|
14681
|
+
access: external_exports.enum(["public"])
|
|
14680
14682
|
})
|
|
14681
14683
|
).min(1).max(100)
|
|
14682
14684
|
});
|
|
@@ -18300,16 +18302,22 @@ var ERROR_RESPONSE_BODY_TRUNCATION_MARKER = "...[truncated]";
|
|
|
18300
18302
|
var REDACTED = "[REDACTED]";
|
|
18301
18303
|
var ERROR_STATUS_MIN = 400;
|
|
18302
18304
|
var ERROR_STATUS_MAX = 599;
|
|
18303
|
-
function
|
|
18305
|
+
function coerceHttpStatus(value) {
|
|
18304
18306
|
let numeric;
|
|
18305
|
-
if (typeof
|
|
18306
|
-
numeric =
|
|
18307
|
-
} else if (typeof
|
|
18308
|
-
|
|
18307
|
+
if (typeof value === "number") {
|
|
18308
|
+
numeric = value;
|
|
18309
|
+
} else if (typeof value === "string") {
|
|
18310
|
+
const trimmed = value.trim();
|
|
18311
|
+
if (trimmed.length === 0) return void 0;
|
|
18312
|
+
numeric = Number(trimmed);
|
|
18309
18313
|
} else {
|
|
18310
|
-
return
|
|
18314
|
+
return void 0;
|
|
18311
18315
|
}
|
|
18312
|
-
|
|
18316
|
+
return Number.isFinite(numeric) ? numeric : void 0;
|
|
18317
|
+
}
|
|
18318
|
+
function isHttpErrorStatus(status) {
|
|
18319
|
+
const numeric = coerceHttpStatus(status);
|
|
18320
|
+
if (numeric === void 0) return false;
|
|
18313
18321
|
return numeric >= ERROR_STATUS_MIN && numeric <= ERROR_STATUS_MAX;
|
|
18314
18322
|
}
|
|
18315
18323
|
var REDACTION_PATTERNS = [
|
|
@@ -18569,7 +18577,7 @@ var GlasstraceExporter = class {
|
|
|
18569
18577
|
}
|
|
18570
18578
|
}
|
|
18571
18579
|
}
|
|
18572
|
-
const statusCode = attrs["http.status_code"] ?? attrs["http.response.status_code"];
|
|
18580
|
+
const statusCode = coerceHttpStatus(attrs["http.status_code"]) ?? coerceHttpStatus(attrs["http.response.status_code"]);
|
|
18573
18581
|
if (statusCode !== void 0) {
|
|
18574
18582
|
extra[ATTR2.HTTP_STATUS_CODE] = statusCode;
|
|
18575
18583
|
}
|
|
@@ -22561,7 +22569,7 @@ function registerGlasstrace(options) {
|
|
|
22561
22569
|
setCoreState(CoreState.REGISTERING);
|
|
22562
22570
|
startRuntimeStateWriter({
|
|
22563
22571
|
projectRoot: process.cwd(),
|
|
22564
|
-
sdkVersion: "1.2.
|
|
22572
|
+
sdkVersion: "1.2.1"
|
|
22565
22573
|
});
|
|
22566
22574
|
const config2 = resolveConfig(options);
|
|
22567
22575
|
if (config2.verbose) {
|
|
@@ -22727,8 +22735,8 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22727
22735
|
if (config2.verbose) {
|
|
22728
22736
|
console.info("[glasstrace] Background init firing.");
|
|
22729
22737
|
}
|
|
22730
|
-
const healthReport = collectHealthReport("1.2.
|
|
22731
|
-
const initResult = await performInit(config2, anonKeyForInit, "1.2.
|
|
22738
|
+
const healthReport = collectHealthReport("1.2.1");
|
|
22739
|
+
const initResult = await performInit(config2, anonKeyForInit, "1.2.1", healthReport);
|
|
22732
22740
|
if (generation !== registrationGeneration) return;
|
|
22733
22741
|
const currentState = getCoreState();
|
|
22734
22742
|
if (currentState === CoreState.SHUTTING_DOWN || currentState === CoreState.SHUTDOWN) {
|
|
@@ -22751,7 +22759,7 @@ async function backgroundInit(config2, anonKeyForInit, generation) {
|
|
|
22751
22759
|
}
|
|
22752
22760
|
maybeInstallConsoleCapture();
|
|
22753
22761
|
if (didLastInitSucceed()) {
|
|
22754
|
-
startHeartbeat(config2, anonKeyForInit, "1.2.
|
|
22762
|
+
startHeartbeat(config2, anonKeyForInit, "1.2.1", generation, (newApiKey, accountId) => {
|
|
22755
22763
|
setAuthState(AuthState.CLAIMING);
|
|
22756
22764
|
emitLifecycleEvent("auth:claim_started", { accountId });
|
|
22757
22765
|
setResolvedApiKey(newApiKey);
|