-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Francesco Torchia <[email protected]>
- Loading branch information
Showing
19 changed files
with
18,089 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
assets/fonts | ||
coverage | ||
.nyc_output | ||
node_modules/ | ||
.npm | ||
.eslintcache | ||
.env | ||
.cache | ||
.next | ||
.nuxt | ||
dist | ||
dist-pkg | ||
.DS_Store | ||
dynamic-importer.js | ||
ksconfig.json | ||
nuxt.config.js | ||
shell/utils/dynamic-importer.js | ||
shell/assets/fonts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,173 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
browser: true, | ||
node: true | ||
}, | ||
globals: { NodeJS: true, Timer: true }, | ||
extends: [ | ||
'standard', | ||
'eslint:recommended', | ||
'@nuxtjs/eslint-config-typescript', | ||
'plugin:cypress/recommended' | ||
], | ||
// add your custom rules here | ||
rules: { | ||
'dot-notation': 'off', | ||
'generator-star-spacing': 'off', | ||
'guard-for-in': 'off', | ||
'linebreak-style': 'off', | ||
'new-cap': 'off', | ||
'no-empty': 'off', | ||
'no-extra-boolean-cast': 'off', | ||
'no-new': 'off', | ||
'no-plusplus': 'off', | ||
'no-useless-escape': 'off', | ||
'nuxt/no-cjs-in-config': 'off', | ||
'semi-spacing': 'off', | ||
'space-in-parens': 'off', | ||
strict: 'off', | ||
'unicorn/no-new-buffer': 'off', | ||
'vue/html-self-closing': 'off', | ||
'vue/no-unused-components': 'warn', | ||
'vue/no-v-html': 'error', | ||
'wrap-iife': 'off', | ||
|
||
'array-bracket-spacing': 'warn', | ||
'arrow-parens': 'warn', | ||
'arrow-spacing': ['warn', { before: true, after: true }], | ||
'block-spacing': ['warn', 'always'], | ||
'brace-style': ['warn', '1tbs'], | ||
'comma-dangle': ['warn', 'only-multiline'], | ||
'comma-spacing': 'warn', | ||
curly: 'warn', | ||
eqeqeq: 'warn', | ||
'func-call-spacing': ['warn', 'never'], | ||
'implicit-arrow-linebreak': 'warn', | ||
indent: ['warn', 2], | ||
'keyword-spacing': 'warn', | ||
'lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }], | ||
'multiline-ternary': ['warn', 'never'], | ||
'newline-per-chained-call': ['warn', { ignoreChainWithDepth: 4 }], | ||
'no-caller': 'warn', | ||
'no-cond-assign': ['warn', 'except-parens'], | ||
'no-console': 'warn', | ||
'no-debugger': 'warn', | ||
'no-eq-null': 'warn', | ||
'no-eval': 'warn', | ||
'no-trailing-spaces': 'warn', | ||
'no-undef': 'warn', | ||
'no-unused-vars': 'warn', | ||
'no-whitespace-before-property': 'warn', | ||
'object-curly-spacing': ['warn', 'always'], | ||
'object-property-newline': 'warn', | ||
'object-shorthand': 'warn', | ||
'padded-blocks': ['warn', 'never'], | ||
'prefer-arrow-callback': 'warn', | ||
'prefer-template': 'warn', | ||
'quote-props': 'warn', | ||
'rest-spread-spacing': 'warn', | ||
semi: ['warn', 'always'], | ||
'space-before-function-paren': ['warn', 'never'], | ||
'space-infix-ops': 'warn', | ||
'spaced-comment': 'warn', | ||
'switch-colon-spacing': 'warn', | ||
'template-curly-spacing': ['warn', 'always'], | ||
'yield-star-spacing': ['warn', 'both'], | ||
|
||
'key-spacing': ['warn', { | ||
align: { | ||
beforeColon: false, | ||
afterColon: true, | ||
on: 'value', | ||
mode: 'minimum' | ||
}, | ||
multiLine: { | ||
beforeColon: false, | ||
afterColon: true | ||
}, | ||
}], | ||
|
||
'object-curly-newline': ['warn', { | ||
ObjectExpression: { | ||
multiline: true, | ||
minProperties: 3 | ||
}, | ||
ObjectPattern: { | ||
multiline: true, | ||
minProperties: 4 | ||
}, | ||
ImportDeclaration: { | ||
multiline: true, | ||
minProperties: 5 | ||
}, | ||
ExportDeclaration: { | ||
multiline: true, | ||
minProperties: 3 | ||
} | ||
}], | ||
|
||
'padding-line-between-statements': [ | ||
'warn', | ||
{ | ||
blankLine: 'always', | ||
prev: '*', | ||
next: 'return', | ||
}, | ||
{ | ||
blankLine: 'always', | ||
prev: 'function', | ||
next: 'function', | ||
}, | ||
// This configuration would require blank lines after every sequence of variable declarations | ||
{ | ||
blankLine: 'always', | ||
prev: ['const', 'let', 'var'], | ||
next: '*' | ||
}, | ||
{ | ||
blankLine: 'any', | ||
prev: ['const', 'let', 'var'], | ||
next: ['const', 'let', 'var'] | ||
} | ||
], | ||
|
||
quotes: [ | ||
'warn', | ||
'single', | ||
{ | ||
avoidEscape: true, | ||
allowTemplateLiterals: true | ||
}, | ||
], | ||
|
||
'space-unary-ops': [ | ||
'warn', | ||
{ | ||
words: true, | ||
nonwords: false, | ||
} | ||
], | ||
|
||
// FIXME: The following is disabled due to new linter and old JS code. These should all be enabled and underlying issues fixed | ||
'vue/order-in-components': 'off', | ||
'vue/no-lone-template': 'off', | ||
'vue/v-slot-style': 'off', | ||
'vue/component-tags-order': 'off', | ||
'vue/no-mutating-props': 'off', | ||
'@typescript-eslint/no-unused-vars': 'off', | ||
'array-callback-return': 'off', | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.js'], | ||
rules: { | ||
// FIXME: The following is disabled due to new linter and old JS code. These should all be enabled and underlying issues fixed | ||
'prefer-regex-literals': 'off', | ||
'vue/component-definition-name-casing': 'off', | ||
'no-unreachable-loop': 'off', | ||
'computed-property-spacing': 'off', | ||
} | ||
} | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Build and Release Extension Catalog | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./ | ||
|
||
jobs: | ||
build-extension-catalog: | ||
uses: rancher/dashboard/.github/workflows/build-extension-catalog.yml@master | ||
permissions: | ||
actions: write | ||
contents: read | ||
packages: write | ||
with: | ||
registry_target: ghcr.io | ||
registry_user: ${{ github.actor }} | ||
secrets: | ||
registry_token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Build and Release Extension Charts | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
working-directory: ./ | ||
|
||
jobs: | ||
build-extension-charts: | ||
uses: rancher/dashboard/.github/workflows/build-extension-charts.yml@master | ||
permissions: | ||
actions: write | ||
contents: write | ||
deployments: write | ||
pages: write | ||
with: | ||
target_branch: gh-pages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# compiled output | ||
/dist | ||
/tmp | ||
/out-tsc | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# IDEs and editors | ||
.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# misc | ||
.sass-cache | ||
connect.lock | ||
typings | ||
|
||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# System Files | ||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"files.exclude": { | ||
".ackrc": true, | ||
".dockerignore": true, | ||
".drone.yml": true, | ||
".editorconfig": true, | ||
".eslintcache": true, | ||
".eslintignore": true, | ||
".eslintrc.js": true, | ||
".gitignore": true, | ||
".nuxt*": true, | ||
".nyc_output": true, | ||
".vscode": true, | ||
"LICENSE": true, | ||
"node_modules": true, | ||
"babel.config.js": true, | ||
"jsconfig.json": true, | ||
"yarn-error.log": true, | ||
"pkg/**/.shell": true, | ||
"pkg/**/node_modules": true, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@rancher/shell/babel.config.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"name": "harvester", | ||
"version": "0.1.0", | ||
"private": false, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"dependencies": { | ||
"@rancher/shell": "^0.5.3", | ||
"core-js": "3.21.1", | ||
"css-loader": "6.7.3", | ||
"@types/lodash": "4.14.184", | ||
"@rancher/components": "0.2.1-alpha.0" | ||
}, | ||
"resolutions": { | ||
"**/webpack": "4", | ||
"@types/node": "^16" | ||
}, | ||
"scripts": { | ||
"dev": "NODE_ENV=dev ./node_modules/.bin/vue-cli-service serve", | ||
"build": "./node_modules/.bin/vue-cli-service build", | ||
"clean": "./node_modules/@rancher/shell/scripts/clean", | ||
"build-pkg": "./node_modules/@rancher/shell/scripts/build-pkg.sh", | ||
"serve-pkgs": "./node_modules/@rancher/shell/scripts/serve-pkgs", | ||
"publish-pkgs": "./node_modules/@rancher/shell/scripts/extension/publish", | ||
"parse-tag-name": "./node_modules/@rancher/shell/scripts/extension/parse-tag-name" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('./.shell/pkg/babel.config.js'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { importTypes } from '@rancher/auto-import'; | ||
import { IPlugin } from '@shell/core/types'; | ||
import extensionRouting from './routing/extension-routing'; | ||
|
||
// Init the package | ||
export default function(plugin: IPlugin): void { | ||
// Auto-import model, detail, edit from the folders | ||
importTypes(plugin); | ||
|
||
// Provide plugin metadata from package.json | ||
plugin.metadata = require('./package.json'); | ||
|
||
// Load a product | ||
plugin.addProduct(require('./product')); | ||
|
||
// Add Vue Routes | ||
plugin.addRoutes(extensionRouting); | ||
} |
Oops, something went wrong.