package.json 10.1 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": "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",
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",
57 58
    "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",
    "prepare": "husky install"
59
  },
60 61
  "lint-staged": {
    "src/**/*.ts": [
62
      "gts fix"
63 64
    ],
    "src/**/*.scss": [
65
      "scssfmt"
66 67
    ],
    "src/**/*.go": [
68
      "./aio/scripts/pre-commit-golangci-lint.sh"
S
Shu Muto 已提交
69 70
    ],
    "src/**/*.html": [
71
      "./aio/scripts/pre-commit-i18n.sh"
72 73
    ]
  },
74 75 76 77 78
  "xliffmergeOptions": {
    "srcDir": "i18n",
    "genDir": "i18n",
    "defaultLanguage": "en",
    "languages": [
79
      "de",
80
      "fr",
H
Holegots 已提交
81
      "ja",
82
      "ko",
S
Sebastian Florek 已提交
83 84 85
      "zh-Hans",
      "zh-Hant",
      "zh-Hant-HK"
86 87 88
    ],
    "beautifyOutput": true
  },
89
  "dependencies": {
90 91 92 93 94
    "@angular/animations": "11.2.7",
    "@angular/cdk": "11.2.7",
    "@angular/common": "11.2.7",
    "@angular/compiler": "11.2.7",
    "@angular/core": "11.2.7",
A
Athur Ming 已提交
95
    "@angular/flex-layout": "11.0.0-beta.33",
96 97 98 99 100 101
    "@angular/forms": "11.2.7",
    "@angular/localize": "11.2.7",
    "@angular/material": "11.2.7",
    "@angular/platform-browser": "11.2.7",
    "@angular/platform-browser-dynamic": "11.2.7",
    "@angular/router": "11.2.7",
102
    "@swimlane/ngx-charts": "17.0.1",
103
    "ace-builds": "1.4.12",
104
    "angular-page-visibility": "11.0.0",
A
Athur Ming 已提交
105
    "ansi-to-html": "0.6.14",
106
    "c3": "0.7.20",
107
    "core-js": "3.11.0",
108
    "d3": "6.7.0",
A
Athur Ming 已提交
109
    "file-saver": "2.0.5",
110
    "highlight.js": "10.7.2",
111
    "js-yaml": "4.1.0",
112
    "material-design-icons": "3.0.1",
113
    "ng-in-viewport": "6.1.5",
A
Athur Ming 已提交
114
    "ngx-cookie-service": "11.0.2",
115
    "ngx-filter-pipe": "2.1.2",
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",
A
Athur Ming 已提交
121
    "systemjs": "6.8.3",
122
    "truncate-url": "1.0.0",
123
    "tslib": "2.2.0",
S
Sebastian Florek 已提交
124
    "web-animations-js": "2.3.2",
125
    "xterm": "4.11.0",
126
    "xterm-addon-fit": "0.5.0",
127
    "zone.js": "0.11.4"
128
  },
129
  "devDependencies": {
130
    "@angular-devkit/build-angular": "0.1102.10",
131
    "@angular/cli": "11.2.10",
132
    "@angular/compiler-cli": "11.2.7",
133
    "@angular/language-service": "11.2.11",
134 135 136
    "@babel/core": "7.13.16",
    "@babel/preset-env": "7.13.15",
    "@babel/register": "7.13.16",
137
    "@cypress/webpack-preprocessor": "5.7.0",
138
    "@types/c3": "0.7.5",
139
    "@types/d3": "6.3.0",
140
    "@types/d3-scale": "3.2.2",
141
    "@types/file-saver": "2.0.2",
142
    "@types/highlight.js": "10.1.0",
143
    "@types/jasmine": "3.6.9",
144
    "@types/jasminewd2": "2.0.8",
145
    "@types/jest": "26.0.22",
146
    "@types/js-yaml": "4.0.1",
147
    "@types/lodash": "4.14.168",
148
    "@types/node": "15.0.0",
149
    "codelyzer": "6.0.1",
150
    "concurrently": "6.0.2",
151
    "cypress": "7.2.0",
152
    "del": "6.0.0",
153
    "eslint": "7.25.0",
154
    "eslint-plugin-rxjs": "3.2.0",
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 163
    "jest": "26.6.3",
    "jest-preset-angular": "8.4.0",
164
    "js-beautify": "1.13.13",
165
    "license-check-and-add": "4.0.2",
166
    "lint-staged": "10.5.4",
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.0.0",
172
    "q": "1.5.1",
173
    "raw-loader": "4.0.2",
174
    "run-node": "2.0.0",
175
    "sass": "1.32.11",
176
    "sass-lint": "1.13.1",
177
    "sass-loader": "11.0.1",
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-loader": "8.1.0",
A
Athur Ming 已提交
184
    "ts-node": "9.1.1",
185
    "typescript": "4.1.5",
186
    "wait-on": "5.3.0",
187
    "webpack-dev-server": "3.11.2"
188 189
  },
  "engines": {
190
    "node": ">=14.16.1",
191
    "npm": ">=6.0.0 <7.0.0"
M
Marcin Maciaszczyk 已提交
192 193 194 195
  },
  "eslintConfig": {
    "parser": "@typescript-eslint/parser",
    "parserOptions": {
196
      "ecmaVersion": 2020,
M
Marcin Maciaszczyk 已提交
197 198 199 200 201 202 203 204
      "project": "./tsconfig.json",
      "sourceType": "module"
    },
    "extends": "./node_modules/gts/",
    "plugins": [
      "rxjs"
    ],
    "rules": {
205
      "@typescript-eslint/ban-ts-comment": "off",
M
Marcin Maciaszczyk 已提交
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
      "@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",
225 226
      "rxjs/no-unsafe-takeuntil": "error",
      "rxjs/no-nested-subscribe": "error"
M
Marcin Maciaszczyk 已提交
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
    },
    "overrides": [
      {
        "files": [
          "src/**/*.spec.ts"
        ],
        "env": {
          "browser": true,
          "jest": true
        }
      }
    ],
    "ignorePatterns": [
      "**/*.js"
    ]
  },
  "eslintIgnore": [
    "node_modules/*",
M
Marcin Maciaszczyk 已提交
245 246
    "aio/*",
    "src/app/frontend/common/services/global/history.ts"
M
Marcin Maciaszczyk 已提交
247
  ]
248
}