apache-airflow.airflow-frontend: migrate from mkYarnPackage (#460498)
This commit is contained in:
@@ -1,152 +0,0 @@
|
||||
{
|
||||
"name": "airflow-www",
|
||||
"version": "1.0.0",
|
||||
"description": "Apache Airflow is a platform to programmatically author, schedule and monitor workflows.",
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"dev": "NODE_ENV=development webpack --watch --progress --devtool eval-cheap-source-map --mode development",
|
||||
"prod": "NODE_ENV=production node --max_old_space_size=4096 ./node_modules/webpack/bin/webpack.js --mode production --progress",
|
||||
"build": "NODE_ENV=production webpack --progress --mode production",
|
||||
"lint": "eslint --ignore-path=.eslintignore --max-warnings=0 --ext .js,.jsx,.ts,.tsx . && tsc",
|
||||
"lint:fix": "eslint --fix --ignore-path=.eslintignore --ext .js,.jsx,.ts,.tsx . && tsc",
|
||||
"format": "yarn prettier --write .",
|
||||
"generate-api-types": "npx openapi-typescript \"../api_connexion/openapi/v1.yaml\" --output static/js/types/api-generated.ts && node alias-rest-types.js static/js/types/api-generated.ts"
|
||||
},
|
||||
"author": "Apache",
|
||||
"license": "Apache-2.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/apache/airflow.git"
|
||||
},
|
||||
"homepage": "https://airflow.apache.org/",
|
||||
"keywords": [
|
||||
"big",
|
||||
"data",
|
||||
"workflow",
|
||||
"airflow",
|
||||
"d3",
|
||||
"nerds",
|
||||
"database",
|
||||
"flask"
|
||||
],
|
||||
"browserslist": {
|
||||
"production": [
|
||||
">0.2%",
|
||||
"not dead",
|
||||
"not op_mini all"
|
||||
],
|
||||
"development": [
|
||||
"last 1 chrome version",
|
||||
"last 1 firefox version",
|
||||
"last 1 safari version"
|
||||
]
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.18.5",
|
||||
"@babel/eslint-parser": "^7.18.2",
|
||||
"@babel/plugin-transform-runtime": "^7.16.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@babel/preset-react": "^7.16.0",
|
||||
"@babel/preset-typescript": "^7.17.12",
|
||||
"@testing-library/jest-dom": "^5.16.0",
|
||||
"@testing-library/react": "^13.0.0",
|
||||
"@types/color": "^3.0.3",
|
||||
"@types/react": "^18.0.12",
|
||||
"@types/react-dom": "^18.0.5",
|
||||
"@types/react-syntax-highlighter": "^15.5.6",
|
||||
"@types/react-table": "^7.7.12",
|
||||
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
||||
"@typescript-eslint/parser": "^5.0.0",
|
||||
"babel-jest": "^27.3.1",
|
||||
"babel-loader": "^9.1.0",
|
||||
"clean-webpack-plugin": "^3.0.0",
|
||||
"copy-webpack-plugin": "^6.0.3",
|
||||
"css-loader": "5.2.7",
|
||||
"css-minimizer-webpack-plugin": "^4.0.0",
|
||||
"eslint": "^8.6.0",
|
||||
"eslint-config-airbnb": "^19.0.4",
|
||||
"eslint-config-airbnb-typescript": "^17.0.0",
|
||||
"eslint-config-prettier": "^8.6.0",
|
||||
"eslint-plugin-html": "^6.0.2",
|
||||
"eslint-plugin-import": "^2.27.5",
|
||||
"eslint-plugin-jsx-a11y": "^6.5.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.2.1",
|
||||
"eslint-plugin-react": "^7.30.0",
|
||||
"eslint-plugin-react-hooks": "^4.5.0",
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"file-loader": "^6.0.0",
|
||||
"imports-loader": "^1.1.0",
|
||||
"jest": "^27.3.1",
|
||||
"jest-canvas-mock": "^2.5.1",
|
||||
"mini-css-extract-plugin": "^1.6.2",
|
||||
"moment": "^2.29.4",
|
||||
"moment-locales-webpack-plugin": "^1.2.0",
|
||||
"nock": "^13.2.4",
|
||||
"openapi-typescript": "^5.4.1",
|
||||
"prettier": "^2.8.4",
|
||||
"style-loader": "^1.2.1",
|
||||
"stylelint": "^15.10.1",
|
||||
"stylelint-config-prettier": "^9.0.5",
|
||||
"stylelint-config-standard": "^20.0.0",
|
||||
"terser-webpack-plugin": "<5.0.0",
|
||||
"typescript": "^4.6.3",
|
||||
"url-loader": "4.1.0",
|
||||
"web-worker": "^1.2.0",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-cli": "^4.0.0",
|
||||
"webpack-license-plugin": "^4.2.1",
|
||||
"webpack-manifest-plugin": "^4.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@chakra-ui/react": "2.4.2",
|
||||
"@emotion/cache": "^11.9.3",
|
||||
"@emotion/react": "^11.9.3",
|
||||
"@emotion/styled": "^11",
|
||||
"@visx/group": "^2.10.0",
|
||||
"@visx/shape": "^2.12.2",
|
||||
"axios": "^0.26.0",
|
||||
"bootstrap-3-typeahead": "^4.0.2",
|
||||
"camelcase-keys": "^7.0.0",
|
||||
"chakra-react-select": "^4.0.0",
|
||||
"codemirror": "^5.59.1",
|
||||
"color": "^4.2.3",
|
||||
"d3": "^3.4.4",
|
||||
"d3-selection": "^3.0.0",
|
||||
"d3-shape": "^2.1.0",
|
||||
"d3-tip": "^0.9.1",
|
||||
"dagre-d3": "^0.6.4",
|
||||
"datatables.net": "^1.11.4",
|
||||
"datatables.net-bs": "^1.11.4",
|
||||
"echarts": "^5.4.2",
|
||||
"elkjs": "^0.7.1",
|
||||
"eonasdan-bootstrap-datetimepicker": "^4.17.47",
|
||||
"framer-motion": "^6.0.0",
|
||||
"jquery": ">=3.5.0",
|
||||
"jshint": "^2.13.4",
|
||||
"lodash": "^4.17.21",
|
||||
"moment-timezone": "^0.5.43",
|
||||
"nvd3": "^1.8.6",
|
||||
"react": "^18.0.0",
|
||||
"react-dom": "^18.0.0",
|
||||
"react-icons": "^4.9.0",
|
||||
"react-json-view": "^1.21.3",
|
||||
"react-markdown": "^8.0.4",
|
||||
"react-query": "^3.39.1",
|
||||
"react-router-dom": "^6.3.0",
|
||||
"react-syntax-highlighter": "^15.5.0",
|
||||
"react-table": "^7.8.0",
|
||||
"react-textarea-autosize": "^8.3.4",
|
||||
"reactflow": "^11.7.4",
|
||||
"redoc": "^2.0.0-rc.72",
|
||||
"remark-gfm": "^3.0.1",
|
||||
"swagger-ui-dist": "4.1.3",
|
||||
"tsconfig-paths": "^3.14.2",
|
||||
"type-fest": "^2.17.0",
|
||||
"url-search-params-polyfill": "^8.1.0",
|
||||
"validator": "^13.9.0"
|
||||
},
|
||||
"resolutions": {
|
||||
"d3-color": "^3.1.0"
|
||||
}
|
||||
}
|
||||
@@ -79,7 +79,10 @@
|
||||
pytest-asyncio,
|
||||
pytestCheckHook,
|
||||
time-machine,
|
||||
mkYarnPackage,
|
||||
yarnConfigHook,
|
||||
yarnBuildHook,
|
||||
nodejs,
|
||||
webpack-cli,
|
||||
fetchYarnDeps,
|
||||
writeScript,
|
||||
|
||||
@@ -102,18 +105,22 @@ let
|
||||
# airflow bundles a web interface, which is built using webpack by an undocumented shell script in airflow's source tree.
|
||||
# This replicates this shell script, fixing bugs in yarn.lock and package.json
|
||||
|
||||
airflow-frontend = mkYarnPackage rec {
|
||||
airflow-frontend = stdenv.mkDerivation rec {
|
||||
name = "airflow-frontend";
|
||||
|
||||
src = "${airflow-src}/airflow/www";
|
||||
packageJSON = ./package.json;
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-WQKuQgNp35fU6z7owequXOSwoUGJDJYcUgkjPDMOops=";
|
||||
};
|
||||
|
||||
distPhase = "true";
|
||||
nativeBuildInputs = [
|
||||
yarnConfigHook
|
||||
yarnBuildHook
|
||||
nodejs
|
||||
webpack-cli
|
||||
];
|
||||
|
||||
# The webpack license plugin tries to create /licenses when given the
|
||||
# original relative path
|
||||
@@ -121,12 +128,7 @@ let
|
||||
sed -i 's!../../../../licenses/LICENSES-ui.txt!licenses/LICENSES-ui.txt!' webpack.config.js
|
||||
'';
|
||||
|
||||
configurePhase = ''
|
||||
cp -r $node_modules node_modules
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
yarn --offline build
|
||||
postBuild = ''
|
||||
find package.json yarn.lock static/css static/js -type f | sort | xargs md5sum > static/dist/sum.md5
|
||||
'';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user