1
0
mirror of synced 2025-12-25 02:09:19 -05:00

🪟 🔧 Switch to pnpm for package managing (#22053)

* WIP

* WIP

* Adjust lockfile

* Fix issues

* Adjust github flows

* More fixes

* Adjust documentation

* Remove unnecessary tsconfig entry

* Cleanup .eslintrc

* Update dependencies

* Fix more issues

* Correct TS

* Make pnpm install run always via gradle

* Install @storybook/react explicitaly

* Update snapshots due to new libraries

* Add node-fetch types

* Add `url` package

* Freeze react router version (due to useBlocker)

* Fix typing issue

* Update airbyte-webapp/src/components/ui/BarChart/BarChart.tsx

Co-authored-by: Lake Mossman <lake@airbyte.io>

* Rewrite README

* Update e2e test library

* Remove retry

* Latest pnpm version

* Revert removal of retry logic

---------

Co-authored-by: Lake Mossman <lake@airbyte.io>
This commit is contained in:
Tim Roes
2023-02-06 16:29:21 +01:00
committed by GitHub
parent 7326731fb1
commit 86fbcdc52f
31 changed files with 15969 additions and 57995 deletions

View File

@@ -31,6 +31,15 @@ runs:
restore-keys: |
${{ inputs.cache-key }}-npm-${{ runner.os }}-
- name: pnpm Caching
uses: actions/cache@v3
with:
path: |
~/.pnpm-store
key: ${{ inputs.cache-key }}-pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ inputs.cache-key }}-pnpm-${{ runner.os }}-
# this intentionally does not use restore-keys so we don't mess with gradle caching
- name: Gradle and Python Caching
uses: actions/cache@v3

View File

@@ -126,6 +126,7 @@ definitions:
- stream_slicers
properties:
type:
type: string
enum: [CartesianProductStreamSlicer]
stream_slicers:
type: array
@@ -746,6 +747,7 @@ definitions:
- type
properties:
type:
type: string
enum: [JsonFileSchemaLoader, JsonSchema] # TODO As part of Beta, remove JsonSchema and update connectors to use JsonFileSchemaLoader
file_path:
type: string

View File

@@ -12,8 +12,8 @@ Steps:
4) When running the connector builder tests, start the dummy API server: `npm run createdummyapi`
5) Start the OSS backend: `BASIC_AUTH_USERNAME="" BASIC_AUTH_PASSWORD="" VERSION=dev docker compose --file ../docker-compose.yaml up`. If you want, follow this with `docker compose stop webapp` to turn off the dockerized frontend build; interactive cypress sessions don't use it.
6) The following two commands will start a separate long-running server, so open another terminal window. In it, `cd` into the `airbyte-webapp/` directory.
7) If you have not already done so, run `npm install` to install the frontend app's dependencies.
8) Start the frontend development server with `npm start`.
7) If you have not already done so, run `pnpm install` to install the frontend app's dependencies.
8) Start the frontend development server with `pnpm start`.
9) Back in the `airbyte-webapp-e2e-tests/` directory, start the cypress test runner with `npm run cypress:open`.
## Reproducing CI test results with `npm run cypress:ci` or `npm run cypress:ci:record`

View File

@@ -9,7 +9,7 @@ module.exports = {
"plugin:jsx-a11y/recommended",
"plugin:@airbyte/recommended",
],
plugins: ["react", "@typescript-eslint", "prettier", "unused-imports", "css-modules", "jsx-a11y", "@airbyte"],
plugins: ["@typescript-eslint", "prettier", "unused-imports", "css-modules", "jsx-a11y", "@airbyte"],
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",

View File

@@ -1 +1,2 @@
engine-strict=true
enable-pre-post-scripts=true

View File

