forked from kubevela/velaux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add the backend plugin framework (kubevela#740)
* Feat: Add the backend plugin framework Signed-off-by: barnettZQG <[email protected]> * Fix: add some unit tests Signed-off-by: barnettZQG <[email protected]> * Fix: the package order Signed-off-by: barnettZQG <[email protected]> * Feat: make the node dashboard plugin to work Signed-off-by: barnettZQG <[email protected]> * Feat: change the code style Signed-off-by: barnettZQG <[email protected]> * Fix: e2e test case Signed-off-by: barnettZQG <[email protected]> * Feat: Support to prxoy the multiple cluster API Signed-off-by: barnettZQG <[email protected]> * Feat: Change the menu Signed-off-by: barnettZQG <[email protected]> * Fix: Can't build ui package Signed-off-by: barnettZQG <[email protected]> * Fix: e2e test case Signed-off-by: barnettZQG <[email protected]> * Fix: unit test case Signed-off-by: barnettZQG <[email protected]> * Fix: change some words Signed-off-by: barnettZQG <[email protected]> --------- Signed-off-by: barnettZQG <[email protected]> Signed-off-by: liyanfang <[email protected]>
- Loading branch information
1 parent
49563d1
commit 41ccdd9
Showing
213 changed files
with
3,709 additions
and
918 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
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,20 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {resolve} = require(`path`); | ||
|
||
const relPnpApiPath = "../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require prettier/index.js | ||
require(absPnpApiPath).setup(); | ||
} | ||
} | ||
|
||
// Defer to the real prettier/index.js your application uses | ||
module.exports = absRequire(`prettier/index.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,6 @@ | ||
{ | ||
"name": "prettier", | ||
"version": "2.8.7-sdk", | ||
"main": "./index.js", | ||
"type": "commonjs" | ||
} |
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
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
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
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
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
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
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
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
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,29 @@ | ||
export interface Cluster { | ||
name: string; | ||
kubeConfig: string; | ||
alias?: string; | ||
status?: string; | ||
icon?: string; | ||
description?: string; | ||
createTime?: string; | ||
dashboardURL?: string; | ||
labels?: {}; | ||
providerInfo?: { | ||
provider: string; | ||
clusterID: string; | ||
clusterName?: string; | ||
regionID?: string; | ||
vpcID?: string; | ||
zoneID?: string; | ||
}; | ||
} | ||
|
||
export interface CreateCluster { | ||
name: string; | ||
alias?: string; | ||
icon?: string; | ||
description?: string; | ||
dashboardURL?: string; | ||
kubeConfig: string; | ||
labels?: {}; | ||
} |
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 @@ | ||
export * from './cluster'; |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export * from './types'; | ||
export * from './plugins'; | ||
export * from './api'; |
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
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
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,41 @@ | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import path from 'path'; | ||
import dts from 'rollup-plugin-dts'; | ||
import esbuild from 'rollup-plugin-esbuild'; | ||
import { externals } from 'rollup-plugin-node-externals'; | ||
import json from '@rollup/plugin-json'; | ||
import less from 'rollup-plugin-less'; | ||
import image from '@rollup/plugin-image'; | ||
|
||
const pkg = require('./package.json'); | ||
|
||
export default [ | ||
{ | ||
input: 'src/types.ts', | ||
plugins: [externals({ deps: true, packagePath: './package.json' }), resolve(), esbuild(), json(), less(), image()], | ||
output: [ | ||
{ | ||
format: 'cjs', | ||
sourcemap: true, | ||
dir: path.dirname(pkg.publishConfig.main), | ||
}, | ||
{ | ||
format: 'esm', | ||
sourcemap: true, | ||
dir: path.dirname(pkg.publishConfig.module), | ||
preserveModules: true, | ||
// @ts-expect-error (TS cannot assure that `process.env.PROJECT_CWD` is a string) | ||
preserveModulesRoot: path.join(process.env.PROJECT_CWD, `packages/velux-ui/src`), | ||
}, | ||
], | ||
}, | ||
{ | ||
input: './compiled/types.d.ts', | ||
plugins: [dts()], | ||
external: [/\.less$/], | ||
output: { | ||
file: pkg.publishConfig.types, | ||
format: 'es', | ||
}, | ||
}, | ||
]; |
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
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
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
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
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
Oops, something went wrong.