@datarecce/ui 0.1.29 → 0.1.31
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-fAKHgsGz.js → RecceCheckContext-DPpu9nG5.js} +2 -2
- package/dist/{RecceCheckContext-fAKHgsGz.js.map → RecceCheckContext-DPpu9nG5.js.map} +1 -1
- package/dist/{RecceCheckContext-PT4-g1bW.mjs → RecceCheckContext-bXdfQLGG.mjs} +2 -2
- package/dist/{RecceCheckContext-PT4-g1bW.mjs.map → RecceCheckContext-bXdfQLGG.mjs.map} +1 -1
- package/dist/api.d.mts +1 -1
- package/dist/api.d.ts +1 -1
- package/dist/api.js +4 -3
- package/dist/api.mjs +4 -3
- package/dist/{components-B9F5oJbK.js → components-B-YxuuPz.js} +66 -65
- package/dist/{components-B9F5oJbK.js.map → components-B-YxuuPz.js.map} +1 -1
- package/dist/{components-D2DRqJsz.css → components-BeAjVBV3.css} +1 -1
- package/dist/{components-D2DRqJsz.css.map → components-BeAjVBV3.css.map} +1 -1
- package/dist/{components-gDC1ucjo.mjs → components-DCOI1YlQ.mjs} +8 -7
- package/dist/{components-gDC1ucjo.mjs.map → components-DCOI1YlQ.mjs.map} +1 -1
- package/dist/{components-dVXbmdqd.css → components-iUxcqtUB.css} +1 -1
- package/dist/{components-dVXbmdqd.css.map → components-iUxcqtUB.css.map} +1 -1
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +6 -5
- package/dist/components.mjs +6 -5
- package/dist/{hooks-C2jUJ9EN.js → hooks-B9hsc1oD.js} +3 -3
- package/dist/{hooks-C2jUJ9EN.js.map → hooks-B9hsc1oD.js.map} +1 -1
- package/dist/{hooks-4hRUjy9Q.mjs → hooks-DjBNmTdh.mjs} +3 -3
- package/dist/{hooks-4hRUjy9Q.mjs.map → hooks-DjBNmTdh.mjs.map} +1 -1
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +5 -4
- package/dist/hooks.mjs +5 -4
- package/dist/{html2canvas-pro.esm-BR5xeFe-.mjs → html2canvas-pro.esm-BInzOtWO.mjs} +1 -1
- package/dist/{html2canvas-pro.esm-BR5xeFe-.mjs.map → html2canvas-pro.esm-BInzOtWO.mjs.map} +1 -1
- package/dist/{html2canvas-pro.esm-CVOsBdk0.js → html2canvas-pro.esm-WJxOmKlq.js} +1 -1
- package/dist/{html2canvas-pro.esm-CVOsBdk0.js.map → html2canvas-pro.esm-WJxOmKlq.js.map} +1 -1
- package/dist/{index-Bv5R8iLo.d.mts → index-B9lSPJTi.d.ts} +192 -12
- package/dist/index-B9lSPJTi.d.ts.map +1 -0
- package/dist/{index-CUtFlKOo.d.ts → index-IIXVIoOL.d.mts} +262 -78
- package/dist/index-IIXVIoOL.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -8
- package/dist/index.mjs.map +1 -1
- package/dist/mui-theme-B2wm_cvZ.js +732 -0
- package/dist/mui-theme-B2wm_cvZ.js.map +1 -0
- package/dist/mui-theme-CUhybmBq.mjs +696 -0
- package/dist/mui-theme-CUhybmBq.mjs.map +1 -0
- package/dist/{state-CELzQ0tM.mjs → state-B9yzhuKs.mjs} +5 -694
- package/dist/state-B9yzhuKs.mjs.map +1 -0
- package/dist/{state-eEsMhIy4.css → state-DOUPNifc.css} +1 -1
- package/dist/{state-eEsMhIy4.css.map → state-DOUPNifc.css.map} +1 -1
- package/dist/{state-CemiRRon.js → state-lPCQsWy5.js} +24 -737
- package/dist/state-lPCQsWy5.js.map +1 -0
- package/dist/styles.css +4 -0
- package/dist/theme.d.mts +3 -0
- package/dist/theme.d.ts +3 -0
- package/dist/theme.js +9 -0
- package/dist/theme.mjs +4 -0
- package/dist/{tooltipMessage-CrXjOmVM.mjs → tooltipMessage-B--I3p1V.mjs} +1 -1
- package/dist/{tooltipMessage-CrXjOmVM.mjs.map → tooltipMessage-B--I3p1V.mjs.map} +1 -1
- package/dist/{tooltipMessage-Dbi1kkfi.js → tooltipMessage-DosF13kZ.js} +1 -1
- package/dist/{tooltipMessage-Dbi1kkfi.js.map → tooltipMessage-DosF13kZ.js.map} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +2 -2
- package/dist/types.mjs +2 -2
- package/dist/{urls-D7PrPolY.mjs → urls-B1Ymdoz-.mjs} +1 -1
- package/dist/{urls-D7PrPolY.mjs.map → urls-B1Ymdoz-.mjs.map} +1 -1
- package/dist/{urls-SazAekCZ.js → urls-C4eAc82S.js} +1 -1
- package/dist/{urls-SazAekCZ.js.map → urls-C4eAc82S.js.map} +1 -1
- package/dist/{version-bWg7XwOu.js → version-Dh8sZhvs.js} +2 -2
- package/dist/{version-bWg7XwOu.js.map → version-Dh8sZhvs.js.map} +1 -1
- package/dist/{version-paZ9esBk.mjs → version-OnOKzBeQ.mjs} +2 -2
- package/dist/{version-paZ9esBk.mjs.map → version-OnOKzBeQ.mjs.map} +1 -1
- package/package.json +9 -2
- package/recce-source/.editorconfig +26 -0
- package/recce-source/.flake8 +37 -0
- package/recce-source/.github/ISSUE_TEMPLATE/bug_report.yml +67 -0
- package/recce-source/.github/ISSUE_TEMPLATE/custom.md +10 -0
- package/recce-source/.github/ISSUE_TEMPLATE/feature_request.yml +42 -0
- package/recce-source/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- package/recce-source/.github/copilot-instructions.md +331 -0
- package/recce-source/.github/instructions/backend-instructions.md +541 -0
- package/recce-source/.github/instructions/frontend-instructions.md +317 -0
- package/recce-source/.github/workflows/build-statics.yaml +72 -0
- package/recce-source/.github/workflows/bump.yaml +48 -0
- package/recce-source/.github/workflows/integration-tests-cloud.yaml +92 -0
- package/recce-source/.github/workflows/integration-tests-sqlmesh.yaml +33 -0
- package/recce-source/.github/workflows/integration-tests.yaml +52 -0
- package/recce-source/.github/workflows/nightly.yaml +246 -0
- package/recce-source/.github/workflows/release.yaml +196 -0
- package/recce-source/.github/workflows/tests-js.yaml +58 -0
- package/recce-source/.github/workflows/tests-python.yaml +128 -0
- package/recce-source/.pre-commit-config.yaml +26 -0
- package/recce-source/CLAUDE.md +483 -0
- package/recce-source/CODE_OF_CONDUCT.md +128 -0
- package/recce-source/CONTRIBUTING.md +107 -0
- package/recce-source/LICENSE +201 -0
- package/recce-source/Makefile +126 -0
- package/recce-source/README.md +182 -0
- package/recce-source/RECCE_CLOUD.md +81 -0
- package/recce-source/SECURITY.md +25 -0
- package/recce-source/docs/PACKAGING.md +340 -0
- package/recce-source/docs/README.md +1 -0
- package/recce-source/integration_tests/dbt/dbt_project.yml +26 -0
- package/recce-source/integration_tests/dbt/models/customers.sql +69 -0
- package/recce-source/integration_tests/dbt/models/docs.md +14 -0
- package/recce-source/integration_tests/dbt/models/orders.sql +56 -0
- package/recce-source/integration_tests/dbt/models/schema.yml +82 -0
- package/recce-source/integration_tests/dbt/models/staging/schema.yml +31 -0
- package/recce-source/integration_tests/dbt/models/staging/stg_customers.sql +22 -0
- package/recce-source/integration_tests/dbt/models/staging/stg_orders.sql +23 -0
- package/recce-source/integration_tests/dbt/models/staging/stg_payments.sql +25 -0
- package/recce-source/integration_tests/dbt/packages.yml +7 -0
- package/recce-source/integration_tests/dbt/profiles.yml +8 -0
- package/recce-source/integration_tests/dbt/seeds/raw_customers.csv +101 -0
- package/recce-source/integration_tests/dbt/seeds/raw_orders.csv +100 -0
- package/recce-source/integration_tests/dbt/seeds/raw_payments.csv +114 -0
- package/recce-source/integration_tests/dbt/seeds/raw_statuses.csv +5 -0
- package/recce-source/integration_tests/dbt/smoke_test.sh +72 -0
- package/recce-source/integration_tests/dbt/smoke_test_cloud.sh +71 -0
- package/recce-source/integration_tests/sqlmesh/__init__.py +0 -0
- package/recce-source/integration_tests/sqlmesh/audits/assert_item_price_above_zero.sql +9 -0
- package/recce-source/integration_tests/sqlmesh/audits/items.sql +7 -0
- package/recce-source/integration_tests/sqlmesh/audits/order_items.sql +7 -0
- package/recce-source/integration_tests/sqlmesh/config.py +171 -0
- package/recce-source/integration_tests/sqlmesh/helper.py +20 -0
- package/recce-source/integration_tests/sqlmesh/hooks/__init__.py +0 -0
- package/recce-source/integration_tests/sqlmesh/macros/__init__.py +0 -0
- package/recce-source/integration_tests/sqlmesh/macros/macros.py +8 -0
- package/recce-source/integration_tests/sqlmesh/macros/macros.sql +8 -0
- package/recce-source/integration_tests/sqlmesh/macros/utils.py +11 -0
- package/recce-source/integration_tests/sqlmesh/metrics/metrics.sql +25 -0
- package/recce-source/integration_tests/sqlmesh/models/customer_revenue_by_day.sql +41 -0
- package/recce-source/integration_tests/sqlmesh/models/customer_revenue_lifetime.sql +60 -0
- package/recce-source/integration_tests/sqlmesh/models/customers.sql +32 -0
- package/recce-source/integration_tests/sqlmesh/models/items.py +95 -0
- package/recce-source/integration_tests/sqlmesh/models/marketing.sql +15 -0
- package/recce-source/integration_tests/sqlmesh/models/order_items.py +95 -0
- package/recce-source/integration_tests/sqlmesh/models/orders.py +70 -0
- package/recce-source/integration_tests/sqlmesh/models/raw_marketing.py +62 -0
- package/recce-source/integration_tests/sqlmesh/models/top_waiters.sql +23 -0
- package/recce-source/integration_tests/sqlmesh/models/waiter_as_customer_by_day.sql +29 -0
- package/recce-source/integration_tests/sqlmesh/models/waiter_names.sql +10 -0
- package/recce-source/integration_tests/sqlmesh/models/waiter_revenue_by_day.sql +29 -0
- package/recce-source/integration_tests/sqlmesh/models/waiters.py +62 -0
- package/recce-source/integration_tests/sqlmesh/prep_env.sh +16 -0
- package/recce-source/integration_tests/sqlmesh/schema.yaml +5 -0
- package/recce-source/integration_tests/sqlmesh/seeds/waiter_names.csv +11 -0
- package/recce-source/integration_tests/sqlmesh/test_server.sh +29 -0
- package/recce-source/integration_tests/sqlmesh/tests/test_customer_revenue_by_day.yaml +63 -0
- package/recce-source/integration_tests/sqlmesh/tests/test_order_items.yaml +72 -0
- package/recce-source/js/.editorconfig +27 -0
- package/recce-source/js/.env.development +5 -0
- package/recce-source/js/.husky/pre-commit +29 -0
- package/recce-source/js/.nvmrc +1 -0
- package/recce-source/js/README.md +39 -0
- package/recce-source/js/app/(mainComponents)/DisplayModeToggle.tsx +65 -0
- package/recce-source/js/app/(mainComponents)/NavBar.tsx +228 -0
- package/recce-source/js/app/(mainComponents)/RecceVersionBadge.tsx +107 -0
- package/recce-source/js/app/(mainComponents)/TopBar.tsx +252 -0
- package/recce-source/js/app/@lineage/default.tsx +20 -0
- package/recce-source/js/app/@lineage/page.tsx +14 -0
- package/recce-source/js/app/MainLayout.tsx +170 -0
- package/recce-source/js/app/Providers.tsx +49 -0
- package/recce-source/js/app/checks/page.tsx +296 -0
- package/recce-source/js/app/error.tsx +93 -0
- package/recce-source/js/app/favicon.ico +0 -0
- package/recce-source/js/app/global-error.tsx +115 -0
- package/recce-source/js/app/global.css +82 -0
- package/recce-source/js/app/layout.tsx +48 -0
- package/recce-source/js/app/lineage/page.tsx +15 -0
- package/recce-source/js/app/page.tsx +12 -0
- package/recce-source/js/app/query/page.tsx +8 -0
- package/recce-source/js/biome.json +313 -0
- package/recce-source/js/jest.config.js +34 -0
- package/recce-source/js/jest.globals.d.ts +32 -0
- package/recce-source/js/jest.setup.js +91 -0
- package/recce-source/js/next.config.js +16 -0
- package/recce-source/js/package-lock.json +13843 -0
- package/recce-source/js/package.json +123 -0
- package/recce-source/js/pnpm-lock.yaml +9235 -0
- package/recce-source/js/pnpm-workspace.yaml +6 -0
- package/recce-source/js/postcss.config.js +5 -0
- package/recce-source/js/public/auth_callback.html +68 -0
- package/recce-source/js/public/imgs/feedback/thumbs-down.png +0 -0
- package/recce-source/js/public/imgs/feedback/thumbs-up.png +0 -0
- package/recce-source/js/public/imgs/reload-image.svg +4 -0
- package/recce-source/js/public/logo/recce-logo-white.png +0 -0
- package/recce-source/js/src/components/AuthModal/AuthModal.tsx +202 -0
- package/recce-source/js/src/components/app/AvatarDropdown.tsx +159 -0
- package/recce-source/js/src/components/app/EnvInfo.tsx +357 -0
- package/recce-source/js/src/components/app/Filename.tsx +388 -0
- package/recce-source/js/src/components/app/SetupConnectionPopover.tsx +91 -0
- package/recce-source/js/src/components/app/StateExporter.tsx +57 -0
- package/recce-source/js/src/components/app/StateImporter.tsx +198 -0
- package/recce-source/js/src/components/app/StateSharing.tsx +145 -0
- package/recce-source/js/src/components/app/StateSynchronizer.tsx +205 -0
- package/recce-source/js/src/components/charts/HistogramChart.tsx +291 -0
- package/recce-source/js/src/components/charts/SquareIcon.tsx +51 -0
- package/recce-source/js/src/components/charts/TopKSummaryList.tsx +457 -0
- package/recce-source/js/src/components/charts/chartTheme.ts +74 -0
- package/recce-source/js/src/components/check/CheckBreadcrumb.tsx +97 -0
- package/recce-source/js/src/components/check/CheckDescription.tsx +134 -0
- package/recce-source/js/src/components/check/CheckDetail.tsx +797 -0
- package/recce-source/js/src/components/check/CheckEmptyState.tsx +84 -0
- package/recce-source/js/src/components/check/CheckList.tsx +320 -0
- package/recce-source/js/src/components/check/LineageDiffView.tsx +32 -0
- package/recce-source/js/src/components/check/PresetCheckTemplateView.tsx +48 -0
- package/recce-source/js/src/components/check/SchemaDiffView.tsx +290 -0
- package/recce-source/js/src/components/check/check.ts +25 -0
- package/recce-source/js/src/components/check/timeline/CheckTimeline.tsx +163 -0
- package/recce-source/js/src/components/check/timeline/CommentInput.tsx +84 -0
- package/recce-source/js/src/components/check/timeline/TimelineEvent.tsx +468 -0
- package/recce-source/js/src/components/check/timeline/index.ts +12 -0
- package/recce-source/js/src/components/check/utils.ts +12 -0
- package/recce-source/js/src/components/data-grid/ScreenshotDataGrid.tsx +333 -0
- package/recce-source/js/src/components/data-grid/agGridStyles.css +55 -0
- package/recce-source/js/src/components/data-grid/agGridTheme.ts +43 -0
- package/recce-source/js/src/components/editor/CodeEditor.tsx +107 -0
- package/recce-source/js/src/components/editor/DiffEditor.tsx +162 -0
- package/recce-source/js/src/components/editor/index.ts +12 -0
- package/recce-source/js/src/components/errorboundary/ErrorBoundary.tsx +87 -0
- package/recce-source/js/src/components/histogram/HistogramDiffForm.tsx +147 -0
- package/recce-source/js/src/components/histogram/HistogramDiffResultView.tsx +63 -0
- package/recce-source/js/src/components/icons/index.tsx +142 -0
- package/recce-source/js/src/components/lineage/ActionControl.tsx +63 -0
- package/recce-source/js/src/components/lineage/ActionTag.tsx +141 -0
- package/recce-source/js/src/components/lineage/ChangeStatusLegend.tsx +46 -0
- package/recce-source/js/src/components/lineage/ColumnLevelLineageControl.tsx +327 -0
- package/recce-source/js/src/components/lineage/ColumnLevelLineageLegend.tsx +57 -0
- package/recce-source/js/src/components/lineage/GraphColumnNode.tsx +199 -0
- package/recce-source/js/src/components/lineage/GraphEdge.tsx +59 -0
- package/recce-source/js/src/components/lineage/GraphNode.tsx +555 -0
- package/recce-source/js/src/components/lineage/LineagePage.tsx +10 -0
- package/recce-source/js/src/components/lineage/LineageView.tsx +1384 -0
- package/recce-source/js/src/components/lineage/LineageViewContext.tsx +86 -0
- package/recce-source/js/src/components/lineage/LineageViewContextMenu.tsx +637 -0
- package/recce-source/js/src/components/lineage/LineageViewNotification.tsx +64 -0
- package/recce-source/js/src/components/lineage/LineageViewTopBar.tsx +596 -0
- package/recce-source/js/src/components/lineage/NodeSqlView.tsx +136 -0
- package/recce-source/js/src/components/lineage/NodeTag.tsx +278 -0
- package/recce-source/js/src/components/lineage/NodeView.tsx +642 -0
- package/recce-source/js/src/components/lineage/SandboxView.tsx +436 -0
- package/recce-source/js/src/components/lineage/ServerDisconnectedModalContent.tsx +105 -0
- package/recce-source/js/src/components/lineage/SetupConnectionBanner.tsx +52 -0
- package/recce-source/js/src/components/lineage/SingleEnvironmentQueryView.tsx +152 -0
- package/recce-source/js/src/components/lineage/graph.test.ts +31 -0
- package/recce-source/js/src/components/lineage/graph.ts +58 -0
- package/recce-source/js/src/components/lineage/lineage.test.ts +169 -0
- package/recce-source/js/src/components/lineage/lineage.ts +521 -0
- package/recce-source/js/src/components/lineage/styles.css +42 -0
- package/recce-source/js/src/components/lineage/styles.tsx +165 -0
- package/recce-source/js/src/components/lineage/useMultiNodesAction.ts +352 -0
- package/recce-source/js/src/components/lineage/useValueDiffAlertDialog.tsx +108 -0
- package/recce-source/js/src/components/onboarding-guide/Notification.tsx +62 -0
- package/recce-source/js/src/components/profile/ProfileDiffForm.tsx +134 -0
- package/recce-source/js/src/components/profile/ProfileDiffResultView.tsx +245 -0
- package/recce-source/js/src/components/query/ChangedOnlyCheckbox.tsx +29 -0
- package/recce-source/js/src/components/query/DiffText.tsx +120 -0
- package/recce-source/js/src/components/query/QueryDiffResultView.tsx +470 -0
- package/recce-source/js/src/components/query/QueryForm.tsx +80 -0
- package/recce-source/js/src/components/query/QueryPage.tsx +282 -0
- package/recce-source/js/src/components/query/QueryResultView.tsx +180 -0
- package/recce-source/js/src/components/query/SetupConnectionGuide.tsx +57 -0
- package/recce-source/js/src/components/query/SqlEditor.tsx +245 -0
- package/recce-source/js/src/components/query/ToggleSwitch.tsx +84 -0
- package/recce-source/js/src/components/query/styles.css +21 -0
- package/recce-source/js/src/components/routing/DirectUrlAccess.test.tsx +428 -0
- package/recce-source/js/src/components/routing/LineageStatePreservation.test.tsx +311 -0
- package/recce-source/js/src/components/routing/Navigation.test.tsx +256 -0
- package/recce-source/js/src/components/rowcount/RowCountDiffResultView.tsx +109 -0
- package/recce-source/js/src/components/rowcount/delta.ts +11 -0
- package/recce-source/js/src/components/run/RunList.tsx +303 -0
- package/recce-source/js/src/components/run/RunModal.tsx +191 -0
- package/recce-source/js/src/components/run/RunPage.tsx +26 -0
- package/recce-source/js/src/components/run/RunResultPane.tsx +454 -0
- package/recce-source/js/src/components/run/RunStatusAndDate.tsx +106 -0
- package/recce-source/js/src/components/run/RunToolbar.tsx +70 -0
- package/recce-source/js/src/components/run/RunView.tsx +196 -0
- package/recce-source/js/src/components/run/registry.ts +214 -0
- package/recce-source/js/src/components/run/types.ts +14 -0
- package/recce-source/js/src/components/schema/ColumnNameCell.test.tsx +169 -0
- package/recce-source/js/src/components/schema/ColumnNameCell.tsx +198 -0
- package/recce-source/js/src/components/schema/SchemaView.tsx +337 -0
- package/recce-source/js/src/components/schema/schemaDiff.ts +32 -0
- package/recce-source/js/src/components/schema/style.css +134 -0
- package/recce-source/js/src/components/screenshot/ScreenshotBox.tsx +39 -0
- package/recce-source/js/src/components/shared/HistoryToggle.tsx +35 -0
- package/recce-source/js/src/components/split/Split.tsx +40 -0
- package/recce-source/js/src/components/split/styles.css +24 -0
- package/recce-source/js/src/components/summary/ChangeSummary.tsx +264 -0
- package/recce-source/js/src/components/summary/SchemaSummary.tsx +123 -0
- package/recce-source/js/src/components/summary/SummaryView.tsx +29 -0
- package/recce-source/js/src/components/timeout/IdleTimeoutBadge.tsx +48 -0
- package/recce-source/js/src/components/top-k/TopKDiffForm.tsx +58 -0
- package/recce-source/js/src/components/top-k/TopKDiffResultView.tsx +73 -0
- package/recce-source/js/src/components/ui/dataGrid/DataFrameColumnGroupHeader.tsx +228 -0
- package/recce-source/js/src/components/ui/dataGrid/DataFrameColumnHeader.tsx +113 -0
- package/recce-source/js/src/components/ui/dataGrid/defaultRenderCell.tsx +72 -0
- package/recce-source/js/src/components/ui/dataGrid/index.ts +23 -0
- package/recce-source/js/src/components/ui/dataGrid/inlineRenderCell.test.tsx +607 -0
- package/recce-source/js/src/components/ui/dataGrid/inlineRenderCell.tsx +211 -0
- package/recce-source/js/src/components/ui/dataGrid/schemaCells.test.tsx +452 -0
- package/recce-source/js/src/components/ui/dataGrid/schemaCells.tsx +142 -0
- package/recce-source/js/src/components/ui/dataGrid/valueDiffCells.test.tsx +178 -0
- package/recce-source/js/src/components/ui/dataGrid/valueDiffCells.tsx +275 -0
- package/recce-source/js/src/components/ui/markdown/ExternalLinkConfirmDialog.tsx +134 -0
- package/recce-source/js/src/components/ui/markdown/MarkdownContent.tsx +364 -0
- package/recce-source/js/src/components/ui/mui/index.ts +13 -0
- package/recce-source/js/src/components/ui/mui-provider.tsx +67 -0
- package/recce-source/js/src/components/ui/mui-theme.ts +1039 -0
- package/recce-source/js/src/components/ui/mui-utils.ts +113 -0
- package/recce-source/js/src/components/ui/toaster.tsx +288 -0
- package/recce-source/js/src/components/valuediff/ValueDiffDetailResultView.tsx +217 -0
- package/recce-source/js/src/components/valuediff/ValueDiffForm.tsx +246 -0
- package/recce-source/js/src/components/valuediff/ValueDiffResultView.tsx +82 -0
- package/recce-source/js/src/components/valuediff/shared.ts +33 -0
- package/recce-source/js/src/constants/tooltipMessage.ts +3 -0
- package/recce-source/js/src/constants/urls.ts +1 -0
- package/recce-source/js/src/lib/UrlHash.ts +12 -0
- package/recce-source/js/src/lib/api/adhocQuery.ts +70 -0
- package/recce-source/js/src/lib/api/axiosClient.ts +9 -0
- package/recce-source/js/src/lib/api/cacheKeys.ts +13 -0
- package/recce-source/js/src/lib/api/checkEvents.ts +252 -0
- package/recce-source/js/src/lib/api/checks.ts +129 -0
- package/recce-source/js/src/lib/api/cll.ts +53 -0
- package/recce-source/js/src/lib/api/connectToCloud.ts +13 -0
- package/recce-source/js/src/lib/api/flag.ts +37 -0
- package/recce-source/js/src/lib/api/info.ts +198 -0
- package/recce-source/js/src/lib/api/instanceInfo.ts +25 -0
- package/recce-source/js/src/lib/api/keepAlive.ts +108 -0
- package/recce-source/js/src/lib/api/lineagecheck.ts +35 -0
- package/recce-source/js/src/lib/api/localStorageKeys.ts +7 -0
- package/recce-source/js/src/lib/api/models.ts +59 -0
- package/recce-source/js/src/lib/api/profile.ts +65 -0
- package/recce-source/js/src/lib/api/rowcount.ts +19 -0
- package/recce-source/js/src/lib/api/runs.ts +174 -0
- package/recce-source/js/src/lib/api/schemacheck.ts +31 -0
- package/recce-source/js/src/lib/api/select.ts +25 -0
- package/recce-source/js/src/lib/api/sessionStorageKeys.ts +8 -0
- package/recce-source/js/src/lib/api/state.ts +117 -0
- package/recce-source/js/src/lib/api/track.ts +281 -0
- package/recce-source/js/src/lib/api/types.ts +284 -0
- package/recce-source/js/src/lib/api/user.ts +42 -0
- package/recce-source/js/src/lib/api/valuediff.ts +46 -0
- package/recce-source/js/src/lib/api/version.ts +40 -0
- package/recce-source/js/src/lib/const.ts +9 -0
- package/recce-source/js/src/lib/dataGrid/crossFunctionConsistency.test.ts +626 -0
- package/recce-source/js/src/lib/dataGrid/dataGridFactory.test.ts +2140 -0
- package/recce-source/js/src/lib/dataGrid/dataGridFactory.ts +397 -0
- package/recce-source/js/src/lib/dataGrid/generators/rowCountUtils.test.ts +132 -0
- package/recce-source/js/src/lib/dataGrid/generators/rowCountUtils.ts +126 -0
- package/recce-source/js/src/lib/dataGrid/generators/toDataDiffGrid.test.ts +1627 -0
- package/recce-source/js/src/lib/dataGrid/generators/toDataDiffGrid.ts +140 -0
- package/recce-source/js/src/lib/dataGrid/generators/toDataGrid.ts +67 -0
- package/recce-source/js/src/lib/dataGrid/generators/toRowCountDataGrid.test.ts +142 -0
- package/recce-source/js/src/lib/dataGrid/generators/toRowCountDataGrid.ts +71 -0
- package/recce-source/js/src/lib/dataGrid/generators/toRowCountDiffDataGrid.test.ts +258 -0
- package/recce-source/js/src/lib/dataGrid/generators/toRowCountDiffDataGrid.ts +153 -0
- package/recce-source/js/src/lib/dataGrid/generators/toSchemaDataGrid.test.ts +951 -0
- package/recce-source/js/src/lib/dataGrid/generators/toSchemaDataGrid.ts +221 -0
- package/recce-source/js/src/lib/dataGrid/generators/toValueDataGrid.test.ts +395 -0
- package/recce-source/js/src/lib/dataGrid/generators/toValueDataGrid.ts +184 -0
- package/recce-source/js/src/lib/dataGrid/generators/toValueDiffGrid.test.ts +884 -0
- package/recce-source/js/src/lib/dataGrid/generators/toValueDiffGrid.ts +113 -0
- package/recce-source/js/src/lib/dataGrid/index.ts +51 -0
- package/recce-source/js/src/lib/dataGrid/propertyBased.test.ts +858 -0
- package/recce-source/js/src/lib/dataGrid/shared/columnBuilders.test.ts +482 -0
- package/recce-source/js/src/lib/dataGrid/shared/columnBuilders.ts +345 -0
- package/recce-source/js/src/lib/dataGrid/shared/dataTypeEdgeCases.test.ts +698 -0
- package/recce-source/js/src/lib/dataGrid/shared/diffColumnBuilder.test.tsx +820 -0
- package/recce-source/js/src/lib/dataGrid/shared/diffColumnBuilder.tsx +277 -0
- package/recce-source/js/src/lib/dataGrid/shared/gridUtils.test.ts +785 -0
- package/recce-source/js/src/lib/dataGrid/shared/gridUtils.ts +370 -0
- package/recce-source/js/src/lib/dataGrid/shared/index.ts +81 -0
- package/recce-source/js/src/lib/dataGrid/shared/rowBuilders.test.ts +909 -0
- package/recce-source/js/src/lib/dataGrid/shared/rowBuilders.ts +325 -0
- package/recce-source/js/src/lib/dataGrid/shared/simpleColumnBuilder.tsx +240 -0
- package/recce-source/js/src/lib/dataGrid/shared/toDiffColumn.test.tsx +719 -0
- package/recce-source/js/src/lib/dataGrid/shared/toDiffColumn.tsx +231 -0
- package/recce-source/js/src/lib/dataGrid/shared/validation.test.ts +559 -0
- package/recce-source/js/src/lib/dataGrid/shared/validation.ts +367 -0
- package/recce-source/js/src/lib/dataGrid/warehouseNamingConventions.test.ts +1117 -0
- package/recce-source/js/src/lib/formatSelect.ts +50 -0
- package/recce-source/js/src/lib/hooks/ApiConfigContext.tsx +181 -0
- package/recce-source/js/src/lib/hooks/IdleTimeoutContext.tsx +177 -0
- package/recce-source/js/src/lib/hooks/LineageGraphContext.tsx +512 -0
- package/recce-source/js/src/lib/hooks/RecceActionContext.tsx +269 -0
- package/recce-source/js/src/lib/hooks/RecceCheckContext.tsx +33 -0
- package/recce-source/js/src/lib/hooks/RecceContextProvider.tsx +54 -0
- package/recce-source/js/src/lib/hooks/RecceInstanceContext.tsx +129 -0
- package/recce-source/js/src/lib/hooks/RecceQueryContext.tsx +98 -0
- package/recce-source/js/src/lib/hooks/RecceShareStateContext.tsx +59 -0
- package/recce-source/js/src/lib/hooks/ScreenShot.tsx +399 -0
- package/recce-source/js/src/lib/hooks/useAppRouter.test.ts +211 -0
- package/recce-source/js/src/lib/hooks/useAppRouter.ts +200 -0
- package/recce-source/js/src/lib/hooks/useCheckEvents.ts +99 -0
- package/recce-source/js/src/lib/hooks/useCheckToast.tsx +14 -0
- package/recce-source/js/src/lib/hooks/useClipBoardToast.tsx +27 -0
- package/recce-source/js/src/lib/hooks/useCountdownToast.tsx +102 -0
- package/recce-source/js/src/lib/hooks/useFeedbackCollectionToast.tsx +130 -0
- package/recce-source/js/src/lib/hooks/useGuideToast.tsx +45 -0
- package/recce-source/js/src/lib/hooks/useIdleDetection.tsx +185 -0
- package/recce-source/js/src/lib/hooks/useModelColumns.tsx +113 -0
- package/recce-source/js/src/lib/hooks/useRecceInstanceInfo.tsx +13 -0
- package/recce-source/js/src/lib/hooks/useRecceServerFlag.tsx +13 -0
- package/recce-source/js/src/lib/hooks/useRun.tsx +89 -0
- package/recce-source/js/src/lib/hooks/useThemeColors.ts +115 -0
- package/recce-source/js/src/lib/mergeKeys.test.ts +89 -0
- package/recce-source/js/src/lib/mergeKeys.ts +86 -0
- package/recce-source/js/src/lib/result/ResultErrorFallback.tsx +9 -0
- package/recce-source/js/src/lib/utils/formatTime.ts +84 -0
- package/recce-source/js/src/lib/utils/urls.ts +16 -0
- package/recce-source/js/src/utils/DropdownValuesInput.tsx +297 -0
- package/recce-source/js/src/utils/formatters.tsx +237 -0
- package/recce-source/js/src/utils/transforms.ts +81 -0
- package/recce-source/js/tsconfig.json +47 -0
- package/recce-source/macros/README.md +8 -0
- package/recce-source/macros/recce_athena.sql +73 -0
- package/recce-source/pyproject.toml +109 -0
- package/recce-source/recce/VERSION +1 -0
- package/recce-source/recce/__init__.py +84 -0
- package/recce-source/recce/adapter/__init__.py +0 -0
- package/recce-source/recce/adapter/base.py +109 -0
- package/recce-source/recce/adapter/dbt_adapter/__init__.py +1699 -0
- package/recce-source/recce/adapter/dbt_adapter/dbt_version.py +42 -0
- package/recce-source/recce/adapter/sqlmesh_adapter.py +141 -0
- package/recce-source/recce/apis/__init__.py +0 -0
- package/recce-source/recce/apis/check_api.py +203 -0
- package/recce-source/recce/apis/check_events_api.py +353 -0
- package/recce-source/recce/apis/check_func.py +130 -0
- package/recce-source/recce/apis/run_api.py +130 -0
- package/recce-source/recce/apis/run_func.py +258 -0
- package/recce-source/recce/artifact.py +266 -0
- package/recce-source/recce/cli.py +1846 -0
- package/recce-source/recce/config.py +127 -0
- package/recce-source/recce/connect_to_cloud.py +138 -0
- package/recce-source/recce/core.py +334 -0
- package/recce-source/recce/diff.py +26 -0
- package/recce-source/recce/event/CONFIG +1 -0
- package/recce-source/recce/event/SENTRY_DNS +1 -0
- package/recce-source/recce/event/__init__.py +304 -0
- package/recce-source/recce/event/collector.py +184 -0
- package/recce-source/recce/event/track.py +158 -0
- package/recce-source/recce/exceptions.py +21 -0
- package/recce-source/recce/git.py +77 -0
- package/recce-source/recce/github.py +222 -0
- package/recce-source/recce/mcp_server.py +861 -0
- package/recce-source/recce/models/__init__.py +6 -0
- package/recce-source/recce/models/check.py +473 -0
- package/recce-source/recce/models/run.py +46 -0
- package/recce-source/recce/models/types.py +218 -0
- package/recce-source/recce/pull_request.py +124 -0
- package/recce-source/recce/run.py +390 -0
- package/recce-source/recce/server.py +877 -0
- package/recce-source/recce/state/__init__.py +31 -0
- package/recce-source/recce/state/cloud.py +644 -0
- package/recce-source/recce/state/const.py +26 -0
- package/recce-source/recce/state/local.py +56 -0
- package/recce-source/recce/state/state.py +119 -0
- package/recce-source/recce/state/state_loader.py +174 -0
- package/recce-source/recce/summary.py +575 -0
- package/recce-source/recce/tasks/__init__.py +23 -0
- package/recce-source/recce/tasks/core.py +134 -0
- package/recce-source/recce/tasks/dataframe.py +170 -0
- package/recce-source/recce/tasks/histogram.py +433 -0
- package/recce-source/recce/tasks/lineage.py +19 -0
- package/recce-source/recce/tasks/profile.py +298 -0
- package/recce-source/recce/tasks/query.py +450 -0
- package/recce-source/recce/tasks/rowcount.py +277 -0
- package/recce-source/recce/tasks/schema.py +65 -0
- package/recce-source/recce/tasks/top_k.py +172 -0
- package/recce-source/recce/tasks/utils.py +147 -0
- package/recce-source/recce/tasks/valuediff.py +497 -0
- package/recce-source/recce/util/__init__.py +4 -0
- package/recce-source/recce/util/api_token.py +80 -0
- package/recce-source/recce/util/breaking.py +330 -0
- package/recce-source/recce/util/cache.py +25 -0
- package/recce-source/recce/util/cll.py +355 -0
- package/recce-source/recce/util/cloud/__init__.py +15 -0
- package/recce-source/recce/util/cloud/base.py +115 -0
- package/recce-source/recce/util/cloud/check_events.py +190 -0
- package/recce-source/recce/util/cloud/checks.py +242 -0
- package/recce-source/recce/util/io.py +120 -0
- package/recce-source/recce/util/lineage.py +83 -0
- package/recce-source/recce/util/logger.py +25 -0
- package/recce-source/recce/util/onboarding_state.py +45 -0
- package/recce-source/recce/util/perf_tracking.py +85 -0
- package/recce-source/recce/util/pydantic_model.py +22 -0
- package/recce-source/recce/util/recce_cloud.py +454 -0
- package/recce-source/recce/util/singleton.py +18 -0
- package/recce-source/recce/util/startup_perf.py +121 -0
- package/recce-source/recce/yaml/__init__.py +58 -0
- package/recce-source/recce_cloud/README.md +780 -0
- package/recce-source/recce_cloud/VERSION +1 -0
- package/recce-source/recce_cloud/__init__.py +24 -0
- package/recce-source/recce_cloud/api/__init__.py +17 -0
- package/recce-source/recce_cloud/api/base.py +132 -0
- package/recce-source/recce_cloud/api/client.py +186 -0
- package/recce-source/recce_cloud/api/exceptions.py +26 -0
- package/recce-source/recce_cloud/api/factory.py +63 -0
- package/recce-source/recce_cloud/api/github.py +106 -0
- package/recce-source/recce_cloud/api/gitlab.py +111 -0
- package/recce-source/recce_cloud/artifact.py +57 -0
- package/recce-source/recce_cloud/ci_providers/__init__.py +9 -0
- package/recce-source/recce_cloud/ci_providers/base.py +82 -0
- package/recce-source/recce_cloud/ci_providers/detector.py +147 -0
- package/recce-source/recce_cloud/ci_providers/github_actions.py +136 -0
- package/recce-source/recce_cloud/ci_providers/gitlab_ci.py +130 -0
- package/recce-source/recce_cloud/cli.py +434 -0
- package/recce-source/recce_cloud/download.py +230 -0
- package/recce-source/recce_cloud/hatch_build.py +20 -0
- package/recce-source/recce_cloud/pyproject.toml +49 -0
- package/recce-source/recce_cloud/upload.py +214 -0
- package/recce-source/test.py +0 -0
- package/recce-source/tests/__init__.py +0 -0
- package/recce-source/tests/adapter/__init__.py +0 -0
- package/recce-source/tests/adapter/dbt_adapter/__init__.py +0 -0
- package/recce-source/tests/adapter/dbt_adapter/conftest.py +17 -0
- package/recce-source/tests/adapter/dbt_adapter/dbt_test_helper.py +298 -0
- package/recce-source/tests/adapter/dbt_adapter/test_dbt_adapter.py +25 -0
- package/recce-source/tests/adapter/dbt_adapter/test_dbt_cll.py +717 -0
- package/recce-source/tests/adapter/dbt_adapter/test_proj/dbt_project.yml +4 -0
- package/recce-source/tests/adapter/dbt_adapter/test_proj/manifest.json +1 -0
- package/recce-source/tests/adapter/dbt_adapter/test_proj/package-lock.yml +8 -0
- package/recce-source/tests/adapter/dbt_adapter/test_proj/packages.yml +7 -0
- package/recce-source/tests/adapter/dbt_adapter/test_proj/profiles.yml +6 -0
- package/recce-source/tests/adapter/dbt_adapter/test_selector.py +205 -0
- package/recce-source/tests/apis/__init__.py +0 -0
- package/recce-source/tests/apis/row_count_diff.json +59 -0
- package/recce-source/tests/apis/test_check_events_api.py +615 -0
- package/recce-source/tests/apis/test_run_func.py +433 -0
- package/recce-source/tests/catalog.json +527 -0
- package/recce-source/tests/data/manifest/base/catalog.json +1 -0
- package/recce-source/tests/data/manifest/base/manifest.json +1 -0
- package/recce-source/tests/data/manifest/pr2/catalog.json +1 -0
- package/recce-source/tests/data/manifest/pr2/manifest.json +1 -0
- package/recce-source/tests/manifest.json +10655 -0
- package/recce-source/tests/models/__init__.py +0 -0
- package/recce-source/tests/models/test_check.py +731 -0
- package/recce-source/tests/models/test_run_models.py +295 -0
- package/recce-source/tests/recce_cloud/__init__.py +0 -0
- package/recce-source/tests/recce_cloud/test_ci_providers.py +351 -0
- package/recce-source/tests/recce_cloud/test_cli.py +735 -0
- package/recce-source/tests/recce_cloud/test_client.py +379 -0
- package/recce-source/tests/recce_cloud/test_platform_clients.py +483 -0
- package/recce-source/tests/recce_state.json +1 -0
- package/recce-source/tests/state/test_cloud.py +719 -0
- package/recce-source/tests/state/test_local.py +164 -0
- package/recce-source/tests/state/test_state_loader.py +211 -0
- package/recce-source/tests/tasks/__init__.py +0 -0
- package/recce-source/tests/tasks/conftest.py +4 -0
- package/recce-source/tests/tasks/test_histogram.py +129 -0
- package/recce-source/tests/tasks/test_lineage.py +55 -0
- package/recce-source/tests/tasks/test_preset_checks.py +64 -0
- package/recce-source/tests/tasks/test_profile.py +397 -0
- package/recce-source/tests/tasks/test_query.py +528 -0
- package/recce-source/tests/tasks/test_row_count.py +133 -0
- package/recce-source/tests/tasks/test_schema.py +122 -0
- package/recce-source/tests/tasks/test_top_k.py +77 -0
- package/recce-source/tests/tasks/test_utils.py +439 -0
- package/recce-source/tests/tasks/test_valuediff.py +361 -0
- package/recce-source/tests/test_cli.py +236 -0
- package/recce-source/tests/test_cli_mcp_optional.py +45 -0
- package/recce-source/tests/test_cloud_listing_cli.py +324 -0
- package/recce-source/tests/test_config.py +43 -0
- package/recce-source/tests/test_connect_to_cloud.py +82 -0
- package/recce-source/tests/test_core.py +174 -0
- package/recce-source/tests/test_dbt.py +36 -0
- package/recce-source/tests/test_mcp_server.py +505 -0
- package/recce-source/tests/test_pull_request.py +130 -0
- package/recce-source/tests/test_server.py +202 -0
- package/recce-source/tests/test_server_lifespan.py +138 -0
- package/recce-source/tests/test_summary.py +73 -0
- package/recce-source/tests/util/__init__.py +0 -0
- package/recce-source/tests/util/cloud/__init__.py +0 -0
- package/recce-source/tests/util/cloud/test_check_events.py +255 -0
- package/recce-source/tests/util/cloud/test_checks.py +204 -0
- package/recce-source/tests/util/test_api_token.py +119 -0
- package/recce-source/tests/util/test_breaking.py +1427 -0
- package/recce-source/tests/util/test_cll.py +706 -0
- package/recce-source/tests/util/test_lineage.py +122 -0
- package/recce-source/tests/util/test_onboarding_state.py +84 -0
- package/recce-source/tests/util/test_recce_cloud.py +231 -0
- package/recce-source/tox.ini +40 -0
- package/recce-source/uv.lock +3928 -0
- package/src/api/index.ts +32 -0
- package/src/components/index.ts +154 -0
- package/src/global.d.ts +14 -0
- package/src/hooks/index.ts +56 -0
- package/src/index.ts +17 -0
- package/src/lib/hooks/RouteConfigContext.ts +139 -0
- package/src/lib/hooks/useAppRouter.ts +240 -0
- package/src/mui-augmentation.d.ts +139 -0
- package/src/theme/index.ts +13 -0
- package/src/theme.ts +23 -0
- package/src/types/index.ts +23 -0
- package/dist/index-Bv5R8iLo.d.mts.map +0 -1
- package/dist/index-CUtFlKOo.d.ts.map +0 -1
- package/dist/state-CELzQ0tM.mjs.map +0 -1
- package/dist/state-CemiRRon.js.map +0 -1
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AmplitudeReturn,
|
|
3
|
+
BaseEvent,
|
|
4
|
+
EventOptions,
|
|
5
|
+
Result,
|
|
6
|
+
} from "@amplitude/analytics-core";
|
|
7
|
+
import { initAll, track as trk } from "@amplitude/unified";
|
|
8
|
+
|
|
9
|
+
function track(
|
|
10
|
+
eventInput: string | BaseEvent,
|
|
11
|
+
// biome-ignore lint/suspicious/noExplicitAny: Amplitude library uses any for event properties
|
|
12
|
+
eventProperties?: Record<string, any> | undefined,
|
|
13
|
+
eventOptions?: EventOptions | undefined,
|
|
14
|
+
): AmplitudeReturn<Result> {
|
|
15
|
+
// If Amplitude isn't initialized, log to console instead
|
|
16
|
+
if (!amplitudeInitialized) {
|
|
17
|
+
console.log("[Tracking]", eventInput, eventProperties, eventOptions);
|
|
18
|
+
}
|
|
19
|
+
return trk(eventInput, eventProperties, eventOptions);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let amplitudeInitialized = false;
|
|
23
|
+
|
|
24
|
+
export function trackInit() {
|
|
25
|
+
function getCookie(key: string) {
|
|
26
|
+
const b = document.cookie.match("(^|;)\\s*" + key + "\\s*=\\s*([^;]+)");
|
|
27
|
+
return b ? b.pop() : "";
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const userId =
|
|
31
|
+
process.env.NODE_ENV === "development"
|
|
32
|
+
? "web_dev"
|
|
33
|
+
: getCookie("recce_user_id");
|
|
34
|
+
const apiKey = process.env.AMPLITUDE_API_KEY;
|
|
35
|
+
if (userId && apiKey) {
|
|
36
|
+
try {
|
|
37
|
+
void initAll(apiKey, {
|
|
38
|
+
analytics: {
|
|
39
|
+
userId,
|
|
40
|
+
autocapture: true,
|
|
41
|
+
},
|
|
42
|
+
sessionReplay: {
|
|
43
|
+
sampleRate: 1,
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
amplitudeInitialized = true;
|
|
47
|
+
} catch (e) {
|
|
48
|
+
console.error(e);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Log when Amplitude is not initialized (for development/debugging)
|
|
53
|
+
if (!amplitudeInitialized) {
|
|
54
|
+
console.log(
|
|
55
|
+
"[Tracking] Amplitude not initialized (missing API key or user ID). Events will be logged to console instead.",
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
interface MultiNodeActionProps {
|
|
61
|
+
type:
|
|
62
|
+
| "row_count"
|
|
63
|
+
| "row_count_diff"
|
|
64
|
+
| "value_diff"
|
|
65
|
+
| "schema_diff"
|
|
66
|
+
| "lineage_diff";
|
|
67
|
+
selected: "single" | "multi" | "none";
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function trackMultiNodesAction(props: MultiNodeActionProps) {
|
|
71
|
+
track("[Web] multi_nodes_action", props);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface HistoryActionProps {
|
|
75
|
+
name: "show" | "hide" | "click_run" | "add_to_checklist" | "go_to_check";
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function trackHistoryAction(props: HistoryActionProps) {
|
|
79
|
+
track("[Web] history_action", props);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
interface PreviewChangeProps {
|
|
83
|
+
action: "explore" | "run" | "close";
|
|
84
|
+
node?: string;
|
|
85
|
+
status?: "success" | "failure";
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function trackPreviewChange(props: PreviewChangeProps) {
|
|
89
|
+
track("[Experiment] preview_change", props);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
interface PreviewChangeFeedbackProps {
|
|
93
|
+
feedback: "like" | "dislike" | "form";
|
|
94
|
+
node?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function trackPreviewChangeFeedback(props: PreviewChangeFeedbackProps) {
|
|
98
|
+
track("[Experiment] preview_change", props);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
interface SingleEnvironmentProps {
|
|
102
|
+
action:
|
|
103
|
+
| "onboarding"
|
|
104
|
+
| "external_link"
|
|
105
|
+
| "preview_changes"
|
|
106
|
+
| `target_base_added`;
|
|
107
|
+
from?: "onboarding" | "preview_changes";
|
|
108
|
+
node?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function trackSingleEnvironment(props: SingleEnvironmentProps) {
|
|
112
|
+
track("[Experiment] single_environment", props);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function getExperimentTrackingBreakingChangeEnabled() {
|
|
116
|
+
return false;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface ColumnLevelLineageProps {
|
|
120
|
+
action: "view";
|
|
121
|
+
source: "schema_column" | "changed_column" | "cll_column";
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function trackColumnLevelLineage(props: ColumnLevelLineageProps) {
|
|
125
|
+
track("[Web] column_level_lineage", props);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
interface ShareStateProps {
|
|
129
|
+
name: "enable" | "create" | "copy";
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function trackShareState(props: ShareStateProps) {
|
|
133
|
+
track("[Web] share_state", props);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
interface StateActionProps {
|
|
137
|
+
name: "import" | "export";
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function trackStateAction(props: StateActionProps) {
|
|
141
|
+
track("[Web] state_action", props);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
interface CopyToClipboardProps {
|
|
145
|
+
from: "run" | "check" | "lineage_view";
|
|
146
|
+
type: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function trackCopyToClipboard(props: CopyToClipboardProps) {
|
|
150
|
+
track("[Click] copy_to_clipboard", props);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface TrackNavProps {
|
|
154
|
+
from: string;
|
|
155
|
+
to: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export function trackNavigation(props: TrackNavProps) {
|
|
159
|
+
track("[Web] navigation_change", props);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export interface LineageViewRenderProps {
|
|
163
|
+
node_count: number;
|
|
164
|
+
view_mode: string;
|
|
165
|
+
impact_radius_enabled: boolean;
|
|
166
|
+
cll_column_active?: boolean;
|
|
167
|
+
right_sidebar_open: boolean;
|
|
168
|
+
[status: string]: number | string | boolean | undefined;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export function trackLineageViewRender(props: LineageViewRenderProps) {
|
|
172
|
+
track("[Web] lineage_view_render", props);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface EnvironmentConfigProps {
|
|
176
|
+
review_mode: boolean;
|
|
177
|
+
adapter_type: string | null;
|
|
178
|
+
has_git_info: boolean;
|
|
179
|
+
has_pr_info: boolean;
|
|
180
|
+
// Adapter-specific (shape varies by adapter_type)
|
|
181
|
+
base?: {
|
|
182
|
+
schema_count?: number;
|
|
183
|
+
dbt_version?: string | null;
|
|
184
|
+
timestamp?: string | null;
|
|
185
|
+
has_env?: boolean;
|
|
186
|
+
};
|
|
187
|
+
current?: {
|
|
188
|
+
schema_count?: number;
|
|
189
|
+
dbt_version?: string | null;
|
|
190
|
+
timestamp?: string | null;
|
|
191
|
+
has_env?: boolean;
|
|
192
|
+
};
|
|
193
|
+
schemas_match?: boolean;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export function trackEnvironmentConfig(props: EnvironmentConfigProps) {
|
|
197
|
+
track("[Web] environment_config", props);
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
// Explore action types
|
|
201
|
+
export const EXPLORE_ACTION = {
|
|
202
|
+
ROW_COUNT: "row_count",
|
|
203
|
+
ROW_COUNT_DIFF: "row_count_diff",
|
|
204
|
+
PROFILE: "profile",
|
|
205
|
+
PROFILE_DIFF: "profile_diff",
|
|
206
|
+
VALUE_DIFF: "value_diff",
|
|
207
|
+
SCHEMA_DIFF: "schema_diff",
|
|
208
|
+
LINEAGE_DIFF: "lineage_diff",
|
|
209
|
+
QUERY: "query",
|
|
210
|
+
HISTOGRAM_DIFF: "histogram_diff",
|
|
211
|
+
TOP_K_DIFF: "top_k_diff",
|
|
212
|
+
} as const;
|
|
213
|
+
|
|
214
|
+
// Explore action sources
|
|
215
|
+
export const EXPLORE_SOURCE = {
|
|
216
|
+
LINEAGE_VIEW_TOP_BAR: "lineage_view_top_bar",
|
|
217
|
+
LINEAGE_VIEW_CONTEXT_MENU: "lineage_view_context_menu",
|
|
218
|
+
NODE_KEBAB_MENU: "node_kebab_menu",
|
|
219
|
+
NODE_SIDEBAR_SINGLE_ENV: "node_sidebar_single_env",
|
|
220
|
+
NODE_SIDEBAR_MULTI_ENV: "node_sidebar_multi_env",
|
|
221
|
+
SCHEMA_ROW_COUNT_BUTTON: "schema_row_count_button",
|
|
222
|
+
SCHEMA_COLUMN_MENU: "schema_column_menu",
|
|
223
|
+
} as const;
|
|
224
|
+
|
|
225
|
+
export type ExploreActionType =
|
|
226
|
+
(typeof EXPLORE_ACTION)[keyof typeof EXPLORE_ACTION];
|
|
227
|
+
export type ExploreSourceType =
|
|
228
|
+
(typeof EXPLORE_SOURCE)[keyof typeof EXPLORE_SOURCE];
|
|
229
|
+
|
|
230
|
+
interface ExploreActionProps {
|
|
231
|
+
action: ExploreActionType;
|
|
232
|
+
source: ExploreSourceType;
|
|
233
|
+
node_count?: number;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function trackExploreAction(props: ExploreActionProps) {
|
|
237
|
+
track("[Web] explore_action", props);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// Explore action form events
|
|
241
|
+
export const EXPLORE_FORM_EVENT = {
|
|
242
|
+
EXECUTE: "execute",
|
|
243
|
+
CANCEL: "cancel",
|
|
244
|
+
} as const;
|
|
245
|
+
|
|
246
|
+
export type ExploreFormEventType =
|
|
247
|
+
(typeof EXPLORE_FORM_EVENT)[keyof typeof EXPLORE_FORM_EVENT];
|
|
248
|
+
|
|
249
|
+
interface ExploreActionFormProps {
|
|
250
|
+
action: ExploreActionType;
|
|
251
|
+
event: ExploreFormEventType;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
export function trackExploreActionForm(props: ExploreActionFormProps) {
|
|
255
|
+
track("[Web] explore_action_form", props);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// Helper to check if a run type is an explore action
|
|
259
|
+
export function isExploreAction(type: string): type is ExploreActionType {
|
|
260
|
+
return Object.values(EXPLORE_ACTION).includes(type as ExploreActionType);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
// Lineage selection action types
|
|
264
|
+
export const LINEAGE_SELECTION_ACTION = {
|
|
265
|
+
SELECT_PARENT_NODES: "select_parent_nodes",
|
|
266
|
+
SELECT_CHILD_NODES: "select_child_nodes",
|
|
267
|
+
SELECT_ALL_UPSTREAM: "select_all_upstream",
|
|
268
|
+
SELECT_ALL_DOWNSTREAM: "select_all_downstream",
|
|
269
|
+
} as const;
|
|
270
|
+
|
|
271
|
+
export type LineageSelectionActionType =
|
|
272
|
+
(typeof LINEAGE_SELECTION_ACTION)[keyof typeof LINEAGE_SELECTION_ACTION];
|
|
273
|
+
|
|
274
|
+
interface LineageSelectionProps {
|
|
275
|
+
action: LineageSelectionActionType;
|
|
276
|
+
node_count?: number;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
export function trackLineageSelection(props: LineageSelectionProps) {
|
|
280
|
+
track("[Web] lineage_selection", props);
|
|
281
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
// ============================================================================
|
|
2
|
+
// Base Types
|
|
3
|
+
// ============================================================================
|
|
4
|
+
|
|
5
|
+
export type AxiosQueryParams = Record<
|
|
6
|
+
string,
|
|
7
|
+
string | string[] | number | number[] | undefined
|
|
8
|
+
>;
|
|
9
|
+
|
|
10
|
+
export type RowDataTypes = number | string | boolean | null | undefined;
|
|
11
|
+
export type RowData = RowDataTypes[];
|
|
12
|
+
|
|
13
|
+
export type RowObjectType = Record<string, RowDataTypes> & {
|
|
14
|
+
__status: "added" | "removed" | "modified" | undefined;
|
|
15
|
+
_index?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type ColumnType =
|
|
19
|
+
| "number"
|
|
20
|
+
| "integer"
|
|
21
|
+
| "text"
|
|
22
|
+
| "boolean"
|
|
23
|
+
| "date"
|
|
24
|
+
| "datetime"
|
|
25
|
+
| "timedelta"
|
|
26
|
+
| "unknown";
|
|
27
|
+
|
|
28
|
+
export type ColumnRenderMode = "raw" | "percent" | "delta" | 2;
|
|
29
|
+
export interface DataFrame {
|
|
30
|
+
columns: {
|
|
31
|
+
key: string;
|
|
32
|
+
name: string;
|
|
33
|
+
type: ColumnType;
|
|
34
|
+
}[];
|
|
35
|
+
data: RowData[];
|
|
36
|
+
limit?: number;
|
|
37
|
+
more?: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// ============================================================================
|
|
41
|
+
// Run Types - Strict enum without string union
|
|
42
|
+
// ============================================================================
|
|
43
|
+
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// Inline Param Definitions (defined here to avoid circular dependencies)
|
|
46
|
+
// ============================================================================
|
|
47
|
+
|
|
48
|
+
// Import types that are defined in other files
|
|
49
|
+
import { RunType } from "@/components/run/registry";
|
|
50
|
+
import type {
|
|
51
|
+
QueryDiffParams,
|
|
52
|
+
QueryDiffResult,
|
|
53
|
+
QueryResult,
|
|
54
|
+
QueryRunParams,
|
|
55
|
+
} from "./adhocQuery";
|
|
56
|
+
import type { LineageDiffResult } from "./info";
|
|
57
|
+
import type {
|
|
58
|
+
HistogramDiffParams,
|
|
59
|
+
HistogramDiffResult,
|
|
60
|
+
ProfileDiffParams,
|
|
61
|
+
ProfileDiffResult,
|
|
62
|
+
TopKDiffParams,
|
|
63
|
+
TopKDiffResult,
|
|
64
|
+
} from "./profile";
|
|
65
|
+
import type {
|
|
66
|
+
RowCountDiffParams,
|
|
67
|
+
RowCountDiffResult,
|
|
68
|
+
RowCountParams,
|
|
69
|
+
RowCountResult,
|
|
70
|
+
} from "./rowcount";
|
|
71
|
+
import type {
|
|
72
|
+
ValueDiffDetailParams,
|
|
73
|
+
ValueDiffDetailResult,
|
|
74
|
+
ValueDiffParams,
|
|
75
|
+
ValueDiffResult,
|
|
76
|
+
} from "./valuediff";
|
|
77
|
+
|
|
78
|
+
// Define params that don't have their own files yet
|
|
79
|
+
export interface SchemaDiffParams {
|
|
80
|
+
node_id?: string | string[];
|
|
81
|
+
select?: string;
|
|
82
|
+
exclude?: string;
|
|
83
|
+
packages?: string[];
|
|
84
|
+
view_mode?: "all" | "changed_models";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface LineageDiffParams {
|
|
88
|
+
select?: string;
|
|
89
|
+
exclude?: string;
|
|
90
|
+
packages?: string[];
|
|
91
|
+
view_mode?: "all" | "changed_models";
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// ============================================================================
|
|
95
|
+
// Run - Discriminated Union Type
|
|
96
|
+
// ============================================================================
|
|
97
|
+
|
|
98
|
+
export type RunParamTypes =
|
|
99
|
+
| QueryRunParams
|
|
100
|
+
| QueryDiffParams
|
|
101
|
+
| ValueDiffParams
|
|
102
|
+
| SchemaDiffParams
|
|
103
|
+
| ProfileDiffParams
|
|
104
|
+
| RowCountParams
|
|
105
|
+
| RowCountDiffParams
|
|
106
|
+
| LineageDiffParams
|
|
107
|
+
| TopKDiffParams
|
|
108
|
+
| HistogramDiffParams
|
|
109
|
+
| undefined;
|
|
110
|
+
|
|
111
|
+
interface BaseRun {
|
|
112
|
+
type: RunType;
|
|
113
|
+
run_id: string;
|
|
114
|
+
run_at: string;
|
|
115
|
+
name?: string;
|
|
116
|
+
check_id?: string;
|
|
117
|
+
progress?: {
|
|
118
|
+
message?: string;
|
|
119
|
+
percentage?: number;
|
|
120
|
+
};
|
|
121
|
+
error?: string;
|
|
122
|
+
status?: "finished" | "failed" | "cancelled" | "running";
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export type Run =
|
|
126
|
+
| (BaseRun & {
|
|
127
|
+
type: "simple";
|
|
128
|
+
params?: undefined;
|
|
129
|
+
result?: undefined;
|
|
130
|
+
})
|
|
131
|
+
| (BaseRun & {
|
|
132
|
+
type: "sandbox";
|
|
133
|
+
params?: undefined;
|
|
134
|
+
result?: undefined;
|
|
135
|
+
})
|
|
136
|
+
| (BaseRun & {
|
|
137
|
+
type: "query";
|
|
138
|
+
params?: QueryRunParams;
|
|
139
|
+
result?: QueryResult;
|
|
140
|
+
})
|
|
141
|
+
| (BaseRun & {
|
|
142
|
+
type: "query_base";
|
|
143
|
+
params?: QueryRunParams;
|
|
144
|
+
result?: QueryResult;
|
|
145
|
+
})
|
|
146
|
+
| (BaseRun & {
|
|
147
|
+
type: "query_diff";
|
|
148
|
+
params?: QueryDiffParams;
|
|
149
|
+
result?: QueryDiffResult;
|
|
150
|
+
})
|
|
151
|
+
| (BaseRun & {
|
|
152
|
+
type: "value_diff";
|
|
153
|
+
params?: ValueDiffParams;
|
|
154
|
+
result?: ValueDiffResult;
|
|
155
|
+
})
|
|
156
|
+
| (BaseRun & {
|
|
157
|
+
type: "value_diff_detail";
|
|
158
|
+
params?: ValueDiffDetailParams;
|
|
159
|
+
result?: ValueDiffDetailResult;
|
|
160
|
+
})
|
|
161
|
+
| (BaseRun & {
|
|
162
|
+
type: "schema_diff";
|
|
163
|
+
params?: SchemaDiffParams;
|
|
164
|
+
result?: undefined;
|
|
165
|
+
})
|
|
166
|
+
| (BaseRun & {
|
|
167
|
+
type: "profile";
|
|
168
|
+
params?: ProfileDiffParams;
|
|
169
|
+
result?: ProfileDiffResult;
|
|
170
|
+
})
|
|
171
|
+
| (BaseRun & {
|
|
172
|
+
type: "profile_diff";
|
|
173
|
+
params?: ProfileDiffParams;
|
|
174
|
+
result?: ProfileDiffResult;
|
|
175
|
+
})
|
|
176
|
+
| (BaseRun & {
|
|
177
|
+
type: "row_count";
|
|
178
|
+
params?: RowCountParams;
|
|
179
|
+
result?: RowCountResult;
|
|
180
|
+
})
|
|
181
|
+
| (BaseRun & {
|
|
182
|
+
type: "row_count_diff";
|
|
183
|
+
params?: RowCountDiffParams;
|
|
184
|
+
result?: RowCountDiffResult;
|
|
185
|
+
})
|
|
186
|
+
| (BaseRun & {
|
|
187
|
+
type: "lineage_diff";
|
|
188
|
+
params?: LineageDiffParams;
|
|
189
|
+
result?: LineageDiffResult;
|
|
190
|
+
})
|
|
191
|
+
| (BaseRun & {
|
|
192
|
+
type: "top_k_diff";
|
|
193
|
+
params?: TopKDiffParams;
|
|
194
|
+
result?: TopKDiffResult;
|
|
195
|
+
})
|
|
196
|
+
| (BaseRun & {
|
|
197
|
+
type: "histogram_diff";
|
|
198
|
+
params?: HistogramDiffParams;
|
|
199
|
+
result?: HistogramDiffResult;
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
// ============================================================================
|
|
203
|
+
// Type Guards
|
|
204
|
+
// ============================================================================
|
|
205
|
+
|
|
206
|
+
export function isSimpleRun(run: Run): run is Extract<Run, { type: "simple" }> {
|
|
207
|
+
return run.type === "simple";
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export function isQueryRun(run: Run): run is Extract<Run, { type: "query" }> {
|
|
211
|
+
return run.type === "query";
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export function isQueryBaseRun(
|
|
215
|
+
run: Run,
|
|
216
|
+
): run is Extract<Run, { type: "query_base" }> {
|
|
217
|
+
return run.type === "query_base";
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function isQueryDiffRun(
|
|
221
|
+
run: Run,
|
|
222
|
+
): run is Extract<Run, { type: "query_diff" }> {
|
|
223
|
+
return run.type === "query_diff";
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export function isValueDiffRun(
|
|
227
|
+
run: Run,
|
|
228
|
+
): run is Extract<Run, { type: "value_diff" }> {
|
|
229
|
+
return run.type === "value_diff";
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function isValueDiffDetailRun(
|
|
233
|
+
run: Run,
|
|
234
|
+
): run is Extract<Run, { type: "value_diff_detail" }> {
|
|
235
|
+
return run.type === "value_diff_detail";
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export function isSchemaDiffRun(
|
|
239
|
+
run: Run,
|
|
240
|
+
): run is Extract<Run, { type: "schema_diff" }> {
|
|
241
|
+
return run.type === "schema_diff";
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function isProfileRun(
|
|
245
|
+
run: Run,
|
|
246
|
+
): run is Extract<Run, { type: "profile" }> {
|
|
247
|
+
return run.type === "profile";
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export function isProfileDiffRun(
|
|
251
|
+
run: Run,
|
|
252
|
+
): run is Extract<Run, { type: "profile_diff" }> {
|
|
253
|
+
return run.type === "profile_diff";
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function isRowCountRun(
|
|
257
|
+
run: Run,
|
|
258
|
+
): run is Extract<Run, { type: "row_count" }> {
|
|
259
|
+
return run.type === "row_count";
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export function isRowCountDiffRun(
|
|
263
|
+
run: Run,
|
|
264
|
+
): run is Extract<Run, { type: "row_count_diff" }> {
|
|
265
|
+
return run.type === "row_count_diff";
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
export function isLineageDiffRun(
|
|
269
|
+
run: Run,
|
|
270
|
+
): run is Extract<Run, { type: "lineage_diff" }> {
|
|
271
|
+
return run.type === "lineage_diff";
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
export function isTopKDiffRun(
|
|
275
|
+
run: Run,
|
|
276
|
+
): run is Extract<Run, { type: "top_k_diff" }> {
|
|
277
|
+
return run.type === "top_k_diff";
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export function isHistogramDiffRun(
|
|
281
|
+
run: Run,
|
|
282
|
+
): run is Extract<Run, { type: "histogram_diff" }> {
|
|
283
|
+
return run.type === "histogram_diff";
|
|
284
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import axios, { AxiosInstance, AxiosResponse } from "axios";
|
|
2
|
+
import { axiosClient } from "./axiosClient";
|
|
3
|
+
|
|
4
|
+
export interface User {
|
|
5
|
+
id: string;
|
|
6
|
+
login: string;
|
|
7
|
+
login_type: string;
|
|
8
|
+
email: string;
|
|
9
|
+
onboarding_state: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface GitHubUser {
|
|
13
|
+
login: string;
|
|
14
|
+
id: number;
|
|
15
|
+
avatar_url: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function fetchUser(
|
|
19
|
+
client: AxiosInstance = axiosClient,
|
|
20
|
+
): Promise<User> {
|
|
21
|
+
try {
|
|
22
|
+
const response = await client.get<never, AxiosResponse<User>>("/api/users");
|
|
23
|
+
return response.data;
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.error("Error fetching user data:", error);
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export async function fetchGitHubAvatar(
|
|
31
|
+
userId: string,
|
|
32
|
+
): Promise<string | null> {
|
|
33
|
+
try {
|
|
34
|
+
const response = await axios.get<GitHubUser>(
|
|
35
|
+
`https://api.github.com/user/${userId}`,
|
|
36
|
+
);
|
|
37
|
+
return response.data.avatar_url;
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.warn("Failed to fetch GitHub avatar:", error);
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AxiosInstance } from "axios";
|
|
2
|
+
import { axiosClient } from "./axiosClient";
|
|
3
|
+
import { SubmitOptions, submitRun } from "./runs";
|
|
4
|
+
import { ColumnRenderMode, DataFrame } from "./types";
|
|
5
|
+
|
|
6
|
+
export interface ValueDiffResult {
|
|
7
|
+
summary: {
|
|
8
|
+
total: number;
|
|
9
|
+
added: number;
|
|
10
|
+
removed: number;
|
|
11
|
+
};
|
|
12
|
+
data: DataFrame;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ValueDiffParams {
|
|
16
|
+
model: string;
|
|
17
|
+
primary_key: string | string[];
|
|
18
|
+
columns?: string[];
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function submitValueDiff(
|
|
22
|
+
params: ValueDiffParams,
|
|
23
|
+
options?: SubmitOptions,
|
|
24
|
+
client: AxiosInstance = axiosClient,
|
|
25
|
+
) {
|
|
26
|
+
return await submitRun("value_diff", params, options, client);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type ValueDiffDetailResult = DataFrame;
|
|
30
|
+
|
|
31
|
+
export type ValueDiffDetailParams = ValueDiffParams;
|
|
32
|
+
|
|
33
|
+
export interface ValueDiffDetailViewOptions {
|
|
34
|
+
changed_only?: boolean;
|
|
35
|
+
pinned_columns?: string[];
|
|
36
|
+
display_mode?: "inline" | "side_by_side";
|
|
37
|
+
columnsRenderMode?: Record<string, ColumnRenderMode>;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export async function submitValueDiffDetail(
|
|
41
|
+
params: ValueDiffParams,
|
|
42
|
+
options?: SubmitOptions,
|
|
43
|
+
client: AxiosInstance = axiosClient,
|
|
44
|
+
) {
|
|
45
|
+
return await submitRun("value_diff_detail", params, options, client);
|
|
46
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { AxiosInstance, AxiosResponse } from "axios";
|
|
2
|
+
import { useEffect, useState } from "react";
|
|
3
|
+
import { useApiConfig } from "../hooks/ApiConfigContext";
|
|
4
|
+
import { axiosClient } from "./axiosClient";
|
|
5
|
+
|
|
6
|
+
interface VersionResponse {
|
|
7
|
+
version: string;
|
|
8
|
+
latestVersion: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export async function getVersion(
|
|
12
|
+
client: AxiosInstance = axiosClient,
|
|
13
|
+
): Promise<VersionResponse> {
|
|
14
|
+
const response = await client.get<never, AxiosResponse<VersionResponse>>(
|
|
15
|
+
"/api/version",
|
|
16
|
+
);
|
|
17
|
+
return response.data;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function useVersionNumber() {
|
|
21
|
+
const [version, setVersion] = useState("");
|
|
22
|
+
const [latestVersion, setLatestVersion] = useState("");
|
|
23
|
+
const { apiClient } = useApiConfig();
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
async function fetchVersion() {
|
|
27
|
+
try {
|
|
28
|
+
const { version, latestVersion } = await getVersion(apiClient);
|
|
29
|
+
|
|
30
|
+
setVersion(version);
|
|
31
|
+
setLatestVersion(latestVersion);
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error("Error fetching version number:", error);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
void fetchVersion();
|
|
37
|
+
}, [apiClient]);
|
|
38
|
+
|
|
39
|
+
return { version, latestVersion };
|
|
40
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
let apiUrl = process.env.NEXT_PUBLIC_API_URL;
|
|
2
|
+
apiUrl ??= typeof window !== "undefined" ? window.location.origin : "";
|
|
3
|
+
|
|
4
|
+
export const PUBLIC_API_URL = apiUrl;
|
|
5
|
+
|
|
6
|
+
let cloudWebUrl = process.env.NEXT_PUBLIC_CLOUD_WEB_URL;
|
|
7
|
+
cloudWebUrl ??= "https://cloud.datarecce.io";
|
|
8
|
+
|
|
9
|
+
export const PUBLIC_CLOUD_WEB_URL = cloudWebUrl;
|