package.json 10.4 KB
Newer Older
1
{
2
  "name": "kubernetes-dashboard",
3
  "version": "2.3.1",
4
  "type": "module",
5 6 7 8 9
  "repository": {
    "type": "git",
    "url": "https://github.com/kubernetes/dashboard.git"
  },
  "license": "Apache-2.0",
10
  "scripts": {
11 12
    "start": "concurrently \"npm run start:backend --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
    "start:https": "concurrently \"npm run start:backend:https --kubernetes-dashboard:sidecar_host=$npm_package_config_sidecar_host\" \"npm run start:frontend:https --kubernetes-dashboard:bind_address=$npm_package_config_bind_address --kubernetes-dashboard:port=$npm_package_config_port\"",
13
    "start:frontend": "npm run postversion && ng serve --proxy-config aio/proxy.conf.json --host $npm_package_config_bind_address --port $npm_package_config_port",
14
    "start:frontend:https": "node aio/scripts/version.mjs && ng serve --proxy-config aio/https-proxy.conf.json --ssl --host $npm_package_config_bind_address --port $npm_package_config_port",
15 16
    "start:backend": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --sidecarServerHost $npm_package_config_sidecar_host",
    "start:backend:https": "KUBECONFIG=${KUBECONFIG:-$npm_package_config_kubeconfig}; gulp serve --kubeconfig $KUBECONFIG --autoGenerateCerts true --sidecarServerHost $npm_package_config_sidecar_host",
17
    "start:prod": "npm run build && ./$npm_package_config_dashboard_binary_path --kubeconfig $npm_package_config_kubeconfig --locale-config $npm_package_config_dashboard_locale_config --auto-generate-certificates --bind-address $npm_package_config_bind_address --sidecar-host $npm_package_config_sidecar_host --port $npm_package_config_port",
18 19
    "build": "./aio/scripts/build.sh",
    "build:cross": "./aio/scripts/build.sh -c",
20
    "build:frontend": "npm run clean && ng build --prod --localize --outputPath=$npm_package_config_frontend_build_dir",
21 22
    "build:backend": "npm run clean && gulp backend:prod",
    "build:backend:cross": "npm run clean && gulp backend:prod:cross",
S
Sebastian Florek 已提交
23 24 25 26
    "docker:build": "npm run clean && npm run build:cross && gulp docker-image:release:cross",
    "docker:build:head": "npm run clean && npm run build:cross && gulp docker-image:head:cross",
    "docker:push": "npm run docker:build && gulp push-to-docker:release:cross",
    "docker:push:head": "npm run docker:build:head && gulp push-to-docker:head:cross",
27 28 29
    "cy:open": "npx cypress open",
    "cy:run": "npx cypress run",
    "test": "npm run test:frontend && npm run test:backend && npm run e2e",
30 31 32
    "test:frontend": "jest --config aio/jest.config.js",
    "test:frontend:coverage": "jest --config aio/jest.config.js --coverage -i",
    "test:frontend:watch": "jest --config aio/jest.config.js --watch",
33 34 35
    "test:backend": "go test github.com/kubernetes/dashboard/src/app/backend/...",
    "test:backend:coverage": "./aio/scripts/coverage-backend.sh",
    "test:coverage": "npm run test:frontend:coverage && npm run test:backend:coverage",
36
    "e2e": "concurrently -kill-others --success first \"npm run start\" \"wait-on http://localhost:8080 && npm run cy:run\"",
J
Jeffrey Sica 已提交
37 38
    "cluster:start": "./aio/scripts/start-cluster.sh",
    "cluster:stop": "./aio/scripts/stop-cluster.sh",
S
Sebastian Florek 已提交
39
    "check": "concurrently \"npm run check:backend\" \"npm run check:codegen\" \"npm run check:frontend\" \"npm run check:i18n\"",
M
Marcin Maciaszczyk 已提交
40
    "check:backend": "golangci-lint run -c .golangci.yml ./src/app/backend/...",
41
    "check:codegen": "aio/scripts/verify-codegen.sh",
M
Marcin Maciaszczyk 已提交
42
    "check:frontend": "concurrently \"npm run check:frontend:ts\" \"npm run check:frontend:scss\" \"npm run check:frontend:html\"",
43
    "check:frontend:ts": "gts lint",
M
Marcin Maciaszczyk 已提交
44 45
    "check:frontend:scss": "./aio/scripts/format.sh --styles --check && ./node_modules/sass-lint/bin/sass-lint.js -c .sass-lint.yml 'src/app/frontend/**/*.scss' -v -q",
    "check:frontend:html": "./aio/scripts/format.sh --html --check",
S
Shu Muto 已提交
46
    "check:license": "license-check-and-add check",
47
    "check:i18n": "aio/scripts/pre-commit-i18n.sh",
48
    "fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"",
M
Marcin Maciaszczyk 已提交
49
    "fix:backend": "golangci-lint run -c .golangci.yml --fix ./src/app/backend/...",
M
Marcin Maciaszczyk 已提交
50 51
    "fix:frontend": "concurrently \"npm run fix:frontend:ts\" \"npm run fix:frontend:scss\" \"npm run fix:frontend:html\"",
    "fix:frontend:ts": "gts fix",
52
    "fix:frontend:scss": "scssfmt -r 'src/**/*.scss'",
M
Marcin Maciaszczyk 已提交
53
    "fix:frontend:html": "./aio/scripts/format.sh --html",
S
Shu Muto 已提交
54
    "fix:license": "license-check-and-add add",
55
    "fix:i18n": "npm run check:i18n",
M
Marcin Maciaszczyk 已提交
56
    "clean": "rm -rf .go_workspace .tmp coverage dist npm-debug.log",
57 58
    "postversion": "node aio/scripts/version.mjs",
    "postinstall": "node aio/scripts/version.mjs && command -v golangci-lint >/dev/null 2>&1 || { curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0; } && go mod download && ./aio/scripts/install-codegen.sh && ngcc",
59
    "prepare": "husky install"
60
  },
61 62
  "lint-staged": {
    "src/**/*.ts": [
63
      "gts fix"
64 65
    ],
    "src/**/*.scss": [
66
      "scssfmt"
67 68
    ],
    "src/**/*.go": [
69
      "./aio/scripts/pre-commit-golangci-lint.sh"
S
Shu Muto 已提交
70 71
    ],
    "src/**/*.html": [
72
      "./aio/scripts/pre-commit-i18n.sh"
73 74
    ]
  },
75 76 77 78 79
  "xliffmergeOptions": {
    "srcDir": "i18n",
    "genDir": "i18n",
    "defaultLanguage": "en",
    "languages": [
80
      "de",
81
      "fr",
H
Holegots 已提交
82
      "ja",
83
      "ko",
S
Sebastian Florek 已提交
84 85 86
      "zh-Hans",
      "zh-Hant",
      "zh-Hant-HK"
87 88 89
    ],
    "beautifyOutput": true
  },
90
  "dependencies": {
91 92 93 94 95
    "@angular/animations": "12.0.2",
    "@angular/cdk": "12.0.2",
    "@angular/common": "12.0.2",
    "@angular/compiler": "12.0.2",
    "@angular/core": "12.0.2",
96
    "@angular/flex-layout": "12.0.0-beta.34",
97 98 99 100 101 102
    "@angular/forms": "12.0.2",
    "@angular/localize": "12.0.2",
    "@angular/material": "12.0.2",
    "@angular/platform-browser": "12.0.2",
    "@angular/platform-browser-dynamic": "12.0.2",
    "@angular/router": "12.0.2",
103
    "@swimlane/ngx-charts": "17.0.1",
104
    "ace-builds": "1.4.12",
105
    "angular-page-visibility": "11.0.0",
106
    "ansi-to-html": "0.6.15",
107
    "c3": "0.7.20",
108
    "core-js": "3.15.1",
109
    "d3": "6.7.0",
A
Athur Ming 已提交
110
    "file-saver": "2.0.5",
111
    "js-yaml": "4.1.0",
112
    "material-design-icons": "3.0.1",
113
    "ng-in-viewport": "6.1.5",
114
    "ngx-cookie-service": "12.0.0",
115
    "ngx-pipes": "2.7.5",
S
Sebastian Florek 已提交
116
    "normalize.css": "8.0.1",
117
    "roboto-fontface": "0.10.0",
118
    "rxjs": "6.6.7",
119
    "rxjs-compat": "6.6.7",
120
    "sockjs-client": "1.5.1",
121
    "strip-ansi": "6.0.0",
122
    "systemjs": "6.10.0",
123
    "truncate-url": "1.0.0",
124
    "tslib": "2.3.0",
S
Sebastian Florek 已提交
125
    "web-animations-js": "2.3.2",
126
    "xterm": "4.13.0",
127
    "xterm-addon-fit": "0.5.0",
128
    "zone.js": "0.11.4"
129
  },
130
  "devDependencies": {
131
    "@angular-devkit/build-angular": "12.0.2",
132 133
    "@angular/cli": "12.0.2",
    "@angular/compiler-cli": "12.0.2",
134
    "@angular/language-service": "12.0.3",
135
    "@babel/core": "7.14.6",
136
    "@babel/preset-env": "7.14.2",
137
    "@babel/register": "7.14.5",
138
    "@cypress/webpack-preprocessor": "5.9.1",
139
    "@types/c3": "0.7.5",
140
    "@types/d3": "6.7.3",
141
    "@types/d3-scale": "3.2.3",
142
    "@types/file-saver": "2.0.2",
143
    "@types/jasmine": "3.7.7",
144
    "@types/jasminewd2": "2.0.8",
145
    "@types/jest": "26.0.23",
146
    "@types/js-yaml": "4.0.1",
147
    "@types/lodash": "4.14.170",
148
    "@types/node": "15.12.4",
149
    "codelyzer": "6.0.2",
150
    "concurrently": "6.2.0",
151
    "cypress": "7.5.0",
152
    "del": "6.0.0",
153
    "eslint": "7.28.0",
154
    "eslint-plugin-rxjs": "3.3.3",
155
    "git-describe": "4.0.4",
156
    "gts": "3.1.0",
157
    "gulp": "4.0.2",
158
    "gulp-filter": "7.0.0",
159
    "husky": "6.0.0",
160
    "jasmine-core": "3.7.1",
161
    "jasmine-spec-reporter": "7.0.0",
162
    "jest": "27.0.4",
163
    "jest-preset-angular": "9.0.4",
164
    "js-beautify": "1.13.13",
165
    "license-check-and-add": "4.0.2",
166
    "lint-staged": "11.0.0",
167
    "lodash": "4.17.21",
168
    "minimatch": "3.0.4",
169
    "minimist": "1.2.5",
170
    "ngx-i18nsupport": "0.17.1",
171
    "node-gyp": "8.1.0",
172
    "q": "1.5.1",
173
    "raw-loader": "4.0.2",
174
    "run-node": "2.0.0",
175
    "sass": "1.35.1",
176
    "sass-lint": "1.13.1",
177
    "sass-loader": "12.1.0",
178
    "scssfmt": "1.0.7",
179
    "semver": "7.3.5",
180
    "source-map-explorer": "2.5.2",
181
    "tar": "6.1.0",
182
    "through2": "4.0.2",
183
    "ts-jest": "27.0.3",
184
    "ts-loader": "9.2.3",
185
    "ts-node": "10.0.0",
186
    "typescript": "4.2.4",
187
    "wait-on": "5.3.0",
188
    "webpack-dev-server": "3.11.2"
189 190
  },
  "engines": {
191
    "node": ">=14.16.1",
192
    "npm": ">=6.0.0 <7.0.0"
M
Marcin Maciaszczyk 已提交
193 194 195 196
  },
  "eslintConfig": {
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
197
      "ecmaVersion": 2020,
M
Marcin Maciaszczyk 已提交
198 199 200 201 202 203 204 205
      "project": "./tsconfig.json",
      "sourceType": "module"
    },
    "extends": "./node_modules/gts/",
    "plugins": [
      "rxjs"
    ],
    "rules": {
206
      "@typescript-eslint/ban-ts-comment": "off",
M
Marcin Maciaszczyk 已提交
207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225
      "@typescript-eslint/interface-name-prefix": "off",
      "@typescript-eslint/no-namespace": "off",
      "@typescript-eslint/no-unused-vars": "off",
      "@typescript-eslint/no-this-alias": "off",
      "@typescript-eslint/no-explicit-any": "off",
      "node/no-unpublished-import": "off",
      "no-undef": "off",
      "no-inner-declarations": "off",
      "no-redeclare": "off",
      "eol-last": "error",
      "no-console": "off",
      "no-prototype-builtins": "off",
      "no-extra-boolean-cast": "error",
      "no-else-return": "error",
      "node/no-extraneous-require": "error",
      "node/no-unpublished-require": "error",
      "prefer-rest-params": "error",
      "rxjs/no-ignored-observable": "error",
      "rxjs/no-unbound-methods": "error",
226 227
      "rxjs/no-unsafe-takeuntil": "error",
      "rxjs/no-nested-subscribe": "error"
M
Marcin Maciaszczyk 已提交
228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
    },
    "overrides": [
      {
        "files": [
          "src/**/*.spec.ts"
        ],
        "env": {
          "browser": true,
          "jest": true
        }
      }
    ],
    "ignorePatterns": [
      "**/*.js"
    ]
  },
  "eslintIgnore": [
    "node_modules/*",
M
Marcin Maciaszczyk 已提交
246 247
    "aio/*",
    "src/app/frontend/common/services/global/history.ts"
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
  ],
  "browserslist": [
    "> 0.5%",
    "last 2 versions",
    "Firefox ESR",
    "not dead",
    "not samsung 4",
    "not android 4.4.3-4.4.4",
    "not last 2 IE versions",
    "not last 2 ie_mob versions",
    "not last 2 op_mini versions",
    "not last 2 op_mob versions",
    "not last 2 baidu versions",
    "not last 2 kaios versions",
    "not last 2 and_uc versions",
    "not last 2 and_qq versions",
    "not last 2 edge versions"
M
Marcin Maciaszczyk 已提交
265
  ]
266
}