@superblocksteam/library 2.0.82 → 2.0.83-next.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/jsx-dev-runtime/index.js +1 -1
- package/dist/{jsx-wrapper-DbFLItO2.js → jsx-wrapper-BxcW9P1H.js} +27 -3
- package/dist/jsx-wrapper-BxcW9P1H.js.map +1 -0
- package/dist/lib/index.d.ts +47 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +62 -6
- package/dist/lib/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/jsx-wrapper-DbFLItO2.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as api_hmr_tracker_default, _ as root_store_default, t as makeWrappedComponent } from "../jsx-wrapper-
|
|
1
|
+
import { S as api_hmr_tracker_default, _ as root_store_default, t as makeWrappedComponent } from "../jsx-wrapper-BxcW9P1H.js";
|
|
2
2
|
import { SOURCE_ID_ATTRIBUTE } from "@superblocksteam/library-shared";
|
|
3
3
|
import * as ReactJsxDevRuntime from "react/jsx-dev-runtime";
|
|
4
4
|
|
|
@@ -2386,6 +2386,7 @@ var ApiManager = class {
|
|
|
2386
2386
|
delete this.runningApiControllers[apiName];
|
|
2387
2387
|
const error = this.findError(parsedResult ?? void 0);
|
|
2388
2388
|
const data = isApiV2ExecutionResponse(parsedResult) ? parsedResult?.output?.result : null;
|
|
2389
|
+
const stepLogs = this.extractStepLogs(parsedResult);
|
|
2389
2390
|
const timeTaken = Date.now() - executionStartTime;
|
|
2390
2391
|
this.callContexts[callId] = {
|
|
2391
2392
|
apiId,
|
|
@@ -2403,7 +2404,8 @@ var ApiManager = class {
|
|
|
2403
2404
|
response: data,
|
|
2404
2405
|
error,
|
|
2405
2406
|
loading: false,
|
|
2406
|
-
isTestRun
|
|
2407
|
+
isTestRun,
|
|
2408
|
+
stepLogs
|
|
2407
2409
|
});
|
|
2408
2410
|
else editorBridge.addApiRunRecord(apiId, {
|
|
2409
2411
|
id: `${apiId}-${executionStartTime}`,
|
|
@@ -2415,7 +2417,8 @@ var ApiManager = class {
|
|
|
2415
2417
|
response: data,
|
|
2416
2418
|
error,
|
|
2417
2419
|
loading: false,
|
|
2418
|
-
isTestRun
|
|
2420
|
+
isTestRun,
|
|
2421
|
+
stepLogs
|
|
2419
2422
|
});
|
|
2420
2423
|
return {
|
|
2421
2424
|
parsedResult,
|
|
@@ -2449,6 +2452,27 @@ var ApiManager = class {
|
|
|
2449
2452
|
if ("status" in response && response.status === "STATUS_COMPLETED") return 200;
|
|
2450
2453
|
return 500;
|
|
2451
2454
|
}
|
|
2455
|
+
/**
|
|
2456
|
+
* Extract step-level logs from execution events.
|
|
2457
|
+
* Captures console.log (stdout), console.error (stderr), output, and errors for each step.
|
|
2458
|
+
*/
|
|
2459
|
+
extractStepLogs(response) {
|
|
2460
|
+
if (!response || !isApiV2ExecutionResponse(response) || !response.events) return [];
|
|
2461
|
+
const stepLogs = [];
|
|
2462
|
+
for (const event of response.events) {
|
|
2463
|
+
const execEvent = "result" in event ? event.result.event : event;
|
|
2464
|
+
if (!execEvent?.end) continue;
|
|
2465
|
+
const { end, name } = execEvent;
|
|
2466
|
+
if (end.output?.stdout && end.output.stdout.length > 0 || end.output?.stderr && end.output.stderr.length > 0 || end.output?.result !== void 0 || end.error?.message) stepLogs.push({
|
|
2467
|
+
stepName: name,
|
|
2468
|
+
stdout: end.output?.stdout,
|
|
2469
|
+
stderr: end.output?.stderr,
|
|
2470
|
+
output: end.output?.result,
|
|
2471
|
+
error: end.error?.message
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
return stepLogs;
|
|
2475
|
+
}
|
|
2452
2476
|
@action async cancelApi(apiName, _scopeId) {
|
|
2453
2477
|
const abortController = this.runningApiControllers[apiName];
|
|
2454
2478
|
if (!abortController) {
|
|
@@ -3644,4 +3668,4 @@ const useJSXContext = () => {
|
|
|
3644
3668
|
|
|
3645
3669
|
//#endregion
|
|
3646
3670
|
export { useSuperblocksProfiles as A, PropsCategory as B, addNewPromise as C, getAppMode as D, SuperblocksContextProvider as E, iframeMessageHandler as F, createPropertiesPanelDefinition as H, isEmbeddedBySuperblocksFirstParty as I, isEditMode as L, sendNotification as M, colors as N, useSuperblocksContext as O, editorBridge as P, createManagedPropsList as R, api_hmr_tracker_default as S, resolveById as T, getEditStore as U, Section as V, root_store_default as _, FixWithClarkButton as a, createIframeSpan as b, ErrorContent as c, ErrorMessage as d, ErrorStack as f, StyledClarkIcon as g, SecondaryButton as h, getWidgetRectAnchorName as i, useSuperblocksUser as j, useSuperblocksGroups as k, ErrorDetails as l, ErrorTitle as m, useJSXContext as n, ActionsContainer as o, ErrorSummary as p, getWidgetAnchorName as r, ErrorContainer as s, makeWrappedComponent as t, ErrorIconContainer as u, startEditorSync as v, rejectById as w, getContextFromTraceHeaders as x, generateId as y, Prop as z };
|
|
3647
|
-
//# sourceMappingURL=jsx-wrapper-
|
|
3671
|
+
//# sourceMappingURL=jsx-wrapper-BxcW9P1H.js.map
|