@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
|
-
const require_state = require('./state-
|
|
2
|
+
const require_state = require('./state-FkYREAs-.js');
|
|
3
3
|
const require_urls = require('./urls-SazAekCZ.js');
|
|
4
|
-
const require_version = require('./version-
|
|
5
|
-
const require_RecceCheckContext = require('./RecceCheckContext-
|
|
4
|
+
const require_version = require('./version-BGNaeW6k.js');
|
|
5
|
+
const require_RecceCheckContext = require('./RecceCheckContext-tUxygNmN.js');
|
|
6
6
|
const require_tooltipMessage = require('./tooltipMessage-Dbi1kkfi.js');
|
|
7
7
|
let _mui_material_CssBaseline = require("@mui/material/CssBaseline");
|
|
8
8
|
_mui_material_CssBaseline = require_state.__toESM(_mui_material_CssBaseline);
|
|
@@ -153,10 +153,6 @@ let _mui_material_CardHeader = require("@mui/material/CardHeader");
|
|
|
153
153
|
_mui_material_CardHeader = require_state.__toESM(_mui_material_CardHeader);
|
|
154
154
|
let _mui_material_Badge = require("@mui/material/Badge");
|
|
155
155
|
_mui_material_Badge = require_state.__toESM(_mui_material_Badge);
|
|
156
|
-
let app__mainComponents__DisplayModeToggle = require("app/(mainComponents)/DisplayModeToggle");
|
|
157
|
-
app__mainComponents__DisplayModeToggle = require_state.__toESM(app__mainComponents__DisplayModeToggle);
|
|
158
|
-
let app__mainComponents__RecceVersionBadge = require("app/(mainComponents)/RecceVersionBadge");
|
|
159
|
-
app__mainComponents__RecceVersionBadge = require_state.__toESM(app__mainComponents__RecceVersionBadge);
|
|
160
156
|
|
|
161
157
|
//#region recce-source/js/src/components/ui/mui-provider.tsx
|
|
162
158
|
/**
|
|
@@ -175,10 +171,19 @@ app__mainComponents__RecceVersionBadge = require_state.__toESM(app__mainComponen
|
|
|
175
171
|
*/
|
|
176
172
|
function MuiProvider({ children, forcedTheme, enableCssBaseline = false }) {
|
|
177
173
|
const { resolvedTheme } = (0, next_themes.useTheme)();
|
|
174
|
+
const [mounted, setMounted] = (0, react.useState)(false);
|
|
175
|
+
(0, react.useEffect)(() => {
|
|
176
|
+
setMounted(true);
|
|
177
|
+
}, []);
|
|
178
178
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_mui_material_styles.ThemeProvider, {
|
|
179
179
|
theme: (0, react.useMemo)(() => {
|
|
180
|
+
if (!mounted) return require_state.lightTheme;
|
|
180
181
|
return (forcedTheme ?? resolvedTheme) === "dark" ? require_state.darkTheme : require_state.lightTheme;
|
|
181
|
-
}, [
|
|
182
|
+
}, [
|
|
183
|
+
forcedTheme,
|
|
184
|
+
resolvedTheme,
|
|
185
|
+
mounted
|
|
186
|
+
]),
|
|
182
187
|
children: [enableCssBaseline && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_CssBaseline.default, {}), children]
|
|
183
188
|
});
|
|
184
189
|
}
|
|
@@ -2551,13 +2556,14 @@ function useImageDownloadModal() {
|
|
|
2551
2556
|
//#endregion
|
|
2552
2557
|
//#region recce-source/js/src/lib/hooks/useRun.tsx
|
|
2553
2558
|
const useRun = (runId) => {
|
|
2559
|
+
const { apiClient } = require_state.useApiConfig();
|
|
2554
2560
|
const [isRunning, setIsRunning] = (0, react.useState)(false);
|
|
2555
2561
|
const [aborting, setAborting] = (0, react.useState)(false);
|
|
2556
2562
|
const [, refetchRunsAggregated] = require_state.useRunsAggregated();
|
|
2557
2563
|
const { error, data: run } = (0, _tanstack_react_query.useQuery)({
|
|
2558
2564
|
queryKey: require_state.cacheKeys.run(runId ?? ""),
|
|
2559
2565
|
queryFn: async () => {
|
|
2560
|
-
return await require_state.waitRun(runId ?? "", isRunning ? 2 : 0);
|
|
2566
|
+
return await require_state.waitRun(runId ?? "", isRunning ? 2 : 0, apiClient);
|
|
2561
2567
|
},
|
|
2562
2568
|
enabled: !!runId,
|
|
2563
2569
|
refetchInterval: isRunning ? 50 : false,
|
|
@@ -2581,8 +2587,8 @@ const useRun = (runId) => {
|
|
|
2581
2587
|
const onCancel = (0, react.useCallback)(async () => {
|
|
2582
2588
|
setAborting(true);
|
|
2583
2589
|
if (!runId) return;
|
|
2584
|
-
await require_state.cancelRun(runId);
|
|
2585
|
-
}, [runId]);
|
|
2590
|
+
await require_state.cancelRun(runId, apiClient);
|
|
2591
|
+
}, [runId, apiClient]);
|
|
2586
2592
|
let RunResultView;
|
|
2587
2593
|
if (run && require_state.runTypeHasRef(run.type)) RunResultView = require_state.findByRunType(run.type).RunResultView;
|
|
2588
2594
|
return {
|
|
@@ -2600,9 +2606,8 @@ const useRun = (runId) => {
|
|
|
2600
2606
|
/**
|
|
2601
2607
|
* Theme-aware color utility hook
|
|
2602
2608
|
*
|
|
2603
|
-
*
|
|
2604
|
-
*
|
|
2605
|
-
* color logic to avoid repetitive ternary expressions throughout components.
|
|
2609
|
+
* Uses next-themes to determine dark/light mode, which is more reliable
|
|
2610
|
+
* when the host app uses MUI CSS variables mode with nested ThemeProviders.
|
|
2606
2611
|
*
|
|
2607
2612
|
* @example
|
|
2608
2613
|
* ```tsx
|
|
@@ -2622,20 +2627,25 @@ const useRun = (runId) => {
|
|
|
2622
2627
|
* ```
|
|
2623
2628
|
*/
|
|
2624
2629
|
function useThemeColors() {
|
|
2625
|
-
const
|
|
2626
|
-
const
|
|
2630
|
+
const muiTheme = (0, _mui_material_styles.useTheme)();
|
|
2631
|
+
const { resolvedTheme } = (0, next_themes.useTheme)();
|
|
2632
|
+
const [mounted, setMounted] = (0, react.useState)(false);
|
|
2633
|
+
(0, react.useEffect)(() => {
|
|
2634
|
+
setMounted(true);
|
|
2635
|
+
}, []);
|
|
2636
|
+
const isDark = mounted ? resolvedTheme === "dark" : false;
|
|
2627
2637
|
return {
|
|
2628
2638
|
isDark,
|
|
2629
|
-
theme,
|
|
2639
|
+
theme: muiTheme,
|
|
2630
2640
|
background: {
|
|
2631
|
-
default:
|
|
2632
|
-
paper:
|
|
2641
|
+
default: isDark ? require_state.colors.neutral[900] : require_state.colors.white,
|
|
2642
|
+
paper: isDark ? require_state.colors.neutral[800] : require_state.colors.white,
|
|
2633
2643
|
subtle: isDark ? require_state.colors.neutral[800] : require_state.colors.neutral[50],
|
|
2634
2644
|
emphasized: isDark ? require_state.colors.neutral[700] : require_state.colors.neutral[100]
|
|
2635
2645
|
},
|
|
2636
2646
|
text: {
|
|
2637
|
-
primary:
|
|
2638
|
-
secondary:
|
|
2647
|
+
primary: isDark ? require_state.colors.neutral[50] : require_state.colors.neutral[900],
|
|
2648
|
+
secondary: isDark ? require_state.colors.neutral[400] : require_state.colors.neutral[600],
|
|
2639
2649
|
disabled: isDark ? require_state.colors.neutral[500] : require_state.colors.neutral[400],
|
|
2640
2650
|
inverted: isDark ? require_state.colors.neutral[900] : require_state.colors.neutral[50]
|
|
2641
2651
|
},
|
|
@@ -2646,16 +2656,16 @@ function useThemeColors() {
|
|
|
2646
2656
|
},
|
|
2647
2657
|
status: {
|
|
2648
2658
|
added: {
|
|
2649
|
-
bg: isDark ?
|
|
2650
|
-
text:
|
|
2659
|
+
bg: isDark ? require_state.colors.green[900] : require_state.colors.green[100],
|
|
2660
|
+
text: isDark ? require_state.colors.neutral[50] : require_state.colors.neutral[900]
|
|
2651
2661
|
},
|
|
2652
2662
|
removed: {
|
|
2653
|
-
bg: isDark ?
|
|
2654
|
-
text:
|
|
2663
|
+
bg: isDark ? require_state.colors.red[950] : require_state.colors.red[200],
|
|
2664
|
+
text: isDark ? require_state.colors.neutral[50] : require_state.colors.neutral[900]
|
|
2655
2665
|
},
|
|
2656
2666
|
modified: {
|
|
2657
|
-
bg: isDark ?
|
|
2658
|
-
text:
|
|
2667
|
+
bg: isDark ? require_state.colors.yellow[900] : require_state.colors.amber[100],
|
|
2668
|
+
text: isDark ? require_state.colors.neutral[50] : require_state.colors.neutral[900]
|
|
2659
2669
|
}
|
|
2660
2670
|
},
|
|
2661
2671
|
interactive: {
|
|
@@ -6320,6 +6330,7 @@ const QueryForm = ({ defaultPrimaryKeys, onPrimaryKeysChange, ...props }) => {
|
|
|
6320
6330
|
//#region recce-source/js/src/components/AuthModal/AuthModal.tsx
|
|
6321
6331
|
function AuthModal({ handleParentClose, parentOpen = false, ignoreCookie = false, variant = "auth" }) {
|
|
6322
6332
|
const { authed } = require_state.useRecceInstanceContext();
|
|
6333
|
+
const { apiClient } = require_state.useApiConfig();
|
|
6323
6334
|
const [open, setOpen] = (0, react.useState)(parentOpen || !authed);
|
|
6324
6335
|
const authStateCookieValue = js_cookie.default.get("authState") ?? "pending";
|
|
6325
6336
|
const [authState, setAuthState] = (0, react.useState)(ignoreCookie ? "pending" : authStateCookieValue);
|
|
@@ -6402,7 +6413,7 @@ function AuthModal({ handleParentClose, parentOpen = false, ignoreCookie = false
|
|
|
6402
6413
|
},
|
|
6403
6414
|
onClick: async () => {
|
|
6404
6415
|
setAuthState("authenticating");
|
|
6405
|
-
const { connection_url } = await require_version.connectToCloud();
|
|
6416
|
+
const { connection_url } = await require_version.connectToCloud(apiClient);
|
|
6406
6417
|
window.open(connection_url, "_blank");
|
|
6407
6418
|
},
|
|
6408
6419
|
children: [
|
|
@@ -7088,6 +7099,7 @@ function AddToCheckButton({ runId, viewOptions }) {
|
|
|
7088
7099
|
const { error, run } = useRun(runId);
|
|
7089
7100
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
7090
7101
|
const [, setLocation] = require_state.useAppLocation();
|
|
7102
|
+
const { apiClient } = require_state.useApiConfig();
|
|
7091
7103
|
const checkId = run?.check_id;
|
|
7092
7104
|
const handleGoToCheck = (0, react.useCallback)(() => {
|
|
7093
7105
|
if (!checkId) return;
|
|
@@ -7095,14 +7107,15 @@ function AddToCheckButton({ runId, viewOptions }) {
|
|
|
7095
7107
|
}, [checkId, setLocation]);
|
|
7096
7108
|
const handleAddToChecklist = (0, react.useCallback)(async () => {
|
|
7097
7109
|
if (!runId) return;
|
|
7098
|
-
const check = await require_state.createCheckByRun(runId, viewOptions);
|
|
7110
|
+
const check = await require_state.createCheckByRun(runId, viewOptions, apiClient);
|
|
7099
7111
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
7100
7112
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
7101
7113
|
}, [
|
|
7102
7114
|
runId,
|
|
7103
7115
|
setLocation,
|
|
7104
7116
|
queryClient,
|
|
7105
|
-
viewOptions
|
|
7117
|
+
viewOptions,
|
|
7118
|
+
apiClient
|
|
7106
7119
|
]);
|
|
7107
7120
|
if (featureToggles.disableUpdateChecklist) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, {});
|
|
7108
7121
|
if (run?.check_id) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Button.default, {
|
|
@@ -7260,15 +7273,16 @@ function SandboxView({ isOpen, onClose, current }) {
|
|
|
7260
7273
|
const { showRunId, clearRunResult } = require_state.useRecceActionContext();
|
|
7261
7274
|
const { primaryKeys, setPrimaryKeys } = require_RecceCheckContext.useRecceQueryContext();
|
|
7262
7275
|
const { data: flags, isLoading } = require_state.useRecceServerFlag();
|
|
7276
|
+
const { apiClient } = require_state.useApiConfig();
|
|
7263
7277
|
const queryFn = async () => {
|
|
7264
7278
|
const sqlTemplate = modifiedCode;
|
|
7265
7279
|
const { run_id } = await require_state.submitQueryDiff({
|
|
7266
7280
|
current_model: current?.name ?? "",
|
|
7267
7281
|
primary_keys: primaryKeys,
|
|
7268
7282
|
sql_template: sqlTemplate
|
|
7269
|
-
}, { nowait: true });
|
|
7283
|
+
}, { nowait: true }, apiClient);
|
|
7270
7284
|
showRunId(run_id);
|
|
7271
|
-
return await require_state.waitRun(run_id);
|
|
7285
|
+
return await require_state.waitRun(run_id, void 0, apiClient);
|
|
7272
7286
|
};
|
|
7273
7287
|
const { mutate: runQuery, isPending } = (0, _tanstack_react_query.useMutation)({
|
|
7274
7288
|
mutationFn: queryFn,
|
|
@@ -7746,12 +7760,17 @@ function ExploreChangeMenuButton({ node, baseColumns, currentColumns, disableRea
|
|
|
7746
7760
|
const { envInfo, isActionAvailable } = require_state.useLineageGraphContext();
|
|
7747
7761
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
7748
7762
|
const { primaryKey } = require_state.useModelColumns_default(node.data.name);
|
|
7763
|
+
const { apiClient } = require_state.useApiConfig();
|
|
7749
7764
|
const metadataOnly = featureToggles.mode === "metadata only";
|
|
7750
7765
|
const isAddedOrRemoved = node.data.changeStatus === "added" || node.data.changeStatus === "removed";
|
|
7751
7766
|
const addSchemaCheck = (0, react.useCallback)(async () => {
|
|
7752
7767
|
const nodeId = node.id;
|
|
7753
|
-
setLocation(`/checks/?id=${(await require_version.createSchemaDiffCheck({ node_id: nodeId })).check_id}`);
|
|
7754
|
-
}, [
|
|
7768
|
+
setLocation(`/checks/?id=${(await require_version.createSchemaDiffCheck({ node_id: nodeId }, apiClient)).check_id}`);
|
|
7769
|
+
}, [
|
|
7770
|
+
node,
|
|
7771
|
+
setLocation,
|
|
7772
|
+
apiClient
|
|
7773
|
+
]);
|
|
7755
7774
|
const formattedColumns = formatSelectColumns(baseColumns, currentColumns);
|
|
7756
7775
|
let query = `select * from {{ ref("${node.data.name}") }}`;
|
|
7757
7776
|
if (formattedColumns.length) query = `select \n ${formattedColumns.join("\n ")}\nfrom {{ ref("${node.data.name}") }}`;
|
|
@@ -8218,6 +8237,7 @@ const initValue = {
|
|
|
8218
8237
|
actions: {}
|
|
8219
8238
|
};
|
|
8220
8239
|
const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onActionCompleted }) => {
|
|
8240
|
+
const { apiClient } = require_state.useApiConfig();
|
|
8221
8241
|
const actionState = (0, react.useRef)({ ...initValue }).current;
|
|
8222
8242
|
const { showRunId } = require_state.useRecceActionContext();
|
|
8223
8243
|
const submitRunForNodes = async (type, skip, getParams) => {
|
|
@@ -8247,12 +8267,12 @@ const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onAc
|
|
|
8247
8267
|
}
|
|
8248
8268
|
const params = getParams(candidates);
|
|
8249
8269
|
try {
|
|
8250
|
-
const { run_id } = await require_state.submitRun(type, params, { nowait: true });
|
|
8270
|
+
const { run_id } = await require_state.submitRun(type, params, { nowait: true }, apiClient);
|
|
8251
8271
|
showRunId(run_id);
|
|
8252
8272
|
actionState.currentRun = { run_id };
|
|
8253
8273
|
actionState.total = 1;
|
|
8254
8274
|
for (;;) {
|
|
8255
|
-
const run = await require_state.waitRun(run_id, 2);
|
|
8275
|
+
const run = await require_state.waitRun(run_id, 2, apiClient);
|
|
8256
8276
|
actionState.currentRun = run;
|
|
8257
8277
|
const status = run.error ? "failure" : run.result ? "success" : "running";
|
|
8258
8278
|
for (const node of candidates) {
|
|
@@ -8301,7 +8321,7 @@ const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onAc
|
|
|
8301
8321
|
};
|
|
8302
8322
|
onActionNodeUpdated(node);
|
|
8303
8323
|
} else try {
|
|
8304
|
-
const { run_id } = await require_state.submitRun(type, params, { nowait: true });
|
|
8324
|
+
const { run_id } = await require_state.submitRun(type, params, { nowait: true }, apiClient);
|
|
8305
8325
|
actionState.currentRun = { run_id };
|
|
8306
8326
|
actions[node.id] = {
|
|
8307
8327
|
mode,
|
|
@@ -8309,7 +8329,7 @@ const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onAc
|
|
|
8309
8329
|
};
|
|
8310
8330
|
onActionNodeUpdated(node);
|
|
8311
8331
|
for (;;) {
|
|
8312
|
-
const run = await require_state.waitRun(run_id, 2);
|
|
8332
|
+
const run = await require_state.waitRun(run_id, 2, apiClient);
|
|
8313
8333
|
actionState.currentRun = run;
|
|
8314
8334
|
const status = run.error ? "failure" : run.result ? "success" : "running";
|
|
8315
8335
|
actions[node.id] = {
|
|
@@ -8395,17 +8415,17 @@ const useMultiNodesAction = (nodes, { onActionStarted, onActionNodeUpdated, onAc
|
|
|
8395
8415
|
});
|
|
8396
8416
|
};
|
|
8397
8417
|
const addLineageDiffCheck = async () => {
|
|
8398
|
-
return await require_state.createLineageDiffCheck({ node_ids: nodes.map((node) => node.id) });
|
|
8418
|
+
return await require_state.createLineageDiffCheck({ node_ids: nodes.map((node) => node.id) }, apiClient);
|
|
8399
8419
|
};
|
|
8400
8420
|
const addSchemaDiffCheck = async () => {
|
|
8401
8421
|
let check;
|
|
8402
|
-
if (nodes.length === 1) check = await require_version.createSchemaDiffCheck({ node_id: nodes[0].id });
|
|
8403
|
-
else check = await require_version.createSchemaDiffCheck({ node_id: nodes.map((node) => node.id) });
|
|
8422
|
+
if (nodes.length === 1) check = await require_version.createSchemaDiffCheck({ node_id: nodes[0].id }, apiClient);
|
|
8423
|
+
else check = await require_version.createSchemaDiffCheck({ node_id: nodes.map((node) => node.id) }, apiClient);
|
|
8404
8424
|
return check;
|
|
8405
8425
|
};
|
|
8406
8426
|
const cancel = async () => {
|
|
8407
8427
|
actionState.status = "canceling";
|
|
8408
|
-
if (actionState.currentRun?.run_id) await require_state.cancelRun(actionState.currentRun.run_id);
|
|
8428
|
+
if (actionState.currentRun?.run_id) await require_state.cancelRun(actionState.currentRun.run_id, apiClient);
|
|
8409
8429
|
};
|
|
8410
8430
|
const reset = () => {
|
|
8411
8431
|
Object.assign(actionState, initValue);
|
|
@@ -8468,6 +8488,7 @@ const useNavToCheck = () => {
|
|
|
8468
8488
|
};
|
|
8469
8489
|
function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
8470
8490
|
const { isDark } = useThemeColors();
|
|
8491
|
+
const { apiClient } = require_state.useApiConfig();
|
|
8471
8492
|
const reactFlow = (0, _xyflow_react.useReactFlow)();
|
|
8472
8493
|
const refResize = (0, react.useRef)(null);
|
|
8473
8494
|
const { successToast, failToast } = require_state.useClipBoardToast();
|
|
@@ -8515,7 +8536,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8515
8536
|
}, []);
|
|
8516
8537
|
const cllHistory = (0, react.useRef)([]).current;
|
|
8517
8538
|
const [cll, setCll] = (0, react.useState)(void 0);
|
|
8518
|
-
const actionGetCll = (0, _tanstack_react_query.useMutation)({ mutationFn: require_state.getCll });
|
|
8539
|
+
const actionGetCll = (0, _tanstack_react_query.useMutation)({ mutationFn: (input) => require_state.getCll(input, apiClient) });
|
|
8519
8540
|
const [nodeColumnSetMap, setNodeColumSetMap] = (0, react.useState)({});
|
|
8520
8541
|
const findNodeByName = (0, react.useCallback)((name) => {
|
|
8521
8542
|
return nodes.filter(require_state.isLineageGraphNode).find((n) => n.data.name === name);
|
|
@@ -8618,7 +8639,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8618
8639
|
exclude: newViewOptions.exclude,
|
|
8619
8640
|
packages: newViewOptions.packages,
|
|
8620
8641
|
view_mode: newViewOptions.view_mode
|
|
8621
|
-
})).nodes;
|
|
8642
|
+
}, apiClient)).nodes;
|
|
8622
8643
|
} catch (_$1) {
|
|
8623
8644
|
newViewOptions.view_mode = "all";
|
|
8624
8645
|
filteredNodeIds$1 = (await require_version.select({
|
|
@@ -8626,7 +8647,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8626
8647
|
exclude: newViewOptions.exclude,
|
|
8627
8648
|
packages: newViewOptions.packages,
|
|
8628
8649
|
view_mode: newViewOptions.view_mode
|
|
8629
|
-
})).nodes;
|
|
8650
|
+
}, apiClient)).nodes;
|
|
8630
8651
|
}
|
|
8631
8652
|
setViewOptions(newViewOptions);
|
|
8632
8653
|
}
|
|
@@ -8747,7 +8768,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
8747
8768
|
exclude: newViewOptions.exclude,
|
|
8748
8769
|
packages: newViewOptions.packages,
|
|
8749
8770
|
view_mode: newViewOptions.view_mode
|
|
8750
|
-
});
|
|
8771
|
+
}, apiClient);
|
|
8751
8772
|
newViewOptions = {
|
|
8752
8773
|
...newViewOptions,
|
|
8753
8774
|
column_level_lineage: void 0
|
|
@@ -9029,7 +9050,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
9029
9050
|
selected: "multi"
|
|
9030
9051
|
});
|
|
9031
9052
|
} else if (!focusedNode) {
|
|
9032
|
-
check = await require_state.createLineageDiffCheck(viewOptions);
|
|
9053
|
+
check = await require_state.createLineageDiffCheck(viewOptions, apiClient);
|
|
9033
9054
|
require_state.trackMultiNodesAction({
|
|
9034
9055
|
type: "lineage_diff",
|
|
9035
9056
|
selected: "none"
|
|
@@ -9049,7 +9070,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
9049
9070
|
});
|
|
9050
9071
|
}
|
|
9051
9072
|
} else if (focusedNode) {
|
|
9052
|
-
check = await require_version.createSchemaDiffCheck({ node_id: focusedNode.id });
|
|
9073
|
+
check = await require_version.createSchemaDiffCheck({ node_id: focusedNode.id }, apiClient);
|
|
9053
9074
|
require_state.trackMultiNodesAction({
|
|
9054
9075
|
type: "schema_diff",
|
|
9055
9076
|
selected: "single"
|
|
@@ -9060,7 +9081,7 @@ function PrivateLineageView({ interactive = false, ...props }, ref) {
|
|
|
9060
9081
|
exclude: viewOptions.exclude,
|
|
9061
9082
|
packages: viewOptions.packages,
|
|
9062
9083
|
view_mode: viewOptions.view_mode
|
|
9063
|
-
});
|
|
9084
|
+
}, apiClient);
|
|
9064
9085
|
require_state.trackMultiNodesAction({
|
|
9065
9086
|
type: "schema_diff",
|
|
9066
9087
|
selected: "none"
|
|
@@ -9396,6 +9417,7 @@ const QueryPage = () => {
|
|
|
9396
9417
|
if (envInfo?.adapterType === "sqlmesh" && _sqlQuery === require_RecceCheckContext.defaultSqlQuery) sqlQuery = `select * from db.mymodel`;
|
|
9397
9418
|
if (featureToggles.mode === "read only") sqlQuery = `--- Would like to do query here? Book a demo with us at ${require_urls.RECCE_SUPPORT_CALENDAR_URL}\n${sqlQuery}`;
|
|
9398
9419
|
const { showRunId } = require_state.useRecceActionContext();
|
|
9420
|
+
const { apiClient } = require_state.useApiConfig();
|
|
9399
9421
|
const queryFn = async (type) => {
|
|
9400
9422
|
function queryFactory(type$1) {
|
|
9401
9423
|
switch (type$1) {
|
|
@@ -9413,9 +9435,9 @@ const QueryPage = () => {
|
|
|
9413
9435
|
params.primary_keys = primaryKeys;
|
|
9414
9436
|
if (isCustomQueries) params.base_sql_template = baseSqlQuery;
|
|
9415
9437
|
}
|
|
9416
|
-
const { run_id } = await runFn(params, options);
|
|
9438
|
+
const { run_id } = await runFn(params, options, apiClient);
|
|
9417
9439
|
showRunId(run_id);
|
|
9418
|
-
return await require_state.waitRun(run_id);
|
|
9440
|
+
return await require_state.waitRun(run_id, void 0, apiClient);
|
|
9419
9441
|
};
|
|
9420
9442
|
const { mutate: runQuery, isPending } = (0, _tanstack_react_query.useMutation)({ mutationFn: queryFn });
|
|
9421
9443
|
const currentSchema = (0, react.useMemo)(() => {
|
|
@@ -9570,9 +9592,10 @@ const ChecklistItem = ({ check, selected, onSelect, onMarkAsApproved }) => {
|
|
|
9570
9592
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
9571
9593
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
9572
9594
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
9595
|
+
const { apiClient } = require_state.useApiConfig();
|
|
9573
9596
|
const checkId = check.check_id;
|
|
9574
9597
|
const { mutate } = (0, _tanstack_react_query.useMutation)({
|
|
9575
|
-
mutationFn: (check$1) => require_state.updateCheck(checkId, check$1),
|
|
9598
|
+
mutationFn: (check$1) => require_state.updateCheck(checkId, check$1, apiClient),
|
|
9576
9599
|
onSuccess: async () => {
|
|
9577
9600
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
9578
9601
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -9644,8 +9667,9 @@ const CheckList = ({ checks, selectedItem, onCheckSelected, onChecksReordered })
|
|
|
9644
9667
|
const [open, setOpen] = (0, react.useState)(false);
|
|
9645
9668
|
const [pendingApprovalCheckId, setPendingApprovalCheckId] = (0, react.useState)(null);
|
|
9646
9669
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
9670
|
+
const { apiClient } = require_state.useApiConfig();
|
|
9647
9671
|
const { mutate: markCheckedByID } = (0, _tanstack_react_query.useMutation)({
|
|
9648
|
-
mutationFn: (checkId) => require_state.updateCheck(checkId, { is_checked: true }),
|
|
9672
|
+
mutationFn: (checkId) => require_state.updateCheck(checkId, { is_checked: true }, apiClient),
|
|
9649
9673
|
onSuccess: async (_$1, checkId) => {
|
|
9650
9674
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
9651
9675
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -9802,20 +9826,22 @@ const CheckList = ({ checks, selectedItem, onCheckSelected, onChecksReordered })
|
|
|
9802
9826
|
* List all events for a check in chronological order.
|
|
9803
9827
|
*
|
|
9804
9828
|
* @param checkId - The check ID
|
|
9829
|
+
* @param client - Optional axios instance for API configuration
|
|
9805
9830
|
* @returns Promise resolving to array of CheckEvent objects
|
|
9806
9831
|
*/
|
|
9807
|
-
async function listCheckEvents(checkId) {
|
|
9808
|
-
return (await
|
|
9832
|
+
async function listCheckEvents(checkId, client = require_state.axiosClient) {
|
|
9833
|
+
return (await client.get(`/api/checks/${checkId}/events`)).data;
|
|
9809
9834
|
}
|
|
9810
9835
|
/**
|
|
9811
9836
|
* Create a new comment on a check.
|
|
9812
9837
|
*
|
|
9813
9838
|
* @param checkId - The check ID
|
|
9814
9839
|
* @param content - The comment content (plain text for now, markdown later)
|
|
9840
|
+
* @param client - Optional axios instance for API configuration
|
|
9815
9841
|
* @returns Promise resolving to the created CheckEvent
|
|
9816
9842
|
*/
|
|
9817
|
-
async function createComment(checkId, content) {
|
|
9818
|
-
return (await
|
|
9843
|
+
async function createComment(checkId, content, client = require_state.axiosClient) {
|
|
9844
|
+
return (await client.post(`/api/checks/${checkId}/events`, { content })).data;
|
|
9819
9845
|
}
|
|
9820
9846
|
/**
|
|
9821
9847
|
* Update an existing comment.
|
|
@@ -9824,10 +9850,11 @@ async function createComment(checkId, content) {
|
|
|
9824
9850
|
* @param checkId - The check ID
|
|
9825
9851
|
* @param eventId - The event ID of the comment to update
|
|
9826
9852
|
* @param content - The new comment content
|
|
9853
|
+
* @param client - Optional axios instance for API configuration
|
|
9827
9854
|
* @returns Promise resolving to the updated CheckEvent
|
|
9828
9855
|
*/
|
|
9829
|
-
async function updateComment(checkId, eventId, content) {
|
|
9830
|
-
return (await
|
|
9856
|
+
async function updateComment(checkId, eventId, content, client = require_state.axiosClient) {
|
|
9857
|
+
return (await client.patch(`/api/checks/${checkId}/events/${eventId}`, { content })).data;
|
|
9831
9858
|
}
|
|
9832
9859
|
/**
|
|
9833
9860
|
* Delete a comment (soft delete).
|
|
@@ -9835,10 +9862,11 @@ async function updateComment(checkId, eventId, content) {
|
|
|
9835
9862
|
*
|
|
9836
9863
|
* @param checkId - The check ID
|
|
9837
9864
|
* @param eventId - The event ID of the comment to delete
|
|
9865
|
+
* @param client - Optional axios instance for API configuration
|
|
9838
9866
|
* @returns Promise resolving when deletion is complete
|
|
9839
9867
|
*/
|
|
9840
|
-
async function deleteComment(checkId, eventId) {
|
|
9841
|
-
await
|
|
9868
|
+
async function deleteComment(checkId, eventId, client = require_state.axiosClient) {
|
|
9869
|
+
await client.delete(`/api/checks/${checkId}/events/${eventId}`);
|
|
9842
9870
|
}
|
|
9843
9871
|
/**
|
|
9844
9872
|
* Get the appropriate icon name for an event type.
|
|
@@ -9868,27 +9896,28 @@ const POLLING_INTERVAL = 1e4;
|
|
|
9868
9896
|
function useCheckEvents(checkId, options = {}) {
|
|
9869
9897
|
const { enabled = true } = options;
|
|
9870
9898
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
9899
|
+
const { apiClient } = require_state.useApiConfig();
|
|
9871
9900
|
const { data: events, isLoading, error, refetch } = (0, _tanstack_react_query.useQuery)({
|
|
9872
9901
|
queryKey: require_state.cacheKeys.checkEvents(checkId),
|
|
9873
|
-
queryFn: () => listCheckEvents(checkId),
|
|
9902
|
+
queryFn: () => listCheckEvents(checkId, apiClient),
|
|
9874
9903
|
enabled,
|
|
9875
9904
|
refetchInterval: POLLING_INTERVAL,
|
|
9876
9905
|
refetchIntervalInBackground: false
|
|
9877
9906
|
});
|
|
9878
9907
|
const createCommentMutation = (0, _tanstack_react_query.useMutation)({
|
|
9879
|
-
mutationFn: (content) => createComment(checkId, content),
|
|
9908
|
+
mutationFn: (content) => createComment(checkId, content, apiClient),
|
|
9880
9909
|
onSuccess: async () => {
|
|
9881
9910
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checkEvents(checkId) });
|
|
9882
9911
|
}
|
|
9883
9912
|
});
|
|
9884
9913
|
const updateCommentMutation = (0, _tanstack_react_query.useMutation)({
|
|
9885
|
-
mutationFn: ({ eventId, content }) => updateComment(checkId, eventId, content),
|
|
9914
|
+
mutationFn: ({ eventId, content }) => updateComment(checkId, eventId, content, apiClient),
|
|
9886
9915
|
onSuccess: async () => {
|
|
9887
9916
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checkEvents(checkId) });
|
|
9888
9917
|
}
|
|
9889
9918
|
});
|
|
9890
9919
|
const deleteCommentMutation = (0, _tanstack_react_query.useMutation)({
|
|
9891
|
-
mutationFn: (eventId) => deleteComment(checkId, eventId),
|
|
9920
|
+
mutationFn: (eventId) => deleteComment(checkId, eventId, apiClient),
|
|
9892
9921
|
onSuccess: async () => {
|
|
9893
9922
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checkEvents(checkId) });
|
|
9894
9923
|
}
|
|
@@ -10745,10 +10774,11 @@ function TimelineEvent({ event, currentUserId, onEdit, onDelete }) {
|
|
|
10745
10774
|
*/
|
|
10746
10775
|
function CheckTimeline({ checkId }) {
|
|
10747
10776
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
10777
|
+
const { apiClient } = require_state.useApiConfig();
|
|
10748
10778
|
const { events, isLoading, error, createComment: createComment$1, isCreatingComment, updateComment: updateComment$1, deleteComment: deleteComment$1 } = useCheckEvents(checkId);
|
|
10749
10779
|
const { data: currentUser } = (0, _tanstack_react_query.useQuery)({
|
|
10750
10780
|
queryKey: require_state.cacheKeys.user(),
|
|
10751
|
-
queryFn: require_version.fetchUser,
|
|
10781
|
+
queryFn: () => require_version.fetchUser(apiClient),
|
|
10752
10782
|
retry: false
|
|
10753
10783
|
});
|
|
10754
10784
|
const handleCreateComment = (content) => {
|
|
@@ -11133,6 +11163,7 @@ const NodelistItem = ({ node, selected, onSelect, schemaChanged, isDark }) => {
|
|
|
11133
11163
|
};
|
|
11134
11164
|
function PrivateSchemaDiffView({ check }, ref) {
|
|
11135
11165
|
const isDark = (0, _mui_material_styles.useTheme)().palette.mode === "dark";
|
|
11166
|
+
const { apiClient } = require_state.useApiConfig();
|
|
11136
11167
|
const { lineageGraph } = require_state.useLineageGraphContext();
|
|
11137
11168
|
const params = check.params;
|
|
11138
11169
|
const { isLoading, error, data } = (0, _tanstack_react_query.useQuery)({
|
|
@@ -11142,7 +11173,7 @@ function PrivateSchemaDiffView({ check }, ref) {
|
|
|
11142
11173
|
exclude: params.exclude,
|
|
11143
11174
|
packages: params.packages,
|
|
11144
11175
|
view_mode: params.view_mode
|
|
11145
|
-
}),
|
|
11176
|
+
}, apiClient),
|
|
11146
11177
|
refetchOnMount: true,
|
|
11147
11178
|
enabled: !params.node_id
|
|
11148
11179
|
});
|
|
@@ -11254,6 +11285,7 @@ const SchemaDiffView = (0, react.forwardRef)(PrivateSchemaDiffView);
|
|
|
11254
11285
|
function CheckDetail({ checkId, refreshCheckList }) {
|
|
11255
11286
|
const theme = (0, _mui_material_styles.useTheme)();
|
|
11256
11287
|
const isDark = theme.palette.mode === "dark";
|
|
11288
|
+
const { apiClient } = require_state.useApiConfig();
|
|
11257
11289
|
const { featureToggles, sessionId } = require_state.useRecceInstanceContext();
|
|
11258
11290
|
const { setLatestSelectedCheckId } = require_RecceCheckContext.useRecceCheckContext();
|
|
11259
11291
|
const { cloudMode } = require_state.useLineageGraphContext();
|
|
@@ -11269,7 +11301,7 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11269
11301
|
const menuOpen = Boolean(menuAnchorEl);
|
|
11270
11302
|
const { isLoading, error, data: check } = (0, _tanstack_react_query.useQuery)({
|
|
11271
11303
|
queryKey: require_state.cacheKeys.check(checkId),
|
|
11272
|
-
queryFn: async () => require_state.getCheck(checkId),
|
|
11304
|
+
queryFn: async () => require_state.getCheck(checkId, apiClient),
|
|
11273
11305
|
refetchOnMount: true
|
|
11274
11306
|
});
|
|
11275
11307
|
const trackedRunId = submittedRunId ?? check?.last_run?.run_id;
|
|
@@ -11281,14 +11313,14 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11281
11313
|
const isPresetCheck = check?.is_preset ?? false;
|
|
11282
11314
|
const lineageViewRef = (0, react.useRef)(null);
|
|
11283
11315
|
const { mutate } = (0, _tanstack_react_query.useMutation)({
|
|
11284
|
-
mutationFn: (check$1) => require_state.updateCheck(checkId, check$1),
|
|
11316
|
+
mutationFn: (check$1) => require_state.updateCheck(checkId, check$1, apiClient),
|
|
11285
11317
|
onSuccess: async () => {
|
|
11286
11318
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
11287
11319
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
11288
11320
|
}
|
|
11289
11321
|
});
|
|
11290
11322
|
const { mutate: handleDelete } = (0, _tanstack_react_query.useMutation)({
|
|
11291
|
-
mutationFn: () => require_state.deleteCheck(checkId),
|
|
11323
|
+
mutationFn: () => require_state.deleteCheck(checkId, apiClient),
|
|
11292
11324
|
onSuccess: async () => {
|
|
11293
11325
|
setLatestSelectedCheckId("");
|
|
11294
11326
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
@@ -11298,7 +11330,7 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11298
11330
|
const { mutate: handleMarkAsPresetCheck, isPending: isMarkingAsPreset } = (0, _tanstack_react_query.useMutation)({
|
|
11299
11331
|
mutationFn: async () => {
|
|
11300
11332
|
if (!check) throw new Error("Check not found");
|
|
11301
|
-
return await require_state.markAsPresetCheck(checkId);
|
|
11333
|
+
return await require_state.markAsPresetCheck(checkId, apiClient);
|
|
11302
11334
|
},
|
|
11303
11335
|
onSuccess: async () => {
|
|
11304
11336
|
successToast("Check marked as preset successfully");
|
|
@@ -11310,20 +11342,21 @@ function CheckDetail({ checkId, refreshCheckList }) {
|
|
|
11310
11342
|
});
|
|
11311
11343
|
const handleRerun = (0, react.useCallback)(async () => {
|
|
11312
11344
|
if (!check?.type) return;
|
|
11313
|
-
setSubmittedRunId((await require_state.submitRunFromCheck(checkId, { nowait: true })).run_id);
|
|
11345
|
+
setSubmittedRunId((await require_state.submitRunFromCheck(checkId, { nowait: true }, apiClient)).run_id);
|
|
11314
11346
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.check(checkId) });
|
|
11315
11347
|
if (refreshCheckList) refreshCheckList();
|
|
11316
11348
|
}, [
|
|
11317
11349
|
check,
|
|
11318
11350
|
checkId,
|
|
11319
11351
|
queryClient,
|
|
11320
|
-
refreshCheckList
|
|
11352
|
+
refreshCheckList,
|
|
11353
|
+
apiClient
|
|
11321
11354
|
]);
|
|
11322
11355
|
const handleCancel = (0, react.useCallback)(async () => {
|
|
11323
11356
|
setAborting(true);
|
|
11324
11357
|
if (!trackedRunId) return;
|
|
11325
|
-
return await require_state.cancelRun(trackedRunId);
|
|
11326
|
-
}, [trackedRunId]);
|
|
11358
|
+
return await require_state.cancelRun(trackedRunId, apiClient);
|
|
11359
|
+
}, [trackedRunId, apiClient]);
|
|
11327
11360
|
const handleCopy = async () => {
|
|
11328
11361
|
if (!check) return;
|
|
11329
11362
|
const markdown = buildMarkdown(check);
|
|
@@ -11828,8 +11861,9 @@ function buildBody(check) {
|
|
|
11828
11861
|
const CheckEmptyState = () => {
|
|
11829
11862
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
11830
11863
|
const [, setLocation] = require_state.useAppLocation();
|
|
11864
|
+
const { apiClient } = require_state.useApiConfig();
|
|
11831
11865
|
const { mutate: createSchemaCheck, isPending } = (0, _tanstack_react_query.useMutation)({
|
|
11832
|
-
mutationFn: () => require_version.createSchemaDiffCheck({ select: "state:modified" }),
|
|
11866
|
+
mutationFn: () => require_version.createSchemaDiffCheck({ select: "state:modified" }, apiClient),
|
|
11833
11867
|
onSuccess: async (check) => {
|
|
11834
11868
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
11835
11869
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
@@ -11912,9 +11946,10 @@ const CheckEmptyState = () => {
|
|
|
11912
11946
|
//#endregion
|
|
11913
11947
|
//#region recce-source/js/src/components/run/RunPage.tsx
|
|
11914
11948
|
const RunPage = ({ runId }) => {
|
|
11949
|
+
const { apiClient } = require_state.useApiConfig();
|
|
11915
11950
|
const { error, data: run } = (0, _tanstack_react_query.useQuery)({
|
|
11916
11951
|
queryKey: require_state.cacheKeys.run(runId),
|
|
11917
|
-
queryFn: async () => require_state.waitRun(runId)
|
|
11952
|
+
queryFn: async () => require_state.waitRun(runId, void 0, apiClient)
|
|
11918
11953
|
});
|
|
11919
11954
|
let RunResultView;
|
|
11920
11955
|
if (run && require_state.runTypeHasRef(run.type)) RunResultView = require_state.findByRunType(run.type).RunResultView;
|
|
@@ -11929,10 +11964,11 @@ const RunPage = ({ runId }) => {
|
|
|
11929
11964
|
//#region recce-source/js/src/components/run/RunList.tsx
|
|
11930
11965
|
const RunListItem = ({ run, isSelected, onSelectRun, onAddToChecklist, onGoToCheck }) => {
|
|
11931
11966
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
11967
|
+
const { apiClient } = require_state.useApiConfig();
|
|
11932
11968
|
const { data: fetchedRun } = (0, _tanstack_react_query.useQuery)({
|
|
11933
11969
|
queryKey: require_state.cacheKeys.run(run.run_id),
|
|
11934
11970
|
queryFn: async () => {
|
|
11935
|
-
return await require_state.waitRun(run.run_id);
|
|
11971
|
+
return await require_state.waitRun(run.run_id, void 0, apiClient);
|
|
11936
11972
|
},
|
|
11937
11973
|
enabled: run.status === "running",
|
|
11938
11974
|
retry: false
|
|
@@ -12036,10 +12072,11 @@ const DateSegmentItem = ({ runAt }) => {
|
|
|
12036
12072
|
};
|
|
12037
12073
|
const RunList = () => {
|
|
12038
12074
|
const { closeHistory } = require_state.useRecceActionContext();
|
|
12075
|
+
const { apiClient } = require_state.useApiConfig();
|
|
12039
12076
|
const { data: runs, isLoading } = (0, _tanstack_react_query.useQuery)({
|
|
12040
12077
|
queryKey: require_state.cacheKeys.runs(),
|
|
12041
12078
|
queryFn: async () => {
|
|
12042
|
-
return await require_state.listRuns();
|
|
12079
|
+
return await require_state.listRuns(apiClient);
|
|
12043
12080
|
},
|
|
12044
12081
|
retry: false
|
|
12045
12082
|
});
|
|
@@ -12103,6 +12140,7 @@ const RunList = () => {
|
|
|
12103
12140
|
function DateDividedRunHistoryItem({ run, previousDate }) {
|
|
12104
12141
|
const [, setLocation] = require_state.useAppLocation();
|
|
12105
12142
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
12143
|
+
const { apiClient } = require_state.useApiConfig();
|
|
12106
12144
|
const { showRunId, runId } = require_state.useRecceActionContext();
|
|
12107
12145
|
const currentDate = new Date(run.run_at).toDateString();
|
|
12108
12146
|
const shouldRenderDateSegment = previousDate != null && previousDate !== currentDate;
|
|
@@ -12111,10 +12149,14 @@ function DateDividedRunHistoryItem({ run, previousDate }) {
|
|
|
12111
12149
|
showRunId(runId$1, false);
|
|
12112
12150
|
};
|
|
12113
12151
|
const handleAddToChecklist = (0, react.useCallback)(async (clickedRunId) => {
|
|
12114
|
-
const check = await require_state.createCheckByRun(clickedRunId);
|
|
12152
|
+
const check = await require_state.createCheckByRun(clickedRunId, void 0, apiClient);
|
|
12115
12153
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.checks() });
|
|
12116
12154
|
setLocation(`/checks/?id=${check.check_id}`);
|
|
12117
|
-
}, [
|
|
12155
|
+
}, [
|
|
12156
|
+
setLocation,
|
|
12157
|
+
queryClient,
|
|
12158
|
+
apiClient
|
|
12159
|
+
]);
|
|
12118
12160
|
const handleGoToCheck = (0, react.useCallback)((checkId) => {
|
|
12119
12161
|
require_state.trackHistoryAction({ name: "go_to_check" });
|
|
12120
12162
|
setLocation(`/checks/?id=${checkId}`);
|
|
@@ -12482,9 +12524,10 @@ function SummaryView() {
|
|
|
12482
12524
|
//#endregion
|
|
12483
12525
|
//#region recce-source/js/src/components/app/AvatarDropdown.tsx
|
|
12484
12526
|
function AvatarDropdown() {
|
|
12527
|
+
const { apiClient } = require_state.useApiConfig();
|
|
12485
12528
|
const { data: user, isLoading, error } = (0, _tanstack_react_query.useQuery)({
|
|
12486
12529
|
queryKey: require_state.cacheKeys.user(),
|
|
12487
|
-
queryFn: require_version.fetchUser,
|
|
12530
|
+
queryFn: () => require_version.fetchUser(apiClient),
|
|
12488
12531
|
retry: false
|
|
12489
12532
|
});
|
|
12490
12533
|
const { data: avatarUrl } = (0, _tanstack_react_query.useQuery)({
|
|
@@ -12633,6 +12676,142 @@ function IdleTimeoutBadge() {
|
|
|
12633
12676
|
});
|
|
12634
12677
|
}
|
|
12635
12678
|
|
|
12679
|
+
//#endregion
|
|
12680
|
+
//#region recce-source/js/app/(mainComponents)/DisplayModeToggle.tsx
|
|
12681
|
+
/**
|
|
12682
|
+
* Display Mode Toggle - switches between light and dark themes
|
|
12683
|
+
*
|
|
12684
|
+
* Uses next-themes to persist the user's preference.
|
|
12685
|
+
* Default is light theme, with future support for system preference.
|
|
12686
|
+
*/
|
|
12687
|
+
function DisplayModeToggle() {
|
|
12688
|
+
const { setTheme, resolvedTheme } = (0, next_themes.useTheme)();
|
|
12689
|
+
const [mounted, setMounted] = (0, react.useState)(false);
|
|
12690
|
+
(0, react.useEffect)(() => {
|
|
12691
|
+
setMounted(true);
|
|
12692
|
+
}, []);
|
|
12693
|
+
const toggleTheme = () => {
|
|
12694
|
+
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
12695
|
+
};
|
|
12696
|
+
if (!mounted) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
12697
|
+
size: "small",
|
|
12698
|
+
sx: {
|
|
12699
|
+
color: "rgba(255, 255, 255, 0.8)",
|
|
12700
|
+
"&:hover": { bgcolor: "rgba(255, 255, 255, 0.1)" }
|
|
12701
|
+
},
|
|
12702
|
+
disabled: true,
|
|
12703
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiSun, { style: {
|
|
12704
|
+
width: 18,
|
|
12705
|
+
height: 18
|
|
12706
|
+
} })
|
|
12707
|
+
});
|
|
12708
|
+
const isDark = resolvedTheme === "dark";
|
|
12709
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
12710
|
+
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
12711
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
12712
|
+
size: "small",
|
|
12713
|
+
onClick: toggleTheme,
|
|
12714
|
+
sx: {
|
|
12715
|
+
color: "rgba(255, 255, 255, 0.8)",
|
|
12716
|
+
"&:hover": { bgcolor: "rgba(255, 255, 255, 0.1)" }
|
|
12717
|
+
},
|
|
12718
|
+
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
12719
|
+
children: isDark ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiSun, { style: {
|
|
12720
|
+
width: 18,
|
|
12721
|
+
height: 18
|
|
12722
|
+
} }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiMoon, { style: {
|
|
12723
|
+
width: 18,
|
|
12724
|
+
height: 18
|
|
12725
|
+
} })
|
|
12726
|
+
})
|
|
12727
|
+
});
|
|
12728
|
+
}
|
|
12729
|
+
|
|
12730
|
+
//#endregion
|
|
12731
|
+
//#region recce-source/js/app/(mainComponents)/RecceVersionBadge.tsx
|
|
12732
|
+
function RecceVersionBadge() {
|
|
12733
|
+
const { version, latestVersion } = require_version.useVersionNumber();
|
|
12734
|
+
const versionFormatRegex = (0, react.useMemo)(() => /* @__PURE__ */ new RegExp("^\\d+\\.\\d+\\.\\d+$"), []);
|
|
12735
|
+
(0, react.useEffect)(() => {
|
|
12736
|
+
if (versionFormatRegex.test(version) && version !== latestVersion) {
|
|
12737
|
+
const storageKey = "recce-update-toast-shown";
|
|
12738
|
+
if (sessionStorage.getItem(storageKey)) return;
|
|
12739
|
+
setTimeout(() => {
|
|
12740
|
+
require_state.toaster.create({
|
|
12741
|
+
id: "recce-update-available",
|
|
12742
|
+
title: "Update available",
|
|
12743
|
+
description: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
12744
|
+
"A new version of Recce (v",
|
|
12745
|
+
latestVersion,
|
|
12746
|
+
") is available.",
|
|
12747
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
|
|
12748
|
+
"Please run",
|
|
12749
|
+
" ",
|
|
12750
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
12751
|
+
component: "code",
|
|
12752
|
+
sx: {
|
|
12753
|
+
bgcolor: "grey.200",
|
|
12754
|
+
px: .5,
|
|
12755
|
+
py: .25,
|
|
12756
|
+
borderRadius: .5,
|
|
12757
|
+
fontFamily: "monospace",
|
|
12758
|
+
fontSize: "0.875em"
|
|
12759
|
+
},
|
|
12760
|
+
children: "pip install --upgrade recce"
|
|
12761
|
+
}),
|
|
12762
|
+
" ",
|
|
12763
|
+
"to update Recce.",
|
|
12764
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
|
|
12765
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Link.default, {
|
|
12766
|
+
sx: {
|
|
12767
|
+
color: "primary.main",
|
|
12768
|
+
fontWeight: "bold",
|
|
12769
|
+
"&:hover": { textDecoration: "underline" }
|
|
12770
|
+
},
|
|
12771
|
+
href: `https://github.com/DataRecce/recce/releases/tag/v${latestVersion}`,
|
|
12772
|
+
target: "_blank",
|
|
12773
|
+
children: "Click here to view the detail of latest release"
|
|
12774
|
+
})
|
|
12775
|
+
] }),
|
|
12776
|
+
duration: 60 * 1e3,
|
|
12777
|
+
closable: true
|
|
12778
|
+
});
|
|
12779
|
+
sessionStorage.setItem(storageKey, "true");
|
|
12780
|
+
}, 0);
|
|
12781
|
+
}
|
|
12782
|
+
}, [
|
|
12783
|
+
version,
|
|
12784
|
+
latestVersion,
|
|
12785
|
+
versionFormatRegex
|
|
12786
|
+
]);
|
|
12787
|
+
if (!versionFormatRegex.test(version)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
|
|
12788
|
+
component: "span",
|
|
12789
|
+
sx: {
|
|
12790
|
+
fontSize: "sm",
|
|
12791
|
+
color: "rgba(255,255,255,0.8)",
|
|
12792
|
+
textTransform: "uppercase",
|
|
12793
|
+
borderWidth: 1,
|
|
12794
|
+
px: 1,
|
|
12795
|
+
borderRadius: .75
|
|
12796
|
+
},
|
|
12797
|
+
children: version
|
|
12798
|
+
});
|
|
12799
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Link.default, {
|
|
12800
|
+
href: `https://github.com/DataRecce/recce/releases/tag/v${version}`,
|
|
12801
|
+
sx: {
|
|
12802
|
+
"&:hover": { textDecoration: "none" },
|
|
12803
|
+
fontSize: "sm",
|
|
12804
|
+
color: "rgba(255,255,255,0.8)",
|
|
12805
|
+
textTransform: "uppercase",
|
|
12806
|
+
borderWidth: 1,
|
|
12807
|
+
px: 1,
|
|
12808
|
+
borderRadius: .75
|
|
12809
|
+
},
|
|
12810
|
+
target: "_blank",
|
|
12811
|
+
children: version
|
|
12812
|
+
});
|
|
12813
|
+
}
|
|
12814
|
+
|
|
12636
12815
|
//#endregion
|
|
12637
12816
|
//#region recce-source/js/app/(mainComponents)/TopBar.tsx
|
|
12638
12817
|
function LinkIcon({ icon: IconComponent, href, sx, ...props }) {
|
|
@@ -12699,8 +12878,8 @@ function TopBar() {
|
|
|
12699
12878
|
})]
|
|
12700
12879
|
})
|
|
12701
12880
|
}),
|
|
12702
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
12703
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
12881
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DisplayModeToggle, {}),
|
|
12882
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RecceVersionBadge, {}),
|
|
12704
12883
|
(featureToggles.mode ?? reviewMode) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Badge.default, {
|
|
12705
12884
|
sx: {
|
|
12706
12885
|
fontSize: "0.875rem",
|
|
@@ -12885,6 +13064,7 @@ const useClosePrompt = (prompt) => {
|
|
|
12885
13064
|
const Filename = () => {
|
|
12886
13065
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
12887
13066
|
const { fileName, cloudMode, isDemoSite, envInfo } = require_state.useLineageGraphContext();
|
|
13067
|
+
const { apiClient } = require_state.useApiConfig();
|
|
12888
13068
|
const [modalOpen, setModalOpen] = (0, react.useState)(false);
|
|
12889
13069
|
const [overwriteOpen, setOverwriteOpen] = (0, react.useState)(false);
|
|
12890
13070
|
const isStateless = !fileName && !cloudMode && !isDemoSite;
|
|
@@ -12911,11 +13091,11 @@ const Filename = () => {
|
|
|
12911
13091
|
if (method === "save") await require_state.saveAs({
|
|
12912
13092
|
filename: newFileName,
|
|
12913
13093
|
overwrite: overwrite ?? bypassOverwrite
|
|
12914
|
-
});
|
|
13094
|
+
}, apiClient);
|
|
12915
13095
|
else await require_state.rename({
|
|
12916
13096
|
filename: newFileName,
|
|
12917
13097
|
overwrite: overwrite ?? bypassOverwrite
|
|
12918
|
-
});
|
|
13098
|
+
}, apiClient);
|
|
12919
13099
|
toastSuccess(method === "save" ? "Save file successfully" : "Rename file successfully");
|
|
12920
13100
|
await queryClient.invalidateQueries({ queryKey: require_state.cacheKeys.lineage() });
|
|
12921
13101
|
if (bypass) localStorage.setItem(require_version.localStorageKeys.bypassSaveOverwrite, "true");
|
|
@@ -13139,9 +13319,10 @@ const Filename = () => {
|
|
|
13139
13319
|
//#region recce-source/js/src/components/app/StateExporter.tsx
|
|
13140
13320
|
function StateExporter() {
|
|
13141
13321
|
const { featureToggles } = require_state.useRecceInstanceContext();
|
|
13322
|
+
const { apiClient } = require_state.useApiConfig();
|
|
13142
13323
|
const handleExport = async () => {
|
|
13143
13324
|
try {
|
|
13144
|
-
const jsonData = await require_state.exportState();
|
|
13325
|
+
const jsonData = await require_state.exportState(apiClient);
|
|
13145
13326
|
const jsonString = JSON.stringify(jsonData, null, 2);
|
|
13146
13327
|
(0, file_saver.default)(new Blob([jsonString], { type: "application/json" }), `recce-state-${(0, date_fns.format)(/* @__PURE__ */ new Date(), "yyyy-MM-dd-HH-mm-ss")}.json`);
|
|
13147
13328
|
} catch (error) {
|
|
@@ -13308,6 +13489,7 @@ function StateSpinner() {
|
|
|
13308
13489
|
function StateSynchronizer() {
|
|
13309
13490
|
const [isSyncing, setSyncing] = (0, react.useState)(false);
|
|
13310
13491
|
const queryClient = (0, _tanstack_react_query.useQueryClient)();
|
|
13492
|
+
const { apiClient } = require_state.useApiConfig();
|
|
13311
13493
|
const [location, setLocation] = require_state.useAppLocation();
|
|
13312
13494
|
const [open, setOpen] = (0, react.useState)(false);
|
|
13313
13495
|
const [syncOption, setSyncOption] = (0, react.useState)("");
|
|
@@ -13316,12 +13498,12 @@ function StateSynchronizer() {
|
|
|
13316
13498
|
const handleSync = (0, react.useCallback)(async (input) => {
|
|
13317
13499
|
setOpen(false);
|
|
13318
13500
|
setSyncing(true);
|
|
13319
|
-
if ((await require_state.syncState(input)).status === "conflict") {
|
|
13501
|
+
if ((await require_state.syncState(input, apiClient)).status === "conflict") {
|
|
13320
13502
|
setOpen(true);
|
|
13321
13503
|
setSyncing(false);
|
|
13322
13504
|
return;
|
|
13323
13505
|
}
|
|
13324
|
-
while (await require_state.isStateSyncing()) await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
13506
|
+
while (await require_state.isStateSyncing(apiClient)) await new Promise((resolve) => setTimeout(resolve, 1e3));
|
|
13325
13507
|
require_state.toaster.create({
|
|
13326
13508
|
description: "Sync Completed",
|
|
13327
13509
|
type: "success",
|
|
@@ -13337,7 +13519,8 @@ function StateSynchronizer() {
|
|
|
13337
13519
|
}, [
|
|
13338
13520
|
queryClient,
|
|
13339
13521
|
location,
|
|
13340
|
-
setLocation
|
|
13522
|
+
setLocation,
|
|
13523
|
+
apiClient
|
|
13341
13524
|
]);
|
|
13342
13525
|
if (isSyncing) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StateSpinner, {});
|
|
13343
13526
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
@@ -13622,142 +13805,6 @@ function NavBar() {
|
|
|
13622
13805
|
});
|
|
13623
13806
|
}
|
|
13624
13807
|
|
|
13625
|
-
//#endregion
|
|
13626
|
-
//#region recce-source/js/app/(mainComponents)/DisplayModeToggle.tsx
|
|
13627
|
-
/**
|
|
13628
|
-
* Display Mode Toggle - switches between light and dark themes
|
|
13629
|
-
*
|
|
13630
|
-
* Uses next-themes to persist the user's preference.
|
|
13631
|
-
* Default is light theme, with future support for system preference.
|
|
13632
|
-
*/
|
|
13633
|
-
function DisplayModeToggle() {
|
|
13634
|
-
const { setTheme, resolvedTheme } = (0, next_themes.useTheme)();
|
|
13635
|
-
const [mounted, setMounted] = (0, react.useState)(false);
|
|
13636
|
-
(0, react.useEffect)(() => {
|
|
13637
|
-
setMounted(true);
|
|
13638
|
-
}, []);
|
|
13639
|
-
const toggleTheme = () => {
|
|
13640
|
-
setTheme(resolvedTheme === "dark" ? "light" : "dark");
|
|
13641
|
-
};
|
|
13642
|
-
if (!mounted) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
13643
|
-
size: "small",
|
|
13644
|
-
sx: {
|
|
13645
|
-
color: "rgba(255, 255, 255, 0.8)",
|
|
13646
|
-
"&:hover": { bgcolor: "rgba(255, 255, 255, 0.1)" }
|
|
13647
|
-
},
|
|
13648
|
-
disabled: true,
|
|
13649
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiSun, { style: {
|
|
13650
|
-
width: 18,
|
|
13651
|
-
height: 18
|
|
13652
|
-
} })
|
|
13653
|
-
});
|
|
13654
|
-
const isDark = resolvedTheme === "dark";
|
|
13655
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Tooltip.default, {
|
|
13656
|
-
title: isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
13657
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_IconButton.default, {
|
|
13658
|
-
size: "small",
|
|
13659
|
-
onClick: toggleTheme,
|
|
13660
|
-
sx: {
|
|
13661
|
-
color: "rgba(255, 255, 255, 0.8)",
|
|
13662
|
-
"&:hover": { bgcolor: "rgba(255, 255, 255, 0.1)" }
|
|
13663
|
-
},
|
|
13664
|
-
"aria-label": isDark ? "Switch to light mode" : "Switch to dark mode",
|
|
13665
|
-
children: isDark ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiSun, { style: {
|
|
13666
|
-
width: 18,
|
|
13667
|
-
height: 18
|
|
13668
|
-
} }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_icons_pi.PiMoon, { style: {
|
|
13669
|
-
width: 18,
|
|
13670
|
-
height: 18
|
|
13671
|
-
} })
|
|
13672
|
-
})
|
|
13673
|
-
});
|
|
13674
|
-
}
|
|
13675
|
-
|
|
13676
|
-
//#endregion
|
|
13677
|
-
//#region recce-source/js/app/(mainComponents)/RecceVersionBadge.tsx
|
|
13678
|
-
function RecceVersionBadge() {
|
|
13679
|
-
const { version, latestVersion } = require_version.useVersionNumber();
|
|
13680
|
-
const versionFormatRegex = (0, react.useMemo)(() => /* @__PURE__ */ new RegExp("^\\d+\\.\\d+\\.\\d+$"), []);
|
|
13681
|
-
(0, react.useEffect)(() => {
|
|
13682
|
-
if (versionFormatRegex.test(version) && version !== latestVersion) {
|
|
13683
|
-
const storageKey = "recce-update-toast-shown";
|
|
13684
|
-
if (sessionStorage.getItem(storageKey)) return;
|
|
13685
|
-
setTimeout(() => {
|
|
13686
|
-
require_state.toaster.create({
|
|
13687
|
-
id: "recce-update-available",
|
|
13688
|
-
title: "Update available",
|
|
13689
|
-
description: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
|
|
13690
|
-
"A new version of Recce (v",
|
|
13691
|
-
latestVersion,
|
|
13692
|
-
") is available.",
|
|
13693
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
|
|
13694
|
-
"Please run",
|
|
13695
|
-
" ",
|
|
13696
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Box.default, {
|
|
13697
|
-
component: "code",
|
|
13698
|
-
sx: {
|
|
13699
|
-
bgcolor: "grey.200",
|
|
13700
|
-
px: .5,
|
|
13701
|
-
py: .25,
|
|
13702
|
-
borderRadius: .5,
|
|
13703
|
-
fontFamily: "monospace",
|
|
13704
|
-
fontSize: "0.875em"
|
|
13705
|
-
},
|
|
13706
|
-
children: "pip install --upgrade recce"
|
|
13707
|
-
}),
|
|
13708
|
-
" ",
|
|
13709
|
-
"to update Recce.",
|
|
13710
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("br", {}),
|
|
13711
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Link.default, {
|
|
13712
|
-
sx: {
|
|
13713
|
-
color: "primary.main",
|
|
13714
|
-
fontWeight: "bold",
|
|
13715
|
-
"&:hover": { textDecoration: "underline" }
|
|
13716
|
-
},
|
|
13717
|
-
href: `https://github.com/DataRecce/recce/releases/tag/v${latestVersion}`,
|
|
13718
|
-
target: "_blank",
|
|
13719
|
-
children: "Click here to view the detail of latest release"
|
|
13720
|
-
})
|
|
13721
|
-
] }),
|
|
13722
|
-
duration: 60 * 1e3,
|
|
13723
|
-
closable: true
|
|
13724
|
-
});
|
|
13725
|
-
sessionStorage.setItem(storageKey, "true");
|
|
13726
|
-
}, 0);
|
|
13727
|
-
}
|
|
13728
|
-
}, [
|
|
13729
|
-
version,
|
|
13730
|
-
latestVersion,
|
|
13731
|
-
versionFormatRegex
|
|
13732
|
-
]);
|
|
13733
|
-
if (!versionFormatRegex.test(version)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Typography.default, {
|
|
13734
|
-
component: "span",
|
|
13735
|
-
sx: {
|
|
13736
|
-
fontSize: "sm",
|
|
13737
|
-
color: "rgba(255,255,255,0.8)",
|
|
13738
|
-
textTransform: "uppercase",
|
|
13739
|
-
borderWidth: 1,
|
|
13740
|
-
px: 1,
|
|
13741
|
-
borderRadius: .75
|
|
13742
|
-
},
|
|
13743
|
-
children: version
|
|
13744
|
-
});
|
|
13745
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_mui_material_Link.default, {
|
|
13746
|
-
href: `https://github.com/DataRecce/recce/releases/tag/v${version}`,
|
|
13747
|
-
sx: {
|
|
13748
|
-
"&:hover": { textDecoration: "none" },
|
|
13749
|
-
fontSize: "sm",
|
|
13750
|
-
color: "rgba(255,255,255,0.8)",
|
|
13751
|
-
textTransform: "uppercase",
|
|
13752
|
-
borderWidth: 1,
|
|
13753
|
-
px: 1,
|
|
13754
|
-
borderRadius: .75
|
|
13755
|
-
},
|
|
13756
|
-
target: "_blank",
|
|
13757
|
-
children: version
|
|
13758
|
-
});
|
|
13759
|
-
}
|
|
13760
|
-
|
|
13761
13808
|
//#endregion
|
|
13762
13809
|
Object.defineProperty(exports, 'ChangeSummary', {
|
|
13763
13810
|
enumerable: true,
|
|
@@ -14035,4 +14082,4 @@ Object.defineProperty(exports, 'mui_provider_default', {
|
|
|
14035
14082
|
return mui_provider_default;
|
|
14036
14083
|
}
|
|
14037
14084
|
});
|
|
14038
|
-
//# sourceMappingURL=components-
|
|
14085
|
+
//# sourceMappingURL=components-Chaffojm.js.map
|