package.json 10.4 KB
Newer Older
1
{
2
  "name": "kubernetes-dashboard",
3
  "version": "2.0.3",
4 5 6 7 8
  "repository": {
    "type": "git",
    "url": "https://github.com/kubernetes/dashboard.git"
  },
  "license": "Apache-2.0",
9
  "scripts": {
10 11 12 13
    "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\"",
    "start:frontend": "npm run postversion && ng serve --aot --progress=false --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 --progress=false --aot --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\"",
S
Shu Muto 已提交
39
    "check:backend": "golangci-lint run -c .golangci.yml src/app/backend/...",
40
    "check:codegen": "aio/scripts/verify-codegen.sh",
M
Marcin Maciaszczyk 已提交
41 42 43 44
    "check:frontend": "concurrently \"npm run check:frontend:ts\" \"npm run check:frontend:scss\" \"npm run check:frontend:html\"",
    "check:frontend:ts": "gts check",
    "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",
46
    "check:i18n": "ng xi18n --no-progress --outFile ../i18n/messages.xlf && aio/scripts/xliffmerge.sh",
47
    "fix": "concurrently \"npm run fix:backend\" \"npm run fix:frontend\" \"npm run fix:license\" \"npm run fix:i18n\"",
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",
54
    "fix:i18n": "ng xi18n --outFile ../i18n/messages.xlf && 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",
57
    "postinstall": "node aio/scripts/version.js && command -v golangci-lint >/dev/null 2>&1 || { curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.23.6; } && go mod download && ./aio/scripts/install-codegen.sh && ngcc"
58
  },
59 60
  "husky": {
    "hooks": {
61
      "pre-commit": "lint-staged"
62 63
    }
  },
64 65 66 67
  "lint-staged": {
    "src/**/*.ts": [
      "gts fix",
      "git add"
68 69 70 71
    ],
    "src/**/*.scss": [
      "scssfmt",
      "git add"
72 73
    ],
    "src/**/*.go": [
74
      "./aio/scripts/pre-commit-golangci-lint.sh",
75
      "git add"
S
Shu Muto 已提交
76 77
    ],
    "src/**/*.html": [
S
Sebastian Florek 已提交
78
      "./aio/scripts/pre-commit-i18n.sh",
S
Shu Muto 已提交
79
      "git add"
80 81
    ]
  },
82 83 84 85 86
  "xliffmergeOptions": {
    "srcDir": "i18n",
    "genDir": "i18n",
    "defaultLanguage": "en",
    "languages": [
87
      "de",
88
      "fr",
H
Holegots 已提交
89
      "ja",
90
      "ko",
S
Sebastian Florek 已提交
91 92 93
      "zh-Hans",
      "zh-Hant",
      "zh-Hant-HK"
94 95 96
    ],
    "beautifyOutput": true
  },
97
  "dependencies": {
M
Marcin Maciaszczyk 已提交
98 99 100 101 102 103 104 105 106 107 108 109
    "@angular/animations": "10.0.4",
    "@angular/cdk": "10.0.2",
    "@angular/common": "10.0.4",
    "@angular/compiler": "10.0.4",
    "@angular/core": "10.0.4",
    "@angular/flex-layout": "10.0.0-beta.32",
    "@angular/forms": "10.0.4",
    "@angular/localize": "10.0.4",
    "@angular/material": "10.0.2",
    "@angular/platform-browser": "10.0.4",
    "@angular/platform-browser-dynamic": "10.0.4",
    "@angular/router": "10.0.4",
110
    "@swimlane/ngx-charts": "14.0.0",
M
Marcin Maciaszczyk 已提交
111
    "@types/c3": "0.7.4",
112
    "@types/d3": "5.7.2",
113
    "@types/d3-scale": "2.2.0",
114
    "@types/file-saver": "2.0.1",
115
    "@types/highlight.js": "9.12.4",
116
    "ace-builds": "1.4.12",
117
    "angular-page-visibility": "9.0.6",
118
    "ansi-to-html": "0.6.14",
119
    "c3": "0.7.20",
M
Marcin Maciaszczyk 已提交
120
    "core-js": "3.6.5",
121
    "d3": "6.1.0",
122
    "file-saver": "2.0.2",
123
    "highlight.js": "10.1.2",
124
    "js-yaml": "3.14.0",
125
    "material-design-icons": "3.0.1",
126
    "ng-in-viewport": "6.1.3",
127
    "ngx-cookie-service": "10.0.1",
128
    "ngx-filter-pipe": "2.1.2",
S
Sebastian Florek 已提交
129
    "normalize.css": "8.0.1",
130
    "roboto-fontface": "0.10.0",
131
    "rxjs": "6.6.2",
132
    "rxjs-compat": "6.6.2",
133
    "sockjs-client": "1.5.0",
134
    "systemjs": "6.5.0",
135
    "truncate-url": "1.0.0",
136
    "tslib": "2.0.1",
S
Sebastian Florek 已提交
137
    "web-animations-js": "2.3.2",
138
    "xterm": "4.8.1",
139
    "xterm-addon-fit": "0.4.0",
140
    "zone.js": "0.10.3"
141
  },
142
  "devDependencies": {
143
    "@angular-devkit/build-angular": "0.1000.7",
144
    "@angular/cli": "10.0.8",
M
Marcin Maciaszczyk 已提交
145
    "@angular/compiler-cli": "10.0.4",
146
    "@angular/language-service": "10.0.14",
147
    "@cypress/webpack-preprocessor": "5.4.5",
148
    "@types/jasmine": "3.5.14",
149
    "@types/jasminewd2": "2.0.8",
150
    "@types/js-yaml": "3.12.5",
151
    "@types/lodash": "4.14.161",
152
    "@types/node": "14.6.0",
153
    "babel-cli": "6.26.0",
154 155
    "babel-preset-env": "1.7.0",
    "babel-register": "6.26.0",
156
    "codelyzer": "6.0.0",
157
    "concurrently": "5.3.0",
158
    "cypress": "5.1.0",
159
    "del": "5.1.0",
160
    "eslint": "7.8.0",
161
    "eslint-plugin-rxjs": "0.0.2-beta.28",
162
    "git-describe": "4.0.4",
M
Marcin Maciaszczyk 已提交
163
    "gts": "2.0.2",
164
    "gulp": "4.0.2",
165
    "gulp-filter": "6.0.0",
166
    "husky": "4.2.5",
167
    "jasmine-core": "3.6.0",
168
    "jasmine-spec-reporter": "5.0.2",
169
    "js-beautify": "1.11.0",
170
    "karma": "5.1.1",
171
    "karma-chrome-launcher": "3.1.0",
172
    "karma-cli": "2.0.0",
M
Marcin Maciaszczyk 已提交
173
    "karma-coverage-istanbul-reporter": "3.0.3",
174
    "karma-firefox-launcher": "1.3.0",
175
    "karma-jasmine": "4.0.1",
M
Marcin Maciaszczyk 已提交
176
    "karma-jasmine-html-reporter": "1.5.4",
177
    "license-check-and-add": "3.0.4",
178
    "lint-staged": "10.2.13",
179
    "lodash": "4.17.20",
180
    "minimatch": "3.0.4",
181
    "minimist": "1.2.5",
182
    "ngx-i18nsupport": "0.17.1",
183
    "node-gyp": "7.1.0",
184
    "node-sass": "4.14.1",
185
    "q": "1.5.1",
186
    "raw-loader": "4.0.1",
187
    "run-node": "2.0.0",
188
    "sass-lint": "1.13.1",
189
    "sass-loader": "10.0.1",
190
    "scssfmt": "1.0.7",
191
    "semver": "7.3.2",
192
    "source-map-explorer": "2.4.2",
193
    "tar": "6.0.5",
194
    "through2": "4.0.2",
195
    "ts-loader": "8.0.3",
196
    "ts-node": "9.0.0",
197
    "tslint": "6.1.3",
198
    "typescript": "3.9.7",
199
    "wait-on": "5.2.0",
200
    "webpack-dev-server": "3.11.0"
201 202
  },
  "engines": {
S
Sebastian Florek 已提交
203
    "node": ">=10.13.0",
204
    "npm": ">=6.0.0"
M
Marcin Maciaszczyk 已提交
205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
  },
  "eslintConfig": {
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
      "ecmaVersion": 2019,
      "project": "./tsconfig.json",
      "sourceType": "module"
    },
    "extends": "./node_modules/gts/",
    "plugins": [
      "rxjs"
    ],
    "rules": {
      "@typescript-eslint/ban-ts-ignore": "off",
      "@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",
238 239
      "rxjs/no-unsafe-takeuntil": "error",
      "rxjs/no-nested-subscribe": "error"
M
Marcin Maciaszczyk 已提交
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
    },
    "overrides": [
      {
        "files": [
          "src/**/*.spec.ts"
        ],
        "env": {
          "browser": true,
          "jest": true
        }
      }
    ],
    "ignorePatterns": [
      "**/*.js"
    ]
  },
  "eslintIgnore": [
    "node_modules/*",
    "aio/*"
  ]
260
}