@datarecce/ui 0.1.23 → 0.1.25
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/{RecceCheckContext-DIQjrvH8.mjs → RecceCheckContext-CiG9fGRW.mjs} +4 -3
- package/dist/RecceCheckContext-CiG9fGRW.mjs.map +1 -0
- package/dist/{RecceCheckContext-_xzNlnbJ.js → RecceCheckContext-tUxygNmN.js} +4 -3
- package/dist/RecceCheckContext-tUxygNmN.js.map +1 -0
- package/dist/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +3 -2
- package/dist/api.mjs +3 -3
- package/dist/{components-DXbVq9Cw.js → components-Chaffojm.js} +274 -227
- package/dist/components-Chaffojm.js.map +1 -0
- package/dist/{components-CfY72Lq2.mjs → components-DoLZeY_e.mjs} +274 -225
- package/dist/components-DoLZeY_e.mjs.map +1 -0
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +4 -4
- package/dist/components.mjs +4 -4
- package/dist/{hooks-C4jkoryM.js → hooks-VXI-W5Aq.js} +3 -3
- package/dist/{hooks-C4jkoryM.js.map → hooks-VXI-W5Aq.js.map} +1 -1
- package/dist/{hooks-C8pyX9m_.mjs → hooks-XsKEyc3k.mjs} +3 -3
- package/dist/{hooks-C8pyX9m_.mjs.map → hooks-XsKEyc3k.mjs.map} +1 -1
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +4 -3
- package/dist/hooks.mjs +4 -4
- package/dist/{index-CVPmrztP.d.ts → index-OeBjAMJ6.d.ts} +46 -40
- package/dist/index-OeBjAMJ6.d.ts.map +1 -0
- package/dist/{index-DIHuswfP.d.mts → index-_KWh3aGd.d.mts} +115 -109
- package/dist/index-_KWh3aGd.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -5
- package/dist/index.mjs +6 -6
- package/dist/{state-BbgVwFV2.mjs → state-DyHCt6IJ.mjs} +118 -96
- package/dist/state-DyHCt6IJ.mjs.map +1 -0
- package/dist/{state-AeoqV9ja.js → state-FkYREAs-.js} +123 -95
- package/dist/state-FkYREAs-.js.map +1 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{version-MxW9vrDY.js → version-BGNaeW6k.js} +22 -12
- package/dist/version-BGNaeW6k.js.map +1 -0
- package/dist/{version-C2NU3xyx.mjs → version-Dav28qEz.mjs} +18 -14
- package/dist/version-Dav28qEz.mjs.map +1 -0
- package/package.json +2 -1
- package/dist/RecceCheckContext-DIQjrvH8.mjs.map +0 -1
- package/dist/RecceCheckContext-_xzNlnbJ.js.map +0 -1
- package/dist/components-CfY72Lq2.mjs.map +0 -1
- package/dist/components-DXbVq9Cw.js.map +0 -1
- package/dist/index-CVPmrztP.d.ts.map +0 -1
- package/dist/index-DIHuswfP.d.mts.map +0 -1
- package/dist/state-AeoqV9ja.js.map +0 -1
- package/dist/state-BbgVwFV2.mjs.map +0 -1
- package/dist/version-C2NU3xyx.mjs.map +0 -1
- package/dist/version-MxW9vrDY.js.map +0 -1
|
@@ -132,7 +132,11 @@ _mui_material_ButtonGroup = __toESM(_mui_material_ButtonGroup);
|
|
|
132
132
|
* - red -> error
|
|
133
133
|
* - neutral -> grey
|
|
134
134
|
*/
|
|
135
|
+
const white = "#FFFFFF";
|
|
136
|
+
const black = "#000000";
|
|
135
137
|
const colors = {
|
|
138
|
+
white,
|
|
139
|
+
black,
|
|
136
140
|
iochmara: {
|
|
137
141
|
50: "#EAF3FB",
|
|
138
142
|
100: "#C4DDF3",
|
|
@@ -185,6 +189,19 @@ const colors = {
|
|
|
185
189
|
900: "#78350F",
|
|
186
190
|
950: "#431407"
|
|
187
191
|
},
|
|
192
|
+
yellow: {
|
|
193
|
+
50: "#FEFCE8",
|
|
194
|
+
100: "#FEF9C3",
|
|
195
|
+
200: "#FEF08A",
|
|
196
|
+
300: "#FDE047",
|
|
197
|
+
400: "#FACC15",
|
|
198
|
+
500: "#EAB308",
|
|
199
|
+
600: "#CA8A04",
|
|
200
|
+
700: "#A16207",
|
|
201
|
+
800: "#854D0E",
|
|
202
|
+
900: "#713F12",
|
|
203
|
+
950: "#422006"
|
|
204
|
+
},
|
|
188
205
|
green: {
|
|
189
206
|
50: "#F0FDF4",
|
|
190
207
|
100: "#DCFCE7",
|
|
@@ -268,7 +285,7 @@ function createButtonColorVariants(colorName, colorScale) {
|
|
|
268
285
|
},
|
|
269
286
|
style: {
|
|
270
287
|
backgroundColor: colorScale[500],
|
|
271
|
-
color:
|
|
288
|
+
color: white,
|
|
272
289
|
"&:hover": { backgroundColor: colorScale[600] }
|
|
273
290
|
}
|
|
274
291
|
},
|
|
@@ -315,7 +332,7 @@ function createBadgeColorVariant(colorName, colorScale) {
|
|
|
315
332
|
props: { color: colorName },
|
|
316
333
|
style: { "& .MuiBadge-badge": {
|
|
317
334
|
backgroundColor: colorScale[500],
|
|
318
|
-
color:
|
|
335
|
+
color: white
|
|
319
336
|
} }
|
|
320
337
|
};
|
|
321
338
|
}
|
|
@@ -330,7 +347,7 @@ function createChipColorVariants(colorName, colorScale) {
|
|
|
330
347
|
},
|
|
331
348
|
style: {
|
|
332
349
|
backgroundColor: colorScale[500],
|
|
333
|
-
color:
|
|
350
|
+
color: white,
|
|
334
351
|
"&:hover": { backgroundColor: colorScale[600] }
|
|
335
352
|
}
|
|
336
353
|
}, {
|
|
@@ -408,7 +425,7 @@ const componentOverrides = {
|
|
|
408
425
|
borderRadius: 6,
|
|
409
426
|
...ownerState.color === "neutral" && ownerState.variant === "contained" && {
|
|
410
427
|
backgroundColor: colors.neutral[700],
|
|
411
|
-
color:
|
|
428
|
+
color: white,
|
|
412
429
|
"&:hover": { backgroundColor: colors.neutral[800] }
|
|
413
430
|
},
|
|
414
431
|
...ownerState.color === "neutral" && ownerState.variant === "outlined" && {
|
|
@@ -585,31 +602,31 @@ const baseThemeOptions = {
|
|
|
585
602
|
main: colors.iochmara[500],
|
|
586
603
|
light: colors.iochmara[300],
|
|
587
604
|
dark: colors.iochmara[600],
|
|
588
|
-
contrastText:
|
|
605
|
+
contrastText: white
|
|
589
606
|
},
|
|
590
607
|
secondary: {
|
|
591
608
|
main: colors.cyan[500],
|
|
592
609
|
light: colors.cyan[400],
|
|
593
610
|
dark: colors.cyan[600],
|
|
594
|
-
contrastText:
|
|
611
|
+
contrastText: white
|
|
595
612
|
},
|
|
596
613
|
success: {
|
|
597
614
|
main: colors.green[500],
|
|
598
615
|
light: colors.green[400],
|
|
599
616
|
dark: colors.green[600],
|
|
600
|
-
contrastText:
|
|
617
|
+
contrastText: white
|
|
601
618
|
},
|
|
602
619
|
warning: {
|
|
603
620
|
main: colors.amber[500],
|
|
604
621
|
light: colors.amber[400],
|
|
605
622
|
dark: colors.amber[600],
|
|
606
|
-
contrastText:
|
|
623
|
+
contrastText: white
|
|
607
624
|
},
|
|
608
625
|
error: {
|
|
609
626
|
main: colors.red[500],
|
|
610
627
|
light: colors.red[400],
|
|
611
628
|
dark: colors.red[600],
|
|
612
|
-
contrastText:
|
|
629
|
+
contrastText: white
|
|
613
630
|
},
|
|
614
631
|
grey: {
|
|
615
632
|
50: colors.neutral[50],
|
|
@@ -683,8 +700,8 @@ const lightThemeOptions = {
|
|
|
683
700
|
...baseThemeOptions.palette,
|
|
684
701
|
mode: "light",
|
|
685
702
|
background: {
|
|
686
|
-
default:
|
|
687
|
-
paper:
|
|
703
|
+
default: white,
|
|
704
|
+
paper: white
|
|
688
705
|
},
|
|
689
706
|
text: {
|
|
690
707
|
primary: colors.neutral[900],
|
|
@@ -714,7 +731,7 @@ function createPaletteColor(colorScale) {
|
|
|
714
731
|
main: colorScale[500],
|
|
715
732
|
light: colorScale[300],
|
|
716
733
|
dark: colorScale[600],
|
|
717
|
-
contrastText:
|
|
734
|
+
contrastText: white
|
|
718
735
|
};
|
|
719
736
|
}
|
|
720
737
|
const customPaletteAdditions = {
|
|
@@ -723,7 +740,7 @@ const customPaletteAdditions = {
|
|
|
723
740
|
main: colors.iochmara[500],
|
|
724
741
|
light: colors.iochmara[50],
|
|
725
742
|
dark: colors.iochmara[700],
|
|
726
|
-
contrastText:
|
|
743
|
+
contrastText: white
|
|
727
744
|
},
|
|
728
745
|
cyan: createPaletteColor(colors.cyan),
|
|
729
746
|
amber: createPaletteColor(colors.amber),
|
|
@@ -735,7 +752,7 @@ const customPaletteAdditions = {
|
|
|
735
752
|
main: colors.neutral[500],
|
|
736
753
|
light: colors.neutral[300],
|
|
737
754
|
dark: colors.neutral[600],
|
|
738
|
-
contrastText:
|
|
755
|
+
contrastText: white
|
|
739
756
|
},
|
|
740
757
|
envBase: semanticColors.envBase,
|
|
741
758
|
envCurrent: semanticColors.envCurrent
|
|
@@ -771,8 +788,8 @@ function token(path$2) {
|
|
|
771
788
|
let colorName = parts[1];
|
|
772
789
|
const variant = parts[2];
|
|
773
790
|
if (colorName in colorAliases) colorName = colorAliases[colorName];
|
|
774
|
-
if (colorName === "white") return
|
|
775
|
-
if (colorName === "black") return
|
|
791
|
+
if (colorName === "white") return white;
|
|
792
|
+
if (colorName === "black") return black;
|
|
776
793
|
if (colorName in semanticColors) {
|
|
777
794
|
const semantic = semanticColors[colorName];
|
|
778
795
|
if (typeof semantic === "object" && variant in semantic) return semantic[variant];
|
|
@@ -1091,8 +1108,8 @@ async function getModelInfo(model) {
|
|
|
1091
1108
|
|
|
1092
1109
|
//#endregion
|
|
1093
1110
|
//#region recce-source/js/src/lib/api/cll.ts
|
|
1094
|
-
async function getCll(input) {
|
|
1095
|
-
return (await
|
|
1111
|
+
async function getCll(input, client = axiosClient) {
|
|
1112
|
+
return (await client.post("/api/cll", input)).data;
|
|
1096
1113
|
}
|
|
1097
1114
|
|
|
1098
1115
|
//#endregion
|
|
@@ -1589,37 +1606,37 @@ function mutateAddKey(run) {
|
|
|
1589
1606
|
});
|
|
1590
1607
|
return run;
|
|
1591
1608
|
}
|
|
1592
|
-
async function submitRun(type, params, options) {
|
|
1609
|
+
async function submitRun(type, params, options, client = axiosClient) {
|
|
1593
1610
|
const track_props = options?.trackProps ? { ...options.trackProps } : {};
|
|
1594
1611
|
if (getExperimentTrackingBreakingChangeEnabled()) track_props.breaking_change_analysis = true;
|
|
1595
|
-
return (await
|
|
1612
|
+
return (await client.post("/api/runs", {
|
|
1596
1613
|
type,
|
|
1597
1614
|
params,
|
|
1598
1615
|
nowait: options?.nowait,
|
|
1599
1616
|
track_props
|
|
1600
1617
|
})).data;
|
|
1601
1618
|
}
|
|
1602
|
-
async function getRun(runId) {
|
|
1603
|
-
return (await
|
|
1619
|
+
async function getRun(runId, client = axiosClient) {
|
|
1620
|
+
return (await client.get(`/api/runs/${runId}`)).data;
|
|
1604
1621
|
}
|
|
1605
|
-
async function waitRun(runId, timeout) {
|
|
1606
|
-
return mutateAddKey((await
|
|
1622
|
+
async function waitRun(runId, timeout, client = axiosClient) {
|
|
1623
|
+
return mutateAddKey((await client.get(`/api/runs/${runId}/wait`, { params: { timeout } })).data);
|
|
1607
1624
|
}
|
|
1608
|
-
async function cancelRun(runId) {
|
|
1609
|
-
return await
|
|
1625
|
+
async function cancelRun(runId, client = axiosClient) {
|
|
1626
|
+
return await client.post(`/api/runs/${runId}/cancel`);
|
|
1610
1627
|
}
|
|
1611
|
-
async function submitRunFromCheck(checkId, options) {
|
|
1612
|
-
return (await
|
|
1628
|
+
async function submitRunFromCheck(checkId, options, client = axiosClient) {
|
|
1629
|
+
return (await client.post(`/api/checks/${checkId}/run`, { nowait: options?.nowait })).data;
|
|
1613
1630
|
}
|
|
1614
|
-
async function searchRuns(type, params, limit) {
|
|
1615
|
-
return (await
|
|
1631
|
+
async function searchRuns(type, params, limit, client = axiosClient) {
|
|
1632
|
+
return (await client.post(`/api/runs/search`, {
|
|
1616
1633
|
type,
|
|
1617
1634
|
params,
|
|
1618
1635
|
limit
|
|
1619
1636
|
})).data;
|
|
1620
1637
|
}
|
|
1621
|
-
async function listRuns() {
|
|
1622
|
-
return (await
|
|
1638
|
+
async function listRuns(client = axiosClient) {
|
|
1639
|
+
return (await client.get("/api/runs")).data;
|
|
1623
1640
|
}
|
|
1624
1641
|
async function aggregateRuns(client = axiosClient) {
|
|
1625
1642
|
return (await client.post(`/api/runs/aggregate`, {})).data;
|
|
@@ -1627,20 +1644,20 @@ async function aggregateRuns(client = axiosClient) {
|
|
|
1627
1644
|
|
|
1628
1645
|
//#endregion
|
|
1629
1646
|
//#region recce-source/js/src/lib/api/adhocQuery.ts
|
|
1630
|
-
async function submitQuery(params, options) {
|
|
1631
|
-
return await submitRun("query", params, options);
|
|
1647
|
+
async function submitQuery(params, options, client = axiosClient) {
|
|
1648
|
+
return await submitRun("query", params, options, client);
|
|
1632
1649
|
}
|
|
1633
|
-
async function submitQueryBase(params, options) {
|
|
1634
|
-
return await submitRun("query_base", params, options);
|
|
1650
|
+
async function submitQueryBase(params, options, client = axiosClient) {
|
|
1651
|
+
return await submitRun("query_base", params, options, client);
|
|
1635
1652
|
}
|
|
1636
|
-
async function submitQueryDiff(params, options) {
|
|
1637
|
-
return await submitRun("query_diff", params, options);
|
|
1653
|
+
async function submitQueryDiff(params, options, client = axiosClient) {
|
|
1654
|
+
return await submitRun("query_diff", params, options, client);
|
|
1638
1655
|
}
|
|
1639
1656
|
|
|
1640
1657
|
//#endregion
|
|
1641
1658
|
//#region recce-source/js/src/lib/api/lineagecheck.ts
|
|
1642
|
-
async function createLineageDiffCheck(viewOptions) {
|
|
1643
|
-
return (await
|
|
1659
|
+
async function createLineageDiffCheck(viewOptions, client = axiosClient) {
|
|
1660
|
+
return (await client.post("/api/checks", {
|
|
1644
1661
|
type: "lineage_diff",
|
|
1645
1662
|
params: {},
|
|
1646
1663
|
view_options: viewOptions
|
|
@@ -1649,17 +1666,17 @@ async function createLineageDiffCheck(viewOptions) {
|
|
|
1649
1666
|
|
|
1650
1667
|
//#endregion
|
|
1651
1668
|
//#region recce-source/js/src/lib/api/profile.ts
|
|
1652
|
-
async function submitProfileDiff(params, options) {
|
|
1653
|
-
return await submitRun("profile_diff", params, options);
|
|
1669
|
+
async function submitProfileDiff(params, options, client = axiosClient) {
|
|
1670
|
+
return await submitRun("profile_diff", params, options, client);
|
|
1654
1671
|
}
|
|
1655
1672
|
|
|
1656
1673
|
//#endregion
|
|
1657
1674
|
//#region recce-source/js/src/lib/api/valuediff.ts
|
|
1658
|
-
async function submitValueDiff(params, options) {
|
|
1659
|
-
return await submitRun("value_diff", params, options);
|
|
1675
|
+
async function submitValueDiff(params, options, client = axiosClient) {
|
|
1676
|
+
return await submitRun("value_diff", params, options, client);
|
|
1660
1677
|
}
|
|
1661
|
-
async function submitValueDiffDetail(params, options) {
|
|
1662
|
-
return await submitRun("value_diff_detail", params, options);
|
|
1678
|
+
async function submitValueDiffDetail(params, options, client = axiosClient) {
|
|
1679
|
+
return await submitRun("value_diff_detail", params, options, client);
|
|
1663
1680
|
}
|
|
1664
1681
|
|
|
1665
1682
|
//#endregion
|
|
@@ -2225,14 +2242,15 @@ function setKeepAliveCallback(callback) {
|
|
|
2225
2242
|
* - Minimum 3 seconds between API calls
|
|
2226
2243
|
* - Prevents concurrent API calls with a lock
|
|
2227
2244
|
*
|
|
2245
|
+
* @param client - Optional axios instance for API configuration
|
|
2228
2246
|
* @returns true if keep-alive was sent, false if throttled/skipped
|
|
2229
2247
|
*/
|
|
2230
|
-
async function sendKeepAlive() {
|
|
2248
|
+
async function sendKeepAlive(client = axiosClient) {
|
|
2231
2249
|
if (Date.now() - lastKeepAliveTime < MIN_KEEP_ALIVE_INTERVAL_MS) return false;
|
|
2232
2250
|
if (isSending) return false;
|
|
2233
2251
|
try {
|
|
2234
2252
|
isSending = true;
|
|
2235
|
-
await
|
|
2253
|
+
await client.post("/api/keep-alive");
|
|
2236
2254
|
lastKeepAliveTime = Date.now();
|
|
2237
2255
|
if (onKeepAliveSuccess) onKeepAliveSuccess(lastKeepAliveTime);
|
|
2238
2256
|
return true;
|
|
@@ -2303,6 +2321,7 @@ const IDLE_DETECTION_CONFIG = {
|
|
|
2303
2321
|
function useIdleDetection() {
|
|
2304
2322
|
const { data: instanceInfo, isLoading, isError } = useRecceInstanceInfo();
|
|
2305
2323
|
const isDisconnected = useIdleTimeoutSafe()?.isDisconnected ?? false;
|
|
2324
|
+
const { apiClient } = useApiConfig();
|
|
2306
2325
|
const idleTimeout = instanceInfo?.idle_timeout;
|
|
2307
2326
|
const isEnabled = idleTimeout !== void 0 && idleTimeout > 0 && !isDisconnected;
|
|
2308
2327
|
debugLog("[Idle Detection] Instance info", {
|
|
@@ -2320,8 +2339,8 @@ function useIdleDetection() {
|
|
|
2320
2339
|
*/
|
|
2321
2340
|
const sendKeepAliveNow = (0, react.useCallback)(async () => {
|
|
2322
2341
|
if (document.hidden) return;
|
|
2323
|
-
if (await sendKeepAlive()) debugLog("[Idle Detection] Keep-alive sent successfully", { timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
2324
|
-
}, []);
|
|
2342
|
+
if (await sendKeepAlive(apiClient)) debugLog("[Idle Detection] Keep-alive sent successfully", { timestamp: (/* @__PURE__ */ new Date()).toISOString() });
|
|
2343
|
+
}, [apiClient]);
|
|
2325
2344
|
/**
|
|
2326
2345
|
* Handle any user activity event
|
|
2327
2346
|
* Attempts to send keep-alive (axios layer handles throttling)
|
|
@@ -3357,26 +3376,26 @@ function ProfileDiffForm({ params, onParamsChanged, setIsReadyToExecute }) {
|
|
|
3357
3376
|
|
|
3358
3377
|
//#endregion
|
|
3359
3378
|
//#region recce-source/js/src/lib/api/models.ts
|
|
3360
|
-
async function fetchModelRowCount(modelName) {
|
|
3361
|
-
return (await
|
|
3379
|
+
async function fetchModelRowCount(modelName, client = axiosClient) {
|
|
3380
|
+
return (await client.get(`/api/models/${modelName}/row_count`)).data;
|
|
3362
3381
|
}
|
|
3363
|
-
async function queryModelRowCount(modelName) {
|
|
3364
|
-
const { result } = await queryRowCount([modelName]);
|
|
3382
|
+
async function queryModelRowCount(modelName, client = axiosClient) {
|
|
3383
|
+
const { result } = await queryRowCount([modelName], client);
|
|
3365
3384
|
return result[modelName];
|
|
3366
3385
|
}
|
|
3367
|
-
async function queryRowCount(modelNames) {
|
|
3386
|
+
async function queryRowCount(modelNames, client = axiosClient) {
|
|
3368
3387
|
if (modelNames.length === 0) throw new Error("No model names provided");
|
|
3369
|
-
const { run_id } = await submitRowCountDiff({ node_names: modelNames }, { nowait: true });
|
|
3388
|
+
const { run_id } = await submitRowCountDiff({ node_names: modelNames }, { nowait: true }, client);
|
|
3370
3389
|
return {
|
|
3371
3390
|
runId: run_id,
|
|
3372
|
-
result: (await waitRun(run_id)).result
|
|
3391
|
+
result: (await waitRun(run_id, void 0, client)).result
|
|
3373
3392
|
};
|
|
3374
3393
|
}
|
|
3375
3394
|
|
|
3376
3395
|
//#endregion
|
|
3377
3396
|
//#region recce-source/js/src/lib/api/rowcount.ts
|
|
3378
|
-
async function submitRowCountDiff(params, options) {
|
|
3379
|
-
return await submitRun("row_count_diff", params, options);
|
|
3397
|
+
async function submitRowCountDiff(params, options, client = axiosClient) {
|
|
3398
|
+
return await submitRun("row_count_diff", params, options, client);
|
|
3380
3399
|
}
|
|
3381
3400
|
|
|
3382
3401
|
//#endregion
|
|
@@ -5576,6 +5595,7 @@ const useCloseModalEffect = (onClose) => {
|
|
|
5576
5595
|
}, [onClose, (0, next_navigation.usePathname)()]);
|
|
5577
5596
|
};
|
|
5578
5597
|
function RecceActionContextProvider({ children }) {
|
|
5598
|
+
const { apiClient } = useApiConfig();
|
|
5579
5599
|
const [action, setAction] = (0, react.useState)();
|
|
5580
5600
|
const [isModalOpen, setModalOpen] = (0, react.useState)(false);
|
|
5581
5601
|
const onModalOpen = (0, react.useCallback)(() => setModalOpen(true), []);
|
|
@@ -5603,7 +5623,7 @@ function RecceActionContextProvider({ children }) {
|
|
|
5603
5623
|
const session = (/* @__PURE__ */ new Date()).getTime().toString();
|
|
5604
5624
|
let lastRun = void 0;
|
|
5605
5625
|
if (options?.showLast) {
|
|
5606
|
-
const runs = await searchRuns(type, params, 1);
|
|
5626
|
+
const runs = await searchRuns(type, params, 1, apiClient);
|
|
5607
5627
|
if (runs.length === 1) lastRun = runs[0];
|
|
5608
5628
|
}
|
|
5609
5629
|
const run = findByRunType(type);
|
|
@@ -5614,7 +5634,7 @@ function RecceActionContextProvider({ children }) {
|
|
|
5614
5634
|
const { run_id } = await submitRun(type, params, {
|
|
5615
5635
|
nowait: true,
|
|
5616
5636
|
trackProps: options?.trackProps
|
|
5617
|
-
});
|
|
5637
|
+
}, apiClient);
|
|
5618
5638
|
await showRunId(run_id);
|
|
5619
5639
|
await queryClient.invalidateQueries({ queryKey: cacheKeys.runs() });
|
|
5620
5640
|
if (location.startsWith("/lineage")) setLocation("/lineage");
|
|
@@ -5644,7 +5664,8 @@ function RecceActionContextProvider({ children }) {
|
|
|
5644
5664
|
showRunId,
|
|
5645
5665
|
location,
|
|
5646
5666
|
setLocation,
|
|
5647
|
-
queryClient
|
|
5667
|
+
queryClient,
|
|
5668
|
+
apiClient
|
|
5648
5669
|
]);
|
|
5649
5670
|
useCloseModalEffect(onModalClose);
|
|
5650
5671
|
const handleExecute = async (type, params) => {
|
|
@@ -5653,7 +5674,7 @@ function RecceActionContextProvider({ children }) {
|
|
|
5653
5674
|
const { run_id } = await submitRun(type, params, {
|
|
5654
5675
|
nowait: true,
|
|
5655
5676
|
trackProps: action?.options?.trackProps
|
|
5656
|
-
});
|
|
5677
|
+
}, apiClient);
|
|
5657
5678
|
await showRunId(run_id);
|
|
5658
5679
|
} catch (e) {
|
|
5659
5680
|
toaster.create({
|
|
@@ -8193,66 +8214,67 @@ const findByRunType = (runType) => {
|
|
|
8193
8214
|
|
|
8194
8215
|
//#endregion
|
|
8195
8216
|
//#region recce-source/js/src/lib/api/checks.ts
|
|
8196
|
-
async function createSimpleCheck() {
|
|
8197
|
-
return (await
|
|
8217
|
+
async function createSimpleCheck(client = axiosClient) {
|
|
8218
|
+
return (await client.post("/api/checks", { type: "simple" })).data;
|
|
8198
8219
|
}
|
|
8199
|
-
async function createCheckByRun(runId, viewOptions) {
|
|
8220
|
+
async function createCheckByRun(runId, viewOptions, client = axiosClient) {
|
|
8200
8221
|
const track_props = getExperimentTrackingBreakingChangeEnabled() ? { breaking_change_analysis: true } : {};
|
|
8201
|
-
return (await
|
|
8222
|
+
return (await client.post("/api/checks", {
|
|
8202
8223
|
run_id: runId,
|
|
8203
8224
|
view_options: viewOptions,
|
|
8204
8225
|
track_props
|
|
8205
8226
|
})).data;
|
|
8206
8227
|
}
|
|
8207
|
-
async function listChecks() {
|
|
8208
|
-
return (await
|
|
8228
|
+
async function listChecks(client = axiosClient) {
|
|
8229
|
+
return (await client.get("/api/checks")).data;
|
|
8209
8230
|
}
|
|
8210
8231
|
function useChecks(enabled) {
|
|
8232
|
+
const { apiClient } = useApiConfig();
|
|
8211
8233
|
return (0, _tanstack_react_query.useQuery)({
|
|
8212
8234
|
queryKey: cacheKeys.checks(),
|
|
8213
|
-
queryFn: listChecks,
|
|
8235
|
+
queryFn: () => listChecks(apiClient),
|
|
8214
8236
|
enabled
|
|
8215
8237
|
});
|
|
8216
8238
|
}
|
|
8217
|
-
async function getCheck(checkId) {
|
|
8218
|
-
return (await
|
|
8239
|
+
async function getCheck(checkId, client = axiosClient) {
|
|
8240
|
+
return (await client.get(`/api/checks/${checkId}`)).data;
|
|
8219
8241
|
}
|
|
8220
|
-
async function updateCheck(checkId, payload) {
|
|
8221
|
-
return (await
|
|
8242
|
+
async function updateCheck(checkId, payload, client = axiosClient) {
|
|
8243
|
+
return (await client.patch(`/api/checks/${checkId}`, payload)).data;
|
|
8222
8244
|
}
|
|
8223
|
-
async function deleteCheck(checkId) {
|
|
8224
|
-
return (await
|
|
8245
|
+
async function deleteCheck(checkId, client = axiosClient) {
|
|
8246
|
+
return (await client.delete(`/api/checks/${checkId}`)).data;
|
|
8225
8247
|
}
|
|
8226
|
-
async function reorderChecks(order) {
|
|
8227
|
-
return await
|
|
8248
|
+
async function reorderChecks(order, client = axiosClient) {
|
|
8249
|
+
return await client.post("/api/checks/reorder", order);
|
|
8228
8250
|
}
|
|
8229
|
-
async function markAsPresetCheck(checkId) {
|
|
8230
|
-
await
|
|
8251
|
+
async function markAsPresetCheck(checkId, client = axiosClient) {
|
|
8252
|
+
await client.post(`/api/checks/${checkId}/mark-as-preset`);
|
|
8231
8253
|
}
|
|
8232
8254
|
|
|
8233
8255
|
//#endregion
|
|
8234
8256
|
//#region recce-source/js/src/lib/api/state.ts
|
|
8235
|
-
async function saveAs(input) {
|
|
8236
|
-
return (await
|
|
8257
|
+
async function saveAs(input, client = axiosClient) {
|
|
8258
|
+
return (await client.post("/api/save-as", input)).data;
|
|
8237
8259
|
}
|
|
8238
|
-
async function rename(input) {
|
|
8239
|
-
return (await
|
|
8260
|
+
async function rename(input, client = axiosClient) {
|
|
8261
|
+
return (await client.post("/api/rename", input)).data;
|
|
8240
8262
|
}
|
|
8241
|
-
async function exportState() {
|
|
8242
|
-
return (await
|
|
8263
|
+
async function exportState(client = axiosClient) {
|
|
8264
|
+
return (await client.post("/api/export")).data;
|
|
8243
8265
|
}
|
|
8244
|
-
async function importState(file, checksOnly) {
|
|
8266
|
+
async function importState(file, checksOnly, client = axiosClient) {
|
|
8245
8267
|
const formData = new FormData();
|
|
8246
8268
|
formData.append("file", file);
|
|
8247
8269
|
formData.append("checks_only", (!!checksOnly).toString());
|
|
8248
|
-
return (await
|
|
8270
|
+
return (await client.post("/api/import", formData)).data;
|
|
8249
8271
|
}
|
|
8250
|
-
async function isStateSyncing() {
|
|
8251
|
-
return (await
|
|
8272
|
+
async function isStateSyncing(client = axiosClient) {
|
|
8273
|
+
return (await client.get("/api/sync")).status === 208;
|
|
8252
8274
|
}
|
|
8253
|
-
async function syncState(input) {
|
|
8275
|
+
async function syncState(input, client = axiosClient) {
|
|
8254
8276
|
try {
|
|
8255
|
-
const response = await
|
|
8277
|
+
const response = await client.post("/api/sync", input);
|
|
8256
8278
|
if (response.status === 202) return { status: "accepted" };
|
|
8257
8279
|
if (response.status === 208) return { status: "syncing" };
|
|
8258
8280
|
} catch (error) {
|
|
@@ -8262,8 +8284,8 @@ async function syncState(input) {
|
|
|
8262
8284
|
}
|
|
8263
8285
|
throw new Error("Failed to sync state");
|
|
8264
8286
|
}
|
|
8265
|
-
async function shareState() {
|
|
8266
|
-
return (await
|
|
8287
|
+
async function shareState(client = axiosClient) {
|
|
8288
|
+
return (await client.post("/api/share")).data;
|
|
8267
8289
|
}
|
|
8268
8290
|
|
|
8269
8291
|
//#endregion
|
|
@@ -8417,6 +8439,12 @@ Object.defineProperty(exports, 'QueryResultView', {
|
|
|
8417
8439
|
return QueryResultView;
|
|
8418
8440
|
}
|
|
8419
8441
|
});
|
|
8442
|
+
Object.defineProperty(exports, 'RecceActionContext', {
|
|
8443
|
+
enumerable: true,
|
|
8444
|
+
get: function () {
|
|
8445
|
+
return RecceActionContext;
|
|
8446
|
+
}
|
|
8447
|
+
});
|
|
8420
8448
|
Object.defineProperty(exports, 'RecceActionContextProvider', {
|
|
8421
8449
|
enumerable: true,
|
|
8422
8450
|
get: function () {
|
|
@@ -9173,4 +9201,4 @@ Object.defineProperty(exports, 'waitRun', {
|
|
|
9173
9201
|
return waitRun;
|
|
9174
9202
|
}
|
|
9175
9203
|
});
|
|
9176
|
-
//# sourceMappingURL=state-
|
|
9204
|
+
//# sourceMappingURL=state-FkYREAs-.js.map
|