package.json 10.3 KB
Newer Older
1
{
2
  "name": "kubernetes-dashboard",
3
  "version": "2.2.0",
4 5 6 7 8
  "repository": {
    "type": "git",
    "url": "https://github.com/kubernetes/dashboard.git"
  },
  "license": "Apache-2.0",
9
  "scripts": {
10 11
    "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\"",
12 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",
    "start:frontend:https": "node aio/scripts/version.js && ng serve --proxy-config aio/https-proxy.conf.json --ssl --host $npm_package_config_bind_address --port $npm_package_config_port",
14 15
    "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",
16
    "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",
17 18
    "build": "./aio/scripts/build.sh",
    "build:cross": "./aio/scripts/build.sh -c",
S
Sebastian Florek 已提交
19
    "build:frontend": "npm run clean && ng build --aot --prod --localize --outputPath=$npm_package_config_frontend_build_dir",
20 21
    "build:backend": "npm run clean && gulp backend:prod",
    "build:backend:cross": "npm run clean && gulp backend:prod:cross",
S
Sebastian Florek 已提交
22 23 24 25
    "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",
26 27 28
    "cy:open": "npx cypress open",
    "cy:run": "npx cypress run",
    "test": "npm run test:frontend && npm run test:backend && npm run e2e",
29 30 31
    "test:frontend": "ng test --karma-config ./aio/karma.conf.js --watch=false",
    "test:frontend:coverage": "ng test --karma-config ./aio/karma.conf.js --watch=false --code-coverage",
    "test:frontend:watch": "ng test --karma-config ./aio/karma.conf.js",
32 33 34
    "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",
35
    "e2e": "concurrently -kill-others --success first \"npm run start\" \"wait-on http://localhost:8080 && npm run cy:run\"",
J
Jeffrey Sica 已提交
36 37
    "cluster:start": "./aio/scripts/start-cluster.sh",
    "cluster:stop": "./aio/scripts/stop-cluster.sh",
S
Sebastian Florek 已提交
38
    "check": "concurrently \"npm run check:backend\" \"npm run check:codegen\" \"npm run check:frontend\" \"npm run check:i18n\"",
M
Marcin Maciaszczyk 已提交
39
    "check:backend": "golangci-lint run -c .golangci.yml ./src/app/backend/...",
40
    "check:codegen": "aio/scripts/verify-codegen.sh",
M
Marcin Maciaszczyk 已提交
41
    "check:frontend": "concurrently \"npm run check:frontend:ts\" \"npm run check:frontend:scss\" \"npm run check:frontend:html\"",
42
    "check:frontend:ts": "gts lint",
M
Marcin Maciaszczyk 已提交
43 44
    "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 已提交
45
    "check:license": "license-check-and-add check",
S
Shu Muto 已提交
46
    "check:i18n": "ng extract-i18n --no-progress --output-path ./i18n/ && aio/scripts/xliffmerge.sh",
47
    "fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"",
M
Marcin Maciaszczyk 已提交
48
    "fix:backend": "golangci-lint run -c .golangci.yml --fix ./src/app/backend/...",
M
Marcin Maciaszczyk 已提交
49 50
    "fix:frontend": "concurrently \"npm run fix:frontend:ts\" \"npm run fix:frontend:scss\" \"npm run fix:frontend:html\"",
    "fix:frontend:ts": "gts fix",
51
    "fix:frontend:scss": "scssfmt -r 'src/**/*.scss'",
M
Marcin Maciaszczyk 已提交
52
    "fix:frontend:html": "./aio/scripts/format.sh --html",
S
Shu Muto 已提交
53
    "fix:license": "license-check-and-add add",
S
Shu Muto 已提交
54
    "fix:i18n": "ng extract-i18n --output-path ./i18n/ && aio/scripts/xliffmerge.sh",
M
Marcin Maciaszczyk 已提交
55
    "clean": "rm -rf .go_workspace .tmp coverage dist npm-debug.log",
56
    "postversion": "node aio/scripts/version.js",
M
Marcin Maciaszczyk 已提交
57
    "postinstall": "node aio/scripts/version.js && 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"
58
  },
59 60
  "husky": {
    "hooks": {
61
      "pre-commit": "lint-staged"
62 63
    }
  },
64 65
  "lint-staged": {
    "src/**/*.ts": [
66
      "gts fix"
67 68
    ],
    "src/**/*.scss": [
69
      "scssfmt"
70 71
    ],
    "src/**/*.go": [
72
      "./aio/scripts/pre-commit-golangci-lint.sh"
S
Shu Muto 已提交
73 74
    ],
    "src/**/*.html": [
75
      "./aio/scripts/pre-commit-i18n.sh"
76 77
    ]
  },
78 79 80 81 82
  "xliffmergeOptions": {
    "srcDir": "i18n",
    "genDir": "i18n",
    "defaultLanguage": "en",
    "languages": [
83
      "de",
84
      "fr",
H
Holegots 已提交
85
      "ja",
86
      "ko",
S
Sebastian Florek 已提交
87 88 89
      "zh-Hans",
      "zh-Hant",
      "zh-Hant-HK"
90 91 92
    ],
    "beautifyOutput": true
  },
93
  "dependencies": {
A
Athur Ming 已提交
94 95 96 97 98 99 100 101 102 103 104 105
    "@angular/animations": "11.0.6",
    "@angular/cdk": "11.0.3",
    "@angular/common": "11.0.6",
    "@angular/compiler": "11.0.6",
    "@angular/core": "11.0.6",
    "@angular/flex-layout": "11.0.0-beta.33",
    "@angular/forms": "11.0.6",
    "@angular/localize": "11.0.6",
    "@angular/material": "11.0.3",
    "@angular/platform-browser": "11.0.6",
    "@angular/platform-browser-dynamic": "11.0.6",
    "@angular/router": "11.0.6",
106
    "@swimlane/ngx-charts": "17.0.1",
107
    "ace-builds": "1.4.12",
108
    "angular-page-visibility": "9.0.6",
A
Athur Ming 已提交
109
    "ansi-to-html": "0.6.14",
110
    "c3": "0.7.20",
111
    "core-js": "3.9.1",
112
    "d3": "6.5.0",
A
Athur Ming 已提交
113
    "file-saver": "2.0.5",
114
    "highlight.js": "10.6.0",
A
Athur Ming 已提交
115
    "js-yaml": "4.0.0",
116
    "material-design-icons": "3.0.1",
117
    "ng-in-viewport": "6.1.4",
A
Athur Ming 已提交
118
    "ngx-cookie-service": "11.0.2",
119
    "ngx-filter-pipe": "2.1.2",
S
Sebastian Florek 已提交
120
    "normalize.css": "8.0.1",
121
    "roboto-fontface": "0.10.0",
122
    "rxjs": "6.6.6",
123
    "rxjs-compat": "6.6.6",
124
    "sockjs-client": "1.5.0",
A
Athur Ming 已提交
125
    "systemjs": "6.8.3",
126
    "truncate-url": "1.0.0",
A
Athur Ming 已提交
127
    "tslib": "2.1.0",
S
Sebastian Florek 已提交
128
    "web-animations-js": "2.3.2",
129
    "xterm": "4.9.0",
130
    "xterm-addon-fit": "0.5.0",
131
    "zone.js": "0.11.4"
132
  },
133
  "devDependencies": {
134
    "@angular-devkit/build-angular": "0.1102.2",
135
    "@angular/cli": "11.2.2",
A
Athur Ming 已提交
136
    "@angular/compiler-cli": "11.0.6",
137
    "@angular/language-service": "11.2.3",
138
    "@cypress/webpack-preprocessor": "5.6.0",
139
    "@types/c3": "0.7.5",
140
    "@types/d3": "6.3.0",
141 142 143
    "@types/d3-scale": "3.2.2",
    "@types/file-saver": "2.0.1",
    "@types/highlight.js": "10.1.0",
144
    "@types/jasmine": "3.6.4",
145
    "@types/jasminewd2": "2.0.8",
A
Athur Ming 已提交
146 147 148
    "@types/js-yaml": "4.0.0",
    "@types/lodash": "4.14.167",
    "@types/node": "14.14.20",
149
    "babel-cli": "6.26.0",
150 151
    "babel-preset-env": "1.7.0",
    "babel-register": "6.26.0",
152
    "codelyzer": "6.0.1",
153
    "concurrently": "6.0.0",
154
    "cypress": "6.5.0",
155
    "del": "6.0.0",
156
    "eslint": "7.21.0",
157
    "eslint-plugin-rxjs": "3.1.0",
158
    "git-describe": "4.0.4",
159
    "gts": "3.1.0",
160
    "gulp": "4.0.2",
161
    "gulp-filter": "6.0.0",
162
    "husky": "5.1.2",
163
    "jasmine-core": "3.6.0",
164
    "jasmine-spec-reporter": "6.0.0",
165
    "js-beautify": "1.13.5",
166
    "karma": "5.2.3",
167
    "karma-chrome-launcher": "3.1.0",
168
    "karma-cli": "2.0.0",
M
Marcin Maciaszczyk 已提交
169
    "karma-coverage-istanbul-reporter": "3.0.3",
A
Athur Ming 已提交
170
    "karma-firefox-launcher": "2.1.0",
171
    "karma-jasmine": "4.0.1",
M
Marcin Maciaszczyk 已提交
172
    "karma-jasmine-html-reporter": "1.5.4",
173
    "license-check-and-add": "4.0.2",
174
    "lint-staged": "10.5.4",
175
    "lodash": "4.17.21",
176
    "minimatch": "3.0.4",
177
    "minimist": "1.2.5",
178
    "ngx-i18nsupport": "0.17.1",
179
    "node-gyp": "7.1.2",
180
    "q": "1.5.1",
181
    "raw-loader": "4.0.2",
182
    "run-node": "2.0.0",
A
Athur Ming 已提交
183
    "sass": "1.32.2",
184
    "sass-lint": "1.13.1",
A
Athur Ming 已提交
185
    "sass-loader": "10.1.0",
186
    "scssfmt": "1.0.7",
A
Athur Ming 已提交
187
    "semver": "7.3.4",
188
    "source-map-explorer": "2.5.2",
189
    "tar": "6.1.0",
190
    "through2": "4.0.2",
191
    "ts-loader": "8.0.17",
A
Athur Ming 已提交
192
    "ts-node": "9.1.1",
193
    "typescript": "4.0.7",
A
Athur Ming 已提交
194
    "wait-on": "5.2.1",
195
    "webpack-dev-server": "3.11.2"
196 197
  },
  "engines": {
S
Sebastian Florek 已提交
198
    "node": ">=10.13.0",
199
    "npm": ">=6.0.0"
M
Marcin Maciaszczyk 已提交
200 201 202 203 204 205 206 207 208 209 210 211 212
  },
  "eslintConfig": {
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "ecmaVersion": 2019,
      "project": "./tsconfig.json",
      "sourceType": "module"
    },
    "extends": "./node_modules/gts/",
    "plugins": [
      "rxjs"
    ],
    "rules": {
213
      "@typescript-eslint/ban-ts-comment": "off",
M
Marcin Maciaszczyk 已提交
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
      "@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",
233 234
      "rxjs/no-unsafe-takeuntil": "error",
      "rxjs/no-nested-subscribe": "error"
M
Marcin Maciaszczyk 已提交
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252
    },
    "overrides": [
      {
        "files": [
          "src/**/*.spec.ts"
        ],
        "env": {
          "browser": true,
          "jest": true
        }
      }
    ],
    "ignorePatterns": [
      "**/*.js"
    ]
  },
  "eslintIgnore": [
    "node_modules/*",
M
Marcin Maciaszczyk 已提交
253 254
    "aio/*",
    "src/app/frontend/common/services/global/history.ts"
M
Marcin Maciaszczyk 已提交
255
  ]
256
}