@replayci/replay 0.1.15 → 0.1.16
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/index.cjs +10 -1
- package/dist/index.js +10 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1188,6 +1188,14 @@ function optionalString(value, path) {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
return value;
|
|
1190
1190
|
}
|
|
1191
|
+
function extractReplayTrace(capture) {
|
|
1192
|
+
const replay2 = capture.replay;
|
|
1193
|
+
if (!isRecord(replay2)) return void 0;
|
|
1194
|
+
const trace = replay2.trace;
|
|
1195
|
+
if (!isRecord(trace)) return void 0;
|
|
1196
|
+
if (!Array.isArray(trace.entries)) return void 0;
|
|
1197
|
+
return trace;
|
|
1198
|
+
}
|
|
1191
1199
|
function parseCommonCapture(capture, index, modelId, schemaVersion) {
|
|
1192
1200
|
const toolNames = requireStringArray(capture.tool_names, `captures[${index}].tool_names`);
|
|
1193
1201
|
const primaryToolName = capture.primary_tool_name === void 0 ? toolNames[0] ?? null : nullableString(capture.primary_tool_name, `captures[${index}].primary_tool_name`);
|
|
@@ -1205,7 +1213,8 @@ function parseCommonCapture(capture, index, modelId, schemaVersion) {
|
|
|
1205
1213
|
...capture.validation !== void 0 ? { validation: validateValidation(capture.validation, `captures[${index}].validation`) } : {},
|
|
1206
1214
|
...capture.usage !== void 0 ? { usage: validateUsage(capture.usage, `captures[${index}].usage`) } : {},
|
|
1207
1215
|
latency_ms: requireNonNegativeInt(capture.latency_ms, `captures[${index}].latency_ms`),
|
|
1208
|
-
...sdkSessionId !== void 0 ? { sdk_session_id: sdkSessionId } : {}
|
|
1216
|
+
...sdkSessionId !== void 0 ? { sdk_session_id: sdkSessionId } : {},
|
|
1217
|
+
...extractReplayTrace(capture) !== void 0 ? { replay_trace: extractReplayTrace(capture) } : {}
|
|
1209
1218
|
};
|
|
1210
1219
|
}
|
|
1211
1220
|
function parseLegacyCapturedCall(capture, index) {
|
package/dist/index.js
CHANGED
|
@@ -1142,6 +1142,14 @@ function optionalString(value, path) {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
return value;
|
|
1144
1144
|
}
|
|
1145
|
+
function extractReplayTrace(capture) {
|
|
1146
|
+
const replay2 = capture.replay;
|
|
1147
|
+
if (!isRecord(replay2)) return void 0;
|
|
1148
|
+
const trace = replay2.trace;
|
|
1149
|
+
if (!isRecord(trace)) return void 0;
|
|
1150
|
+
if (!Array.isArray(trace.entries)) return void 0;
|
|
1151
|
+
return trace;
|
|
1152
|
+
}
|
|
1145
1153
|
function parseCommonCapture(capture, index, modelId, schemaVersion) {
|
|
1146
1154
|
const toolNames = requireStringArray(capture.tool_names, `captures[${index}].tool_names`);
|
|
1147
1155
|
const primaryToolName = capture.primary_tool_name === void 0 ? toolNames[0] ?? null : nullableString(capture.primary_tool_name, `captures[${index}].primary_tool_name`);
|
|
@@ -1159,7 +1167,8 @@ function parseCommonCapture(capture, index, modelId, schemaVersion) {
|
|
|
1159
1167
|
...capture.validation !== void 0 ? { validation: validateValidation(capture.validation, `captures[${index}].validation`) } : {},
|
|
1160
1168
|
...capture.usage !== void 0 ? { usage: validateUsage(capture.usage, `captures[${index}].usage`) } : {},
|
|
1161
1169
|
latency_ms: requireNonNegativeInt(capture.latency_ms, `captures[${index}].latency_ms`),
|
|
1162
|
-
...sdkSessionId !== void 0 ? { sdk_session_id: sdkSessionId } : {}
|
|
1170
|
+
...sdkSessionId !== void 0 ? { sdk_session_id: sdkSessionId } : {},
|
|
1171
|
+
...extractReplayTrace(capture) !== void 0 ? { replay_trace: extractReplayTrace(capture) } : {}
|
|
1163
1172
|
};
|
|
1164
1173
|
}
|
|
1165
1174
|
function parseLegacyCapturedCall(capture, index) {
|