@datarecce/ui 0.1.31 → 0.1.32
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/{state-lPCQsWy5.js → RecceCheckContext-BOGmP80K.js} +4367 -5089
- package/dist/RecceCheckContext-BOGmP80K.js.map +1 -0
- package/dist/{state-B9yzhuKs.mjs → RecceCheckContext-CwUCo6AW.mjs} +4273 -4541
- package/dist/RecceCheckContext-CwUCo6AW.mjs.map +1 -0
- package/dist/{state-DOUPNifc.css → RecceCheckContext-DPnWB_aU.css} +57 -57
- package/dist/RecceCheckContext-DPnWB_aU.css.map +1 -0
- package/dist/{state-IA7HWYOs.css → RecceCheckContext-DyxOeUsX.css} +57 -57
- package/dist/RecceCheckContext-DyxOeUsX.css.map +1 -0
- package/dist/api.d.mts +1 -1
- package/dist/api.js +65 -26
- package/dist/api.js.map +1 -0
- package/dist/api.mjs +44 -5
- package/dist/api.mjs.map +1 -0
- package/dist/{components-DCOI1YlQ.mjs → components-DQUwJlNQ.mjs} +20 -21
- package/dist/{components-DCOI1YlQ.mjs.map → components-DQUwJlNQ.mjs.map} +1 -1
- package/dist/{components-B-YxuuPz.js → components-uVp0e4cH.js} +231 -241
- package/dist/{components-B-YxuuPz.js.map → components-uVp0e4cH.js.map} +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.js +38 -38
- package/dist/components.mjs +5 -5
- package/dist/{urls-B1Ymdoz-.mjs → const-CaIm1Z8g.mjs} +2 -6
- package/dist/const-CaIm1Z8g.mjs.map +1 -0
- package/dist/{urls-C4eAc82S.js → const-CvdZO0FN.js} +1 -11
- package/dist/const-CvdZO0FN.js.map +1 -0
- package/dist/global-styles.css +84 -0
- package/dist/global-styles.css.map +1 -0
- package/dist/global-styles.js +1 -0
- package/dist/global-styles.mjs +1 -0
- package/dist/{hooks-DjBNmTdh.mjs → hooks-C6Kma5ld.mjs} +2 -3
- package/dist/{hooks-DjBNmTdh.mjs.map → hooks-C6Kma5ld.mjs.map} +1 -1
- package/dist/hooks-CfZ4UBBF.js +40 -0
- package/dist/{hooks-B9hsc1oD.js.map → hooks-CfZ4UBBF.js.map} +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.js +26 -26
- package/dist/hooks.mjs +4 -4
- package/dist/{html2canvas-pro.esm-WJxOmKlq.js → html2canvas-pro.esm-CsuSOHXp.js} +1 -1
- package/dist/{html2canvas-pro.esm-WJxOmKlq.js.map → html2canvas-pro.esm-CsuSOHXp.js.map} +1 -1
- package/dist/{html2canvas-pro.esm-BInzOtWO.mjs → html2canvas-pro.esm-E7kpobrC.mjs} +1 -1
- package/dist/{html2canvas-pro.esm-BInzOtWO.mjs.map → html2canvas-pro.esm-E7kpobrC.mjs.map} +1 -1
- package/dist/{index-IIXVIoOL.d.mts → index-DsCU2oGL.d.mts} +7 -7
- package/dist/{index-IIXVIoOL.d.mts.map → index-DsCU2oGL.d.mts.map} +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.js +85 -84
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -8
- package/dist/index.mjs.map +1 -1
- package/dist/{mui-theme-B2wm_cvZ.js → mui-theme-iBHkjXJq.js} +2 -2
- package/dist/{mui-theme-B2wm_cvZ.js.map → mui-theme-iBHkjXJq.js.map} +1 -1
- package/dist/state-CTITyT0R.js +795 -0
- package/dist/state-CTITyT0R.js.map +1 -0
- package/dist/state-Sc2b4jri.mjs +382 -0
- package/dist/state-Sc2b4jri.mjs.map +1 -0
- package/dist/styles.css +4 -3
- package/dist/theme.d.mts +1 -1
- package/dist/theme.js +1 -1
- package/dist/{tooltipMessage-DosF13kZ.js → tooltipMessage-BC5W7H3X.js} +1 -1
- package/dist/{tooltipMessage-DosF13kZ.js.map → tooltipMessage-BC5W7H3X.js.map} +1 -1
- package/dist/{tooltipMessage-B--I3p1V.mjs → tooltipMessage-B_xMIKWL.mjs} +1 -1
- package/dist/{tooltipMessage-B--I3p1V.mjs.map → tooltipMessage-B_xMIKWL.mjs.map} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.js +5 -4
- package/dist/types.mjs +3 -2
- package/dist/urls-BQW5wjg-.js +13 -0
- package/dist/urls-BQW5wjg-.js.map +1 -0
- package/dist/urls-DT7FVEcS.mjs +7 -0
- package/dist/urls-DT7FVEcS.mjs.map +1 -0
- package/dist/version-B9s8yne-.js +300 -0
- package/dist/version-B9s8yne-.js.map +1 -0
- package/dist/version-DP1kU_7v.mjs +162 -0
- package/dist/version-DP1kU_7v.mjs.map +1 -0
- package/package.json +2 -2
- package/src/global-styles.css +81 -0
- package/src/theme/index.ts +1 -1
- package/dist/RecceCheckContext-DPpu9nG5.js +0 -303
- package/dist/RecceCheckContext-DPpu9nG5.js.map +0 -1
- package/dist/RecceCheckContext-bXdfQLGG.mjs +0 -229
- package/dist/RecceCheckContext-bXdfQLGG.mjs.map +0 -1
- package/dist/hooks-B9hsc1oD.js +0 -40
- package/dist/state-B9yzhuKs.mjs.map +0 -1
- package/dist/state-DOUPNifc.css.map +0 -1
- package/dist/state-IA7HWYOs.css.map +0 -1
- package/dist/state-lPCQsWy5.js.map +0 -1
- package/dist/urls-B1Ymdoz-.mjs.map +0 -1
- package/dist/urls-C4eAc82S.js.map +0 -1
- package/dist/version-Dh8sZhvs.js +0 -147
- package/dist/version-Dh8sZhvs.js.map +0 -1
- package/dist/version-OnOKzBeQ.mjs +0 -93
- package/dist/version-OnOKzBeQ.mjs.map +0 -1
|
@@ -0,0 +1,795 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
//#region rolldown:runtime
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
13
|
+
key = keys[i];
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except) {
|
|
15
|
+
__defProp(to, key, {
|
|
16
|
+
get: ((k) => from[k]).bind(null, key),
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
24
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
25
|
+
value: mod,
|
|
26
|
+
enumerable: true
|
|
27
|
+
}) : target, mod));
|
|
28
|
+
|
|
29
|
+
//#endregion
|
|
30
|
+
const require_const = require('./const-CvdZO0FN.js');
|
|
31
|
+
let react = require("react");
|
|
32
|
+
react = __toESM(react);
|
|
33
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
34
|
+
let _tanstack_react_query = require("@tanstack/react-query");
|
|
35
|
+
let axios = require("axios");
|
|
36
|
+
axios = __toESM(axios);
|
|
37
|
+
let _amplitude_unified = require("@amplitude/unified");
|
|
38
|
+
|
|
39
|
+
//#region recce-source/js/src/lib/api/axiosClient.ts
|
|
40
|
+
const axiosClient = axios.default.create({ baseURL: require_const.PUBLIC_API_URL });
|
|
41
|
+
const reactQueryClient = new _tanstack_react_query.QueryClient();
|
|
42
|
+
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region recce-source/js/src/lib/api/track.ts
|
|
45
|
+
function track(eventInput, eventProperties, eventOptions) {
|
|
46
|
+
if (!amplitudeInitialized) console.log("[Tracking]", eventInput, eventProperties, eventOptions);
|
|
47
|
+
return (0, _amplitude_unified.track)(eventInput, eventProperties, eventOptions);
|
|
48
|
+
}
|
|
49
|
+
let amplitudeInitialized = false;
|
|
50
|
+
function trackMultiNodesAction(props) {
|
|
51
|
+
track("[Web] multi_nodes_action", props);
|
|
52
|
+
}
|
|
53
|
+
function trackHistoryAction(props) {
|
|
54
|
+
track("[Web] history_action", props);
|
|
55
|
+
}
|
|
56
|
+
function trackPreviewChange(props) {
|
|
57
|
+
track("[Experiment] preview_change", props);
|
|
58
|
+
}
|
|
59
|
+
function trackPreviewChangeFeedback(props) {
|
|
60
|
+
track("[Experiment] preview_change", props);
|
|
61
|
+
}
|
|
62
|
+
function trackSingleEnvironment(props) {
|
|
63
|
+
track("[Experiment] single_environment", props);
|
|
64
|
+
}
|
|
65
|
+
function getExperimentTrackingBreakingChangeEnabled() {
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
function trackColumnLevelLineage(props) {
|
|
69
|
+
track("[Web] column_level_lineage", props);
|
|
70
|
+
}
|
|
71
|
+
function trackShareState(props) {
|
|
72
|
+
track("[Web] share_state", props);
|
|
73
|
+
}
|
|
74
|
+
function trackStateAction(props) {
|
|
75
|
+
track("[Web] state_action", props);
|
|
76
|
+
}
|
|
77
|
+
function trackCopyToClipboard(props) {
|
|
78
|
+
track("[Click] copy_to_clipboard", props);
|
|
79
|
+
}
|
|
80
|
+
function trackNavigation(props) {
|
|
81
|
+
track("[Web] navigation_change", props);
|
|
82
|
+
}
|
|
83
|
+
function trackLineageViewRender(props) {
|
|
84
|
+
track("[Web] lineage_view_render", props);
|
|
85
|
+
}
|
|
86
|
+
function trackEnvironmentConfig(props) {
|
|
87
|
+
track("[Web] environment_config", props);
|
|
88
|
+
}
|
|
89
|
+
const EXPLORE_ACTION = {
|
|
90
|
+
ROW_COUNT: "row_count",
|
|
91
|
+
ROW_COUNT_DIFF: "row_count_diff",
|
|
92
|
+
PROFILE: "profile",
|
|
93
|
+
PROFILE_DIFF: "profile_diff",
|
|
94
|
+
VALUE_DIFF: "value_diff",
|
|
95
|
+
SCHEMA_DIFF: "schema_diff",
|
|
96
|
+
LINEAGE_DIFF: "lineage_diff",
|
|
97
|
+
QUERY: "query",
|
|
98
|
+
HISTOGRAM_DIFF: "histogram_diff",
|
|
99
|
+
TOP_K_DIFF: "top_k_diff"
|
|
100
|
+
};
|
|
101
|
+
const EXPLORE_SOURCE = {
|
|
102
|
+
LINEAGE_VIEW_TOP_BAR: "lineage_view_top_bar",
|
|
103
|
+
LINEAGE_VIEW_CONTEXT_MENU: "lineage_view_context_menu",
|
|
104
|
+
NODE_KEBAB_MENU: "node_kebab_menu",
|
|
105
|
+
NODE_SIDEBAR_SINGLE_ENV: "node_sidebar_single_env",
|
|
106
|
+
NODE_SIDEBAR_MULTI_ENV: "node_sidebar_multi_env",
|
|
107
|
+
SCHEMA_ROW_COUNT_BUTTON: "schema_row_count_button",
|
|
108
|
+
SCHEMA_COLUMN_MENU: "schema_column_menu"
|
|
109
|
+
};
|
|
110
|
+
function trackExploreAction(props) {
|
|
111
|
+
track("[Web] explore_action", props);
|
|
112
|
+
}
|
|
113
|
+
const EXPLORE_FORM_EVENT = {
|
|
114
|
+
EXECUTE: "execute",
|
|
115
|
+
CANCEL: "cancel"
|
|
116
|
+
};
|
|
117
|
+
function trackExploreActionForm(props) {
|
|
118
|
+
track("[Web] explore_action_form", props);
|
|
119
|
+
}
|
|
120
|
+
function isExploreAction(type) {
|
|
121
|
+
return Object.values(EXPLORE_ACTION).includes(type);
|
|
122
|
+
}
|
|
123
|
+
const LINEAGE_SELECTION_ACTION = {
|
|
124
|
+
SELECT_PARENT_NODES: "select_parent_nodes",
|
|
125
|
+
SELECT_CHILD_NODES: "select_child_nodes",
|
|
126
|
+
SELECT_ALL_UPSTREAM: "select_all_upstream",
|
|
127
|
+
SELECT_ALL_DOWNSTREAM: "select_all_downstream"
|
|
128
|
+
};
|
|
129
|
+
function trackLineageSelection(props) {
|
|
130
|
+
track("[Web] lineage_selection", props);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region recce-source/js/src/lib/api/types.ts
|
|
135
|
+
function isQueryRun(run) {
|
|
136
|
+
return run.type === "query";
|
|
137
|
+
}
|
|
138
|
+
function isQueryBaseRun(run) {
|
|
139
|
+
return run.type === "query_base";
|
|
140
|
+
}
|
|
141
|
+
function isQueryDiffRun(run) {
|
|
142
|
+
return run.type === "query_diff";
|
|
143
|
+
}
|
|
144
|
+
function isValueDiffRun(run) {
|
|
145
|
+
return run.type === "value_diff";
|
|
146
|
+
}
|
|
147
|
+
function isValueDiffDetailRun(run) {
|
|
148
|
+
return run.type === "value_diff_detail";
|
|
149
|
+
}
|
|
150
|
+
function isProfileRun(run) {
|
|
151
|
+
return run.type === "profile";
|
|
152
|
+
}
|
|
153
|
+
function isProfileDiffRun(run) {
|
|
154
|
+
return run.type === "profile_diff";
|
|
155
|
+
}
|
|
156
|
+
function isRowCountRun(run) {
|
|
157
|
+
return run.type === "row_count";
|
|
158
|
+
}
|
|
159
|
+
function isRowCountDiffRun(run) {
|
|
160
|
+
return run.type === "row_count_diff";
|
|
161
|
+
}
|
|
162
|
+
function isTopKDiffRun(run) {
|
|
163
|
+
return run.type === "top_k_diff";
|
|
164
|
+
}
|
|
165
|
+
function isHistogramDiffRun(run) {
|
|
166
|
+
return run.type === "histogram_diff";
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region recce-source/js/src/lib/hooks/ApiConfigContext.tsx
|
|
171
|
+
const defaultConfig = {
|
|
172
|
+
apiPrefix: "",
|
|
173
|
+
authToken: void 0,
|
|
174
|
+
baseUrl: void 0
|
|
175
|
+
};
|
|
176
|
+
const ApiConfigContext = (0, react.createContext)(null);
|
|
177
|
+
/**
|
|
178
|
+
* Creates an axios instance configured with the given API config.
|
|
179
|
+
*
|
|
180
|
+
* The instance has interceptors that:
|
|
181
|
+
* 1. Replace /api prefix with the configured apiPrefix (if provided)
|
|
182
|
+
* 2. Add Authorization header with Bearer token (if authToken provided)
|
|
183
|
+
*/
|
|
184
|
+
function createApiClient(config) {
|
|
185
|
+
const { apiPrefix, authToken, baseUrl } = config;
|
|
186
|
+
const client = axios.default.create({ baseURL: baseUrl ?? require_const.PUBLIC_API_URL });
|
|
187
|
+
client.interceptors.request.use((requestConfig) => {
|
|
188
|
+
try {
|
|
189
|
+
if (apiPrefix && requestConfig.url) {
|
|
190
|
+
if (requestConfig.url === "/api") requestConfig.url = apiPrefix;
|
|
191
|
+
else if (requestConfig.url.startsWith("/api/")) requestConfig.url = apiPrefix + requestConfig.url.slice(4);
|
|
192
|
+
}
|
|
193
|
+
if (authToken) requestConfig.headers.Authorization = `Bearer ${authToken}`;
|
|
194
|
+
return requestConfig;
|
|
195
|
+
} catch (error) {
|
|
196
|
+
console.warn("API request interceptor error, proceeding with unmodified request:", error);
|
|
197
|
+
return requestConfig;
|
|
198
|
+
}
|
|
199
|
+
}, (error) => {
|
|
200
|
+
return Promise.reject(error);
|
|
201
|
+
});
|
|
202
|
+
return client;
|
|
203
|
+
}
|
|
204
|
+
function ApiConfigProvider({ children, apiPrefix = defaultConfig.apiPrefix, authToken = defaultConfig.authToken, baseUrl = defaultConfig.baseUrl }) {
|
|
205
|
+
const config = (0, react.useMemo)(() => ({
|
|
206
|
+
apiPrefix,
|
|
207
|
+
authToken,
|
|
208
|
+
baseUrl
|
|
209
|
+
}), [
|
|
210
|
+
apiPrefix,
|
|
211
|
+
authToken,
|
|
212
|
+
baseUrl
|
|
213
|
+
]);
|
|
214
|
+
const apiClient = (0, react.useMemo)(() => createApiClient(config), [config]);
|
|
215
|
+
const contextValue = (0, react.useMemo)(() => ({
|
|
216
|
+
...config,
|
|
217
|
+
apiClient
|
|
218
|
+
}), [config, apiClient]);
|
|
219
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ApiConfigContext.Provider, {
|
|
220
|
+
value: contextValue,
|
|
221
|
+
children
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
const defaultApiConfigContext = {
|
|
225
|
+
apiPrefix: "",
|
|
226
|
+
authToken: void 0,
|
|
227
|
+
baseUrl: void 0,
|
|
228
|
+
apiClient: axios.default.create({ baseURL: require_const.PUBLIC_API_URL })
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* Hook to access the API configuration and configured axios client.
|
|
232
|
+
*
|
|
233
|
+
* When used outside ApiConfigProvider, returns default config with
|
|
234
|
+
* standard axiosClient (for OSS backward compatibility).
|
|
235
|
+
*
|
|
236
|
+
* @returns ApiConfigContextType with apiPrefix, authToken, and apiClient
|
|
237
|
+
*/
|
|
238
|
+
function useApiConfig() {
|
|
239
|
+
return (0, react.useContext)(ApiConfigContext) ?? defaultApiConfigContext;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Hook to get the configured axios client.
|
|
243
|
+
* Convenience wrapper around useApiConfig().apiClient
|
|
244
|
+
*
|
|
245
|
+
* @returns AxiosInstance configured with API prefix and auth token
|
|
246
|
+
*/
|
|
247
|
+
function useApiClient() {
|
|
248
|
+
return useApiConfig().apiClient;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Safe version of useApiConfig that returns null if outside provider.
|
|
252
|
+
* Useful for components that need to detect if ApiConfigProvider is present.
|
|
253
|
+
*/
|
|
254
|
+
function useApiConfigSafe() {
|
|
255
|
+
return (0, react.useContext)(ApiConfigContext);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
//#endregion
|
|
259
|
+
//#region recce-source/js/src/lib/api/cacheKeys.ts
|
|
260
|
+
const cacheKeys = {
|
|
261
|
+
rowCount: (model) => ["row_count", model],
|
|
262
|
+
lineage: () => ["lineage"],
|
|
263
|
+
checks: () => ["checks", "list"],
|
|
264
|
+
check: (checkId) => ["checks", checkId],
|
|
265
|
+
checkEvents: (checkId) => [
|
|
266
|
+
"checks",
|
|
267
|
+
checkId,
|
|
268
|
+
"events"
|
|
269
|
+
],
|
|
270
|
+
runs: () => ["runs"],
|
|
271
|
+
run: (runId) => ["runs", runId],
|
|
272
|
+
runsAggregated: () => ["runs_aggregated"],
|
|
273
|
+
flag: () => ["flag"],
|
|
274
|
+
instanceInfo: () => ["instance_info"],
|
|
275
|
+
user: () => ["user"]
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
//#endregion
|
|
279
|
+
//#region recce-source/js/src/lib/api/flag.ts
|
|
280
|
+
async function getServerFlag(client = axiosClient) {
|
|
281
|
+
return (await client.get("/api/flag")).data;
|
|
282
|
+
}
|
|
283
|
+
async function markOnboardingCompleted(client = axiosClient) {
|
|
284
|
+
try {
|
|
285
|
+
await client.post("/api/onboarding/completed");
|
|
286
|
+
} catch (_error) {}
|
|
287
|
+
}
|
|
288
|
+
async function markRelaunchHintCompleted(client = axiosClient) {
|
|
289
|
+
try {
|
|
290
|
+
await client.post("/api/relaunch-hint/completed");
|
|
291
|
+
} catch (_error) {}
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region recce-source/js/src/lib/api/info.ts
|
|
296
|
+
async function getLineage(base = false) {
|
|
297
|
+
return (await axiosClient.get(`/api/lineage?base=${base}`)).data;
|
|
298
|
+
}
|
|
299
|
+
async function getLineageWithError(base = false) {
|
|
300
|
+
try {
|
|
301
|
+
return { data: await getLineage(base) };
|
|
302
|
+
} catch (err) {
|
|
303
|
+
if (err instanceof axios.AxiosError) {
|
|
304
|
+
const detail = (err.response?.data)?.detail;
|
|
305
|
+
if (detail) return { error: detail };
|
|
306
|
+
else return { error: err.message };
|
|
307
|
+
} else if (err instanceof Error) return { error: err.message };
|
|
308
|
+
else return { error: "An unknown error occurred" };
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
async function getLineageDiff() {
|
|
312
|
+
const [base, current] = await Promise.all([getLineageWithError(true), getLineageWithError(false)]);
|
|
313
|
+
return {
|
|
314
|
+
base: base.data,
|
|
315
|
+
current: current.data,
|
|
316
|
+
base_error: base.error,
|
|
317
|
+
current_error: current.error
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
async function getServerInfo(client = axiosClient) {
|
|
321
|
+
return (await client.get(`/api/info`)).data;
|
|
322
|
+
}
|
|
323
|
+
async function getModelInfo(model) {
|
|
324
|
+
return (await axiosClient.get(`/api/model/${model}`)).data;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region recce-source/js/src/lib/api/runs.ts
|
|
329
|
+
function mutateAddKey(run) {
|
|
330
|
+
if (run.result == null) return run;
|
|
331
|
+
if (isQueryRun(run)) run.result.columns = run.result.columns.map((c) => {
|
|
332
|
+
if (c.key) return c;
|
|
333
|
+
c.key = c.name;
|
|
334
|
+
return c;
|
|
335
|
+
});
|
|
336
|
+
return run;
|
|
337
|
+
}
|
|
338
|
+
async function submitRun(type, params, options, client = axiosClient) {
|
|
339
|
+
const track_props = options?.trackProps ? { ...options.trackProps } : {};
|
|
340
|
+
if (getExperimentTrackingBreakingChangeEnabled()) track_props.breaking_change_analysis = true;
|
|
341
|
+
return (await client.post("/api/runs", {
|
|
342
|
+
type,
|
|
343
|
+
params,
|
|
344
|
+
nowait: options?.nowait,
|
|
345
|
+
track_props
|
|
346
|
+
})).data;
|
|
347
|
+
}
|
|
348
|
+
async function getRun(runId, client = axiosClient) {
|
|
349
|
+
return (await client.get(`/api/runs/${runId}`)).data;
|
|
350
|
+
}
|
|
351
|
+
async function waitRun(runId, timeout, client = axiosClient) {
|
|
352
|
+
return mutateAddKey((await client.get(`/api/runs/${runId}/wait`, { params: { timeout } })).data);
|
|
353
|
+
}
|
|
354
|
+
async function cancelRun(runId, client = axiosClient) {
|
|
355
|
+
return await client.post(`/api/runs/${runId}/cancel`);
|
|
356
|
+
}
|
|
357
|
+
async function submitRunFromCheck(checkId, options, client = axiosClient) {
|
|
358
|
+
return (await client.post(`/api/checks/${checkId}/run`, { nowait: options?.nowait })).data;
|
|
359
|
+
}
|
|
360
|
+
async function searchRuns(type, params, limit, client = axiosClient) {
|
|
361
|
+
return (await client.post(`/api/runs/search`, {
|
|
362
|
+
type,
|
|
363
|
+
params,
|
|
364
|
+
limit
|
|
365
|
+
})).data;
|
|
366
|
+
}
|
|
367
|
+
async function listRuns(client = axiosClient) {
|
|
368
|
+
return (await client.get("/api/runs")).data;
|
|
369
|
+
}
|
|
370
|
+
async function aggregateRuns(client = axiosClient) {
|
|
371
|
+
return (await client.post(`/api/runs/aggregate`, {})).data;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
//#endregion
|
|
375
|
+
//#region recce-source/js/src/lib/api/state.ts
|
|
376
|
+
async function saveAs(input, client = axiosClient) {
|
|
377
|
+
return (await client.post("/api/save-as", input)).data;
|
|
378
|
+
}
|
|
379
|
+
async function rename(input, client = axiosClient) {
|
|
380
|
+
return (await client.post("/api/rename", input)).data;
|
|
381
|
+
}
|
|
382
|
+
async function exportState(client = axiosClient) {
|
|
383
|
+
return (await client.post("/api/export")).data;
|
|
384
|
+
}
|
|
385
|
+
async function importState(file, checksOnly, client = axiosClient) {
|
|
386
|
+
const formData = new FormData();
|
|
387
|
+
formData.append("file", file);
|
|
388
|
+
formData.append("checks_only", (!!checksOnly).toString());
|
|
389
|
+
return (await client.post("/api/import", formData)).data;
|
|
390
|
+
}
|
|
391
|
+
async function isStateSyncing(client = axiosClient) {
|
|
392
|
+
return (await client.get("/api/sync")).status === 208;
|
|
393
|
+
}
|
|
394
|
+
async function syncState(input, client = axiosClient) {
|
|
395
|
+
try {
|
|
396
|
+
const response = await client.post("/api/sync", input);
|
|
397
|
+
if (response.status === 202) return { status: "accepted" };
|
|
398
|
+
if (response.status === 208) return { status: "syncing" };
|
|
399
|
+
} catch (error) {
|
|
400
|
+
if ((0, axios.isAxiosError)(error)) {
|
|
401
|
+
if (error.response?.status === 409) return { status: "conflict" };
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
throw new Error("Failed to sync state");
|
|
405
|
+
}
|
|
406
|
+
async function shareState(client = axiosClient) {
|
|
407
|
+
return (await client.post("/api/share")).data;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
//#endregion
|
|
411
|
+
Object.defineProperty(exports, 'ApiConfigProvider', {
|
|
412
|
+
enumerable: true,
|
|
413
|
+
get: function () {
|
|
414
|
+
return ApiConfigProvider;
|
|
415
|
+
}
|
|
416
|
+
});
|
|
417
|
+
Object.defineProperty(exports, 'EXPLORE_ACTION', {
|
|
418
|
+
enumerable: true,
|
|
419
|
+
get: function () {
|
|
420
|
+
return EXPLORE_ACTION;
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
Object.defineProperty(exports, 'EXPLORE_FORM_EVENT', {
|
|
424
|
+
enumerable: true,
|
|
425
|
+
get: function () {
|
|
426
|
+
return EXPLORE_FORM_EVENT;
|
|
427
|
+
}
|
|
428
|
+
});
|
|
429
|
+
Object.defineProperty(exports, 'EXPLORE_SOURCE', {
|
|
430
|
+
enumerable: true,
|
|
431
|
+
get: function () {
|
|
432
|
+
return EXPLORE_SOURCE;
|
|
433
|
+
}
|
|
434
|
+
});
|
|
435
|
+
Object.defineProperty(exports, 'LINEAGE_SELECTION_ACTION', {
|
|
436
|
+
enumerable: true,
|
|
437
|
+
get: function () {
|
|
438
|
+
return LINEAGE_SELECTION_ACTION;
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
Object.defineProperty(exports, '__commonJSMin', {
|
|
442
|
+
enumerable: true,
|
|
443
|
+
get: function () {
|
|
444
|
+
return __commonJSMin;
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
Object.defineProperty(exports, '__toESM', {
|
|
448
|
+
enumerable: true,
|
|
449
|
+
get: function () {
|
|
450
|
+
return __toESM;
|
|
451
|
+
}
|
|
452
|
+
});
|
|
453
|
+
Object.defineProperty(exports, 'aggregateRuns', {
|
|
454
|
+
enumerable: true,
|
|
455
|
+
get: function () {
|
|
456
|
+
return aggregateRuns;
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
Object.defineProperty(exports, 'axiosClient', {
|
|
460
|
+
enumerable: true,
|
|
461
|
+
get: function () {
|
|
462
|
+
return axiosClient;
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
Object.defineProperty(exports, 'cacheKeys', {
|
|
466
|
+
enumerable: true,
|
|
467
|
+
get: function () {
|
|
468
|
+
return cacheKeys;
|
|
469
|
+
}
|
|
470
|
+
});
|
|
471
|
+
Object.defineProperty(exports, 'cancelRun', {
|
|
472
|
+
enumerable: true,
|
|
473
|
+
get: function () {
|
|
474
|
+
return cancelRun;
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
Object.defineProperty(exports, 'exportState', {
|
|
478
|
+
enumerable: true,
|
|
479
|
+
get: function () {
|
|
480
|
+
return exportState;
|
|
481
|
+
}
|
|
482
|
+
});
|
|
483
|
+
Object.defineProperty(exports, 'getExperimentTrackingBreakingChangeEnabled', {
|
|
484
|
+
enumerable: true,
|
|
485
|
+
get: function () {
|
|
486
|
+
return getExperimentTrackingBreakingChangeEnabled;
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
Object.defineProperty(exports, 'getLineage', {
|
|
490
|
+
enumerable: true,
|
|
491
|
+
get: function () {
|
|
492
|
+
return getLineage;
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
Object.defineProperty(exports, 'getLineageDiff', {
|
|
496
|
+
enumerable: true,
|
|
497
|
+
get: function () {
|
|
498
|
+
return getLineageDiff;
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
Object.defineProperty(exports, 'getLineageWithError', {
|
|
502
|
+
enumerable: true,
|
|
503
|
+
get: function () {
|
|
504
|
+
return getLineageWithError;
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
Object.defineProperty(exports, 'getModelInfo', {
|
|
508
|
+
enumerable: true,
|
|
509
|
+
get: function () {
|
|
510
|
+
return getModelInfo;
|
|
511
|
+
}
|
|
512
|
+
});
|
|
513
|
+
Object.defineProperty(exports, 'getRun', {
|
|
514
|
+
enumerable: true,
|
|
515
|
+
get: function () {
|
|
516
|
+
return getRun;
|
|
517
|
+
}
|
|
518
|
+
});
|
|
519
|
+
Object.defineProperty(exports, 'getServerFlag', {
|
|
520
|
+
enumerable: true,
|
|
521
|
+
get: function () {
|
|
522
|
+
return getServerFlag;
|
|
523
|
+
}
|
|
524
|
+
});
|
|
525
|
+
Object.defineProperty(exports, 'getServerInfo', {
|
|
526
|
+
enumerable: true,
|
|
527
|
+
get: function () {
|
|
528
|
+
return getServerInfo;
|
|
529
|
+
}
|
|
530
|
+
});
|
|
531
|
+
Object.defineProperty(exports, 'importState', {
|
|
532
|
+
enumerable: true,
|
|
533
|
+
get: function () {
|
|
534
|
+
return importState;
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
Object.defineProperty(exports, 'isExploreAction', {
|
|
538
|
+
enumerable: true,
|
|
539
|
+
get: function () {
|
|
540
|
+
return isExploreAction;
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
Object.defineProperty(exports, 'isHistogramDiffRun', {
|
|
544
|
+
enumerable: true,
|
|
545
|
+
get: function () {
|
|
546
|
+
return isHistogramDiffRun;
|
|
547
|
+
}
|
|
548
|
+
});
|
|
549
|
+
Object.defineProperty(exports, 'isProfileDiffRun', {
|
|
550
|
+
enumerable: true,
|
|
551
|
+
get: function () {
|
|
552
|
+
return isProfileDiffRun;
|
|
553
|
+
}
|
|
554
|
+
});
|
|
555
|
+
Object.defineProperty(exports, 'isProfileRun', {
|
|
556
|
+
enumerable: true,
|
|
557
|
+
get: function () {
|
|
558
|
+
return isProfileRun;
|
|
559
|
+
}
|
|
560
|
+
});
|
|
561
|
+
Object.defineProperty(exports, 'isQueryBaseRun', {
|
|
562
|
+
enumerable: true,
|
|
563
|
+
get: function () {
|
|
564
|
+
return isQueryBaseRun;
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
Object.defineProperty(exports, 'isQueryDiffRun', {
|
|
568
|
+
enumerable: true,
|
|
569
|
+
get: function () {
|
|
570
|
+
return isQueryDiffRun;
|
|
571
|
+
}
|
|
572
|
+
});
|
|
573
|
+
Object.defineProperty(exports, 'isQueryRun', {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: function () {
|
|
576
|
+
return isQueryRun;
|
|
577
|
+
}
|
|
578
|
+
});
|
|
579
|
+
Object.defineProperty(exports, 'isRowCountDiffRun', {
|
|
580
|
+
enumerable: true,
|
|
581
|
+
get: function () {
|
|
582
|
+
return isRowCountDiffRun;
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
Object.defineProperty(exports, 'isRowCountRun', {
|
|
586
|
+
enumerable: true,
|
|
587
|
+
get: function () {
|
|
588
|
+
return isRowCountRun;
|
|
589
|
+
}
|
|
590
|
+
});
|
|
591
|
+
Object.defineProperty(exports, 'isStateSyncing', {
|
|
592
|
+
enumerable: true,
|
|
593
|
+
get: function () {
|
|
594
|
+
return isStateSyncing;
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
Object.defineProperty(exports, 'isTopKDiffRun', {
|
|
598
|
+
enumerable: true,
|
|
599
|
+
get: function () {
|
|
600
|
+
return isTopKDiffRun;
|
|
601
|
+
}
|
|
602
|
+
});
|
|
603
|
+
Object.defineProperty(exports, 'isValueDiffDetailRun', {
|
|
604
|
+
enumerable: true,
|
|
605
|
+
get: function () {
|
|
606
|
+
return isValueDiffDetailRun;
|
|
607
|
+
}
|
|
608
|
+
});
|
|
609
|
+
Object.defineProperty(exports, 'isValueDiffRun', {
|
|
610
|
+
enumerable: true,
|
|
611
|
+
get: function () {
|
|
612
|
+
return isValueDiffRun;
|
|
613
|
+
}
|
|
614
|
+
});
|
|
615
|
+
Object.defineProperty(exports, 'listRuns', {
|
|
616
|
+
enumerable: true,
|
|
617
|
+
get: function () {
|
|
618
|
+
return listRuns;
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
Object.defineProperty(exports, 'markOnboardingCompleted', {
|
|
622
|
+
enumerable: true,
|
|
623
|
+
get: function () {
|
|
624
|
+
return markOnboardingCompleted;
|
|
625
|
+
}
|
|
626
|
+
});
|
|
627
|
+
Object.defineProperty(exports, 'markRelaunchHintCompleted', {
|
|
628
|
+
enumerable: true,
|
|
629
|
+
get: function () {
|
|
630
|
+
return markRelaunchHintCompleted;
|
|
631
|
+
}
|
|
632
|
+
});
|
|
633
|
+
Object.defineProperty(exports, 'reactQueryClient', {
|
|
634
|
+
enumerable: true,
|
|
635
|
+
get: function () {
|
|
636
|
+
return reactQueryClient;
|
|
637
|
+
}
|
|
638
|
+
});
|
|
639
|
+
Object.defineProperty(exports, 'rename', {
|
|
640
|
+
enumerable: true,
|
|
641
|
+
get: function () {
|
|
642
|
+
return rename;
|
|
643
|
+
}
|
|
644
|
+
});
|
|
645
|
+
Object.defineProperty(exports, 'saveAs', {
|
|
646
|
+
enumerable: true,
|
|
647
|
+
get: function () {
|
|
648
|
+
return saveAs;
|
|
649
|
+
}
|
|
650
|
+
});
|
|
651
|
+
Object.defineProperty(exports, 'searchRuns', {
|
|
652
|
+
enumerable: true,
|
|
653
|
+
get: function () {
|
|
654
|
+
return searchRuns;
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
Object.defineProperty(exports, 'shareState', {
|
|
658
|
+
enumerable: true,
|
|
659
|
+
get: function () {
|
|
660
|
+
return shareState;
|
|
661
|
+
}
|
|
662
|
+
});
|
|
663
|
+
Object.defineProperty(exports, 'submitRun', {
|
|
664
|
+
enumerable: true,
|
|
665
|
+
get: function () {
|
|
666
|
+
return submitRun;
|
|
667
|
+
}
|
|
668
|
+
});
|
|
669
|
+
Object.defineProperty(exports, 'submitRunFromCheck', {
|
|
670
|
+
enumerable: true,
|
|
671
|
+
get: function () {
|
|
672
|
+
return submitRunFromCheck;
|
|
673
|
+
}
|
|
674
|
+
});
|
|
675
|
+
Object.defineProperty(exports, 'syncState', {
|
|
676
|
+
enumerable: true,
|
|
677
|
+
get: function () {
|
|
678
|
+
return syncState;
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
Object.defineProperty(exports, 'trackColumnLevelLineage', {
|
|
682
|
+
enumerable: true,
|
|
683
|
+
get: function () {
|
|
684
|
+
return trackColumnLevelLineage;
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
Object.defineProperty(exports, 'trackCopyToClipboard', {
|
|
688
|
+
enumerable: true,
|
|
689
|
+
get: function () {
|
|
690
|
+
return trackCopyToClipboard;
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
Object.defineProperty(exports, 'trackEnvironmentConfig', {
|
|
694
|
+
enumerable: true,
|
|
695
|
+
get: function () {
|
|
696
|
+
return trackEnvironmentConfig;
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
Object.defineProperty(exports, 'trackExploreAction', {
|
|
700
|
+
enumerable: true,
|
|
701
|
+
get: function () {
|
|
702
|
+
return trackExploreAction;
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
Object.defineProperty(exports, 'trackExploreActionForm', {
|
|
706
|
+
enumerable: true,
|
|
707
|
+
get: function () {
|
|
708
|
+
return trackExploreActionForm;
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
Object.defineProperty(exports, 'trackHistoryAction', {
|
|
712
|
+
enumerable: true,
|
|
713
|
+
get: function () {
|
|
714
|
+
return trackHistoryAction;
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
Object.defineProperty(exports, 'trackLineageSelection', {
|
|
718
|
+
enumerable: true,
|
|
719
|
+
get: function () {
|
|
720
|
+
return trackLineageSelection;
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
Object.defineProperty(exports, 'trackLineageViewRender', {
|
|
724
|
+
enumerable: true,
|
|
725
|
+
get: function () {
|
|
726
|
+
return trackLineageViewRender;
|
|
727
|
+
}
|
|
728
|
+
});
|
|
729
|
+
Object.defineProperty(exports, 'trackMultiNodesAction', {
|
|
730
|
+
enumerable: true,
|
|
731
|
+
get: function () {
|
|
732
|
+
return trackMultiNodesAction;
|
|
733
|
+
}
|
|
734
|
+
});
|
|
735
|
+
Object.defineProperty(exports, 'trackNavigation', {
|
|
736
|
+
enumerable: true,
|
|
737
|
+
get: function () {
|
|
738
|
+
return trackNavigation;
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
Object.defineProperty(exports, 'trackPreviewChange', {
|
|
742
|
+
enumerable: true,
|
|
743
|
+
get: function () {
|
|
744
|
+
return trackPreviewChange;
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
Object.defineProperty(exports, 'trackPreviewChangeFeedback', {
|
|
748
|
+
enumerable: true,
|
|
749
|
+
get: function () {
|
|
750
|
+
return trackPreviewChangeFeedback;
|
|
751
|
+
}
|
|
752
|
+
});
|
|
753
|
+
Object.defineProperty(exports, 'trackShareState', {
|
|
754
|
+
enumerable: true,
|
|
755
|
+
get: function () {
|
|
756
|
+
return trackShareState;
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
Object.defineProperty(exports, 'trackSingleEnvironment', {
|
|
760
|
+
enumerable: true,
|
|
761
|
+
get: function () {
|
|
762
|
+
return trackSingleEnvironment;
|
|
763
|
+
}
|
|
764
|
+
});
|
|
765
|
+
Object.defineProperty(exports, 'trackStateAction', {
|
|
766
|
+
enumerable: true,
|
|
767
|
+
get: function () {
|
|
768
|
+
return trackStateAction;
|
|
769
|
+
}
|
|
770
|
+
});
|
|
771
|
+
Object.defineProperty(exports, 'useApiClient', {
|
|
772
|
+
enumerable: true,
|
|
773
|
+
get: function () {
|
|
774
|
+
return useApiClient;
|
|
775
|
+
}
|
|
776
|
+
});
|
|
777
|
+
Object.defineProperty(exports, 'useApiConfig', {
|
|
778
|
+
enumerable: true,
|
|
779
|
+
get: function () {
|
|
780
|
+
return useApiConfig;
|
|
781
|
+
}
|
|
782
|
+
});
|
|
783
|
+
Object.defineProperty(exports, 'useApiConfigSafe', {
|
|
784
|
+
enumerable: true,
|
|
785
|
+
get: function () {
|
|
786
|
+
return useApiConfigSafe;
|
|
787
|
+
}
|
|
788
|
+
});
|
|
789
|
+
Object.defineProperty(exports, 'waitRun', {
|
|
790
|
+
enumerable: true,
|
|
791
|
+
get: function () {
|
|
792
|
+
return waitRun;
|
|
793
|
+
}
|
|
794
|
+
});
|
|
795
|
+
//# sourceMappingURL=state-CTITyT0R.js.map
|