diff --git a/docker/app-mariadb/docker-compose.yml b/docker/app-mariadb/docker-compose.yml deleted file mode 100644 index e9c5678dd..000000000 --- a/docker/app-mariadb/docker-compose.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: "3" -networks: - nocobase: - driver: bridge -services: - app: - image: nocobase/nocobase:latest - networks: - - nocobase - depends_on: - - mariadb - environment: - - APP_KEY=your-secret-key # Replace it with your own app key - - DB_DIALECT=mariadb - - DB_HOST=mariadb - - DB_DATABASE=nocobase - - DB_USER=nocobase - - DB_PASSWORD=nocobase - - DB_TIMEZONE=+08:00 - - DB_UNDERSCORED=true - volumes: - - ./storage:/app/nocobase/storage - ports: - - "13000:80" - mariadb: - image: mariadb:latest - environment: - MYSQL_DATABASE: nocobase - MYSQL_USER: nocobase - MYSQL_PASSWORD: nocobase - MYSQL_ROOT_PASSWORD: nocobase - restart: always - volumes: - - ./storage/db/mariadb:/var/lib/mysql - networks: - - nocobase \ No newline at end of file diff --git a/docker/app-mysql/docker-compose.yml b/docker/app-mysql/docker-compose.yml deleted file mode 100644 index c668c4d75..000000000 --- a/docker/app-mysql/docker-compose.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: "3" -networks: - nocobase: - driver: bridge -services: - app: - image: nocobase/nocobase:latest - networks: - - nocobase - depends_on: - - mysql - environment: - - APP_KEY=your-secret-key # Replace it with your own app key - - DB_DIALECT=mysql - - DB_HOST=mysql - - DB_DATABASE=nocobase - - DB_USER=root - - DB_PASSWORD=nocobase - - DB_TIMEZONE=+08:00 - volumes: - - ./storage:/app/nocobase/storage - ports: - - "13000:80" - mysql: - image: mysql:latest - environment: - MYSQL_DATABASE: nocobase - MYSQL_USER: nocobase - MYSQL_PASSWORD: nocobase - MYSQL_ROOT_PASSWORD: nocobase - restart: always - volumes: - - ./storage/db/mysql:/var/lib/mysql - networks: - - nocobase diff --git a/docker/app-postgres/docker-compose.yml b/docker/app-postgres/docker-compose.yml deleted file mode 100644 index 127e94ba6..000000000 --- a/docker/app-postgres/docker-compose.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: "3" -networks: - nocobase: - driver: bridge -services: - app: - image: nocobase/nocobase:latest - networks: - - nocobase - environment: - - APP_KEY=your-secret-key # Replace it with your own app key - - DB_DIALECT=postgres - - DB_HOST=postgres - - DB_DATABASE=nocobase - - DB_USER=nocobase - - DB_PASSWORD=nocobase - volumes: - - ./storage:/app/nocobase/storage - ports: - - "13000:80" - depends_on: - - postgres - postgres: - image: postgres:10 - restart: always - command: postgres -c wal_level=logical - environment: - POSTGRES_USER: nocobase - POSTGRES_DB: nocobase - POSTGRES_PASSWORD: nocobase - volumes: - - ./storage/db/postgres:/var/lib/postgresql/data - networks: - - nocobase \ No newline at end of file diff --git a/docker/app-sqlite/docker-compose.yml b/docker/app-sqlite/docker-compose.yml deleted file mode 100644 index 45297b2e4..000000000 --- a/docker/app-sqlite/docker-compose.yml +++ /dev/null @@ -1,15 +0,0 @@ -version: "3" -networks: - nocobase: - driver: bridge -services: - app: - image: nocobase/nocobase:latest - networks: - - nocobase - environment: - - APP_KEY=your-secret-key # Replace it with your own app key - volumes: - - ./storage:/app/nocobase/storage - ports: - - "13000:80" \ No newline at end of file diff --git a/docker/hera/Dockerfile b/docker/hera/Dockerfile deleted file mode 100644 index 156fdc3c8..000000000 --- a/docker/hera/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# 设置基础镜像 -FROM node:20.9.0 as builder - -# 在容器中创建/app/nocobase目录 -WORKDIR /app/nocobase - -# 设置npm和pnpm的registry为https://registry.npmmirror.com -RUN npm config set registry https://registry.npmmirror.com && \ - yarn config set registry https://registry.npmmirror.com - -# 将当前目录中的所有文件复制到容器的/app/nocobase目录下 -COPY . /app/nocobase - -# 使用 pnpm 安装依赖 -RUN yarn -RUN yarn build - -# 使用 pm2-runtime 执行packages/core/app/lib/index.js文件 -CMD ["yarn", "pm2-runtime", "packages/core/app/lib/index.js", "--", "start"] diff --git a/docker/nocobase-full/docker-entrypoint.sh b/docker/nocobase-full/docker-entrypoint.sh deleted file mode 100755 index c81b3963a..000000000 --- a/docker/nocobase-full/docker-entrypoint.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -set -e - -nginx -echo 'nginx started'; - -cd /app/nocobase && yarn nocobase db:auth --retry=30 -cd /app/nocobase && yarn nocobase install -s -cd /app/nocobase && yarn nocobase upgrade -S -cd /app/nocobase && yarn start - -# Run command with node if the first argument contains a "-" or is not a system command. The last -# part inside the "{}" is a workaround for the following bug in ash/dash: -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=874264 -if [ "${1#-}" != "${1}" ] || [ -z "$(command -v "${1}")" ] || { [ -f "${1}" ] && ! [ -x "${1}" ]; }; then - set -- node "$@" -fi - -exec "$@" diff --git a/docker/nocobase-full/nocobase.conf b/docker/nocobase-full/nocobase.conf deleted file mode 100644 index fa37c8ea8..000000000 --- a/docker/nocobase-full/nocobase.conf +++ /dev/null @@ -1,42 +0,0 @@ -log_format apm '"$time_local" client=$remote_addr ' - 'method=$request_method request="$request" ' - 'request_length=$request_length ' - 'status=$status bytes_sent=$bytes_sent ' - 'body_bytes_sent=$body_bytes_sent ' - 'referer=$http_referer ' - 'user_agent="$http_user_agent" ' - 'upstream_addr=$upstream_addr ' - 'upstream_status=$upstream_status ' - 'request_time=$request_time ' - 'upstream_response_time=$upstream_response_time ' - 'upstream_connect_time=$upstream_connect_time ' - 'upstream_header_time=$upstream_header_time'; - -server { - listen 80; - server_name _; - root /app/nocobase/packages/app/client/dist; - index index.html; - client_max_body_size 20M; - - access_log /var/log/nginx/nocobase.log apm; - - location /storage/uploads/ { - alias /app/nocobase/storage/uploads/; - autoindex off; - } - - location / { - root /app/nocobase/packages/app/client/dist; - try_files $uri $uri/ /index.html; - } - - location ^~ /api/ { - proxy_pass http://127.0.0.1:13000/api/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection 'upgrade'; - proxy_set_header Host $host; - proxy_cache_bypass $http_upgrade; - } -} diff --git a/docker/nocobase/docker-entrypoint.sh b/docker/nocobase/docker-entrypoint.sh index 829d15354..227118b6f 100755 --- a/docker/nocobase/docker-entrypoint.sh +++ b/docker/nocobase/docker-entrypoint.sh @@ -11,7 +11,7 @@ if [ ! -f "/app/nocobase/package.json" ]; then touch /app/nocobase/node_modules/@nocobase/app/dist/client/index.html fi -cd /app/nocobase && pnpm nocobase create-nginx-conf +cd /app/nocobase && pnpm tachybase create-nginx-conf rm -rf /etc/nginx/sites-enabled/nocobase.conf ln -s /app/nocobase/storage/nocobase.conf /etc/nginx/sites-enabled/nocobase.conf diff --git a/package.json b/package.json index 476902541..ab3d2b55e 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "tag:v": "changeset version", "tar": "tachybase tar", "tb": "tachybase", + "tbi": "tachybase install", "tc": "tachybase test:client", "test": "tachybase test", "test:client": "tachybase test:client", @@ -51,9 +52,9 @@ "@commitlint/config-conventional": "^16.0.0", "@commitlint/prompt-cli": "^16.1.0", "@nocobase/build": "workspace:*", - "@nocobase/preset-nocobase": "workspace:*", "@nocobase/test": "workspace:*", "@tachybase/cli": "workspace:*", + "@tachybase/preset-tachybase": "workspace:*", "@types/react": "^18.2.73", "@types/react-dom": "^18.2.23", "auto-changelog": "^2.4.0", diff --git a/packages/core/app/client/src/pages/index.tsx b/packages/core/app/client/src/pages/index.tsx index 9952ec354..df8b398ec 100644 --- a/packages/core/app/client/src/pages/index.tsx +++ b/packages/core/app/client/src/pages/index.tsx @@ -1,5 +1,5 @@ import { Application } from '@nocobase/client'; -import { NocoBaseClientPresetPlugin } from '@nocobase/preset-nocobase/client'; +import { TachyBaseClientPresetPlugin } from '@tachybase/preset-tachybase/client'; import devDynamicImport from '../.plugins/index'; export const app = new Application({ @@ -9,7 +9,7 @@ export const app = new Application({ }, // @ts-ignore publicPath: window['__nocobase_public_path__'] || process.env.APP_PUBLIC_PATH || '/', - plugins: [NocoBaseClientPresetPlugin], + plugins: [TachyBaseClientPresetPlugin], ws: { // @ts-ignore url: window['__nocobase_ws_url__'] || process.env.WEBSOCKET_URL || '', diff --git a/packages/core/app/client/tsconfig.json b/packages/core/app/client/tsconfig.json index a931fc90a..597402a2c 100644 --- a/packages/core/app/client/tsconfig.json +++ b/packages/core/app/client/tsconfig.json @@ -12,7 +12,8 @@ "strict": true, "paths": { "@/*": ["src/*"], - "@@/*": ["src/.umi/*"] + "@@/*": ["src/.umi/*"], + "@nocobase/client": ["../../client/src"], }, "allowSyntheticDefaultImports": true }, diff --git a/packages/core/app/package.json b/packages/core/app/package.json index 684d0bf59..7909cd41b 100644 --- a/packages/core/app/package.json +++ b/packages/core/app/package.json @@ -12,8 +12,8 @@ "types": "./lib/index.d.ts", "dependencies": { "@nocobase/database": "workspace:*", - "@nocobase/preset-nocobase": "workspace:*", - "@nocobase/server": "workspace:*" + "@nocobase/server": "workspace:*", + "@tachybase/preset-tachybase": "workspace:*" }, "devDependencies": { "@nocobase/cache": "workspace:*", diff --git a/packages/core/app/src/config/cache.ts b/packages/core/app/src/config/cache.ts index 5659a226d..99503ed03 100644 --- a/packages/core/app/src/config/cache.ts +++ b/packages/core/app/src/config/cache.ts @@ -1,6 +1,6 @@ import { CacheManagerOptions } from '@nocobase/cache'; -export const cacheManager = { +export const cacheManager: CacheManagerOptions = { defaultStore: process.env.CACHE_DEFAULT_STORE || 'memory', stores: { memory: { diff --git a/packages/core/app/src/config/plugins.ts b/packages/core/app/src/config/plugins.ts index ea227ae77..e4ba361b9 100644 --- a/packages/core/app/src/config/plugins.ts +++ b/packages/core/app/src/config/plugins.ts @@ -1,3 +1,3 @@ import { PluginConfiguration } from '@nocobase/server'; -export default ['nocobase'] as PluginConfiguration[]; +export default ['tachybase'] as PluginConfiguration[]; diff --git a/packages/core/build/src/buildPlugin.ts b/packages/core/build/src/buildPlugin.ts index 276270198..fd9e74865 100644 --- a/packages/core/build/src/buildPlugin.ts +++ b/packages/core/build/src/buildPlugin.ts @@ -124,7 +124,7 @@ const external = [ 'china-division', ]; const pluginPrefix = ( - process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@nocobase/preset-,@nocobase/plugin-pro-,@hera/plugin-' + process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@tachybase/preset-,@nocobase/plugin-pro-,@hera/plugin-' ).split(','); const target_dir = 'dist'; diff --git a/packages/core/cli/src/util.ts b/packages/core/cli/src/util.ts index b550028d7..cbbaeceb6 100644 --- a/packages/core/cli/src/util.ts +++ b/packages/core/cli/src/util.ts @@ -322,7 +322,7 @@ export function initEnv() { SOCKET_PATH: 'storage/gateway.sock', NODE_MODULES_PATH: resolve(process.cwd(), 'node_modules'), PM2_HOME: resolve(process.cwd(), './storage/.pm2'), - PLUGIN_PACKAGE_PREFIX: '@nocobase/plugin-,@nocobase/plugin-sample-,@nocobase/preset-,@hera/plugin-', + PLUGIN_PACKAGE_PREFIX: '@nocobase/plugin-,@nocobase/plugin-sample-,@tachybase/preset-,@hera/plugin-', SERVER_TSCONFIG_PATH: './tsconfig.server.json', PLAYWRIGHT_AUTH_FILE: resolve(process.cwd(), 'storage/playwright/.auth/admin.json'), CACHE_DEFAULT_STORE: 'memory', diff --git a/packages/core/create-nocobase-app/src/generator.js b/packages/core/create-nocobase-app/src/generator.js index 768b50db1..e737f4d53 100644 --- a/packages/core/create-nocobase-app/src/generator.js +++ b/packages/core/create-nocobase-app/src/generator.js @@ -134,7 +134,6 @@ class AppGenerator extends Generator { APP_ENV: 'development', DB_DIALECT: dbDialect, APP_KEY: crypto.randomBytes(256).toString('base64'), - // PLUGIN_PACKAGE_PREFIX: `@nocobase/plugin-,@nocobase/preset-,@${this.context.name}/plugin-`, ...env, }, }; @@ -184,7 +183,7 @@ class AppGenerator extends Generator { console.log(''); console.log(chalk.green(`$ cd ${name}`)); console.log(chalk.green(`$ pnpm install`)); - console.log(chalk.green(`$ pnpm nocobase install`)); + console.log(chalk.green(`$ pnpm tachybase install`)); console.log(chalk.green(`$ pnpm dev`)); console.log(''); } diff --git a/packages/core/create-nocobase-app/templates/app/package.json.tpl b/packages/core/create-nocobase-app/templates/app/package.json.tpl index b5f3d28ce..1741b450e 100644 --- a/packages/core/create-nocobase-app/templates/app/package.json.tpl +++ b/packages/core/create-nocobase-app/templates/app/package.json.tpl @@ -23,7 +23,7 @@ }, "dependencies": { "pm2": "^5.2.0", - "@nocobase/preset-nocobase": "{{{version}}}", + "@tachybase/preset-tachybase": "{{{version}}}", "@nocobase/build": "{{{version}}}", "@tachycode/cli": "{{{version}}}", {{{dependencies}}} diff --git a/packages/core/server/package.json b/packages/core/server/package.json index 119e0a02b..9f289b339 100644 --- a/packages/core/server/package.json +++ b/packages/core/server/package.json @@ -45,6 +45,7 @@ "lodash": "^4.17.21", "multer": "^1.4.2", "nanoid": "3.3.4", + "qs": "^6.12.1", "react": "^18.2.0", "semver": "^7.3.7", "serve-handler": "^6.1.5", @@ -55,6 +56,7 @@ "devDependencies": { "@types/koa": "^2.13.4", "@types/lodash": "4.17.0", + "@types/qs": "^6.9.14", "@types/semver": "^7.3.9", "@types/serve-handler": "^6.1.1", "@types/ws": "^8.5.5", diff --git a/packages/core/server/src/app-command.ts b/packages/core/server/src/app-command.ts index d38231386..81fc71a56 100644 --- a/packages/core/server/src/app-command.ts +++ b/packages/core/server/src/app-command.ts @@ -37,7 +37,7 @@ export class AppCommand extends Command { //@ts-ignore const userArgs = this._prepareUserArgs(argv, parseOptions); - if (userArgs[0] === 'nocobase') { + if (userArgs[0] === 'tachybase') { userArgs.shift(); } diff --git a/packages/core/server/src/application.ts b/packages/core/server/src/application.ts index ebe85c517..76322ff2c 100644 --- a/packages/core/server/src/application.ts +++ b/packages/core/server/src/application.ts @@ -45,7 +45,6 @@ import { ApplicationVersion } from './helpers/application-version'; import { Locale } from './locale'; import { Plugin } from './plugin'; import { InstallOptions, PluginManager } from './plugin-manager'; -import { createClient } from 'redis'; import { nanoid } from 'nanoid'; import _ from 'lodash'; @@ -183,11 +182,6 @@ export class Application exten private _maintainingCommandStatus: MaintainingCommandStatus; private _maintainingStatusBeforeCommand: MaintainingCommandStatus | null; private _actionCommand: Command; - private redisClient = createClient({ - url: process.env.REDIS_URL ?? 'redis://127.0.0.1:6379', - }); - private redisPubClient = this.redisClient.duplicate(); - private redisSubClient = this.redisClient.duplicate(); static KEY_CORE_APP_PREFIX = 'KEY_CORE_APP_'; private currentId = nanoid(); @@ -197,20 +191,6 @@ export class Application exten this.rawOptions = this.name == 'main' ? lodash.cloneDeep(options) : {}; this.init(); - Promise.all([this.redisClient.connect(), this.redisPubClient.connect(), this.redisSubClient.connect()]) - .then(() => { - console.log(`[APPLICATION] ${this.name} redis connected.`); - this.redisSubClient.SUBSCRIBE(Application.KEY_CORE_APP_PREFIX + this.name, async (data) => { - const payload = JSON.parse(data); - if (payload.id !== this.currentId) { - this.runAsCLI(payload.argv, payload.options, false); - } - }); - }) - .catch((err) => { - console.error(err); - }); - this._appSupervisor.addApp(this); } @@ -603,7 +583,7 @@ export class Application exten } protected createCLI() { - const command = new AppCommand('nocobase') + const command = new AppCommand('tachybase') .usage('[command] [options]') .hook('preAction', async (_, actionCommand) => { this._actionCommand = actionCommand; @@ -715,26 +695,7 @@ export class Application exten /** * @internal */ - async runAsCLI( - argv = process.argv, - options?: ParseOptions & { throwError?: boolean; reqId?: string }, - broadcast = true, - ) { - if (broadcast) { - if (_.first(argv) === 'pm' || _.first(argv) === 'restart') { - console.log('[broadcast]:', argv); - setTimeout(() => { - this.redisPubClient.PUBLISH( - Application.KEY_CORE_APP_PREFIX + this.name, - JSON.stringify({ - id: this.currentId, - argv: ['restart'], - options: { from: 'user' }, - }), - ); - }, 2000); - } - } + async runAsCLI(argv = process.argv, options?: ParseOptions & { throwError?: boolean; reqId?: string }) { if (this.activatedCommand) { return; } @@ -798,7 +759,7 @@ export class Application exten if (options.checkInstall && !(await this.isInstalled())) { throw new ApplicationNotInstall( - `Application ${this.name} is not installed, Please run 'pnpm nocobase install' command first`, + `Application ${this.name} is not installed, Please run 'pnpm tachybase install' command first`, ); } diff --git a/packages/core/server/src/commands/start.ts b/packages/core/server/src/commands/start.ts index 7ae3fb21d..d3bd7caa2 100644 --- a/packages/core/server/src/commands/start.ts +++ b/packages/core/server/src/commands/start.ts @@ -33,7 +33,7 @@ export default (app: Application) => { if (!(await app.isInstalled())) { app['_started'] = true; throw new ApplicationNotInstall( - `Application ${app.name} is not installed, Please run 'pnpm nocobase install' command first`, + `Application ${app.name} is not installed, Please run 'pnpm tachybase install' command first`, ); } await app.load(); diff --git a/packages/core/server/src/gateway/ws-server.ts b/packages/core/server/src/gateway/ws-server.ts index 3f8318863..68ef32617 100644 --- a/packages/core/server/src/gateway/ws-server.ts +++ b/packages/core/server/src/gateway/ws-server.ts @@ -5,7 +5,6 @@ import { IncomingMessage } from 'http'; import { AppSupervisor } from '../app-supervisor'; import { applyErrorWithArgs, getErrorWithCode } from './errors'; import lodash from 'lodash'; -import { createClient } from 'redis'; import { Logger } from '@nocobase/logger'; declare class WebSocketWithId extends WebSocket { @@ -28,11 +27,6 @@ function getPayloadByErrorCode(code, options) { export class WSServer { wss: WebSocket.Server; webSocketClients = new Map(); - private redisClient = createClient({ - url: process.env.REDIS_URL ?? 'redis://127.0.0.1:6379', - }); - private redisPubClient = this.redisClient.duplicate(); - private redisSubClient = this.redisClient.duplicate(); static KEY_CORE_MESSAGE = 'KEY_CORE_MESSAGE'; private currentId = nanoid(); logger: Logger; @@ -40,20 +34,6 @@ export class WSServer { constructor() { this.wss = new WebSocketServer({ noServer: true }); - Promise.all([this.redisClient.connect(), this.redisPubClient.connect(), this.redisSubClient.connect()]) - .then(() => { - console.log('[WSServer]: redis connected.'); - this.redisSubClient.SUBSCRIBE(WSServer.KEY_CORE_MESSAGE, async (data) => { - const payload = JSON.parse(data); - if (payload.id !== this.currentId) { - this.sendToConnectionsByTag(payload.tagName, payload.tagValue, payload.sendMessage, false); - } - }); - }) - .catch((err) => { - console.error(err); - }); - this.wss.on('connection', (ws: WebSocketWithId, request: IncomingMessage) => { const client = this.addNewConnection(ws, request); @@ -197,18 +177,7 @@ export class WSServer { client.ws.send(JSON.stringify(sendMessage)); } - sendToConnectionsByTag(tagName: string, tagValue: string, sendMessage: object, broadcast = true) { - if (broadcast) { - this.redisPubClient.PUBLISH( - WSServer.KEY_CORE_MESSAGE, - JSON.stringify({ - id: this.currentId, - tagName, - tagValue, - sendMessage, - }), - ); - } + sendToConnectionsByTag(tagName: string, tagValue: string, sendMessage: object) { this.loopThroughConnections((client: WebSocketClient) => { if (client.tags.includes(`${tagName}#${tagValue}`)) { this.sendMessageToConnection(client, sendMessage); diff --git a/packages/core/server/src/plugin-manager/constants.ts b/packages/core/server/src/plugin-manager/constants.ts index 13a1d1355..7628f4625 100644 --- a/packages/core/server/src/plugin-manager/constants.ts +++ b/packages/core/server/src/plugin-manager/constants.ts @@ -1,8 +1,8 @@ -export const APP_NAME = 'nocobase'; +export const APP_NAME = 'tachybase'; export const DEFAULT_PLUGIN_STORAGE_PATH = 'storage/plugins'; export const DEFAULT_PLUGIN_PATH = 'packages/plugins/'; export const pluginPrefix = ( - process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@nocobase/preset-,@nocobase/plugin-pro-,@hera/plugin-' + process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@tachybase/preset-,@nocobase/plugin-pro-,@hera/plugin-' ).split(','); export const requireRegex = /require\s*\(['"`](.*?)['"`]\)/g; export const importRegex = /^import(?:['"\s]*([\w*${}\s,]+)from\s*)?['"\s]['"\s](.*[@\w_-]+)['"\s].*/gm; diff --git a/packages/core/server/src/plugin-manager/plugin-manager.ts b/packages/core/server/src/plugin-manager/plugin-manager.ts index 4c5cc0c0a..f19448ac0 100644 --- a/packages/core/server/src/plugin-manager/plugin-manager.ts +++ b/packages/core/server/src/plugin-manager/plugin-manager.ts @@ -136,7 +136,7 @@ export class PluginManager { */ static getPluginPkgPrefix() { return ( - process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@nocobase/preset-,@nocobase/plugin-pro-,@hera/plugin-' + process.env.PLUGIN_PACKAGE_PREFIX || '@nocobase/plugin-,@tachybase/preset-,@nocobase/plugin-pro-,@hera/plugin-' ).split(','); } @@ -629,7 +629,7 @@ export class PluginManager { } }), ); - await execa('pnpm', ['nocobase', 'postinstall']); + await execa('pnpm', ['tachybase', 'postinstall']); }; if (options?.force) { await this.repository.destroy({ @@ -671,7 +671,7 @@ export class PluginManager { if (options?.removeDir) { await removeDir(); } - await execa('pnpm', ['nocobase', 'refresh']); + await execa('pnpm', ['tachybase', 'refresh']); } /** @@ -737,7 +737,7 @@ export class PluginManager { await this.add(opts['name'] || urlOrName, opts, true); } await this.app.emitStartedEvent(); - await execa('pnpm', ['nocobase', 'postinstall']); + await execa('pnpm', ['tachybase', 'postinstall']); } /** @@ -821,7 +821,7 @@ export class PluginManager { if (process.env.IS_DEV_CMD) { await tsxRerunning(); } else { - await execa('pnpm', ['nocobase', 'pm2-restart'], { + await execa('pnpm', ['tachybase', 'pm2-restart'], { env: process.env, }); } diff --git a/packages/plugins/@nocobase/plugin-audit-logs/README.md b/packages/plugins/@nocobase/plugin-audit-logs/README.md deleted file mode 100644 index e617cc5b1..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# audit-logs - -English | [中文](./README.zh-CN.md) - -审计日志插件。 - -## 安装激活 - -内置插件无需手动安装激活。 - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-audit-logs/README.zh-CN.md b/packages/plugins/@nocobase/plugin-audit-logs/README.zh-CN.md deleted file mode 100644 index 8dc810586..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/README.zh-CN.md +++ /dev/null @@ -1,11 +0,0 @@ -# audit-logs - -[English](./README.md) | 中文 - -审计日志插件。 - -## 安装激活 - -内置插件无需手动安装激活。 - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-audit-logs/client.d.ts b/packages/plugins/@nocobase/plugin-audit-logs/client.d.ts deleted file mode 100644 index 6c459cbac..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/client.js b/packages/plugins/@nocobase/plugin-audit-logs/client.js deleted file mode 100644 index b6e3be70e..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/package.json b/packages/plugins/@nocobase/plugin-audit-logs/package.json deleted file mode 100644 index 6d918e09f..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "@nocobase/plugin-audit-logs", - "displayName": "Audit logs (deprecated)", - "version": "0.21.6", - "description": "This plugin is deprecated. There will be a new audit log plugin in the future.", - "keywords": [ - "System & security" - ], - "homepage": "https://docs.nocobase.com/handbook/audit-logs", - "license": "AGPL-3.0", - "main": "./dist/server/index.js", - "devDependencies": { - "@ant-design/icons": "~5.3.6", - "@formily/antd-v5": "1.x", - "@nocobase/schema": "workspace:*", - "react": "^18.2.0", - "react-i18next": "^11.15.1" - }, - "peerDependencies": { - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*", - "@nocobase/utils": "workspace:*" - }, - "description.zh-CN": "该插件已废弃,请勿使用,未来将有新的审计日志插件。", - "displayName.zh-CN": "审计日志(废弃)", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1", - "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/audit-logs" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/server.d.ts b/packages/plugins/@nocobase/plugin-audit-logs/server.d.ts deleted file mode 100644 index c41081ddc..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/server.js b/packages/plugins/@nocobase/plugin-audit-logs/server.js deleted file mode 100644 index 972842039..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx deleted file mode 100644 index 9d3f81535..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockInitializer.tsx +++ /dev/null @@ -1,25 +0,0 @@ -import { TableOutlined } from '@ant-design/icons'; -import { ISchema } from '@nocobase/schema'; -import { SchemaInitializerItem, useSchemaInitializer, useSchemaInitializerItem } from '@nocobase/client'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; -import { createAuditLogsBlockSchema } from './createAuditLogsBlockSchema'; - -export const AuditLogsBlockInitializer = () => { - const { insert } = useSchemaInitializer(); - const { t } = useTranslation(); - const itemConfig = useSchemaInitializerItem(); - - const schema = createAuditLogsBlockSchema(); - - return ( - } - onClick={() => { - insert(schema as ISchema); - }} - title={t('Audit Logs')} - {...itemConfig} - /> - ); -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx deleted file mode 100644 index 9569b2c10..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsBlockProvider.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import { ExtendCollectionsProvider, TableBlockProvider } from '@nocobase/client'; -import React from 'react'; -import { useAuditChangesCollection, useAuditLogsCollection, useCollectionsCollection } from './collections'; - -export const AuditLogsBlockProvider: React.FC = ({ children, ...restProps }) => { - const auditChangesCollection = useAuditChangesCollection(); - const auditLogsCollection = useAuditLogsCollection(); - const collectionsCollection = useCollectionsCollection(); - - return ( - - - {children} - - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsProvider.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsProvider.tsx deleted file mode 100644 index df1959f4a..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/AuditLogsProvider.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { SchemaComponentOptions } from '@nocobase/client'; -import React from 'react'; -import { AuditLogsBlockInitializer } from './AuditLogsBlockInitializer'; -import { AuditLogsBlockProvider } from './AuditLogsBlockProvider'; -import { AuditLogsField } from './components/AuditLogsField'; -import { AuditLogsValue } from './components/AuditLogsValue'; -import { AuditLogsViewActionInitializer } from './components/AuditLogsViewActionInitializer'; -import { AuditLogs } from './deplicated/AuditLogs'; -import { AuditLogsTableActionColumnInitializer } from './initializers/AuditLogsTableActionColumnInitializer'; - -export const AuditLogsProvider = (props: any) => { - return ( - - {props.children} - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/__tests__/createAuditLogsBlockSchema.test.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/__tests__/createAuditLogsBlockSchema.test.ts deleted file mode 100644 index 03b8607b8..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/__tests__/createAuditLogsBlockSchema.test.ts +++ /dev/null @@ -1,77 +0,0 @@ -import { ISchema } from '@nocobase/schema'; -import { createAuditLogsBlockSchema } from '../createAuditLogsBlockSchema'; - -describe('createAuditLogsBlockSchema', () => { - let schema: ISchema; - - beforeAll(() => { - schema = createAuditLogsBlockSchema(); - }); - - it('should return a valid schema object', () => { - expect(schema).toBeDefined(); - expect(typeof schema).toBe('object'); - }); - - it('should have specific top-level properties with expected values', () => { - expect(schema).toMatchObject({ - type: 'void', - 'x-decorator': 'AuditLogsBlockProvider', - 'x-acl-action': 'auditLogs:list', - 'x-toolbar': 'BlockSchemaToolbar', - 'x-settings': 'blockSettings:table', - 'x-component': 'CardItem', - 'x-filter-targets': expect.arrayContaining([]), - }); - }); - - describe('x-decorator-props section', () => { - it('should have a collection named "auditLogs"', () => { - expect(schema['x-decorator-props'].collection).toEqual('auditLogs'); - }); - - it('should have a list action', () => { - expect(schema['x-decorator-props'].action).toEqual('list'); - }); - - it('should set pageSize to 20', () => { - expect(schema['x-decorator-props'].params.pageSize).toEqual(20); - }); - - it('contains expected boolean flags', () => { - expect(schema['x-decorator-props'].showIndex).toBeTruthy(); - expect(schema['x-decorator-props'].dragSort).toBeFalsy(); - expect(schema['x-decorator-props'].disableTemplate).toBeTruthy(); - }); - }); - - describe('actions property inside schema.properties', () => { - let actions; - - beforeAll(() => { - // @ts-ignore - actions = schema.properties.actions; - }); - - it('should be defined and have a specific structure', () => { - expect(actions).toBeDefined(); - expect(actions.type).toBe('void'); - expect(actions['x-initializer']).toBe('auditLogsTable:configureActions'); - expect(actions['x-component']).toBe('ActionBar'); - }); - - it('has x-component-props with expected style', () => { - expect(actions['x-component-props'].style.marginBottom).toBe('var(--nb-spacing)'); - }); - }); - - describe('properties should include dynamically keyed objects', () => { - it('keyed objects should match the expected structure for tables', () => { - const propertyKeys = Object.keys(schema.properties).filter((key) => key !== 'actions'); - propertyKeys.forEach((key) => { - expect(schema.properties[key].type).toBe('array'); - expect(schema.properties[key]['x-component']).toBe('TableV2'); - }); - }); - }); -}); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/collections.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/collections.tsx deleted file mode 100644 index c1d4757ef..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/collections.tsx +++ /dev/null @@ -1,166 +0,0 @@ -import { useAuditLogsTranslation } from './locale'; - -export const useAuditLogsCollection = () => { - return { - name: 'auditLogs', - title: '{{t("Audit logs")}}', - fields: [ - { - name: 'createdAt', - type: 'date', - interface: 'createdAt', - uiSchema: { - type: 'datetime', - title: '{{t("Created at")}}', - 'x-component': 'DatePicker', - 'x-component-props': { - showTime: true, - ellipsis: true, - }, - 'x-read-pretty': true, - }, - }, - { - name: 'type', - type: 'string', - interface: 'select', - uiSchema: { - type: 'string', - title: '{{t("Action type")}}', - 'x-component': 'Select', - 'x-component-props': { ellipsis: true }, - 'x-read-pretty': true, - enum: [ - { label: '{{t("Create record")}}', value: 'create', color: 'lime' }, - { label: '{{t("Update record")}}', value: 'update', color: 'gold' }, - { label: '{{t("Delete record")}}', value: 'destroy', color: 'magenta' }, - ], - }, - }, - { - name: 'recordId', - type: 'string', - interface: 'input', - uiSchema: { - title: '{{t("Record ID")}}', - type: 'string', - 'x-component': 'Input', - 'x-component-props': { ellipsis: true }, - }, - }, - { - collectionName: 'auditLogs', - name: 'collection', - type: 'belongsTo', - interface: 'm2o', - target: 'collections', - targetKey: 'name', - sourceKey: 'id', - foreignKey: 'collectionName', - uiSchema: { - type: 'object', - title: '{{t("Collection")}}', - 'x-component': 'AssociationField', - 'x-component-props': { fieldNames: { value: 'name', label: 'title' }, ellipsis: true }, - 'x-read-pretty': true, - }, - }, - { - name: 'user', - collectionName: 'auditLogs', - type: 'belongsTo', - interface: 'createdBy', - targetKey: 'id', - foreignKey: 'createdById', - target: 'users', - uiSchema: { - type: 'object', - title: '{{t("User")}}', - 'x-component': 'AssociationField', - 'x-component-props': { fieldNames: { value: 'id', label: 'nickname' }, ellipsis: true }, - 'x-read-pretty': true, - }, - }, - { - name: 'changes', - collectionName: 'auditLogs', - type: 'hasMany', - interface: 'subTable', - target: 'auditChanges', - foreignKey: 'auditLogId', - targetKey: 'id', - uiSchema: { - type: 'object', - title: '{{t("Details of changes", { ns: "audit-logs" })}}', - }, - }, - ], - }; -}; - -export const useAuditChangesCollection = () => { - return { - name: 'auditChanges', - title: '{{t("Audit Changes")}}', - fields: [ - { - name: 'field', - type: 'json', - interface: 'input', - uiSchema: { - title: '{{t("Field")}}', - 'x-component': 'AuditLogsField', - }, - }, - { - type: 'json', - name: 'before', - interface: 'input', - uiSchema: { - title: '{{t("Before change")}}', - 'x-component': 'AuditLogsValue', - }, - }, - { - type: 'json', - name: 'after', - interface: 'input', - uiSchema: { - title: '{{t("After change")}}', - 'x-component': 'AuditLogsValue', - }, - }, - ], - }; -}; - -export const useCollectionsCollection = () => { - return { - name: 'collections', - title: '{{t("Collections")}}', - fields: [ - { - name: 'name', - type: 'string', - interface: 'input', - uiSchema: { - title: '{{t("Collection name")}}', - type: 'string', - 'x-component': 'Input', - 'x-component-props': { ellipsis: true }, - }, - }, - { - name: 'title', - type: 'string', - interface: 'input', - uiSchema: { - title: '{{t("Collection display name")}}', - type: 'string', - 'x-component': 'Input', - 'x-component-props': { ellipsis: true }, - }, - }, - ], - }; -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsField.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsField.tsx deleted file mode 100644 index d545e1a46..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsField.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import { EllipsisWithTooltip, useCompile } from '@nocobase/client'; -import React from 'react'; -import { observer, useField } from '@nocobase/schema'; - -export const AuditLogsField = observer( - () => { - const field = useField(); - const compile = useCompile(); - if (!field.value) { - return null; - } - return ( - - {field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name} - - ); - }, - { displayName: 'AuditLogsField' }, -); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsValue.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsValue.tsx deleted file mode 100644 index 1c44af811..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsValue.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import { EllipsisWithTooltip, FormProvider, SchemaComponent, useRecord } from '@nocobase/client'; -import React from 'react'; -import { observer, useField } from '@nocobase/schema'; - -export const AuditLogsValue = observer( - () => { - const field = useField(); - const record = useRecord(); - if (record.field?.uiSchema) { - return ( - - - - ); - } - return {field.value ? JSON.stringify(field.value) : null}; - }, - { displayName: 'AuditLogsValue' }, -); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx deleted file mode 100644 index 3e51c3bd3..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/components/AuditLogsViewActionInitializer.tsx +++ /dev/null @@ -1,341 +0,0 @@ -import { ActionInitializer } from '@nocobase/client'; -import React from 'react'; - -export const AuditLogsViewActionInitializer = () => { - const schema = { - type: 'void', - title: '{{ t("View") }}', - 'x-action': 'view', - // 'x-designer': 'Action.Designer', - 'x-toolbar': 'ActionSchemaToolbar', - 'x-settings': 'actionSettings:view', - 'x-component': 'Action', - 'x-component-props': { - openMode: 'drawer', - }, - properties: { - drawer: { - type: 'void', - title: '{{ t("View record") }}', - 'x-component': 'Action.Container', - 'x-component-props': { - className: 'nb-action-popup', - }, - properties: { - tabs: { - type: 'void', - 'x-component': 'Tabs', - 'x-component-props': {}, - properties: { - tab1: { - type: 'void', - title: '{{t("Details")}}', - 'x-component': 'Tabs.TabPane', - 'x-designer': 'Tabs.Designer', - 'x-component-props': {}, - properties: { - grid: { - type: 'void', - 'x-component': 'Grid', - properties: { - '7ypqrxaqysp': { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - '1fc2l8dwe7m': { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - '5ley6xifrsb': { - type: 'void', - 'x-acl-action': 'auditLogs:get', - 'x-decorator': 'FormBlockProvider', - 'x-decorator-props': { - resource: 'auditLogs', - collection: 'auditLogs', - readPretty: true, - action: 'get', - params: { - appends: ['collection', 'user', 'changes'], - }, - useParams: '{{ useParamsFromRecord }}', - useSourceId: '{{ useSourceIdFromParentRecord }}', - }, - 'x-component': 'CardItem', - properties: { - bv710pbf9w6: { - type: 'void', - 'x-component': 'FormV2', - 'x-use-component-props': 'useFormBlockProps', - 'x-read-pretty': true, - properties: { - grid: { - type: 'void', - 'x-component': 'Grid', - properties: { - g4c24abnbd9: { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - fkt9dj5lu1k: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - createdAt: { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.createdAt', - 'x-component-props': {}, - 'x-read-pretty': true, - }, - }, - }, - }, - }, - l267bkv423v: { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - tehaepm5xqy: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - type: { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.type', - 'x-component-props': {}, - 'x-read-pretty': true, - }, - }, - }, - }, - }, - zhmn2tkzdh2: { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - yuwyej17i64: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - recordId: { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.recordId', - 'x-component-props': {}, - }, - }, - }, - }, - }, - '6q933ic06mj': { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - nwtbkqd99zl2: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - 'collection.title': { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.collection.title', - 'x-component-props': {}, - }, - }, - }, - nwtbkqd99zl1: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - 'collection.name': { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.collection.name', - 'x-component-props': {}, - }, - }, - }, - }, - }, - xd4kzulndqk: { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - k3sd72n83zd: { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - user: { - type: 'string', - 'x-component': 'CollectionField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.user', - 'x-component-props': {}, - 'x-read-pretty': true, - properties: { - viewer: { - type: 'void', - title: '{{ t("View record") }}', - 'x-component': 'RecordPicker.Viewer', - 'x-component-props': { - className: 'nb-action-popup', - }, - properties: { - tabs: { - type: 'void', - 'x-component': 'Tabs', - 'x-component-props': {}, - 'x-initializer': 'TabPaneInitializers', - properties: { - tab1: { - type: 'void', - title: '{{t("Details")}}', - 'x-component': 'Tabs.TabPane', - 'x-designer': 'Tabs.Designer', - 'x-component-props': {}, - properties: { - grid: { - type: 'void', - 'x-component': 'Grid', - 'x-initializer': 'popup:common:addBlock', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - '3lghgclbtcg': { - type: 'void', - 'x-component': 'Grid.Row', - properties: { - '8l1v1auwlx0': { - type: 'void', - 'x-component': 'Grid.Col', - properties: { - changes: { - type: 'void', - 'x-component': 'TableField', - 'x-decorator': 'FormItem', - 'x-collection-field': 'auditLogs.changes', - 'x-component-props': {}, - properties: { - block: { - type: 'void', - 'x-decorator': 'TableFieldProvider', - 'x-acl-action': 'auditChanges:list', - 'x-decorator-props': { - collection: 'auditChanges', - association: 'auditLogs.changes', - resource: 'auditLogs.changes', - action: 'list', - params: { - paginate: false, - }, - showIndex: true, - dragSort: false, - }, - properties: { - actions: { - type: 'void', - 'x-component': 'TableField.ActionBar', - 'x-component-props': {}, - }, - changes: { - type: 'array', - 'x-component': 'TableV2', - 'x-use-component-props': 'useTableFieldProps', - 'x-component-props': { - rowSelection: false, - }, - properties: { - '5uvv96u9ict': { - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-component': 'TableV2.Column', - properties: { - field: { - 'x-collection-field': 'auditChanges.field', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - 'x-component-props': { - ellipsis: true, - }, - }, - }, - }, - h7a4tgt11gd: { - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-component': 'TableV2.Column', - properties: { - before: { - 'x-collection-field': 'auditChanges.before', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - 'x-component-props': { - ellipsis: true, - }, - }, - }, - }, - m275z8rglzx: { - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-component': 'TableV2.Column', - properties: { - after: { - 'x-collection-field': 'auditChanges.after', - 'x-component': 'CollectionField', - 'x-read-pretty': true, - 'x-component-props': { - ellipsis: true, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }; - return ; -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/createAuditLogsBlockSchema.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/createAuditLogsBlockSchema.tsx deleted file mode 100644 index ea0920e6a..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/createAuditLogsBlockSchema.tsx +++ /dev/null @@ -1,71 +0,0 @@ -import { ISchema } from '@nocobase/schema'; -import { uid } from '@nocobase/utils/client'; - -export function createAuditLogsBlockSchema(): ISchema { - return { - type: 'void', - 'x-decorator': 'AuditLogsBlockProvider', - 'x-acl-action': `auditLogs:list`, - 'x-decorator-props': { - collection: 'auditLogs', - action: 'list', - params: { - pageSize: 20, - }, - rowKey: 'id', - showIndex: true, - dragSort: false, - disableTemplate: true, - }, - 'x-toolbar': 'BlockSchemaToolbar', - 'x-settings': 'blockSettings:table', - 'x-component': 'CardItem', - 'x-filter-targets': [], - properties: { - actions: { - type: 'void', - 'x-initializer': 'auditLogsTable:configureActions', - 'x-component': 'ActionBar', - 'x-component-props': { - style: { - marginBottom: 'var(--nb-spacing)', - }, - }, - properties: {}, - }, - [uid()]: { - type: 'array', - 'x-initializer': 'auditLogsTable:configureColumns', - 'x-component': 'TableV2', - 'x-use-component-props': 'useTableBlockProps', - 'x-component-props': { - rowKey: 'id', - rowSelection: { - type: 'checkbox', - }, - }, - properties: { - actions: { - type: 'void', - title: '{{ t("Actions") }}', - 'x-action-column': 'actions', - 'x-decorator': 'TableV2.Column.ActionBar', - 'x-component': 'TableV2.Column', - 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'auditLogsTable:configureItemActions', - properties: { - [uid()]: { - type: 'void', - 'x-decorator': 'DndContext', - 'x-component': 'Space', - 'x-component-props': { - split: '|', - }, - }, - }, - }, - }, - }, - }, - }; -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx deleted file mode 100644 index a97756af2..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogs.tsx +++ /dev/null @@ -1,511 +0,0 @@ -import { ArrayTable } from '@formily/antd-v5'; -import { observer, useField } from '@nocobase/schema'; -import { - ExtendCollectionsProvider, - FormProvider, - SchemaComponent, - TableBlockProvider, - useCollection_deprecated, - useCompile, - useRecord, -} from '@nocobase/client'; -import React, { createContext, useContext } from 'react'; -import { AuditLogsDesigner } from './AuditLogsDesigner'; - -const collection = { - name: 'auditLogs', - title: '{{t("Audit logs")}}', - fields: [ - { - name: 'createdAt', - type: 'date', - interface: 'createdAt', - uiSchema: { - type: 'datetime', - title: '{{t("Created at")}}', - 'x-component': 'DatePicker', - 'x-component-props': { - showTime: true, - }, - 'x-read-pretty': true, - }, - }, - { - name: 'type', - type: 'string', - interface: 'select', - uiSchema: { - type: 'string', - title: '{{t("Action type")}}', - 'x-component': 'Select', - 'x-read-pretty': true, - enum: [ - { label: '{{t("Create record")}}', value: 'create', color: 'lime' }, - { label: '{{t("Update record")}}', value: 'update', color: 'gold' }, - { label: '{{t("Delete record")}}', value: 'destroy', color: 'magenta' }, - ], - }, - }, - ], -}; - -const Username = observer( - () => { - const field = useField(); - return
{field?.value?.nickname || field.value?.id}
; - }, - { displayName: 'Username' }, -); - -const Collection = observer( - () => { - const field = useField(); - const { title, name } = field.value || {}; - const compile = useCompile(); - return
{title ? compile(title) : name}
; - }, - { displayName: 'Collection' }, -); - -const Field = observer( - () => { - const field = useField(); - const compile = useCompile(); - if (!field.value) { - return null; - } - return
{field.value?.uiSchema?.title ? compile(field.value?.uiSchema?.title) : field.value.name}
; - }, - { displayName: 'Field' }, -); - -const Value = observer( - () => { - const field = useField(); - const record = ArrayTable.useRecord(); - if (record.field?.uiSchema) { - return ( - - - - ); - } - return
{field.value ? JSON.stringify(field.value) : null}
; - }, - { displayName: 'Value' }, -); - -const IsAssociationBlock = createContext(null); -IsAssociationBlock.displayName = 'IsAssociationBlock'; - -export const AuditLogs: any = () => { - const isAssoc = useContext(IsAssociationBlock); - const ext = {}; - if (!isAssoc) { - ext['column31'] = { - type: 'void', - 'x-component': 'TableV2.Column', - title: '{{t("Record ID")}}', - properties: { - recordId: { - 'x-component': 'Input', - 'x-read-pretty': true, - }, - }, - }; - } - return ( - - ); -}; - -AuditLogs.Decorator = observer( - (props: any) => { - const parent = useCollection_deprecated(); - const record = useRecord(); - let filter = props?.params?.filter; - if (parent.name) { - const filterByTk = record?.[parent.filterTargetKey || 'id']; - if (filter) { - filter = { - $and: [ - filter, - { - collectionName: parent.name, - recordId: `${filterByTk}`, - }, - ], - }; - } else { - filter = { - collectionName: parent.name, - recordId: `${filterByTk}`, - }; - } - } - const defaults = { - collection: 'auditLogs', - resource: 'auditLogs', - action: 'list', - params: { - pageSize: 20, - appends: ['collection', 'user'], - ...props.params, - filter, - sort: '-createdAt', - }, - rowKey: 'id', - showIndex: true, - dragSort: false, - }; - return ( - - - {props.children} - - - ); - }, - { displayName: 'AuditLogs.Decorator' }, -); - -AuditLogs.Designer = AuditLogsDesigner; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx deleted file mode 100644 index 05a778ec3..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/deplicated/AuditLogsDesigner.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import { useField, useFieldSchema } from '@nocobase/schema'; -import { - GeneralSchemaDesigner, - SchemaSettingsDataScope, - SchemaSettingsDivider, - SchemaSettingsRemove, - SchemaSettingsSelectItem, - useCollection_deprecated, - useDesignable, - useFormBlockContext, - useTableBlockContext, -} from '@nocobase/client'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; - -export const AuditLogsDesigner = () => { - const { name, title } = useCollection_deprecated(); - const field = useField(); - const fieldSchema = useFieldSchema(); - const { form } = useFormBlockContext(); - const { service } = useTableBlockContext(); - const { t } = useTranslation(); - const { dn } = useDesignable(); - return ( - - { - const params = field.decoratorProps.params || {}; - params.filter = filter; - field.decoratorProps.params = params; - fieldSchema['x-decorator-props']['params'] = params; - service.run({ ...service.params?.[0], filter, page: 1 }); - dn.emit('patch', { - schema: { - ['x-uid']: fieldSchema['x-uid'], - 'x-decorator-props': fieldSchema['x-decorator-props'], - }, - }); - }} - /> - { - const params = field.decoratorProps.params || {}; - params.pageSize = pageSize; - field.decoratorProps.params = params; - fieldSchema['x-decorator-props']['params'] = params; - service.run({ ...service.params?.[0], pageSize, page: 1 }); - dn.emit('patch', { - schema: { - ['x-uid']: fieldSchema['x-uid'], - 'x-decorator-props': fieldSchema['x-decorator-props'], - }, - }); - }} - /> - - - - ); -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts deleted file mode 100644 index 3cb402f30..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/index.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Plugin, SchemaInitializerItemType } from '@nocobase/client'; -import { AuditLogsProvider } from './AuditLogsProvider'; -import { - auditLogsTableActionColumnInitializers, - auditLogsTableActionColumnInitializers_deprecated, -} from './initializers/AuditLogsTableActionColumnInitializers'; -import { - auditLogsTableActionInitializers, - auditLogsTableActionInitializers_deprecated, -} from './initializers/AuditLogsTableActionInitializers'; -import { - auditLogsTableColumnInitializers, - auditLogsTableColumnInitializers_deprecated, -} from './initializers/AuditLogsTableColumnInitializers'; -export * from './AuditLogsBlockInitializer'; -export * from './AuditLogsProvider'; - -export class AuditLogsPlugin extends Plugin { - async load() { - this.app.use(AuditLogsProvider); - this.app.schemaInitializerManager.add(auditLogsTableActionInitializers_deprecated); - this.app.schemaInitializerManager.add(auditLogsTableActionInitializers); - this.app.schemaInitializerManager.add(auditLogsTableActionColumnInitializers_deprecated); - this.app.schemaInitializerManager.add(auditLogsTableActionColumnInitializers); - this.app.schemaInitializerManager.add(auditLogsTableColumnInitializers_deprecated); - this.app.schemaInitializerManager.add(auditLogsTableColumnInitializers); - - const blockInitializers = this.app.schemaInitializerManager.get('page:addBlock'); - const recordBlockInitializers = this.app.schemaInitializerManager.get('popup:common:addBlock'); - const auditLogs: Omit = { - title: '{{t("Audit logs")}}', - Component: 'AuditLogsBlockInitializer', - }; - blockInitializers.add('otherBlocks.auditLogs', auditLogs); - recordBlockInitializers.add('otherBlocks.auditLogs', auditLogs); - } -} - -export default AuditLogsPlugin; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx deleted file mode 100644 index a045445a7..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializer.tsx +++ /dev/null @@ -1,27 +0,0 @@ -import { InitializerWithSwitch, useSchemaInitializerItem } from '@nocobase/client'; -import React from 'react'; - -export const AuditLogsTableActionColumnInitializer = () => { - const schema = { - type: 'void', - title: '{{ t("Actions") }}', - 'x-decorator': 'TableV2.Column.ActionBar', - 'x-component': 'TableV2.Column', - 'x-designer': 'TableV2.ActionColumnDesigner', - 'x-initializer': 'auditLogsTable:configureItemActions', - 'x-action-column': 'actions', - properties: { - actions: { - type: 'void', - 'x-decorator': 'DndContext', - 'x-component': 'Space', - 'x-component-props': { - split: '|', - }, - properties: {}, - }, - }, - }; - const itemConfig = useSchemaInitializerItem(); - return ; -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx deleted file mode 100644 index 42d315720..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionColumnInitializers.tsx +++ /dev/null @@ -1,141 +0,0 @@ -import { MenuOutlined } from '@ant-design/icons'; -import { useFieldSchema } from '@nocobase/schema'; -import { - CompatibleSchemaInitializer, - createDesignable, - Resizable, - useAPIClient, - useDesignable, -} from '@nocobase/client'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; - -/** - * @deprecated - */ -export const auditLogsTableActionColumnInitializers_deprecated = new CompatibleSchemaInitializer({ - name: 'AuditLogsTableActionColumnInitializers', - insertPosition: 'beforeEnd', - Component: (props: any) => , - useInsert() { - const fieldSchema = useFieldSchema(); - const api = useAPIClient(); - const { refresh } = useDesignable(); - const { t } = useTranslation(); - - return (schema) => { - const spaceSchema = fieldSchema.reduceProperties((buf, schema) => { - if (schema['x-component'] === 'Space') { - return schema; - } - return buf; - }, null); - if (!spaceSchema) { - return; - } - const dn = createDesignable({ - t, - api, - refresh, - current: spaceSchema, - }); - dn.loadAPIClientEvents(); - dn.insertBeforeEnd(schema); - }; - }, - items: [ - { - name: 'enableActions', - type: 'itemGroup', - title: '{{t("Enable actions")}}', - children: [ - { - name: 'view', - type: 'item', - title: '{{t("View")}}', - Component: 'AuditLogsViewActionInitializer', - schema: { - 'x-component': 'Action.Link', - 'x-action': 'view', - 'x-decorator': 'ACLActionProvider', - }, - }, - ], - }, - { - name: 'divider', - type: 'divider', - }, - { - name: 'columnWidth', - type: 'item', - title: '{{t("Column width")}}', - Component: Resizable, - }, - ], -}); - -export const auditLogsTableActionColumnInitializers = new CompatibleSchemaInitializer( - { - name: 'auditLogsTable:configureItemActions', - insertPosition: 'beforeEnd', - Component: (props: any) => , - useInsert() { - const fieldSchema = useFieldSchema(); - const api = useAPIClient(); - const { refresh } = useDesignable(); - const { t } = useTranslation(); - - return (schema) => { - const spaceSchema = fieldSchema.reduceProperties((buf, schema) => { - if (schema['x-component'] === 'Space') { - return schema; - } - return buf; - }, null); - if (!spaceSchema) { - return; - } - const dn = createDesignable({ - t, - api, - refresh, - current: spaceSchema, - }); - dn.loadAPIClientEvents(); - dn.insertBeforeEnd(schema); - }; - }, - items: [ - { - name: 'enableActions', - type: 'itemGroup', - title: '{{t("Enable actions")}}', - children: [ - { - name: 'view', - type: 'item', - title: '{{t("View")}}', - Component: 'AuditLogsViewActionInitializer', - schema: { - 'x-component': 'Action.Link', - 'x-action': 'view', - 'x-decorator': 'ACLActionProvider', - }, - }, - ], - }, - { - name: 'divider', - type: 'divider', - }, - { - name: 'columnWidth', - type: 'item', - title: '{{t("Column width")}}', - Component: Resizable, - }, - ], - }, - auditLogsTableActionColumnInitializers_deprecated, -); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx deleted file mode 100644 index 41b74bec4..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableActionInitializers.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { CompatibleSchemaInitializer } from '@nocobase/client'; - -/** - * @deprecated - * 操作记录表格操作配置 - */ -export const auditLogsTableActionInitializers_deprecated = new CompatibleSchemaInitializer({ - name: 'AuditLogsTableActionInitializers', - title: "{{t('Configure actions')}}", - icon: 'SettingOutlined', - style: { - marginLeft: 8, - }, - items: [ - { - type: 'itemGroup', - title: "{{t('Enable actions')}}", - name: 'enableActions', - children: [ - { - name: 'filter', - title: "{{t('Filter')}}", - Component: 'FilterActionInitializer', - schema: { - 'x-align': 'left', - }, - }, - { - name: 'refresh', - title: "{{t('Refresh')}}", - Component: 'RefreshActionInitializer', - schema: { - 'x-align': 'right', - }, - }, - ], - }, - ], -}); - -export const auditLogsTableActionInitializers = new CompatibleSchemaInitializer( - { - name: 'auditLogsTable:configureActions', - title: "{{t('Configure actions')}}", - icon: 'SettingOutlined', - style: { - marginLeft: 8, - }, - items: [ - { - type: 'itemGroup', - title: "{{t('Enable actions')}}", - name: 'enableActions', - children: [ - { - name: 'filter', - title: "{{t('Filter')}}", - Component: 'FilterActionInitializer', - schema: { - 'x-align': 'left', - }, - }, - { - name: 'refresh', - title: "{{t('Refresh')}}", - Component: 'RefreshActionInitializer', - schema: { - 'x-align': 'right', - }, - }, - ], - }, - ], - }, - auditLogsTableActionInitializers_deprecated, -); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx b/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx deleted file mode 100644 index 81ae12a81..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/initializers/AuditLogsTableColumnInitializers.tsx +++ /dev/null @@ -1,139 +0,0 @@ -import { - CompatibleSchemaInitializer, - SchemaInitializerChildren, - useAssociatedTableColumnInitializerFields, - useCompile, - useInheritsTableColumnInitializerFields, - useTableColumnInitializerFields, -} from '@nocobase/client'; -import React from 'react'; -import { useTranslation } from 'react-i18next'; - -// 表格列配置 -const ParentCollectionFields = () => { - const inheritFields = useInheritsTableColumnInitializerFields(); - const { t } = useTranslation(); - const compile = useCompile(); - if (!inheritFields?.length) return null; - const res = []; - inheritFields.forEach((inherit) => { - Object.values(inherit)[0].length && - res.push({ - type: 'itemGroup', - divider: true, - title: t(`Parent collection fields`) + '(' + compile(`${Object.keys(inherit)[0]}`) + ')', - children: Object.values(inherit)[0].filter((v: any) => !v?.field?.isForeignKey), - }); - }); - return {res}; -}; - -const AssociatedFields = () => { - const associatedFields = useAssociatedTableColumnInitializerFields(); - const { t } = useTranslation(); - - if (!associatedFields?.length) return null; - const schema: any = [ - { - type: 'itemGroup', - divider: true, - title: t('Display association fields'), - children: associatedFields, - }, - ]; - return {schema}; -}; - -/** - * @deprecated - */ -export const auditLogsTableColumnInitializers_deprecated = new CompatibleSchemaInitializer({ - name: 'AuditLogsTableColumnInitializers', - insertPosition: 'beforeEnd', - icon: 'SettingOutlined', - title: '{{t("Configure columns")}}', - wrap(s) { - if (s['x-action-column']) { - return s; - } - return { - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-designer': 'TableV2.Column.Designer', - 'x-component': 'TableV2.Column', - properties: { - [s.name]: { - ...s, - }, - }, - }; - }, - items: [ - { - name: 'displayFields', - type: 'itemGroup', - title: '{{t("Display fields")}}', - useChildren: useTableColumnInitializerFields, - }, - { - name: 'parentCollectionFields', - Component: ParentCollectionFields, - }, - { - name: 'associationFields', - Component: AssociatedFields, - }, - { - name: 'actionColumn', - title: '{{t("Action column")}}', - Component: 'AuditLogsTableActionColumnInitializer', - }, - ], -}); - -export const auditLogsTableColumnInitializers = new CompatibleSchemaInitializer( - { - name: 'auditLogsTable:configureColumns', - insertPosition: 'beforeEnd', - icon: 'SettingOutlined', - title: '{{t("Configure columns")}}', - wrap(s) { - if (s['x-action-column']) { - return s; - } - return { - type: 'void', - 'x-decorator': 'TableV2.Column.Decorator', - 'x-designer': 'TableV2.Column.Designer', - 'x-component': 'TableV2.Column', - properties: { - [s.name]: { - ...s, - }, - }, - }; - }, - items: [ - { - name: 'displayFields', - type: 'itemGroup', - title: '{{t("Display fields")}}', - useChildren: useTableColumnInitializerFields, - }, - { - name: 'parentCollectionFields', - Component: ParentCollectionFields, - }, - { - name: 'associationFields', - Component: AssociatedFields, - }, - { - name: 'actionColumn', - title: '{{t("Action column")}}', - Component: 'AuditLogsTableActionColumnInitializer', - }, - ], - }, - auditLogsTableColumnInitializers_deprecated, -); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/locale/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/locale/index.ts deleted file mode 100644 index 5784d89b6..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/locale/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { i18n } from '@nocobase/client'; -import { useTranslation } from 'react-i18next'; - -export const NAMESPACE = 'audit-logs'; - -export function lang(key: string) { - return i18n.t(key, { ns: NAMESPACE }); -} - -export function useAuditLogsTranslation() { - return useTranslation(NAMESPACE); -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/client/utils.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/client/utils.ts deleted file mode 100644 index 8af933ef2..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/client/utils.ts +++ /dev/null @@ -1,303 +0,0 @@ -import { uid } from '@nocobase/schema'; - -export const createSchema = () => { - const filterSchema = { - 'x-component': 'Action', - 'x-component-props': { - popover: true, - }, - type: 'void', - title: '{{t("Filter")}}', - properties: { - popover: { - type: 'void', - 'x-decorator': 'Form', - 'x-decorator-props': {}, - 'x-component': 'Action.Popover', - 'x-component-props': { - trigger: 'click', - placement: 'bottomLeft', - }, - properties: { - filter: { - type: 'object', - default: { - $and: [{}], - }, - 'x-component': 'Filter', - 'x-component-props': { - useDataSource: '{{cm.useFilterDataSource}}', - }, - }, - footer: { - type: 'void', - 'x-component': 'Action.Popover.Footer', - properties: { - actions: { - type: 'void', - 'x-component': 'ActionBar', - properties: { - saveDefault: { - type: 'void', - 'x-component': 'Filter.SaveDefaultValue', - 'x-component-props': {}, - }, - cancel: { - type: 'void', - title: '{{t("Cancel")}}', - 'x-component': 'Action', - 'x-component-props': { - useAction: '{{cm.useCancelFilterAction}}', - }, - }, - submit: { - type: 'void', - title: '{{t("Submit")}}', - 'x-component': 'Action', - 'x-component-props': { - type: 'primary', - useAction: '{{cm.useFilterAction}}', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }; - const schema = { - type: 'void', - name: 'actionLog', - 'x-decorator': 'ResourceActionProvider', - 'x-decorator-props': { - collection: 'action_logs', - dragSort: false, - request: { - resource: 'action_logs', - action: 'list', - params: { - pageSize: 20, - filter: {}, - appends: [], - }, - }, - }, - 'x-designer': 'ActionLog.Designer', - 'x-component': 'CardItem', - properties: { - actions: { - type: 'void', - 'x-component': 'ActionBar', - 'x-component-props': { - layout: 'one-column', - style: { - marginBottom: 16, - }, - }, - properties: { - [uid()]: { ...filterSchema }, - }, - }, - table: { - type: 'void', - 'x-component': 'Table.Void', - 'x-component-props': { - rowKey: 'id', - useDataSource: '{{cm.useDataSourceFromRAC}}', - }, - properties: { - column1: { - type: 'void', - title: "{{t('Created at')}}", - 'x-component': 'Table.Column', - properties: { - created_at: { - type: 'string', - 'x-component': 'DatePicker', - 'x-read-pretty': true, - 'x-component-props': { - format: 'YYYY-MM-DD HH:mm:ss', - }, - }, - }, - }, - column2: { - type: 'void', - title: "{{t('Created by')}}", - 'x-component': 'Table.Column', - properties: { - 'user.nickname': { - type: 'string', - 'x-component': 'Input', - 'x-read-pretty': true, - }, - }, - }, - column3: { - type: 'void', - title: "{{t('Collection display name')}}", - 'x-component': 'Table.Column', - properties: { - 'collection.title': { - type: 'string', - 'x-component': 'Input', - 'x-read-pretty': true, - }, - }, - }, - column4: { - type: 'void', - title: "{{t('Action type')}}", - 'x-component': 'Table.Column', - properties: { - type: { - type: 'string', - 'x-component': 'Select', - 'x-read-pretty': true, - enum: [ - { label: "{{ t('Add new') }}", value: 'create', color: 'green' }, - { label: "{{ t('Update') }}", value: 'update', color: 'blue' }, - { label: "{{ t('Delete') }}", value: 'destroy', color: 'red' }, - ], - }, - }, - }, - [uid()]: { - type: 'void', - title: "{{t('Actions')}}", - 'x-component': 'Table.Column', - 'x-component-props': { - width: 60, - align: 'center', - }, - properties: { - [uid()]: { - title: '{{ t("View") }}', - type: 'void', - 'x-action': 'view', - 'x-component': 'Action.Link', - 'x-component-props': { - openMode: 'drawer', - }, - properties: { - drawer: { - type: 'void', - 'x-component': 'Action.Container', - 'x-component-props': { - className: 'nb-action-popup', - }, - title: '{{ t("View record") }}', - properties: { - created_at: { - type: 'string', - title: "{{t('Created at')}}", - 'x-decorator': 'FormItem', - 'x-component': 'DatePicker', - 'x-read-pretty': true, - 'x-component-props': { - format: 'YYYY-MM-DD HH:mm:ss', - }, - }, - 'user.nickname': { - type: 'string', - title: "{{t('Created by')}}", - 'x-decorator': 'FormItem', - 'x-component': 'Input', - 'x-read-pretty': true, - }, - 'collection.title': { - type: 'string', - title: "{{t('Collection display name')}}", - 'x-decorator': 'FormItem', - 'x-component': 'Input', - 'x-read-pretty': true, - }, - type: { - type: 'string', - title: "{{t('Action type')}}", - 'x-decorator': 'FormItem', - 'x-component': 'Select', - 'x-read-pretty': true, - enum: [ - { - label: "{{t('Insert')}}", - value: 'create', - color: 'green', - }, - { - label: "{{t('Update')}}", - value: 'update', - color: 'blue', - }, - { - label: "{{t('Delete')}}", - value: 'destroy', - color: 'red', - }, - ], - }, - changes: { - type: 'array', - title: "{{t('Data changes')}}", - 'x-decorator': 'FormItem', - 'x-component': 'Table.Array', - 'x-component-props': { - pagination: false, - showIndex: true, - }, - items: { - type: 'object', - properties: { - column1: { - type: 'void', - 'x-component': 'Table.Column', - 'x-component-props': { title: "{{t('Field display name')}}" }, - properties: { - field: { - type: 'string', - 'x-decorator': 'FormilyFormItem', - 'x-component': 'ActionLog.Field', - }, - }, - }, - column2: { - type: 'void', - 'x-component': 'Table.Column', - 'x-component-props': { title: "{{ t('Before change') }}" }, - properties: { - before: { - type: 'string', - 'x-decorator': 'FormilyFormItem', - 'x-component': 'ActionLog.FieldValue', - }, - }, - }, - column3: { - type: 'void', - 'x-component': 'Table.Column', - 'x-component-props': { title: "{{ t('After change') }}" }, - properties: { - after: { - type: 'string', - 'x-decorator': 'FormilyFormItem', - 'x-component': 'ActionLog.FieldValue', - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }, - }; - return schema; -}; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/index.ts deleted file mode 100644 index 7e74612df..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './server'; -export { default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/en-US.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/en-US.json deleted file mode 100644 index db69ca583..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/en-US.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "Details of changes" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/es-ES.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/es-ES.json deleted file mode 100644 index 2ba1be068..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/es-ES.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "Detalles de los cambios" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/fr-FR.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/fr-FR.json deleted file mode 100644 index f3af0724c..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/fr-FR.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "Détails des changements" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/ko_KR.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/ko_KR.json deleted file mode 100644 index c491adf5c..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/ko_KR.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "변경 사항 상세 내역" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/pt-BR.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/pt-BR.json deleted file mode 100644 index 21f4ab35c..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/pt-BR.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "Detalhes das mudanças" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/zh-CN.json b/packages/plugins/@nocobase/plugin-audit-logs/src/locale/zh-CN.json deleted file mode 100644 index 4c9cd5139..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/locale/zh-CN.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "Details of changes": "变更详情" -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/__tests__/hook.test.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/__tests__/hook.test.ts deleted file mode 100644 index 4f8920a04..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/__tests__/hook.test.ts +++ /dev/null @@ -1,117 +0,0 @@ -import Database from '@nocobase/database'; -import { createMockServer, MockServer } from '@nocobase/test'; - -describe('hook', () => { - let api: MockServer; - let db: Database; - - beforeEach(async () => { - api = await createMockServer({ - plugins: ['audit-logs'], - }); - db = api.db; - db.collection({ - name: 'posts', - logging: true, - fields: [ - { - type: 'string', - name: 'title', - }, - { - type: 'string', - name: 'status', - defaultValue: 'draft', - }, - ], - }); - db.collection({ - name: 'users', - logging: false, - fields: [ - { type: 'string', name: 'nickname' }, - { type: 'string', name: 'token' }, - ], - }); - await db.sync(); - }); - - afterEach(async () => { - await api.destroy(); - }); - - it('model', async () => { - const Post = db.getCollection('posts').model; - const post = await Post.create({ title: 't1' }); - await post.update({ title: 't2' }); - await post.destroy(); - const auditLogs = await db.getCollection('auditLogs').repository.find({ - appends: ['changes'], - }); - expect(auditLogs.length).toBe(3); - - const titleChange = (changes) => { - return changes.find((item) => item.field.name === 'title'); - }; - - expect(titleChange(auditLogs[0].changes).before).toBeNull(); - expect(titleChange(auditLogs[0].changes).after).toBe('t1'); - - expect(titleChange(auditLogs[1].changes).before).toBe('t1'); - expect(titleChange(auditLogs[1].changes).after).toBe('t2'); - - expect(titleChange(auditLogs[2].changes).before).toBe('t2'); - }); - - it('repository', async () => { - const Post = db.getCollection('posts'); - const User = db.getCollection('users').model; - const user = await User.create({ nickname: 'a', token: 'token1' }); - const post = await Post.repository.create({ - values: { title: 't1' }, - context: { - state: { - currentUser: user, - }, - }, - }); - const AuditLog = db.getCollection('auditLogs'); - const log = await AuditLog.repository.findOne({ - appends: ['changes'], - }); - expect(log.toJSON()).toMatchObject({ - collectionName: 'posts', - type: 'create', - userId: 1, - recordId: `${post.get('id')}`, - changes: [ - { - field: { - name: 'title', - type: 'string', - }, - before: null, - after: 't1', - }, - ], - }); - }); - - // it.skip('resource', async () => { - // const agent = api.agent(); - // agent.set('Authorization', `Bearer token1`); - // const response = await agent.resource('posts').create({ - // values: { title: 't1' }, - // }); - // await agent.resource('posts').update({ - // resourceIndex: response.body.data.id, - // values: { title: 't2' }, - // }); - // await agent.resource('posts').destroy({ - // resourceIndex: response.body.data.id, - // }); - // const ActionLog = db.getCollection('action_logs').model; - // const count = await ActionLog.count(); - // expect(count).toBe(3); - // }); -}); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditChanges.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditChanges.ts deleted file mode 100644 index c0713a451..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditChanges.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { defineCollection } from '@nocobase/database'; - -export default defineCollection({ - dumpRules: { - group: 'log', - }, - name: 'auditChanges', - title: '变动值', - createdBy: false, - updatedBy: false, - createdAt: false, - updatedAt: false, - shared: true, - fields: [ - { - type: 'json', - name: 'field', - }, - { - type: 'json', - name: 'before', - }, - { - type: 'json', - name: 'after', - }, - { - type: 'belongsTo', - name: 'log', - target: 'auditLogs', - foreignKey: 'auditLogId', - }, - ], -}); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditLogs.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditLogs.ts deleted file mode 100644 index 76609b423..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/collections/auditLogs.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { defineCollection } from '@nocobase/database'; - -export default defineCollection({ - dumpRules: { - group: 'log', - }, - name: 'auditLogs', - createdBy: false, - updatedBy: false, - updatedAt: false, - shared: true, - fields: [ - { - type: 'date', - name: 'createdAt', - }, - { - type: 'string', - name: 'type', - }, - { - type: 'string', - name: 'recordId', - index: true, - }, - { - type: 'string', - name: 'collectionName', - }, - { - type: 'belongsTo', - name: 'collection', - target: 'collections', - targetKey: 'name', - sourceKey: 'id', - foreignKey: 'collectionName', - constraints: false, - }, - { - type: 'hasMany', - name: 'changes', - target: 'auditChanges', - foreignKey: 'auditLogId', - }, - { - type: 'belongsTo', - name: 'user', - target: 'users', - }, - ], -}); diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/constants.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/constants.ts deleted file mode 100644 index 0cf75c724..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/constants.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const LOG_TYPE_CREATE = 'create'; -export const LOG_TYPE_UPDATE = 'update'; -export const LOG_TYPE_DESTROY = 'destroy'; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-create.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-create.ts deleted file mode 100644 index 4f6f480c2..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-create.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { LOG_TYPE_CREATE } from '../constants'; - -export async function afterCreate(model, options) { - if (options.logging === false) { - return; - } - const { collection } = model.constructor; - if (!collection || !collection.options.logging) { - return; - } - const transaction = options.transaction; - const AuditLog = model.constructor.database.getCollection('auditLogs'); - const currentUserId = options?.context?.state?.currentUser?.id; - try { - const changes = []; - const changed = model.changed(); - if (changed) { - changed.forEach((key: string) => { - const field = collection.findField((field) => { - return field.name === key || field.options.field === key; - }); - if (field && !field.options.hidden) { - changes.push({ - field: field.options, - after: model.get(key), - }); - } - }); - } - await AuditLog.repository.create({ - values: { - type: LOG_TYPE_CREATE, - collectionName: model.constructor.name, - recordId: model.get(model.constructor.primaryKeyAttribute), - createdAt: model.get('createdAt'), - userId: currentUserId, - changes, - }, - transaction, - hooks: false, - }); - } catch (error) { - // console.error(error); - } -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-destroy.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-destroy.ts deleted file mode 100644 index 4a7b8fa59..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-destroy.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { LOG_TYPE_DESTROY } from '../constants'; - -export async function afterDestroy(model, options) { - const { collection } = model.constructor; - if (!collection || !collection.options.logging) { - return; - } - const transaction = options.transaction; - const AuditLog = model.constructor.database.getCollection('auditLogs'); - const currentUserId = options?.context?.state?.currentUser?.id; - try { - const changes = []; - Object.keys(model.get()).forEach((key: string) => { - const field = collection.findField((field) => { - return field.name === key || field.options.field === key; - }); - if (field) { - changes.push({ - field: field.options, - before: model.get(key), - }); - } - }); - await AuditLog.repository.create({ - values: { - type: LOG_TYPE_DESTROY, - collectionName: model.constructor.name, - recordId: model.get(model.constructor.primaryKeyAttribute), - userId: currentUserId, - changes, - }, - transaction, - hooks: false, - }); - // if (!options.transaction) { - // await transaction.commit(); - // } - } catch (error) { - // if (!options.transaction) { - // await transaction.rollback(); - // } - } -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-update.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-update.ts deleted file mode 100644 index 72407e63d..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/after-update.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { LOG_TYPE_UPDATE } from '../constants'; - -export async function afterUpdate(model, options) { - const { collection } = model.constructor; - if (!collection || !collection.options.logging) { - return; - } - const changed = model.changed(); - if (!changed) { - return; - } - const transaction = options.transaction; - const AuditLog = model.constructor.database.getCollection('auditLogs'); - const currentUserId = options?.context?.state?.currentUser?.id; - const changes = []; - changed.forEach((key: string) => { - const field = collection.findField((field) => { - return field.name === key || field.options.field === key; - }); - if (field && !field.options.hidden) { - changes.push({ - field: field.options, - after: model.get(key), - before: model.previous(key), - }); - } - }); - if (!changes.length) { - return; - } - try { - await AuditLog.repository.create({ - values: { - type: LOG_TYPE_UPDATE, - collectionName: model.constructor.name, - recordId: model.get(model.constructor.primaryKeyAttribute), - createdAt: model.get('updatedAt'), - userId: currentUserId, - changes, - }, - transaction, - hooks: false, - }); - // if (!options.transaction) { - // await transaction.commit(); - // } - } catch (error) { - // if (!options.transaction) { - // await transaction.rollback(); - // } - } -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/index.ts deleted file mode 100644 index 3c84cf55e..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/hooks/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './after-create'; -export * from './after-update'; -export * from './after-destroy'; diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts deleted file mode 100644 index 7093d6227..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/index.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Plugin } from '@nocobase/server'; -import path from 'path'; -import { afterCreate, afterDestroy, afterUpdate } from './hooks'; - -export default class PluginActionLogs extends Plugin { - async beforeLoad() { - this.db.on('afterCreate', afterCreate); - this.db.on('afterUpdate', afterUpdate); - this.db.on('afterDestroy', afterDestroy); - } - - async load() { - await this.importCollections(path.resolve(__dirname, 'collections')); - - this.db.addMigrations({ - namespace: 'audit-logs', - directory: path.resolve(__dirname, './migrations'), - context: { - plugin: this, - }, - }); - } -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/src/server/migrations/202206160949-logging.ts b/packages/plugins/@nocobase/plugin-audit-logs/src/server/migrations/202206160949-logging.ts deleted file mode 100644 index ade154ad0..000000000 --- a/packages/plugins/@nocobase/plugin-audit-logs/src/server/migrations/202206160949-logging.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class LoggingMigration extends Migration { - appVersion = '<0.7.1-alpha.4'; - async up() { - const result = await this.app.version.satisfies('<=0.7.0-alpha.83'); - if (!result) { - return; - } - const repository = this.context.db.getRepository('collections'); - const collections = await repository.find(); - for (const collection of collections) { - if (!collection.get('logging')) { - collection.set('logging', true); - await collection.save(); - } - } - } -} diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/.npmignore b/packages/plugins/@nocobase/plugin-ui-routes-storage/.npmignore deleted file mode 100644 index c593fe9df..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/LICENSE b/packages/plugins/@nocobase/plugin-ui-routes-storage/LICENSE deleted file mode 100644 index 0ad25db4b..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/README.md b/packages/plugins/@nocobase/plugin-ui-routes-storage/README.md deleted file mode 100644 index bbe62202e..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# ui-routes-storage - -English | [中文](./README.zh-CN.md) - -## 安装激活 - -内置插件无需手动安装激活。 - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/README.zh-CN.md b/packages/plugins/@nocobase/plugin-ui-routes-storage/README.zh-CN.md deleted file mode 100644 index aee1e64f0..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/README.zh-CN.md +++ /dev/null @@ -1,9 +0,0 @@ -# ui-routes-storage - -[English](./README.md) | 中文 - -## 安装激活 - -内置插件无需手动安装激活。 - -## 使用方法 diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/client.d.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/client.d.ts deleted file mode 100644 index 6c459cbac..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/client.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/client'; -export { default } from './dist/client'; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/client.js b/packages/plugins/@nocobase/plugin-ui-routes-storage/client.js deleted file mode 100644 index b6e3be70e..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/client.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/client/index.js'); diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json b/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json deleted file mode 100644 index 119bb8de2..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@nocobase/plugin-ui-routes-storage", - "displayName": "ui routes storage", - "version": "0.21.6", - "description": "manage the routes of nocobase", - "keywords": [ - "System & security" - ], - "license": "AGPL-3.0", - "main": "./dist/server/index.js", - "devDependencies": { - "flat-to-nested": "^1.1.1" - }, - "peerDependencies": { - "@nocobase/actions": "workspace:*", - "@nocobase/client": "workspace:*", - "@nocobase/database": "workspace:*", - "@nocobase/server": "workspace:*", - "@nocobase/test": "workspace:*" - }, - "description.zh-CN": "管理页面路由。", - "displayName.zh-CN": "路由管理", - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" -} diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/server.d.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/server.d.ts deleted file mode 100644 index c41081ddc..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/server.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './dist/server'; -export { default } from './dist/server'; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/server.js b/packages/plugins/@nocobase/plugin-ui-routes-storage/server.js deleted file mode 100644 index 972842039..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/server.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./dist/server/index.js'); diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts deleted file mode 100644 index 6cc67d5b5..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/client/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Plugin } from '@nocobase/client'; - -class UiRoutesStoragePlugin extends Plugin { - async load() { } -} - -export default UiRoutesStoragePlugin; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/index.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/index.ts deleted file mode 100644 index 7e74612df..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './server'; -export { default } from './server'; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/actions/getAccessible.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/actions/getAccessible.ts deleted file mode 100644 index 314c780b6..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/actions/getAccessible.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Context, Next } from '@nocobase/actions'; -import FlatToNested from 'flat-to-nested'; - -const flatToNested = new FlatToNested({ - id: 'key', - parent: 'parentKey', - children: 'routes', -}); - -export const getAccessible = async (ctx: Context, next: Next) => { - const repository = ctx.db.getRepository('uiRoutes'); - const routes = await repository.find({ - sort: ['sort'], - }); - const data = flatToNested.convert(routes.map((route) => route.toJSON())); - ctx.body = data?.routes || []; - await next(); -}; diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/collections/uiRoutes.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/collections/uiRoutes.ts deleted file mode 100644 index 67ed42fb7..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/collections/uiRoutes.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { defineCollection } from '@nocobase/database'; - -export default defineCollection({ - dumpRules: 'required', - name: 'uiRoutes', - model: 'MagicAttributeModel', - autoGenId: false, - sortable: { - name: 'sort', - scopeKey: 'parentKey', - }, - shared: true, - fields: [ - { - type: 'uid', - name: 'key', - prefix: 'r_', - primaryKey: true, - }, - { - type: 'string', - name: 'type', - }, - { - type: 'hasMany', - name: 'routes', - target: 'uiRoutes', - sourceKey: 'key', - foreignKey: 'parentKey', - }, - { - type: 'belongsTo', - name: 'uiSchema', - target: 'uiSchemas', - foreignKey: 'uiSchemaUid', - }, - { - type: 'json', - name: 'options', - defaultValue: {}, - }, - ], -}); diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts b/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts deleted file mode 100644 index 554570286..000000000 --- a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/server.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { MagicAttributeModel } from '@nocobase/database'; -import { Plugin } from '@nocobase/server'; -import { resolve } from 'path'; -import { getAccessible } from './actions/getAccessible'; - -export class UiRoutesStoragePlugin extends Plugin { - async install() { - const repository = this.app.db.getRepository('uiRoutes'); - const routes = [ - { - type: 'redirect', - from: '/', - to: '/admin', - exact: true, - }, - { - type: 'route', - uiSchema: { - type: 'void', - 'x-component': 'Menu', - 'x-designer': 'Menu.Designer', - 'x-initializer': 'MenuItemInitializers', - 'x-component-props': { - mode: 'mix', - theme: 'dark', - // defaultSelectedUid: 'u8', - onSelect: '{{ onSelect }}', - sideMenuRefScopeKey: 'sideMenuRef', - }, - properties: {}, - }, - path: '/admin/:name?', - component: 'AdminLayout', - title: 'NocoBase Admin', - routes: [ - // test... - // { - // type: 'route', - // path: '/admin/workflows/:id', - // component: 'WorkflowPage', - // }, - // { - // type: 'route', - // path: '/admin/block-templates/:key', - // component: 'BlockTemplateDetails', - // }, - // { - // type: 'route', - // path: '/admin/block-templates', - // component: 'BlockTemplatePage', - // }, - { - type: 'route', - path: '/admin/:name?', - component: 'RouteSchemaComponent', - }, - ], - }, - { - type: 'route', - component: 'AuthLayout', - routes: [ - { - type: 'route', - path: '/signin', - component: 'SigninPage', - }, - { - type: 'route', - path: '/signup', - component: 'SignupPage', - }, - ], - }, - ]; - for (const values of routes) { - await repository.create({ - values, - }); - } - } - - async beforeLoad() { - this.app.db.registerModels({ MagicAttributeModel }); - } - - async load() { - this.app.resourcer.registerActionHandler('uiRoutes:getAccessible', getAccessible); - - await this.importCollections(resolve(__dirname, './collections')); - - this.app.acl.allow('uiRoutes', 'getAccessible'); - } -} - -export default UiRoutesStoragePlugin; diff --git a/packages/presets/nocobase/.npmignore b/packages/presets/nocobase/.npmignore deleted file mode 100644 index c593fe9df..000000000 --- a/packages/presets/nocobase/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -/node_modules -/src \ No newline at end of file diff --git a/packages/presets/nocobase/LICENSE b/packages/presets/nocobase/LICENSE deleted file mode 100644 index 0ad25db4b..000000000 --- a/packages/presets/nocobase/LICENSE +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are intended to guarantee your freedom to -share and change all versions of a program--to make sure it remains free -software for all its users. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -them if you wish), that you receive source code or can get it if you -want it, that you can change the software or use pieces of it in new -free programs, and that you know you can do these things. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - The precise terms and conditions for copying, distribution and -modification follow. - - TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - - "Copyright" also means copyright-like laws that apply to other kinds of -works, such as semiconductor masks. - - "The Program" refers to any copyrightable work licensed under this -License. Each licensee is addressed as "you". "Licensees" and -"recipients" may be individuals or organizations. - - To "modify" a work means to copy from or adapt all or part of the work -in a fashion requiring copyright permission, other than the making of an -exact copy. The resulting work is called a "modified version" of the -earlier work or a work "based on" the earlier work. - - A "covered work" means either the unmodified Program or a work based -on the Program. - - To "propagate" a work means to do anything with it that, without -permission, would make you directly or secondarily liable for -infringement under applicable copyright law, except executing it on a -computer or modifying a private copy. Propagation includes copying, -distribution (with or without modification), making available to the -public, and in some countries other activities as well. - - To "convey" a work means any kind of propagation that enables other -parties to make or receive copies. Mere interaction with a user through -a computer network, with no transfer of a copy, is not conveying. - - An interactive user interface displays "Appropriate Legal Notices" -to the extent that it includes a convenient and prominently visible -feature that (1) displays an appropriate copyright notice, and (2) -tells the user that there is no warranty for the work (except to the -extent that warranties are provided), that licensees may convey the -work under this License, and how to view a copy of this License. If -the interface presents a list of user commands or options, such as a -menu, a prominent item in the list meets this criterion. - - 1. Source Code. - - The "source code" for a work means the preferred form of the work -for making modifications to it. "Object code" means any non-source -form of a work. - - A "Standard Interface" means an interface that either is an official -standard defined by a recognized standards body, or, in the case of -interfaces specified for a particular programming language, one that -is widely used among developers working in that language. - - The "System Libraries" of an executable work include anything, other -than the work as a whole, that (a) is included in the normal form of -packaging a Major Component, but which is not part of that Major -Component, and (b) serves only to enable use of the work with that -Major Component, or to implement a Standard Interface for which an -implementation is available to the public in source code form. A -"Major Component", in this context, means a major essential component -(kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to -produce the work, or an object code interpreter used to run it. - - The "Corresponding Source" for a work in object code form means all -the source code needed to generate, install, and (for an executable -work) run the object code and to modify the work, including scripts to -control those activities. However, it does not include the work's -System Libraries, or general-purpose tools or generally available free -programs which are used unmodified in performing those activities but -which are not part of the work. For example, Corresponding Source -includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically -linked subprograms that the work is specifically designed to require, -such as by intimate data communication or control flow between those -subprograms and other parts of the work. - - The Corresponding Source need not include anything that users -can regenerate automatically from other parts of the Corresponding -Source. - - The Corresponding Source for a work in source code form is that -same work. - - 2. Basic Permissions. - - All rights granted under this License are granted for the term of -copyright on the Program, and are irrevocable provided the stated -conditions are met. This License explicitly affirms your unlimited -permission to run the unmodified Program. The output from running a -covered work is covered by this License only if the output, given its -content, constitutes a covered work. This License acknowledges your -rights of fair use or other equivalent, as provided by copyright law. - - You may make, run and propagate covered works that you do not -convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose -of having them make modifications exclusively for you, or provide you -with facilities for running those works, provided that you comply with -the terms of this License in conveying all material for which you do -not control copyright. Those thus making or running the covered works -for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of -your copyrighted material outside their relationship with you. - - Conveying under any other circumstances is permitted solely under -the conditions stated below. Sublicensing is not allowed; section 10 -makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - - No covered work shall be deemed part of an effective technological -measure under any applicable law fulfilling obligations under article -11 of the WIPO copyright treaty adopted on 20 December 1996, or -similar laws prohibiting or restricting circumvention of such -measures. - - When you convey a covered work, you waive any legal power to forbid -circumvention of technological measures to the extent such circumvention -is effected by exercising rights under this License with respect to -the covered work, and you disclaim any intention to limit operation or -modification of the work as a means of enforcing, against the work's -users, your or third parties' legal rights to forbid circumvention of -technological measures. - - 4. Conveying Verbatim Copies. - - You may convey verbatim copies of the Program's source code as you -receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice; -keep intact all notices stating that this License and any -non-permissive terms added in accord with section 7 apply to the code; -keep intact all notices of the absence of any warranty; and give all -recipients a copy of this License along with the Program. - - You may charge any price or no price for each copy that you convey, -and you may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - - You may convey a work based on the Program, or the modifications to -produce it from the Program, in the form of source code under the -terms of section 4, provided that you also meet all of these conditions: - - a) The work must carry prominent notices stating that you modified - it, and giving a relevant date. - - b) The work must carry prominent notices stating that it is - released under this License and any conditions added under section - 7. This requirement modifies the requirement in section 4 to - "keep intact all notices". - - c) You must license the entire work, as a whole, under this - License to anyone who comes into possession of a copy. This - License will therefore apply, along with any applicable section 7 - additional terms, to the whole of the work, and all its parts, - regardless of how they are packaged. This License gives no - permission to license the work in any other way, but it does not - invalidate such permission if you have separately received it. - - d) If the work has interactive user interfaces, each must display - Appropriate Legal Notices; however, if the Program has interactive - interfaces that do not display Appropriate Legal Notices, your - work need not make them do so. - - A compilation of a covered work with other separate and independent -works, which are not by their nature extensions of the covered work, -and which are not combined with it such as to form a larger program, -in or on a volume of a storage or distribution medium, is called an -"aggregate" if the compilation and its resulting copyright are not -used to limit the access or legal rights of the compilation's users -beyond what the individual works permit. Inclusion of a covered work -in an aggregate does not cause this License to apply to the other -parts of the aggregate. - - 6. Conveying Non-Source Forms. - - You may convey a covered work in object code form under the terms -of sections 4 and 5, provided that you also convey the -machine-readable Corresponding Source under the terms of this License, -in one of these ways: - - a) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by the - Corresponding Source fixed on a durable physical medium - customarily used for software interchange. - - b) Convey the object code in, or embodied in, a physical product - (including a physical distribution medium), accompanied by a - written offer, valid for at least three years and valid for as - long as you offer spare parts or customer support for that product - model, to give anyone who possesses the object code either (1) a - copy of the Corresponding Source for all the software in the - product that is covered by this License, on a durable physical - medium customarily used for software interchange, for a price no - more than your reasonable cost of physically performing this - conveying of source, or (2) access to copy the - Corresponding Source from a network server at no charge. - - c) Convey individual copies of the object code with a copy of the - written offer to provide the Corresponding Source. This - alternative is allowed only occasionally and noncommercially, and - only if you received the object code with such an offer, in accord - with subsection 6b. - - d) Convey the object code by offering access from a designated - place (gratis or for a charge), and offer equivalent access to the - Corresponding Source in the same way through the same place at no - further charge. You need not require recipients to copy the - Corresponding Source along with the object code. If the place to - copy the object code is a network server, the Corresponding Source - may be on a different server (operated by you or a third party) - that supports equivalent copying facilities, provided you maintain - clear directions next to the object code saying where to find the - Corresponding Source. Regardless of what server hosts the - Corresponding Source, you remain obligated to ensure that it is - available for as long as needed to satisfy these requirements. - - e) Convey the object code using peer-to-peer transmission, provided - you inform other peers where the object code and Corresponding - Source of the work are being offered to the general public at no - charge under subsection 6d. - - A separable portion of the object code, whose source code is excluded -from the Corresponding Source as a System Library, need not be -included in conveying the object code work. - - A "User Product" is either (1) a "consumer product", which means any -tangible personal property which is normally used for personal, family, -or household purposes, or (2) anything designed or sold for incorporation -into a dwelling. In determining whether a product is a consumer product, -doubtful cases shall be resolved in favor of coverage. For a particular -product received by a particular user, "normally used" refers to a -typical or common use of that class of product, regardless of the status -of the particular user or of the way in which the particular user -actually uses, or expects or is expected to use, the product. A product -is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent -the only significant mode of use of the product. - - "Installation Information" for a User Product means any methods, -procedures, authorization keys, or other information required to install -and execute modified versions of a covered work in that User Product from -a modified version of its Corresponding Source. The information must -suffice to ensure that the continued functioning of the modified object -code is in no case prevented or interfered with solely because -modification has been made. - - If you convey an object code work under this section in, or with, or -specifically for use in, a User Product, and the conveying occurs as -part of a transaction in which the right of possession and use of the -User Product is transferred to the recipient in perpetuity or for a -fixed term (regardless of how the transaction is characterized), the -Corresponding Source conveyed under this section must be accompanied -by the Installation Information. But this requirement does not apply -if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has -been installed in ROM). - - The requirement to provide Installation Information does not include a -requirement to continue to provide support service, warranty, or updates -for a work that has been modified or installed by the recipient, or for -the User Product in which it has been modified or installed. Access to a -network may be denied when the modification itself materially and -adversely affects the operation of the network or violates the rules and -protocols for communication across the network. - - Corresponding Source conveyed, and Installation Information provided, -in accord with this section must be in a format that is publicly -documented (and with an implementation available to the public in -source code form), and must require no special password or key for -unpacking, reading or copying. - - 7. Additional Terms. - - "Additional permissions" are terms that supplement the terms of this -License by making exceptions from one or more of its conditions. -Additional permissions that are applicable to the entire Program shall -be treated as though they were included in this License, to the extent -that they are valid under applicable law. If additional permissions -apply only to part of the Program, that part may be used separately -under those permissions, but the entire Program remains governed by -this License without regard to the additional permissions. - - When you convey a copy of a covered work, you may at your option -remove any additional permissions from that copy, or from any part of -it. (Additional permissions may be written to require their own -removal in certain cases when you modify the work.) You may place -additional permissions on material, added by you to a covered work, -for which you have or can give appropriate copyright permission. - - Notwithstanding any other provision of this License, for material you -add to a covered work, you may (if authorized by the copyright holders of -that material) supplement the terms of this License with terms: - - a) Disclaiming warranty or limiting liability differently from the - terms of sections 15 and 16 of this License; or - - b) Requiring preservation of specified reasonable legal notices or - author attributions in that material or in the Appropriate Legal - Notices displayed by works containing it; or - - c) Prohibiting misrepresentation of the origin of that material, or - requiring that modified versions of such material be marked in - reasonable ways as different from the original version; or - - d) Limiting the use for publicity purposes of names of licensors or - authors of the material; or - - e) Declining to grant rights under trademark law for use of some - trade names, trademarks, or service marks; or - - f) Requiring indemnification of licensors and authors of that - material by anyone who conveys the material (or modified versions of - it) with contractual assumptions of liability to the recipient, for - any liability that these contractual assumptions directly impose on - those licensors and authors. - - All other non-permissive additional terms are considered "further -restrictions" within the meaning of section 10. If the Program as you -received it, or any part of it, contains a notice stating that it is -governed by this License along with a term that is a further -restriction, you may remove that term. If a license document contains -a further restriction but permits relicensing or conveying under this -License, you may add to a covered work material governed by the terms -of that license document, provided that the further restriction does -not survive such relicensing or conveying. - - If you add terms to a covered work in accord with this section, you -must place, in the relevant source files, a statement of the -additional terms that apply to those files, or a notice indicating -where to find the applicable terms. - - Additional terms, permissive or non-permissive, may be stated in the -form of a separately written license, or stated as exceptions; -the above requirements apply either way. - - 8. Termination. - - You may not propagate or modify a covered work except as expressly -provided under this License. Any attempt otherwise to propagate or -modify it is void, and will automatically terminate your rights under -this License (including any patent licenses granted under the third -paragraph of section 11). - - However, if you cease all violation of this License, then your -license from a particular copyright holder is reinstated (a) -provisionally, unless and until the copyright holder explicitly and -finally terminates your license, and (b) permanently, if the copyright -holder fails to notify you of the violation by some reasonable means -prior to 60 days after the cessation. - - Moreover, your license from a particular copyright holder is -reinstated permanently if the copyright holder notifies you of the -violation by some reasonable means, this is the first time you have -received notice of violation of this License (for any work) from that -copyright holder, and you cure the violation prior to 30 days after -your receipt of the notice. - - Termination of your rights under this section does not terminate the -licenses of parties who have received copies or rights from you under -this License. If your rights have been terminated and not permanently -reinstated, you do not qualify to receive new licenses for the same -material under section 10. - - 9. Acceptance Not Required for Having Copies. - - You are not required to accept this License in order to receive or -run a copy of the Program. Ancillary propagation of a covered work -occurring solely as a consequence of using peer-to-peer transmission -to receive a copy likewise does not require acceptance. However, -nothing other than this License grants you permission to propagate or -modify any covered work. These actions infringe copyright if you do -not accept this License. Therefore, by modifying or propagating a -covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - - Each time you convey a covered work, the recipient automatically -receives a license from the original licensors, to run, modify and -propagate that work, subject to this License. You are not responsible -for enforcing compliance by third parties with this License. - - An "entity transaction" is a transaction transferring control of an -organization, or substantially all assets of one, or subdividing an -organization, or merging organizations. If propagation of a covered -work results from an entity transaction, each party to that -transaction who receives a copy of the work also receives whatever -licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the -Corresponding Source of the work from the predecessor in interest, if -the predecessor has it or can get it with reasonable efforts. - - You may not impose any further restrictions on the exercise of the -rights granted or affirmed under this License. For example, you may -not impose a license fee, royalty, or other charge for exercise of -rights granted under this License, and you may not initiate litigation -(including a cross-claim or counterclaim in a lawsuit) alleging that -any patent claim is infringed by making, using, selling, offering for -sale, or importing the Program or any portion of it. - - 11. Patents. - - A "contributor" is a copyright holder who authorizes use under this -License of the Program or a work on which the Program is based. The -work thus licensed is called the contributor's "contributor version". - - A contributor's "essential patent claims" are all patent claims -owned or controlled by the contributor, whether already acquired or -hereafter acquired, that would be infringed by some manner, permitted -by this License, of making, using, or selling its contributor version, -but do not include claims that would be infringed only as a -consequence of further modification of the contributor version. For -purposes of this definition, "control" includes the right to grant -patent sublicenses in a manner consistent with the requirements of -this License. - - Each contributor grants you a non-exclusive, worldwide, royalty-free -patent license under the contributor's essential patent claims, to -make, use, sell, offer for sale, import and otherwise run, modify and -propagate the contents of its contributor version. - - In the following three paragraphs, a "patent license" is any express -agreement or commitment, however denominated, not to enforce a patent -(such as an express permission to practice a patent or covenant not to -sue for patent infringement). To "grant" such a patent license to a -party means to make such an agreement or commitment not to enforce a -patent against the party. - - If you convey a covered work, knowingly relying on a patent license, -and the Corresponding Source of the work is not available for anyone -to copy, free of charge and under the terms of this License, through a -publicly available network server or other readily accessible means, -then you must either (1) cause the Corresponding Source to be so -available, or (2) arrange to deprive yourself of the benefit of the -patent license for this particular work, or (3) arrange, in a manner -consistent with the requirements of this License, to extend the patent -license to downstream recipients. "Knowingly relying" means you have -actual knowledge that, but for the patent license, your conveying the -covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that -country that you have reason to believe are valid. - - If, pursuant to or in connection with a single transaction or -arrangement, you convey, or propagate by procuring conveyance of, a -covered work, and grant a patent license to some of the parties -receiving the covered work authorizing them to use, propagate, modify -or convey a specific copy of the covered work, then the patent license -you grant is automatically extended to all recipients of the covered -work and works based on it. - - A patent license is "discriminatory" if it does not include within -the scope of its coverage, prohibits the exercise of, or is -conditioned on the non-exercise of one or more of the rights that are -specifically granted under this License. You may not convey a covered -work if you are a party to an arrangement with a third party that is -in the business of distributing software, under which you make payment -to the third party based on the extent of your activity of conveying -the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory -patent license (a) in connection with copies of the covered work -conveyed by you (or copies made from those copies), or (b) primarily -for and in connection with specific products or compilations that -contain the covered work, unless you entered into that arrangement, -or that patent license was granted, prior to 28 March 2007. - - Nothing in this License shall be construed as excluding or limiting -any implied license or other defenses to infringement that may -otherwise be available to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - - If conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot convey a -covered work so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you may -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey -the Program, the only way you could satisfy both those terms and this -License would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - Notwithstanding any other provision of this License, you have -permission to link or combine any covered work with a work licensed -under version 3 of the GNU General Public License into a single -combined work, and to convey the resulting work. The terms of this -License will continue to apply to the part which is the covered work, -but the work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero General Public License from time to time. Such new versions -will be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - - Each version is given a distinguishing version number. If the -Program specifies that a certain numbered version of the GNU Affero General -Public License "or any later version" applies to it, you have the -option of following the terms and conditions either of that numbered -version or of any later version published by the Free Software -Foundation. If the Program does not specify a version number of the -GNU Affero General Public License, you may choose any version ever published -by the Free Software Foundation. - - If the Program specifies that a proxy can decide which future -versions of the GNU Affero General Public License can be used, that proxy's -public statement of acceptance of a version permanently authorizes you -to choose that version for the Program. - - Later license versions may give you additional or different -permissions. However, no additional obligations are imposed on any -author or copyright holder as a result of your choosing to follow a -later version. - - 15. Disclaimer of Warranty. - - THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY -APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT -HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM -IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF -ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. Limitation of Liability. - - IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF -DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD -PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - - If the disclaimer of warranty and limitation of liability provided -above cannot be given local legal effect according to their terms, -reviewing courts shall apply local law that most closely approximates -an absolute waiver of all civil liability in connection with the -Program, unless a warranty or assumption of liability accompanies a -copy of the Program in return for a fee. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -state the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero General Public License as published - by the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU AGPL, see -. diff --git a/packages/presets/nocobase/src/index.ts b/packages/presets/nocobase/src/index.ts deleted file mode 100644 index 7ddad5814..000000000 --- a/packages/presets/nocobase/src/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { default } from './server'; diff --git a/packages/presets/nocobase/src/server/migrations/20230829160015-set-audit-local.ts b/packages/presets/nocobase/src/server/migrations/20230829160015-set-audit-local.ts deleted file mode 100644 index 0a79d33f1..000000000 --- a/packages/presets/nocobase/src/server/migrations/20230829160015-set-audit-local.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class SetAuditPluginAsLocalMigration extends Migration { - on = 'beforeLoad'; - appVersion = '<0.13.0-alpha.5'; - async up() { - await this.pm.repository.update({ - values: { - builtIn: false, - }, - filter: { - name: 'audit-logs', - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20230829160015-set-charts-local.ts b/packages/presets/nocobase/src/server/migrations/20230829160015-set-charts-local.ts deleted file mode 100644 index 8e7bfde97..000000000 --- a/packages/presets/nocobase/src/server/migrations/20230829160015-set-charts-local.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'beforeLoad'; - appVersion = '<0.14.0-alpha.8'; - async up() { - await this.pm.repository.update({ - values: { - builtIn: false, - }, - filter: { - name: 'charts', - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20240106014312-update-plugins.ts b/packages/presets/nocobase/src/server/migrations/20240106014312-update-plugins.ts deleted file mode 100644 index 42de45025..000000000 --- a/packages/presets/nocobase/src/server/migrations/20240106014312-update-plugins.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.18.0-alpha.10'; - - async up() { - await this.pm.repository.update({ - values: { - name: 'backup-restore', - packageName: '@nocobase/plugin-backup-restore', - }, - filter: { - name: 'duplicator', - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20240106090440-remove-unused-plugins.ts b/packages/presets/nocobase/src/server/migrations/20240106090440-remove-unused-plugins.ts deleted file mode 100644 index 8fb050353..000000000 --- a/packages/presets/nocobase/src/server/migrations/20240106090440-remove-unused-plugins.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.18.0-alpha.10'; - - async up() { - await this.pm.repository.destroy({ - filter: { - name: ['ui-routes-storage', 'math-formula-field', 'excel-formula-field'], - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20240116154734-remove-sample-hello.ts b/packages/presets/nocobase/src/server/migrations/20240116154734-remove-sample-hello.ts deleted file mode 100644 index 9d9f2edfe..000000000 --- a/packages/presets/nocobase/src/server/migrations/20240116154734-remove-sample-hello.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'afterSync'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.19.0-alpha.4'; - - async up() { - await this.pm.repository.destroy({ - filter: { - name: ['sample-hello'], - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts b/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts deleted file mode 100644 index 21df38adf..000000000 --- a/packages/presets/nocobase/src/server/migrations/20240307184120-set-sms-local.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'afterLoad'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.20.0-alpha.6'; - - async up() { - await this.pm.repository.update({ - values: { - builtIn: false, - }, - filter: { - name: 'sms-auth', - }, - }); - } -} diff --git a/packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts b/packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts deleted file mode 100644 index 83ddb9bb3..000000000 --- a/packages/presets/nocobase/src/server/migrations/20240307214623-change-name.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Migration } from '@nocobase/server'; - -export default class extends Migration { - on = 'beforeLoad'; // 'beforeLoad' or 'afterLoad' - appVersion = '<0.20.0-alpha.7'; - - async up() { - await this.pm.repository.destroy({ - filter: { - packageName: '@nocobase/plugin-workflow-form-trigger', - }, - }); - } -} diff --git a/packages/plugins/@nocobase/plugin-audit-logs/.npmignore b/packages/presets/tachybase/.npmignore similarity index 100% rename from packages/plugins/@nocobase/plugin-audit-logs/.npmignore rename to packages/presets/tachybase/.npmignore diff --git a/packages/plugins/@nocobase/plugin-audit-logs/LICENSE b/packages/presets/tachybase/LICENSE similarity index 100% rename from packages/plugins/@nocobase/plugin-audit-logs/LICENSE rename to packages/presets/tachybase/LICENSE diff --git a/packages/presets/nocobase/client.d.ts b/packages/presets/tachybase/client.d.ts similarity index 100% rename from packages/presets/nocobase/client.d.ts rename to packages/presets/tachybase/client.d.ts diff --git a/packages/presets/nocobase/client.js b/packages/presets/tachybase/client.js similarity index 100% rename from packages/presets/nocobase/client.js rename to packages/presets/tachybase/client.js diff --git a/packages/presets/nocobase/package.json b/packages/presets/tachybase/package.json similarity index 90% rename from packages/presets/nocobase/package.json rename to packages/presets/tachybase/package.json index eef099cba..3bb11e4da 100644 --- a/packages/presets/nocobase/package.json +++ b/packages/presets/tachybase/package.json @@ -1,12 +1,7 @@ { - "name": "@nocobase/preset-nocobase", + "name": "@tachybase/preset-tachybase", "version": "0.21.6", - "repository": { - "type": "git", - "url": "git+https://github.com/nocobase/nocobase.git", - "directory": "packages/presets/nocobase" - }, - "license": "AGPL-3.0", + "license": "Apache-2.0", "main": "./lib/server/index.js", "dependencies": { "@nocobase/client": "workspace:*", @@ -17,7 +12,6 @@ "@nocobase/plugin-action-print": "workspace:*", "@nocobase/plugin-api-doc": "workspace:*", "@nocobase/plugin-api-keys": "workspace:*", - "@nocobase/plugin-audit-logs": "workspace:*", "@nocobase/plugin-auth": "workspace:*", "@nocobase/plugin-backup-restore": "workspace:*", "@nocobase/plugin-calendar": "workspace:*", @@ -70,5 +64,7 @@ "cronstrue": "^2.11.0", "lodash": "4.17.21" }, - "gitHead": "d0b4efe4be55f8c79a98a331d99d9f8cf99021a1" + "devDependencies": { + "@types/lodash": "^4.17.0" + } } diff --git a/packages/presets/nocobase/server.d.ts b/packages/presets/tachybase/server.d.ts similarity index 100% rename from packages/presets/nocobase/server.d.ts rename to packages/presets/tachybase/server.d.ts diff --git a/packages/presets/nocobase/server.js b/packages/presets/tachybase/server.js similarity index 100% rename from packages/presets/nocobase/server.js rename to packages/presets/tachybase/server.js diff --git a/packages/presets/nocobase/src/client/index.ts b/packages/presets/tachybase/src/client/index.ts similarity index 94% rename from packages/presets/nocobase/src/client/index.ts rename to packages/presets/tachybase/src/client/index.ts index 657f2a8a5..ef84a4673 100644 --- a/packages/presets/nocobase/src/client/index.ts +++ b/packages/presets/tachybase/src/client/index.ts @@ -13,7 +13,7 @@ function getBasename(app: Application) { return match ? match[0] : publicPath; } -export class NocoBaseClientPresetPlugin extends Plugin { +export class TachyBaseClientPresetPlugin extends Plugin { async afterAdd() { this.router.setType('browser'); this.router.setBasename(getBasename(this.app)); diff --git a/packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/index.ts b/packages/presets/tachybase/src/index.ts similarity index 100% rename from packages/plugins/@nocobase/plugin-ui-routes-storage/src/server/index.ts rename to packages/presets/tachybase/src/index.ts diff --git a/packages/presets/nocobase/src/server/index.ts b/packages/presets/tachybase/src/server/index.ts similarity index 96% rename from packages/presets/nocobase/src/server/index.ts rename to packages/presets/tachybase/src/server/index.ts index c4b62b373..56fb9ca1e 100644 --- a/packages/presets/nocobase/src/server/index.ts +++ b/packages/presets/tachybase/src/server/index.ts @@ -1,20 +1,38 @@ import { Plugin, PluginManager } from '@nocobase/server'; import _ from 'lodash'; -export class PresetNocoBase extends Plugin { +export class PresetTachyBase extends Plugin { builtInPlugins = [ + // required plugins 'data-source-manager', 'error-handler', 'collection-manager', 'ui-schema-storage', - // 'ui-routes-storage', 'file-manager', 'system-settings', - 'sequence-field', + 'client', + 'auth', 'verification', 'users', 'acl', + // optional plugins, default enabled + 'action-bulk-edit', + 'action-bulk-update', + 'action-duplicate', + 'action-print', + 'backup-restore', + 'calendar', 'china-region', + 'custom-request', + 'data-visualization', + 'export', + 'formula-field', + 'gantt', + 'iframe-block', + 'import', + 'kanban', + 'logger', + 'sequence-field', 'workflow', 'workflow-action-trigger', 'workflow-aggregate', @@ -25,41 +43,24 @@ export class PresetNocoBase extends Plugin { 'workflow-parallel', 'workflow-request', 'workflow-sql', - 'client', - 'export', - 'import', - 'backup-restore', - 'iframe-block', - 'formula-field', - 'data-visualization', - 'auth', - 'logger', - 'custom-request', - 'calendar', - 'action-bulk-update', - 'action-bulk-edit', - 'gantt', - 'kanban', - 'action-duplicate', - 'action-print', ]; localPlugins = [ - 'multi-app-manager>=0.7.0-alpha.1', - 'audit-logs>=0.7.1-alpha.4', - 'map>=0.8.1-alpha.3', - 'saml>=0.8.1-alpha.3', - 'snapshot-field>=0.8.1-alpha.3', + // optional plugins, default disabled + 'api-doc>=0.13.0-alpha.1', + 'api-keys>=0.10.1-alpha.1', + 'cas>=0.13.0-alpha.5', 'graph-collection-manager>=0.9.0-alpha.1', + 'localization-management>=0.11.1-alpha.1', + 'map>=0.8.1-alpha.3', + 'mobile-client>=0.10.0-alpha.2', + 'multi-app-manager>=0.7.0-alpha.1', 'multi-app-share-collection>=0.9.2-alpha.1', 'oidc>=0.9.2-alpha.1', - 'mobile-client>=0.10.0-alpha.2', - 'api-keys>=0.10.1-alpha.1', - 'localization-management>=0.11.1-alpha.1', - 'theme-editor>=0.11.1-alpha.1', - 'api-doc>=0.13.0-alpha.1', - 'cas>=0.13.0-alpha.5', + 'saml>=0.8.1-alpha.3', 'sms-auth>=0.10.0-alpha.2', + 'snapshot-field>=0.8.1-alpha.3', + 'theme-editor>=0.11.1-alpha.1', ]; splitNames(name: string) { @@ -183,4 +184,4 @@ export class PresetNocoBase extends Plugin { } } -export default PresetNocoBase; +export default PresetTachyBase; diff --git a/packages/presets/tachybase/src/server/migrations/.gitkeep b/packages/presets/tachybase/src/server/migrations/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 61e8c3b6f..670e611a2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -42,15 +42,15 @@ importers: '@nocobase/build': specifier: workspace:* version: link:packages/core/build - '@nocobase/preset-nocobase': - specifier: workspace:* - version: link:packages/presets/nocobase '@nocobase/test': specifier: workspace:* version: link:packages/core/test '@tachybase/cli': specifier: workspace:* version: link:packages/core/cli + '@tachybase/preset-tachybase': + specifier: workspace:* + version: link:packages/presets/tachybase '@types/react': specifier: ^18.2.73 version: 18.2.75 @@ -160,12 +160,12 @@ importers: '@nocobase/database': specifier: workspace:* version: link:../database - '@nocobase/preset-nocobase': - specifier: workspace:* - version: link:../../presets/nocobase '@nocobase/server': specifier: workspace:* version: link:../server + '@tachybase/preset-tachybase': + specifier: workspace:* + version: link:../../presets/tachybase devDependencies: '@nocobase/cache': specifier: workspace:* @@ -1063,6 +1063,9 @@ importers: nanoid: specifier: 3.3.4 version: 3.3.4 + qs: + specifier: ^6.12.1 + version: 6.12.1 react: specifier: ^18.2.0 version: 18.2.0 @@ -1088,6 +1091,9 @@ importers: '@types/lodash': specifier: 4.17.0 version: 4.17.0 + '@types/qs': + specifier: ^6.9.14 + version: 6.9.14 '@types/semver': specifier: ^7.3.9 version: 7.5.6 @@ -1112,9 +1118,6 @@ importers: koa-compose: specifier: ^4.1.0 version: 4.1.0 - qs: - specifier: ^6.11.2 - version: 6.11.2 redis: specifier: ^4.6.10 version: 4.6.13 @@ -1929,40 +1932,6 @@ importers: specifier: ^11.15.1 version: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) - packages/plugins/@nocobase/plugin-audit-logs: - dependencies: - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - '@nocobase/utils': - specifier: workspace:* - version: link:../../../core/utils - devDependencies: - '@ant-design/icons': - specifier: ~5.3.6 - version: 5.3.6(react-dom@18.2.0)(react@18.2.0) - '@formily/antd-v5': - specifier: 1.x - version: 1.1.9(@types/react-dom@18.2.24)(@types/react@18.2.75)(antd@5.16.1)(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0)(typescript@4.9.5) - '@nocobase/schema': - specifier: workspace:* - version: link:../../../core/schema - react: - specifier: ^18.2.0 - version: 18.2.0 - react-i18next: - specifier: ^11.15.1 - version: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) - packages/plugins/@nocobase/plugin-auth: dependencies: '@nocobase/actions': @@ -2566,34 +2535,6 @@ importers: specifier: ^6.1.6 version: 6.3.3 - packages/plugins/@nocobase/plugin-excel-formula-field: - dependencies: - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - devDependencies: - '@formulajs/formulajs': - specifier: ^4.2.0 - version: 4.3.4 - '@nocobase/schema': - specifier: workspace:* - version: link:../../../core/schema - react: - specifier: ^18.2.0 - version: 18.2.0 - react-i18next: - specifier: ^11.15.1 - version: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) - packages/plugins/@nocobase/plugin-export: dependencies: '@nocobase/actions': @@ -3168,34 +3109,6 @@ importers: specifier: ^6.11.2 version: 6.21.0(react-dom@18.2.0)(react@18.2.0) - packages/plugins/@nocobase/plugin-math-formula-field: - dependencies: - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - devDependencies: - '@nocobase/schema': - specifier: workspace:* - version: link:../../../core/schema - mathjs: - specifier: ^10.6.0 - version: 10.6.4 - react: - specifier: ~18.2.0 - version: 18.2.0 - react-i18next: - specifier: ^11.15.1 - version: 11.18.6(i18next@22.5.1)(react-dom@18.2.0)(react@18.2.0) - packages/plugins/@nocobase/plugin-mobile-client: dependencies: '@nocobase/client': @@ -3769,28 +3682,6 @@ importers: specifier: ^0.17.8 version: 0.17.10 - packages/plugins/@nocobase/plugin-ui-routes-storage: - dependencies: - '@nocobase/actions': - specifier: workspace:* - version: link:../../../core/actions - '@nocobase/client': - specifier: workspace:* - version: link:../../../core/client - '@nocobase/database': - specifier: workspace:* - version: link:../../../core/database - '@nocobase/server': - specifier: workspace:* - version: link:../../../core/server - '@nocobase/test': - specifier: workspace:* - version: link:../../../core/test - devDependencies: - flat-to-nested: - specifier: ^1.1.1 - version: 1.1.1 - packages/plugins/@nocobase/plugin-ui-schema-storage: dependencies: '@nocobase/actions': @@ -4393,7 +4284,7 @@ importers: specifier: 4.17.21 version: 4.17.21 - packages/presets/nocobase: + packages/presets/tachybase: dependencies: '@nocobase/client': specifier: workspace:* @@ -4419,9 +4310,6 @@ importers: '@nocobase/plugin-api-keys': specifier: workspace:* version: link:../../plugins/@nocobase/plugin-api-keys - '@nocobase/plugin-audit-logs': - specifier: workspace:* - version: link:../../plugins/@nocobase/plugin-audit-logs '@nocobase/plugin-auth': specifier: workspace:* version: link:../../plugins/@nocobase/plugin-auth @@ -4575,6 +4463,10 @@ importers: lodash: specifier: 4.17.21 version: 4.17.21 + devDependencies: + '@types/lodash': + specifier: ^4.17.0 + version: 4.17.0 packages: @@ -9276,14 +9168,6 @@ packages: jstat: 1.9.6 dev: false - /@formulajs/formulajs@4.3.4: - resolution: {integrity: sha512-iETOopDEUmKaeEUofUfazebhihErh+klyRQbEemDnnBj0hcwNu3xF0oAPHVL0vU/E01rVjy/ZC+1UBMOVkXrvQ==} - hasBin: true - dependencies: - bessel: 1.0.2 - jstat: 1.9.6 - dev: true - /@gar/promisify@1.1.3: resolution: {integrity: sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==} requiresBuild: true @@ -9528,7 +9412,7 @@ packages: resolution: {integrity: sha512-ccfcIDlogiXNq5KcbAwbaO7lMh3Tm1i3khMPYpxlK8hH/W53zN81KM9coerRLOnTGu3nfXIniAmQbRI9OxbC0w==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /@loadable/component@5.15.2(react@18.1.0): resolution: {integrity: sha512-ryFAZOX5P2vFkUdzaAtTG88IGnr9qxSdvLRvJySXcUA4B4xVWurUNADu3AnKPksxOZajljqTrDEDcYjeL4lvLw==} @@ -11792,7 +11676,7 @@ packages: resolution: {integrity: sha512-OaJ7XLaelTgrvlZD8/aa0vvvxZdUmlCn6MtWeB7TkiKW70BQLc9XEPpDLPdbo52ZhXUCrznlWdCHWxJWtdyajA==} dependencies: '@types/node': 20.12.7 - '@types/qs': 6.9.10 + '@types/qs': 6.9.14 '@types/range-parser': 1.2.7 '@types/send': 0.17.4 @@ -11801,7 +11685,7 @@ packages: dependencies: '@types/body-parser': 1.19.5 '@types/express-serve-static-core': 4.17.41 - '@types/qs': 6.9.10 + '@types/qs': 6.9.14 '@types/serve-static': 1.15.5 /@types/fs-extra@11.0.4: @@ -12062,8 +11946,8 @@ packages: /@types/prop-types@15.7.12: resolution: {integrity: sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==} - /@types/qs@6.9.10: - resolution: {integrity: sha512-3Gnx08Ns1sEoCrWssEgTSJs/rsT2vhGP+Ja9cnnk9k4ALxinORlQneLXFeFKOTJMOeZUFD1s7w+w2AphTpvzZw==} + /@types/qs@6.9.14: + resolution: {integrity: sha512-5khscbd3SwWMhFqylJBLQ0zIu7c1K6Vz0uBIt915BI3zV0q1nfjRQD3RqSBcPaO6PHEF4ov/t9y89fSiyThlPA==} /@types/quill@1.3.10: resolution: {integrity: sha512-IhW3fPW+bkt9MLNlycw8u8fWb7oO7W5URC9MfZYHBlA24rex9rs23D5DETChu1zvgVdc5ka64ICjJOgQMr6Shw==} @@ -14128,7 +14012,7 @@ packages: /array-buffer-byte-length@1.0.0: resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 is-array-buffer: 3.0.2 /array-buffer-byte-length@1.0.1: @@ -14155,10 +14039,10 @@ packages: resolution: {integrity: sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 is-string: 1.0.7 dev: false @@ -14218,18 +14102,18 @@ packages: resolution: {integrity: sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 dev: false /array.prototype.flat@1.3.2: resolution: {integrity: sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 @@ -14238,7 +14122,7 @@ packages: resolution: {integrity: sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 es-shim-unscopables: 1.0.2 @@ -14257,10 +14141,10 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 @@ -14673,6 +14557,7 @@ packages: /bessel@1.0.2: resolution: {integrity: sha512-Al3nHGQGqDYqqinXhQzmwmcRToe/3WyBv4N8aZc5Pef8xw2neZlR9VPi84Sa23JtgWcucu18HxVZrnI0fn2etw==} engines: {node: '>=0.8'} + dev: false /better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} @@ -15161,13 +15046,6 @@ packages: responselike: 1.0.2 dev: false - /call-bind@1.0.5: - resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} - dependencies: - function-bind: 1.1.2 - get-intrinsic: 1.2.2 - set-function-length: 1.1.1 - /call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -15651,7 +15529,7 @@ packages: resolution: {integrity: sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==} dependencies: inflation: 2.1.0 - qs: 6.11.2 + qs: 6.12.1 raw-body: 2.5.2 type-is: 1.6.18 dev: false @@ -16926,9 +16804,9 @@ packages: engines: {node: '>= 0.4'} dependencies: array-buffer-byte-length: 1.0.0 - call-bind: 1.0.5 + call-bind: 1.0.7 es-get-iterator: 1.1.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 is-arguments: 1.1.1 is-array-buffer: 3.0.2 is-date-object: 1.0.5 @@ -16939,7 +16817,7 @@ packages: object-keys: 1.1.1 object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 - side-channel: 1.0.4 + side-channel: 1.0.6 which-boxed-primitive: 1.0.2 which-collection: 1.0.1 which-typed-array: 1.1.13 @@ -17001,14 +16879,6 @@ packages: resolution: {integrity: sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==} dev: false - /define-data-property@1.1.1: - resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} - engines: {node: '>= 0.4'} - dependencies: - get-intrinsic: 1.2.2 - gopd: 1.0.1 - has-property-descriptors: 1.0.1 - /define-data-property@1.1.4: resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} engines: {node: '>= 0.4'} @@ -17029,8 +16899,8 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 - has-property-descriptors: 1.0.1 + define-data-property: 1.1.4 + has-property-descriptors: 1.0.2 object-keys: 1.1.1 /define-property@0.2.5: @@ -17543,16 +17413,16 @@ packages: array-buffer-byte-length: 1.0.0 arraybuffer.prototype.slice: 1.0.2 available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 es-set-tostringtag: 2.0.2 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 get-symbol-description: 1.0.0 globalthis: 1.0.3 gopd: 1.0.1 - has-property-descriptors: 1.0.1 - has-proto: 1.0.1 + has-property-descriptors: 1.0.2 + has-proto: 1.0.3 has-symbols: 1.0.3 hasown: 2.0.2 internal-slot: 1.0.6 @@ -17644,8 +17514,8 @@ packages: /es-get-iterator@1.1.3: resolution: {integrity: sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 is-arguments: 1.1.1 is-map: 2.0.2 @@ -17686,7 +17556,7 @@ packages: resolution: {integrity: sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 has-tostringtag: 1.0.0 hasown: 2.0.2 @@ -18839,6 +18709,7 @@ packages: /flat-to-nested@1.1.1: resolution: {integrity: sha512-Sym5oik6BO9JnsDEjv9Q9hPTCexG2ttk0UiM2mgLEiCiiUOQr8acBd33r8ixnoSGR0HAxPoP8WtLAL5oV46IhQ==} + dev: false /flat@5.0.2: resolution: {integrity: sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==} @@ -19009,7 +18880,7 @@ packages: dezalgo: 1.0.4 hexoid: 1.0.0 once: 1.4.0 - qs: 6.11.2 + qs: 6.12.1 /formstream@1.3.1: resolution: {integrity: sha512-FkW++ub+VbE5dpwukJVDizNWhSgp8FhmhI65pF7BZSVStBqe6Wgxe2Z9/Vhsn7l7nXCPwP+G1cyYlX8VwWOf0g==} @@ -19139,7 +19010,7 @@ packages: resolution: {integrity: sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 functions-have-names: 1.2.3 @@ -19201,14 +19072,6 @@ packages: /get-func-name@2.0.2: resolution: {integrity: sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==} - /get-intrinsic@1.2.2: - resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} - dependencies: - function-bind: 1.1.2 - has-proto: 1.0.1 - has-symbols: 1.0.3 - hasown: 2.0.2 - /get-intrinsic@1.2.4: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} @@ -19280,8 +19143,8 @@ packages: resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 /get-symbol-description@1.0.2: resolution: {integrity: sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==} @@ -19542,7 +19405,7 @@ packages: /gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 /got@9.6.0: resolution: {integrity: sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==} @@ -19698,20 +19561,11 @@ packages: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} engines: {node: '>=8'} - /has-property-descriptors@1.0.1: - resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} - dependencies: - get-intrinsic: 1.2.2 - /has-property-descriptors@1.0.2: resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} dependencies: es-define-property: 1.0.0 - /has-proto@1.0.1: - resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} - engines: {node: '>= 0.4'} - /has-proto@1.0.3: resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} engines: {node: '>= 0.4'} @@ -20280,7 +20134,7 @@ packages: resolution: {integrity: sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==} engines: {node: '>= 0.4'} dependencies: - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 hasown: 2.0.2 side-channel: 1.0.6 @@ -20351,14 +20205,14 @@ packages: resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-array-buffer@3.0.2: resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-typed-array: 1.1.12 /is-array-buffer@3.0.4: @@ -20408,7 +20262,7 @@ packages: resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-buffer@1.1.6: @@ -20539,7 +20393,7 @@ packages: /is-finalizationregistry@1.0.2: resolution: {integrity: sha512-0by5vtUJs8iFQb5TYUHHPudOR+qXYIMKtiUzvLIZITZUjknFmziyBJuLhVRc+Ds0dREFlskDNJKYIdIzu/9pfw==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /is-fullwidth-code-point@1.0.0: resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} @@ -20725,7 +20579,7 @@ packages: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-tostringtag: 1.0.0 /is-relative@1.0.0: @@ -20745,7 +20599,7 @@ packages: /is-shared-array-buffer@1.0.2: resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /is-shared-array-buffer@1.0.3: resolution: {integrity: sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg==} @@ -20849,13 +20703,13 @@ packages: /is-weakref@1.0.2: resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 /is-weakset@2.0.2: resolution: {integrity: sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 /is-weakset@2.0.3: resolution: {integrity: sha512-LvIm3/KWzS9oRFHugab7d+M/GcBXuXX5xZkzPmN+NxihdQlZUQ4dWuSV1xR/sq6upL1TJEDrfBgRepHFdBtSNQ==} @@ -21250,6 +21104,7 @@ packages: /jstat@1.9.6: resolution: {integrity: sha512-rPBkJbK2TnA8pzs93QcDDPlKcrtZWuuCo2dVR0TFLOJSxhqfWOVCSp8aV3/oSbn+4uY4yw1URtLpHQedtmXfug==} + dev: false /jstoxml@2.2.9: resolution: {integrity: sha512-OYWlK0j+roh+eyaMROlNbS5cd5R25Y+IUpdl7cNdB8HNrkgwQzIS7L9MegxOiWNBj9dQhA/yAxiMwCC5mwNoBw==} @@ -22605,10 +22460,10 @@ packages: resolution: {integrity: sha512-2emPTb1reeLLYwHxyVx993iYyCHEiRRO+y8NFXFPL5kl5q14sgTK76cXyEKkeKCHeRw35SfdkUJ10Q1KfHuiIQ==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 + define-data-property: 1.1.4 functions-have-names: 1.2.3 gopd: 1.0.1 - has-property-descriptors: 1.0.1 + has-property-descriptors: 1.0.2 hasown: 2.0.2 isarray: 2.0.5 @@ -23139,7 +22994,7 @@ packages: resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 /object-keys@0.4.0: @@ -23164,7 +23019,7 @@ packages: resolution: {integrity: sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 has-symbols: 1.0.3 object-keys: 1.1.1 @@ -23191,7 +23046,7 @@ packages: resolution: {integrity: sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 dev: false @@ -23217,10 +23072,10 @@ packages: /object.groupby@1.0.1: resolution: {integrity: sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 - get-intrinsic: 1.2.2 + get-intrinsic: 1.2.4 dev: false /object.hasown@1.1.4: @@ -23258,7 +23113,7 @@ packages: resolution: {integrity: sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 dev: false @@ -24924,6 +24779,13 @@ packages: engines: {node: '>=0.6'} dependencies: side-channel: 1.0.4 + dev: false + + /qs@6.12.1: + resolution: {integrity: sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.6 /qs@6.5.3: resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} @@ -26375,7 +26237,7 @@ packages: resolution: {integrity: sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 set-function-name: 2.0.1 @@ -26880,8 +26742,8 @@ packages: resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} engines: {node: '>=0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 has-symbols: 1.0.3 isarray: 2.0.5 @@ -26912,8 +26774,8 @@ packages: /safe-regex-test@1.0.0: resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-regex: 1.1.4 /safe-regex-test@1.0.3: @@ -27167,15 +27029,6 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} - engines: {node: '>= 0.4'} - dependencies: - define-data-property: 1.1.1 - get-intrinsic: 1.2.2 - gopd: 1.0.1 - has-property-descriptors: 1.0.1 - /set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -27191,9 +27044,9 @@ packages: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} dependencies: - define-data-property: 1.1.1 + define-data-property: 1.1.4 functions-have-names: 1.2.3 - has-property-descriptors: 1.0.1 + has-property-descriptors: 1.0.2 /set-function-name@2.0.2: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} @@ -27264,9 +27117,10 @@ packages: /side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 object-inspect: 1.13.1 + dev: false /side-channel@1.0.6: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} @@ -27891,7 +27745,7 @@ packages: resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 @@ -27907,7 +27761,7 @@ packages: /string.prototype.trimend@1.0.7: resolution: {integrity: sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 @@ -27921,7 +27775,7 @@ packages: /string.prototype.trimstart@1.0.7: resolution: {integrity: sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.22.3 @@ -28163,7 +28017,7 @@ packages: formidable: 2.1.2 methods: 1.1.2 mime: 2.6.0 - qs: 6.11.2 + qs: 6.12.1 semver: 7.6.0 transitivePeerDependencies: - supports-color @@ -28327,7 +28181,7 @@ packages: dependencies: '@ljharb/resumer': 0.0.1 '@ljharb/through': 2.3.11 - call-bind: 1.0.5 + call-bind: 1.0.7 deep-equal: 1.1.2 defined: 1.0.1 dotignore: 0.1.2 @@ -29047,8 +28901,8 @@ packages: resolution: {integrity: sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 - get-intrinsic: 1.2.2 + call-bind: 1.0.7 + get-intrinsic: 1.2.4 is-typed-array: 1.1.12 /typed-array-buffer@1.0.2: @@ -29063,9 +28917,9 @@ packages: resolution: {integrity: sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==} engines: {node: '>= 0.4'} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 - has-proto: 1.0.1 + has-proto: 1.0.3 is-typed-array: 1.1.12 /typed-array-byte-length@1.0.1: @@ -29083,9 +28937,9 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 - has-proto: 1.0.1 + has-proto: 1.0.3 is-typed-array: 1.1.12 /typed-array-byte-offset@1.0.2: @@ -29102,7 +28956,7 @@ packages: /typed-array-length@1.0.4: resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 is-typed-array: 1.1.12 @@ -29287,7 +29141,7 @@ packages: /unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} dependencies: - call-bind: 1.0.5 + call-bind: 1.0.7 has-bigints: 1.0.2 has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 @@ -29569,7 +29423,7 @@ packages: resolution: {integrity: sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==} dependencies: punycode: 1.4.1 - qs: 6.11.2 + qs: 6.12.1 /urllib@2.41.0: resolution: {integrity: sha512-pNXdxEv52L67jahLT+/7QE+Fup1y2Gc6EdmrAhQ6OpQIC2rl14oWwv9hvk1GXOZqEnJNwRXHABuwgPOs1CtL7g==} @@ -29591,7 +29445,7 @@ packages: iconv-lite: 0.4.24 ip: 1.1.8 pump: 3.0.0 - qs: 6.11.2 + qs: 6.12.1 statuses: 1.5.0 utility: 1.18.0 transitivePeerDependencies: @@ -30270,7 +30124,7 @@ packages: engines: {node: '>= 0.4'} dependencies: available-typed-arrays: 1.0.5 - call-bind: 1.0.5 + call-bind: 1.0.7 for-each: 0.3.3 gopd: 1.0.1 has-tostringtag: 1.0.0