Compare commits

...
4 Commits
8 changed files with 606 additions and 4346 deletions

No files matched your search

+1 -2
View File
@@ -26,8 +26,7 @@
}, },
"ecmaVersion": "latest", "ecmaVersion": "latest",
"sourceType": "module", "sourceType": "module",
"project": "./tsconfig.json", "project": "./tsconfig.json"
"tsconfigRootDir": "./"
}, },
"plugins": [ "plugins": [
"react", "react",
+13
View File
@@ -1,3 +1,16 @@
## 1.1.0
- Обновлено
- Библиотека isp-admin-ui-kit (1.16.0)
- Добавлен раздел «Управление аудитом» для включения и отключения событий аудита, доступ определяется правом `audit_management_view`
- Добавлены серверный поиск по столбцам с подсветкой совпадений и сортировка в таблицах пользователей, пользовательских сессий и журнала событий
- Запросы профиля, каталога разрешений и ролей передают `applicationGroup` из `CLIENT_NAME`; профиль показывает только разрешения каталога текущей группы
- Добавлена CSV-выгрузка пользователей, ролей, сессий и журнала событий через isp-admin-service: выгружаются все записи с учётом фильтров и сортировки, CSV сохраняются в UTF-8 с BOM, выгрузки пользователей и ролей учитывают группу приложений
- Добавлено поле `applicationGroup` в методах ролей: при создании и обновлении роли значение берётся из `CLIENT_NAME` runtime-конфига с fallback на `VITE_CLIENT_NAME`
- Устранены уязвимости зависимостей библиотеки, обновлены Storybook и React Router, закреплены исправленные версии DOMPurify, KaTeX и инструментов разработки
- Исправлено
- устранены уязвимости зависимостей по результатам аудита, обновлены Vite и React Router, закреплены исправленные версии вложенных пакетов.
- сохранена работа Monaco, Mermaid, ReDoc и JSON Schema с минимальными браузерными полифилами; добавлена проверка совместимости зависимостей.
## 1.0.15 ## 1.0.15
- Обновлено - Обновлено
- Библиотека isp-admin-ui-kit (1.14.0) - Библиотека isp-admin-ui-kit (1.14.0)
+17 -1
View File
@@ -28,4 +28,20 @@ export default {
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked` - Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked` - Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list - Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
1 1
### Проверка совместимости зависимостей
После обновления зависимостей выполните `npm ci`, `npm run lint`, `npm run build`
и `npm run test:dependencies`. Последняя команда собирает отдельную проверочную
страницу. Запустите `npm run preview -- --outDir build/dependency-smoke --port 4174`
и откройте `http://localhost:4174/tests/dependency-smoke.html`.
Успешный результат — `Dependency checks passed`. Проверяются DOMPurify, Mermaid
(включая формулы), KaTeX, JSON Schema/RJSF, ReDoc, Router и JSON worker Monaco.
Страница проверки не входит в основную production-сборку.
В `overrides` закреплены исправленные DOMPurify и KaTeX без обновления Monaco и
Mermaid на новые основные версии. Overrides minimatch/glob относятся к инструментам
разработки. Библиотека `isp-admin-ui-kit` поддерживает Router 7.
React остаётся в ветке 18. Вместо всех Node-полифилов подключаются только Buffer/process и браузерные реализации path/http/url,
необходимые парсерам JSON Schema/OpenAPI и ReDoc. Криптографические полифилы удалены.
+529 -4321
View File
File diff suppressed because it is too large. Load diff
+22 -13
View File
@@ -1,7 +1,7 @@
{ {
"name": "isp-admin-ui", "name": "isp-admin-ui",
"private": true, "private": true,
"version": "1.0.15", "version": "1.1.0",
"type": "module", "type": "module",
"scripts": { "scripts": {
"start": "vite", "start": "vite",
@@ -11,24 +11,30 @@
"fix:prettier": "prettier --write \"src/**/*.{ts,tsx, js}\"", "fix:prettier": "prettier --write \"src/**/*.{ts,tsx, js}\"",
"lint:fix": "eslint --fix .", "lint:fix": "eslint --fix .",
"analyze": "source-map-explorer 'build/static/js/*.js'", "analyze": "source-map-explorer 'build/static/js/*.js'",
"prepare": "husky || true" "prepare": "husky || true",
"test:dependencies": "vite build --config tests/dependency-smoke.config.ts"
}, },
"dependencies": { "dependencies": {
"@monaco-editor/react": "^4.6.0", "@monaco-editor/react": "^4.6.0",
"@reduxjs/toolkit": "^2.2.3", "@reduxjs/toolkit": "^2.2.3",
"axios": "^1.7.7", "axios": "^1.20.0",
"buffer": "^6.0.3",
"dayjs": "^1.11.10", "dayjs": "^1.11.10",
"isp-admin-ui-kit": "^1.14.2", "isp-admin-ui-kit": "^1.16.0",
"isp-ui-kit": "^2.3.3", "isp-ui-kit": "^2.3.3",
"monaco-editor": "^0.55.1", "monaco-editor": "^0.55.1",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-hook-form": "^7.51.2", "react-hook-form": "^7.51.2",
"react-redux": "^9.1.0", "react-redux": "^9.1.0",
"react-resizable": "^3.0.5", "react-resizable": "^3.0.5",
"react-router-dom": "^6.22.3", "react-router-dom": "^7.18.6",
"simplebar": "^6.2.5", "simplebar": "^6.2.5",
"simplebar-react": "^3.2.4" "simplebar-react": "^3.2.4",
"stream-http": "^3.2.0",
"url": "^0.11.4"
}, },
"devDependencies": { "devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0", "@trivago/prettier-plugin-sort-imports": "^4.3.0",
@@ -38,12 +44,9 @@
"@types/react": "^18.2.74", "@types/react": "^18.2.74",
"@types/react-dom": "^18.2.24", "@types/react-dom": "^18.2.24",
"@types/react-resizable": "^3.0.7", "@types/react-resizable": "^3.0.7",
"@types/react-router-dom": "^5.3.3", "@typescript-eslint/eslint-plugin": "^8.74.0",
"@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^8.74.0",
"@typescript-eslint/parser": "^7.5.0",
"@vitejs/plugin-legacy": "^5.3.2",
"@vitejs/plugin-react": "^4.2.1", "@vitejs/plugin-react": "^4.2.1",
"@vitejs/plugin-react-swc": "^3.6.0",
"antd": "6.4.3", "antd": "6.4.3",
"eslint": "^8.57.0", "eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
@@ -58,9 +61,8 @@
"sass": "1.74.1", "sass": "1.74.1",
"terser": "^5.30.3", "terser": "^5.30.3",
"typescript": "^5.4.3", "typescript": "^5.4.3",
"vite": "^5.4.10", "vite": "^6.4.6",
"vite-bundle-visualizer": "^1.2.1", "vite-bundle-visualizer": "^1.2.1",
"vite-plugin-node-polyfills": "^0.21.0",
"vite-plugin-style-import": "^2.0.0", "vite-plugin-style-import": "^2.0.0",
"vite-plugin-svgr": "^4.2.0", "vite-plugin-svgr": "^4.2.0",
"vite-tsconfig-paths": "^4.3.2" "vite-tsconfig-paths": "^4.3.2"
@@ -76,5 +78,12 @@
"pre-commit": "eslint --fix .", "pre-commit": "eslint --fix .",
"pre-push": "eslint --fix ." "pre-push": "eslint --fix ."
} }
},
"overrides": {
"dompurify": "~3.4.18",
"katex": "~0.18.2",
"minimatch@>=7 <11": "^11.0.1",
"glob@>=9 <14.0.2": "^14.0.2",
"react-router-dom": "$react-router-dom"
} }
} }
+11
View File
@@ -0,0 +1,11 @@
import { Buffer } from 'buffer'
import process from 'process'
// OpenAPI/JSON Schema browser builds still use these Node globals.
// Load only the required shims, without Node's crypto modules.
if (typeof globalThis.Buffer === 'undefined') {
Object.assign(globalThis, { Buffer })
}
if (typeof globalThis.process === 'undefined') {
Object.assign(globalThis, { process })
}
+4 -2
View File
@@ -1,6 +1,8 @@
import './browser-polyfills'
import { loader } from '@monaco-editor/react' import { loader } from '@monaco-editor/react'
import { setupListeners } from '@reduxjs/toolkit/query' import { setupListeners } from '@reduxjs/toolkit/query'
import dayjs from 'dayjs' import { locale } from 'dayjs'
import 'dayjs/locale/ru' import 'dayjs/locale/ru'
import { AdminBase, baseSetupStore } from 'isp-admin-ui-kit' import { AdminBase, baseSetupStore } from 'isp-admin-ui-kit'
import * as monaco from 'monaco-editor' import * as monaco from 'monaco-editor'
@@ -38,7 +40,7 @@ loader.config({ monaco })
loader.init().then() loader.init().then()
dayjs.locale('ru') locale('ru')
const store = baseSetupStore() const store = baseSetupStore()
setupListeners(store.dispatch) setupListeners(store.dispatch)
const root = createRoot(document.getElementById('root') as HTMLElement) const root = createRoot(document.getElementById('root') as HTMLElement)
+9 -7
View File
@@ -1,6 +1,5 @@
import react from '@vitejs/plugin-react' import react from '@vitejs/plugin-react'
import { defineConfig, loadEnv } from 'vite' import { defineConfig, loadEnv } from 'vite'
import { nodePolyfills } from 'vite-plugin-node-polyfills'
import svgr from 'vite-plugin-svgr' import svgr from 'vite-plugin-svgr'
import tsconfigPaths from 'vite-tsconfig-paths' import tsconfigPaths from 'vite-tsconfig-paths'
@@ -12,6 +11,14 @@ export default defineConfig(({ mode }) => {
return { return {
base: env.PUBLIC_PATH || '/', base: env.PUBLIC_PATH || '/',
optimizeDeps: { exclude: [] }, optimizeDeps: { exclude: [] },
resolve: {
alias: {
path: 'path-browserify',
http: 'stream-http',
url: 'url/',
process: 'process/browser'
}
},
define: { define: {
__APP_ENV__: env.APP_ENV, __APP_ENV__: env.APP_ENV,
APP_VERSION: JSON.stringify(process.env.npm_package_version) APP_VERSION: JSON.stringify(process.env.npm_package_version)
@@ -38,11 +45,6 @@ export default defineConfig(({ mode }) => {
'/api': env.PROXY_URL '/api': env.PROXY_URL
} }
}, },
plugins: [ plugins: [react(), svgr(), tsconfigPaths()]
react(),
svgr(),
tsconfigPaths(),
nodePolyfills({ globals: { process: true } })
]
} }
}) })