From b1362e4f8b06a9d18b9830c437712a85b50b11b0 Mon Sep 17 00:00:00 2001 From: Yi Yang Date: Tue, 15 Aug 2023 14:18:54 +0800 Subject: [PATCH] chore(*): switch to public packages (#75) * chore(*): switch to public packages * chore(*): add bundle analyzer --- .github/dependabot.yml | 2 - .github/workflows/.reusable_build.yml | 7 + .gitignore | 4 +- README.md | 2 - package.json | 29 +- src/components/EntityForm/EntityForm.vue | 2 +- .../EntityForm/NativeEntityForm.vue | 2 +- .../EntityForm/mixins/EntityMixin.js | 2 +- src/composables/useDetailGeneralConfig.ts | 2 +- src/composables/useFormGeneralConfig.ts | 2 +- src/composables/useListGeneralConfig.ts | 2 +- src/pages/ca-certificates/Detail.vue | 2 +- src/pages/ca-certificates/Form.vue | 2 +- src/pages/ca-certificates/List.vue | 2 +- src/pages/certificates/Detail.vue | 2 +- src/pages/certificates/Form.vue | 2 +- src/pages/certificates/List.vue | 2 +- src/pages/consumers/CredentialList.vue | 2 +- src/pages/consumers/Detail.vue | 2 +- src/pages/consumers/Form.vue | 2 +- src/pages/consumers/List.vue | 4 +- src/pages/key-sets/Detail.vue | 2 +- src/pages/key-sets/Form.vue | 2 +- src/pages/key-sets/List.vue | 4 +- src/pages/keys/Detail.vue | 2 +- src/pages/keys/Form.vue | 2 +- src/pages/keys/List.vue | 4 +- src/pages/plugins/Detail.vue | 2 +- src/pages/plugins/Form.vue | 2 +- src/pages/plugins/List.vue | 6 +- src/pages/plugins/PluginCard.vue | 2 +- src/pages/plugins/PluginMeta.ts | 2 +- src/pages/plugins/Select.vue | 2 +- src/pages/routes/Detail.vue | 2 +- src/pages/routes/Form.vue | 2 +- src/pages/routes/List.vue | 4 +- src/pages/services/Detail.vue | 2 +- src/pages/services/Form.vue | 2 +- src/pages/services/List.vue | 4 +- src/pages/snis/Form.vue | 2 +- src/pages/snis/List.vue | 4 +- src/pages/upstreams/Detail.vue | 2 +- src/pages/upstreams/Form.vue | 2 +- src/pages/upstreams/List.vue | 4 +- src/pages/upstreams/TargetList.vue | 2 +- src/pages/vaults/Detail.vue | 2 +- src/pages/vaults/Form.vue | 2 +- src/pages/vaults/List.vue | 4 +- src/registerGlobalComponents.ts | 2 +- src/styles/index.ts | 24 +- vite.config.ts | 7 + yarn.lock | 272 ++++++++++++------ 52 files changed, 276 insertions(+), 179 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index a61e8d28..f692850f 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -31,12 +31,10 @@ updates: target-branch: "main" allow: - dependency-name: "@kong/kongponents" - - dependency-name: "@kong-ui/*" - dependency-name: "@kong-ui-public/*" - dependency-name: "@playwright/test" groups: kong-packages: patterns: - "@kong/kongponents" - - "@kong-ui/*" - "@kong-ui-public/*" diff --git a/.github/workflows/.reusable_build.yml b/.github/workflows/.reusable_build.yml index f2bf5ba3..f745e597 100644 --- a/.github/workflows/.reusable_build.yml +++ b/.github/workflows/.reusable_build.yml @@ -74,3 +74,10 @@ jobs: with: name: assets path: ./assets.tar.gz + + - name: Upload bundle-analyzer + timeout-minutes: 5 + uses: actions/upload-artifact@v3 + with: + name: bundle-analyzer + path: bundle-analyzer/ diff --git a/.gitignore b/.gitignore index 37721cb3..86ec7369 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,8 @@ node_modules dist dist-ssr *.local +test-results +bundle-analyzer # Editor directories and files .vscode/* @@ -25,5 +27,3 @@ dist-ssr # suppress build warning public/kconfig.js - -test-results \ No newline at end of file diff --git a/README.md b/README.md index bdb4fd2e..cba20c06 100644 --- a/README.md +++ b/README.md @@ -52,8 +52,6 @@ In addition, the plugin configuration UI provides instructions for each configur ## Contributing -> Note: Kong Manager OSS can only be run locally by Kong employees. We are migrating private dependencies to public packages. Once completed, dependencies will be available to the community to build, develop, and contribute to this repository. - Kong Manager OSS is written in JavaScript. It uses Vue for it's UI components, and `yarn` for managing dependencies. To build Kong Manager OSS locally please ensure that you have `node.js 18+` and `yarn` installed. You'll also need a running Kong Gateway instance. See [local testing](#local-testing) for a one-line solution. Alternatively, you can [build Kong Gateway from source](https://github.com/Kong/kong/tree/master/build). diff --git a/package.json b/package.json index 68252721..fdb9e6bc 100644 --- a/package.json +++ b/package.json @@ -19,21 +19,21 @@ "dependencies": { "@kong-ui-public/app-layout": "^0.22.4", "@kong-ui-public/copy-uuid": "^1.1.5", + "@kong-ui-public/entities-certificates": "^1.1.2", + "@kong-ui-public/entities-consumer-credentials": "^1.1.4", + "@kong-ui-public/entities-consumers": "^1.1.4", + "@kong-ui-public/entities-gateway-services": "^1.1.5", + "@kong-ui-public/entities-key-sets": "^1.1.4", + "@kong-ui-public/entities-keys": "^1.1.5", + "@kong-ui-public/entities-plugins": "^1.1.2", + "@kong-ui-public/entities-routes": "^1.1.2", + "@kong-ui-public/entities-shared": "^1.2.4", + "@kong-ui-public/entities-snis": "^1.1.0", + "@kong-ui-public/entities-upstreams-targets": "^1.1.4", + "@kong-ui-public/entities-vaults": "^1.1.7", + "@kong-ui-public/forms": "^1.1.5", "@kong-ui-public/i18n": "^0.8.0", "@kong-ui-public/misc-widgets": "^0.5.19", - "@kong-ui/entities-certificates": "^0.19.22", - "@kong-ui/entities-consumer-credentials": "^0.9.21", - "@kong-ui/entities-consumers": "^0.18.24", - "@kong-ui/entities-gateway-services": "^0.15.25", - "@kong-ui/entities-key-sets": "^0.12.24", - "@kong-ui/entities-keys": "^0.15.24", - "@kong-ui/entities-plugins": "^0.13.2", - "@kong-ui/entities-routes": "^0.19.15", - "@kong-ui/entities-shared": "^0.46.2", - "@kong-ui/entities-snis": "^0.14.24", - "@kong-ui/entities-upstreams-targets": "^0.16.25", - "@kong-ui/entities-vaults": "^0.21.6", - "@kong-ui/forms": "^0.22.3", "@kong/kongponents": "^8.122.2", "@material-design-icons/font": "^0.14.9", "axios": "^1.4.0", @@ -60,9 +60,10 @@ "husky": "^8.0.3", "lint-staged": "^13.2.2", "lodash-es": "^4.17.21", + "rollup-plugin-visualizer": "^5.9.2", "sass": "^1.63.4", "typescript": "^5.1.3", "vite": "^4.3.9", "vite-plugin-html": "^3.2.0" } -} \ No newline at end of file +} diff --git a/src/components/EntityForm/EntityForm.vue b/src/components/EntityForm/EntityForm.vue index 0fcd9e44..e9f60395 100644 --- a/src/components/EntityForm/EntityForm.vue +++ b/src/components/EntityForm/EntityForm.vue @@ -93,7 +93,7 @@