Skip to content

Commit

Permalink
feat(manager-react-components): build manager react components lib
Browse files Browse the repository at this point in the history
ref: MANAGER-14822:

Signed-off-by: Alex Boungnaseng <[email protected]>
  • Loading branch information
aboungnaseng-ovhcloud committed Oct 18, 2024
1 parent f68007f commit 5e707e9
Show file tree
Hide file tree
Showing 22 changed files with 150 additions and 126 deletions.
21 changes: 16 additions & 5 deletions packages/manager-react-components/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
{
"name": "@ovh-ux/manager-react-components",
"version": "1.38.2",
"main": "src/lib.ts",
"version": "1.38.3",
"license": "BSD-3-Clause",
"author": "OVH SAS",
"types": "dist/types/src/lib.d.ts",
"main": "dist/src/lib.js",
"browser": "dist/manager-react-components-lib.es.ts",
"homepage": "https://github.com/ovh/manager/blob/master/packages/manager-react-components/README.md",
"bugs": {
"url": "https://github.com/ovh/manager/issues"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ovh/manager.git",
"directory": "packages/manager-react-components"
},
"ignoreDependencies": true,
"files": [
"dist"
],
"scripts": {
"build": "echo build",
"build": "vite build && tsc",
"dev": "vite build && tsc",
"build:storybook": "storybook build",
"dev": "tsc",
"prepare": "vite build && tsc",
"prettier": "prettier --write \"src/**/*.{ts,tsx,js,mdx}\"",
"start": "storybook dev -p 6006",
"test": "jest --coverage -u",
Expand Down
1 change: 1 addition & 0 deletions packages/manager-react-components/src/lib.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './hooks';
export * from './hooks/feature-availability/useFeatureAvailability';
export * from './components';
export * from './enumTypes';
export * from './utils/click-utils';
65 changes: 65 additions & 0 deletions packages/manager-react-components/vite.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
import dts from 'vite-plugin-dts';
import path from 'path';
import tailwindcss from 'tailwindcss';
import { getBaseConfig } from '@ovh-ux/manager-vite-config';

const baseConfig = getBaseConfig({});

export default defineConfig({
...baseConfig,
plugins: [
react(),
dts({
outDir: '../dist/types',
insertTypesEntry: true,
}),
],
css: {
postcss: {
plugins: [tailwindcss],
},
},
test: {
globals: true,
environment: 'jsdom',
},
build: {
outDir: '../dist',
lib: {
entry: path.resolve(__dirname, 'src/lib.ts'),
name: 'ManagerReactComponentsLib',
fileName: (format) => `manager-react-components-lib.${format}.ts`,
},
rollupOptions: {
external: [
'@ovh-ux/request-tagger',
'@ovh-ux/manager-core-api',
'@ovh-ux/manager-react-shell-client',
'@tanstack/react-query',
'i18next',
'i18next-http-backend',
'react',
'react-dom',
'react-router-dom',
'react-i18next',
'zustand',
],
output: {
globals: {
'@ovh-ux/manager-core-api': 'ManagerCoreApi',
'@ovh-ux/manager-react-shell-client': 'ManagerReactShellClient',
'@tanstack/react-query': 'ReactQuery',
i18next: 'i18next',
'i18next-http-backend': 'i18nextHttpBackend',
react: 'React',
'react-i18next': 'ReactI18next',
'react-dom': 'ReactDOM',
'react-router-dom': 'ReactRouterDOM',
zustand: 'Zustand',
},
},
},
},
});
29 changes: 0 additions & 29 deletions packages/manager-react-components/vite.config.ts

This file was deleted.

2 changes: 1 addition & 1 deletion packages/manager/apps/catalog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@cucumber/cucumber": "^10.3.1",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "^0.3.0",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/shell": "^3.9.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/manager/apps/container/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
"@emotion/styled": "^11.10.0",
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-vite-config": "^0.8.0",
"@ovh-ux/ovh-payment-method": "^0.5.0",
"@ovh-ux/ovh-product-icons": "^0.6.0",
Expand Down Expand Up @@ -95,4 +96,4 @@
"EU",
"US"
]
}
}
2 changes: 1 addition & 1 deletion packages/manager/apps/key-management-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-module-order": "^0.5.4",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-block-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/manager/apps/pci-kubernetes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
},
"dependencies": {
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "^0.3.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "*",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
"@ovh-ux/shell": "^3.9.0",
"@ovhcloud/ods-common-core": "17.2.2",
"@ovhcloud/ods-common-stencil": "17.2.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-private-network/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-private-registry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@ovh-ux/manager-config": "*",
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-public-ip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-module-order": "^0.5.4",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-rancher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/request-tagger": "^0.3.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-savings-plan/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@ovh-ux/manager-config": "*",
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-utils": "*",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "*",
"@ovh-ux/request-tagger": "*",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-ssh-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-users/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "^0.3.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/manager/apps/pci-vouchers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "^0.3.0",
"@ovh-ux/manager-pci-common": "^0.7.2",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-pci-common": "0.7.3",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/apps/vrack-services/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-module-order": "^0.5.4",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "*",
Expand Down
2 changes: 1 addition & 1 deletion packages/manager/apps/zimbra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@ovh-ux/manager-config": "^7.4.0",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-core-utils": "^0.3.0",
"@ovh-ux/manager-react-components": "^1.38.2",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-core-application": "^0.10.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/manager/modules/manager-pci-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ovh-ux/manager-pci-common",
"version": "0.7.2",
"version": "0.7.3",
"private": true,
"sideEffects": true,
"type": "module",
Expand All @@ -16,7 +16,8 @@
"test:watch": "vitest"
},
"dependencies": {
"@ovh-ux/manager-core-api": "*",
"@ovh-ux/manager-core-api": "^0.8.0",
"@ovh-ux/manager-react-components": "1.38.3",
"@ovh-ux/manager-react-shell-client": "^0.7.3",
"clsx": "2.1.1",
"date-fns": "^3.6.0",
Expand Down Expand Up @@ -45,7 +46,6 @@
},
"peerDependencies": {
"@ovh-ux/manager-config": "^7.3.2",
"@ovh-ux/manager-react-components": "^1.32.1",
"@ovh-ux/manager-tailwind-config": "^0.2.0",
"@ovh-ux/shell": "^3.7.0",
"@ovhcloud/ods-common-core": "^17.2.2",
Expand Down
Loading

0 comments on commit 5e707e9

Please sign in to comment.