@@ -1,31 +1,26 @@
# airbyte-webapp
This module contains the Airbyte Webapp. It is a React app written in TypeScript. It runs in a Docker container. A very lightweight nginx server runs in that Docker container and serves the webapp.
This module contains the Airbyte Webapp. It is a React app written in TypeScript.
The webapp compiles to static HTML, JavaScript and CSS, which is served (in OSS) via
a nginx in the airbyte-webapp docker image. This nginx also serves as the reverse proxy
for accessing the server APIs in other images.
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
## Building the webapp
## Available Scripts
You can build the webapp using Gradle in the root of the repository:
In the project directory, you can run:
```sh
# Only compile and build the docker webapp image:
SUB_BUILD=PLATFORM ./gradlew :airbyte-webapp:assemble
# Build the webapp and additional artifacts and run tests:
SUB_BUILD=PLATFORM ./gradlew :airbyte-webapp:build
```
### `npm start`
## Developing the webapp
Runs the app in the development mode.<br />
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
For an instruction how to develop on the webapp, please refer to our [documentation](https://docs.airbyte.com/contributing-to-airbyte/developing-locally/#develop-on-airbyte-webapp).
### `npm test`
### Entrypoints
Launches the test runner in the interactive watch mode.<br />
### `npm run build`
Builds the app for production to the `build` folder.<br />
### VERSION=yourtag ./gradlew :airbyte-webapp:assemble
Builds the app and Docker image and tags the image with `yourtag`.
Note: needs to be run from the root directory of the Airbyte project.
## Entrypoints
* `airbyte-webapp/src/App.tsx` is the entrypoint into the OSS version of the webapp.
* `airbyte-webapp/src/packages/cloud/App.tsx` is the entrypoint into the Cloud version of the webapp.

View File

@@ -1,17 +1,20 @@
plugins {
id "base"
id "com.github.node-gradle.node" version "3.3.0"
id "com.github.node-gradle.node" version "3.4.0"
}
// Use the node version that's defined in the .nvmrc file
def nodeVersion = new File("${projectDir}/.nvmrc").text.trim();
// Read pnpm version to use from package.json engines.pnpm entry
def pnpmVer = new groovy.json.JsonSlurper().parse(new File("${projectDir}/package.json")).engines.pnpm.trim();
// This array should contain a path to all configs that are common to most build tasks and
// might affect them (i.e. if any of those files change we want to rerun most tasks)
def commonConfigs = [
'.env',
'package.json',
'package-lock.json',
'pnpm-lock.yaml',
'tsconfig.json',
'.prettierrc.js'
]
@@ -19,10 +22,28 @@ def commonConfigs = [
node {
download = true
version = nodeVersion
npmInstallCommand = 'ci'
pnpmVersion = pnpmVer
}
npm_run_build {
task validateLockFiles {
description "Validate only a pnpm-lock.yaml lock file exists"
doLast {
assert file("pnpm-lock.yaml").exists()
assert !file("package-lock.json").exists()
assert !file("yarn.lock").exists()
}
}
pnpmInstall.dependsOn validateLockFiles
// Make sure `pnpmInstall` always runs, since it's better at determining
// whether it's needs to do anything than Gradle can
pnpmInstall.outputs.upToDateWhen { false }
task pnpmBuild(type: PnpmTask) {
dependsOn pnpmInstall
args = ['build']
inputs.files commonConfigs
inputs.file '.eslintrc.js'
inputs.dir 'public'
@@ -31,7 +52,7 @@ npm_run_build {
outputs.dir 'build/app'
}
task test(type: NpmTask) {
task test(type: PnpmTask) {
dependsOn assemble
args = ['run', 'test:ci']
@@ -39,8 +60,8 @@ task test(type: NpmTask) {
inputs.dir 'src'
}
task licenseCheck(type: NpmTask) {
dependsOn npmInstall
task licenseCheck(type: PnpmTask) {
dependsOn pnpmInstall
args = ['run', 'license-check']
inputs.files commonConfigs
@@ -51,8 +72,8 @@ task licenseCheck(type: NpmTask) {
outputs.upToDateWhen { true }
}
task validateLinks(type: NpmTask) {
dependsOn npmInstall
task validateLinks(type: PnpmTask) {
dependsOn pnpmInstall
args = ['run', 'validate-links']
@@ -61,8 +82,8 @@ task validateLinks(type: NpmTask) {
outputs.upToDateWhen { false }
}
task buildStorybook(type: NpmTask) {
dependsOn npmInstall
task buildStorybook(type: PnpmTask) {
dependsOn pnpmInstall
args = ['run', 'build:storybook']
inputs.files commonConfigs
@@ -78,7 +99,7 @@ task buildStorybook(type: NpmTask) {
}
task copyBuildOutput(type: Copy) {
dependsOn copyDocker, npm_run_build
dependsOn copyDocker, pnpmBuild
from "${project.projectDir}/build/app"
into 'build/docker/bin/build'

File diff suppressed because it is too large Load Diff

View File

@@ -3,17 +3,18 @@
"version": "0.40.32",
"private": true,
"engines": {
"node": "16.18.1"
"node": "16.18.1",
"pnpm": "7.26.3"
},
"scripts": {
"prepare": "cd .. && husky install airbyte-webapp/.husky",
"prestart": "npm run generate-client",
"start": "node -r ./scripts/dev-overwrites.js ./node_modules/.bin/vite",
"prestart:cloud": "npm run generate-client",
"start:cloud": "AB_ENV=${AB_ENV-frontend-dev} node -r ./scripts/environment.js -r ./scripts/dev-overwrites.js ./node_modules/.bin/vite",
"prebuild": "npm run generate-client",
"prestart": "pnpm run generate-client",
"start": "NODE_OPTIONS='-r ./scripts/dev-overwrites.js' vite",
"prestart:cloud": "pnpm run generate-client",
"start:cloud": "AB_ENV=${AB_ENV-frontend-dev} NODE_OPTIONS='-r ./scripts/environment.js -r ./scripts/dev-overwrites.js' vite",
"prebuild": "pnpm run generate-client",
"build": "vite build",
"pretest": "npm run generate-client",
"pretest": "pnpm run generate-client",
"test": "jest --watch",
"test:ci": "jest --watchAll=false --silent",
"test:coverage": "jest --coverage --watchAll=false",
@@ -41,6 +42,7 @@
"@sentry/tracing": "^6.19.6",
"@tanstack/react-table": "^8.7.0",
"@types/diff": "^5.0.2",
"@types/node-fetch": "^2.6.2",
"@types/segment-analytics": "^0.0.34",
"@types/uuid": "^9.0.0",
"classnames": "^2.3.1",
@@ -55,7 +57,6 @@
"json-schema": "^0.4.0",
"launchdarkly-js-client-sdk": "^2.22.1",
"lodash": "^4.17.21",
"mdast": "^3.0.0",
"monaco-editor": "^0.34.1",
"query-string": "^6.13.1",
"react": "^17.0.2",
@@ -68,7 +69,7 @@
"react-paginate": "^8.1.3",
"react-query": "^3.39.1",
"react-reflex": "^4.0.9",
"react-router-dom": "^6.3.0",
"react-router-dom": "6.3.0",
"react-select": "^5.4.0",
"react-slick": "^0.29.0",
"react-table": "^7.8.0",
@@ -88,11 +89,12 @@
"typesafe-actions": "^5.1.0",
"unified": "^10.1.2",
"unist-util-visit": "^4.1.0",
"url": "^0.11.0",
"uuid": "^9.0.0",
"yup": "^0.32.11"
},
"devDependencies": {
"@airbyte/eslint-plugin": "file:./packages/eslint-plugin",
"@airbyte/eslint-plugin": "link:packages/eslint-plugin",
"@babel/core": "^7.20.12",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
@@ -100,6 +102,7 @@
"@storybook/addon-actions": "^7.0.0-beta.36",
"@storybook/addon-essentials": "^7.0.0-beta.36",
"@storybook/addon-links": "^7.0.0-beta.36",
"@storybook/react": "^7.0.0-beta.36",
"@storybook/react-vite": "^7.0.0-beta.36",
"@storybook/theming": "^7.0.0-beta.36",
"@testing-library/jest-dom": "^5.16.4",
@@ -112,7 +115,6 @@
"@types/json-schema": "^7.0.11",
"@types/lodash": "^4.14.182",
"@types/node": "^17.0.40",
"@types/query-string": "^6.3.0",
"@types/react": "^17.0.39",
"@types/react-datepicker": "^4.8.0",
"@types/react-dom": "^17.0.11",
@@ -124,6 +126,7 @@
"@types/react-widgets": "^4.4.7",
"@types/sanitize-html": "^2.6.2",
"@types/styled-components": "^5.1.25",
"@types/testing-library__jest-dom": "^5.14.5",
"@types/unist": "^2.0.5",
"@typescript-eslint/eslint-plugin": "^5.27.1",
"@typescript-eslint/parser": "^5.27.1",
@@ -141,6 +144,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-unused-imports": "^2.0.0",
"express": "^4.18.1",
"history": "^5.3.0",
"husky": "^8.0.1",
"jest": "^29.3.0",
"jest-environment-jsdom": "^29.3.1",
@@ -149,7 +153,7 @@
"meow": "^9.0.0",
"node-fetch": "^2.6.7",
"optionator": "^0.9.1",
"orval": "^6.11.0-alpha.10",
"orval": "^6.11.1",
"prettier": "^2.6.2",
"react-select-event": "^5.5.0",
"storybook": "^7.0.0-beta.36",
@@ -162,9 +166,9 @@
"timezone-mock": "^1.3.4",
"tmpl": "^1.0.5",
"ts-node": "^10.8.1",
"typescript": "^4.7.3",
"typescript": "^4.9.5",
"vite": "^4.0.4",
"vite-plugin-checker": "^0.5.3",
"vite-plugin-checker": "^0.5.5",
"vite-plugin-svgr": "^2.4.0",
"vite-tsconfig-paths": "^4.0.3"
},
@@ -193,5 +197,10 @@
"last 1 firefox version",
"last 1 safari version"
]
},
"pnpm": {
"patchedDependencies": {
"react-virtualized@9.22.3": "patches/react-virtualized@9.22.3.patch"
}
}
}

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const stylelint = require("stylelint");
const rules = {

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const stylelint = require("stylelint");
const { ruleMessages } = stylelint.utils;
const ruleName = "airbyte/no-color-variables-in-rgba";

View File

@@ -1,4 +1,3 @@
// eslint-disable-next-line @typescript-eslint/no-var-requires
const stylelint = require("stylelint");
const { ruleMessages } = stylelint.utils;
const ruleName = "airbyte/no-use-renaming";

View File

@@ -1,2 +1 @@
export { patchReactVirtualized } from "./patch-react-virtualized";
export { docMiddleware } from "./doc-middleware";

View File

@@ -1,29 +0,0 @@
import type { Plugin } from "vite";
import fs from "fs";
import path from "path";
// Patches the react-virtualized library which is pulled in by react-lazylog to remove
// a broken import in it. See https://github.com/bvaughn/react-virtualized/issues/1632
const WRONG_CODE = `import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";`;
export function patchReactVirtualized(): Plugin {
return {
name: "airbyte/patch-react-virtualized",
// Note: we cannot use the `transform` hook here
// because libraries are pre-bundled in vite directly,
// plugins aren't able to hack that step currently.
// so instead we manually edit the file in node_modules.
// all we need is to find the timing before pre-bundling.
configResolved() {
const file = require
.resolve("react-lazylog/node_modules/react-virtualized")
.replace(
path.join("dist", "commonjs", "index.js"),
path.join("dist", "es", "WindowScroller", "utils", "onScroll.js")
);
const code = fs.readFileSync(file, "utf-8");
const modified = code.replace(WRONG_CODE, "");
fs.writeFileSync(file, modified);
},
};
}

View File

@@ -0,0 +1,10 @@
diff --git a/dist/es/WindowScroller/utils/onScroll.js b/dist/es/WindowScroller/utils/onScroll.js
index d00f0f18c6596e4e57f4f762f91fed4282610c91..c8496e8eabafdf9cf6071986ec446839d7b65556 100644
--- a/dist/es/WindowScroller/utils/onScroll.js
+++ b/dist/es/WindowScroller/utils/onScroll.js
@@ -71,4 +71,3 @@ export function unregisterScrollListener(component, element) {
}
}
}
\ No newline at end of file
-import { bpfrpt_proptype_WindowScroller } from "../WindowScroller.js";

15795
airbyte-webapp/pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -98,7 +98,7 @@ exports[`<BulkEditPanel /> should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"
d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"
fill="currentColor"
/>
</svg>
@@ -163,7 +163,7 @@ exports[`<BulkEditPanel /> should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"
d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"
fill="currentColor"
/>
</svg>
@@ -228,7 +228,7 @@ exports[`<BulkEditPanel /> should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"
d="M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"
fill="currentColor"
/>
</svg>

View File

@@ -200,7 +200,7 @@ exports[`CreateConnectionForm should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -322,7 +322,7 @@ exports[`CreateConnectionForm should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -460,7 +460,7 @@ exports[`CreateConnectionForm should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -575,7 +575,7 @@ exports[`CreateConnectionForm should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M449.9 39.96l-48.5 48.53C362.5 53.19 311.4 32 256 32C161.5 32 78.59 92.34 49.58 182.2c-5.438 16.81 3.797 34.88 20.61 40.28c16.97 5.5 34.86-3.812 40.3-20.59C130.9 138.5 189.4 96 256 96c37.96 0 73 14.18 100.2 37.8L311.1 178C295.1 194.8 306.8 223.4 330.4 224h146.9C487.7 223.7 496 215.3 496 204.9V59.04C496 34.99 466.9 22.95 449.9 39.96zM441.8 289.6c-16.94-5.438-34.88 3.812-40.3 20.59C381.1 373.5 322.6 416 256 416c-37.96 0-73-14.18-100.2-37.8L200 334C216.9 317.2 205.2 288.6 181.6 288H34.66C24.32 288.3 16 296.7 16 307.1v145.9c0 24.04 29.07 36.08 46.07 19.07l48.5-48.53C149.5 458.8 200.6 480 255.1 480c94.45 0 177.4-60.34 206.4-150.2C467.9 313 458.6 294.1 441.8 289.6z"
d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"
fill="currentColor"
/>
</svg>
@@ -849,11 +849,11 @@ exports[`CreateConnectionForm should render 1`] = `
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 320 512"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"
d="M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"
fill="currentColor"
/>
</svg>
@@ -972,7 +972,7 @@ exports[`CreateConnectionForm should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>

View File

@@ -549,7 +549,7 @@ function builderStreamSlicerToManifest(
};
}
const EMPTY_SCHEMA = { type: "InlineSchemaLoader", schema: {} };
const EMPTY_SCHEMA = { type: "InlineSchemaLoader", schema: {} } as const;
function parseSchemaString(schema?: string): DeclarativeStreamSchemaLoader {
if (!schema) {

View File

@@ -5,15 +5,12 @@ import { ResolveManifest } from "core/request/ConnectorBuilderClient";
import {
CartesianProductStreamSlicer,
ConnectorManifest,
DatetimeStreamSlicer,
DeclarativeStream,
DeclarativeStreamSchemaLoader,
DpathExtractor,
HttpRequester,
HttpRequesterAuthenticator,
InlineSchemaLoader,
InterpolatedRequestOptionsProvider,
ListStreamSlicer,
SimpleRetriever,
SimpleRetrieverPaginator,
SimpleRetrieverStreamSlicer,
@@ -203,18 +200,18 @@ function manifestStreamSlicerToBuilder(
}
if (manifestStreamSlicer.type === "DatetimeStreamSlicer") {
const datetimeStreamSlicer = manifestStreamSlicer as DatetimeStreamSlicer;
const datetimeStreamSlicer = manifestStreamSlicer;
if (
typeof datetimeStreamSlicer.start_datetime !== "string" ||
typeof datetimeStreamSlicer.end_datetime !== "string"
) {
throw new ManifestCompatibilityError(streamName, "start_datetime or end_datetime are not set to a string value");
}
return manifestStreamSlicer as DatetimeStreamSlicer;
return manifestStreamSlicer;
}
if (manifestStreamSlicer.type === "ListStreamSlicer") {
return manifestStreamSlicer as ListStreamSlicer;
return manifestStreamSlicer;
}
if (manifestStreamSlicer.type === "CartesianProductStreamSlicer") {
@@ -229,7 +226,7 @@ function manifestStreamSlicerToBuilder(
}
if (manifestStreamSlicer.type === "SubstreamSlicer") {
const manifestSubstreamSlicer = manifestStreamSlicer as SubstreamSlicer;
const manifestSubstreamSlicer = manifestStreamSlicer;
if (manifestSubstreamSlicer.parent_stream_configs.length > 1) {
throw new ManifestCompatibilityError(streamName, "SubstreamSlicer has more than one parent stream");
@@ -311,7 +308,7 @@ function manifestSchemaLoaderToBuilderSchema(
}
if (manifestSchemaLoader.type === "InlineSchemaLoader") {
const inlineSchemaLoader = manifestSchemaLoader as InlineSchemaLoader;
const inlineSchemaLoader = manifestSchemaLoader;
return inlineSchemaLoader.schema ? formatJson(inlineSchemaLoader.schema) : undefined;
}

View File

@@ -1,5 +1,5 @@
import React, { useMemo } from "react";
import { FormattedNumber } from "react-intl";
import { useIntl } from "react-intl";
import {
Bar,
BarChart as BasicBarChart,
@@ -23,6 +23,7 @@ interface BarChartProps {
}
export const BarChart: React.FC<BarChartProps> = React.memo(({ data, legendLabels, xLabel, yLabel }) => {
const { formatNumber } = useIntl();
const chartLinesColor = theme.grey100;
const chartTicksColor = theme.grey;
const chartHoverFill = theme.grey100;
@@ -67,7 +68,14 @@ export const BarChart: React.FC<BarChartProps> = React.memo(({ data, legendLabel
<Tooltip
cursor={{ fill: chartHoverFill }}
formatter={(value: number) => {
return [<FormattedNumber value={value} maximumFractionDigits={2} minimumFractionDigits={2} />, yLabel];
// The type cast is unfortunately necessary, due to broken typing in recharts.
// What we return is a [string, string], and the library accepts this as well, but the types
// require the first element to be of the same type as value, which isn't what the formatter
// is supposed to do: https://github.com/recharts/recharts/issues/3008
return [formatNumber(value, { maximumFractionDigits: 2, minimumFractionDigits: 2 }), yLabel] as unknown as [
number,
string
];
}}
/>
{legendLabels.map((barName, key) => (

View File

@@ -1,4 +1,3 @@
import { Root } from "mdast";
import { Plugin } from "unified";
import { Node } from "unist";
import { visit } from "unist-util-visit";
@@ -11,7 +10,7 @@ import styles from "./admonitions.module.scss";
const SUPPORTED_ADMONITION_NAMES: Readonly<string[]> = ["note", "tip", "info", "caution", "warning", "danger"];
const SUPPORTED_NODE_TYPES: Readonly<string[]> = ["textDirective", "leafDirective", "containerDirective"];
export const remarkAdmonitionsPlugin: Plugin<[], Root> = () => (tree) => {
export const remarkAdmonitionsPlugin: Plugin<[]> = () => (tree) => {
visit<Node & { name?: string }>(tree, (node) => {
if (!node.name || !SUPPORTED_ADMONITION_NAMES.includes(node.name) || !SUPPORTED_NODE_TYPES.includes(node.type)) {
return;

View File

@@ -3,6 +3,7 @@ import classNames from "classnames";
import { PropsWithChildren } from "react";
import styles from "./NextTable.module.scss";
import { ColumnMeta } from "./types";
export interface TableProps<T> {
className?: string;
@@ -35,7 +36,7 @@ export const NextTable = <T,>({
{table.getHeaderGroups().map((headerGroup) => (
<tr key={`table-header-${headerGroup.id}}`}>
{headerGroup.headers.map((header) => {
const { meta } = header.column.columnDef;
const meta = header.column.columnDef.meta as ColumnMeta | undefined;
return (
<th
colSpan={header.colSpan}
@@ -63,16 +64,19 @@ export const NextTable = <T,>({
key={`table-row-${row.id}`}
onClick={() => onClickRow?.(row.original)}
>
{row.getVisibleCells().map((cell) => (
<td
className={classNames(styles.td, cell.column.columnDef.meta?.tdClassName, {
[styles.responsive]: cell.column.columnDef.meta?.responsive,
})}
key={`table-cell-${row.id}-${cell.id}`}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
{row.getVisibleCells().map((cell) => {
const meta = cell.column.columnDef.meta as ColumnMeta | undefined;
return (
<td
className={classNames(styles.td, meta?.tdClassName, {
[styles.responsive]: meta?.responsive,
})}
key={`table-cell-${row.id}-${cell.id}`}
>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
);
})}
</tr>
);
})}

View File

@@ -0,0 +1,5 @@
export interface ColumnMeta {
responsive?: boolean;
thClassName?: string;
tdClassName?: string;
}

View File

@@ -15,7 +15,6 @@ function getRequestBody<U>(data: U) {
if (nonJsonObject) {
// The app tries to stringify blobs which results in broken functionality.
// There may be some edge cases where we pass in an empty object.
// @ts-expect-error There may be a better way to do this, but for now it solves the problem.
return data as BodyInit;
}
return stringifiedData;

View File

@@ -26,7 +26,7 @@ exports[`<GitBlock /> should render with default props 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
fill="currentColor"
/>
</svg>
@@ -75,7 +75,7 @@ exports[`<GitBlock /> should render with overwritten props 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3 .3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5 .3-6.2 2.3zm44.2-1.7c-2.9 .7-4.9 2.6-4.6 4.9 .3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3 .7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3 .3 2.9 2.3 3.9 1.6 1 3.6 .7 4.3-.7 .7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3 .7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3 .7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
d="M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"
fill="currentColor"
/>
</svg>

View File

@@ -131,7 +131,7 @@ exports[`ConnectionReplicationPage should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -253,7 +253,7 @@ exports[`ConnectionReplicationPage should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -391,7 +391,7 @@ exports[`ConnectionReplicationPage should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>
@@ -506,7 +506,7 @@ exports[`ConnectionReplicationPage should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M449.9 39.96l-48.5 48.53C362.5 53.19 311.4 32 256 32C161.5 32 78.59 92.34 49.58 182.2c-5.438 16.81 3.797 34.88 20.61 40.28c16.97 5.5 34.86-3.812 40.3-20.59C130.9 138.5 189.4 96 256 96c37.96 0 73 14.18 100.2 37.8L311.1 178C295.1 194.8 306.8 223.4 330.4 224h146.9C487.7 223.7 496 215.3 496 204.9V59.04C496 34.99 466.9 22.95 449.9 39.96zM441.8 289.6c-16.94-5.438-34.88 3.812-40.3 20.59C381.1 373.5 322.6 416 256 416c-37.96 0-73-14.18-100.2-37.8L200 334C216.9 317.2 205.2 288.6 181.6 288H34.66C24.32 288.3 16 296.7 16 307.1v145.9c0 24.04 29.07 36.08 46.07 19.07l48.5-48.53C149.5 458.8 200.6 480 255.1 480c94.45 0 177.4-60.34 206.4-150.2C467.9 313 458.6 294.1 441.8 289.6z"
d="M142.9 142.9c62.2-62.2 162.7-62.5 225.3-1L327 183c-6.9 6.9-8.9 17.2-5.2 26.2s12.5 14.8 22.2 14.8H463.5c0 0 0 0 0 0H472c13.3 0 24-10.7 24-24V72c0-9.7-5.8-18.5-14.8-22.2s-19.3-1.7-26.2 5.2L413.4 96.6c-87.6-86.5-228.7-86.2-315.8 1C73.2 122 55.6 150.7 44.8 181.4c-5.9 16.7 2.9 34.9 19.5 40.8s34.9-2.9 40.8-19.5c7.7-21.8 20.2-42.3 37.8-59.8zM16 312v7.6 .7V440c0 9.7 5.8 18.5 14.8 22.2s19.3 1.7 26.2-5.2l41.6-41.6c87.6 86.5 228.7 86.2 315.8-1c24.4-24.4 42.1-53.1 52.9-83.7c5.9-16.7-2.9-34.9-19.5-40.8s-34.9 2.9-40.8 19.5c-7.7 21.8-20.2 42.3-37.8 59.8c-62.2 62.2-162.7 62.5-225.3 1L185 329c6.9-6.9 8.9-17.2 5.2-26.2s-12.5-14.8-22.2-14.8H48.4h-.7H40c-13.3 0-24 10.7-24 24z"
fill="currentColor"
/>
</svg>
@@ -780,11 +780,11 @@ exports[`ConnectionReplicationPage should render 1`] = `
data-prefix="fas"
focusable="false"
role="img"
viewBox="0 0 320 512"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"
d="M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"
fill="currentColor"
/>
</svg>
@@ -903,7 +903,7 @@ exports[`ConnectionReplicationPage should render 1`] = `
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M311.9 335.1l-132.4 136.8C174.1 477.3 167.1 480 160 480c-7.055 0-14.12-2.702-19.47-8.109l-132.4-136.8C-9.229 317.8 3.055 288 27.66 288h264.7C316.9 288 329.2 317.8 311.9 335.1z"
d="M182.6 470.6c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-9.2-9.2-11.9-22.9-6.9-34.9s16.6-19.8 29.6-19.8H288c12.9 0 24.6 7.8 29.6 19.8s2.2 25.7-6.9 34.9l-128 128z"
fill="currentColor"
/>
</svg>

View File

@@ -1,14 +0,0 @@
import "@tanstack/react-table";
/**
* This extends to ColumnMeta interface to support optional <th/> and <td/> styling
* More info: https://tanstack.com/table/v8/docs/api/core/table#meta
* Undocumented 'meta' access: https://github.com/TanStack/table/issues/3983#issuecomment-1142334750
*/
declare module "@tanstack/table-core" {
interface ColumnMeta {
responsive?: boolean;
tdClassName?: string;
thClassName?: string;
}
}

View File

@@ -39,11 +39,11 @@ exports[`<mockFrequentlyUsedConnectors /> should renders with mock data without
focusable="false"
role="img"
style="display: block;"
viewBox="0 0 320 512"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M224 480c-8.188 0-16.38-3.125-22.62-9.375l-192-192c-12.5-12.5-12.5-32.75 0-45.25l192-192c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25L77.25 256l169.4 169.4c12.5 12.5 12.5 32.75 0 45.25C240.4 476.9 232.2 480 224 480z"
d="M41.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l192 192c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.3 256 278.6 86.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-192 192z"
fill="currentColor"
/>
</svg>
@@ -331,11 +331,11 @@ exports[`<mockFrequentlyUsedConnectors /> should renders with mock data without
focusable="false"
role="img"
style="display: block;"
viewBox="0 0 320 512"
viewBox="0 0 384 512"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M96 480c-8.188 0-16.38-3.125-22.62-9.375c-12.5-12.5-12.5-32.75 0-45.25L242.8 256L73.38 86.63c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0l192 192c12.5 12.5 12.5 32.75 0 45.25l-192 192C112.4 476.9 104.2 480 96 480z"
d="M342.6 233.4c12.5 12.5 12.5 32.8 0 45.3l-192 192c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3L274.7 256 105.4 86.6c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0l192 192z"
fill="currentColor"
/>
</svg>

View File

@@ -8,7 +8,7 @@ import checker from "vite-plugin-checker";
import svgrPlugin from "vite-plugin-svgr";
import viteTsconfigPaths from "vite-tsconfig-paths";
import { docMiddleware, patchReactVirtualized } from "./packages/vite-plugins";
import { docMiddleware } from "./packages/vite-plugins";
export default defineConfig(({ mode }) => {
// Load variables from all .env files
@@ -51,7 +51,6 @@ export default defineConfig(({ mode }) => {
},
typescript: true,
}),
patchReactVirtualized(),
docMiddleware(),
],
// Use `REACT_APP_` as a prefix for environment variables that should be accessible from within FE code.

View File

@@ -174,12 +174,26 @@ BASIC_AUTH_USERNAME="" BASIC_AUTH_PASSWORD="" docker compose up
Note: [basic auth](https://docs.airbyte.com/operator-guides/security#network-security) must be disabled by setting `BASIC_AUTH_USERNAME` and `BASIC_AUTH_PASSWORD` to empty values, otherwise requests from the development server will fail against the local API.
- Start up the react app.
- Install [`nvm`](https://github.com/nvm-sh/nvm) (Node Version Manager) if not installed
- Use `nvm` to install the required node version:
```bash
cd airbyte-webapp
npm install
npm start
nvm install
```
- Install the `pnpm` package manager in the required version:
```bash
# <version> must be the exact version from airbyte-webapp/package.json > engines.pnpm
npm install -g pnpm@<version>
```
- Start up the react app.
```bash
pnpm install
pnpm start
```
- Happy Hacking!